16 use IEEE.STD_LOGIC_1164.
ALL;
17 use IEEE.NUMERIC_STD.
ALL;
19 use ipbus_lib.ipbus.
all;
20 LIBRARY infrastructure_lib;
21 USE infrastructure_lib.all;
28 rx_clk160 : in std_logic_vector(3 downto 0);
29 rx_clk280 : in std_logic_vector(7 downto 0);
30 ipb_clk : in std_logic;
31 ipb_rst : in std_logic;
33 ipb_out : out ipb_rbus;
35 loopback : out std_logic_vector(5 downto 0);
36 softreset_tx : out std_logic_vector(2 downto 0);
37 softreset_rx : out std_logic_vector(2 downto 0);
38 qpll_lock : in std_logic_vector(2 downto 0);
39 qpll_refclklost : in std_logic_vector(2 downto 0);
40 rx_resetdone : in std_logic_vector (11 downto 0);
41 rx_fsm_resetdone : in std_logic_vector (11 downto 0);
42 rx_byteisaligned : in std_logic_vector (11 downto 0);
43 tx_resetdone : in std_logic_vector (11 downto 0);
44 tx_fsm_resetdone : in std_logic_vector (11 downto 0);
45 tx_bufstatus : in std_logic_vector (23 downto 0);
46 rx_realign : in std_logic_vector (11 downto 0);
47 rx_disperr : in std_logic_vector (47 downto 0);
48 encode_error : in std_logic_vector (47 downto 0);
49 bc_reg_sel : out std_logic_vector (15 downto 0);
50 delay_cntr_0 : in std_logic_vector (3 downto 0);
51 delay_cntr_1 : in std_logic_vector (3 downto 0);
52 mux_sel : out std_logic_vector (15 downto 0);
53 mgt_enable : out std_logic_vector(3 downto 0);
54 crc_error : in std_logic_vector(1 downto 0)
63 signal ipbw: ipb_wbus_array(N_SLAVES-1 downto 0);
64 signal ipbr, ipbr_d: ipb_rbus_array(N_SLAVES-1 downto 0);
65 signal txclk,txresetdone,txfsm_resetdone,mgt_enable_i : std_logic_vector(3 downto 0 );
66 signal mux_sel_i,bc_reg_sel_i : std_logic_vector(15 downto 0);
76 mgt_fabric :
entity ipbus_lib.ipbus_fabric_sel
77 generic map(NSLV => N_SLAVES,
78 SEL_WIDTH => ipbus_sel_width
)
82 sel => ipbus_sel_efex_cntrl_mgt
(ipb_in.ipb_addr
),
83 ipb_to_slaves => ipbw,
84 ipb_from_slaves => ipbr
89 clk280 => rx_clk160
(3 downto 0),
92 ipb_in => ipbw
(N_SLV_MGT_114
),
93 ipb_out => ipbr
(N_SLV_MGT_114
),
96 loopback => loopback
(5 downto 3),
97 bc_reg_sel => bc_reg_sel,
99 bc_cntr_0 =>
(others => '0'
),
100 bc_cntr_1 =>
(others => '0'
),
101 bc_cntr_2 =>
(others => '0'
),
102 bc_cntr_3 =>
(others => '0'
),
103 bc_mux_cntr_0 =>
(others => '0'
),
104 bc_mux_cntr_1 =>
(others => '0'
),
105 bc_mux_cntr_2 =>
(others => '0'
),
106 bc_mux_cntr_3 =>
(others => '0'
),
107 delay_cntr_0 => delay_cntr_0,
108 delay_cntr_1 => delay_cntr_1,
109 delay_cntr_2 =>
(others => '0'
),
110 delay_cntr_3 =>
(others => '0'
),
111 softreset_tx => softreset_tx
(2) ,
112 softreset_rx => softreset_rx
(2) ,
113 mgt_enable => mgt_enable ,
115 qpll_lock => qpll_lock
(2),
116 qpll_refclklost => qpll_refclklost
(2) ,
117 rx_resetdone => rx_resetdone
(11 downto 8) ,
118 rx_fsm_resetdone => rx_fsm_resetdone
(11 downto 8),
119 rx_byteisaligned => rx_byteisaligned
(11 downto 8),
120 tx_resetdone => tx_resetdone
(11 downto 8) ,
121 tx_fsm_resetdone => tx_fsm_resetdone
(11 downto 8),
122 tx_bufstatus => tx_bufstatus
(23 downto 16),
123 rx_realign => rx_realign
(11 downto 8) ,
124 rx_disperr => rx_disperr
(47 downto 32),
125 encode_error => encode_error
(47 downto 32) ,
126 crc_error => crc_error
131 clk280 => rx_clk280
(3 downto 0),
134 ipb_in => ipbw
(N_SLV_MGT_115
),
135 ipb_out => ipbr
(N_SLV_MGT_115
),
138 loopback => loopback
(2 downto 0),
141 bc_cntr_0 =>
(others => '0'
),
142 bc_cntr_1 =>
(others => '0'
),
143 bc_cntr_2 =>
(others => '0'
),
144 bc_cntr_3 =>
(others => '0'
),
145 bc_mux_cntr_0 =>
(others => '0'
),
146 bc_mux_cntr_1 =>
(others => '0'
),
147 bc_mux_cntr_2 =>
(others => '0'
),
148 bc_mux_cntr_3 =>
(others => '0'
),
149 delay_cntr_0 =>
(others => '0'
),
150 delay_cntr_1 =>
(others => '0'
),
151 delay_cntr_2 =>
(others => '0'
),
152 delay_cntr_3 =>
(others => '0'
),
153 softreset_tx => softreset_tx
(0) ,
154 softreset_rx => softreset_rx
(0) ,
157 qpll_lock => qpll_lock
(0),
158 qpll_refclklost => qpll_refclklost
(0) ,
159 rx_resetdone => rx_resetdone
(3 downto 0) ,
160 rx_fsm_resetdone => rx_fsm_resetdone
(3 downto 0),
161 rx_byteisaligned => rx_byteisaligned
(3 downto 0),
162 tx_resetdone => tx_resetdone
(3 downto 0) ,
163 tx_fsm_resetdone => tx_fsm_resetdone
(3 downto 0),
164 tx_bufstatus => tx_bufstatus
(7 downto 0),
165 rx_realign => rx_realign
(3 downto 0) ,
166 rx_disperr => rx_disperr
(15 downto 0),
167 encode_error => encode_error
(15 downto 0) ,
172 clk280 => rx_clk280
(7 downto 4),
175 ipb_in => ipbw
(N_SLV_MGT_116
),
176 ipb_out => ipbr
(N_SLV_MGT_116
),
182 bc_cntr_0 =>
(others => '0'
),
183 bc_cntr_1 =>
(others => '0'
),
184 bc_cntr_2 =>
(others => '0'
),
185 bc_cntr_3 =>
(others => '0'
),
186 bc_mux_cntr_0 =>
(others => '0'
),
187 bc_mux_cntr_1 =>
(others => '0'
),
188 bc_mux_cntr_2 =>
(others => '0'
),
189 bc_mux_cntr_3 =>
(others => '0'
),
190 delay_cntr_0 =>
(others => '0'
),
191 delay_cntr_1 =>
(others => '0'
),
192 delay_cntr_2 =>
(others => '0'
),
193 delay_cntr_3 =>
(others => '0'
),
194 softreset_tx => softreset_tx
(1) ,
195 softreset_rx => softreset_rx
(1) ,
198 qpll_lock => qpll_lock
(1),
199 qpll_refclklost => qpll_refclklost
(1) ,
200 rx_resetdone => rx_resetdone
(7 downto 4) ,
201 rx_fsm_resetdone => rx_fsm_resetdone
(7 downto 4),
202 rx_byteisaligned => rx_byteisaligned
(7 downto 4),
203 tx_resetdone => tx_resetdone
(7 downto 4) ,
204 tx_fsm_resetdone => tx_fsm_resetdone
(7 downto 4),
205 tx_bufstatus => tx_bufstatus
(15 downto 8),
206 rx_realign => rx_realign
(7 downto 4) ,
207 rx_disperr => rx_disperr
(31 downto 16),
208 encode_error => encode_error
(31 downto 16),
MGT ipbus slave for control FPGA.
MGT ipbus slave for control FPGA.