ROD firmware  1.0.5
ATLAS l1-calo - ROD_eFEX and ROD_jFEX firmware for the L1Calo ROD board

Back to ROD documentation
packet_processor.vhd
1 
2 
3 
4 ----------------------------------------------------------------------------------
5 -- Company: University of Cambridge
6 -- Engineer: Ed Flaherty
7 --
8 -- Create Date: 31.01.2017 17:36:24
9 -- Design Name: L1Calo ROD
10 -- Module Name: packet_processor - Behavioral
11 -- Project Name: Phase I upgrade
12 -- Target Devices: V7550T
13 -- Tool Versions:
14 -- Description: Data taken from 12-24 Aurora inputs is assembled into single packets according to L1ID in the header
15 --
16 -- Dependencies:
17 --
18 -- Revision:
19 -- Revision 0.01 - File Created
20 -- Additional Comments:
21 --
22 ----------------------------------------------------------------------------------
23 
24 
25 library IEEE;
26 use IEEE.STD_LOGIC_1164.ALL;
27 use ieee.numeric_std.all;
28 use ieee.std_logic_unsigned.all;
29 use ieee.std_logic_misc.all;
30 use work.ipbus.all;
31 --use work.ipbus_decode_rod_backplane.all;
32 --use work.ipbus_decode_L1CaloHubRodBackplane.all;
33 use work.ipbus_decode_L1CaloHubRodProcessor.all;
34 
35 -- Uncomment the following library declaration if using
36 -- arithmetic functions with Signed or Unsigned values
37 --use IEEE.NUMERIC_STD.ALL;
38 
39 -- Uncomment the following library declaration if instantiating
40 -- any Xilinx leaf cells in this code.
41 --library UNISIM;
42 --use UNISIM.VComponents.all;
43 
45  generic (
46 
47  SIM : integer := 0;
48  jfex : integer := 0;
49  crc20_G_Poly : std_logic_vector(19 downto 0) := x"8349f"; --old poly
50  tob_0_flx_bp_link : integer := 0;
51  bulk_0_flx_bp_link : integer := 1;
52  bulk_1_flx_bp_link : integer := 2;
53  bulk_2_flx_bp_link : integer := 3;
54 
55  -- Width of S_AXI data bus
56  C_S_AXI_DATA_WIDTH : integer := 32;
57  -- Width of S_AXI address bus
58  C_S_AXI_ADDR_WIDTH : integer := 9;
59 
60  --backplane input width
61  bp_width : integer := 64;
62 
63  --width of header
64  header_width : integer := 64;
65 
66  --widh of event queue
67  event_width : integer := 64
68  );
69  Port (
70  ipb_clk: in std_logic;
71  ipb_rst: in std_logic;
72 -- ipb_in: in ipb_wbus;
73 -- ipb_out: out ipb_rbus;
74  ipb_in_backplane : in ipb_wbus;
75  ipb_out_backplane : out ipb_rbus;
76  ipb_in_processor : in ipb_wbus;
77  ipb_out_processor : out ipb_rbus;
78 
79  geo_location : in STD_LOGIC_VECTOR (7 downto 0);
80  L1A : out std_logic;
81  L1A_delay_out : out std_logic;
82  l1id_mis_stretch : out std_logic;
83  full_mode_stat_tob_0 : in std_logic_vector(31 downto 0);
84  full_mode_stat_bulk_0 : in std_logic_vector(31 downto 0);
85  full_mode_stat_bulk_1 : in std_logic_vector(31 downto 0);
86  full_mode_stat_bulk_2 : in std_logic_vector(31 downto 0);
87  FM_L1id_stat_tob_0 : in std_logic_vector(31 downto 0);
88  FM_L1id_stat_bulk_0 : in std_logic_vector(31 downto 0);
89  FM_L1id_stat_bulk_1 : in std_logic_vector(31 downto 0);
90  FM_L1id_stat_bulk_2 : in std_logic_vector(31 downto 0);
91 
92  full_mode_ctrl_tob_0 : out std_logic_vector(31 downto 0);
93  full_mode_ctrl_bulk_0 : out std_logic_vector(31 downto 0);
94  full_mode_ctrl_bulk_1 : out std_logic_vector(31 downto 0);
95  full_mode_ctrl_bulk_2 : out std_logic_vector(31 downto 0);
96 
97  stage_fifo_level_tob_0 : in std_logic_vector(15 downto 0);
98  stage_fifo_level_bulk_0 : in std_logic_vector(15 downto 0);
99  stage_fifo_level_bulk_1 : in std_logic_vector(15 downto 0);
100  stage_fifo_level_bulk_2 : in std_logic_vector(15 downto 0);
101 
102  stage_fifo_busy_tob_0 : out STD_LOGIC;
103  stage_fifo_busy_bulk_0 : out STD_LOGIC;
104  stage_fifo_busy_bulk_1 : out STD_LOGIC;
105  stage_fifo_busy_bulk_2 : out STD_LOGIC;
106  stage_fifo_xoff_tob_0 : out STD_LOGIC;
107  stage_fifo_xoff_bulk_0 : out STD_LOGIC;
108  stage_fifo_xoff_bulk_1 : out STD_LOGIC;
109  stage_fifo_xoff_bulk_2 : out STD_LOGIC;
110  stage_fifo_full_tob_0 : in STD_LOGIC;
111  stage_fifo_full_bulk_0 : in STD_LOGIC;
112  stage_fifo_full_bulk_1 : in STD_LOGIC;
113  stage_fifo_full_bulk_2 : in STD_LOGIC;
114 
115  flx_backpressure : out std_logic_vector(11 downto 0);
116  flx_backpressure_tob_0 : out STD_LOGIC;
117  flx_backpressure_bulk_0 : out STD_LOGIC;
118  flx_backpressure_bulk_1 : out STD_LOGIC;
119  flx_backpressure_bulk_2 : out STD_LOGIC;
120 
121 
122  pp_clock : in STD_LOGIC;
123  clk_40 : in STD_LOGIC;
124  clk_160 : in std_logic;
125  rt_clk : in std_logic;
126  backplane_control : out std_logic_vector(31 downto 0);
127  init_clk : in std_logic;
128  master_reset : in std_logic;
129  rod_slot : in std_logic;
130  ck_pll_lock : in std_logic;
131 
132  CK_INT : in STD_LOGIC;
133  SMBALERT_B : in STD_LOGIC;
134  T_WRN_B : in STD_LOGIC;
135 
136 -- readout_controller ---
137  ro_user_clock : in STD_LOGIC;
138  ro_controller_reset : in STD_LOGIC;
139  ro_txcharisk : out std_logic_vector(3 downto 0);
140  ro_txdata : out std_logic_vector(31 downto 0);
141  ro_status : in std_logic_vector(7 downto 0);
142 ---------------------
143 
144 -------------------------------------
145 
146 
147  aurora_user_clock_0 : in STD_LOGIC;
148  aurora_user_clock_1 : in STD_LOGIC;
149  aurora_user_clock_2 : in STD_LOGIC;
150  aurora_user_clock_3 : in STD_LOGIC;
151  aurora_user_clock_4 : in STD_LOGIC;
152  aurora_user_clock_5 : in STD_LOGIC;
153  aurora_user_clock_6 : in STD_LOGIC;
154  aurora_user_clock_7 : in STD_LOGIC;
155  aurora_user_clock_8 : in STD_LOGIC;
156  aurora_user_clock_9 : in STD_LOGIC;
157  aurora_user_clock_10 : in STD_LOGIC;
158  aurora_user_clock_11 : in STD_LOGIC;
159  aurora_user_clock_12 : in STD_LOGIC;
160  aurora_user_clock_13 : in STD_LOGIC;
161  aurora_user_clock_14 : in STD_LOGIC;
162  aurora_user_clock_15 : in STD_LOGIC;
163  aurora_user_clock_16 : in STD_LOGIC;
164  aurora_user_clock_17 : in STD_LOGIC;
165  aurora_user_clock_18 : in STD_LOGIC;
166  aurora_user_clock_19 : in STD_LOGIC;
167  aurora_user_clock_20 : in STD_LOGIC;
168  aurora_user_clock_21 : in STD_LOGIC;
169  aurora_user_clock_22 : in STD_LOGIC;
170  aurora_user_clock_23 : in STD_LOGIC;
171 
172 
173 
174 
175  aurora_chan_stat_0 : in STD_LOGIC_VECTOR (31 downto 0);
176  aurora_chan_stat_1 : in STD_LOGIC_VECTOR (31 downto 0);
177  aurora_chan_stat_2 : in STD_LOGIC_VECTOR (31 downto 0);
178  aurora_chan_stat_3 : in STD_LOGIC_VECTOR (31 downto 0);
179  aurora_chan_stat_4 : in STD_LOGIC_VECTOR (31 downto 0);
180  aurora_chan_stat_5 : in STD_LOGIC_VECTOR (31 downto 0);
181  aurora_chan_stat_6 : in STD_LOGIC_VECTOR (31 downto 0);
182  aurora_chan_stat_7 : in STD_LOGIC_VECTOR (31 downto 0);
183  aurora_chan_stat_8 : in STD_LOGIC_VECTOR (31 downto 0);
184  aurora_chan_stat_9 : in STD_LOGIC_VECTOR (31 downto 0);
185  aurora_chan_stat_10 : in STD_LOGIC_VECTOR (31 downto 0);
186  aurora_chan_stat_11 : in STD_LOGIC_VECTOR (31 downto 0);
187  aurora_chan_stat_12 : in STD_LOGIC_VECTOR (31 downto 0);
188  aurora_chan_stat_13 : in STD_LOGIC_VECTOR (31 downto 0);
189  aurora_chan_stat_14 : in STD_LOGIC_VECTOR (31 downto 0);
190  aurora_chan_stat_15 : in STD_LOGIC_VECTOR (31 downto 0);
191  aurora_chan_stat_16 : in STD_LOGIC_VECTOR (31 downto 0);
192  aurora_chan_stat_17 : in STD_LOGIC_VECTOR (31 downto 0);
193  aurora_chan_stat_18 : in STD_LOGIC_VECTOR (31 downto 0);
194  aurora_chan_stat_19 : in STD_LOGIC_VECTOR (31 downto 0);
195  aurora_chan_stat_20 : in STD_LOGIC_VECTOR (31 downto 0);
196  aurora_chan_stat_21 : in STD_LOGIC_VECTOR (31 downto 0);
197  aurora_chan_stat_22 : in STD_LOGIC_VECTOR (31 downto 0);
198  aurora_chan_stat_23 : in STD_LOGIC_VECTOR (31 downto 0);
199 
200 
201 
202 
203  aurora_chan_control_0 : out STD_LOGIC_VECTOR (31 downto 0);
204  aurora_chan_control_1 : out STD_LOGIC_VECTOR (31 downto 0);
205  aurora_chan_control_2 : out STD_LOGIC_VECTOR (31 downto 0);
206  aurora_chan_control_3 : out STD_LOGIC_VECTOR (31 downto 0);
207  aurora_chan_control_4 : out STD_LOGIC_VECTOR (31 downto 0);
208  aurora_chan_control_5 : out STD_LOGIC_VECTOR (31 downto 0);
209  aurora_chan_control_6 : out STD_LOGIC_VECTOR (31 downto 0);
210  aurora_chan_control_7 : out STD_LOGIC_VECTOR (31 downto 0);
211  aurora_chan_control_8 : out STD_LOGIC_VECTOR (31 downto 0);
212  aurora_chan_control_9 : out STD_LOGIC_VECTOR (31 downto 0);
213  aurora_chan_control_10 : out STD_LOGIC_VECTOR (31 downto 0);
214  aurora_chan_control_11 : out STD_LOGIC_VECTOR (31 downto 0);
215  aurora_chan_control_12 : out STD_LOGIC_VECTOR (31 downto 0);
216  aurora_chan_control_13 : out STD_LOGIC_VECTOR (31 downto 0);
217  aurora_chan_control_14 : out STD_LOGIC_VECTOR (31 downto 0);
218  aurora_chan_control_15 : out STD_LOGIC_VECTOR (31 downto 0);
219  aurora_chan_control_16 : out STD_LOGIC_VECTOR (31 downto 0);
220  aurora_chan_control_17 : out STD_LOGIC_VECTOR (31 downto 0);
221  aurora_chan_control_18 : out STD_LOGIC_VECTOR (31 downto 0);
222  aurora_chan_control_19 : out STD_LOGIC_VECTOR (31 downto 0);
223  aurora_chan_control_20 : out STD_LOGIC_VECTOR (31 downto 0);
224  aurora_chan_control_21 : out STD_LOGIC_VECTOR (31 downto 0);
225  aurora_chan_control_22 : out STD_LOGIC_VECTOR (31 downto 0);
226  aurora_chan_control_23 : out STD_LOGIC_VECTOR (31 downto 0);
227 
228 
229 
230 
231  System_RESET : in STD_LOGIC;
232 
233  bp_data_0 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
234  bp_data_1 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
235  bp_data_2 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
236  bp_data_3 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
237  bp_data_4 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
238  bp_data_5 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
239  bp_data_6 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
240  bp_data_7 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
241  bp_data_8 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
242  bp_data_9 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
243  bp_data_10 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
244  bp_data_11 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
245  bp_data_12 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
246  bp_data_13 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
247  bp_data_14 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
248  bp_data_15 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
249  bp_data_16 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
250  bp_data_17 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
251  bp_data_18 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
252  bp_data_19 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
253  bp_data_20 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
254  bp_data_21 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
255  bp_data_22 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
256  bp_data_23 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
257 
258 
259 
260 
261  s_axis_tvalid_0 : in std_logic;
262  s_axis_tvalid_1 : in std_logic;
263  s_axis_tvalid_2 : in std_logic;
264  s_axis_tvalid_3 : in std_logic;
265  s_axis_tvalid_4 : in std_logic;
266  s_axis_tvalid_5 : in std_logic;
267  s_axis_tvalid_6 : in std_logic;
268  s_axis_tvalid_7 : in std_logic;
269  s_axis_tvalid_8 : in std_logic;
270  s_axis_tvalid_9 : in std_logic;
271  s_axis_tvalid_10 : in std_logic;
272  s_axis_tvalid_11 : in std_logic;
273  s_axis_tvalid_12 : in std_logic;
274  s_axis_tvalid_13 : in std_logic;
275  s_axis_tvalid_14 : in std_logic;
276  s_axis_tvalid_15 : in std_logic;
277  s_axis_tvalid_16 : in std_logic;
278  s_axis_tvalid_17 : in std_logic;
279  s_axis_tvalid_18 : in std_logic;
280  s_axis_tvalid_19 : in std_logic;
281  s_axis_tvalid_20 : in std_logic;
282  s_axis_tvalid_21 : in std_logic;
283  s_axis_tvalid_22 : in std_logic;
284  s_axis_tvalid_23 : in std_logic;
285 
286  s_axis_tlast_0 : in std_logic;
287  s_axis_tlast_1 : in std_logic;
288  s_axis_tlast_2 : in std_logic;
289  s_axis_tlast_3 : in std_logic;
290  s_axis_tlast_4 : in std_logic;
291  s_axis_tlast_5 : in std_logic;
292  s_axis_tlast_6 : in std_logic;
293  s_axis_tlast_7 : in std_logic;
294  s_axis_tlast_8 : in std_logic;
295  s_axis_tlast_9 : in std_logic;
296  s_axis_tlast_10 : in std_logic;
297  s_axis_tlast_11 : in std_logic;
298  s_axis_tlast_12 : in std_logic;
299  s_axis_tlast_13 : in std_logic;
300  s_axis_tlast_14 : in std_logic;
301  s_axis_tlast_15 : in std_logic;
302  s_axis_tlast_16 : in std_logic;
303  s_axis_tlast_17 : in std_logic;
304  s_axis_tlast_18 : in std_logic;
305  s_axis_tlast_19 : in std_logic;
306  s_axis_tlast_20 : in std_logic;
307  s_axis_tlast_21 : in std_logic;
308  s_axis_tlast_22 : in std_logic;
309  s_axis_tlast_23 : in std_logic;
310 
311 
312 
313 
314 -----the following tready signals can not affect Aurora behaviour, but will instead be used to capture an error condition (input pause needed)
315  s_axis_tready_0 : out std_logic;
316  s_axis_tready_1 : out std_logic;
317  s_axis_tready_2 : out std_logic;
318  s_axis_tready_3 : out std_logic;
319  s_axis_tready_4 : out std_logic;
320  s_axis_tready_5 : out std_logic;
321  s_axis_tready_6 : out std_logic;
322  s_axis_tready_7 : out std_logic;
323  s_axis_tready_8 : out std_logic;
324  s_axis_tready_9 : out std_logic;
325  s_axis_tready_10 : out std_logic;
326  s_axis_tready_11 : out std_logic;
327  s_axis_tready_12 : out std_logic;
328  s_axis_tready_13 : out std_logic;
329  s_axis_tready_14 : out std_logic;
330  s_axis_tready_15 : out std_logic;
331  s_axis_tready_16 : out std_logic;
332  s_axis_tready_17 : out std_logic;
333  s_axis_tready_18 : out std_logic;
334  s_axis_tready_19 : out std_logic;
335  s_axis_tready_20 : out std_logic;
336  s_axis_tready_21 : out std_logic;
337  s_axis_tready_22 : out std_logic;
338  s_axis_tready_23 : out std_logic;
339 
340  s_axi_ufc_rx_tdata_0 : in std_logic_vector(63 downto 0);
341  s_axi_ufc_rx_tdata_1 : in std_logic_vector(63 downto 0);
342  s_axi_ufc_rx_tdata_2 : in std_logic_vector(63 downto 0);
343  s_axi_ufc_rx_tdata_3 : in std_logic_vector(63 downto 0);
344  s_axi_ufc_rx_tdata_4 : in std_logic_vector(63 downto 0);
345  s_axi_ufc_rx_tdata_5 : in std_logic_vector(63 downto 0);
346  s_axi_ufc_rx_tdata_6 : in std_logic_vector(63 downto 0);
347  s_axi_ufc_rx_tdata_7 : in std_logic_vector(63 downto 0);
348  s_axi_ufc_rx_tdata_8 : in std_logic_vector(63 downto 0);
349  s_axi_ufc_rx_tdata_9 : in std_logic_vector(63 downto 0);
350  s_axi_ufc_rx_tdata_10 : in std_logic_vector(63 downto 0);
351  s_axi_ufc_rx_tdata_11 : in std_logic_vector(63 downto 0);
352  s_axi_ufc_rx_tdata_12 : in std_logic_vector(63 downto 0);
353  s_axi_ufc_rx_tdata_13 : in std_logic_vector(63 downto 0);
354  s_axi_ufc_rx_tdata_14 : in std_logic_vector(63 downto 0);
355  s_axi_ufc_rx_tdata_15 : in std_logic_vector(63 downto 0);
356  s_axi_ufc_rx_tdata_16 : in std_logic_vector(63 downto 0);
357  s_axi_ufc_rx_tdata_17 : in std_logic_vector(63 downto 0);
358  s_axi_ufc_rx_tdata_18 : in std_logic_vector(63 downto 0);
359  s_axi_ufc_rx_tdata_19 : in std_logic_vector(63 downto 0);
360  s_axi_ufc_rx_tdata_20 : in std_logic_vector(63 downto 0);
361  s_axi_ufc_rx_tdata_21 : in std_logic_vector(63 downto 0);
362  s_axi_ufc_rx_tdata_22 : in std_logic_vector(63 downto 0);
363  s_axi_ufc_rx_tdata_23 : in std_logic_vector(63 downto 0);
364 
365  s_axi_ufc_rx_tvalid_0 : in std_logic;
366  s_axi_ufc_rx_tvalid_1 : in std_logic;
367  s_axi_ufc_rx_tvalid_2 : in std_logic;
368  s_axi_ufc_rx_tvalid_3 : in std_logic;
369  s_axi_ufc_rx_tvalid_4 : in std_logic;
370  s_axi_ufc_rx_tvalid_5 : in std_logic;
371  s_axi_ufc_rx_tvalid_6 : in std_logic;
372  s_axi_ufc_rx_tvalid_7 : in std_logic;
373  s_axi_ufc_rx_tvalid_8 : in std_logic;
374  s_axi_ufc_rx_tvalid_9 : in std_logic;
375  s_axi_ufc_rx_tvalid_10 : in std_logic;
376  s_axi_ufc_rx_tvalid_11 : in std_logic;
377  s_axi_ufc_rx_tvalid_12 : in std_logic;
378  s_axi_ufc_rx_tvalid_13 : in std_logic;
379  s_axi_ufc_rx_tvalid_14 : in std_logic;
380  s_axi_ufc_rx_tvalid_15 : in std_logic;
381  s_axi_ufc_rx_tvalid_16 : in std_logic;
382  s_axi_ufc_rx_tvalid_17 : in std_logic;
383  s_axi_ufc_rx_tvalid_18 : in std_logic;
384  s_axi_ufc_rx_tvalid_19 : in std_logic;
385  s_axi_ufc_rx_tvalid_20 : in std_logic;
386  s_axi_ufc_rx_tvalid_21 : in std_logic;
387  s_axi_ufc_rx_tvalid_22 : in std_logic;
388  s_axi_ufc_rx_tvalid_23 : in std_logic;
389 
390  s_axi_ufc_rx_tlast_0 : in std_logic;
391  s_axi_ufc_rx_tlast_1 : in std_logic;
392  s_axi_ufc_rx_tlast_2 : in std_logic;
393  s_axi_ufc_rx_tlast_3 : in std_logic;
394  s_axi_ufc_rx_tlast_4 : in std_logic;
395  s_axi_ufc_rx_tlast_5 : in std_logic;
396  s_axi_ufc_rx_tlast_6 : in std_logic;
397  s_axi_ufc_rx_tlast_7 : in std_logic;
398  s_axi_ufc_rx_tlast_8 : in std_logic;
399  s_axi_ufc_rx_tlast_9 : in std_logic;
400  s_axi_ufc_rx_tlast_10 : in std_logic;
401  s_axi_ufc_rx_tlast_11 : in std_logic;
402  s_axi_ufc_rx_tlast_12 : in std_logic;
403  s_axi_ufc_rx_tlast_13 : in std_logic;
404  s_axi_ufc_rx_tlast_14 : in std_logic;
405  s_axi_ufc_rx_tlast_15 : in std_logic;
406  s_axi_ufc_rx_tlast_16 : in std_logic;
407  s_axi_ufc_rx_tlast_17 : in std_logic;
408  s_axi_ufc_rx_tlast_18 : in std_logic;
409  s_axi_ufc_rx_tlast_19 : in std_logic;
410  s_axi_ufc_rx_tlast_20 : in std_logic;
411  s_axi_ufc_rx_tlast_21 : in std_logic;
412  s_axi_ufc_rx_tlast_22 : in std_logic;
413  s_axi_ufc_rx_tlast_23 : in std_logic;
414 
415  multichannel_busy : out std_logic;
416  combined_busy : in std_logic;
417 
418 
419 -- s_axis_tkeep_0 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
420 -- s_axis_tkeep_1 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
421 -- s_axis_tkeep_2 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
422 -- s_axis_tkeep_3 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
423 -- s_axis_tkeep_4 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
424 -- s_axis_tkeep_5 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
425 -- s_axis_tkeep_6 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
426 -- s_axis_tkeep_7 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
427 -- s_axis_tkeep_8 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
428 -- s_axis_tkeep_9 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
429 -- s_axis_tkeep_10 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
430 -- s_axis_tkeep_11 : in STD_LOGIC_VECTOR ((bp_width/8)-1 downto 0);
431 
432 
433  channel_enable_vio : in std_logic_vector (23 downto 0);
434  first_chan_vio : in std_logic_vector (4 downto 0);
435  last_chan_vio : in std_logic_vector (4 downto 0);
436  TTC_ignore_vio : in std_logic;
437  debug_ctrl_vio : in std_logic;
438 
439 
440 
441 --- output queue(s)
442 
443  m_tvalid_0 : out STD_LOGIC;
444  m_tlast_0 : out STD_LOGIC;
445  m_tdata_0 : out STD_LOGIC_VECTOR (bp_width-1 downto 0);
446  m_header_marker_0 : out STD_LOGIC;
447  m_tail_marker_0 : out STD_LOGIC;
448  m_tready_0 : in STD_LOGIC;
449 
450 
451  bulk_m_tvalid_0 : out STD_LOGIC;
452  bulk_m_tlast_0 : out STD_LOGIC;
453  bulk_m_tdata_0 : out STD_LOGIC_VECTOR (63 downto 0);
454  bulk_m_header_marker_0 : out STD_LOGIC;
455  bulk_m_tail_marker_0 : out STD_LOGIC;
456  bulk_m_tready_0 : in STD_LOGIC;
457 
458 
459  bulk_m_tvalid_1 : out STD_LOGIC;
460  bulk_m_tlast_1 : out STD_LOGIC;
461  bulk_m_tdata_1 : out STD_LOGIC_VECTOR (63 downto 0);
462  bulk_m_header_marker_1 : out STD_LOGIC;
463  bulk_m_tail_marker_1 : out STD_LOGIC;
464  bulk_m_tready_1 : in STD_LOGIC;
465 
466  bulk_m_tvalid_2 : out STD_LOGIC;
467  bulk_m_tlast_2 : out STD_LOGIC;
468  bulk_m_tdata_2 : out STD_LOGIC_VECTOR (63 downto 0);
469  bulk_m_header_marker_2 : out STD_LOGIC;
470  bulk_m_tail_marker_2 : out STD_LOGIC;
471  bulk_m_tready_2 : in STD_LOGIC;
472 
473 --TTC signals
474  cttc_user_clk : in std_logic;
475  ttc_status : in std_logic_vector(31 downto 0);
476  ttc_reset : out std_logic;
477  hub_link_reset : out std_logic;
478  ttc_seq : in std_logic_vector(1 downto 0);
479  ttc_word_0 : in std_logic_vector(31 downto 0);
480  ttc_word_1 : in std_logic_vector(31 downto 0);
481  ttc_word_2 : in std_logic_vector(31 downto 0);
482  ttc_word_3 : in std_logic_vector(31 downto 0);
483 
484  ttc_mux_ctrl : in std_logic;
485  BP_CTTC_rxdata : in std_logic_vector (31 downto 0);
486  FM_CTTC_rxdata : in std_logic_vector (31 downto 0);
487  BP_CTTC_rxcharisk : in std_logic_vector (3 downto 0);
488  FM_CTTC_rxcharisk : in std_logic_vector (3 downto 0);
489  BP_CTTC_MGT_bus : in STD_LOGIC_VECTOR(31 DOWNTO 0);
490  FM_CTTC_MGT_bus : in STD_LOGIC_VECTOR(31 DOWNTO 0);
491  BP_CTTC_rxoutclk : in STD_LOGIC;
492  FM_CTTC_rxoutclk : in STD_LOGIC
493 
494 
495  );
496 
497 
498 end packet_processor;
499 
500 architecture RTL of packet_processor is
501 
502 component tob_processor is
503  generic (
504  CRC20_G_Poly : std_logic_vector(19 downto 0) := x"8349f"; --old poly
505  sim : integer := 0;
506  jfex : integer := 0
507  );
508  Port (
509 ipb_clk: in std_logic;
510 ipb_rst: in std_logic;
511 ipb_in: in ipb_wbus;
512 ipb_out: out ipb_rbus;
513 
514 geo_location : in STD_LOGIC_VECTOR (7 downto 0);
515 event_sel : in STD_LOGIC_VECTOR (1 downto 0);
516 rod_slot : in std_logic;
517 
518 full_mode_ctrl : out STD_LOGIC_VECTOR (31 downto 0);
519 FM_L1id_stat : in std_logic_vector(31 downto 0);
520 full_mode_stat : in STD_LOGIC_VECTOR (31 downto 0);
521 stage_fifo_level : in std_logic_vector (15 downto 0);
522  stage_fifo_busy : out STD_LOGIC;
523  stage_fifo_xoff : out STD_LOGIC;
524  stage_fifo_full : in STD_LOGIC;
525  --flx_backpressure : in STD_LOGIC;
526  flx_backpressure : in STD_LOGIC_vector (11 downto 0);
527  flx_backpressure_tob : out STD_LOGIC;
528 
529  pp_clock : in STD_LOGIC;
530  rt_clk : in std_logic;
531 -- clock : in STD_LOGIC;
532  --reset : in STD_LOGIC;
533  system_reset : in STD_LOGIC;
534  proc_reset : in STD_LOGIC;
535  wdog_fifo_reset : out STD_LOGIC;
536  first_chan : in STD_LOGIC_VECTOR (4 downto 0);
537  last_chan : in STD_LOGIC_VECTOR (4 downto 0);
538  TTC_ignore : in STD_LOGIC;
539 
540  master_header : in STD_LOGIC_VECTOR (63 downto 0); --synchronous to pp_clk
541  header_fifo_valid : in STD_LOGIC;
542  header_read_en : out std_logic;
543 
544 header_sequence : in STD_LOGIC_VECTOR (11 downto 0);
545 header_type : in STD_LOGIC_VECTOR (3 downto 0);
546 timeout_err_out : out std_logic;
547  --- output queue(s)
548 
549  m_tvalid : out STD_LOGIC;
550  m_tlast : out STD_LOGIC;
551  m_tdata : out STD_LOGIC_VECTOR (bp_width-1 downto 0);
552  m_header_marker : out STD_LOGIC;
553  m_tail_marker : out STD_LOGIC;
554  m_tready : in STD_LOGIC;
555  ttc_rollover : out std_logic;
556  l1id_mis_stretch : out std_logic;
557 
558  s_tdata_0 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
559  s_tvalid_0 : in STD_LOGIC;
560  s_tlast_0 : in STD_LOGIC;
561  s_tready_0 : out STD_LOGIC;
562  s_header_mark_0 : in STD_LOGIC;
563  s_trailer_mark_0 : in STD_LOGIC;
564  s_hdr_crc_tag_0 : in STD_LOGIC;
565  s_poll_chan_0 : out STD_LOGIC;
566  s_chan_enable_0 : in STD_LOGIC;
567 
568  s_tdata_1 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
569  s_tvalid_1 : in STD_LOGIC;
570  s_tlast_1 : in STD_LOGIC;
571  s_tready_1 : out STD_LOGIC;
572  s_header_mark_1 : in STD_LOGIC;
573  s_trailer_mark_1 : in STD_LOGIC;
574  s_hdr_crc_tag_1 : in STD_LOGIC;
575  s_poll_chan_1 : out STD_LOGIC;
576  s_chan_enable_1 : in STD_LOGIC;
577 
578  s_tdata_2 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
579  s_tvalid_2 : in STD_LOGIC;
580  s_tlast_2 : in STD_LOGIC;
581  s_tready_2 : out STD_LOGIC;
582  s_header_mark_2 : in STD_LOGIC;
583  s_trailer_mark_2 : in STD_LOGIC;
584  s_hdr_crc_tag_2 : in STD_LOGIC;
585  s_poll_chan_2 : out STD_LOGIC;
586  s_chan_enable_2 : in STD_LOGIC;
587 
588  s_tdata_3 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
589  s_tvalid_3 : in STD_LOGIC;
590  s_tlast_3 : in STD_LOGIC;
591  s_tready_3 : out STD_LOGIC;
592  s_header_mark_3 : in STD_LOGIC;
593  s_trailer_mark_3 : in STD_LOGIC;
594  s_hdr_crc_tag_3 : in STD_LOGIC;
595  s_poll_chan_3 : out STD_LOGIC;
596  s_chan_enable_3 : in STD_LOGIC;
597 
598  s_tdata_4 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
599  s_tvalid_4 : in STD_LOGIC;
600  s_tlast_4 : in STD_LOGIC;
601  s_tready_4 : out STD_LOGIC;
602  s_header_mark_4 : in STD_LOGIC;
603  s_trailer_mark_4 : in STD_LOGIC;
604  s_hdr_crc_tag_4 : in STD_LOGIC;
605  s_poll_chan_4 : out STD_LOGIC;
606  s_chan_enable_4 : in STD_LOGIC;
607 
608  s_tdata_5 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
609  s_tvalid_5 : in STD_LOGIC;
610  s_tlast_5 : in STD_LOGIC;
611  s_tready_5 : out STD_LOGIC;
612  s_header_mark_5 : in STD_LOGIC;
613  s_trailer_mark_5 : in STD_LOGIC;
614  s_hdr_crc_tag_5 : in STD_LOGIC;
615  s_poll_chan_5 : out STD_LOGIC;
616  s_chan_enable_5 : in STD_LOGIC;
617 
618  s_tdata_6 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
619  s_tvalid_6 : in STD_LOGIC;
620  s_tlast_6 : in STD_LOGIC;
621  s_tready_6 : out STD_LOGIC;
622  s_header_mark_6 : in STD_LOGIC;
623  s_trailer_mark_6 : in STD_LOGIC;
624  s_hdr_crc_tag_6 : in STD_LOGIC;
625  s_poll_chan_6 : out STD_LOGIC;
626  s_chan_enable_6 : in STD_LOGIC;
627 
628  s_tdata_7 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
629  s_tvalid_7 : in STD_LOGIC;
630  s_tlast_7 : in STD_LOGIC;
631  s_tready_7 : out STD_LOGIC;
632  s_header_mark_7 : in STD_LOGIC;
633  s_trailer_mark_7 : in STD_LOGIC;
634  s_hdr_crc_tag_7 : in STD_LOGIC;
635  s_poll_chan_7 : out STD_LOGIC;
636  s_chan_enable_7 : in STD_LOGIC;
637 
638  s_tdata_8 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
639  s_tvalid_8 : in STD_LOGIC;
640  s_tlast_8 : in STD_LOGIC;
641  s_tready_8 : out STD_LOGIC;
642  s_header_mark_8 : in STD_LOGIC;
643  s_trailer_mark_8 : in STD_LOGIC;
644  s_hdr_crc_tag_8 : in STD_LOGIC;
645  s_poll_chan_8 : out STD_LOGIC;
646  s_chan_enable_8 : in STD_LOGIC;
647 
648  s_tdata_9 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
649  s_tvalid_9 : in STD_LOGIC;
650  s_tlast_9 : in STD_LOGIC;
651  s_tready_9 : out STD_LOGIC;
652  s_header_mark_9 : in STD_LOGIC;
653  s_trailer_mark_9 : in STD_LOGIC;
654  s_hdr_crc_tag_9 : in STD_LOGIC;
655  s_poll_chan_9 : out STD_LOGIC;
656  s_chan_enable_9 : in STD_LOGIC;
657 
658  s_tdata_10 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
659  s_tvalid_10 : in STD_LOGIC;
660  s_tlast_10 : in STD_LOGIC;
661  s_tready_10 : out STD_LOGIC;
662  s_header_mark_10 : in STD_LOGIC;
663  s_trailer_mark_10 : in STD_LOGIC;
664  s_hdr_crc_tag_10 : in STD_LOGIC;
665  s_poll_chan_10 : out STD_LOGIC;
666  s_chan_enable_10 : in STD_LOGIC;
667 
668  s_tdata_11 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
669  s_tvalid_11 : in STD_LOGIC;
670  s_tlast_11 : in STD_LOGIC;
671  s_tready_11 : out STD_LOGIC;
672  s_header_mark_11 : in STD_LOGIC;
673  s_trailer_mark_11 : in STD_LOGIC;
674  s_hdr_crc_tag_11 : in STD_LOGIC;
675  s_poll_chan_11 : out STD_LOGIC;
676  s_chan_enable_11 : in STD_LOGIC;
677 
678 
679 
680 
681  s_tdata_12 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
682  s_tvalid_12 : in STD_LOGIC;
683  s_tlast_12 : in STD_LOGIC;
684  s_tready_12 : out STD_LOGIC;
685  s_header_mark_12 : in STD_LOGIC;
686  s_trailer_mark_12 : in STD_LOGIC;
687  s_hdr_crc_tag_12 : in STD_LOGIC;
688  s_poll_chan_12 : out STD_LOGIC;
689  s_chan_enable_12 : in STD_LOGIC;
690 
691 
692  s_tdata_13 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
693  s_tvalid_13 : in STD_LOGIC;
694  s_tlast_13 : in STD_LOGIC;
695  s_tready_13 : out STD_LOGIC;
696  s_header_mark_13 : in STD_LOGIC;
697  s_trailer_mark_13 : in STD_LOGIC;
698  s_hdr_crc_tag_13 : in STD_LOGIC;
699  s_poll_chan_13 : out STD_LOGIC;
700  s_chan_enable_13 : in STD_LOGIC;
701 
702  s_tdata_14 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
703  s_tvalid_14 : in STD_LOGIC;
704  s_tlast_14 : in STD_LOGIC;
705  s_tready_14 : out STD_LOGIC;
706  s_header_mark_14 : in STD_LOGIC;
707  s_trailer_mark_14 : in STD_LOGIC;
708  s_hdr_crc_tag_14 : in STD_LOGIC;
709  s_poll_chan_14 : out STD_LOGIC;
710  s_chan_enable_14 : in STD_LOGIC;
711 
712  s_tdata_15 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
713  s_tvalid_15 : in STD_LOGIC;
714  s_tlast_15 : in STD_LOGIC;
715  s_tready_15 : out STD_LOGIC;
716  s_header_mark_15 : in STD_LOGIC;
717  s_trailer_mark_15 : in STD_LOGIC;
718  s_hdr_crc_tag_15 : in STD_LOGIC;
719  s_poll_chan_15 : out STD_LOGIC;
720  s_chan_enable_15 : in STD_LOGIC;
721 
722 
723  s_tdata_16 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
724  s_tvalid_16 : in STD_LOGIC;
725  s_tlast_16 : in STD_LOGIC;
726  s_tready_16 : out STD_LOGIC;
727  s_header_mark_16 : in STD_LOGIC;
728  s_trailer_mark_16 : in STD_LOGIC;
729  s_hdr_crc_tag_16 : in STD_LOGIC;
730  s_poll_chan_16 : out STD_LOGIC;
731  s_chan_enable_16 : in STD_LOGIC;
732 
733  s_tdata_17 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
734  s_tvalid_17 : in STD_LOGIC;
735  s_tlast_17 : in STD_LOGIC;
736  s_tready_17 : out STD_LOGIC;
737  s_header_mark_17 : in STD_LOGIC;
738  s_trailer_mark_17 : in STD_LOGIC;
739  s_hdr_crc_tag_17 : in STD_LOGIC;
740  s_poll_chan_17 : out STD_LOGIC;
741  s_chan_enable_17 : in STD_LOGIC;
742 
743 
744  s_tdata_18 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
745  s_tvalid_18 : in STD_LOGIC;
746  s_tlast_18 : in STD_LOGIC;
747  s_tready_18 : out STD_LOGIC;
748  s_header_mark_18 : in STD_LOGIC;
749  s_trailer_mark_18 : in STD_LOGIC;
750  s_hdr_crc_tag_18 : in STD_LOGIC;
751  s_poll_chan_18 : out STD_LOGIC;
752  s_chan_enable_18 : in STD_LOGIC;
753 
754 
755  s_tdata_19 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
756  s_tvalid_19 : in STD_LOGIC;
757  s_tlast_19 : in STD_LOGIC;
758  s_tready_19 : out STD_LOGIC;
759  s_header_mark_19 : in STD_LOGIC;
760  s_trailer_mark_19 : in STD_LOGIC;
761  s_hdr_crc_tag_19 : in STD_LOGIC;
762  s_poll_chan_19 : out STD_LOGIC;
763  s_chan_enable_19 : in STD_LOGIC;
764 
765 
766  s_tdata_20 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
767  s_tvalid_20 : in STD_LOGIC;
768  s_tlast_20 : in STD_LOGIC;
769  s_tready_20 : out STD_LOGIC;
770  s_header_mark_20 : in STD_LOGIC;
771  s_trailer_mark_20 : in STD_LOGIC;
772  s_hdr_crc_tag_20 : in STD_LOGIC;
773  s_poll_chan_20 : out STD_LOGIC;
774  s_chan_enable_20 : in STD_LOGIC;
775 
776 
777 
778  s_tdata_21 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
779  s_tvalid_21 : in STD_LOGIC;
780  s_tlast_21 : in STD_LOGIC;
781  s_tready_21 : out STD_LOGIC;
782  s_header_mark_21 : in STD_LOGIC;
783  s_trailer_mark_21 : in STD_LOGIC;
784  s_hdr_crc_tag_21 : in STD_LOGIC;
785  s_poll_chan_21 : out STD_LOGIC;
786  s_chan_enable_21 : in STD_LOGIC;
787 
788 
789  s_tdata_22 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
790  s_tvalid_22 : in STD_LOGIC;
791  s_tlast_22 : in STD_LOGIC;
792  s_tready_22 : out STD_LOGIC;
793  s_header_mark_22 : in STD_LOGIC;
794  s_trailer_mark_22 : in STD_LOGIC;
795  s_hdr_crc_tag_22 : in STD_LOGIC;
796  s_poll_chan_22 : out STD_LOGIC;
797  s_chan_enable_22 : in STD_LOGIC;
798 
799  s_tdata_23 : in STD_LOGIC_VECTOR ((bp_width-1) downto 0);
800  s_tvalid_23 : in STD_LOGIC;
801  s_tlast_23 : in STD_LOGIC;
802  s_tready_23 : out STD_LOGIC;
803  s_header_mark_23 : in STD_LOGIC;
804  s_trailer_mark_23 : in STD_LOGIC;
805  s_hdr_crc_tag_23 : in STD_LOGIC;
806  s_poll_chan_23 : out STD_LOGIC;
807  s_chan_enable_23 : in STD_LOGIC
808 
809 
810 
811 
812 
813  );
814 
815 
816 
817 end component;
818 
819 
820 
821 component bulk_processor is
822  generic (
823  sim : integer := 0
824  );
825  Port (
826  ipb_clk: in std_logic;
827  ipb_rst: in std_logic;
828  ipb_in: in ipb_wbus;
829  ipb_out: out ipb_rbus;
830 
831  full_mode_ctrl : out STD_LOGIC_VECTOR (31 downto 0);
832  full_mode_stat : in STD_LOGIC_VECTOR (31 downto 0);
833  FM_L1id_stat : in std_logic_vector(31 downto 0);
834  stage_fifo_level : in std_logic_vector (15 downto 0);
835  stage_fifo_busy : out STD_LOGIC;
836  stage_fifo_xoff : out STD_LOGIC;
837  stage_fifo_full : in STD_LOGIC;
838 
839  pp_clock : in STD_LOGIC;
840  rt_clk : in STD_LOGIC;
841  system_reset : in STD_LOGIC;
842  proc_reset : in STD_LOGIC;
843  geo_location : in STD_LOGIC_VECTOR (7 downto 0);
844 
845  --signals added for the Detector Specific Event Type
846  header_sequence : in STD_LOGIC_VECTOR (11 downto 0);
847  header_type : in STD_LOGIC_VECTOR (3 downto 0);
848  master_header : in std_logic_vector(63 downto 0);
849  header_fifo_empty : in STD_LOGIC;
850  L1ID_error : in STD_LOGIC;
851  CTTC_CRC_error : in STD_LOGIC;
852  header_read_en : out STD_LOGIC;
853  header_fifo_valid: in STD_LOGIC;
854  header_fifo_full : in STD_LOGIC;
855  det_spec_evnt_sel : in std_logic_vector(3 downto 0);
856  proc_number : in std_logic_vector(3 downto 0);
857  -- flx_backpressure : in STD_LOGIC;
858  flx_backpressure : in STD_LOGIC_vector(11 downto 0);
859  flx_backpressure_bulk : out STD_LOGIC;
860 
861  -------
862 
863  --- output queue(s)
864 
865  m_tvalid : out STD_LOGIC;
866  m_tlast : out STD_LOGIC;
867  m_tdata : out STD_LOGIC_VECTOR (63 downto 0);
868  m_header_marker : out STD_LOGIC;
869  m_tail_marker : out STD_LOGIC;
870  m_tready : in STD_LOGIC;
871 
872  s_tdata_0 : in STD_LOGIC_VECTOR (63 downto 0);
873  s_tvalid_0 : in STD_LOGIC;
874  s_tlast_0 : in STD_LOGIC;
875  s_tready_0 : out STD_LOGIC;
876  s_header_mark_0 : in STD_LOGIC;
877  s_trailer_mark_0 : in STD_LOGIC;
878  s_poll_chan_0 : out STD_LOGIC;
879  s_chan_enable_0 : in STD_LOGIC;
880 
881  s_tdata_1 : in STD_LOGIC_VECTOR (63 downto 0);
882  s_tvalid_1 : in STD_LOGIC;
883  s_tlast_1 : in STD_LOGIC;
884  s_tready_1 : out STD_LOGIC;
885  s_header_mark_1 : in STD_LOGIC;
886  s_trailer_mark_1 : in STD_LOGIC;
887  s_poll_chan_1 : out STD_LOGIC;
888  s_chan_enable_1 : in STD_LOGIC;
889 
890  s_tdata_2 : in STD_LOGIC_VECTOR (63 downto 0);
891  s_tvalid_2 : in STD_LOGIC;
892  s_tlast_2 : in STD_LOGIC;
893  s_tready_2 : out STD_LOGIC;
894  s_header_mark_2 : in STD_LOGIC;
895  s_trailer_mark_2 : in STD_LOGIC;
896  s_poll_chan_2 : out STD_LOGIC;
897  s_chan_enable_2 : in STD_LOGIC;
898 
899  s_tdata_3 : in STD_LOGIC_VECTOR (63 downto 0);
900  s_tvalid_3 : in STD_LOGIC;
901  s_tlast_3 : in STD_LOGIC;
902  s_tready_3 : out STD_LOGIC;
903  s_header_mark_3 : in STD_LOGIC;
904  s_trailer_mark_3 : in STD_LOGIC;
905  s_poll_chan_3 : out STD_LOGIC;
906  s_chan_enable_3 : in STD_LOGIC;
907 
908  s_tdata_4 : in STD_LOGIC_VECTOR (63 downto 0);
909  s_tvalid_4 : in STD_LOGIC;
910  s_tlast_4 : in STD_LOGIC;
911  s_tready_4 : out STD_LOGIC;
912  s_header_mark_4 : in STD_LOGIC;
913  s_trailer_mark_4 : in STD_LOGIC;
914  s_poll_chan_4 : out STD_LOGIC;
915  s_chan_enable_4 : in STD_LOGIC;
916 
917  s_tdata_5 : in STD_LOGIC_VECTOR (63 downto 0);
918  s_tvalid_5 : in STD_LOGIC;
919  s_tlast_5 : in STD_LOGIC;
920  s_tready_5 : out STD_LOGIC;
921  s_header_mark_5 : in STD_LOGIC;
922  s_trailer_mark_5 : in STD_LOGIC;
923  s_poll_chan_5 : out STD_LOGIC;
924  s_chan_enable_5 : in STD_LOGIC;
925 
926  s_tdata_6 : in STD_LOGIC_VECTOR (63 downto 0);
927  s_tvalid_6 : in STD_LOGIC;
928  s_tlast_6 : in STD_LOGIC;
929  s_tready_6 : out STD_LOGIC;
930  s_header_mark_6 : in STD_LOGIC;
931  s_trailer_mark_6 : in STD_LOGIC;
932  s_poll_chan_6 : out STD_LOGIC;
933  s_chan_enable_6 : in STD_LOGIC;
934 
935  s_tdata_7 : in STD_LOGIC_VECTOR (63 downto 0);
936  s_tvalid_7 : in STD_LOGIC;
937  s_tlast_7 : in STD_LOGIC;
938  s_tready_7 : out STD_LOGIC;
939  s_header_mark_7 : in STD_LOGIC;
940  s_trailer_mark_7 : in STD_LOGIC;
941  s_poll_chan_7 : out STD_LOGIC;
942  s_chan_enable_7 : in STD_LOGIC;
943 
944  first_chan : in STD_LOGIC_VECTOR (4 downto 0);
945  last_chan : in STD_LOGIC_VECTOR (4 downto 0);
946  vio_chan_enable : in STD_LOGIC_VECTOR (11 downto 0)
947 
948 
949  );
950 end component;
951 
952 
953 
954 
955 component input_fifos is
956 generic (
957  sim : integer := 0;
958  jfex : integer := 1
959  );
960  Port (
961 
962 ipb_clk: in std_logic;
963 ipb_rst: in std_logic;
964 ipb_in: in ipb_wbus;
965 ipb_out: out ipb_rbus;
966 --ipbr_backplane: in ipb_rbus;
967 --ipbw_backplane: out ipb_wbus;
968 
969 RESET : in std_logic;
970 pp_clock : in std_logic;
971 clk_40 : in std_logic;
972 clk_160 : in std_logic;
973 rt_clk : in std_logic;
974 backplane_control : out std_logic_vector(31 downto 0);
975 wdog_fifo_reset : in STD_LOGIC;
976 init_clk : in std_logic;
977 ck_pll_lock : in std_logic;
978 master_reset : in std_logic;
979 L1A : in std_logic;
980 seq : in std_logic_vector(1 downto 0);
981 ro_status : in std_logic_vector(7 downto 0);
982 ro_user_clock : in std_logic;
983 flx_backpressure : in std_logic_vector(11 downto 0);
984 
985 CK_INT : in STD_LOGIC;
986 SMBALERT_B : in STD_LOGIC;
987 T_WRN_B : in STD_LOGIC;
988 
989 ttc_status : in std_logic_vector(31 downto 0);
990 ttc_fifo_level : in std_logic_vector(15 downto 0);
991 L1ID_error : in std_logic;
992 CTTC_CRC_error : in std_logic;
993 cttc_user_clk : in std_logic;
994 ttc_reg : in STD_LOGIC_VECTOR(63 DOWNTO 0);
995 ttc_reset : out std_logic;
996 hub_link_reset : out std_logic;
997 --reset_all_channels : in std_logic;
998 chan_enable : out STD_LOGIC_VECTOR (23 downto 0);
999 first_chan : out STD_LOGIC_vector(4 downto 0);
1000 last_chan : out STD_LOGIC_vector(4 downto 0);
1001 ttc_ignore : out std_logic;
1002 TTC_CRC_ignore : out std_logic;
1003 TTC_fifo_rst : out std_logic;
1004 header_sequence : out STD_LOGIC_VECTOR (11 downto 0);
1005 header_type : out STD_LOGIC_VECTOR (3 downto 0);
1006 det_spec_evnt_sel : out STD_LOGIC_VECTOR (3 downto 0);
1007 multichannel_busy : out std_logic;
1008 combined_busy : in std_logic;
1009 event_sel : out STD_LOGIC_VECTOR (1 downto 0);
1010 event_count : in STD_LOGIC_VECTOR(31 DOWNTO 0);
1011 orbit_count : in STD_LOGIC_VECTOR(15 DOWNTO 0);
1012 event_count_reset : out std_logic;
1013 orbit_count_reset : out std_logic;
1014 bcn_adjustment : out std_logic_vector(11 downto 0);
1015 
1016 l1id_continuity_control : out std_logic_vector(31 downto 0);
1017 l1id_continuity_status : in STD_LOGIC_vector (31 downto 0);
1018 l1id_local_miss : in STD_LOGIC_vector (31 downto 0);
1019 l1id_ttc_miss : in STD_LOGIC_vector (31 downto 0);
1020 l1id_error_count : in STD_LOGIC_vector (31 downto 0);
1021 timeout_threshold : out std_logic_vector(31 downto 0);
1022 repeat_counter : in STD_LOGIC_vector(31 downto 0);
1023 timeout_err : in std_logic;
1024 --***************************************************************
1025 --********** channel #0 *********************************
1026 --***************************************************************
1027 
1028 -----aurora input bus --------------------------------------------------
1029 aurora_user_clk_0 : in std_logic;
1030 aurora_chan_stat_0 : in std_logic_vector(31 downto 0);
1031 aurora_chan_control_0 : out std_logic_vector(31 downto 0);
1032 s_axis_tvalid_0 : in std_logic;
1033 s_axis_tlast_0 : in std_logic;
1034 tob_s_tready_0 : out std_logic;
1035 s_axis_tdata_0 : in std_logic_vector(63 downto 0);
1036 
1037 --tob output axi bus --------------------------------------
1038 tob_poll_chan_0 : in std_logic;
1039 tob_m_tvalid_0 : out std_logic;
1040 tob_m_tlast_0 : out std_logic;
1041 tob_m_tready_0 : in std_logic;
1042 tob_m_tdata_0 : out std_logic_vector(63 downto 0);
1043 tob_header_marker_0 : out std_logic;
1044 tob_tail_marker_0 : out std_logic;
1045 hdr_crc_tag_0 : out std_logic;
1046 comb_error_tag_0 : out std_logic;
1047 
1048 --calo output axi bus --------------------------------------
1049 calo_poll_chan_0 : in std_logic;
1050 calo_m_tvalid_0 : out std_logic;
1051 calo_m_fifo_tlast_0 : out std_logic;
1052 calo_m_axis_tready_0 : in std_logic;
1053 calo_s_axis_tready_0 : out std_logic;
1054 calo_m_axis_tdata_0 : out std_logic_vector(63 downto 0);
1055 calo_header_marker_0 : out std_logic;
1056 calo_tail_marker_0 : out std_logic;
1057 
1058 --ufc message axi bus --------------------------------------
1059 s_axi_ufc_rx_tdata_0 : in std_logic_vector(63 downto 0);
1060 s_axi_ufc_rx_tvalid_0 : in std_logic;
1061 s_axi_ufc_rx_tlast_0 : in std_logic;
1062 
1063 --***************************************************************
1064 --********** channel #1 *********************************
1065 --***************************************************************
1066 
1067 -----aurora input bus --------------------------------------------------
1068 
1069 aurora_user_clk_1 : in std_logic;
1070 aurora_chan_stat_1 : in std_logic_vector(31 downto 0);
1071 aurora_chan_control_1 : out std_logic_vector(31 downto 0);
1072 s_axis_tvalid_1 : in std_logic;
1073 s_axis_tlast_1 : in std_logic;
1074 tob_s_tready_1 : out std_logic;
1075 s_axis_tdata_1 : in std_logic_vector(63 downto 0);
1076 
1077 --tob output axi bus --------------------------------------
1078 tob_poll_chan_1 : in std_logic;
1079 tob_m_tvalid_1 : out std_logic;
1080 tob_m_tlast_1 : out std_logic;
1081 tob_m_tready_1 : in std_logic;
1082 tob_m_tdata_1 : out std_logic_vector(63 downto 0);
1083 tob_header_marker_1 : out std_logic;
1084 tob_tail_marker_1 : out std_logic;
1085 hdr_crc_tag_1 : out std_logic;
1086 comb_error_tag_1 : out std_logic;
1087 
1088 --calo output axi bus --------------------------------------
1089 calo_poll_chan_1 : in std_logic;
1090 calo_m_tvalid_1 : out std_logic;
1091 calo_m_fifo_tlast_1 : out std_logic;
1092 calo_m_axis_tready_1 : in std_logic;
1093 calo_s_axis_tready_1 : out std_logic;
1094 calo_m_axis_tdata_1 : out std_logic_vector(63 downto 0);
1095 calo_header_marker_1 : out std_logic;
1096 calo_tail_marker_1 : out std_logic;
1097 
1098 --ufc message axi bus --------------------------------------
1099  s_axi_ufc_rx_tdata_1 : in std_logic_vector(63 downto 0);
1100  s_axi_ufc_rx_tvalid_1 : in std_logic;
1101  s_axi_ufc_rx_tlast_1 : in std_logic;
1102 
1103 
1104 
1105 --***************************************************************
1106 --********** channel #2 *********************************
1107 --***************************************************************
1108 
1109 -----aurora input bus --------------------------------------------------
1110 
1111 aurora_user_clk_2 : in std_logic;
1112 aurora_chan_stat_2 : in std_logic_vector(31 downto 0);
1113 aurora_chan_control_2 : out std_logic_vector(31 downto 0);
1114 s_axis_tvalid_2 : in std_logic;
1115 s_axis_tlast_2 : in std_logic;
1116 tob_s_tready_2 : out std_logic;
1117 s_axis_tdata_2 : in std_logic_vector(63 downto 0);
1118 
1119 --tob output axi bus --------------------------------------
1120 tob_poll_chan_2 : in std_logic;
1121 tob_m_tvalid_2 : out std_logic;
1122 tob_m_tlast_2 : out std_logic;
1123 tob_m_tready_2 : in std_logic;
1124 tob_m_tdata_2 : out std_logic_vector(63 downto 0);
1125 tob_header_marker_2 : out std_logic;
1126 tob_tail_marker_2 : out std_logic;
1127 hdr_crc_tag_2 : out std_logic;
1128 comb_error_tag_2 : out std_logic;
1129 
1130 
1131 --calo output axi bus --------------------------------------
1132 calo_poll_chan_2 : in std_logic;
1133 calo_m_tvalid_2 : out std_logic;
1134 calo_m_fifo_tlast_2 : out std_logic;
1135 calo_m_axis_tready_2 : in std_logic;
1136 calo_s_axis_tready_2 : out std_logic;
1137 calo_m_axis_tdata_2 : out std_logic_vector(63 downto 0);
1138 calo_header_marker_2 : out std_logic;
1139 calo_tail_marker_2 : out std_logic;
1140 --ufc message axi bus --------------------------------------
1141 s_axi_ufc_rx_tdata_2 : in std_logic_vector(63 downto 0);
1142 s_axi_ufc_rx_tvalid_2 : in std_logic;
1143 s_axi_ufc_rx_tlast_2 : in std_logic;
1144 
1145 --***************************************************************
1146 --********** channel #3 *********************************
1147 --***************************************************************
1148 -- aurora input bus ----------------------------------------
1149 aurora_user_clk_3 : in std_logic;
1150 aurora_chan_stat_3 : in std_logic_vector(31 downto 0);
1151 aurora_chan_control_3 : out std_logic_vector(31 downto 0);
1152 s_axis_tvalid_3 : in std_logic;
1153 s_axis_tlast_3 : in std_logic;
1154 tob_s_tready_3 : out std_logic;
1155 s_axis_tdata_3 : in std_logic_vector(63 downto 0);
1156 
1157 --tob output axi bus --------------------------------------
1158 tob_poll_chan_3 : in std_logic;
1159 tob_m_tvalid_3 : out std_logic;
1160 tob_m_tlast_3 : out std_logic;
1161 tob_m_tready_3 : in std_logic;
1162 tob_m_tdata_3 : out std_logic_vector(63 downto 0);
1163 tob_header_marker_3 : out std_logic;
1164 tob_tail_marker_3 : out std_logic;
1165 hdr_crc_tag_3 : out std_logic;
1166 comb_error_tag_3 : out std_logic;
1167 
1168 
1169 --calo output axi bus --------------------------------------
1170 calo_poll_chan_3 : in std_logic;
1171 calo_m_tvalid_3 : out std_logic;
1172 calo_m_fifo_tlast_3 : out std_logic;
1173 calo_m_axis_tready_3 : in std_logic;
1174 calo_s_axis_tready_3 : out std_logic;
1175 calo_m_axis_tdata_3 : out std_logic_vector(63 downto 0);
1176 calo_header_marker_3 : out std_logic;
1177 calo_tail_marker_3 : out std_logic;
1178 
1179 --ufc message axi bus --------------------------------------
1180  s_axi_ufc_rx_tdata_3 : in std_logic_vector(63 downto 0);
1181  s_axi_ufc_rx_tvalid_3 : in std_logic;
1182  s_axi_ufc_rx_tlast_3 : in std_logic;
1183 
1184 --***************************************************************
1185 --********** channel #4 *********************************
1186 --***************************************************************
1187 
1188 -----aurora input bus --------------------------------------------------
1189 aurora_user_clk_4 : in std_logic;
1190 aurora_chan_stat_4 : in std_logic_vector(31 downto 0);
1191 aurora_chan_control_4 : out std_logic_vector(31 downto 0);
1192 s_axis_tvalid_4 : in std_logic;
1193 s_axis_tlast_4 : in std_logic;
1194 tob_s_tready_4 : out std_logic;
1195 s_axis_tdata_4 : in std_logic_vector(63 downto 0);
1196 
1197 --tob output axi bus --------------------------------------
1198 tob_poll_chan_4 : in std_logic;
1199 tob_m_tvalid_4 : out std_logic;
1200 tob_m_tlast_4 : out std_logic;
1201 tob_m_tready_4 : in std_logic;
1202 tob_m_tdata_4 : out std_logic_vector(63 downto 0);
1203 tob_header_marker_4 : out std_logic;
1204 tob_tail_marker_4 : out std_logic;
1205 hdr_crc_tag_4 : out std_logic;
1206 comb_error_tag_4 : out std_logic;
1207 
1208 
1209 --calo output axi bus --------------------------------------
1210 calo_poll_chan_4 : in std_logic;
1211 calo_m_tvalid_4 : out std_logic;
1212 calo_m_fifo_tlast_4 : out std_logic;
1213 calo_m_axis_tready_4 : in std_logic;
1214 calo_s_axis_tready_4 : out std_logic;
1215 calo_m_axis_tdata_4 : out std_logic_vector(63 downto 0);
1216 calo_header_marker_4 : out std_logic;
1217 calo_tail_marker_4 : out std_logic;
1218 
1219 --ufc message axi bus --------------------------------------
1220 s_axi_ufc_rx_tdata_4 : in std_logic_vector(63 downto 0);
1221 s_axi_ufc_rx_tvalid_4 : in std_logic;
1222 s_axi_ufc_rx_tlast_4 : in std_logic;
1223 
1224 
1225 
1226 
1227 --***************************************************************
1228 --********** channel #5 *********************************
1229 --***************************************************************
1230 
1231 -----aurora input bus --------------------------------------------------
1232 aurora_user_clk_5 : in std_logic;
1233 aurora_chan_stat_5 : in std_logic_vector(31 downto 0);
1234 aurora_chan_control_5 : out std_logic_vector(31 downto 0);
1235 s_axis_tvalid_5 : in std_logic;
1236 s_axis_tlast_5 : in std_logic;
1237 tob_s_tready_5 : out std_logic;
1238 s_axis_tdata_5 : in std_logic_vector(63 downto 0);
1239 
1240 --tob output axi bus --------------------------------------
1241 tob_poll_chan_5 : in std_logic;
1242 tob_m_tvalid_5 : out std_logic;
1243 tob_m_tlast_5 : out std_logic;
1244 tob_m_tready_5 : in std_logic;
1245 tob_m_tdata_5 : out std_logic_vector((bp_width-1) downto 0);
1246 tob_header_marker_5 : out std_logic;
1247 tob_tail_marker_5 : out std_logic;
1248 hdr_crc_tag_5 : out std_logic;
1249 comb_error_tag_5 : out std_logic;
1250 
1251 
1252 --calo output axi bus --------------------------------------
1253 calo_poll_chan_5 : in std_logic;
1254 calo_m_tvalid_5 : out std_logic;
1255 calo_m_fifo_tlast_5 : out std_logic;
1256 calo_m_axis_tready_5 : in std_logic;
1257 calo_s_axis_tready_5 : out std_logic;
1258 calo_m_axis_tdata_5 : out std_logic_vector((bp_width-1) downto 0);
1259 calo_header_marker_5 : out std_logic;
1260 calo_tail_marker_5 : out std_logic;
1261 
1262 --ufc message axi bus --------------------------------------
1263 s_axi_ufc_rx_tdata_5 : in std_logic_vector(63 downto 0);
1264 s_axi_ufc_rx_tvalid_5 : in std_logic;
1265 s_axi_ufc_rx_tlast_5 : in std_logic;
1266 
1267 
1268 --***************************************************************
1269 --********** channel #6 *********************************
1270 --***************************************************************
1271 
1272 -----aurora input bus --------------------------------------------------
1273 aurora_user_clk_6 : in std_logic;
1274 aurora_chan_stat_6 : in std_logic_vector(31 downto 0);
1275 aurora_chan_control_6 : out std_logic_vector(31 downto 0);
1276 s_axis_tvalid_6 : in std_logic;
1277 s_axis_tlast_6 : in std_logic;
1278 tob_s_tready_6 : out std_logic;
1279 s_axis_tdata_6 : in std_logic_vector(63 downto 0);
1280 
1281 --tob output axi bus --------------------------------------
1282 tob_poll_chan_6 : in std_logic;
1283 tob_m_tvalid_6 : out std_logic;
1284 tob_m_tlast_6 : out std_logic;
1285 tob_m_tready_6 : in std_logic;
1286 tob_m_tdata_6 : out std_logic_vector((bp_width-1) downto 0);
1287 tob_header_marker_6 : out std_logic;
1288 tob_tail_marker_6 : out std_logic;
1289 hdr_crc_tag_6 : out std_logic;
1290 comb_error_tag_6 : out std_logic;
1291 
1292 
1293 --calo output axi bus --------------------------------------
1294 calo_poll_chan_6 : in std_logic;
1295 calo_m_tvalid_6 : out std_logic;
1296 calo_m_fifo_tlast_6 : out std_logic;
1297 calo_m_axis_tready_6 : in std_logic;
1298 calo_s_axis_tready_6 : out std_logic;
1299 calo_m_axis_tdata_6 : out std_logic_vector((bp_width-1) downto 0);
1300 calo_header_marker_6 : out std_logic;
1301 calo_tail_marker_6 : out std_logic;
1302 
1303 --ufc message axi bus --------------------------------------
1304  s_axi_ufc_rx_tdata_6 : in std_logic_vector(63 downto 0);
1305  s_axi_ufc_rx_tvalid_6 : in std_logic;
1306  s_axi_ufc_rx_tlast_6 : in std_logic;
1307 
1308 
1309 
1310 --***************************************************************
1311 --********** channel #7 *********************************
1312 --***************************************************************
1313 
1314 -----aurora input bus --------------------------------------------------
1315 aurora_user_clk_7 : in std_logic;
1316 aurora_chan_stat_7 : in std_logic_vector(31 downto 0);
1317 aurora_chan_control_7 : out std_logic_vector(31 downto 0);
1318 s_axis_tvalid_7 : in std_logic;
1319 s_axis_tlast_7 : in std_logic;
1320 tob_s_tready_7 : out std_logic;
1321 s_axis_tdata_7 : in std_logic_vector(63 downto 0);
1322 
1323 --tob output axi bus --------------------------------------
1324 tob_poll_chan_7 : in std_logic;
1325 tob_m_tvalid_7 : out std_logic;
1326 tob_m_tlast_7 : out std_logic;
1327 tob_m_tready_7 : in std_logic;
1328 tob_m_tdata_7 : out std_logic_vector((bp_width-1) downto 0);
1329 tob_header_marker_7 : out std_logic;
1330 tob_tail_marker_7 : out std_logic;
1331 hdr_crc_tag_7 : out std_logic;
1332 comb_error_tag_7 : out std_logic;
1333 
1334 
1335 --calo output axi bus --------------------------------------
1336 calo_poll_chan_7 : in std_logic;
1337 calo_m_tvalid_7 : out std_logic;
1338 calo_m_fifo_tlast_7 : out std_logic;
1339 calo_m_axis_tready_7 : in std_logic;
1340 calo_s_axis_tready_7 : out std_logic;
1341 calo_m_axis_tdata_7 : out std_logic_vector((bp_width-1) downto 0);
1342 calo_header_marker_7 : out std_logic;
1343 calo_tail_marker_7 : out std_logic;
1344 
1345 --ufc message axi bus --------------------------------------
1346  s_axi_ufc_rx_tdata_7 : in std_logic_vector(63 downto 0);
1347  s_axi_ufc_rx_tvalid_7 : in std_logic;
1348  s_axi_ufc_rx_tlast_7 : in std_logic;
1349 
1350 
1351 
1352 --***************************************************************
1353 --********** channel #8 *********************************
1354 --***************************************************************
1355 
1356 -----aurora input bus --------------------------------------------------
1357 aurora_user_clk_8 : in std_logic;
1358 aurora_chan_stat_8 : in std_logic_vector(31 downto 0);
1359 aurora_chan_control_8 : out std_logic_vector(31 downto 0);
1360 s_axis_tvalid_8 : in std_logic;
1361 s_axis_tlast_8 : in std_logic;
1362 tob_s_tready_8 : out std_logic;
1363 s_axis_tdata_8 : in std_logic_vector(63 downto 0);
1364 
1365 --tob output axi bus --------------------------------------
1366 tob_poll_chan_8 : in std_logic;
1367 tob_m_tvalid_8 : out std_logic;
1368 tob_m_tlast_8 : out std_logic;
1369 tob_m_tready_8 : in std_logic;
1370 tob_m_tdata_8 : out std_logic_vector((bp_width-1) downto 0);
1371 tob_header_marker_8 : out std_logic;
1372 tob_tail_marker_8 : out std_logic;
1373 hdr_crc_tag_8 : out std_logic;
1374 comb_error_tag_8 : out std_logic;
1375 
1376 
1377 --calo output axi bus --------------------------------------
1378 calo_poll_chan_8 : in std_logic;
1379 calo_m_tvalid_8 : out std_logic;
1380 calo_m_fifo_tlast_8 : out std_logic;
1381 calo_m_axis_tready_8 : in std_logic;
1382 calo_s_axis_tready_8 : out std_logic;
1383 calo_m_axis_tdata_8 : out std_logic_vector((bp_width-1) downto 0);
1384 calo_header_marker_8 : out std_logic;
1385 calo_tail_marker_8 : out std_logic;
1386 
1387 --ufc message axi bus --------------------------------------
1388 s_axi_ufc_rx_tdata_8 : in std_logic_vector(63 downto 0);
1389 s_axi_ufc_rx_tvalid_8 : in std_logic;
1390 s_axi_ufc_rx_tlast_8 : in std_logic;
1391 
1392 
1393 --***************************************************************
1394 --********** channel #9 *********************************
1395 --***************************************************************
1396 
1397 -----aurora input bus --------------------------------------------------
1398 aurora_user_clk_9 : in std_logic;
1399 aurora_chan_stat_9 : in std_logic_vector(31 downto 0);
1400 aurora_chan_control_9 : out std_logic_vector(31 downto 0);
1401 s_axis_tvalid_9 : in std_logic;
1402 s_axis_tlast_9 : in std_logic;
1403 tob_s_tready_9 : out std_logic;
1404 s_axis_tdata_9 : in std_logic_vector(63 downto 0);
1405 
1406 --tob output axi bus --------------------------------------
1407 tob_poll_chan_9 : in std_logic;
1408 tob_m_tvalid_9 : out std_logic;
1409 tob_m_tlast_9 : out std_logic;
1410 tob_m_tready_9 : in std_logic;
1411 tob_m_tdata_9 : out std_logic_vector((bp_width-1) downto 0);
1412 tob_header_marker_9 : out std_logic;
1413 tob_tail_marker_9 : out std_logic;
1414 hdr_crc_tag_9 : out std_logic;
1415 comb_error_tag_9 : out std_logic;
1416 
1417 
1418 --calo output axi bus --------------------------------------
1419 calo_poll_chan_9 : in std_logic;
1420 calo_m_tvalid_9 : out std_logic;
1421 calo_m_fifo_tlast_9 : out std_logic;
1422 calo_m_axis_tready_9 : in std_logic;
1423 calo_s_axis_tready_9 : out std_logic;
1424 calo_m_axis_tdata_9 : out std_logic_vector((bp_width-1) downto 0);
1425 calo_header_marker_9 : out std_logic;
1426 calo_tail_marker_9 : out std_logic;
1427 
1428 --ufc message axi bus --------------------------------------
1429 s_axi_ufc_rx_tdata_9 : in std_logic_vector(63 downto 0);
1430 s_axi_ufc_rx_tvalid_9 : in std_logic;
1431 s_axi_ufc_rx_tlast_9 : in std_logic;
1432 
1433 
1434 --***************************************************************
1435 --********** channel #10 *********************************
1436 --***************************************************************
1437 
1438 -----aurora input bus --------------------------------------------------
1439 aurora_user_clk_10 : in std_logic;
1440 aurora_chan_stat_10 : in std_logic_vector(31 downto 0);
1441 aurora_chan_control_10 : out std_logic_vector(31 downto 0);
1442 s_axis_tvalid_10 : in std_logic;
1443 s_axis_tlast_10 : in std_logic;
1444 tob_s_tready_10 : out std_logic;
1445 s_axis_tdata_10 : in std_logic_vector(63 downto 0);
1446 
1447 --tob output axi bus --------------------------------------
1448 tob_poll_chan_10 : in std_logic;
1449 tob_m_tvalid_10 : out std_logic;
1450 tob_m_tlast_10 : out std_logic;
1451 tob_m_tready_10 : in std_logic;
1452 tob_m_tdata_10 : out std_logic_vector((bp_width-1) downto 0);
1453 tob_header_marker_10 : out std_logic;
1454 tob_tail_marker_10 : out std_logic;
1455 hdr_crc_tag_10 : out std_logic;
1456 comb_error_tag_10 : out std_logic;
1457 
1458 
1459 --calo output axi bus --------------------------------------
1460 calo_poll_chan_10 : in std_logic;
1461 calo_m_tvalid_10 : out std_logic;
1462 calo_m_fifo_tlast_10 : out std_logic;
1463 calo_m_axis_tready_10 : in std_logic;
1464 calo_s_axis_tready_10 : out std_logic;
1465 calo_m_axis_tdata_10 : out std_logic_vector((bp_width-1) downto 0);
1466 calo_header_marker_10 : out std_logic;
1467 calo_tail_marker_10 : out std_logic;
1468 
1469 --ufc message axi bus --------------------------------------
1470 s_axi_ufc_rx_tdata_10 : in std_logic_vector(63 downto 0);
1471 s_axi_ufc_rx_tvalid_10 : in std_logic;
1472 s_axi_ufc_rx_tlast_10 : in std_logic;
1473 
1474 --***************************************************************
1475 --********** channel #11 *********************************
1476 --***************************************************************
1477 
1478 -----aurora input bus --------------------------------------------------
1479 aurora_user_clk_11 : in std_logic;
1480 aurora_chan_stat_11 : in std_logic_vector(31 downto 0);
1481 aurora_chan_control_11 : out std_logic_vector(31 downto 0);
1482 s_axis_tvalid_11 : in std_logic;
1483 s_axis_tlast_11 : in std_logic;
1484 tob_s_tready_11 : out std_logic;
1485 s_axis_tdata_11 : in std_logic_vector(63 downto 0);
1486 
1487 --tob output axi bus --------------------------------------
1488 tob_poll_chan_11 : in std_logic;
1489 tob_m_tvalid_11 : out std_logic;
1490 tob_m_tlast_11 : out std_logic;
1491 tob_m_tready_11 : in std_logic;
1492 tob_m_tdata_11 : out std_logic_vector((bp_width-1) downto 0);
1493 tob_header_marker_11 : out std_logic;
1494 tob_tail_marker_11 : out std_logic;
1495 hdr_crc_tag_11 : out std_logic;
1496 comb_error_tag_11 : out std_logic;
1497 
1498 
1499 --calo output axi bus --------------------------------------
1500 calo_poll_chan_11 : in std_logic;
1501 calo_m_tvalid_11 : out std_logic;
1502 calo_m_fifo_tlast_11 : out std_logic;
1503 calo_m_axis_tready_11 : in std_logic;
1504 calo_s_axis_tready_11 : out std_logic;
1505 calo_m_axis_tdata_11 : out std_logic_vector((bp_width-1) downto 0);
1506 calo_header_marker_11 : out std_logic;
1507 calo_tail_marker_11 : out std_logic;
1508 
1509 --ufc message axi bus --------------------------------------
1510  s_axi_ufc_rx_tdata_11 : in std_logic_vector(63 downto 0);
1511  s_axi_ufc_rx_tvalid_11 : in std_logic;
1512  s_axi_ufc_rx_tlast_11 : in std_logic;
1513 
1514 
1515 
1516 
1517 --***************************************************************
1518 --********** channel #12 *********************************
1519 --***************************************************************
1520 
1521 -----aurora input bus --------------------------------------------------
1522 aurora_user_clk_12 : in std_logic;
1523 aurora_chan_stat_12 : in std_logic_vector(31 downto 0);
1524 aurora_chan_control_12 : out std_logic_vector(31 downto 0);
1525 s_axis_tvalid_12 : in std_logic;
1526 s_axis_tlast_12 : in std_logic;
1527 tob_s_tready_12 : out std_logic;
1528 s_axis_tdata_12 : in std_logic_vector(63 downto 0);
1529 
1530 --tob output axi bus --------------------------------------
1531 tob_poll_chan_12 : in std_logic;
1532 tob_m_tvalid_12 : out std_logic;
1533 tob_m_tlast_12 : out std_logic;
1534 tob_m_tready_12 : in std_logic;
1535 tob_m_tdata_12 : out std_logic_vector((bp_width-1) downto 0);
1536 tob_header_marker_12 : out std_logic;
1537 tob_tail_marker_12 : out std_logic;
1538 hdr_crc_tag_12 : out std_logic;
1539 comb_error_tag_12 : out std_logic;
1540 
1541 
1542 --calo output axi bus --------------------------------------
1543 calo_poll_chan_12 : in std_logic;
1544 calo_m_tvalid_12 : out std_logic;
1545 calo_m_fifo_tlast_12 : out std_logic;
1546 calo_m_axis_tready_12 : in std_logic;
1547 calo_s_axis_tready_12 : out std_logic;
1548 calo_m_axis_tdata_12 : out std_logic_vector((bp_width-1) downto 0);
1549 calo_header_marker_12 : out std_logic;
1550 calo_tail_marker_12 : out std_logic;
1551 --ufc message axi bus --------------------------------------
1552 s_axi_ufc_rx_tdata_12 : in std_logic_vector(63 downto 0);
1553 s_axi_ufc_rx_tvalid_12 : in std_logic;
1554 s_axi_ufc_rx_tlast_12 : in std_logic;
1555 
1556 
1557 
1558 
1559 --***************************************************************
1560 --********** channel #13 *********************************
1561 --***************************************************************
1562 
1563 -----aurora input bus --------------------------------------------------
1564 aurora_user_clk_13 : in std_logic;
1565 aurora_chan_stat_13 : in std_logic_vector(31 downto 0);
1566 aurora_chan_control_13 : out std_logic_vector(31 downto 0);
1567 s_axis_tvalid_13 : in std_logic;
1568 s_axis_tlast_13 : in std_logic;
1569 tob_s_tready_13 : out std_logic;
1570 s_axis_tdata_13 : in std_logic_vector(63 downto 0);
1571 
1572 --tob output axi bus --------------------------------------
1573 tob_poll_chan_13 : in std_logic;
1574 tob_m_tvalid_13 : out std_logic;
1575 tob_m_tlast_13 : out std_logic;
1576 tob_m_tready_13 : in std_logic;
1577 tob_m_tdata_13 : out std_logic_vector((bp_width-1) downto 0);
1578 tob_header_marker_13 : out std_logic;
1579 tob_tail_marker_13 : out std_logic;
1580 hdr_crc_tag_13 : out std_logic;
1581 comb_error_tag_13 : out std_logic;
1582 
1583 
1584 --calo output axi bus --------------------------------------
1585 calo_poll_chan_13 : in std_logic;
1586 calo_m_tvalid_13 : out std_logic;
1587 calo_m_fifo_tlast_13 : out std_logic;
1588 calo_m_axis_tready_13 : in std_logic;
1589 calo_s_axis_tready_13 : out std_logic;
1590 calo_m_axis_tdata_13 : out std_logic_vector((bp_width-1) downto 0);
1591 calo_header_marker_13 : out std_logic;
1592 calo_tail_marker_13 : out std_logic;
1593 
1594 --ufc message axi bus --------------------------------------
1595 s_axi_ufc_rx_tdata_13 : in std_logic_vector(63 downto 0);
1596 s_axi_ufc_rx_tvalid_13 : in std_logic;
1597 s_axi_ufc_rx_tlast_13 : in std_logic;
1598 
1599 
1600 
1601 --***************************************************************
1602 --********** channel #14 *********************************
1603 --***************************************************************
1604 
1605 -----aurora input bus --------------------------------------------------
1606 aurora_user_clk_14 : in std_logic;
1607 aurora_chan_stat_14 : in std_logic_vector(31 downto 0);
1608 aurora_chan_control_14 : out std_logic_vector(31 downto 0);
1609 s_axis_tvalid_14 : in std_logic;
1610 s_axis_tlast_14 : in std_logic;
1611 tob_s_tready_14 : out std_logic;
1612 s_axis_tdata_14 : in std_logic_vector(63 downto 0);
1613 
1614 --tob output axi bus --------------------------------------
1615 tob_poll_chan_14 : in std_logic;
1616 tob_m_tvalid_14 : out std_logic;
1617 tob_m_tlast_14 : out std_logic;
1618 tob_m_tready_14 : in std_logic;
1619 tob_m_tdata_14 : out std_logic_vector((bp_width-1) downto 0);
1620 tob_header_marker_14 : out std_logic;
1621 tob_tail_marker_14 : out std_logic;
1622 hdr_crc_tag_14 : out std_logic;
1623 comb_error_tag_14 : out std_logic;
1624 
1625 
1626 --calo output axi bus --------------------------------------
1627 calo_poll_chan_14 : in std_logic;
1628 calo_m_tvalid_14 : out std_logic;
1629 calo_m_fifo_tlast_14 : out std_logic;
1630 calo_m_axis_tready_14 : in std_logic;
1631 calo_s_axis_tready_14 : out std_logic;
1632 calo_m_axis_tdata_14 : out std_logic_vector((bp_width-1) downto 0);
1633 calo_header_marker_14 : out std_logic;
1634 calo_tail_marker_14 : out std_logic;
1635 
1636 --ufc message axi bus --------------------------------------
1637 s_axi_ufc_rx_tdata_14 : in std_logic_vector(63 downto 0);
1638 s_axi_ufc_rx_tvalid_14 : in std_logic;
1639 s_axi_ufc_rx_tlast_14 : in std_logic;
1640 
1641 
1642 
1643 
1644 --***************************************************************
1645 --********** channel #15 *********************************
1646 --***************************************************************
1647 
1648 -----aurora input bus --------------------------------------------------
1649 aurora_user_clk_15 : in std_logic;
1650 aurora_chan_stat_15 : in std_logic_vector(31 downto 0);
1651 aurora_chan_control_15 : out std_logic_vector(31 downto 0);
1652 s_axis_tvalid_15 : in std_logic;
1653 s_axis_tlast_15 : in std_logic;
1654 tob_s_tready_15 : out std_logic;
1655 s_axis_tdata_15 : in std_logic_vector(63 downto 0);
1656 
1657 --tob output axi bus --------------------------------------
1658 tob_poll_chan_15 : in std_logic;
1659 tob_m_tvalid_15 : out std_logic;
1660 tob_m_tlast_15 : out std_logic;
1661 tob_m_tready_15 : in std_logic;
1662 tob_m_tdata_15 : out std_logic_vector((bp_width-1) downto 0);
1663 tob_header_marker_15 : out std_logic;
1664 tob_tail_marker_15 : out std_logic;
1665 hdr_crc_tag_15 : out std_logic;
1666 comb_error_tag_15 : out std_logic;
1667 
1668 
1669 --calo output axi bus --------------------------------------
1670 calo_poll_chan_15 : in std_logic;
1671 calo_m_tvalid_15 : out std_logic;
1672 calo_m_fifo_tlast_15 : out std_logic;
1673 calo_m_axis_tready_15 : in std_logic;
1674 calo_s_axis_tready_15 : out std_logic;
1675 calo_m_axis_tdata_15 : out std_logic_vector((bp_width-1) downto 0);
1676 calo_header_marker_15 : out std_logic;
1677 calo_tail_marker_15 : out std_logic;
1678 
1679 --ufc message axi bus --------------------------------------
1680 s_axi_ufc_rx_tdata_15 : in std_logic_vector(63 downto 0);
1681 s_axi_ufc_rx_tvalid_15 : in std_logic;
1682 s_axi_ufc_rx_tlast_15 : in std_logic;
1683 
1684 
1685 
1686 
1687 --***************************************************************
1688 --********** channel #16 *********************************
1689 --***************************************************************
1690 
1691 -----aurora input bus --------------------------------------------------
1692 aurora_user_clk_16 : in std_logic;
1693 aurora_chan_stat_16 : in std_logic_vector(31 downto 0);
1694 aurora_chan_control_16 : out std_logic_vector(31 downto 0);
1695 s_axis_tvalid_16 : in std_logic;
1696 s_axis_tlast_16 : in std_logic;
1697 tob_s_tready_16 : out std_logic;
1698 s_axis_tdata_16 : in std_logic_vector(63 downto 0);
1699 
1700 --tob output axi bus --------------------------------------
1701 tob_poll_chan_16 : in std_logic;
1702 tob_m_tvalid_16 : out std_logic;
1703 tob_m_tlast_16 : out std_logic;
1704 tob_m_tready_16 : in std_logic;
1705 tob_m_tdata_16 : out std_logic_vector((bp_width-1) downto 0);
1706 tob_header_marker_16 : out std_logic;
1707 tob_tail_marker_16 : out std_logic;
1708 hdr_crc_tag_16 : out std_logic;
1709 comb_error_tag_16 : out std_logic;
1710 
1711 
1712 --calo output axi bus --------------------------------------
1713 calo_poll_chan_16 : in std_logic;
1714 calo_m_tvalid_16 : out std_logic;
1715 calo_m_fifo_tlast_16 : out std_logic;
1716 calo_m_axis_tready_16 : in std_logic;
1717 calo_s_axis_tready_16 : out std_logic;
1718 calo_m_axis_tdata_16 : out std_logic_vector((bp_width-1) downto 0);
1719 calo_header_marker_16 : out std_logic;
1720 calo_tail_marker_16 : out std_logic;
1721 --ufc message axi bus --------------------------------------
1722 s_axi_ufc_rx_tdata_16 : in std_logic_vector(63 downto 0);
1723 s_axi_ufc_rx_tvalid_16 : in std_logic;
1724 s_axi_ufc_rx_tlast_16 : in std_logic;
1725 
1726 
1727 
1728 
1729 
1730 --***************************************************************
1731 --********** channel #17 *********************************
1732 --***************************************************************
1733 
1734 -----aurora input bus --------------------------------------------------
1735 aurora_user_clk_17 : in std_logic;
1736 aurora_chan_stat_17 : in std_logic_vector(31 downto 0);
1737 aurora_chan_control_17 : out std_logic_vector(31 downto 0);
1738 s_axis_tvalid_17 : in std_logic;
1739 s_axis_tlast_17 : in std_logic;
1740 tob_s_tready_17 : out std_logic;
1741 s_axis_tdata_17 : in std_logic_vector(63 downto 0);
1742 
1743 --tob output axi bus --------------------------------------
1744 tob_poll_chan_17 : in std_logic;
1745 tob_m_tvalid_17 : out std_logic;
1746 tob_m_tlast_17 : out std_logic;
1747 tob_m_tready_17 : in std_logic;
1748 tob_m_tdata_17 : out std_logic_vector((bp_width-1) downto 0);
1749 tob_header_marker_17 : out std_logic;
1750 tob_tail_marker_17 : out std_logic;
1751 hdr_crc_tag_17 : out std_logic;
1752 comb_error_tag_17 : out std_logic;
1753 
1754 
1755 --calo output axi bus --------------------------------------
1756 calo_poll_chan_17 : in std_logic;
1757 calo_m_tvalid_17 : out std_logic;
1758 calo_m_fifo_tlast_17 : out std_logic;
1759 calo_m_axis_tready_17 : in std_logic;
1760 calo_s_axis_tready_17 : out std_logic;
1761 calo_m_axis_tdata_17 : out std_logic_vector((bp_width-1) downto 0);
1762 calo_header_marker_17 : out std_logic;
1763 calo_tail_marker_17 : out std_logic;
1764 
1765 --ufc message axi bus --------------------------------------
1766  s_axi_ufc_rx_tdata_17 : in std_logic_vector(63 downto 0);
1767  s_axi_ufc_rx_tvalid_17 : in std_logic;
1768  s_axi_ufc_rx_tlast_17 : in std_logic;
1769 
1770 
1771 
1772 
1773 
1774 --***************************************************************
1775 --********** channel #18 *********************************
1776 --***************************************************************
1777 
1778 -----aurora input bus --------------------------------------------------
1779 aurora_user_clk_18 : in std_logic;
1780 aurora_chan_stat_18 : in std_logic_vector(31 downto 0);
1781 aurora_chan_control_18 : out std_logic_vector(31 downto 0);
1782 s_axis_tvalid_18 : in std_logic;
1783 s_axis_tlast_18 : in std_logic;
1784 tob_s_tready_18 : out std_logic;
1785 s_axis_tdata_18 : in std_logic_vector(63 downto 0);
1786 
1787 --tob output axi bus --------------------------------------
1788 tob_poll_chan_18 : in std_logic;
1789 tob_m_tvalid_18 : out std_logic;
1790 tob_m_tlast_18 : out std_logic;
1791 tob_m_tready_18 : in std_logic;
1792 tob_m_tdata_18 : out std_logic_vector((bp_width-1) downto 0);
1793 tob_header_marker_18 : out std_logic;
1794 tob_tail_marker_18 : out std_logic;
1795 hdr_crc_tag_18 : out std_logic;
1796 comb_error_tag_18 : out std_logic;
1797 
1798 
1799 --calo output axi bus --------------------------------------
1800 calo_poll_chan_18 : in std_logic;
1801 calo_m_tvalid_18 : out std_logic;
1802 calo_m_fifo_tlast_18 : out std_logic;
1803 calo_m_axis_tready_18 : in std_logic;
1804 calo_s_axis_tready_18 : out std_logic;
1805 calo_m_axis_tdata_18 : out std_logic_vector((bp_width-1) downto 0);
1806 calo_header_marker_18 : out std_logic;
1807 calo_tail_marker_18 : out std_logic;
1808 
1809 --ufc message axi bus --------------------------------------
1810  s_axi_ufc_rx_tdata_18 : in std_logic_vector(63 downto 0);
1811  s_axi_ufc_rx_tvalid_18 : in std_logic;
1812  s_axi_ufc_rx_tlast_18 : in std_logic;
1813 
1814 
1815 
1816 
1817 --***************************************************************
1818 --********** channel #19 *********************************
1819 --***************************************************************
1820 
1821 -----aurora input bus --------------------------------------------------
1822 aurora_user_clk_19 : in std_logic;
1823 aurora_chan_stat_19 : in std_logic_vector(31 downto 0);
1824 aurora_chan_control_19 : out std_logic_vector(31 downto 0);
1825 s_axis_tvalid_19 : in std_logic;
1826 s_axis_tlast_19 : in std_logic;
1827 tob_s_tready_19 : out std_logic;
1828 s_axis_tdata_19 : in std_logic_vector(63 downto 0);
1829 
1830 --tob output axi bus --------------------------------------
1831 tob_poll_chan_19 : in std_logic;
1832 tob_m_tvalid_19 : out std_logic;
1833 tob_m_tlast_19 : out std_logic;
1834 tob_m_tready_19 : in std_logic;
1835 tob_m_tdata_19 : out std_logic_vector((bp_width-1) downto 0);
1836 tob_header_marker_19 : out std_logic;
1837 tob_tail_marker_19 : out std_logic;
1838 hdr_crc_tag_19 : out std_logic;
1839 comb_error_tag_19 : out std_logic;
1840 
1841 
1842 --calo output axi bus --------------------------------------
1843 calo_poll_chan_19 : in std_logic;
1844 calo_m_tvalid_19 : out std_logic;
1845 calo_m_fifo_tlast_19 : out std_logic;
1846 calo_m_axis_tready_19 : in std_logic;
1847 calo_s_axis_tready_19 : out std_logic;
1848 calo_m_axis_tdata_19 : out std_logic_vector((bp_width-1) downto 0);
1849 calo_header_marker_19 : out std_logic;
1850 calo_tail_marker_19 : out std_logic;
1851 
1852 --ufc message axi bus --------------------------------------
1853  s_axi_ufc_rx_tdata_19 : in std_logic_vector(63 downto 0);
1854  s_axi_ufc_rx_tvalid_19 : in std_logic;
1855  s_axi_ufc_rx_tlast_19 : in std_logic;
1856 
1857 
1858 
1859 
1860 --***************************************************************
1861 --********** channel #20 *********************************
1862 --***************************************************************
1863 
1864 -----aurora input bus --------------------------------------------------
1865 aurora_user_clk_20 : in std_logic;
1866 aurora_chan_stat_20 : in std_logic_vector(31 downto 0);
1867 aurora_chan_control_20 : out std_logic_vector(31 downto 0);
1868 s_axis_tvalid_20 : in std_logic;
1869 s_axis_tlast_20 : in std_logic;
1870 tob_s_tready_20 : out std_logic;
1871 s_axis_tdata_20 : in std_logic_vector(63 downto 0);
1872 
1873 --tob output axi bus --------------------------------------
1874 tob_poll_chan_20 : in std_logic;
1875 tob_m_tvalid_20 : out std_logic;
1876 tob_m_tlast_20 : out std_logic;
1877 tob_m_tready_20 : in std_logic;
1878 tob_m_tdata_20 : out std_logic_vector((bp_width-1) downto 0);
1879 tob_header_marker_20 : out std_logic;
1880 tob_tail_marker_20 : out std_logic;
1881 hdr_crc_tag_20 : out std_logic;
1882 comb_error_tag_20 : out std_logic;
1883 
1884 
1885 --calo output axi bus --------------------------------------
1886 calo_poll_chan_20 : in std_logic;
1887 calo_m_tvalid_20 : out std_logic;
1888 calo_m_fifo_tlast_20 : out std_logic;
1889 calo_m_axis_tready_20 : in std_logic;
1890 calo_s_axis_tready_20 : out std_logic;
1891 calo_m_axis_tdata_20 : out std_logic_vector((bp_width-1) downto 0);
1892 calo_header_marker_20 : out std_logic;
1893 calo_tail_marker_20 : out std_logic;
1894 
1895 --ufc message axi bus --------------------------------------
1896  s_axi_ufc_rx_tdata_20 : in std_logic_vector(63 downto 0);
1897  s_axi_ufc_rx_tvalid_20 : in std_logic;
1898  s_axi_ufc_rx_tlast_20 : in std_logic;
1899 
1900 
1901 
1902 
1903 --***************************************************************
1904 --********** channel #21 *********************************
1905 --***************************************************************
1906 
1907 -----aurora input bus --------------------------------------------------
1908 aurora_user_clk_21 : in std_logic;
1909 aurora_chan_stat_21 : in std_logic_vector(31 downto 0);
1910 aurora_chan_control_21 : out std_logic_vector(31 downto 0);
1911 s_axis_tvalid_21 : in std_logic;
1912 s_axis_tlast_21 : in std_logic;
1913 tob_s_tready_21 : out std_logic;
1914 s_axis_tdata_21 : in std_logic_vector(63 downto 0);
1915 
1916 --tob output axi bus --------------------------------------
1917 tob_poll_chan_21 : in std_logic;
1918 tob_m_tvalid_21 : out std_logic;
1919 tob_m_tlast_21 : out std_logic;
1920 tob_m_tready_21 : in std_logic;
1921 tob_m_tdata_21 : out std_logic_vector((bp_width-1) downto 0);
1922 tob_header_marker_21 : out std_logic;
1923 tob_tail_marker_21 : out std_logic;
1924 hdr_crc_tag_21 : out std_logic;
1925 comb_error_tag_21 : out std_logic;
1926 
1927 
1928 --calo output axi bus --------------------------------------
1929 calo_poll_chan_21 : in std_logic;
1930 calo_m_tvalid_21 : out std_logic;
1931 calo_m_fifo_tlast_21 : out std_logic;
1932 calo_m_axis_tready_21 : in std_logic;
1933 calo_s_axis_tready_21 : out std_logic;
1934 calo_m_axis_tdata_21 : out std_logic_vector((bp_width-1) downto 0);
1935 calo_header_marker_21 : out std_logic;
1936 calo_tail_marker_21 : out std_logic;
1937 
1938 --ufc message axi bus --------------------------------------
1939 s_axi_ufc_rx_tdata_21 : in std_logic_vector(63 downto 0);
1940 s_axi_ufc_rx_tvalid_21 : in std_logic;
1941 s_axi_ufc_rx_tlast_21 : in std_logic;
1942 
1943 
1944 
1945 
1946 --***************************************************************
1947 --********** channel #22 *********************************
1948 --***************************************************************
1949 
1950 -----aurora input bus --------------------------------------------------
1951 aurora_user_clk_22 : in std_logic;
1952 aurora_chan_stat_22 : in std_logic_vector(31 downto 0);
1953 aurora_chan_control_22 : out std_logic_vector(31 downto 0);
1954 s_axis_tvalid_22 : in std_logic;
1955 s_axis_tlast_22 : in std_logic;
1956 tob_s_tready_22 : out std_logic;
1957 s_axis_tdata_22 : in std_logic_vector(63 downto 0);
1958 
1959 --tob output axi bus --------------------------------------
1960 tob_poll_chan_22 : in std_logic;
1961 tob_m_tvalid_22 : out std_logic;
1962 tob_m_tlast_22 : out std_logic;
1963 tob_m_tready_22 : in std_logic;
1964 tob_m_tdata_22 : out std_logic_vector((bp_width-1) downto 0);
1965 tob_header_marker_22 : out std_logic;
1966 tob_tail_marker_22 : out std_logic;
1967 hdr_crc_tag_22 : out std_logic;
1968 comb_error_tag_22 : out std_logic;
1969 
1970 
1971 --calo output axi bus --------------------------------------
1972 calo_poll_chan_22 : in std_logic;
1973 calo_m_tvalid_22 : out std_logic;
1974 calo_m_fifo_tlast_22 : out std_logic;
1975 calo_m_axis_tready_22 : in std_logic;
1976 calo_s_axis_tready_22 : out std_logic;
1977 calo_m_axis_tdata_22 : out std_logic_vector((bp_width-1) downto 0);
1978 calo_header_marker_22 : out std_logic;
1979 calo_tail_marker_22 : out std_logic;
1980 
1981 --ufc message axi bus --------------------------------------
1982 s_axi_ufc_rx_tdata_22 : in std_logic_vector(63 downto 0);
1983 s_axi_ufc_rx_tvalid_22 : in std_logic;
1984 s_axi_ufc_rx_tlast_22 : in std_logic;
1985 
1986 
1987 
1988 
1989 --***************************************************************
1990 --********** channel #16 *********************************
1991 --***************************************************************
1992 
1993 -----aurora input bus --------------------------------------------------
1994 aurora_user_clk_23 : in std_logic;
1995 aurora_chan_stat_23 : in std_logic_vector(31 downto 0);
1996 aurora_chan_control_23 : out std_logic_vector(31 downto 0);
1997 s_axis_tvalid_23 : in std_logic;
1998 s_axis_tlast_23 : in std_logic;
1999 tob_s_tready_23 : out std_logic;
2000 s_axis_tdata_23 : in std_logic_vector(63 downto 0);
2001 
2002 --tob output axi bus --------------------------------------
2003 tob_poll_chan_23 : in std_logic;
2004 tob_m_tvalid_23 : out std_logic;
2005 tob_m_tlast_23 : out std_logic;
2006 tob_m_tready_23 : in std_logic;
2007 tob_m_tdata_23 : out std_logic_vector((bp_width-1) downto 0);
2008 tob_header_marker_23 : out std_logic;
2009 tob_tail_marker_23 : out std_logic;
2010 hdr_crc_tag_23 : out std_logic;
2011 comb_error_tag_23 : out std_logic;
2012 
2013 
2014 --calo output axi bus --------------------------------------
2015 calo_poll_chan_23 : in std_logic;
2016 calo_m_tvalid_23 : out std_logic;
2017 calo_m_fifo_tlast_23 : out std_logic;
2018 calo_m_axis_tready_23 : in std_logic;
2019 calo_s_axis_tready_23 : out std_logic;
2020 calo_m_axis_tdata_23 : out std_logic_vector((bp_width-1) downto 0);
2021 calo_header_marker_23 : out std_logic;
2022 calo_tail_marker_23 : out std_logic;
2023 
2024 --ufc message axi bus --------------------------------------
2025  s_axi_ufc_rx_tdata_23 : in std_logic_vector(63 downto 0);
2026  s_axi_ufc_rx_tvalid_23 : in std_logic;
2027  s_axi_ufc_rx_tlast_23 : in std_logic
2028 
2029 
2030 
2031  );
2032 
2033 end component;
2034 
2035 
2036 
2037 
2038 
2039 
2040 
2041 
2042 
2043 
2044 
2045 
2046 component aurora_in_fifo is
2047 Port (
2048 
2049 ----inputs from Aurora ---------------------------------
2050  RESET : in std_logic;
2051 -- clock : in std_logic;
2052  aurora_user_clk : in std_logic;
2053  pp_clock : in std_logic;
2054  s_axis_tvalid : in std_logic;
2055  s_axis_tlast : in std_logic;
2056  s_axis_tready : out std_logic;
2057  s_axis_tdata : in std_logic_vector((bp_width-1) downto 0);
2058  -- s_axis_tkeep : in std_logic_vector(((bp_width/8) -1) downto 0);
2059 
2060 --tob output axi bus --------------------------------------
2061  poll_chan : in std_logic;
2062 
2063  m_tvalid : out std_logic;
2064  m_tlast : out std_logic;
2065  m_tready : in std_logic;
2066  m_tdata : out std_logic_vector((bp_width-1) downto 0);
2067 -- m_header_marker : out std_logic;
2068 -- m_tail_marker : out std_logic;
2069  tob_header_marker : out std_logic;
2070  tob_tail_marker : out std_logic;
2071 
2072  --calo output axi bus --------------------------------------
2073  calo_poll_chan : in std_logic;
2074  calo_m_tvalid : out std_logic;
2075  calo_m_fifo_tlast : out std_logic;
2076  calo_m_axis_tready : in std_logic;
2077  calo_s_axis_tready : out std_logic;
2078 
2079  calo_m_axis_tdata : out std_logic_vector((bp_width-1) downto 0);
2080  calo_header_marker : out std_logic;
2081  calo_tail_marker : out std_logic
2082 
2083  );
2084 
2085 
2086 end component;
2087 
2088 --component aurora_in_debug is
2089 --Port (
2090 --
2091 ------inputs from Aurora ---------------------------------
2092 -- RESET : in std_logic;
2093 ---- clock : in std_logic;
2094 -- aurora_user_clk : in std_logic;
2095 -- pp_clock : in std_logic;
2096 -- s_axis_tvalid : in std_logic;
2097 -- s_axis_tlast : in std_logic;
2098 -- s_axis_tready : out std_logic;
2099 -- s_axis_tdata : in std_logic_vector((bp_width-1) downto 0);
2100 -- -- s_axis_tkeep : in std_logic_vector(((bp_width/8) -1) downto 0);
2101 --
2102 ----tob output axi bus --------------------------------------
2103 -- poll_chan : in std_logic;
2104 --
2105 -- m_tvalid : out std_logic;
2106 -- m_tlast : out std_logic;
2107 -- m_tready : in std_logic;
2108 -- m_tdata : out std_logic_vector((bp_width-1) downto 0);
2109 ---- m_header_marker : out std_logic;
2110 ---- m_tail_marker : out std_logic;
2111 -- tob_header_marker : out std_logic;
2112 -- tob_tail_marker : out std_logic;
2113 --
2114 -- --calo output axi bus --------------------------------------
2115 -- calo_poll_chan : in std_logic;
2116 -- calo_m_tvalid : out std_logic;
2117 -- calo_m_fifo_tlast : out std_logic;
2118 -- calo_m_axis_tready : in std_logic;
2119 -- calo_s_axis_tready : out std_logic;
2120 --
2121 -- calo_m_axis_tdata : out std_logic_vector((bp_width-1) downto 0);
2122 -- calo_header_marker : out std_logic;
2123 -- calo_tail_marker : out std_logic
2124 --
2125 -- );
2126 --
2127 --
2128 --end component;
2129 
2130 
2131 
2132 
2133 
2134 
2135 
2136 
2137 
2138 
2139 
2140 
2141 
2142 -- component channel_mux is
2143 -- Port (clock : in STD_LOGIC;
2144 -- reset : in STD_LOGIC;
2145 -- s_tdata_0 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2146 -- s_tvalid_0 : in STD_LOGIC;
2147 -- s_tlast_0 : in STD_LOGIC;
2148 -- s_tready_0 : out STD_LOGIC;
2149 -- s_header_mark_0 : in STD_LOGIC;
2150 -- s_trailer_mark_0 : in STD_LOGIC;
2151 -- s_poll_chan_0 : out STD_LOGIC;
2152 -- s_chan_enable_0 : in STD_LOGIC;
2153 --
2154 -- s_tdata_1 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2155 -- s_tvalid_1 : in STD_LOGIC;
2156 -- s_tlast_1 : in STD_LOGIC;
2157 -- s_tready_1 : out STD_LOGIC;
2158 -- s_header_mark_1 : in STD_LOGIC;
2159 -- s_trailer_mark_1 : in STD_LOGIC;
2160 -- s_poll_chan_1 : out STD_LOGIC;
2161 -- s_chan_enable_1 : in STD_LOGIC;
2162 --
2163 -- s_tdata_2 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2164 -- s_tvalid_2 : in STD_LOGIC;
2165 -- s_tlast_2 : in STD_LOGIC;
2166 -- s_tready_2 : out STD_LOGIC;
2167 -- s_header_mark_2 : in STD_LOGIC;
2168 -- s_trailer_mark_2 : in STD_LOGIC;
2169 -- s_poll_chan_2 : out STD_LOGIC;
2170 -- s_chan_enable_2 : in STD_LOGIC;
2171 --
2172 -- s_tdata_3 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2173 -- s_tvalid_3 : in STD_LOGIC;
2174 -- s_tlast_3 : in STD_LOGIC;
2175 -- s_tready_3 : out STD_LOGIC;
2176 -- s_header_mark_3 : in STD_LOGIC;
2177 -- s_trailer_mark_3 : in STD_LOGIC;
2178 -- s_poll_chan_3 : out STD_LOGIC;
2179 -- s_chan_enable_3 : in STD_LOGIC;
2180 --
2181 -- s_tdata_4 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2182 -- s_tvalid_4 : in STD_LOGIC;
2183 -- s_tlast_4 : in STD_LOGIC;
2184 -- s_tready_4 : out STD_LOGIC;
2185 -- s_header_mark_4 : in STD_LOGIC;
2186 -- s_trailer_mark_4 : in STD_LOGIC;
2187 -- s_poll_chan_4 : out STD_LOGIC;
2188 -- s_chan_enable_4 : in STD_LOGIC;
2189 --
2190 -- s_tdata_5 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2191 -- s_tvalid_5 : in STD_LOGIC;
2192 -- s_tlast_5 : in STD_LOGIC;
2193 -- s_tready_5 : out STD_LOGIC;
2194 -- s_header_mark_5 : in STD_LOGIC;
2195 -- s_trailer_mark_5 : in STD_LOGIC;
2196 -- s_poll_chan_5 : out STD_LOGIC;
2197 -- s_chan_enable_5 : in STD_LOGIC;
2198 --
2199 -- s_tdata_6 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2200 -- s_tvalid_6 : in STD_LOGIC;
2201 -- s_tlast_6 : in STD_LOGIC;
2202 -- s_tready_6 : out STD_LOGIC;
2203 -- s_header_mark_6 : in STD_LOGIC;
2204 -- s_trailer_mark_6 : in STD_LOGIC;
2205 -- s_poll_chan_6 : out STD_LOGIC;
2206 -- s_chan_enable_6 : in STD_LOGIC;
2207 --
2208 -- s_tdata_7 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2209 -- s_tvalid_7 : in STD_LOGIC;
2210 -- s_tlast_7 : in STD_LOGIC;
2211 -- s_tready_7 : out STD_LOGIC;
2212 -- s_header_mark_7 : in STD_LOGIC;
2213 -- s_trailer_mark_7 : in STD_LOGIC;
2214 -- s_poll_chan_7 : out STD_LOGIC;
2215 -- s_chan_enable_7 : in STD_LOGIC;
2216 --
2217 -- s_tdata_8 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2218 -- s_tvalid_8 : in STD_LOGIC;
2219 -- s_tlast_8 : in STD_LOGIC;
2220 -- s_tready_8 : out STD_LOGIC;
2221 -- s_header_mark_8 : in STD_LOGIC;
2222 -- s_trailer_mark_8 : in STD_LOGIC;
2223 -- s_poll_chan_8 : out STD_LOGIC;
2224 -- s_chan_enable_8 : in STD_LOGIC;
2225 --
2226 -- s_tdata_9 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2227 -- s_tvalid_9 : in STD_LOGIC;
2228 -- s_tlast_9 : in STD_LOGIC;
2229 -- s_tready_9 : out STD_LOGIC;
2230 -- s_header_mark_9 : in STD_LOGIC;
2231 -- s_trailer_mark_9 : in STD_LOGIC;
2232 -- s_poll_chan_9 : out STD_LOGIC;
2233 -- s_chan_enable_9 : in STD_LOGIC;
2234 --
2235 -- s_tdata_10 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2236 -- s_tvalid_10 : in STD_LOGIC;
2237 -- s_tlast_10 : in STD_LOGIC;
2238 -- s_tready_10 : out STD_LOGIC;
2239 -- s_header_mark_10 : in STD_LOGIC;
2240 -- s_trailer_mark_10 : in STD_LOGIC;
2241 -- s_poll_chan_10 : out STD_LOGIC;
2242 -- s_chan_enable_10 : in STD_LOGIC;
2243 --
2244 -- s_tdata_11 : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2245 -- s_tvalid_11 : in STD_LOGIC;
2246 -- s_tlast_11 : in STD_LOGIC;
2247 -- s_tready_11 : out STD_LOGIC;
2248 -- s_header_mark_11 : in STD_LOGIC;
2249 -- s_trailer_mark_11 : in STD_LOGIC;
2250 -- s_poll_chan_11 : out STD_LOGIC;
2251 -- s_chan_enable_11 : in STD_LOGIC;
2252 --
2253 --
2254 ---- pointer : in STD_LOGIC_VECTOR (4 downto 0);
2255 
2256 -- m_tdata : out STD_LOGIC_VECTOR (bp_width-1 downto 0);
2257 -- m_tvalid : out STD_LOGIC;
2258 -- m_tlast : out STD_LOGIC;
2259 -- m_tready : in STD_LOGIC;
2260 -- m_header_mark : out STD_LOGIC;
2261 -- m_trailer_mark : out STD_LOGIC;
2262 -- m_poll_chan_0 : in STD_LOGIC;
2263 -- m_chan_enable : out STD_LOGIC;
2264 --
2265 -- nxt_chan_0 : in STD_LOGIC;
2266 -- nxt_chan_1 : in STD_LOGIC;
2267 -- nxt_chan_2 : in STD_LOGIC;
2268 -- nxt_chan_3 : in STD_LOGIC;
2269 -- current_chan : out STD_LOGIC_VECTOR (3 downto 0);
2270 -- first_chan : in STD_LOGIC_VECTOR (3 downto 0);
2271 -- last_chan : in STD_LOGIC_VECTOR (3 downto 0)
2272 --
2273 -- );
2274 --end component;
2275 
2276 
2277 component ttc_info is
2278  Port (
2279  reset : in STD_LOGIC; --synchronous to lhc_clk
2280  pp_clk : in STD_LOGIC;
2281  cttc_user_clk : in STD_LOGIC;
2282  seq : in STD_LOGIC_VECTOR (1 downto 0);
2283  event_sel : in STD_LOGIC_VECTOR (1 downto 0);
2284  rod_slot : in std_logic;
2285  ttc_reg : out STD_LOGIC_VECTOR(63 DOWNTO 0);
2286 -- ttc_valid : in STD_LOGIC; --derived from seq statemachine - it would be possible toprovide a strobe for each word
2287  ttc_word_0 : in STD_LOGIC_VECTOR (31 downto 0); --synchronous to cttc_user_clk
2288  ttc_word_1 : in STD_LOGIC_VECTOR (31 downto 0); --synchronous to cttc_user_clk
2289  ttc_word_2 : in STD_LOGIC_VECTOR (31 downto 0); --synchronous to cttc_user_clk
2290  ttc_word_3 : in STD_LOGIC_VECTOR (31 downto 0); --synchronous to cttc_user_clk
2291 
2292  L1A : out STD_LOGIC;
2293  L1A_delay_out : out STD_LOGIC;
2294  l1id_mis_stretch : in std_logic;
2295  L1ID_error : out STD_LOGIC;
2296  CTTC_CRC_error : out STD_LOGIC;
2297  TTC_CRC_ignore : in std_logic;
2298  TTC_fifo_rst : in std_logic;
2299  header_read_en : in STD_LOGIC;
2300  header_fifo_valid : out STD_LOGIC;
2301  header_fifo_full : out STD_LOGIC;
2302  header_fifo_empty : out STD_LOGIC;
2303  header_fifo_level : out STD_LOGIC_VECTOR (8 downto 0);
2304 -- master_header : out STD_LOGIC_VECTOR (95 downto 0) --synchronous to pp_clk
2305  master_header : out STD_LOGIC_VECTOR (63 downto 0); --synchronous to pp_clk
2306 
2307 
2308  bulk_L1ID_error : out STD_LOGIC;
2309  bulk_CTTC_CRC_error : out STD_LOGIC;
2310  bulk_header_read_en : in STD_LOGIC;
2311  bulk_header_fifo_valid : out STD_LOGIC;
2312  bulk_header_fifo_full : out STD_LOGIC;
2313  bulk_header_fifo_empty : out STD_LOGIC;
2314  bulk_header_fifo_level : out STD_LOGIC_VECTOR (8 downto 0);
2315  bulk_master_header : out STD_LOGIC_VECTOR (63 downto 0);
2316  event_count : out STD_LOGIC_VECTOR(31 DOWNTO 0);
2317  orbit_count : out STD_LOGIC_VECTOR(15 DOWNTO 0);
2318  event_count_reset : in std_logic;
2319  orbit_count_reset : in std_logic;
2320  flx_backpressure : out STD_LOGIC_VECTOR(11 DOWNTO 0);
2321  bcn_adjustment : in std_logic_vector(11 downto 0);
2322 
2323  timeout_threshold : in STD_LOGIC_vector(31 downto 0);
2324  l1id_continuity_control : in STD_LOGIC_vector (31 downto 0);
2325  l1id_continuity_status : out STD_LOGIC_vector (31 downto 0);
2326  l1id_local_miss : out STD_LOGIC_vector (31 downto 0);
2327  l1id_ttc_miss : out STD_LOGIC_vector (31 downto 0);
2328  l1id_error_count : out STD_LOGIC_vector(31 downto 0);
2329  repeat_counter : out STD_LOGIC_vector(31 downto 0)
2330 
2331  );
2332 end component;
2333 
2334 component ev_builder is
2335  Port ( clock : in STD_LOGIC;
2336  reset : in STD_LOGIC;
2337  s_tdata : in STD_LOGIC_VECTOR (bp_width-1 downto 0);
2338  s_tvalid : in STD_LOGIC;
2339  s_tlast : in STD_LOGIC;
2340  s_header_mark : in STD_LOGIC;
2341  s_trailer_mark : in STD_LOGIC;
2342  s_tready : out STD_LOGIC;
2343  nxt_chan : out STD_LOGIC;
2344  empty_0 : in STD_LOGIC;
2345  empty_1 : in STD_LOGIC;
2346  empty_2 : in STD_LOGIC;
2347  empty_3 : in STD_LOGIC;
2348 -- empty_stat : out STD_LOGIC;
2349  match_0 : in STD_LOGIC;
2350  match_1 : in STD_LOGIC;
2351  match_2 : in STD_LOGIC;
2352  match_3 : in STD_LOGIC;
2353  hdr_match : out STD_LOGIC;
2354  current_chan : in STD_LOGIC_VECTOR (3 downto 0);
2355  num_chan : in STD_LOGIC_VECTOR (3 downto 0);
2356  chan_in : in STD_LOGIC_VECTOR (3 downto 0);
2357  chan_enable : in STD_LOGIC;
2358 
2359  empty_stat : out std_logic;
2360  poll_chan : out std_logic;
2361 
2362  lead_follow_b : in STD_LOGIC;
2363  comb_error : in STD_LOGIC;
2364 
2365 -- master_header : in STD_LOGIC_VECTOR (95 downto 0); --synchronous to pp_clk
2366  master_header : in STD_LOGIC_VECTOR (63 downto 0); --synchronous to pp_clk
2367  header_fifo_empty : in STD_LOGIC;
2368  L1ID_error : in STD_LOGIC;
2369  CTTC_CRC_error : in STD_LOGIC;
2370  header_read_en : out STD_LOGIC;
2371  header_fifo_valid : in STD_LOGIC;
2372  header_fifo_full : in STD_LOGIC;
2373  header_sequence : in STD_LOGIC_VECTOR (11 downto 0);
2374  header_type : in STD_LOGIC_VECTOR (3 downto 0);
2375 
2376  m_tvalid : out STD_LOGIC;
2377  m_tlast : out STD_LOGIC;
2378  m_tdata : out STD_LOGIC_VECTOR (bp_width-1 downto 0);
2379  m_header_marker : out STD_LOGIC;
2380  m_tail_marker : out STD_LOGIC;
2381  m_tready : in STD_LOGIC;
2382 
2383  first_chan : in STD_LOGIC_vector (3 downto 0);
2384  last_chan : in STD_LOGIC_vector (3 downto 0);
2385  TTC_ignore : in STD_LOGIC
2386 
2387 
2388  );
2389 
2390 end component;
2391 
2392 
2393 
2394 
2395 component dummy_chan_in is
2396  Port ( current_chan : in STD_LOGIC_VECTOR (4 downto 0);
2397  chan_out : out STD_LOGIC_VECTOR (4 downto 0);
2398  num_chan : in STD_LOGIC_VECTOR (4 downto 0);
2399  clock : in STD_LOGIC;
2400  reset : in STD_LOGIC
2401 );
2402 end component;
2403 
2404 COMPONENT pkt_proc_vio
2405  PORT (
2406  clk : IN STD_LOGIC;
2407  probe_in0 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2408  probe_out0 : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
2409  probe_out1 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
2410  probe_out2 : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
2411  probe_out3 : OUT STD_LOGIC_VECTOR(4 DOWNTO 0)
2412 
2413  );
2414 END COMPONENT;
2415 
2416 
2417 COMPONENT ppmux_ila
2418 
2419 PORT (
2420  clk : IN STD_LOGIC;
2421 
2422 
2423 
2424  probe0 : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
2425  probe1 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2426  probe2 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2427  probe3 : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
2428  probe4 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2429  probe5 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2430  probe6 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2431  probe7 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2432  probe8 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2433  probe9 : IN STD_LOGIC_VECTOR(0 DOWNTO 0)
2434 );
2435 END COMPONENT ;
2436 
2437 
2438 component ro_controller
2439  Port (
2440  USER_CLK : in STD_LOGIC;
2441  SYSTEM_RESET : in STD_LOGIC;
2442 
2443  ro_word_0 : in STD_LOGIC_VECTOR (31 downto 0);
2444  ro_word_1 : in STD_LOGIC_VECTOR (31 downto 0);
2445  ro_word_2 : in STD_LOGIC_VECTOR (31 downto 0);
2446  ro_word_3 : in STD_LOGIC_VECTOR (31 downto 0);
2447 
2448  gt0_txcharisk : out STD_LOGIC_VECTOR (3 downto 0);
2449  gt0_txdata : out STD_LOGIC_VECTOR (31 downto 0)
2450 
2451 
2452  );
2453 end component;
2454 
2455 component pulse_stretch is
2456  generic (
2457  COUNTER_WIDTH : integer := 7
2458  );
2459  Port (
2460  clock : in STD_LOGIC;
2461  reset : in STD_LOGIC;
2462  pulse_in : in STD_LOGIC;
2463  pulse_out : out STD_LOGIC
2464 
2465  );
2466 end component;
2467 
2468 
2469 component combined_ttc_no_mgt
2470 generic
2471 (
2472  EXAMPLE_CONFIG_INDEPENDENT_LANES : integer := 1;
2473 -- EXAMPLE_LANE_WITH_START_CHAR : integer := 0; -- specifies lane with unique start frame ch
2474  EXAMPLE_WORDS_IN_BRAM : integer := 512; -- specifies amount of data in BRAM
2475 -- EXAMPLE_SIM_GTRESET_SPEEDUP : string := "TRUE"; -- simulation setting for GT SecureIP model
2476 -- STABLE_CLOCK_PERIOD : integer := 24;
2477  EXAMPLE_USE_CHIPSCOPE : integer := 1 -- Set to 1 to use Chipscope to drive resets
2478 );
2479 
2480 Port (
2481 
2482  rxusrclk2 : in std_logic;
2483  rx_fsm_reset_done : in std_logic;
2484  cpllfbclklost : in std_logic;
2485  cplllock : in std_logic;
2486  rxbyteisaligned : in std_logic;
2487  rxbyterealign : in std_logic;
2488  rxchariscomma : in std_logic_vector(3 downto 0);
2489  rxcharisk : in std_logic_vector(3 downto 0);
2490  rxcommadet : in std_logic;
2491  rxdata : in std_logic_vector(31 downto 0);
2492  rxdisperr : in std_logic_vector(3 downto 0);
2493  rxnotintable : in std_logic_vector(3 downto 0);
2494  rxresetdone : in std_logic;
2495  DRP_CLK_IN : in std_logic;
2496 
2497  TRACK_DATA_OUT : out std_logic;
2498  ttc_word_0 : out std_logic_vector(31 downto 0);
2499  ttc_word_1 : out std_logic_vector(31 downto 0);
2500  ttc_word_2 : out std_logic_vector(31 downto 0);
2501  ttc_word_3 : out std_logic_vector(31 downto 0);
2502  ttc_seq : out std_logic_vector(1 downto 0);
2503  ttc_status : out std_logic_vector(31 downto 0);
2504  ttc_reset : in std_logic;
2505  stop_ttc_info : in STD_LOGIC
2506 
2507 );
2508 
2509 end component;
2510 
2511 component BUFGMUX
2512 port (
2513 I0 : in STD_LOGIC; --clock-0 input (default)
2514 I1 : in STD_LOGIC; --clock-1 input
2515 S : in STD_LOGIC; -- input select
2516 O : out STD_LOGIC -- Buffer output (TTC User Clock)
2517 );
2518 end component;
2519 
2520 component cttc_crc_test is
2521  Port (
2522  seq : in std_logic_vector(1 downto 0);
2523 -- d_in : in std_logic_vector(31 downto 0);
2524 -- crc_in : in std_logic_vector(31 downto 0);
2525  cttc_user_clk : in STD_LOGIC;
2526  ttc_word_0 : in STD_LOGIC_VECTOR (31 downto 0); --synchronous to cttc_user_clk
2527  ttc_word_1 : in STD_LOGIC_VECTOR (31 downto 0); --synchronous to cttc_user_clk
2528  ttc_word_2 : in STD_LOGIC_VECTOR (31 downto 0); --synchronous to cttc_user_clk
2529  ttc_word_3 : in STD_LOGIC_VECTOR (31 downto 0) --synchronous to cttc_user_clk
2530  -- CTTC_CRC_error : out STD_LOGIC;
2531  -- ttc_crc_ok : out STD_LOGIC
2532 
2533  );
2534 end component;
2535 
2536 
2537 --COMPONENT ila_ro_ctrl_reset
2538 --
2539 --PORT (
2540 -- clk : IN STD_LOGIC;
2541 --
2542 -- probe0 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2543 -- probe1 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2544 -- probe2 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2545 -- probe3 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2546 -- probe4 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2547 -- probe5 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2548 -- probe6 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2549 -- probe7 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2550 -- probe8 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2551 -- probe9 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2552 -- probe10 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2553 -- probe11 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2554 -- probe12 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2555 -- probe13 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2556 -- probe14 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2557 -- probe15 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2558 -- probe16 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2559 -- probe17 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2560 -- probe18 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2561 -- probe19 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2562 -- probe20 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2563 -- probe21 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2564 -- probe22 : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
2565 -- probe23 : IN STD_LOGIC_VECTOR(0 DOWNTO 0)
2566 --);
2567 --END COMPONENT ;
2568 
2569 
2570 --signal RESET : std_logic;
2571 --signal ipb_clk : std_logic;
2572 --signal ipb_rst : std_logic;
2573 --signal ipbr_backplane : ipb_rbus;
2574 --signal ipbw_backplane : ipb_wbus;
2575 signal ipbw: ipb_wbus_array(N_SLAVES - 1 downto 0);
2576 signal ipbr: ipb_rbus_array(N_SLAVES - 1 downto 0);
2577 
2578 signal poll_chan_0 : std_logic;
2579 signal poll_chan_1 : std_logic;
2580 signal poll_chan_2 : std_logic;
2581 signal poll_chan_3 : std_logic;
2582 signal poll_chan_4 : std_logic;
2583 signal poll_chan_5 : std_logic;
2584 signal poll_chan_6 : std_logic;
2585 signal poll_chan_7 : std_logic;
2586 signal poll_chan_8 : std_logic;
2587 signal poll_chan_9 : std_logic;
2588 signal poll_chan_10 : std_logic;
2589 signal poll_chan_11 : std_logic;
2590 
2591 signal ch_tdata_0 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2592 signal ch_tvalid_0 : std_logic;
2593 signal ch_tlast_0 : std_logic;
2594 signal ch_tready_0 : std_logic;
2595 signal ch_header_mark_0 : std_logic;
2596 signal ch_trailer_mark_0 : std_logic;
2597 
2598 signal ch_tdata_1 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2599 signal ch_tvalid_1 : std_logic;
2600 signal ch_tlast_1 : std_logic;
2601 signal ch_tready_1 : std_logic;
2602 signal ch_header_mark_1 : std_logic;
2603 signal ch_trailer_mark_1 : std_logic;
2604 
2605 signal ch_tdata_2 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2606 signal ch_tvalid_2 : std_logic;
2607 signal ch_tlast_2 : std_logic;
2608 signal ch_tready_2 : std_logic;
2609 signal ch_header_mark_2 : std_logic;
2610 signal ch_trailer_mark_2 : std_logic;
2611 
2612 signal ch_tdata_3 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2613 signal ch_tvalid_3 : std_logic;
2614 signal ch_tlast_3 : std_logic;
2615 signal ch_tready_3 : std_logic;
2616 signal ch_header_mark_3 : std_logic;
2617 signal ch_trailer_mark_3 : std_logic;
2618 
2619 signal ch_tdata_4 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2620 signal ch_tvalid_4 : std_logic;
2621 signal ch_tlast_4 : std_logic;
2622 signal ch_tready_4 : std_logic;
2623 signal ch_header_mark_4 : std_logic;
2624 signal ch_trailer_mark_4 : std_logic;
2625 
2626 signal ch_tdata_5 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2627 signal ch_tvalid_5 : std_logic;
2628 signal ch_tlast_5 : std_logic;
2629 signal ch_tready_5 : std_logic;
2630 signal ch_header_mark_5 : std_logic;
2631 signal ch_trailer_mark_5 : std_logic;
2632 
2633 signal ch_tdata_6 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2634 signal ch_tvalid_6 : std_logic;
2635 signal ch_tlast_6 : std_logic;
2636 signal ch_tready_6 : std_logic;
2637 signal ch_header_mark_6 : std_logic;
2638 signal ch_trailer_mark_6 : std_logic;
2639 
2640 signal ch_tdata_7 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2641 signal ch_tvalid_7 : std_logic;
2642 signal ch_tlast_7 : std_logic;
2643 signal ch_tready_7 : std_logic;
2644 signal ch_header_mark_7 : std_logic;
2645 signal ch_trailer_mark_7 : std_logic;
2646 
2647 signal ch_tdata_8 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2648 signal ch_tvalid_8 : std_logic;
2649 signal ch_tlast_8 : std_logic;
2650 signal ch_tready_8 : std_logic;
2651 signal ch_header_mark_8 : std_logic;
2652 signal ch_trailer_mark_8 : std_logic;
2653 
2654 signal ch_tdata_9 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2655 signal ch_tvalid_9 : std_logic;
2656 signal ch_tlast_9 : std_logic;
2657 signal ch_tready_9 : std_logic;
2658 signal ch_header_mark_9 : std_logic;
2659 signal ch_trailer_mark_9 : std_logic;
2660 
2661 signal ch_tdata_10 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2662 signal ch_tvalid_10 : std_logic;
2663 signal ch_tlast_10 : std_logic;
2664 signal ch_tready_10 : std_logic;
2665 signal ch_header_mark_10 : std_logic;
2666 signal ch_trailer_mark_10 : std_logic;
2667 
2668 signal ch_tdata_11 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2669 signal ch_tvalid_11 : std_logic;
2670 signal ch_tlast_11 : std_logic;
2671 signal ch_tready_11 : std_logic;
2672 signal ch_header_mark_11 : std_logic;
2673 signal ch_trailer_mark_11 : std_logic;
2674 
2675 signal ch_tdata_12 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2676 signal ch_tvalid_12 : std_logic;
2677 signal ch_tlast_12 : std_logic;
2678 signal ch_tready_12 : std_logic;
2679 signal ch_header_mark_12 : std_logic;
2680 signal ch_trailer_mark_12 : std_logic;
2681 
2682 signal ch_tdata_13 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2683 signal ch_tvalid_13 : std_logic;
2684 signal ch_tlast_13 : std_logic;
2685 signal ch_tready_13 : std_logic;
2686 signal ch_header_mark_13 : std_logic;
2687 signal ch_trailer_mark_13 : std_logic;
2688 
2689 signal ch_tdata_14 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2690 signal ch_tvalid_14 : std_logic;
2691 signal ch_tlast_14 : std_logic;
2692 signal ch_tready_14 : std_logic;
2693 signal ch_header_mark_14 : std_logic;
2694 signal ch_trailer_mark_14 : std_logic;
2695 
2696 signal ch_tdata_15 : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2697 signal ch_tvalid_15 : std_logic;
2698 signal ch_tlast_15 : std_logic;
2699 signal ch_tready_15 : std_logic;
2700 signal ch_header_mark_15 : std_logic;
2701 signal ch_trailer_mark_15 : std_logic;
2702 
2703 
2704 
2705 
2706 signal ev_in_tdata : STD_LOGIC_VECTOR (bp_width-1 downto 0);
2707 signal ev_in_tvalid : std_logic;
2708 signal ev_in_tlast : std_logic;
2709 signal ev_in_tready : std_logic;
2710 signal ev_in_header_mark : std_logic;
2711 signal ev_in_trailer_mark : std_logic;
2712 
2713 signal nxt_chan_0 : std_logic;
2714 signal nxt_chan_1 : std_logic;
2715 signal nxt_chan_2 : std_logic;
2716 signal nxt_chan_3 : std_logic;
2717 
2718 signal current_chan : STD_LOGIC_VECTOR (4 downto 0);
2719 signal m_poll_chan_0 : std_logic;
2720 signal dum_chin : STD_LOGIC_VECTOR (4 downto 0);
2721 signal timeout_err : std_logic;
2722 
2723 --ttc signals
2724 --signal master_header : STD_LOGIC_VECTOR (95 downto 0);
2725 signal master_header : STD_LOGIC_VECTOR (63 downto 0);
2726 signal header_read_en : STD_LOGIC;
2727 signal header_fifo_valid : STD_LOGIC;
2728 signal header_fifo_empty : STD_LOGIC;
2729 signal L1ID_error : STD_LOGIC;
2730 signal CTTC_CRC_error : STD_LOGIC;
2731 signal header_fifo_full : STD_LOGIC;
2732 
2733 
2734 signal timeout_threshold : STD_LOGIC_VECTOR (31 downto 0);
2735 signal l1id_continuity_control : STD_LOGIC_VECTOR (31 downto 0);
2736 signal l1id_continuity_status : STD_LOGIC_vector (31 downto 0);
2737 signal l1id_local_miss : STD_LOGIC_vector (31 downto 0);
2738 signal l1id_ttc_miss : STD_LOGIC_vector (31 downto 0);
2739 signal l1id_error_count : STD_LOGIC_vector(31 downto 0);
2740 signal repeat_counter : STD_LOGIC_vector(31 downto 0);
2741 
2742 
2743 
2744 
2745  --signals added for the Detector Specific Event Type
2746 signal bulk_master_header : STD_LOGIC_VECTOR (63 downto 0);
2747 signal bulk_header_fifo_empty : STD_LOGIC;
2748 signal bulk_L1ID_error : STD_LOGIC;
2749 signal bulk_CTTC_CRC_error : STD_LOGIC;
2750 signal bulk_header_read_en : STD_LOGIC;
2751 signal bulk_header_fifo_valid : STD_LOGIC;
2752 signal bulk_header_fifo_full : STD_LOGIC;
2753 
2754 
2755 signal ev_chan_enable : STD_LOGIC;
2756 -- signal TTC_ignore_vio : STD_LOGIC;
2757 
2758 
2759 --channel 0 routing ---
2760 signal tob_poll_chan_0 : STD_LOGIC;
2761 signal tob_m_tvalid_0 : STD_LOGIC;
2762 signal tob_m_tlast_0 : STD_LOGIC;
2763 signal tob_m_tready_0 : STD_LOGIC;
2764 signal tob_header_marker_0 : STD_LOGIC;
2765 signal tob_tail_marker_0 : STD_LOGIC;
2766 signal hdr_crc_tag_0 : std_logic;
2767 
2768 signal tob_m_tdata_0 : STD_LOGIC_VECTOR (63 downto 0);
2769 
2770 signal calo_poll_chan_0 : STD_LOGIC;
2771 signal calo_m_tvalid_0 : STD_LOGIC;
2772 signal calo_m_tlast_0 : STD_LOGIC;
2773 signal calo_m_axis_tready_0 : STD_LOGIC;
2774 signal calo_header_marker_0 : STD_LOGIC;
2775 signal calo_tail_marker_0 : STD_LOGIC;
2776 signal calo_m_tdata_0 : STD_LOGIC_VECTOR (63 downto 0);
2777 
2778 
2779 --channel 1 routing ---
2780 signal tob_poll_chan_1 : STD_LOGIC;
2781 signal tob_m_tvalid_1 : STD_LOGIC;
2782 signal tob_m_tlast_1 : STD_LOGIC;
2783 signal tob_m_tready_1 : STD_LOGIC;
2784 signal tob_header_marker_1 : STD_LOGIC;
2785 signal tob_tail_marker_1 : STD_LOGIC;
2786 signal hdr_crc_tag_1 : STD_LOGIC;
2787 signal tob_m_tdata_1 : STD_LOGIC_VECTOR (63 downto 0);
2788 
2789 signal calo_poll_chan_1 : STD_LOGIC;
2790 signal calo_m_tvalid_1 : STD_LOGIC;
2791 signal calo_m_tlast_1 : STD_LOGIC;
2792 signal calo_m_axis_tready_1 : STD_LOGIC;
2793 signal calo_header_marker_1 : STD_LOGIC;
2794 signal calo_tail_marker_1 : STD_LOGIC;
2795 signal calo_m_tdata_1 : STD_LOGIC_VECTOR (63 downto 0);
2796 
2797 
2798 --channel 2 routing ---
2799 signal tob_poll_chan_2 : STD_LOGIC;
2800 signal tob_m_tvalid_2 : STD_LOGIC;
2801 signal tob_m_tlast_2 : STD_LOGIC;
2802 signal tob_m_tready_2 : STD_LOGIC;
2803 signal tob_header_marker_2 : STD_LOGIC;
2804 signal tob_tail_marker_2 : STD_LOGIC;
2805 signal hdr_crc_tag_2 : STD_LOGIC;
2806 signal tob_m_tdata_2 : STD_LOGIC_VECTOR (63 downto 0);
2807 
2808 signal calo_poll_chan_2 : STD_LOGIC;
2809 signal calo_m_tvalid_2 : STD_LOGIC;
2810 signal calo_m_tlast_2 : STD_LOGIC;
2811 signal calo_m_axis_tready_2 : STD_LOGIC;
2812 signal calo_header_marker_2 : STD_LOGIC;
2813 signal calo_tail_marker_2 : STD_LOGIC;
2814 signal calo_m_tdata_2 : STD_LOGIC_VECTOR (63 downto 0);
2815 
2816 
2817 --channel 3 routing ---
2818 signal tob_poll_chan_3 : STD_LOGIC;
2819 signal tob_m_tvalid_3 : STD_LOGIC;
2820 signal tob_m_tlast_3 : STD_LOGIC;
2821 signal tob_m_tready_3 : STD_LOGIC;
2822 signal tob_header_marker_3 : STD_LOGIC;
2823 signal tob_tail_marker_3 : STD_LOGIC;
2824 signal hdr_crc_tag_3 : STD_LOGIC;
2825 signal tob_m_tdata_3 : STD_LOGIC_VECTOR (63 downto 0);
2826 
2827 signal calo_poll_chan_3 : STD_LOGIC;
2828 signal calo_m_tvalid_3 : STD_LOGIC;
2829 signal calo_m_tlast_3 : STD_LOGIC;
2830 signal calo_m_axis_tready_3 : STD_LOGIC;
2831 signal calo_header_marker_3 : STD_LOGIC;
2832 signal calo_tail_marker_3 : STD_LOGIC;
2833 signal calo_m_tdata_3 : STD_LOGIC_VECTOR (63 downto 0);
2834 
2835 --channel 4 routing ---
2836 signal tob_poll_chan_4 : STD_LOGIC;
2837 signal tob_m_tvalid_4 : STD_LOGIC;
2838 signal tob_m_tlast_4 : STD_LOGIC;
2839 signal tob_m_tready_4 : STD_LOGIC;
2840 signal tob_header_marker_4 : STD_LOGIC;
2841 signal tob_tail_marker_4 : STD_LOGIC;
2842 signal hdr_crc_tag_4 : STD_LOGIC;
2843 signal tob_m_tdata_4 : STD_LOGIC_VECTOR (63 downto 0);
2844 
2845 signal calo_poll_chan_4 : STD_LOGIC;
2846 signal calo_m_tvalid_4 : STD_LOGIC;
2847 signal calo_m_tlast_4 : STD_LOGIC;
2848 signal calo_m_axis_tready_4 : STD_LOGIC;
2849 signal calo_header_marker_4 : STD_LOGIC;
2850 signal calo_tail_marker_4 : STD_LOGIC;
2851 signal calo_m_tdata_4 : STD_LOGIC_VECTOR (63 downto 0);
2852 
2853 --channel 5 routing ---
2854 signal tob_poll_chan_5 : STD_LOGIC;
2855 signal tob_m_tvalid_5 : STD_LOGIC;
2856 signal tob_m_tlast_5 : STD_LOGIC;
2857 signal tob_m_tready_5 : STD_LOGIC;
2858 signal tob_header_marker_5 : STD_LOGIC;
2859 signal tob_tail_marker_5 : STD_LOGIC;
2860 signal hdr_crc_tag_5 : STD_LOGIC;
2861 signal tob_m_tdata_5 : STD_LOGIC_VECTOR (63 downto 0);
2862 
2863 signal calo_poll_chan_5 : STD_LOGIC;
2864 signal calo_m_tvalid_5 : STD_LOGIC;
2865 signal calo_m_tlast_5 : STD_LOGIC;
2866 signal calo_m_axis_tready_5 : STD_LOGIC;
2867 signal calo_header_marker_5 : STD_LOGIC;
2868 signal calo_tail_marker_5 : STD_LOGIC;
2869 signal calo_m_tdata_5 : STD_LOGIC_VECTOR (63 downto 0);
2870 
2871 --channel 6 routing ---
2872 signal tob_poll_chan_6 : STD_LOGIC;
2873 signal tob_m_tvalid_6 : STD_LOGIC;
2874 signal tob_m_tlast_6 : STD_LOGIC;
2875 signal tob_m_tready_6 : STD_LOGIC;
2876 signal tob_header_marker_6 : STD_LOGIC;
2877 signal tob_tail_marker_6 : STD_LOGIC;
2878 signal hdr_crc_tag_6 : STD_LOGIC;
2879 signal tob_m_tdata_6 : STD_LOGIC_VECTOR (63 downto 0);
2880 
2881 signal calo_poll_chan_6 : STD_LOGIC;
2882 signal calo_m_tvalid_6 : STD_LOGIC;
2883 signal calo_m_tlast_6 : STD_LOGIC;
2884 signal calo_m_axis_tready_6 : STD_LOGIC;
2885 signal calo_header_marker_6 : STD_LOGIC;
2886 signal calo_tail_marker_6 : STD_LOGIC;
2887 signal calo_m_tdata_6 : STD_LOGIC_VECTOR (63 downto 0);
2888 
2889 --channel 7 routing ---
2890 signal tob_poll_chan_7 : STD_LOGIC;
2891 signal tob_m_tvalid_7 : STD_LOGIC;
2892 signal tob_m_tlast_7 : STD_LOGIC;
2893 signal tob_m_tready_7 : STD_LOGIC;
2894 signal tob_header_marker_7 : STD_LOGIC;
2895 signal tob_tail_marker_7 : STD_LOGIC;
2896 signal hdr_crc_tag_7 : STD_LOGIC;
2897 signal tob_m_tdata_7 : STD_LOGIC_VECTOR (63 downto 0);
2898 
2899 signal calo_poll_chan_7 : STD_LOGIC;
2900 signal calo_m_tvalid_7 : STD_LOGIC;
2901 signal calo_m_tlast_7 : STD_LOGIC;
2902 signal calo_m_axis_tready_7 : STD_LOGIC;
2903 signal calo_header_marker_7 : STD_LOGIC;
2904 signal calo_tail_marker_7 : STD_LOGIC;
2905 signal calo_m_tdata_7 : STD_LOGIC_VECTOR (63 downto 0);
2906 
2907 --channel 8 routing ---
2908 signal tob_poll_chan_8 : STD_LOGIC;
2909 signal tob_m_tvalid_8 : STD_LOGIC;
2910 signal tob_m_tlast_8 : STD_LOGIC;
2911 signal tob_m_tready_8 : STD_LOGIC;
2912 signal tob_header_marker_8 : STD_LOGIC;
2913 signal tob_tail_marker_8 : STD_LOGIC;
2914 signal hdr_crc_tag_8 : STD_LOGIC;
2915 signal tob_m_tdata_8 : STD_LOGIC_VECTOR (63 downto 0);
2916 
2917 signal calo_poll_chan_8 : STD_LOGIC;
2918 signal calo_m_tvalid_8 : STD_LOGIC;
2919 signal calo_m_tlast_8 : STD_LOGIC;
2920 signal calo_m_axis_tready_8 : STD_LOGIC;
2921 signal calo_header_marker_8 : STD_LOGIC;
2922 signal calo_tail_marker_8 : STD_LOGIC;
2923 signal calo_m_tdata_8 : STD_LOGIC_VECTOR (63 downto 0);
2924 
2925 --channel 9 routing ---
2926 signal tob_poll_chan_9 : STD_LOGIC;
2927 signal tob_m_tvalid_9 : STD_LOGIC;
2928 signal tob_m_tlast_9 : STD_LOGIC;
2929 signal tob_m_tready_9 : STD_LOGIC;
2930 signal tob_header_marker_9 : STD_LOGIC;
2931 signal tob_tail_marker_9 : STD_LOGIC;
2932 signal hdr_crc_tag_9 : STD_LOGIC;
2933 signal tob_m_tdata_9 : STD_LOGIC_VECTOR (63 downto 0);
2934 
2935 signal calo_poll_chan_9 : STD_LOGIC;
2936 signal calo_m_tvalid_9 : STD_LOGIC;
2937 signal calo_m_tlast_9 : STD_LOGIC;
2938 signal calo_m_axis_tready_9 : STD_LOGIC;
2939 signal calo_header_marker_9 : STD_LOGIC;
2940 signal calo_tail_marker_9 : STD_LOGIC;
2941 signal calo_m_tdata_9 : STD_LOGIC_VECTOR (63 downto 0);
2942 
2943 --channel 10 routing ---
2944 signal tob_poll_chan_10 : STD_LOGIC;
2945 signal tob_m_tvalid_10 : STD_LOGIC;
2946 signal tob_m_tlast_10 : STD_LOGIC;
2947 signal tob_m_tready_10 : STD_LOGIC;
2948 signal tob_header_marker_10 : STD_LOGIC;
2949 signal tob_tail_marker_10 : STD_LOGIC;
2950 signal hdr_crc_tag_10 : STD_LOGIC;
2951 signal tob_m_tdata_10 : STD_LOGIC_VECTOR (63 downto 0);
2952 
2953 signal calo_poll_chan_10 : STD_LOGIC;
2954 signal calo_m_tvalid_10 : STD_LOGIC;
2955 signal calo_m_tlast_10 : STD_LOGIC;
2956 signal calo_m_axis_tready_10 : STD_LOGIC;
2957 signal calo_header_marker_10 : STD_LOGIC;
2958 signal calo_tail_marker_10 : STD_LOGIC;
2959 signal calo_m_tdata_10 : STD_LOGIC_VECTOR (63 downto 0);
2960 
2961 --channel 11 routing ---
2962 signal tob_poll_chan_11 : STD_LOGIC;
2963 signal tob_m_tvalid_11 : STD_LOGIC;
2964 signal tob_m_tlast_11 : STD_LOGIC;
2965 signal tob_m_tready_11 : STD_LOGIC;
2966 signal tob_header_marker_11 : STD_LOGIC;
2967 signal tob_tail_marker_11 : STD_LOGIC;
2968 signal hdr_crc_tag_11 : STD_LOGIC;
2969 signal tob_m_tdata_11 : STD_LOGIC_VECTOR (63 downto 0);
2970 
2971 signal calo_poll_chan_11 : STD_LOGIC;
2972 signal calo_m_tvalid_11 : STD_LOGIC;
2973 signal calo_m_tlast_11 : STD_LOGIC;
2974 signal calo_m_axis_tready_11 : STD_LOGIC;
2975 signal calo_header_marker_11 : STD_LOGIC;
2976 signal calo_tail_marker_11 : STD_LOGIC;
2977 signal calo_m_tdata_11 : STD_LOGIC_VECTOR (63 downto 0);
2978 
2979 --channel 12 routing ---
2980 signal tob_poll_chan_12 : STD_LOGIC;
2981 signal tob_m_tvalid_12 : STD_LOGIC;
2982 signal tob_m_tlast_12 : STD_LOGIC;
2983 signal tob_m_tready_12 : STD_LOGIC;
2984 signal tob_header_marker_12 : STD_LOGIC;
2985 signal tob_tail_marker_12 : STD_LOGIC;
2986 signal hdr_crc_tag_12 : STD_LOGIC;
2987 signal tob_m_tdata_12 : STD_LOGIC_VECTOR (63 downto 0);
2988 
2989 signal calo_poll_chan_12 : STD_LOGIC;
2990 signal calo_m_tvalid_12 : STD_LOGIC;
2991 signal calo_m_tlast_12 : STD_LOGIC;
2992 signal calo_m_axis_tready_12 : STD_LOGIC;
2993 signal calo_header_marker_12 : STD_LOGIC;
2994 signal calo_tail_marker_12 : STD_LOGIC;
2995 signal calo_m_tdata_12 : STD_LOGIC_VECTOR (63 downto 0);
2996 
2997 --channel 13 routing ---
2998 signal tob_poll_chan_13 : STD_LOGIC;
2999 signal tob_m_tvalid_13 : STD_LOGIC;
3000 signal tob_m_tlast_13 : STD_LOGIC;
3001 signal tob_m_tready_13 : STD_LOGIC;
3002 signal tob_header_marker_13 : STD_LOGIC;
3003 signal tob_tail_marker_13 : STD_LOGIC;
3004 signal hdr_crc_tag_13 : STD_LOGIC;
3005 signal tob_m_tdata_13 : STD_LOGIC_VECTOR (63 downto 0);
3006 
3007 signal calo_poll_chan_13 : STD_LOGIC;
3008 signal calo_m_tvalid_13 : STD_LOGIC;
3009 signal calo_m_tlast_13 : STD_LOGIC;
3010 signal calo_m_axis_tready_13 : STD_LOGIC;
3011 signal calo_header_marker_13 : STD_LOGIC;
3012 signal calo_tail_marker_13 : STD_LOGIC;
3013 signal calo_m_tdata_13 : STD_LOGIC_VECTOR (63 downto 0);
3014 
3015 --channel 14 routing ---
3016 signal tob_poll_chan_14 : STD_LOGIC;
3017 signal tob_m_tvalid_14 : STD_LOGIC;
3018 signal tob_m_tlast_14 : STD_LOGIC;
3019 signal tob_m_tready_14 : STD_LOGIC;
3020 signal tob_header_marker_14 : STD_LOGIC;
3021 signal tob_tail_marker_14 : STD_LOGIC;
3022 signal hdr_crc_tag_14 : STD_LOGIC;
3023 signal tob_m_tdata_14 : STD_LOGIC_VECTOR (63 downto 0);
3024 
3025 signal calo_poll_chan_14 : STD_LOGIC;
3026 signal calo_m_tvalid_14 : STD_LOGIC;
3027 signal calo_m_tlast_14 : STD_LOGIC;
3028 signal calo_m_axis_tready_14 : STD_LOGIC;
3029 signal calo_header_marker_14 : STD_LOGIC;
3030 signal calo_tail_marker_14 : STD_LOGIC;
3031 signal calo_m_tdata_14 : STD_LOGIC_VECTOR (63 downto 0);
3032 
3033 
3034 
3035 
3036 
3037 --channel 15 routing ---
3038 signal tob_poll_chan_15 : STD_LOGIC;
3039 signal tob_m_tvalid_15 : STD_LOGIC;
3040 signal tob_m_tlast_15 : STD_LOGIC;
3041 signal tob_m_tready_15 : STD_LOGIC;
3042 signal tob_header_marker_15 : STD_LOGIC;
3043 signal tob_tail_marker_15 : STD_LOGIC;
3044 signal hdr_crc_tag_15 : STD_LOGIC;
3045 signal tob_m_tdata_15 : STD_LOGIC_VECTOR (63 downto 0);
3046 
3047 signal calo_poll_chan_15 : STD_LOGIC;
3048 signal calo_m_tvalid_15 : STD_LOGIC;
3049 signal calo_m_tlast_15 : STD_LOGIC;
3050 signal calo_m_axis_tready_15 : STD_LOGIC;
3051 signal calo_header_marker_15 : STD_LOGIC;
3052 signal calo_tail_marker_15 : STD_LOGIC;
3053 signal calo_m_tdata_15 : STD_LOGIC_VECTOR (63 downto 0);
3054 
3055 
3056 --channel 16 routing ---
3057 signal tob_poll_chan_16 : STD_LOGIC;
3058 signal tob_m_tvalid_16 : STD_LOGIC;
3059 signal tob_m_tlast_16 : STD_LOGIC;
3060 signal tob_m_tready_16 : STD_LOGIC;
3061 signal tob_header_marker_16 : STD_LOGIC;
3062 signal tob_tail_marker_16 : STD_LOGIC;
3063 signal hdr_crc_tag_16 : STD_LOGIC;
3064 signal tob_m_tdata_16 : STD_LOGIC_VECTOR (63 downto 0);
3065 
3066 signal calo_poll_chan_16 : STD_LOGIC;
3067 signal calo_m_tvalid_16 : STD_LOGIC;
3068 signal calo_m_tlast_16 : STD_LOGIC;
3069 signal calo_m_axis_tready_16 : STD_LOGIC;
3070 signal calo_header_marker_16 : STD_LOGIC;
3071 signal calo_tail_marker_16 : STD_LOGIC;
3072 signal calo_m_tdata_16 : STD_LOGIC_VECTOR (63 downto 0);
3073 
3074 
3075 --channel 17 routing ---
3076 signal tob_poll_chan_17 : STD_LOGIC;
3077 signal tob_m_tvalid_17 : STD_LOGIC;
3078 signal tob_m_tlast_17 : STD_LOGIC;
3079 signal tob_m_tready_17 : STD_LOGIC;
3080 signal tob_header_marker_17 : STD_LOGIC;
3081 signal tob_tail_marker_17 : STD_LOGIC;
3082 signal hdr_crc_tag_17 : STD_LOGIC;
3083 signal tob_m_tdata_17 : STD_LOGIC_VECTOR (63 downto 0);
3084 
3085 signal calo_poll_chan_17 : STD_LOGIC;
3086 signal calo_m_tvalid_17 : STD_LOGIC;
3087 signal calo_m_tlast_17 : STD_LOGIC;
3088 signal calo_m_axis_tready_17 : STD_LOGIC;
3089 signal calo_header_marker_17 : STD_LOGIC;
3090 signal calo_tail_marker_17 : STD_LOGIC;
3091 signal calo_m_tdata_17 : STD_LOGIC_VECTOR (63 downto 0);
3092 
3093 --channel 18 routing ---
3094 signal tob_poll_chan_18 : STD_LOGIC;
3095 signal tob_m_tvalid_18 : STD_LOGIC;
3096 signal tob_m_tlast_18 : STD_LOGIC;
3097 signal tob_m_tready_18 : STD_LOGIC;
3098 signal tob_header_marker_18 : STD_LOGIC;
3099 signal tob_tail_marker_18 : STD_LOGIC;
3100 signal hdr_crc_tag_18 : STD_LOGIC;
3101 signal tob_m_tdata_18 : STD_LOGIC_VECTOR (63 downto 0);
3102 
3103 signal calo_poll_chan_18 : STD_LOGIC;
3104 signal calo_m_tvalid_18 : STD_LOGIC;
3105 signal calo_m_tlast_18 : STD_LOGIC;
3106 signal calo_m_axis_tready_18 : STD_LOGIC;
3107 signal calo_header_marker_18 : STD_LOGIC;
3108 signal calo_tail_marker_18 : STD_LOGIC;
3109 signal calo_m_tdata_18 : STD_LOGIC_VECTOR (63 downto 0);
3110 
3111 --channel 19 routing ---
3112 signal tob_poll_chan_19 : STD_LOGIC;
3113 signal tob_m_tvalid_19 : STD_LOGIC;
3114 signal tob_m_tlast_19 : STD_LOGIC;
3115 signal tob_m_tready_19 : STD_LOGIC;
3116 signal tob_header_marker_19 : STD_LOGIC;
3117 signal tob_tail_marker_19 : STD_LOGIC;
3118 signal hdr_crc_tag_19 : STD_LOGIC;
3119 signal tob_m_tdata_19 : STD_LOGIC_VECTOR (63 downto 0);
3120 
3121 signal calo_poll_chan_19 : STD_LOGIC;
3122 signal calo_m_tvalid_19 : STD_LOGIC;
3123 signal calo_m_tlast_19 : STD_LOGIC;
3124 signal calo_m_axis_tready_19 : STD_LOGIC;
3125 signal calo_header_marker_19 : STD_LOGIC;
3126 signal calo_tail_marker_19 : STD_LOGIC;
3127 signal calo_m_tdata_19 : STD_LOGIC_VECTOR (63 downto 0);
3128 
3129 --channel 20 routing ---
3130 signal tob_poll_chan_20 : STD_LOGIC;
3131 signal tob_m_tvalid_20 : STD_LOGIC;
3132 signal tob_m_tlast_20 : STD_LOGIC;
3133 signal tob_m_tready_20 : STD_LOGIC;
3134 signal tob_header_marker_20 : STD_LOGIC;
3135 signal tob_tail_marker_20 : STD_LOGIC;
3136 signal hdr_crc_tag_20 : STD_LOGIC;
3137 signal tob_m_tdata_20 : STD_LOGIC_VECTOR (63 downto 0);
3138 
3139 signal calo_poll_chan_20 : STD_LOGIC;
3140 signal calo_m_tvalid_20 : STD_LOGIC;
3141 signal calo_m_tlast_20 : STD_LOGIC;
3142 signal calo_m_axis_tready_20 : STD_LOGIC;
3143 signal calo_header_marker_20 : STD_LOGIC;
3144 signal calo_tail_marker_20 : STD_LOGIC;
3145 signal calo_m_tdata_20 : STD_LOGIC_VECTOR (63 downto 0);
3146 
3147 
3148 --channel 21 routing ---
3149 signal tob_poll_chan_21 : STD_LOGIC;
3150 signal tob_m_tvalid_21 : STD_LOGIC;
3151 signal tob_m_tlast_21 : STD_LOGIC;
3152 signal tob_m_tready_21 : STD_LOGIC;
3153 signal tob_header_marker_21 : STD_LOGIC;
3154 signal tob_tail_marker_21 : STD_LOGIC;
3155 signal hdr_crc_tag_21 : STD_LOGIC;
3156 signal tob_m_tdata_21 : STD_LOGIC_VECTOR (63 downto 0);
3157 
3158 signal calo_poll_chan_21 : STD_LOGIC;
3159 signal calo_m_tvalid_21 : STD_LOGIC;
3160 signal calo_m_tlast_21 : STD_LOGIC;
3161 signal calo_m_axis_tready_21 : STD_LOGIC;
3162 signal calo_header_marker_21 : STD_LOGIC;
3163 signal calo_tail_marker_21 : STD_LOGIC;
3164 signal calo_m_tdata_21 : STD_LOGIC_VECTOR (63 downto 0);
3165 
3166 --channel 22 routing ---
3167 signal tob_poll_chan_22 : STD_LOGIC;
3168 signal tob_m_tvalid_22 : STD_LOGIC;
3169 signal tob_m_tlast_22 : STD_LOGIC;
3170 signal tob_m_tready_22 : STD_LOGIC;
3171 signal tob_header_marker_22 : STD_LOGIC;
3172 signal tob_tail_marker_22 : STD_LOGIC;
3173 signal hdr_crc_tag_22 : STD_LOGIC;
3174 signal tob_m_tdata_22 : STD_LOGIC_VECTOR (63 downto 0);
3175 
3176 signal calo_poll_chan_22 : STD_LOGIC;
3177 signal calo_m_tvalid_22 : STD_LOGIC;
3178 signal calo_m_tlast_22 : STD_LOGIC;
3179 signal calo_m_axis_tready_22 : STD_LOGIC;
3180 signal calo_header_marker_22 : STD_LOGIC;
3181 signal calo_tail_marker_22 : STD_LOGIC;
3182 signal calo_m_tdata_22 : STD_LOGIC_VECTOR (63 downto 0);
3183 
3184 --channel 23 routing ---
3185 signal tob_poll_chan_23 : STD_LOGIC;
3186 signal tob_m_tvalid_23 : STD_LOGIC;
3187 signal tob_m_tlast_23 : STD_LOGIC;
3188 signal tob_m_tready_23 : STD_LOGIC;
3189 signal tob_header_marker_23 : STD_LOGIC;
3190 signal tob_tail_marker_23 : STD_LOGIC;
3191 signal hdr_crc_tag_23 : STD_LOGIC;
3192 signal tob_m_tdata_23 : STD_LOGIC_VECTOR (63 downto 0);
3193 
3194 signal calo_poll_chan_23 : STD_LOGIC;
3195 signal calo_m_tvalid_23 : STD_LOGIC;
3196 signal calo_m_tlast_23 : STD_LOGIC;
3197 signal calo_m_axis_tready_23 : STD_LOGIC;
3198 signal calo_header_marker_23 : STD_LOGIC;
3199 signal calo_tail_marker_23 : STD_LOGIC;
3200 signal calo_m_tdata_23 : STD_LOGIC_VECTOR (63 downto 0);
3201 
3202 
3203 
3204 signal s3_reset_0 : STD_LOGIC;
3205 signal s4_reset_0 : STD_LOGIC;
3206 signal s4_reset_1 : STD_LOGIC;
3207 signal s4_reset_2 : STD_LOGIC;
3208 signal s4_reset_3 : STD_LOGIC;
3209 signal s5_reset_0 : STD_LOGIC;
3210 signal s5_reset_1 : STD_LOGIC;
3211 signal s5_reset_2 : STD_LOGIC;
3212 signal s5_reset_3 : STD_LOGIC;
3213 signal s6_reset_0 : STD_LOGIC;
3214 signal s7_reset_0 : STD_LOGIC;
3215 signal s8_reset_0 : STD_LOGIC;
3216 signal s8_reset_1 : STD_LOGIC;
3217 signal s8_reset_2 : STD_LOGIC;
3218 signal s8_reset_3 : STD_LOGIC;
3219 signal s9_reset_0 : STD_LOGIC;
3220 signal s9_reset_1 : STD_LOGIC;
3221 signal s9_reset_2 : STD_LOGIC;
3222 signal s9_reset_3 : STD_LOGIC;
3223 
3224 signal s10_reset_0 : STD_LOGIC;
3225 signal s11_reset_0 : STD_LOGIC;
3226 
3227 signal s12_reset_0 : STD_LOGIC;
3228 signal s12_reset_1 : STD_LOGIC;
3229 signal s12_reset_2 : STD_LOGIC;
3230 signal s12_reset_3 : STD_LOGIC;
3231 
3232 signal s13_reset_0 : STD_LOGIC;
3233 signal s13_reset_1 : STD_LOGIC;
3234 signal s13_reset_2 : STD_LOGIC;
3235 signal s13_reset_3 : STD_LOGIC;
3236 
3237 signal s14_reset_0 : STD_LOGIC;
3238 
3239 signal aurora_chan_control_0_i : STD_LOGIC_VECTOR (31 downto 0);
3240 signal aurora_chan_control_1_i : STD_LOGIC_VECTOR (31 downto 0);
3241 signal aurora_chan_control_2_i : STD_LOGIC_VECTOR (31 downto 0);
3242 signal aurora_chan_control_3_i : STD_LOGIC_VECTOR (31 downto 0);
3243 signal aurora_chan_control_4_i : STD_LOGIC_VECTOR (31 downto 0);
3244 signal aurora_chan_control_5_i : STD_LOGIC_VECTOR (31 downto 0);
3245 signal aurora_chan_control_6_i : STD_LOGIC_VECTOR (31 downto 0);
3246 signal aurora_chan_control_7_i : STD_LOGIC_VECTOR (31 downto 0);
3247 signal aurora_chan_control_8_i : STD_LOGIC_VECTOR (31 downto 0);
3248 signal aurora_chan_control_9_i : STD_LOGIC_VECTOR (31 downto 0);
3249 signal aurora_chan_control_10_i : STD_LOGIC_VECTOR (31 downto 0);
3250 signal aurora_chan_control_11_i : STD_LOGIC_VECTOR (31 downto 0);
3251 signal aurora_chan_control_12_i : STD_LOGIC_VECTOR (31 downto 0);
3252 signal aurora_chan_control_13_i : STD_LOGIC_VECTOR (31 downto 0);
3253 signal aurora_chan_control_14_i : STD_LOGIC_VECTOR (31 downto 0);
3254 signal aurora_chan_control_15_i : STD_LOGIC_VECTOR (31 downto 0);
3255 signal aurora_chan_control_16_i : STD_LOGIC_VECTOR (31 downto 0);
3256 signal aurora_chan_control_17_i : STD_LOGIC_VECTOR (31 downto 0);
3257 signal aurora_chan_control_18_i : STD_LOGIC_VECTOR (31 downto 0);
3258 signal aurora_chan_control_19_i : STD_LOGIC_VECTOR (31 downto 0);
3259 signal aurora_chan_control_20_i : STD_LOGIC_VECTOR (31 downto 0);
3260 signal aurora_chan_control_21_i : STD_LOGIC_VECTOR (31 downto 0);
3261 signal aurora_chan_control_22_i : STD_LOGIC_VECTOR (31 downto 0);
3262 signal aurora_chan_control_23_i : STD_LOGIC_VECTOR (31 downto 0);
3263 
3264 signal s3_chan_up_0 : STD_LOGIC;
3265 signal s4_chan_up_0 : STD_LOGIC;
3266 signal s5_chan_up_0 : STD_LOGIC;
3267 signal s6_chan_up_0 : STD_LOGIC;
3268 signal s7_chan_up_0 : STD_LOGIC;
3269 signal s8_chan_up_0 : STD_LOGIC;
3270 signal s9_chan_up_0 : STD_LOGIC;
3271 signal s10_chan_up_0 : STD_LOGIC;
3272 signal s11_chan_up_0 : STD_LOGIC;
3273 signal s12_chan_up_0 : STD_LOGIC;
3274 signal s13_chan_up_0 : STD_LOGIC;
3275 signal s14_chan_up_0 : STD_LOGIC;
3276 signal s4_chan_up_1 : STD_LOGIC;
3277 signal s4_chan_up_2 : STD_LOGIC;
3278 signal s4_chan_up_3 : STD_LOGIC;
3279 signal s5_chan_up_1 : STD_LOGIC;
3280 signal s5_chan_up_2 : STD_LOGIC;
3281 signal s5_chan_up_3 : STD_LOGIC;
3282 signal s8_chan_up_1 : STD_LOGIC;
3283 signal s8_chan_up_2 : STD_LOGIC;
3284 signal s8_chan_up_3 : STD_LOGIC;
3285 signal s9_chan_up_1 : STD_LOGIC;
3286 signal s9_chan_up_2 : STD_LOGIC;
3287 signal s9_chan_up_3 : STD_LOGIC;
3288 signal s12_chan_up_1 : STD_LOGIC;
3289 signal s12_chan_up_2 : STD_LOGIC;
3290 signal s12_chan_up_3 : STD_LOGIC;
3291 signal s13_chan_up_1 : STD_LOGIC;
3292 signal s13_chan_up_2 : STD_LOGIC;
3293 signal s13_chan_up_3 : STD_LOGIC;
3294 
3295 signal backplane_control_i : STD_LOGIC_VECTOR (31 downto 0);
3296 signal ttc_fifo_level : STD_LOGIC_VECTOR (15 downto 0);
3297 signal ttc_reg : STD_LOGIC_VECTOR(63 DOWNTO 0);
3298 
3299 signal channel_enable : STD_LOGIC_VECTOR (23 downto 0);
3300 signal first_chan : STD_LOGIC_vector(4 downto 0);
3301 signal last_chan : STD_LOGIC_vector(4 downto 0);
3302 signal channel_enable_reg : STD_LOGIC_VECTOR (23 downto 0);
3303 signal first_chan_reg : STD_LOGIC_vector(4 downto 0);
3304 signal last_chan_reg : STD_LOGIC_vector(4 downto 0);
3305 
3306 
3307 signal TTC_fifo_rst : std_logic;
3308 signal ttc_ignore : std_logic;
3309 signal ttc_ignore_i : std_logic;
3310 signal TTC_CRC_ignore : std_logic;
3311 signal flx_backpressure_i : STD_LOGIC_VECTOR(11 DOWNTO 0);
3312 signal link_enable_stat : STD_LOGIC_vector(11 downto 0);
3313 --signal ipbw: ipb_wbus_array(N_SLAVES - 1 downto 0);
3314 --signal ipbr: ipb_rbus_array(N_SLAVES - 1 downto 0);
3315 --signal ipbw: ipb_wbus;
3316 --signal ipbr: ipb_rbus;
3317 signal bulk_last_chan : STD_LOGIC_vector(4 downto 0);
3318 
3319 signal header_sequence : STD_LOGIC_VECTOR (11 downto 0);
3320 signal header_type : STD_LOGIC_VECTOR (3 downto 0);
3321 
3322 signal header_read_en_0 : STD_LOGIC;
3323 signal header_read_en_1 : STD_LOGIC;
3324 signal header_read_en_2 : STD_LOGIC;
3325 signal det_spec_evnt_sel : STD_LOGIC_VECTOR (3 downto 0);
3326 
3327 signal tob_xoff : STD_LOGIC_VECTOR (23 downto 0);
3328 signal bulk_xoff : STD_LOGIC_VECTOR (23 downto 0);
3329 signal event_sel : STD_LOGIC_VECTOR (1 downto 0);
3330 signal L1A_i : STD_LOGIC;
3331 signal event_count : STD_LOGIC_VECTOR(31 DOWNTO 0);
3332 signal orbit_count : STD_LOGIC_VECTOR(15 DOWNTO 0);
3333 signal event_count_reset : std_logic;
3334 signal orbit_count_reset : std_logic;
3335 signal bcn_adjustment : std_logic_vector(11 downto 0);
3336 
3337 signal reset : std_logic;
3338 signal bkpln_ctrl_reset : std_logic;
3339 signal wdog_fifo_reset : STD_LOGIC;
3340 
3341 
3342 ----muxed ttc signals -------
3343 
3344 signal mux_rxusrclk : STD_LOGIC;
3345 signal mux_rx_fsm_reset_done : STD_LOGIC;
3346 signal mux_cpllfbclklost : STD_LOGIC;
3347 signal mux_cplllock : STD_LOGIC;
3348 signal mux_rxbyteisaligned : STD_LOGIC;
3349 signal mux_rxbyterealign : STD_LOGIC;
3350 signal mux_rxchariscomma : STD_LOGIC_VECTOR(3 DOWNTO 0);
3351 signal mux_rxcharisk : STD_LOGIC_VECTOR(3 DOWNTO 0);
3352 signal mux_rxcommadet : STD_LOGIC;
3353 signal mux_rxdata : STD_LOGIC_VECTOR(31 DOWNTO 0);
3354 signal mux_rxdisperr : STD_LOGIC_VECTOR(3 DOWNTO 0);
3355 signal mux_rxnotintable : STD_LOGIC_VECTOR(3 DOWNTO 0);
3356 signal mux_rxresetdone : STD_LOGIC;
3357 signal mux_DRP_CLK_IN : STD_LOGIC;
3358 signal alt_TRACK_DATA_OUT : STD_LOGIC;
3359 signal alt_ttc_word_0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
3360 signal alt_ttc_word_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
3361 signal alt_ttc_word_2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
3362 signal alt_ttc_word_3 : STD_LOGIC_VECTOR(31 DOWNTO 0);
3363 signal alt_ttc_seq : STD_LOGIC_VECTOR(1 DOWNTO 0);
3364 signal alt_ttc_status : STD_LOGIC_VECTOR(31 DOWNTO 0);
3365 signal alt_ttc_reset : STD_LOGIC;
3366 signal alt_stop_ttc_info : STD_LOGIC;
3367 
3368 signal BP_rxoutclk : STD_LOGIC;
3369 signal FM_rxoutclk : STD_LOGIC;
3370 signal mux_CTTC_MGT_bus : STD_LOGIC_VECTOR(31 DOWNTO 0);
3371 
3372 
3373 
3374 signal BP_rxchariscomma : STD_LOGIC_VECTOR(3 DOWNTO 0);
3375 signal BP_rxdisperr : STD_LOGIC_VECTOR(3 DOWNTO 0);
3376 signal BP_rxnotintable : STD_LOGIC;
3377 signal BP_rx_fsm_reset_done : STD_LOGIC;
3378 signal BP_cpllfbclklost : STD_LOGIC;
3379 signal BP_cplllock : STD_LOGIC;
3380 signal BP_rxbyteisaligned : STD_LOGIC;
3381 signal BP_rxbyterealign : STD_LOGIC;
3382 signal BP_rxcommadet : STD_LOGIC;
3383 signal BP_rxresetdone : STD_LOGIC;
3384 
3385 begin
3386 
3387 reset <= Backplane_control_i(5) or system_reset or bkpln_ctrl_reset;
3388 
3389 flx_backpressure <= flx_backpressure_i;
3390 
3391 bkpln_rst_pulse_stretcher : pulse_stretch
3392  generic map (
3393  COUNTER_WIDTH => 8
3394  )
3395  Port map (
3396  clock => pp_clock,
3397  reset => '0',
3398  pulse_in => Backplane_control_i(5),
3399  pulse_out => bkpln_ctrl_reset
3400  );
3401 
3402 
3403 
3404 
3405 bulk_lst_chan: if jfex=1 generate
3406  bulk_last_chan <= 5x"07";
3407  elsif jfex=0 generate
3408  bulk_last_chan <= 5x"03";
3409  end generate bulk_lst_chan;
3410 
3411 
3412 
3413 -- ipbus address decode
3414 --ef 06/02/2020
3415 
3416 fabric: entity work.ipbus_fabric_sel
3417  generic map(
3418  NSLV => N_SLAVES,
3419  SEL_WIDTH => IPBUS_SEL_WIDTH)
3420  port map(
3421  ipb_in => ipb_in_processor,
3422  ipb_out => ipb_out_processor,
3423 -- sel => ipbus_decode_my_module(ipb_in.ipb_addr),
3424 -- sel => ipbus_sel_my_module(ipb_in.ipb_addr),
3425 -- sel => ipbus_sel_jfex_chan_regs(ipb_in.ipb_addr),
3426 -- sel => ipbus_sel_rod_backplane_regs(ipb_in.ipb_addr),
3427 -- sel => ipbus_sel_L1CaloHubRodProcessor(ipb_in.ipb_addr),
3428  sel => ipbus_sel_L1CaloHubRodProcessor(ipb_in_processor.ipb_addr),
3429  ipb_to_slaves => ipbw,
3430  ipb_from_slaves => ipbr
3431  );
3432 
3433 
3434 
3435 backplane_control <= backplane_control_i;
3436 
3437 fifo_layer : input_fifos
3438  generic map (
3439  sim => sim,
3440  jfex => jfex)
3441  port map(
3442  ipb_clk => ipb_clk,
3443  ipb_rst => ipb_rst,
3444  ipb_in => ipb_in_backplane,
3445  ipb_out => ipb_out_backplane,
3446 -- ipb_in => ipbw_backplane,
3447 -- ipb_out => ipbr_backplane,
3448 
3449  reset => reset,
3450  pp_clock => pp_clock,
3451  clk_40 => clk_40,
3452  clk_160 => clk_160,
3453  rt_clk => rt_clk,
3454  backplane_control => backplane_control_i,
3455  init_clk => init_clk,
3456  ck_pll_lock => ck_pll_lock,
3457  master_reset => master_reset,
3458  wdog_fifo_reset => wdog_fifo_reset,
3459  L1A => L1A_i,
3460  seq => ttc_seq,
3461  ro_status => ro_status,
3462  ro_user_clock => ro_user_clock,
3463  flx_backpressure => flx_backpressure,
3464  CK_INT => CK_INT,
3465  SMBALERT_B => SMBALERT_B,
3466  T_WRN_B => T_WRN_B,
3467  ttc_status => ttc_status,
3468  ttc_fifo_level => ttc_fifo_level,
3469  L1ID_error => L1ID_error,
3470  CTTC_CRC_error => CTTC_CRC_error,
3471  cttc_user_clk => cttc_user_clk,
3472  ttc_reg => ttc_reg,
3473  ttc_reset => ttc_reset,
3474  hub_link_reset => hub_link_reset,
3475 -- reset_all_channels => reset_all_channels,
3476  chan_enable => channel_enable_reg,
3477  first_chan => first_chan_reg,
3478  last_chan => last_chan_reg,
3479  ttc_ignore => ttc_ignore,
3480  TTC_CRC_ignore => TTC_CRC_ignore,
3481  TTC_fifo_rst => TTC_fifo_rst,
3482  header_sequence => header_sequence,
3483  header_type => header_type,
3484  det_spec_evnt_sel=> det_spec_evnt_sel,
3485 
3486  multichannel_busy => multichannel_busy,
3487  combined_busy => combined_busy,
3488  event_sel => event_sel,
3489  event_count => event_count,
3490  orbit_count => orbit_count,
3491  event_count_reset => event_count_reset,
3492  orbit_count_reset => orbit_count_reset,
3493  bcn_adjustment => bcn_adjustment,
3494 
3495  l1id_continuity_control => l1id_continuity_control,
3496  l1id_continuity_status => l1id_continuity_status,
3497  l1id_local_miss => l1id_local_miss,
3498  l1id_ttc_miss => l1id_ttc_miss,
3499  l1id_error_count => l1id_error_count,
3500  timeout_threshold => timeout_threshold,
3501  repeat_counter => repeat_counter,
3502  timeout_err => timeout_err,
3503 
3504  --aurora channel 0 input bus
3505  aurora_user_clk_0 => aurora_user_clock_0,
3506  aurora_chan_stat_0 => aurora_chan_stat_0,
3507  aurora_chan_control_0 => aurora_chan_control_0_i,
3508  s_axis_tvalid_0 => s_axis_tvalid_0,
3509  s_axis_tlast_0 => s_axis_tlast_0,
3510  tob_s_tready_0 => open,
3511  s_axis_tdata_0 => bp_data_0,
3512 
3513  --tob channel 0 output axi bus --------------------------------------
3514  tob_poll_chan_0 => tob_poll_chan_0,
3515  tob_m_tvalid_0 => tob_m_tvalid_0,
3516  tob_m_tlast_0 => tob_m_tlast_0,
3517  tob_m_tready_0 => tob_m_tready_0,
3518  tob_m_tdata_0 => tob_m_tdata_0,
3519  tob_header_marker_0 => tob_header_marker_0,
3520  tob_tail_marker_0 => tob_tail_marker_0,
3521  hdr_crc_tag_0 => hdr_crc_tag_0,
3522 
3523  --calo channel 0 output axi bus --------------------------------------
3524  calo_poll_chan_0 => calo_poll_chan_0,
3525  calo_m_tvalid_0 => calo_m_tvalid_0,
3526  calo_m_fifo_tlast_0 => calo_m_tlast_0,
3527  calo_m_axis_tready_0 => calo_m_axis_tready_0, --in from bulk processor
3528  calo_s_axis_tready_0 => open, --out to error/BUSY system
3529  calo_m_axis_tdata_0 => calo_m_tdata_0,
3530  calo_header_marker_0 => calo_header_marker_0,
3531  calo_tail_marker_0 => calo_tail_marker_0,
3532 
3533 --ufc message bus -----
3534  s_axi_ufc_rx_tdata_0 => s_axi_ufc_rx_tdata_0,
3535  s_axi_ufc_rx_tvalid_0 => s_axi_ufc_rx_tvalid_0,
3536  s_axi_ufc_rx_tlast_0 => s_axi_ufc_rx_tlast_0,
3537 
3538  --aurora channel 1 input bus
3539  aurora_user_clk_1 => aurora_user_clock_1,
3540  aurora_chan_stat_1 => aurora_chan_stat_1,
3541  aurora_chan_control_1 => aurora_chan_control_1_i,
3542  s_axis_tvalid_1 => s_axis_tvalid_1,
3543  s_axis_tlast_1 => s_axis_tlast_1,
3544  tob_s_tready_1 => open,
3545  s_axis_tdata_1 => bp_data_1,
3546 
3547 
3548 --tob channel 1 output axi bus --------------------------------------
3549  tob_poll_chan_1 => tob_poll_chan_1,
3550  tob_m_tvalid_1 => tob_m_tvalid_1,
3551  tob_m_tlast_1 => tob_m_tlast_1,
3552  tob_m_tready_1 => tob_m_tready_1,
3553  tob_m_tdata_1 => tob_m_tdata_1,
3554  tob_header_marker_1 => tob_header_marker_1,
3555  tob_tail_marker_1 => tob_tail_marker_1,
3556  hdr_crc_tag_1 => hdr_crc_tag_1,
3557 
3558  --calo channel 1 output axi bus --------------------------------------
3559  calo_poll_chan_1 => calo_poll_chan_1,
3560  calo_m_tvalid_1 => calo_m_tvalid_1,
3561  calo_m_fifo_tlast_1 => calo_m_tlast_1,
3562  calo_m_axis_tready_1 => calo_m_axis_tready_1, --in from bulk processor , --in from bulk processor
3563  calo_s_axis_tready_1 => open,
3564  calo_m_axis_tdata_1 => calo_m_tdata_1,
3565  calo_header_marker_1 => calo_header_marker_1,
3566  calo_tail_marker_1 => calo_tail_marker_1,
3567 
3568 --ufc message bus -----
3569  s_axi_ufc_rx_tdata_1 => s_axi_ufc_rx_tdata_1,
3570  s_axi_ufc_rx_tvalid_1 => s_axi_ufc_rx_tvalid_1,
3571  s_axi_ufc_rx_tlast_1 => s_axi_ufc_rx_tlast_1,
3572 
3573 
3574 
3575 
3576  --aurora channel 2 input bus
3577  aurora_user_clk_2 => aurora_user_clock_2,
3578  aurora_chan_stat_2 => aurora_chan_stat_2,
3579  aurora_chan_control_2 => aurora_chan_control_2_i,
3580  s_axis_tvalid_2 => s_axis_tvalid_2,
3581  s_axis_tlast_2 => s_axis_tlast_2,
3582  tob_s_tready_2 => open,
3583  s_axis_tdata_2 => bp_data_2,
3584 
3585 
3586 --tob channel 2 output axi bus --------------------------------------
3587  tob_poll_chan_2 => tob_poll_chan_2,
3588  tob_m_tvalid_2 => tob_m_tvalid_2,
3589  tob_m_tlast_2 => tob_m_tlast_2,
3590  tob_m_tready_2 => tob_m_tready_2,
3591  tob_m_tdata_2 => tob_m_tdata_2,
3592  tob_header_marker_2 => tob_header_marker_2,
3593  tob_tail_marker_2 => tob_tail_marker_2,
3594  hdr_crc_tag_2 => hdr_crc_tag_2,
3595 
3596  --calo channel 2 output axi bus --------------------------------------
3597  calo_poll_chan_2 => calo_poll_chan_2,
3598  calo_m_tvalid_2 => calo_m_tvalid_2,
3599  calo_m_fifo_tlast_2 => calo_m_tlast_2,
3600  calo_m_axis_tready_2 => calo_m_axis_tready_2, --in from bulk processor --in from bulk processor
3601  calo_s_axis_tready_2 => open,
3602  calo_m_axis_tdata_2 => calo_m_tdata_2,
3603  calo_header_marker_2 => calo_header_marker_2,
3604  calo_tail_marker_2 => calo_tail_marker_2,
3605 
3606 --ufc message bus -----
3607  s_axi_ufc_rx_tdata_2 => s_axi_ufc_rx_tdata_2,
3608  s_axi_ufc_rx_tvalid_2 => s_axi_ufc_rx_tvalid_2,
3609  s_axi_ufc_rx_tlast_2 => s_axi_ufc_rx_tlast_2,
3610 
3611 
3612 
3613  --aurora channel 3 input bus
3614  aurora_user_clk_3 => aurora_user_clock_3,
3615  aurora_chan_stat_3 => aurora_chan_stat_3,
3616  aurora_chan_control_3 => aurora_chan_control_3_i,
3617  s_axis_tvalid_3 => s_axis_tvalid_3,
3618  s_axis_tlast_3 => s_axis_tlast_3,
3619  tob_s_tready_3 => open,
3620  s_axis_tdata_3 => bp_data_3,
3621 
3622 
3623 --tob channel 3 output axi bus --------------------------------------
3624  tob_poll_chan_3 => tob_poll_chan_3,
3625  tob_m_tvalid_3 => tob_m_tvalid_3,
3626  tob_m_tlast_3 => tob_m_tlast_3,
3627  tob_m_tready_3 => tob_m_tready_3,
3628  tob_m_tdata_3 => tob_m_tdata_3,
3629  tob_header_marker_3 => tob_header_marker_3,
3630  tob_tail_marker_3 => tob_tail_marker_3,
3631  hdr_crc_tag_3 => hdr_crc_tag_3,
3632 
3633  --calo channel 1 output axi bus --------------------------------------
3634  calo_poll_chan_3 => calo_poll_chan_3,
3635  calo_m_tvalid_3 => calo_m_tvalid_3,
3636  calo_m_fifo_tlast_3 => calo_m_tlast_3,
3637  calo_m_axis_tready_3 => calo_m_axis_tready_3, --in from bulk processor , --in from bulk processor
3638  calo_s_axis_tready_3 => open,
3639  calo_m_axis_tdata_3 => calo_m_tdata_3,
3640  calo_header_marker_3 => calo_header_marker_3,
3641  calo_tail_marker_3 => calo_tail_marker_3,
3642 
3643 --ufc message bus -----
3644  s_axi_ufc_rx_tdata_3 => s_axi_ufc_rx_tdata_3,
3645  s_axi_ufc_rx_tvalid_3 => s_axi_ufc_rx_tvalid_3,
3646  s_axi_ufc_rx_tlast_3 => s_axi_ufc_rx_tlast_3,
3647 
3648 
3649 
3650  --aurora channel 4 input bus
3651  aurora_user_clk_4 => aurora_user_clock_4,
3652  aurora_chan_stat_4 => aurora_chan_stat_4,
3653  aurora_chan_control_4 => aurora_chan_control_4_i,
3654  s_axis_tvalid_4 => s_axis_tvalid_4,
3655  s_axis_tlast_4 => s_axis_tlast_4,
3656  tob_s_tready_4 => open,
3657  s_axis_tdata_4 => bp_data_4,
3658 
3659 
3660 --tob channel 4 output axi bus --------------------------------------
3661  tob_poll_chan_4 => tob_poll_chan_4,
3662  tob_m_tvalid_4 => tob_m_tvalid_4,
3663  tob_m_tlast_4 => tob_m_tlast_4,
3664  tob_m_tready_4 => tob_m_tready_4,
3665  tob_m_tdata_4 => tob_m_tdata_4,
3666  tob_header_marker_4 => tob_header_marker_4,
3667  tob_tail_marker_4 => tob_tail_marker_4,
3668  hdr_crc_tag_4 => hdr_crc_tag_4,
3669 
3670  --calo channel 4 output axi bus --------------------------------------
3671  calo_poll_chan_4 => calo_poll_chan_4,
3672  calo_m_tvalid_4 => calo_m_tvalid_4,
3673  calo_m_fifo_tlast_4 => calo_m_tlast_4,
3674  calo_m_axis_tready_4 => calo_m_axis_tready_4, --in from bulk processor
3675  calo_s_axis_tready_4 => open,
3676  calo_m_axis_tdata_4 => calo_m_tdata_4,
3677  calo_header_marker_4 => calo_header_marker_4,
3678  calo_tail_marker_4 => calo_tail_marker_4,
3679 
3680 --ufc message bus -----
3681  s_axi_ufc_rx_tdata_4 => s_axi_ufc_rx_tdata_4,
3682  s_axi_ufc_rx_tvalid_4 => s_axi_ufc_rx_tvalid_4,
3683  s_axi_ufc_rx_tlast_4 => s_axi_ufc_rx_tlast_4,
3684 
3685 
3686  --aurora channel 5 input bus
3687  aurora_user_clk_5 => aurora_user_clock_5,
3688  aurora_chan_stat_5 => aurora_chan_stat_5,
3689  aurora_chan_control_5 => aurora_chan_control_5_i,
3690  s_axis_tvalid_5 => s_axis_tvalid_5,
3691  s_axis_tlast_5 => s_axis_tlast_5,
3692  tob_s_tready_5 => open,
3693  s_axis_tdata_5 => bp_data_5,
3694 
3695 
3696 --tob channel 5 output axi bus --------------------------------------
3697  tob_poll_chan_5 => tob_poll_chan_5,
3698  tob_m_tvalid_5 => tob_m_tvalid_5,
3699  tob_m_tlast_5 => tob_m_tlast_5,
3700  tob_m_tready_5 => tob_m_tready_5,
3701  tob_m_tdata_5 => tob_m_tdata_5,
3702  tob_header_marker_5 => tob_header_marker_5,
3703  tob_tail_marker_5 => tob_tail_marker_5,
3704  hdr_crc_tag_5 => hdr_crc_tag_5,
3705 
3706  --calo channel 5 output axi bus --------------------------------------
3707  calo_poll_chan_5 => calo_poll_chan_5,
3708  calo_m_tvalid_5 => calo_m_tvalid_5,
3709  calo_m_fifo_tlast_5 => calo_m_tlast_5,
3710  calo_m_axis_tready_5 => calo_m_axis_tready_5, --in from bulk processor
3711  calo_s_axis_tready_5 => open,
3712  calo_m_axis_tdata_5 => calo_m_tdata_5,
3713  calo_header_marker_5 => calo_header_marker_5,
3714  calo_tail_marker_5 => calo_tail_marker_5,
3715 
3716 --ufc message bus -----
3717  s_axi_ufc_rx_tdata_5 => s_axi_ufc_rx_tdata_5,
3718  s_axi_ufc_rx_tvalid_5 => s_axi_ufc_rx_tvalid_5,
3719  s_axi_ufc_rx_tlast_5 => s_axi_ufc_rx_tlast_5,
3720 
3721 
3722  --aurora channel 6 input bus
3723  aurora_user_clk_6 => aurora_user_clock_6,
3724  aurora_chan_stat_6 => aurora_chan_stat_6,
3725  aurora_chan_control_6 => aurora_chan_control_6_i,
3726  s_axis_tvalid_6 => s_axis_tvalid_6,
3727  s_axis_tlast_6 => s_axis_tlast_6,
3728  tob_s_tready_6 => open,
3729  s_axis_tdata_6 => bp_data_6,
3730 
3731 
3732 --tob channel 6 output axi bus --------------------------------------
3733  tob_poll_chan_6 => tob_poll_chan_6,
3734  tob_m_tvalid_6 => tob_m_tvalid_6,
3735  tob_m_tlast_6 => tob_m_tlast_6,
3736  tob_m_tready_6 => tob_m_tready_6,
3737  tob_m_tdata_6 => tob_m_tdata_6,
3738  tob_header_marker_6 => tob_header_marker_6,
3739  tob_tail_marker_6 => tob_tail_marker_6,
3740  hdr_crc_tag_6 => hdr_crc_tag_6,
3741 
3742  --calo channel 6 output axi bus --------------------------------------
3743  calo_poll_chan_6 => calo_poll_chan_6,
3744  calo_m_tvalid_6 => calo_m_tvalid_6,
3745  calo_m_fifo_tlast_6 => calo_m_tlast_6,
3746  calo_m_axis_tready_6 => calo_m_axis_tready_6, --in from bulk processor
3747  calo_s_axis_tready_6 => open,
3748  calo_m_axis_tdata_6 => calo_m_tdata_6,
3749  calo_header_marker_6 => calo_header_marker_6,
3750  calo_tail_marker_6 => calo_tail_marker_6,
3751 --ufc message bus -----
3752  s_axi_ufc_rx_tdata_6 => s_axi_ufc_rx_tdata_6,
3753  s_axi_ufc_rx_tvalid_6 => s_axi_ufc_rx_tvalid_6,
3754  s_axi_ufc_rx_tlast_6 => s_axi_ufc_rx_tlast_6,
3755 
3756 
3757  --aurora channel 7 input bus
3758  aurora_user_clk_7 => aurora_user_clock_7,
3759  aurora_chan_stat_7 => aurora_chan_stat_7,
3760  aurora_chan_control_7 => aurora_chan_control_7_i,
3761  s_axis_tvalid_7 => s_axis_tvalid_7,
3762  s_axis_tlast_7 => s_axis_tlast_7,
3763  tob_s_tready_7 => open,
3764  s_axis_tdata_7 => bp_data_7,
3765 
3766 
3767 --tob channel 7 output axi bus --------------------------------------
3768  tob_poll_chan_7 => tob_poll_chan_7,
3769  tob_m_tvalid_7 => tob_m_tvalid_7,
3770  tob_m_tlast_7 => tob_m_tlast_7,
3771  tob_m_tready_7 => tob_m_tready_7,
3772  tob_m_tdata_7 => tob_m_tdata_7,
3773  tob_header_marker_7 => tob_header_marker_7,
3774  tob_tail_marker_7 => tob_tail_marker_7,
3775  hdr_crc_tag_7 => hdr_crc_tag_7,
3776 
3777  --calo channel 7 output axi bus --------------------------------------
3778  calo_poll_chan_7 => calo_poll_chan_7,
3779  calo_m_tvalid_7 => calo_m_tvalid_7,
3780  calo_m_fifo_tlast_7 => calo_m_tlast_7,
3781  calo_m_axis_tready_7 => calo_m_axis_tready_7, --in from bulk processor
3782  calo_s_axis_tready_7 => open,
3783  calo_m_axis_tdata_7 => calo_m_tdata_7,
3784  calo_header_marker_7 => calo_header_marker_7,
3785  calo_tail_marker_7 => calo_tail_marker_7,
3786 
3787 --ufc message bus -----
3788  s_axi_ufc_rx_tdata_7 => s_axi_ufc_rx_tdata_7,
3789  s_axi_ufc_rx_tvalid_7 => s_axi_ufc_rx_tvalid_7,
3790  s_axi_ufc_rx_tlast_7 => s_axi_ufc_rx_tlast_7,
3791 
3792 
3793  --aurora channel 8 input bus
3794  aurora_user_clk_8 => aurora_user_clock_8,
3795  aurora_chan_stat_8 => aurora_chan_stat_8,
3796  aurora_chan_control_8 => aurora_chan_control_8_i,
3797  s_axis_tvalid_8 => s_axis_tvalid_8,
3798  s_axis_tlast_8 => s_axis_tlast_8,
3799  tob_s_tready_8 => open,
3800  s_axis_tdata_8 => bp_data_8,
3801 
3802 
3803 --tob channel 8 output axi bus --------------------------------------
3804  tob_poll_chan_8 => tob_poll_chan_8,
3805  tob_m_tvalid_8 => tob_m_tvalid_8,
3806  tob_m_tlast_8 => tob_m_tlast_8,
3807  tob_m_tready_8 => tob_m_tready_8,
3808  tob_m_tdata_8 => tob_m_tdata_8,
3809  tob_header_marker_8 => tob_header_marker_8,
3810  tob_tail_marker_8 => tob_tail_marker_8,
3811  hdr_crc_tag_8 => hdr_crc_tag_8,
3812 
3813  --calo channel 8 output axi bus --------------------------------------
3814  calo_poll_chan_8 => calo_poll_chan_8,
3815  calo_m_tvalid_8 => calo_m_tvalid_8,
3816  calo_m_fifo_tlast_8 => calo_m_tlast_8,
3817  calo_m_axis_tready_8 => calo_m_axis_tready_8, --in from bulk processor
3818  calo_s_axis_tready_8 => open,
3819  calo_m_axis_tdata_8 => calo_m_tdata_8,
3820  calo_header_marker_8 => calo_header_marker_8,
3821  calo_tail_marker_8 => calo_tail_marker_8,
3822 
3823 --ufc message bus -----
3824  s_axi_ufc_rx_tdata_8 => s_axi_ufc_rx_tdata_8,
3825  s_axi_ufc_rx_tvalid_8 => s_axi_ufc_rx_tvalid_8,
3826  s_axi_ufc_rx_tlast_8 => s_axi_ufc_rx_tlast_8,
3827 
3828  --aurora channel 9 input bus
3829  aurora_user_clk_9 => aurora_user_clock_9,
3830  aurora_chan_stat_9 => aurora_chan_stat_9,
3831  aurora_chan_control_9 => aurora_chan_control_9_i,
3832  s_axis_tvalid_9 => s_axis_tvalid_9,
3833  s_axis_tlast_9 => s_axis_tlast_9,
3834  tob_s_tready_9 => open,
3835  s_axis_tdata_9 => bp_data_9,
3836 
3837 
3838 --tob channel 9 output axi bus --------------------------------------
3839  tob_poll_chan_9 => tob_poll_chan_9,
3840  tob_m_tvalid_9 => tob_m_tvalid_9,
3841  tob_m_tlast_9 => tob_m_tlast_9,
3842  tob_m_tready_9 => tob_m_tready_9,
3843  tob_m_tdata_9 => tob_m_tdata_9,
3844  tob_header_marker_9 => tob_header_marker_9,
3845  tob_tail_marker_9 => tob_tail_marker_9,
3846  hdr_crc_tag_9 => hdr_crc_tag_9,
3847 
3848  --calo channel 9 output axi bus --------------------------------------
3849  calo_poll_chan_9 => calo_poll_chan_9,
3850  calo_m_tvalid_9 => calo_m_tvalid_9,
3851  calo_m_fifo_tlast_9 => calo_m_tlast_9,
3852  calo_m_axis_tready_9 => calo_m_axis_tready_9, --in from bulk processor
3853  calo_s_axis_tready_9 => open,
3854  calo_m_axis_tdata_9 => calo_m_tdata_9,
3855  calo_header_marker_9 => calo_header_marker_9,
3856  calo_tail_marker_9 => calo_tail_marker_9,
3857 
3858 --ufc message bus -----
3859  s_axi_ufc_rx_tdata_9 => s_axi_ufc_rx_tdata_9,
3860  s_axi_ufc_rx_tvalid_9 => s_axi_ufc_rx_tvalid_9,
3861  s_axi_ufc_rx_tlast_9 => s_axi_ufc_rx_tlast_9,
3862 
3863 
3864  --aurora channel 10 input bus
3865  aurora_user_clk_10 => aurora_user_clock_10,
3866  aurora_chan_stat_10 => aurora_chan_stat_10,
3867  aurora_chan_control_10 => aurora_chan_control_10_i,
3868  s_axis_tvalid_10 => s_axis_tvalid_10,
3869  s_axis_tlast_10 => s_axis_tlast_10,
3870  tob_s_tready_10 => open,
3871  s_axis_tdata_10 => bp_data_10,
3872 
3873 
3874 --tob channel 10 output axi bus --------------------------------------
3875  tob_poll_chan_10 => tob_poll_chan_10,
3876  tob_m_tvalid_10 => tob_m_tvalid_10,
3877  tob_m_tlast_10 => tob_m_tlast_10,
3878  tob_m_tready_10 => tob_m_tready_10,
3879  tob_m_tdata_10 => tob_m_tdata_10,
3880  tob_header_marker_10 => tob_header_marker_10,
3881  tob_tail_marker_10 => tob_tail_marker_10,
3882  hdr_crc_tag_10 => hdr_crc_tag_10,
3883 
3884  --calo channel 10 output axi bus --------------------------------------
3885  calo_poll_chan_10 => calo_poll_chan_10,
3886  calo_m_tvalid_10 => calo_m_tvalid_10,
3887  calo_m_fifo_tlast_10 => calo_m_tlast_10,
3888  calo_m_axis_tready_10 => calo_m_axis_tready_10, --in from bulk processor
3889  calo_s_axis_tready_10 => open,
3890  calo_m_axis_tdata_10 => calo_m_tdata_10,
3891  calo_header_marker_10 => calo_header_marker_10,
3892  calo_tail_marker_10 => calo_tail_marker_10,
3893 
3894 --ufc message bus -----
3895  s_axi_ufc_rx_tdata_10 => s_axi_ufc_rx_tdata_10,
3896  s_axi_ufc_rx_tvalid_10 => s_axi_ufc_rx_tvalid_10,
3897  s_axi_ufc_rx_tlast_10 => s_axi_ufc_rx_tlast_10,
3898 
3899  --aurora channel 11 input bus
3900  aurora_user_clk_11 => aurora_user_clock_11,
3901  aurora_chan_stat_11 => aurora_chan_stat_11,
3902  aurora_chan_control_11 => aurora_chan_control_11_i,
3903  s_axis_tvalid_11 => s_axis_tvalid_11,
3904  s_axis_tlast_11 => s_axis_tlast_11,
3905  tob_s_tready_11 => open,
3906  s_axis_tdata_11 => bp_data_11,
3907 
3908 
3909 --tob channel 11 output axi bus --------------------------------------
3910  tob_poll_chan_11 => tob_poll_chan_11,
3911  tob_m_tvalid_11 => tob_m_tvalid_11,
3912  tob_m_tlast_11 => tob_m_tlast_11,
3913  tob_m_tready_11 => tob_m_tready_11,
3914  tob_m_tdata_11 => tob_m_tdata_11,
3915  tob_header_marker_11 => tob_header_marker_11,
3916  tob_tail_marker_11 => tob_tail_marker_11,
3917  hdr_crc_tag_11 => hdr_crc_tag_11,
3918 
3919  --calo channel 11 output axi bus --------------------------------------
3920  calo_poll_chan_11 => calo_poll_chan_11,
3921  calo_m_tvalid_11 => calo_m_tvalid_11,
3922  calo_m_fifo_tlast_11 => calo_m_tlast_11,
3923  calo_m_axis_tready_11 => calo_m_axis_tready_11, --in from bulk processor
3924  calo_s_axis_tready_11 => open,
3925  calo_m_axis_tdata_11 => calo_m_tdata_11,
3926  calo_header_marker_11 => calo_header_marker_11,
3927  calo_tail_marker_11 => calo_tail_marker_11,
3928 
3929 --ufc message bus -----
3930  s_axi_ufc_rx_tdata_11 => s_axi_ufc_rx_tdata_11,
3931  s_axi_ufc_rx_tvalid_11 => s_axi_ufc_rx_tvalid_11,
3932  s_axi_ufc_rx_tlast_11 => s_axi_ufc_rx_tlast_11,
3933 
3934 
3935 
3936  --aurora channel 12 input bus
3937  aurora_user_clk_12 => aurora_user_clock_12,
3938  aurora_chan_stat_12 => aurora_chan_stat_12,
3939  aurora_chan_control_12 => aurora_chan_control_12_i,
3940  s_axis_tvalid_12 => s_axis_tvalid_12,
3941  s_axis_tlast_12 => s_axis_tlast_12,
3942  tob_s_tready_12 => open,
3943  s_axis_tdata_12 => bp_data_12,
3944 
3945 
3946 --tob channel 12 output axi bus --------------------------------------
3947  tob_poll_chan_12 => tob_poll_chan_12,
3948  tob_m_tvalid_12 => tob_m_tvalid_12,
3949  tob_m_tlast_12 => tob_m_tlast_12,
3950  tob_m_tready_12 => tob_m_tready_12,
3951  tob_m_tdata_12 => tob_m_tdata_12,
3952  tob_header_marker_12 => tob_header_marker_12,
3953  tob_tail_marker_12 => tob_tail_marker_12,
3954  hdr_crc_tag_12 => hdr_crc_tag_12,
3955 
3956  --calo channel 12 output axi bus --------------------------------------
3957  calo_poll_chan_12 => calo_poll_chan_12,
3958  calo_m_tvalid_12 => calo_m_tvalid_12,
3959  calo_m_fifo_tlast_12 => calo_m_tlast_12,
3960  calo_m_axis_tready_12 => calo_m_axis_tready_12, --in from bulk processor
3961  calo_s_axis_tready_12 => open,
3962  calo_m_axis_tdata_12 => calo_m_tdata_12,
3963  calo_header_marker_12 => calo_header_marker_12,
3964  calo_tail_marker_12 => calo_tail_marker_12,
3965 
3966 --ufc message bus -----
3967  s_axi_ufc_rx_tdata_12 => s_axi_ufc_rx_tdata_12,
3968  s_axi_ufc_rx_tvalid_12 => s_axi_ufc_rx_tvalid_12,
3969  s_axi_ufc_rx_tlast_12 => s_axi_ufc_rx_tlast_12,
3970 
3971 
3972 
3973  --aurora channel 13 input bus
3974  aurora_user_clk_13 => aurora_user_clock_13,
3975  aurora_chan_stat_13 => aurora_chan_stat_13,
3976  aurora_chan_control_13 => aurora_chan_control_13_i,
3977  s_axis_tvalid_13 => s_axis_tvalid_13,
3978  s_axis_tlast_13 => s_axis_tlast_13,
3979  tob_s_tready_13 => open,
3980  s_axis_tdata_13 => bp_data_13,
3981 
3982 
3983 --tob channel 11 output axi bus --------------------------------------
3984  tob_poll_chan_13 => tob_poll_chan_13,
3985  tob_m_tvalid_13 => tob_m_tvalid_13,
3986  tob_m_tlast_13 => tob_m_tlast_13,
3987  tob_m_tready_13 => tob_m_tready_13,
3988  tob_m_tdata_13 => tob_m_tdata_13,
3989  tob_header_marker_13 => tob_header_marker_13,
3990  tob_tail_marker_13 => tob_tail_marker_13,
3991  hdr_crc_tag_13 => hdr_crc_tag_13,
3992 
3993  --calo channel 11 output axi bus --------------------------------------
3994  calo_poll_chan_13 => calo_poll_chan_13,
3995  calo_m_tvalid_13 => calo_m_tvalid_13,
3996  calo_m_fifo_tlast_13 => calo_m_tlast_13,
3997  calo_m_axis_tready_13 => calo_m_axis_tready_13, --in from bulk processor
3998  calo_s_axis_tready_13 => open,
3999  calo_m_axis_tdata_13 => calo_m_tdata_13,
4000  calo_header_marker_13 => calo_header_marker_13,
4001  calo_tail_marker_13 => calo_tail_marker_13,
4002 
4003 --ufc message bus -----
4004  s_axi_ufc_rx_tdata_13 => s_axi_ufc_rx_tdata_13,
4005  s_axi_ufc_rx_tvalid_13 => s_axi_ufc_rx_tvalid_13,
4006  s_axi_ufc_rx_tlast_13 => s_axi_ufc_rx_tlast_13,
4007 
4008 
4009 
4010  --aurora channel 14 input bus
4011  aurora_user_clk_14 => aurora_user_clock_14,
4012  aurora_chan_stat_14 => aurora_chan_stat_14,
4013  aurora_chan_control_14 => aurora_chan_control_14_i,
4014  s_axis_tvalid_14 => s_axis_tvalid_14,
4015  s_axis_tlast_14 => s_axis_tlast_14,
4016  tob_s_tready_14 => open,
4017  s_axis_tdata_14 => bp_data_14,
4018 
4019 
4020 --tob channel 14 output axi bus --------------------------------------
4021  tob_poll_chan_14 => tob_poll_chan_14,
4022  tob_m_tvalid_14 => tob_m_tvalid_14,
4023  tob_m_tlast_14 => tob_m_tlast_14,
4024  tob_m_tready_14 => tob_m_tready_14,
4025  tob_m_tdata_14 => tob_m_tdata_14,
4026  tob_header_marker_14 => tob_header_marker_14,
4027  tob_tail_marker_14 => tob_tail_marker_14,
4028  hdr_crc_tag_14 => hdr_crc_tag_14,
4029 
4030  --calo channel 14 output axi bus --------------------------------------
4031  calo_poll_chan_14 => calo_poll_chan_14,
4032  calo_m_tvalid_14 => calo_m_tvalid_14,
4033  calo_m_fifo_tlast_14 => calo_m_tlast_14,
4034  calo_m_axis_tready_14 => calo_m_axis_tready_14, --in from bulk processor
4035  calo_s_axis_tready_14 => open,
4036  calo_m_axis_tdata_14 => calo_m_tdata_14,
4037  calo_header_marker_14 => calo_header_marker_14,
4038  calo_tail_marker_14 => calo_tail_marker_14,
4039 
4040 --ufc message bus -----
4041  s_axi_ufc_rx_tdata_14 => s_axi_ufc_rx_tdata_14,
4042  s_axi_ufc_rx_tvalid_14 => s_axi_ufc_rx_tvalid_14,
4043  s_axi_ufc_rx_tlast_14 => s_axi_ufc_rx_tlast_14,
4044 
4045 
4046 
4047  --aurora channel 15 input bus
4048  aurora_user_clk_15 => aurora_user_clock_15,
4049  aurora_chan_stat_15 => aurora_chan_stat_15,
4050  aurora_chan_control_15 => aurora_chan_control_15_i,
4051  s_axis_tvalid_15 => s_axis_tvalid_15,
4052  s_axis_tlast_15 => s_axis_tlast_15,
4053  tob_s_tready_15 => open,
4054  s_axis_tdata_15 => bp_data_15,
4055 
4056 --tob channel 15 output axi bus --------------------------------------
4057  tob_poll_chan_15 => tob_poll_chan_15,
4058  tob_m_tvalid_15 => tob_m_tvalid_15,
4059  tob_m_tlast_15 => tob_m_tlast_15,
4060  tob_m_tready_15 => tob_m_tready_15,
4061  tob_m_tdata_15 => tob_m_tdata_15,
4062  tob_header_marker_15 => tob_header_marker_15,
4063  tob_tail_marker_15 => tob_tail_marker_15,
4064  hdr_crc_tag_15 => hdr_crc_tag_15,
4065 
4066  --calo channel 15 output axi bus --------------------------------------
4067  calo_poll_chan_15 => calo_poll_chan_15,
4068  calo_m_tvalid_15 => calo_m_tvalid_15,
4069  calo_m_fifo_tlast_15 => calo_m_tlast_15,
4070  calo_m_axis_tready_15 => calo_m_axis_tready_15, --in from bulk processor
4071  calo_s_axis_tready_15 => open,
4072  calo_m_axis_tdata_15 => calo_m_tdata_15,
4073  calo_header_marker_15 => calo_header_marker_15,
4074  calo_tail_marker_15 => calo_tail_marker_15,
4075 
4076 --ufc message bus -----
4077  s_axi_ufc_rx_tdata_15 => s_axi_ufc_rx_tdata_15,
4078  s_axi_ufc_rx_tvalid_15 => s_axi_ufc_rx_tvalid_15,
4079  s_axi_ufc_rx_tlast_15 => s_axi_ufc_rx_tlast_15,
4080 
4081 
4082 
4083  --aurora channel 16 input bus
4084  aurora_user_clk_16 => aurora_user_clock_16,
4085  aurora_chan_stat_16 => aurora_chan_stat_16,
4086  aurora_chan_control_16 => aurora_chan_control_16_i,
4087  s_axis_tvalid_16 => s_axis_tvalid_16,
4088  s_axis_tlast_16 => s_axis_tlast_16,
4089  tob_s_tready_16 => open,
4090  s_axis_tdata_16 => bp_data_16,
4091 
4092 
4093 
4094 --tob channel 16 output axi bus --------------------------------------
4095  tob_poll_chan_16 => tob_poll_chan_16,
4096  tob_m_tvalid_16 => tob_m_tvalid_16,
4097  tob_m_tlast_16 => tob_m_tlast_16,
4098  tob_m_tready_16 => tob_m_tready_16,
4099  tob_m_tdata_16 => tob_m_tdata_16,
4100  tob_header_marker_16 => tob_header_marker_16,
4101  tob_tail_marker_16 => tob_tail_marker_16,
4102  hdr_crc_tag_16 => hdr_crc_tag_16,
4103 
4104  --calo channel 16 output axi bus --------------------------------------
4105  calo_poll_chan_16 => calo_poll_chan_16,
4106  calo_m_tvalid_16 => calo_m_tvalid_16,
4107  calo_m_fifo_tlast_16 => calo_m_tlast_16,
4108  calo_m_axis_tready_16 => calo_m_axis_tready_16, --in from bulk processor
4109  calo_s_axis_tready_16 => open,
4110  calo_m_axis_tdata_16 => calo_m_tdata_16,
4111  calo_header_marker_16 => calo_header_marker_16,
4112  calo_tail_marker_16 => calo_tail_marker_16,
4113 
4114 --ufc message bus -----
4115  s_axi_ufc_rx_tdata_16 => s_axi_ufc_rx_tdata_16,
4116  s_axi_ufc_rx_tvalid_16 => s_axi_ufc_rx_tvalid_16,
4117  s_axi_ufc_rx_tlast_16 => s_axi_ufc_rx_tlast_16,
4118 
4119 
4120  --aurora channel 17 input bus
4121  aurora_user_clk_17 => aurora_user_clock_17,
4122  aurora_chan_stat_17 => aurora_chan_stat_17,
4123  aurora_chan_control_17 => aurora_chan_control_17_i,
4124  s_axis_tvalid_17 => s_axis_tvalid_17,
4125  s_axis_tlast_17 => s_axis_tlast_17,
4126  tob_s_tready_17 => open,
4127  s_axis_tdata_17 => bp_data_17,
4128 
4129 
4130 
4131 --tob channel 17 output axi bus --------------------------------------
4132  tob_poll_chan_17 => tob_poll_chan_17,
4133  tob_m_tvalid_17 => tob_m_tvalid_17,
4134  tob_m_tlast_17 => tob_m_tlast_17,
4135  tob_m_tready_17 => tob_m_tready_17,
4136  tob_m_tdata_17 => tob_m_tdata_17,
4137  tob_header_marker_17 => tob_header_marker_17,
4138  tob_tail_marker_17 => tob_tail_marker_17,
4139  hdr_crc_tag_17 => hdr_crc_tag_17,
4140 
4141  --calo channel 17 output axi bus --------------------------------------
4142  calo_poll_chan_17 => calo_poll_chan_17,
4143  calo_m_tvalid_17 => calo_m_tvalid_17,
4144  calo_m_fifo_tlast_17 => calo_m_tlast_17,
4145  calo_m_axis_tready_17 => calo_m_axis_tready_17, --in from bulk processor
4146  calo_s_axis_tready_17 => open,
4147  calo_m_axis_tdata_17 => calo_m_tdata_17,
4148  calo_header_marker_17 => calo_header_marker_17,
4149  calo_tail_marker_17 => calo_tail_marker_17,
4150 
4151 --ufc message bus -----
4152  s_axi_ufc_rx_tdata_17 => s_axi_ufc_rx_tdata_17,
4153  s_axi_ufc_rx_tvalid_17 => s_axi_ufc_rx_tvalid_17,
4154  s_axi_ufc_rx_tlast_17 => s_axi_ufc_rx_tlast_17,
4155 
4156 
4157  --aurora channel 18 input bus
4158  aurora_user_clk_18 => aurora_user_clock_18,
4159  aurora_chan_stat_18 => aurora_chan_stat_18,
4160  aurora_chan_control_18 => aurora_chan_control_18_i,
4161  s_axis_tvalid_18 => s_axis_tvalid_18,
4162  s_axis_tlast_18 => s_axis_tlast_18,
4163  tob_s_tready_18 => open,
4164  s_axis_tdata_18 => bp_data_18,
4165 
4166 
4167 
4168 --tob channel 18 output axi bus --------------------------------------
4169  tob_poll_chan_18 => tob_poll_chan_18,
4170  tob_m_tvalid_18 => tob_m_tvalid_18,
4171  tob_m_tlast_18 => tob_m_tlast_18,
4172  tob_m_tready_18 => tob_m_tready_18,
4173  tob_m_tdata_18 => tob_m_tdata_18,
4174  tob_header_marker_18 => tob_header_marker_18,
4175  tob_tail_marker_18 => tob_tail_marker_18,
4176  hdr_crc_tag_18 => hdr_crc_tag_18,
4177 
4178  --calo channel 18 output axi bus --------------------------------------
4179  calo_poll_chan_18 => calo_poll_chan_18,
4180  calo_m_tvalid_18 => calo_m_tvalid_18,
4181  calo_m_fifo_tlast_18 => calo_m_tlast_18,
4182  calo_m_axis_tready_18 => calo_m_axis_tready_18, --in from bulk processor
4183  calo_s_axis_tready_18 => open,
4184  calo_m_axis_tdata_18 => calo_m_tdata_18,
4185  calo_header_marker_18 => calo_header_marker_18,
4186  calo_tail_marker_18 => calo_tail_marker_18,
4187 
4188 --ufc message bus -----
4189  s_axi_ufc_rx_tdata_18 => s_axi_ufc_rx_tdata_18,
4190  s_axi_ufc_rx_tvalid_18 => s_axi_ufc_rx_tvalid_18,
4191  s_axi_ufc_rx_tlast_18 => s_axi_ufc_rx_tlast_18,
4192 
4193 
4194  --aurora channel 19 input bus
4195  aurora_user_clk_19 => aurora_user_clock_19,
4196  aurora_chan_stat_19 => aurora_chan_stat_19,
4197  aurora_chan_control_19 => aurora_chan_control_19_i,
4198  s_axis_tvalid_19 => s_axis_tvalid_19,
4199  s_axis_tlast_19 => s_axis_tlast_19,
4200  tob_s_tready_19 => open,
4201  s_axis_tdata_19 => bp_data_19,
4202 
4203 
4204 
4205 --tob channel 19 output axi bus --------------------------------------
4206  tob_poll_chan_19 => tob_poll_chan_19,
4207  tob_m_tvalid_19 => tob_m_tvalid_19,
4208  tob_m_tlast_19 => tob_m_tlast_19,
4209  tob_m_tready_19 => tob_m_tready_19,
4210  tob_m_tdata_19 => tob_m_tdata_19,
4211  tob_header_marker_19 => tob_header_marker_19,
4212  tob_tail_marker_19 => tob_tail_marker_19,
4213  hdr_crc_tag_19 => hdr_crc_tag_19,
4214 
4215  --calo channel 19 output axi bus --------------------------------------
4216  calo_poll_chan_19 => calo_poll_chan_19,
4217  calo_m_tvalid_19 => calo_m_tvalid_19,
4218  calo_m_fifo_tlast_19 => calo_m_tlast_19,
4219  calo_m_axis_tready_19 => calo_m_axis_tready_19, --in from bulk processor
4220  calo_s_axis_tready_19 => open,
4221  calo_m_axis_tdata_19 => calo_m_tdata_19,
4222  calo_header_marker_19 => calo_header_marker_19,
4223  calo_tail_marker_19 => calo_tail_marker_19,
4224 
4225 --ufc message bus -----
4226  s_axi_ufc_rx_tdata_19 => s_axi_ufc_rx_tdata_19,
4227  s_axi_ufc_rx_tvalid_19 => s_axi_ufc_rx_tvalid_19,
4228  s_axi_ufc_rx_tlast_19 => s_axi_ufc_rx_tlast_19,
4229 
4230 
4231  --aurora channel 20 input bus
4232  aurora_user_clk_20 => aurora_user_clock_20,
4233  aurora_chan_stat_20 => aurora_chan_stat_20,
4234  aurora_chan_control_20 => aurora_chan_control_20_i,
4235  s_axis_tvalid_20 => s_axis_tvalid_20,
4236  s_axis_tlast_20 => s_axis_tlast_20,
4237  tob_s_tready_20 => open,
4238  s_axis_tdata_20 => bp_data_20,
4239 
4240 
4241 --tob channel 20 output axi bus --------------------------------------
4242  tob_poll_chan_20 => tob_poll_chan_20,
4243  tob_m_tvalid_20 => tob_m_tvalid_20,
4244  tob_m_tlast_20 => tob_m_tlast_20,
4245  tob_m_tready_20 => tob_m_tready_20,
4246  tob_m_tdata_20 => tob_m_tdata_20,
4247  tob_header_marker_20 => tob_header_marker_20,
4248  tob_tail_marker_20 => tob_tail_marker_20,
4249  hdr_crc_tag_20 => hdr_crc_tag_20,
4250 
4251  --calo channel 15 output axi bus --------------------------------------
4252  calo_poll_chan_20 => calo_poll_chan_20,
4253  calo_m_tvalid_20 => calo_m_tvalid_20,
4254  calo_m_fifo_tlast_20 => calo_m_tlast_20,
4255  calo_m_axis_tready_20 => calo_m_axis_tready_20, --in from bulk processor
4256  calo_s_axis_tready_20 => open,
4257  calo_m_axis_tdata_20 => calo_m_tdata_20,
4258  calo_header_marker_20 => calo_header_marker_20,
4259  calo_tail_marker_20 => calo_tail_marker_20,
4260 
4261 --ufc message bus -----
4262  s_axi_ufc_rx_tdata_20 => s_axi_ufc_rx_tdata_20,
4263  s_axi_ufc_rx_tvalid_20 => s_axi_ufc_rx_tvalid_20,
4264  s_axi_ufc_rx_tlast_20 => s_axi_ufc_rx_tlast_20,
4265 
4266 
4267 
4268  --aurora channel 21 input bus
4269  aurora_user_clk_21 => aurora_user_clock_21,
4270  aurora_chan_stat_21 => aurora_chan_stat_21,
4271  aurora_chan_control_21 => aurora_chan_control_21_i,
4272  s_axis_tvalid_21 => s_axis_tvalid_21,
4273  s_axis_tlast_21 => s_axis_tlast_21,
4274  tob_s_tready_21 => open,
4275  s_axis_tdata_21 => bp_data_21,
4276 
4277 --tob channel 21 output axi bus --------------------------------------
4278  tob_poll_chan_21 => tob_poll_chan_21,
4279  tob_m_tvalid_21 => tob_m_tvalid_21,
4280  tob_m_tlast_21 => tob_m_tlast_21,
4281  tob_m_tready_21 => tob_m_tready_21,
4282  tob_m_tdata_21 => tob_m_tdata_21,
4283  tob_header_marker_21 => tob_header_marker_21,
4284  tob_tail_marker_21 => tob_tail_marker_21,
4285  hdr_crc_tag_21 => hdr_crc_tag_21,
4286 
4287  --calo channel 21 output axi bus --------------------------------------
4288  calo_poll_chan_21 => calo_poll_chan_21,
4289  calo_m_tvalid_21 => calo_m_tvalid_21,
4290  calo_m_fifo_tlast_21 => calo_m_tlast_21,
4291  calo_m_axis_tready_21 => calo_m_axis_tready_21, --in from bulk processor
4292  calo_s_axis_tready_21 => open,
4293  calo_m_axis_tdata_21 => calo_m_tdata_21,
4294  calo_header_marker_21 => calo_header_marker_21,
4295  calo_tail_marker_21 => calo_tail_marker_21,
4296 
4297 --ufc message bus -----
4298  s_axi_ufc_rx_tdata_21 => s_axi_ufc_rx_tdata_21,
4299  s_axi_ufc_rx_tvalid_21 => s_axi_ufc_rx_tvalid_21,
4300  s_axi_ufc_rx_tlast_21 => s_axi_ufc_rx_tlast_21,
4301 
4302  --aurora channel 22 input bus
4303  aurora_user_clk_22 => aurora_user_clock_22,
4304  aurora_chan_stat_22 => aurora_chan_stat_22,
4305  aurora_chan_control_22 => aurora_chan_control_22_i,
4306  s_axis_tvalid_22 => s_axis_tvalid_22,
4307  s_axis_tlast_22 => s_axis_tlast_22,
4308  tob_s_tready_22 => open,
4309  s_axis_tdata_22 => bp_data_22,
4310 
4311 
4312 
4313 --tob channel 22 output axi bus --------------------------------------
4314  tob_poll_chan_22 => tob_poll_chan_22,
4315  tob_m_tvalid_22 => tob_m_tvalid_22,
4316  tob_m_tlast_22 => tob_m_tlast_22,
4317  tob_m_tready_22 => tob_m_tready_22,
4318  tob_m_tdata_22 => tob_m_tdata_22,
4319  tob_header_marker_22 => tob_header_marker_22,
4320  tob_tail_marker_22 => tob_tail_marker_22,
4321  hdr_crc_tag_22 => hdr_crc_tag_22,
4322 
4323  --calo channel 15 output axi bus --------------------------------------
4324  calo_poll_chan_22 => calo_poll_chan_22,
4325  calo_m_tvalid_22 => calo_m_tvalid_22,
4326  calo_m_fifo_tlast_22 => calo_m_tlast_22,
4327  calo_m_axis_tready_22 => calo_m_axis_tready_22, --in from bulk processor
4328  calo_s_axis_tready_22 => open,
4329  calo_m_axis_tdata_22 => calo_m_tdata_22,
4330  calo_header_marker_22 => calo_header_marker_22,
4331  calo_tail_marker_22 => calo_tail_marker_22,
4332 
4333 --ufc message bus -----
4334  s_axi_ufc_rx_tdata_22 => s_axi_ufc_rx_tdata_22,
4335  s_axi_ufc_rx_tvalid_22 => s_axi_ufc_rx_tvalid_22,
4336  s_axi_ufc_rx_tlast_22 => s_axi_ufc_rx_tlast_22,
4337 
4338 
4339  --aurora channel 23 input bus
4340  aurora_user_clk_23 => aurora_user_clock_23,
4341  aurora_chan_stat_23 => aurora_chan_stat_23,
4342  aurora_chan_control_23 => aurora_chan_control_23_i,
4343  s_axis_tvalid_23 => s_axis_tvalid_23,
4344  s_axis_tlast_23 => s_axis_tlast_23,
4345  tob_s_tready_23 => open,
4346  s_axis_tdata_23 => bp_data_23,
4347 
4348 --tob channel 23 output axi bus --------------------------------------
4349  tob_poll_chan_23 => tob_poll_chan_23,
4350  tob_m_tvalid_23 => tob_m_tvalid_23,
4351  tob_m_tlast_23 => tob_m_tlast_23,
4352  tob_m_tready_23 => tob_m_tready_23,
4353  tob_m_tdata_23 => tob_m_tdata_23,
4354  tob_header_marker_23 => tob_header_marker_23,
4355  tob_tail_marker_23 => tob_tail_marker_23,
4356  hdr_crc_tag_23 => hdr_crc_tag_23,
4357 
4358  --calo channel 15 output axi bus --------------------------------------
4359  calo_poll_chan_23 => calo_poll_chan_23,
4360  calo_m_tvalid_23 => calo_m_tvalid_23,
4361  calo_m_fifo_tlast_23 => calo_m_tlast_23,
4362  calo_m_axis_tready_23 => calo_m_axis_tready_23, --in from bulk processor
4363  calo_s_axis_tready_23 => open,
4364  calo_m_axis_tdata_23 => calo_m_tdata_23,
4365  calo_header_marker_23 => calo_header_marker_23,
4366  calo_tail_marker_23 => calo_tail_marker_23,
4367 
4368 --ufc message bus -----
4369  s_axi_ufc_rx_tdata_23 => s_axi_ufc_rx_tdata_23,
4370  s_axi_ufc_rx_tvalid_23 => s_axi_ufc_rx_tvalid_23,
4371  s_axi_ufc_rx_tlast_23 => s_axi_ufc_rx_tlast_23
4372 
4373 
4374 );
4375 
4376 
4377 ----------------------------------------------------------------------
4378 --Muxes that choose between VIO control and normal control
4379 
4380 --ttc_ignore_i <= ttc_ignore or ttc_ignore_vio;
4381 
4382 with debug_ctrl_vio select
4383  ttc_ignore_i <= ttc_ignore when '0',
4384  ttc_ignore_vio when '1',
4385  '0' when others;
4386 
4387 with debug_ctrl_vio select
4388  channel_enable <= channel_enable_reg when '0',
4389  channel_enable_vio when '1',
4390  (others => '0') when others;
4391 
4392 with debug_ctrl_vio select
4393  first_chan <= first_chan_reg when '0',
4394  first_chan_vio when '1',
4395  (others => '0') when others;
4396 
4397 with debug_ctrl_vio select
4398  last_chan <= last_chan_reg when '0',
4399  last_chan_vio when '1',
4400  (others => '1') when others;
4401 
4402 --------------------------------------------------------
4403 
4404 
4405 tob_processor_0 : tob_processor
4406  generic map (
4407  CRC20_G_Poly => CRC20_G_Poly,
4408  sim => sim,
4409  jfex => jfex
4410  )
4411  port map (
4412  ipb_clk => ipb_clk,
4413  ipb_rst => ipb_rst,
4414  ipb_in => ipbw(N_SLV_TOBPROC_0),
4415  ipb_out => ipbr(N_SLV_TOBPROC_0),
4416 
4417  geo_location => geo_location,
4418  rod_slot => rod_slot,
4419  event_sel => event_sel,
4420 
4421  full_mode_ctrl => full_mode_ctrl_tob_0,
4422  FM_L1id_stat => fm_L1id_stat_tob_0,
4423  full_mode_stat => full_mode_stat_tob_0,
4424  stage_fifo_level => stage_fifo_level_tob_0,
4425  stage_fifo_busy => stage_fifo_busy_tob_0,
4426  stage_fifo_xoff => stage_fifo_xoff_tob_0,
4427  stage_fifo_full => stage_fifo_full_tob_0,
4428 
4429 -- flx_backpressure => flx_backpressure_i(tob_0_flx_bp_link),
4430  flx_backpressure => flx_backpressure_i,
4431  flx_backpressure_tob => flx_backpressure_tob_0,
4432  pp_clock => pp_clock,
4433  rt_clk => rt_clk,
4434 
4435  -- reset => reset,
4436  system_reset => reset,
4437  proc_reset => backplane_control_i(5),
4438  wdog_fifo_reset => wdog_fifo_reset,
4439  first_chan => first_chan(4 downto 0),
4440  last_chan => last_chan(4 downto 0),
4441  TTC_ignore => ttc_ignore_i,
4442  master_header => master_header, --synchronous to pp_clk
4443  header_fifo_valid => header_fifo_valid,
4444  header_read_en => header_read_en,
4445  header_sequence => header_sequence,
4446  header_type => header_type,
4447  timeout_err_out => timeout_err,
4448 --- output queue(s)
4449 
4450  m_tvalid => m_tvalid_0,
4451  m_tlast => m_tlast_0,
4452  m_tdata => m_tdata_0,
4453  m_header_marker => m_header_marker_0,
4454  m_tail_marker => m_tail_marker_0,
4455  m_tready => m_tready_0, --in from felix interface
4456  ttc_rollover => open,
4457  l1id_mis_stretch => l1id_mis_stretch,
4458 --channel 0 -------------------
4459  s_tdata_0 => tob_m_tdata_0,
4460  s_tvalid_0 => tob_m_tvalid_0,
4461  s_tlast_0 => tob_m_tlast_0,
4462  s_tready_0 => tob_m_tready_0, --out to fifo layer
4463  s_header_mark_0 => tob_header_marker_0,
4464  s_trailer_mark_0 => tob_tail_marker_0,
4465  s_hdr_crc_tag_0 => hdr_crc_tag_0,
4466  s_poll_chan_0 => tob_poll_chan_0,
4467  s_chan_enable_0 => channel_enable(0),
4468 -- s_chan_enable_0 => chan_enable(0),
4469 
4470 --channel 1 -------------------
4471  s_tdata_1 => tob_m_tdata_1,
4472  s_tvalid_1 => tob_m_tvalid_1,
4473  s_tlast_1 => tob_m_tlast_1,
4474  s_tready_1 => tob_m_tready_1, --out to fifo layer
4475  s_header_mark_1 => tob_header_marker_1,
4476  s_trailer_mark_1 => tob_tail_marker_1,
4477  s_hdr_crc_tag_1 => hdr_crc_tag_1,
4478  s_poll_chan_1 => tob_poll_chan_1,
4479  s_chan_enable_1 => channel_enable(1),
4480 -- s_chan_enable_1 => chan_enable(1),
4481 
4482 --channel 2 -------------------
4483  s_tdata_2 => tob_m_tdata_2,
4484  s_tvalid_2 => tob_m_tvalid_2,
4485  s_tlast_2 => tob_m_tlast_2,
4486  s_tready_2 => tob_m_tready_2, --out to fifo layer
4487  s_header_mark_2 => tob_header_marker_2,
4488  s_trailer_mark_2 => tob_tail_marker_2,
4489  s_hdr_crc_tag_2 => hdr_crc_tag_2,
4490  s_poll_chan_2 => tob_poll_chan_2,
4491  s_chan_enable_2 => channel_enable(2),
4492 -- s_chan_enable_2 => chan_enable(2),
4493 
4494 --channel 3 -------------------
4495  s_tdata_3 => tob_m_tdata_3,
4496  s_tvalid_3 => tob_m_tvalid_3,
4497  s_tlast_3 => tob_m_tlast_3,
4498  s_tready_3 => tob_m_tready_3, --out to fifo layer
4499  s_header_mark_3 => tob_header_marker_3,
4500  s_trailer_mark_3 => tob_tail_marker_3,
4501  s_hdr_crc_tag_3 => hdr_crc_tag_3,
4502  s_poll_chan_3 => tob_poll_chan_3,
4503 -- s_chan_enable_3 => chan_enable(3),
4504  s_chan_enable_3 => channel_enable(3),
4505 
4506 
4507 
4508 --channel 4 -------------------
4509  s_tdata_4 => tob_m_tdata_4,
4510  s_tvalid_4 => tob_m_tvalid_4,
4511  s_tlast_4 => tob_m_tlast_4,
4512  s_tready_4 => tob_m_tready_4, --out to fifo layer
4513  s_header_mark_4 => tob_header_marker_4,
4514  s_trailer_mark_4 => tob_tail_marker_4,
4515  s_hdr_crc_tag_4 => hdr_crc_tag_4,
4516  s_poll_chan_4 => tob_poll_chan_4,
4517 -- s_chan_enable_4 => chan_enable(4),
4518  s_chan_enable_4 => channel_enable(4),
4519 
4520 
4521 --channel 5 -------------------
4522  s_tdata_5 => tob_m_tdata_5,
4523  s_tvalid_5 => tob_m_tvalid_5,
4524  s_tlast_5 => tob_m_tlast_5,
4525  s_tready_5 => tob_m_tready_5, --out to fifo layer
4526  s_header_mark_5 => tob_header_marker_5,
4527  s_trailer_mark_5 => tob_tail_marker_5,
4528  s_hdr_crc_tag_5 => hdr_crc_tag_5,
4529  s_poll_chan_5 => tob_poll_chan_5,
4530 -- s_chan_enable_5 => chan_enable(5),
4531  s_chan_enable_5 => channel_enable(5),
4532 
4533 --channel 6 -------------------
4534  s_tdata_6 => tob_m_tdata_6,
4535  s_tvalid_6 => tob_m_tvalid_6,
4536  s_tlast_6 => tob_m_tlast_6,
4537  s_tready_6 => tob_m_tready_6, --out to fifo layer
4538  s_header_mark_6 => tob_header_marker_6,
4539  s_trailer_mark_6 => tob_tail_marker_6,
4540  s_hdr_crc_tag_6 => hdr_crc_tag_6,
4541  s_poll_chan_6 => tob_poll_chan_6,
4542 -- s_chan_enable_6 => chan_enable(6),
4543  s_chan_enable_6 => channel_enable(6),
4544 
4545 
4546 --channel 7 -------------------
4547  s_tdata_7 => tob_m_tdata_7,
4548  s_tvalid_7 => tob_m_tvalid_7,
4549  s_tlast_7 => tob_m_tlast_7,
4550  s_tready_7 => tob_m_tready_7, --out to fifo layer
4551  s_header_mark_7 => tob_header_marker_7,
4552  s_trailer_mark_7 => tob_tail_marker_7,
4553  s_hdr_crc_tag_7 => hdr_crc_tag_7,
4554  s_poll_chan_7 => tob_poll_chan_7,
4555 -- s_chan_enable_7 => chan_enable(7),
4556  s_chan_enable_7 => channel_enable(7),
4557 
4558 
4559 --channel 8 -------------------
4560  s_tdata_8 => tob_m_tdata_8,
4561  s_tvalid_8 => tob_m_tvalid_8,
4562  s_tlast_8 => tob_m_tlast_8,
4563  s_tready_8 => tob_m_tready_8, --out to fifo layer
4564  s_header_mark_8 => tob_header_marker_8,
4565  s_trailer_mark_8 => tob_tail_marker_8,
4566  s_hdr_crc_tag_8 => hdr_crc_tag_8,
4567  s_poll_chan_8 => tob_poll_chan_8,
4568 -- s_chan_enable_8 => chan_enable(8),
4569  s_chan_enable_8 => channel_enable(8),
4570 
4571 
4572 --channel 9 -------------------
4573  s_tdata_9 => tob_m_tdata_9,
4574  s_tvalid_9 => tob_m_tvalid_9,
4575  s_tlast_9 => tob_m_tlast_9,
4576  s_tready_9 => tob_m_tready_9, --out to fifo layer
4577  s_header_mark_9 => tob_header_marker_9,
4578  s_trailer_mark_9 => tob_tail_marker_9,
4579  s_hdr_crc_tag_9 => hdr_crc_tag_9,
4580  s_poll_chan_9 => tob_poll_chan_9,
4581 -- s_chan_enable_9 => chan_enable(9),
4582  s_chan_enable_9 => channel_enable(9),
4583 
4584 
4585 --channel 10 -------------------
4586  s_tdata_10 => tob_m_tdata_10,
4587  s_tvalid_10 => tob_m_tvalid_10,
4588  s_tlast_10 => tob_m_tlast_10,
4589  s_tready_10 => tob_m_tready_10, --out to fifo layer
4590  s_header_mark_10 => tob_header_marker_10,
4591  s_trailer_mark_10 => tob_tail_marker_10,
4592  s_hdr_crc_tag_10 => hdr_crc_tag_10,
4593  s_poll_chan_10 => tob_poll_chan_10,
4594 -- s_chan_enable_10 => chan_enable(10),
4595  s_chan_enable_10 => channel_enable(10),
4596 
4597 
4598 --channel 11 -------------------
4599  s_tdata_11 => tob_m_tdata_11,
4600  s_tvalid_11 => tob_m_tvalid_11,
4601  s_tlast_11 => tob_m_tlast_11,
4602  s_tready_11 => tob_m_tready_11, --out to fifo layer
4603  s_header_mark_11 => tob_header_marker_11,
4604  s_trailer_mark_11 => tob_tail_marker_11,
4605  s_hdr_crc_tag_11 => hdr_crc_tag_11,
4606  s_poll_chan_11 => tob_poll_chan_11,
4607 -- s_chan_enable_11 => chan_enable(11),
4608  s_chan_enable_11 => channel_enable(11),
4609 
4610 
4611 --channel 12 -------------------
4612  s_tdata_12 => tob_m_tdata_12,
4613  s_tvalid_12 => tob_m_tvalid_12,
4614  s_tlast_12 => tob_m_tlast_12,
4615  s_tready_12 => tob_m_tready_12, --out to fifo layer
4616  s_header_mark_12 => tob_header_marker_12,
4617  s_trailer_mark_12 => tob_tail_marker_12,
4618  s_hdr_crc_tag_12 => hdr_crc_tag_12,
4619  s_poll_chan_12 => tob_poll_chan_12,
4620 -- s_chan_enable_12 => chan_enable(12),
4621  s_chan_enable_12 => channel_enable(12),
4622 
4623 
4624 
4625 --channel 13 -------------------
4626  s_tdata_13 => tob_m_tdata_13,
4627  s_tvalid_13 => tob_m_tvalid_13,
4628  s_tlast_13 => tob_m_tlast_13,
4629  s_tready_13 => tob_m_tready_13, --out to fifo layer
4630  s_header_mark_13 => tob_header_marker_13,
4631  s_trailer_mark_13 => tob_tail_marker_13,
4632  s_hdr_crc_tag_13 => hdr_crc_tag_13,
4633  s_poll_chan_13 => tob_poll_chan_13,
4634 -- s_chan_enable_13 => chan_enable(13),
4635  s_chan_enable_13 => channel_enable(13),
4636 
4637 
4638 --channel 14 -------------------
4639  s_tdata_14 => tob_m_tdata_14,
4640  s_tvalid_14 => tob_m_tvalid_14,
4641  s_tlast_14 => tob_m_tlast_14,
4642  s_tready_14 => tob_m_tready_14, --out to fifo layer
4643  s_header_mark_14 => tob_header_marker_14,
4644  s_trailer_mark_14 => tob_tail_marker_14,
4645  s_hdr_crc_tag_14 => hdr_crc_tag_14,
4646  s_poll_chan_14 => tob_poll_chan_14,
4647 -- s_chan_enable_14 => chan_enable(14),
4648  s_chan_enable_14 => channel_enable(14),
4649 
4650 
4651 --channel 15 -------------------
4652  s_tdata_15 => tob_m_tdata_15,
4653  s_tvalid_15 => tob_m_tvalid_15,
4654  s_tlast_15 => tob_m_tlast_15,
4655  s_tready_15 => tob_m_tready_15, --out to fifo layer
4656  s_header_mark_15 => tob_header_marker_15,
4657  s_trailer_mark_15 => tob_tail_marker_15,
4658  s_hdr_crc_tag_15 => hdr_crc_tag_15,
4659  s_poll_chan_15 => tob_poll_chan_15,
4660 -- s_chan_enable_15 => chan_enable(15),
4661  s_chan_enable_15 => channel_enable(15),
4662 
4663 
4664 --channel 16 -------------------
4665  s_tdata_16 => tob_m_tdata_16,
4666  s_tvalid_16 => tob_m_tvalid_16,
4667  s_tlast_16 => tob_m_tlast_16,
4668  s_tready_16 => tob_m_tready_16, --out to fifo layer
4669  s_header_mark_16 => tob_header_marker_16,
4670  s_trailer_mark_16 => tob_tail_marker_16,
4671  s_hdr_crc_tag_16 => hdr_crc_tag_16,
4672  s_poll_chan_16 => tob_poll_chan_16,
4673 -- s_chan_enable_16 => chan_enable(16),
4674  s_chan_enable_16 => channel_enable(16),
4675 
4676 
4677 --channel 17 -------------------
4678  s_tdata_17 => tob_m_tdata_17,
4679  s_tvalid_17 => tob_m_tvalid_17,
4680  s_tlast_17 => tob_m_tlast_17,
4681  s_tready_17 => tob_m_tready_17, --out to fifo layer
4682  s_header_mark_17 => tob_header_marker_17,
4683  s_trailer_mark_17 => tob_tail_marker_17,
4684  s_hdr_crc_tag_17 => hdr_crc_tag_17,
4685  s_poll_chan_17 => tob_poll_chan_17,
4686 -- s_chan_enable_17 => chan_enable(17),
4687  s_chan_enable_17 => channel_enable(17),
4688 
4689 --channel 18 -------------------
4690  s_tdata_18 => tob_m_tdata_18,
4691  s_tvalid_18 => tob_m_tvalid_18,
4692  s_tlast_18 => tob_m_tlast_18,
4693  s_tready_18 => tob_m_tready_18, --out to fifo layer
4694  s_header_mark_18 => tob_header_marker_18,
4695  s_trailer_mark_18 => tob_tail_marker_18,
4696  s_hdr_crc_tag_18 => hdr_crc_tag_18,
4697  s_poll_chan_18 => tob_poll_chan_18,
4698 -- s_chan_enable_18 => chan_enable(18),
4699  s_chan_enable_18 => channel_enable(18),
4700 
4701 --channel 19 -------------------
4702  s_tdata_19 => tob_m_tdata_19,
4703  s_tvalid_19 => tob_m_tvalid_19,
4704  s_tlast_19 => tob_m_tlast_19,
4705  s_tready_19 => tob_m_tready_19, --out to fifo layer
4706  s_header_mark_19 => tob_header_marker_19,
4707  s_trailer_mark_19 => tob_tail_marker_19,
4708  s_hdr_crc_tag_19 => hdr_crc_tag_19,
4709  s_poll_chan_19 => tob_poll_chan_19,
4710 -- s_chan_enable_19 => chan_enable(19),
4711  s_chan_enable_19 => channel_enable(19),
4712 
4713 
4714 --channel 20 -------------------
4715  s_tdata_20 => tob_m_tdata_20,
4716  s_tvalid_20 => tob_m_tvalid_20,
4717  s_tlast_20 => tob_m_tlast_20,
4718  s_tready_20 => tob_m_tready_20, --out to fifo layer
4719  s_header_mark_20 => tob_header_marker_20,
4720  s_trailer_mark_20 => tob_tail_marker_20,
4721  s_hdr_crc_tag_20 => hdr_crc_tag_20,
4722  s_poll_chan_20 => tob_poll_chan_20,
4723 -- s_chan_enable_20 => chan_enable(20),
4724  s_chan_enable_20 => channel_enable(20),
4725 
4726 --channel 21 -------------------
4727  s_tdata_21 => tob_m_tdata_21,
4728  s_tvalid_21 => tob_m_tvalid_21,
4729  s_tlast_21 => tob_m_tlast_21,
4730  s_tready_21 => tob_m_tready_21, --out to fifo layer
4731  s_header_mark_21 => tob_header_marker_21,
4732  s_trailer_mark_21 => tob_tail_marker_21,
4733  s_hdr_crc_tag_21 => hdr_crc_tag_21,
4734  s_poll_chan_21 => tob_poll_chan_21,
4735 -- s_chan_enable_21 => chan_enable(21),
4736  s_chan_enable_21 => channel_enable(21),
4737 
4738 --channel 22 -------------------
4739  s_tdata_22 => tob_m_tdata_22,
4740  s_tvalid_22 => tob_m_tvalid_22,
4741  s_tlast_22 => tob_m_tlast_22,
4742  s_tready_22 => tob_m_tready_22, --out to fifo layer
4743  s_header_mark_22 => tob_header_marker_22,
4744  s_trailer_mark_22 => tob_tail_marker_22,
4745  s_hdr_crc_tag_22 => hdr_crc_tag_22,
4746  s_poll_chan_22 => tob_poll_chan_22,
4747 -- s_chan_enable_22 => chan_enable(22),
4748  s_chan_enable_22 => channel_enable(22),
4749 
4750 
4751 --channel 23 -------------------
4752  s_tdata_23 => tob_m_tdata_23,
4753  s_tvalid_23 => tob_m_tvalid_23,
4754  s_tlast_23 => tob_m_tlast_23,
4755  s_tready_23 => tob_m_tready_23, --out to fifo layer
4756  s_header_mark_23 => tob_header_marker_23,
4757  s_trailer_mark_23 => tob_tail_marker_23,
4758  s_hdr_crc_tag_23 => hdr_crc_tag_23,
4759  s_poll_chan_23 => tob_poll_chan_23,
4760 -- s_chan_enable_23 => chan_enable(23),
4761  s_chan_enable_23 => channel_enable(23)
4762 
4763  );
4764 
4765 
4766 
4767 --
4768 --
4769 
4770 
4771  ttc_input : ttc_info
4772  Port map(
4773  reset => reset, --synchronous to lhc_clk
4774  pp_clk => pp_clock,
4775  cttc_user_clk => cttc_user_clk,
4776  seq => ttc_seq,
4777  ttc_reg => ttc_reg,
4778  event_sel => event_sel,
4779  rod_slot => rod_slot,
4780 -- ttc_valid => , --derived from seq statemachine - it would be possible toprovide a strobe for each word
4781  ttc_word_0 => ttc_word_0, --synchronous to cttc_user_clk
4782  ttc_word_1 => ttc_word_1, --synchronous to cttc_user_clk
4783  ttc_word_2 => ttc_word_2, --synchronous to cttc_user_clk
4784  ttc_word_3 => ttc_word_3, --synchronous to cttc_user_clk
4785 
4786  L1A => L1A_i,
4787  L1A_delay_out => L1A_delay_out,
4788  l1id_mis_stretch => l1id_mis_stretch,
4789  L1ID_error => L1ID_error,
4790  CTTC_CRC_error => CTTC_CRC_error,
4791  TTC_CRC_ignore => TTC_CRC_ignore,
4792  TTC_fifo_rst => TTC_fifo_rst,
4793  header_read_en => header_read_en,
4794  header_fifo_valid => header_fifo_valid,
4795  header_fifo_full => open,
4796  header_fifo_empty => open,
4797  header_fifo_level => ttc_fifo_level(8 downto 0),
4798  master_header => master_header,
4799 
4800  bulk_L1ID_error => bulk_L1ID_error,
4801  bulk_CTTC_CRC_error => bulk_CTTC_CRC_error,
4802  bulk_header_read_en => bulk_header_read_en,
4803  bulk_header_fifo_valid => bulk_header_fifo_valid,
4804  bulk_header_fifo_full => open,
4805  bulk_header_fifo_empty => open,
4806  bulk_header_fifo_level => open,
4807  bulk_master_header => bulk_master_header,
4808  event_count => event_count,
4809  orbit_count => orbit_count,
4810  event_count_reset => event_count_reset,
4811  orbit_count_reset => orbit_count_reset,
4812  flx_backpressure => flx_backpressure_i,
4813  bcn_adjustment => bcn_adjustment,
4814 
4815  l1id_continuity_control => l1id_continuity_control,
4816  l1id_continuity_status => l1id_continuity_status,
4817  l1id_local_miss => l1id_local_miss,
4818  l1id_ttc_miss => l1id_ttc_miss,
4819  l1id_error_count => l1id_error_count,
4820  timeout_threshold => timeout_threshold,
4821  repeat_counter => repeat_counter
4822 
4823  );
4824 
4825 
4826 L1A <= L1A_i;
4827 
4828 
4829 
4830 
4831  chan_in_gen : dummy_chan_in
4832  Port map (
4833  current_chan => current_chan,
4834  chan_out => dum_chin,
4835 -- num_chan => x"b",
4836  num_chan => last_chan(4 downto 0),
4837  clock => pp_clock,
4838  reset => reset
4839  );
4840 
4841 
4842 
4843 
4844 
4845 --input_mux_ila : ppmux_ila
4846 --PORT MAP (
4847 -- clk => pp_clock,
4848 --
4849 -- probe0 => current_chan,
4850 -- probe1(0) => ev_chan_enable,
4851 -- probe2(0) => ev_in_header_mark,
4852 -- probe3 => ev_in_tdata,
4853 -- probe4(0) => ev_in_tlast,
4854 -- probe5(0) => ev_in_trailer_mark,
4855 -- probe6(0) => ev_in_tvalid,
4856 -- probe7(0) => m_poll_chan_0,
4857 -- probe8(0) => '0',
4858 -- probe9(0) => '0'
4859 --);
4860 
4861 
4862 bulk_0 : bulk_processor
4863  generic map (
4864  sim => sim
4865  )
4866  Port map (
4867  ipb_clk => ipb_clk,
4868  ipb_rst => ipb_rst,
4869  ipb_in => ipbw(N_SLV_BULKPROC_0),
4870  ipb_out => ipbr(N_SLV_BULKPROC_0),
4871 
4872 
4873  full_mode_ctrl => full_mode_ctrl_bulk_0,
4874  full_mode_stat => full_mode_stat_bulk_0,
4875  FM_L1id_stat => FM_L1id_stat_bulk_0,
4876  stage_fifo_level => stage_fifo_level_bulk_0,
4877  stage_fifo_busy => stage_fifo_busy_bulk_0,
4878  stage_fifo_xoff => stage_fifo_xoff_bulk_0,
4879  stage_fifo_full => stage_fifo_full_bulk_0,
4880 
4881 
4882  pp_clock => pp_clock,
4883  rt_clk => rt_clk,
4884  system_reset => reset,
4885  proc_reset => backplane_control_i(5),
4886  geo_location => geo_location,
4887 
4888  --signals added for the Detector Specific Event Type
4889  header_sequence => header_sequence,
4890  header_type => header_type,
4891  master_header => bulk_master_header,
4892  header_fifo_empty => bulk_header_fifo_empty,
4893  L1ID_error => bulk_L1ID_error,
4894  CTTC_CRC_error => bulk_CTTC_CRC_error,
4895  header_read_en => header_read_en_0,
4896  header_fifo_valid => bulk_header_fifo_valid,
4897  header_fifo_full => bulk_header_fifo_full,
4898 
4899 
4900 -- det_spec_evnt_sel => x"0",
4901  det_spec_evnt_sel => det_spec_evnt_sel,
4902  proc_number => x"0",
4903 -- flx_backpressure => flx_backpressure_i(bulk_0_flx_bp_link),
4904  flx_backpressure => flx_backpressure_i,
4905  flx_backpressure_bulk => flx_backpressure_bulk_0,
4906  --- output queue(s)
4907 
4908  m_tvalid => bulk_m_tvalid_0,
4909  m_tlast => bulk_m_tlast_0,
4910  m_tdata => bulk_m_tdata_0,
4911  m_header_marker => bulk_m_header_marker_0,
4912  m_tail_marker => bulk_m_tail_marker_0,
4913 -- m_tready => bulk_m_tready_0,
4914  m_tready => '1',
4915  s_tdata_0 => calo_m_tdata_0,
4916  s_tvalid_0 => calo_m_tvalid_0,
4917  s_tlast_0 => calo_m_tlast_0,
4918  s_tready_0 => calo_m_axis_tready_0, --back out to input fifos
4919  s_header_mark_0 => calo_header_marker_0,
4920  s_trailer_mark_0 => calo_tail_marker_0,
4921  s_poll_chan_0 => calo_poll_chan_0,
4922  s_chan_enable_0 => channel_enable(0),
4923 
4924  s_tdata_1 => calo_m_tdata_1,
4925  s_tvalid_1 => calo_m_tvalid_1,
4926  s_tlast_1 => calo_m_tlast_1,
4927  s_tready_1 => calo_m_axis_tready_1, --back out to input fifos
4928  s_header_mark_1 => calo_header_marker_1,
4929  s_trailer_mark_1 =>calo_tail_marker_1,
4930  s_poll_chan_1 => calo_poll_chan_1,
4931  s_chan_enable_1 => channel_enable(1),
4932 
4933  s_tdata_2 => calo_m_tdata_2,
4934  s_tvalid_2 => calo_m_tvalid_2,
4935  s_tlast_2 => calo_m_tlast_2,
4936  s_tready_2 => calo_m_axis_tready_2, --back out to input fifos
4937  s_header_mark_2 => calo_header_marker_2,
4938  s_trailer_mark_2 => calo_tail_marker_2,
4939  s_poll_chan_2 => calo_poll_chan_2,
4940  s_chan_enable_2 => channel_enable(2),
4941 
4942  s_tdata_3 => calo_m_tdata_3,
4943  s_tvalid_3 => calo_m_tvalid_3,
4944  s_tlast_3 => calo_m_tlast_3,
4945  s_tready_3 => calo_m_axis_tready_3, --back out to input fifos
4946  s_header_mark_3 => calo_header_marker_3,
4947  s_trailer_mark_3 => calo_tail_marker_3,
4948  s_poll_chan_3 => calo_poll_chan_3,
4949  s_chan_enable_3 => channel_enable(3),
4950 
4951  s_tdata_4 => calo_m_tdata_12,
4952  s_tvalid_4 => calo_m_tvalid_12,
4953  s_tlast_4 => calo_m_tlast_12,
4954  s_tready_4 => calo_m_axis_tready_12, --back out to input fifos
4955  s_header_mark_4 => calo_header_marker_12,
4956  s_trailer_mark_4 => calo_tail_marker_12,
4957  s_poll_chan_4 => calo_poll_chan_12,
4958  s_chan_enable_4 => channel_enable(12),
4959 
4960 
4961  s_tdata_5 => calo_m_tdata_13,
4962  s_tvalid_5 => calo_m_tvalid_13,
4963  s_tlast_5 => calo_m_tlast_13,
4964  s_tready_5 => calo_m_axis_tready_13, --back out to input fifos
4965  s_header_mark_5 => calo_header_marker_13,
4966  s_trailer_mark_5 => calo_tail_marker_13,
4967  s_poll_chan_5 => calo_poll_chan_13,
4968  s_chan_enable_5 => channel_enable(13),
4969 
4970 
4971 
4972 
4973 
4974  s_tdata_6 => calo_m_tdata_14,
4975  s_tvalid_6 => calo_m_tvalid_14,
4976  s_tlast_6 => calo_m_tlast_14,
4977  s_tready_6 => calo_m_axis_tready_14, --back out to input fifos
4978  s_header_mark_6 => calo_header_marker_14,
4979  s_trailer_mark_6 => calo_tail_marker_14,
4980  s_poll_chan_6 => calo_poll_chan_14,
4981  s_chan_enable_6 => channel_enable(14),
4982 
4983 
4984 
4985 
4986 
4987  s_tdata_7 => calo_m_tdata_15,
4988  s_tvalid_7 => calo_m_tvalid_15,
4989  s_tlast_7 => calo_m_tlast_15,
4990  s_tready_7 => calo_m_axis_tready_15, --back out to input fifos
4991  s_header_mark_7 => calo_header_marker_15,
4992  s_trailer_mark_7 => calo_tail_marker_15,
4993  s_poll_chan_7 => calo_poll_chan_15,
4994  s_chan_enable_7 => channel_enable(15),
4995 
4996 
4997 -- first_chan => first_chan(4 downto 0),
4998 -- last_chan => last_chan(4 downto 0),
4999  first_chan => "00000",
5000  last_chan => bulk_last_chan,
5001  vio_chan_enable => (others => '0')
5002 
5003  );
5004 
5005 
5006 bulk_1 : bulk_processor
5007  generic map (
5008  sim => sim
5009  )
5010  Port map (
5011  ipb_clk => ipb_clk,
5012  ipb_rst => ipb_rst,
5013  ipb_in => ipbw(N_SLV_BULKPROC_1),
5014  ipb_out => ipbr(N_SLV_BULKPROC_1),
5015 
5016  full_mode_ctrl => full_mode_ctrl_bulk_1,
5017  full_mode_stat => full_mode_stat_bulk_1,
5018  FM_L1id_stat => FM_L1id_stat_bulk_1,
5019  stage_fifo_level => stage_fifo_level_bulk_1,
5020  stage_fifo_busy => stage_fifo_busy_bulk_1,
5021  stage_fifo_xoff => stage_fifo_xoff_bulk_1,
5022  stage_fifo_full => stage_fifo_full_bulk_1,
5023 
5024  pp_clock => pp_clock,
5025  rt_clk => rt_clk,
5026  system_reset => reset,
5027  proc_reset => backplane_control_i(5),
5028  geo_location => geo_location,
5029 
5030  --signals added for the Detector Specific Event Type
5031  header_sequence => header_sequence,
5032  header_type => header_type,
5033  master_header => bulk_master_header,
5034  header_fifo_empty => bulk_header_fifo_empty,
5035  L1ID_error => bulk_L1ID_error,
5036  CTTC_CRC_error => bulk_CTTC_CRC_error,
5037  header_read_en => header_read_en_1,
5038  header_fifo_valid => bulk_header_fifo_valid,
5039  header_fifo_full => bulk_header_fifo_full,
5040  -- det_spec_evnt_sel => x"0",
5041  det_spec_evnt_sel => det_spec_evnt_sel,
5042  proc_number => x"1",
5043  -- flx_backpressure => flx_backpressure_i(bulk_1_flx_bp_link),
5044  flx_backpressure => flx_backpressure_i,
5045  flx_backpressure_bulk => flx_backpressure_bulk_1,
5046  --- output queue(s)
5047 
5048  m_tvalid => bulk_m_tvalid_1,
5049  m_tlast => bulk_m_tlast_1,
5050  m_tdata => bulk_m_tdata_1,
5051  m_header_marker => bulk_m_header_marker_1,
5052  m_tail_marker => bulk_m_tail_marker_1,
5053 -- m_tready => bulk_m_tready_1,
5054  m_tready => '1',
5055 
5056  s_tdata_0 => calo_m_tdata_4,
5057  s_tvalid_0 => calo_m_tvalid_4,
5058  s_tlast_0 => calo_m_tlast_4,
5059  s_tready_0 => calo_m_axis_tready_4, --back out to input fifos
5060  s_header_mark_0 => calo_header_marker_4,
5061  s_trailer_mark_0 => calo_tail_marker_4,
5062  s_poll_chan_0 => calo_poll_chan_4,
5063  s_chan_enable_0 => channel_enable(4),
5064 
5065  s_tdata_1 => calo_m_tdata_5,
5066  s_tvalid_1 => calo_m_tvalid_5,
5067  s_tlast_1 => calo_m_tlast_5,
5068  s_tready_1 => calo_m_axis_tready_5, --back out to input fifos
5069  s_header_mark_1 => calo_header_marker_5,
5070  s_trailer_mark_1 =>calo_tail_marker_5,
5071  s_poll_chan_1 => calo_poll_chan_5,
5072  s_chan_enable_1 => channel_enable(5),
5073 
5074  s_tdata_2 => calo_m_tdata_6,
5075  s_tvalid_2 => calo_m_tvalid_6,
5076  s_tlast_2 => calo_m_tlast_6,
5077  s_tready_2 => calo_m_axis_tready_6, --back out to input fifos
5078  s_header_mark_2 => calo_header_marker_6,
5079  s_trailer_mark_2 => calo_tail_marker_6,
5080  s_poll_chan_2 => calo_poll_chan_6,
5081  s_chan_enable_2 => channel_enable(6),
5082 
5083  s_tdata_3 => calo_m_tdata_7,
5084  s_tvalid_3 => calo_m_tvalid_7,
5085  s_tlast_3 => calo_m_tlast_7,
5086  s_tready_3 => calo_m_axis_tready_7, --back out to input fifos
5087  s_header_mark_3 => calo_header_marker_7,
5088  s_trailer_mark_3 => calo_tail_marker_7,
5089  s_poll_chan_3 => calo_poll_chan_7,
5090  s_chan_enable_3 => channel_enable(7),
5091 
5092  s_tdata_4 => calo_m_tdata_16,
5093  s_tvalid_4 => calo_m_tvalid_16,
5094  s_tlast_4 => calo_m_tlast_16,
5095  s_tready_4 => calo_m_axis_tready_16, --back out to input fifos
5096  s_header_mark_4 => calo_header_marker_16,
5097  s_trailer_mark_4 => calo_tail_marker_16,
5098  s_poll_chan_4 => calo_poll_chan_16,
5099  s_chan_enable_4 => channel_enable(16),
5100 
5101  s_tdata_5 => calo_m_tdata_17,
5102  s_tvalid_5 => calo_m_tvalid_17,
5103  s_tlast_5 => calo_m_tlast_17,
5104  s_tready_5 => calo_m_axis_tready_17, --back out to input fifos
5105  s_header_mark_5 => calo_header_marker_17,
5106  s_trailer_mark_5 => calo_tail_marker_17,
5107  s_poll_chan_5 => calo_poll_chan_17,
5108  s_chan_enable_5 => channel_enable(17),
5109 
5110  s_tdata_6 => calo_m_tdata_18,
5111  s_tvalid_6 => calo_m_tvalid_18,
5112  s_tlast_6 => calo_m_tlast_18,
5113  s_tready_6 => calo_m_axis_tready_18, --back out to input fifos
5114  s_header_mark_6 => calo_header_marker_18,
5115  s_trailer_mark_6 => calo_tail_marker_18,
5116  s_poll_chan_6 => calo_poll_chan_18,
5117  s_chan_enable_6 => channel_enable(18),
5118 
5119  s_tdata_7 => calo_m_tdata_19,
5120  s_tvalid_7 => calo_m_tvalid_19,
5121  s_tlast_7 => calo_m_tlast_19,
5122  s_tready_7 => calo_m_axis_tready_19, --back out to input fifos
5123  s_header_mark_7 => calo_header_marker_19,
5124  s_trailer_mark_7 => calo_tail_marker_19,
5125  s_poll_chan_7 => calo_poll_chan_19,
5126  s_chan_enable_7 => channel_enable(19),
5127 
5128 
5129 -- first_chan => first_chan(4 downto 0),
5130 -- last_chan => last_chan(4 downto 0),
5131  first_chan => "00000",
5132  last_chan => bulk_last_chan,
5133  vio_chan_enable => (others => '0')
5134 
5135  );
5136 
5137 
5138 bulk_2 : bulk_processor
5139  generic map (
5140  sim => sim
5141  )
5142  Port map (
5143  ipb_clk => ipb_clk,
5144  ipb_rst => ipb_rst,
5145  ipb_in => ipbw(N_SLV_BULKPROC_2),
5146  ipb_out => ipbr(N_SLV_BULKPROC_2),
5147 
5148  full_mode_ctrl => full_mode_ctrl_bulk_2,
5149  full_mode_stat => full_mode_stat_bulk_2,
5150  FM_L1id_stat => FM_L1id_stat_bulk_2,
5151  stage_fifo_level => stage_fifo_level_bulk_2,
5152  stage_fifo_busy => stage_fifo_busy_bulk_2,
5153  stage_fifo_xoff => stage_fifo_xoff_bulk_2,
5154  stage_fifo_full => stage_fifo_full_bulk_2,
5155 
5156  pp_clock => pp_clock,
5157  rt_clk => rt_clk,
5158  system_reset => reset,
5159  proc_reset => backplane_control_i(5),
5160  geo_location => geo_location,
5161  --signals added for the Detector Specific Event Type
5162  header_sequence => header_sequence,
5163  header_type => header_type,
5164  master_header => bulk_master_header,
5165  header_fifo_empty => bulk_header_fifo_empty,
5166  L1ID_error => bulk_L1ID_error,
5167  CTTC_CRC_error => bulk_CTTC_CRC_error,
5168  header_read_en => header_read_en_2,
5169  header_fifo_valid => bulk_header_fifo_valid,
5170  header_fifo_full => bulk_header_fifo_full,
5171 -- det_spec_evnt_sel => x"0",
5172  det_spec_evnt_sel => det_spec_evnt_sel,
5173  proc_number => x"2",
5174 -- flx_backpressure => flx_backpressure_i(bulk_2_flx_bp_link),
5175  flx_backpressure => flx_backpressure_i,
5176  flx_backpressure_bulk => flx_backpressure_bulk_2,
5177  --- output queue(s)
5178 
5179  m_tvalid => bulk_m_tvalid_2,
5180  m_tlast => bulk_m_tlast_2,
5181  m_tdata => bulk_m_tdata_2,
5182  m_header_marker => bulk_m_header_marker_2,
5183  m_tail_marker => bulk_m_tail_marker_2,
5184  -- m_tready => bulk_m_tready_2,
5185  m_tready => '1',
5186 
5187  s_tdata_0 => calo_m_tdata_8,
5188  s_tvalid_0 => calo_m_tvalid_8,
5189  s_tlast_0 => calo_m_tlast_8,
5190  s_tready_0 => calo_m_axis_tready_8, --back out to input fifos
5191  s_header_mark_0 => calo_header_marker_8,
5192  s_trailer_mark_0 => calo_tail_marker_8,
5193  s_poll_chan_0 => calo_poll_chan_8,
5194  s_chan_enable_0 => channel_enable(8),
5195 
5196  s_tdata_1 => calo_m_tdata_9,
5197  s_tvalid_1 => calo_m_tvalid_9,
5198  s_tlast_1 => calo_m_tlast_9,
5199  s_tready_1 => calo_m_axis_tready_9, --back out to input fifos
5200  s_header_mark_1 => calo_header_marker_9,
5201  s_trailer_mark_1 =>calo_tail_marker_9,
5202  s_poll_chan_1 => calo_poll_chan_9,
5203  s_chan_enable_1 => channel_enable(9),
5204 
5205  s_tdata_2 => calo_m_tdata_10,
5206  s_tvalid_2 => calo_m_tvalid_10,
5207  s_tlast_2 => calo_m_tlast_10,
5208  s_tready_2 => calo_m_axis_tready_10, --back out to input fifos
5209  s_header_mark_2 => calo_header_marker_10,
5210  s_trailer_mark_2 => calo_tail_marker_10,
5211  s_poll_chan_2 => calo_poll_chan_10,
5212  s_chan_enable_2 => channel_enable(10),
5213 
5214  s_tdata_3 => calo_m_tdata_11,
5215  s_tvalid_3 => calo_m_tvalid_11,
5216  s_tlast_3 => calo_m_tlast_11,
5217  s_tready_3 => calo_m_axis_tready_11, --back out to input fifos
5218  s_header_mark_3 => calo_header_marker_11,
5219  s_trailer_mark_3 => calo_tail_marker_11,
5220  s_poll_chan_3 => calo_poll_chan_11,
5221  s_chan_enable_3 => channel_enable(11),
5222 
5223  s_tdata_4 => calo_m_tdata_20,
5224  s_tvalid_4 => calo_m_tvalid_20,
5225  s_tlast_4 => calo_m_tlast_20,
5226  s_tready_4 => calo_m_axis_tready_20, --back out to input fifos
5227  s_header_mark_4 => calo_header_marker_20,
5228  s_trailer_mark_4 => calo_tail_marker_20,
5229  s_poll_chan_4 => calo_poll_chan_20,
5230  s_chan_enable_4 => channel_enable(20),
5231 
5232  s_tdata_5 => calo_m_tdata_21,
5233  s_tvalid_5 => calo_m_tvalid_21,
5234  s_tlast_5 => calo_m_tlast_21,
5235  s_tready_5 => calo_m_axis_tready_21, --back out to input fifos
5236  s_header_mark_5 => calo_header_marker_21,
5237  s_trailer_mark_5 => calo_tail_marker_21,
5238  s_poll_chan_5 => calo_poll_chan_21,
5239  s_chan_enable_5 => channel_enable(21),
5240 
5241  s_tdata_6 => calo_m_tdata_22,
5242  s_tvalid_6 => calo_m_tvalid_22,
5243  s_tlast_6 => calo_m_tlast_22,
5244  s_tready_6 => calo_m_axis_tready_22, --back out to input fifos
5245  s_header_mark_6 => calo_header_marker_22,
5246  s_trailer_mark_6 => calo_tail_marker_22,
5247  s_poll_chan_6 => calo_poll_chan_22,
5248  s_chan_enable_6 => channel_enable(22),
5249 
5250  s_tdata_7 => calo_m_tdata_23,
5251  s_tvalid_7 => calo_m_tvalid_23,
5252  s_tlast_7 => calo_m_tlast_23,
5253  s_tready_7 => calo_m_axis_tready_23, --back out to input fifos
5254  s_header_mark_7 => calo_header_marker_23,
5255  s_trailer_mark_7 => calo_tail_marker_23,
5256  s_poll_chan_7 => calo_poll_chan_23,
5257  s_chan_enable_7 => channel_enable(23),
5258 
5259 
5260 -- first_chan => first_chan(4 downto 0),
5261 -- last_chan => last_chan(4 downto 0),
5262  first_chan => "00000",
5263  last_chan => bulk_last_chan,
5264  vio_chan_enable => (others => '0')
5265 
5266  );
5267 
5268 bulk_header_read_en <= header_read_en_0 or header_read_en_1 or header_read_en_2;
5269 
5270  readout_controller : ro_controller
5271  Port map (
5272  USER_CLK => ro_user_clock,
5273  SYSTEM_RESET => ro_controller_reset,
5274 
5275  ro_word_0(7 downto 0) => X"BC", --K28.5 comma character
5276 -- ro_word_0(11 downto 8) => "0001",
5277 -- ro_word_0(29 downto 10) => (others => '0'),
5278 -- ro_word_0(15) => '0',
5279 -- ro_word_0(31 downto 16) => (others => '0'),
5280 
5281  ro_word_0(31) => bulk_xoff(11),
5282  ro_word_0(30) => tob_xoff(11),
5283  ro_word_0(29) => bulk_xoff(10),
5284  ro_word_0(28) => tob_xoff(10),
5285  ro_word_0(27) => bulk_xoff(9),
5286  ro_word_0(26) => tob_xoff(9),
5287  ro_word_0(25) => bulk_xoff(8),
5288  ro_word_0(24) => tob_xoff(8),
5289  ro_word_0(23) => bulk_xoff(7),
5290  ro_word_0(22) => tob_xoff(7),
5291  ro_word_0(21) => bulk_xoff(6),
5292  ro_word_0(20) => tob_xoff(6),
5293  ro_word_0(19) => bulk_xoff(5),
5294  ro_word_0(18) => tob_xoff(5),
5295  ro_word_0(17) => bulk_xoff(4),
5296  ro_word_0(16) => tob_xoff(4),
5297  ro_word_0(15) => bulk_xoff(3),
5298  ro_word_0(14) => tob_xoff(3),
5299  ro_word_0(13) => bulk_xoff(2),
5300  ro_word_0(12) => tob_xoff(2),
5301  ro_word_0(11) => bulk_xoff(1),
5302  ro_word_0(10) => tob_xoff(1),
5303 
5304  ro_word_0(9) => bulk_xoff(0),
5305  ro_word_0(8) => tob_xoff(0),
5306 
5307  ro_word_1(31) => '0',
5308  ro_word_1(30) => s13_reset_3,
5309  ro_word_1(29) => s13_reset_2,
5310  ro_word_1(28) => s13_reset_1,
5311  ro_word_1(27) => s12_reset_3,
5312  ro_word_1(26) => s12_reset_2,
5313  ro_word_1(25) => s12_reset_1,
5314  ro_word_1(24) => s9_reset_3,
5315  ro_word_1(23) => s9_reset_2,
5316  ro_word_1(22) => s9_reset_1,
5317  ro_word_1(21) => s8_reset_3,
5318  ro_word_1(20) => s8_reset_2,
5319  ro_word_1(19) => s8_reset_1,
5320  ro_word_1(18) => s5_reset_3,
5321  ro_word_1(17) => s5_reset_2,
5322  ro_word_1(16) => s5_reset_1,
5323  ro_word_1(15) => s4_reset_3,
5324  ro_word_1(14) => s4_reset_2,
5325  ro_word_1(13) => s4_reset_1,
5326  ro_word_1(12) => '0',
5327  ro_word_1(11) => s14_reset_0,
5328  ro_word_1(10) => s13_reset_0,
5329  ro_word_1(9) => s12_reset_0,
5330  ro_word_1(8) => s11_reset_0,
5331  ro_word_1(7) => s10_reset_0,
5332  ro_word_1(6) => s9_reset_0,
5333  ro_word_1(5) => s8_reset_0,
5334  ro_word_1(4) => s7_reset_0,
5335  ro_word_1(3) => s6_reset_0,
5336  ro_word_1(2) => s5_reset_0,
5337  ro_word_1(1) => s4_reset_0,
5338  ro_word_1(0) => s3_reset_0, --slot 3 link reset
5339 
5340 -- ro_word_2 => x"00000000",
5341 
5342  ro_word_2(0) => s3_chan_up_0,
5343  ro_word_2(1) => s4_chan_up_0,
5344  ro_word_2(2) => s5_chan_up_0,
5345  ro_word_2(3) => s6_chan_up_0,
5346  ro_word_2(4) => s7_chan_up_0,
5347  ro_word_2(5) => s8_chan_up_0,
5348  ro_word_2(6) => s9_chan_up_0,
5349  ro_word_2(7) => s10_chan_up_0,
5350  ro_word_2(8) => s11_chan_up_0,
5351  ro_word_2(9) => s12_chan_up_0,
5352  ro_word_2(10) => s13_chan_up_0,
5353  ro_word_2(11) => s14_chan_up_0,
5354  ro_word_2(12) => '0',
5355  ro_word_2(13) => s4_chan_up_1,
5356  ro_word_2(14) => s4_chan_up_2,
5357  ro_word_2(15) => s4_chan_up_3,
5358  ro_word_2(16) => s5_chan_up_1,
5359  ro_word_2(17) => s5_chan_up_2,
5360  ro_word_2(18) => s5_chan_up_3,
5361  ro_word_2(19) => s8_chan_up_1,
5362  ro_word_2(20) => s8_chan_up_2,
5363  ro_word_2(21) => s8_chan_up_3,
5364  ro_word_2(22) => s9_chan_up_1,
5365  ro_word_2(23) => s9_chan_up_2,
5366  ro_word_2(24) => s9_chan_up_3,
5367  ro_word_2(25) => s12_chan_up_1,
5368  ro_word_2(26) => s12_chan_up_2,
5369  ro_word_2(27) => s12_chan_up_3,
5370  ro_word_2(28) => s13_chan_up_1,
5371  ro_word_2(29) => s13_chan_up_2,
5372  ro_word_2(30) => s13_chan_up_3,
5373  ro_word_2(31) => '0',
5374 
5375 
5376  ro_word_3(11 downto 0) => link_enable_stat,
5377 
5378  ro_word_3(18 downto 12) => (others =>'0'),
5379  ro_word_3(22 downto 19) => "0001",
5380  ro_word_3(31 downto 23) => (others =>'0'),
5381 
5382  gt0_txcharisk => ro_txcharisk, -- : out STD_LOGIC_VECTOR (3 downto 0);
5383  gt0_txdata => ro_txdata -- : out STD_LOGIC_VECTOR (31 downto 0)
5384 
5385  );
5386 
5387 
5388 --jfex--
5389 gen_jfex_ro: if jfex=1 generate
5390 s3_reset_0 <= '0';
5391 s4_reset_0 <= aurora_chan_control_12_i(29);
5392 s4_reset_1 <= aurora_chan_control_13_i(29);
5393 s4_reset_2 <= aurora_chan_control_15_i(29);
5394 s4_reset_3 <= aurora_chan_control_14_i(29);
5395 s5_reset_0 <= aurora_chan_control_8_i(29);
5396 s5_reset_1 <= aurora_chan_control_9_i(29);
5397 s5_reset_2 <= aurora_chan_control_11_i(29);
5398 s5_reset_3 <= aurora_chan_control_10_i(29);
5399 s6_reset_0 <= '0';
5400 s7_reset_0 <= '0';
5401 s8_reset_0 <= aurora_chan_control_16_i(29);
5402 s8_reset_1 <= aurora_chan_control_17_i(29);
5403 s8_reset_2 <= aurora_chan_control_19_i(29);
5404 s8_reset_3 <= aurora_chan_control_18_i(29);
5405 s9_reset_0 <= aurora_chan_control_4_i(29);
5406 s9_reset_1 <= aurora_chan_control_5_i(29);
5407 s9_reset_2 <= aurora_chan_control_7_i(29);
5408 s9_reset_3 <= aurora_chan_control_6_i(29);
5409 
5410 s10_reset_0 <= '0';
5411 s11_reset_0 <= '0';
5412 
5413 s12_reset_0 <= aurora_chan_control_20_i(29);
5414 s12_reset_1 <= aurora_chan_control_21_i(29);
5415 s12_reset_2 <= aurora_chan_control_23_i(29);
5416 s12_reset_3 <= aurora_chan_control_22_i(29);
5417 
5418 s13_reset_0 <= aurora_chan_control_0_i(29);
5419 s13_reset_1 <= aurora_chan_control_1_i(29);
5420 s13_reset_2 <= aurora_chan_control_3_i(29);
5421 s13_reset_3 <= aurora_chan_control_2_i(29);
5422 
5423 s14_reset_0 <= '0';
5424 
5425 --chan_ro_ctrl_resets : ila_ro_ctrl_reset
5426 --PORT MAP (
5427 -- clk => ro_user_clock,
5428 -- probe0(0) => aurora_chan_control_0_i(29),
5429 -- probe1(0) => aurora_chan_control_1_i(29),
5430 -- probe2(0) => aurora_chan_control_2_i(29),
5431 -- probe3(0) => aurora_chan_control_3_i(29),
5432 -- probe4(0) => aurora_chan_control_4_i(29),
5433 -- probe5(0) => aurora_chan_control_5_i(29),
5434 -- probe6(0) => aurora_chan_control_6_i(29),
5435 -- probe7(0) => aurora_chan_control_7_i(29),
5436 -- probe8(0) => aurora_chan_control_8_i(29),
5437 -- probe9(0) => aurora_chan_control_9_i(29),
5438 -- probe10(0) => aurora_chan_control_10_i(29),
5439 -- probe11(0) => aurora_chan_control_11_i(29),
5440 -- probe12(0) => aurora_chan_control_12_i(29),
5441 -- probe13(0) => aurora_chan_control_13_i(29),
5442 -- probe14(0) => aurora_chan_control_14_i(29),
5443 -- probe15(0) => aurora_chan_control_15_i(29),
5444 -- probe16(0) => aurora_chan_control_16_i(29),
5445 -- probe17(0) => aurora_chan_control_17_i(29),
5446 -- probe18(0) => aurora_chan_control_18_i(29),
5447 -- probe19(0) => aurora_chan_control_19_i(29),
5448 -- probe20(0) => aurora_chan_control_20_i(29),
5449 -- probe21(0) => aurora_chan_control_21_i(29),
5450 -- probe22(0) => aurora_chan_control_22_i(29),
5451 -- probe23(0) => aurora_chan_control_23_i(29)
5452 --);
5453 --channel-up status into readout control -------------------
5454 --slot_3
5455 link_enable_stat(0) <= '0'; --slot_3
5456 --logical slot_4
5457 link_enable_stat(1) <= not (aurora_chan_control_12_i(2) or aurora_chan_control_13_i(2) or aurora_chan_control_15_i(2) or aurora_chan_control_14_i(2));
5458 --logical slot_5
5459 link_enable_stat(2) <= not (aurora_chan_control_8_i(2) or aurora_chan_control_9_i(2) or aurora_chan_control_11_i(2) or aurora_chan_control_10_i(2));
5460 --slot_6
5461 link_enable_stat(3) <= '0';
5462 --slot_7
5463 link_enable_stat(4) <= '0';
5464 --slot_8
5465 link_enable_stat(5) <= not (aurora_chan_control_16_i(2) or aurora_chan_control_17_i(2) or aurora_chan_control_19_i(2) or aurora_chan_control_18_i(2));
5466 --slot_9
5467 link_enable_stat(6) <= not (aurora_chan_control_4_i(2) or aurora_chan_control_5_i(2) or aurora_chan_control_7_i(2) or aurora_chan_control_6_i(2));
5468 --slot_10
5469 link_enable_stat(7) <= '0';
5470 --slot_11
5471 link_enable_stat(8) <= '0';
5472 --slot_12
5473 link_enable_stat(9) <= not (aurora_chan_control_20_i(2) or aurora_chan_control_21_i(2) or aurora_chan_control_23_i(2) or aurora_chan_control_22_i(2));
5474 --slot_13
5475 link_enable_stat(10) <= not (aurora_chan_control_0_i(2) or aurora_chan_control_1_i(2) or aurora_chan_control_3_i(2) or aurora_chan_control_2_i(2));
5476 --slot_14
5477 link_enable_stat(11) <= '0';
5478 
5479 
5480 --s3_chan_up_0 <= aurora_chan_stat_0(0);
5481 s4_chan_up_0 <= aurora_chan_stat_12(0);
5482 s5_chan_up_0 <= aurora_chan_stat_8(0);
5483 --s6_chan_up_0 <= aurora_chan_stat_3(0);
5484 --s7_chan_up_0 <= aurora_chan_stat_4(0);
5485 s8_chan_up_0 <= aurora_chan_stat_16(0);
5486 s9_chan_up_0 <= aurora_chan_stat_4(0);
5487 --s10_chan_up_0 <= aurora_chan_stat_0(0);
5488 --s11_chan_up_0 <= aurora_chan_stat_0(0);
5489 s12_chan_up_0 <= aurora_chan_stat_20(0);
5490 s13_chan_up_0 <= aurora_chan_stat_0(0);
5491 --s14_chan_up_0 <= aurora_chan_stat_0(0);
5492 s4_chan_up_1 <= aurora_chan_stat_13(0);
5493 s4_chan_up_2 <= aurora_chan_stat_15(0);
5494 s4_chan_up_3 <= aurora_chan_stat_14(0);
5495 s5_chan_up_1 <= aurora_chan_stat_9(0);
5496 s5_chan_up_2 <= aurora_chan_stat_11(0);
5497 s5_chan_up_3 <= aurora_chan_stat_10(0);
5498 s8_chan_up_1 <= aurora_chan_stat_17(0);
5499 s8_chan_up_2 <= aurora_chan_stat_19(0);
5500 s8_chan_up_3 <= aurora_chan_stat_18(0);
5501 s9_chan_up_1 <= aurora_chan_stat_5(0);
5502 s9_chan_up_2 <= aurora_chan_stat_7(0);
5503 s9_chan_up_3 <= aurora_chan_stat_6(0);
5504 s12_chan_up_1 <= aurora_chan_stat_21(0);
5505 s12_chan_up_2 <= aurora_chan_stat_23(0);
5506 s12_chan_up_3 <= aurora_chan_stat_22(0);
5507 s13_chan_up_1 <= aurora_chan_stat_1(0);
5508 s13_chan_up_2 <= aurora_chan_stat_3(0);
5509 s13_chan_up_3 <= aurora_chan_stat_22(0);
5510 
5511 --logical slot 3 (not used)
5512 tob_xoff(0) <= '0';
5513 bulk_xoff(0) <= '0';
5514 
5515 --logical slot 4
5516 tob_xoff(1) <= aurora_chan_control_12_i(6) or aurora_chan_control_13_i(6) or aurora_chan_control_15_i(6) or aurora_chan_control_14_i(6);
5517 bulk_xoff(1) <= aurora_chan_control_12_i(7) or aurora_chan_control_13_i(7) or aurora_chan_control_15_i(7) or aurora_chan_control_14_i(7);
5518 
5519 --logical slot 5
5520 tob_xoff(2) <= aurora_chan_control_8_i(6) or aurora_chan_control_9_i(6) or aurora_chan_control_11_i(6) or aurora_chan_control_10_i(6);
5521 bulk_xoff(2) <= aurora_chan_control_8_i(7) or aurora_chan_control_9_i(7) or aurora_chan_control_11_i(7) or aurora_chan_control_10_i(7);
5522 
5523 --logical slot 6 (not used)
5524 tob_xoff(3) <= '0';
5525 bulk_xoff(3) <= '0';
5526 
5527 --logical slot 7 (not used)
5528 tob_xoff(4) <= '0';
5529 bulk_xoff(4) <= '0';
5530 
5531 --logical slot 8
5532 tob_xoff(5) <= aurora_chan_control_16_i(6) or aurora_chan_control_17_i(6) or aurora_chan_control_19_i(6) or aurora_chan_control_18_i(6);
5533 bulk_xoff(5) <= aurora_chan_control_16_i(7) or aurora_chan_control_17_i(7) or aurora_chan_control_19_i(7) or aurora_chan_control_18_i(7);
5534 
5535 --logical slot 9
5536 tob_xoff(6) <= aurora_chan_control_4_i(6) or aurora_chan_control_5_i(6) or aurora_chan_control_7_i(6) or aurora_chan_control_6_i(6);
5537 bulk_xoff(6) <= aurora_chan_control_4_i(7) or aurora_chan_control_5_i(7) or aurora_chan_control_7_i(7) or aurora_chan_control_6_i(7);
5538 
5539 --logical slot 10 (not used)
5540 tob_xoff(7) <= '0';
5541 bulk_xoff(7) <= '0';
5542 
5543 --logical slot 11 (not used)
5544 tob_xoff(8) <= '0';
5545 bulk_xoff(8) <= '0';
5546 
5547 --logical slot 12
5548 tob_xoff(9) <= aurora_chan_control_20_i(6) or aurora_chan_control_21_i(6) or aurora_chan_control_23_i(6) or aurora_chan_control_22_i(6);
5549 bulk_xoff(9) <= aurora_chan_control_20_i(7) or aurora_chan_control_21_i(7) or aurora_chan_control_23_i(7) or aurora_chan_control_22_i(7);
5550 
5551 --logical slot 13
5552 tob_xoff(10) <= aurora_chan_control_0_i(6) or aurora_chan_control_1_i(6) or aurora_chan_control_3_i(6) or aurora_chan_control_2_i(6);
5553 bulk_xoff(10) <= aurora_chan_control_0_i(7) or aurora_chan_control_1_i(7) or aurora_chan_control_3_i(7) or aurora_chan_control_2_i(7);
5554 
5555 --logical slot 14 (not used)
5556 tob_xoff(11) <= '0';
5557 bulk_xoff(11) <= '0';
5558 
5559 
5560 end generate gen_jfex_ro;
5561 
5562 --efex --
5563 gen_efex_ro: if jfex=0 generate
5564 s3_reset_0 <= aurora_chan_control_5_i(29);
5565 s4_reset_0 <= aurora_chan_control_6_i(29);
5566 s4_reset_1 <= '0';
5567 s4_reset_2 <= '0';
5568 s4_reset_3 <= '0';
5569 s5_reset_0 <= aurora_chan_control_4_i(29);
5570 s5_reset_1 <= '0';
5571 s5_reset_2 <= '0';
5572 s5_reset_3 <= '0';
5573 s6_reset_0 <= aurora_chan_control_7_i(29);
5574 s7_reset_0 <= aurora_chan_control_3_i(29);
5575 s8_reset_0 <= aurora_chan_control_8_i(29);
5576 s8_reset_1 <= '0';
5577 s8_reset_2 <= '0';
5578 s8_reset_3 <= '0';
5579 s9_reset_0 <= aurora_chan_control_2_i(29);
5580 s9_reset_1 <= '0';
5581 s9_reset_2 <= '0';
5582 s9_reset_3 <= '0';
5583 
5584 s10_reset_0 <= aurora_chan_control_9_i(29);
5585 s11_reset_0 <= aurora_chan_control_1_i(29);
5586 
5587 s12_reset_0 <= aurora_chan_control_10_i(29);
5588 s12_reset_1 <= '0';
5589 s12_reset_2 <= '0';
5590 s12_reset_3 <= '0';
5591 
5592 s13_reset_0 <= aurora_chan_control_0_i(29);
5593 s13_reset_1 <= '0';
5594 s13_reset_2 <= '0';
5595 s13_reset_3 <= '0';
5596 
5597 s14_reset_0 <= aurora_chan_control_11_i(29);
5598 
5599 --channel enable status to ro_controller_word_3
5600 
5601 
5602 --Logical Slots <= Channel #
5603 --slot_3
5604 link_enable_stat(0) <= not aurora_chan_control_5_i(2);
5605 --slot_4
5606 link_enable_stat(1) <= not aurora_chan_control_6_i(2);
5607 --slot_5
5608 link_enable_stat(2) <= not aurora_chan_control_4_i(2);
5609 --slot_6
5610 link_enable_stat(3) <= not aurora_chan_control_7_i(2);
5611 --slot_7
5612 link_enable_stat(4) <= not aurora_chan_control_3_i(2);
5613 --slot_8
5614 link_enable_stat(5) <= not aurora_chan_control_8_i(2);
5615 --slot_9
5616 link_enable_stat(6) <= not aurora_chan_control_2_i(2);
5617 --slot_10
5618 link_enable_stat(7) <= not aurora_chan_control_9_i(2);
5619 --slot_11
5620 link_enable_stat(8) <= not aurora_chan_control_1_i(2);
5621 --slot_12
5622 link_enable_stat(9) <= not aurora_chan_control_10_i(2);
5623 --slot_13
5624 link_enable_stat(10) <= not aurora_chan_control_0_i(2);
5625 --slot_14
5626 link_enable_stat(11) <= not aurora_chan_control_11_i(2);
5627 
5628 
5629 --logical slot <= Channel number
5630 s3_chan_up_0 <= aurora_chan_stat_5(0);
5631 s4_chan_up_0 <= aurora_chan_stat_6(0);
5632 s5_chan_up_0 <= aurora_chan_stat_4(0);
5633 s6_chan_up_0 <= aurora_chan_stat_7(0);
5634 s7_chan_up_0 <= aurora_chan_stat_3(0);
5635 s8_chan_up_0 <= aurora_chan_stat_8(0);
5636 s9_chan_up_0 <= aurora_chan_stat_2(0);
5637 s10_chan_up_0 <= aurora_chan_stat_9(0);
5638 s11_chan_up_0 <= aurora_chan_stat_1(0);
5639 s12_chan_up_0 <= aurora_chan_stat_10(0);
5640 s13_chan_up_0 <= aurora_chan_stat_0(0);
5641 s14_chan_up_0 <= aurora_chan_stat_11(0);
5642 s4_chan_up_1 <= '0';
5643 s4_chan_up_2 <= '0';
5644 s4_chan_up_3 <= '0';
5645 s5_chan_up_1 <= '0';
5646 s5_chan_up_2 <= '0';
5647 s5_chan_up_3 <= '0';
5648 s8_chan_up_1 <= '0';
5649 s8_chan_up_2 <= '0';
5650 s8_chan_up_3 <= '0';
5651 s9_chan_up_1 <= '0';
5652 s9_chan_up_2 <= '0';
5653 s9_chan_up_3 <= '0';
5654 s12_chan_up_1 <= '0';
5655 s12_chan_up_2 <= '0';
5656 s12_chan_up_3 <= '0';
5657 s13_chan_up_1 <= '0';
5658 s13_chan_up_2 <= '0';
5659 s13_chan_up_3 <= '0';
5660 
5661 --Logical Slot-3
5662 tob_xoff(0) <= aurora_chan_control_5_i(6);
5663 bulk_xoff(0) <= aurora_chan_control_5_i(7);
5664 --Logical Slot-4
5665 tob_xoff(1) <= aurora_chan_control_6_i(6);
5666 bulk_xoff(1) <= aurora_chan_control_6_i(7);
5667 --Logical Slot-5
5668 tob_xoff(2) <= aurora_chan_control_4_i(6);
5669 bulk_xoff(2) <= aurora_chan_control_4_i(7);
5670 --Logical Slot-6
5671 tob_xoff(3) <= aurora_chan_control_7_i(6);
5672 bulk_xoff(3) <= aurora_chan_control_7_i(7);
5673 --Logical Slot-7
5674 tob_xoff(4) <= aurora_chan_control_3_i(6);
5675 bulk_xoff(4) <= aurora_chan_control_3_i(7);
5676 --Logical Slot-8
5677 tob_xoff(5) <= aurora_chan_control_8_i(6);
5678 bulk_xoff(5) <= aurora_chan_control_8_i(7);
5679 --Logical Slot-9
5680 tob_xoff(6) <= aurora_chan_control_2_i(6);
5681 bulk_xoff(6) <= aurora_chan_control_2_i(7);
5682 --Logical Slot-10
5683 tob_xoff(7) <= aurora_chan_control_9_i(6);
5684 bulk_xoff(7) <= aurora_chan_control_9_i(7);
5685 --Logical Slot-11
5686 tob_xoff(8) <= aurora_chan_control_1_i(6);
5687 bulk_xoff(8) <= aurora_chan_control_1_i(7);
5688 --Logical Slot-12
5689 tob_xoff(9) <= aurora_chan_control_10_i(6);
5690 bulk_xoff(9) <= aurora_chan_control_10_i(7);
5691 --Logical Slot-13
5692 tob_xoff(10) <= aurora_chan_control_0_i(6);
5693 bulk_xoff(10) <= aurora_chan_control_0_i(7);
5694 --Logical Slot-14
5695 tob_xoff(11) <= aurora_chan_control_11_i(6);
5696 bulk_xoff(11) <= aurora_chan_control_11_i(7);
5697 
5698 
5699 end generate gen_efex_ro;
5700 
5701 
5702 aurora_chan_control_0 <= aurora_chan_control_0_i;
5703 aurora_chan_control_1 <= aurora_chan_control_1_i;
5704 aurora_chan_control_2 <= aurora_chan_control_2_i;
5705 aurora_chan_control_3 <= aurora_chan_control_3_i;
5706 aurora_chan_control_4 <= aurora_chan_control_4_i;
5707 aurora_chan_control_5 <= aurora_chan_control_5_i;
5708 aurora_chan_control_6 <= aurora_chan_control_6_i;
5709 aurora_chan_control_7 <= aurora_chan_control_7_i;
5710 aurora_chan_control_8 <= aurora_chan_control_8_i;
5711 aurora_chan_control_9 <= aurora_chan_control_9_i;
5712 aurora_chan_control_10 <= aurora_chan_control_10_i;
5713 aurora_chan_control_11 <= aurora_chan_control_11_i;
5714 aurora_chan_control_12 <= aurora_chan_control_12_i;
5715 aurora_chan_control_13 <= aurora_chan_control_13_i;
5716 aurora_chan_control_14 <= aurora_chan_control_14_i;
5717 aurora_chan_control_15 <= aurora_chan_control_15_i;
5718 aurora_chan_control_16 <= aurora_chan_control_16_i;
5719 aurora_chan_control_17 <= aurora_chan_control_17_i;
5720 aurora_chan_control_18 <= aurora_chan_control_18_i;
5721 aurora_chan_control_19 <= aurora_chan_control_19_i;
5722 aurora_chan_control_20 <= aurora_chan_control_20_i;
5723 aurora_chan_control_21 <= aurora_chan_control_21_i;
5724 aurora_chan_control_22 <= aurora_chan_control_22_i;
5725 aurora_chan_control_23 <= aurora_chan_control_23_i;
5726 
5727 
5728 --------Multiplexed CTTC receiver ------
5729 
5730 CTTC_receiver : combined_ttc_no_mgt
5731 generic map
5732 (
5733  EXAMPLE_CONFIG_INDEPENDENT_LANES => 1,
5734 -- EXAMPLE_LANE_WITH_START_CHAR : integer := 0; -- specifies lane with unique start frame ch
5735  EXAMPLE_WORDS_IN_BRAM => 512, -- specifies amount of data in BRAM
5736 -- EXAMPLE_SIM_GTRESET_SPEEDUP : string := "TRUE"; -- simulation setting for GT SecureIP model
5737 -- STABLE_CLOCK_PERIOD : integer := 24;
5738  EXAMPLE_USE_CHIPSCOPE => 1 -- Set to 1 to use Chipscope to drive resets
5739 )
5740 
5741 Port map (
5742 
5743  rxusrclk2 => mux_rxusrclk,
5744  rx_fsm_reset_done => mux_rx_fsm_reset_done,
5745  cpllfbclklost => mux_cpllfbclklost,
5746  cplllock => mux_cplllock,
5747  rxbyteisaligned => mux_rxbyteisaligned,
5748  rxbyterealign => mux_rxbyterealign,
5749  rxchariscomma => mux_rxchariscomma,
5750  rxcharisk => mux_rxcharisk,
5751  rxcommadet => mux_rxcommadet,
5752  rxdata => mux_rxdata,
5753  rxdisperr => mux_rxdisperr,
5754  rxnotintable => mux_rxnotintable,
5755  rxresetdone => mux_rxresetdone,
5756  DRP_CLK_IN => pp_clock,
5757 
5758  TRACK_DATA_OUT => alt_TRACK_DATA_OUT,
5759  ttc_word_0 => alt_ttc_word_0,
5760  ttc_word_1 => alt_ttc_word_1,
5761  ttc_word_2 => alt_ttc_word_2,
5762  ttc_word_3 => alt_ttc_word_3,
5763  ttc_seq => alt_ttc_seq,
5764  ttc_status => alt_ttc_status,
5765  ttc_reset => alt_ttc_reset,
5766  stop_ttc_info => '0'
5767 
5768 );
5769 
5770  usr_clk_mux_inst : bufgmux
5771  port map (
5772  I0 => BP_CTTC_rxoutclk,
5773  I1 => FM_CTTC_rxoutclk,
5774  S => ttc_mux_ctrl,
5775  o => mux_RXUSRCLK
5776  );
5777 
5778 
5779 
5780 mux_rxdata <= FM_CTTC_rxdata when (ttc_mux_ctrl = '1') else BP_CTTC_rxdata;
5781 mux_rxcharisk <= FM_CTTC_rxcharisk when (ttc_mux_ctrl = '1') else BP_CTTC_rxcharisk;
5782 mux_CTTC_MGT_bus <= FM_CTTC_MGT_bus when (ttc_mux_ctrl = '1') else BP_CTTC_MGT_bus;
5783 
5784 mux_rxchariscomma <= mux_CTTC_MGT_bus(3 downto 0);
5785 mux_rxdisperr <= mux_CTTC_MGT_bus(7 downto 4);
5786 mux_rxnotintable <= mux_CTTC_MGT_bus(11 downto 8);
5787 mux_rx_fsm_reset_done <= mux_CTTC_MGT_bus(13);
5788 mux_cpllfbclklost <= mux_CTTC_MGT_bus(14);
5789 mux_cplllock <= mux_CTTC_MGT_bus(15);
5790 mux_rxbyteisaligned <= mux_CTTC_MGT_bus(16);
5791 mux_rxbyterealign <= mux_CTTC_MGT_bus(17);
5792 mux_rxcommadet <= mux_CTTC_MGT_bus(18);
5793 mux_rxresetdone <= mux_CTTC_MGT_bus(19);
5794 
5795 alt_cttc_crc : cttc_crc_test
5796  Port map (
5797  seq => alt_ttc_seq,
5798  cttc_user_clk => mux_RXUSRCLK,
5799  ttc_word_0 => alt_ttc_word_0,
5800  ttc_word_1 => alt_ttc_word_1,
5801  ttc_word_2 => alt_ttc_word_2,
5802  ttc_word_3 => alt_ttc_word_3
5803  );
5804 
5805 
5806 
5807 end RTL;