OpenCores
URL https://opencores.org/ocsvn/pcie_ds_dma/pcie_ds_dma/trunk

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [projects/] [ambpex5_sx50t_wishbone/] [src/] [top/] [ambpex5_sx50t_wishbone.vhd] - Blame information for rev 16

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 dsmv
-------------------------------------------------------------------------------
2
--
3
-- Title       : ambpex5_sx50t_wishbone
4
-- Author      : Dmitry Smekhov
5
-- Company     : Instrumental Systems
6
-- E-mail      : dsmv@insys.ru
7
--
8
-- Version     : 1.0
9
--
10
-------------------------------------------------------------------------------
11
--
12
-- Description :        Top-level module for PCIE_CORE64_WISHBONE_M8
13
--
14
-------------------------------------------------------------------------------
15
--
16
-- Version 1.0  20.04.2013
17
--                      Created from sp605_lx45t_wishbone
18
--
19
-------------------------------------------------------------------------------
20
library ieee;
21
use ieee.std_logic_1164.all;
22
 
23
package ambpex5_sx50t_wishbone_pkg is
24
 
25
component ambpex5_sx50t_wishbone is
26
generic
27
(
28
    is_simulation       : integer:=0   --! 0 - synthesis, 1 - simulation 
29
);
30
port
31
(
32
                ---- PCI-Express ----
33
                txp                                     : out std_logic_vector( 7 downto 0 );
34
                txn                                     : out std_logic_vector( 7 downto 0 );
35
 
36
                rxp                                     : in  std_logic_vector( 7 downto 0 ):=(others=>'0');
37
                rxn                                     : in  std_logic_vector( 7 downto 0 ):=(others=>'0');
38
 
39
                mgt251_p                        : in  std_logic:='0';   -- reference clock 250 MHz from PCI_Express
40
                mgt251_n                        : in  std_logic:='0';
41
 
42
                bperst                          : in  std_logic:='0';    -- 0 - reset                                               
43
 
44
                --btp                                   : out std_logic_vector(3 downto 1);        -- testpoint
45
 
46
                ---- Led ----
47
                bled1                           : out std_logic;
48
                bled2                           : out std_logic;
49
                bled3                           : out std_logic;
50
                bled4                           : out std_logic
51
 
52
);
53
 
54
end component ambpex5_sx50t_wishbone;
55
 
56
end package ambpex5_sx50t_wishbone_pkg;
57
-------------------------------------------------------------------------------
58
library ieee;
59
use ieee.std_logic_1164.all;
60
--use ieee.std_logic_arith.all;
61
--use ieee.std_logic_unsigned.all;
62
 
63
library unisim;
64
use unisim.vcomponents.all;
65
 
66
library work;
67
use work.ambpex5_sx50t_wishbone_sopc_wb_pkg.all;
68
 
69
entity ambpex5_sx50t_wishbone is
70
generic
71
(
72
    is_simulation       : integer:=0   --! 0 - synthesis, 1 - simulation 
73
);
74
port
75
(
76
                ---- PCI-Express ----
77
                txp                                     : out std_logic_vector( 7 downto 0 );
78
                txn                                     : out std_logic_vector( 7 downto 0 );
79
 
80
                rxp                                     : in  std_logic_vector( 7 downto 0 ):=(others=>'0');
81
                rxn                                     : in  std_logic_vector( 7 downto 0 ):=(others=>'0');
82
 
83
                mgt251_p                        : in  std_logic:='0';   -- reference clock 250 MHz from PCI_Express
84
                mgt251_n                        : in  std_logic:='0';
85
 
86
                bperst                          : in  std_logic:='0';    -- 0 - reset                                               
87
 
88
                --btp                                   : out std_logic_vector(3 downto 1);        -- testpoint
89
 
90
                ---- Led ----
91
                bled1                           : out std_logic;
92
                bled2                           : out std_logic;
93
                bled3                           : out std_logic;
94
                bled4                           : out std_logic
95
 
96
);
97
end ambpex5_sx50t_wishbone;
98
 
99
architecture rtl of ambpex5_sx50t_wishbone is
100
-------------------------------------------------------------------------------
101
-- 
102
-- PCIE SYS_CON stuff:
103
signal  mgt250                  : std_logic;
104
signal  perst                   : std_logic;
105
-------------------------------------------------------------------------------
106
--
107
-- OUTRPUT LED stuff:
108
signal  sv_led_h        : std_logic_vector(3 downto 0);
109
signal  sv_led_h_p      : std_logic_vector(3 downto 0);
110
-------------------------------------------------------------------------------
111
begin
112
-------------------------------------------------------------------------------
113
--
114
-- Module In/Out deal:
115
--
116
--
117
sv_led_h_p <= not sv_led_h;
118
-- 
119
xled1 :  obuf_s_16 port map( bled1, sv_led_h_p(0) );
120
xled2 :  obuf_s_16 port map( bled2, sv_led_h_p(1) );
121
xled3 :  obuf_s_16 port map( bled3, sv_led_h_p(2) );
122
xled4 :  obuf_s_16 port map( bled4, sv_led_h_p(3) );
123
 
124
--                                                                                                                        
125
xmgtclk : IBUFDS  port map (O => mgt250, I => mgt251_p, IB => mgt251_n );
126
xmperst: ibuf port map( perst, bperst );
127
 
128
-------------------------------------------------------------------------------
129
--
130
-- Instantiate Wishbone SysteM (with all stuff inside)
131
--
132
WB_SOPC :   ambpex5_sx50t_wishbone_sopc_wb
133
generic map
134
(
135
 
136
    is_simulation   => is_simulation    --! 0 - синтез, 1 - моделирование 
137
)
138
port map
139
(
140
 
141
    ---- PCI-Express ----
142
    txp             => txp,
143
    txn             => txn,
144
 
145
    rxp             => rxp,
146
    rxn             => rxn,
147
 
148
    --  sys_con
149
    mgt250          => mgt250,
150
 
151
    perst           => perst,
152
      --
153
    -- GPIO_LED outputs:
154
    led                         => sv_led_h
155
 
156
);
157
-------------------------------------------------------------------------------
158
end rtl;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.