90 use IEEE.STD_LOGIC_1164.
ALL;
91 use IEEE.NUMERIC_STD.
ALL;
94 use UNISIM.vcomponents.
all;
97 use UNIMACRO.vcomponents.
all;
99 library TOB_rdout_lib;
104 use ipbus_lib.ipbus.
all;
109 library infrastructure_lib;
218 signal DPR_locations_to_rd_i : STD_LOGIC_VECTOR (2 downto 0) := "001" ;
219 signal trigger_slice_i : std_logic_vector(3 downto 0) := "0000" ;
221 signal pre_ld_RAW_wr_addr_i : STD_LOGIC_VECTOR (9 downto 0) ;
222 signal pre_ld_TOB_wr_addr_i : STD_LOGIC_VECTOR (8 downto 0) ;
223 signal pre_ld_XTOB_eg_wr_addr_i : STD_LOGIC_VECTOR (8 downto 0) ;
224 signal pre_ld_XTOB_tau_wr_addr_i : STD_LOGIC_VECTOR (8 downto 0) ;
225 signal RAW_data_tmp : RAW_data_228_type;
228 signal L1A_ID_i : STD_LOGIC_VECTOR (23 downto 0);
229 signal L1A_ID_EXT_i : STD_LOGIC_VECTOR (7 downto 0);
230 signal RST_i, BCR_1dly : STD_LOGIC ;
231 signal TTC_read_all_1dly : STD_LOGIC := '0' ;
232 signal rst_ECR_dbg_cntr_i : STD_LOGIC := '0' ;
233 signal rst_L1A_dbg_cntr_i : STD_LOGIC := '0' ;
235 signal XTOB_eg_FIFO_pFULL_THRESH_assert_i : STD_LOGIC_VECTOR (8 downto 0) ;
236 signal XTOB_eg_FIFO_pFULL_THRESH_negate_i : STD_LOGIC_VECTOR (8 downto 0) ;
237 signal XTOB_eg_FIFO_data_count_i : STD_LOGIC_VECTOR (8 downto 0) ;
238 signal XTOB_tau_FIFO_pFULL_THRESH_assert_i : STD_LOGIC_VECTOR (8 downto 0) ;
239 signal XTOB_tau_FIFO_pFULL_THRESH_negate_i : STD_LOGIC_VECTOR (8 downto 0) ;
240 signal XTOB_tau_FIFO_data_count_i : STD_LOGIC_VECTOR (8 downto 0) ;
242 signal TOB_FIFO_pFULL_THRESH_assert_i : STD_LOGIC_VECTOR (8 downto 0) ;
243 signal TOB_FIFO_pFULL_THRESH_negate_i : STD_LOGIC_VECTOR (8 downto 0) ;
244 signal TOB_FIFO_data_count_i : STD_LOGIC_VECTOR (8 downto 0) ;
245 signal tob_busy_thresh_assert_i : STD_LOGIC_VECTOR (8 downto 0) ;
246 signal tob_busy_thresh_negate_i : STD_LOGIC_VECTOR (8 downto 0) ;
247 signal TOB_Link_outpout_FIFO_pFULL_THRESH_assert_i : STD_LOGIC_VECTOR (12 downto 0) ;
248 signal TOB_Link_outpout_FIFO_pFULL_THRESH_negate_i : STD_LOGIC_VECTOR (12 downto 0) ;
249 signal TOB_Link_outpout_FIFO_rd_data_count_i : STD_LOGIC_VECTOR (12 downto 0) ;
251 signal RAW_FIFO_pFULL_THRESH_ASSERT_i : STD_LOGIC_VECTOR (8 downto 0) ;
252 signal RAW_FIFO_pFULL_THRESH_NEGATE_i : STD_LOGIC_VECTOR (8 downto 0) ;
254 signal BCN_FIFO_TOB_pFULL_THRESH_assert_i : STD_LOGIC_VECTOR (8 downto 0) ;
255 signal BCN_FIFO_TOB_pFULL_THRESH_negate_i : STD_LOGIC_VECTOR (8 downto 0) ;
256 signal BCN_FIFO_TOB_rd_data_count_i : STD_LOGIC_VECTOR (8 downto 0) ;
257 signal BCN_FIFO_RAW_pFULL_THRESH_assert_i : STD_LOGIC_VECTOR (8 downto 0) ;
258 signal BCN_FIFO_RAW_pFULL_THRESH_negate_i : STD_LOGIC_VECTOR (8 downto 0) ;
259 signal BCN_FIFO_RAW_rd_data_count_i : STD_LOGIC_VECTOR (8 downto 0) ;
261 signal Link_output_FIFO_RAW_rd_data_count_i : STD_LOGIC_VECTOR (12 downto 0) ;
262 signal Link_output_FIFO_RAW_pfull_thresh_assert_i : STD_LOGIC_VECTOR (12 downto 0) ;
263 signal Link_output_FIFO_RAW_pfull_thresh_negate_i : STD_LOGIC_VECTOR (12 downto 0) ;
265 signal RAW_frame_count_i : STD_LOGIC_VECTOR (31 downto 0) ;
266 signal RDOUT_PULSE_REG_i : STD_LOGIC_VECTOR (31 downto 0) ;
267 signal SPY_mem_wr_addr_i : STD_LOGIC_VECTOR (10 downto 0) ;
269 signal SPY_TOB_mem_wr_addr_i : STD_LOGIC_VECTOR (10 downto 0) ;
271 signal reg1 , reg2 : std_logic := '0' ;
272 signal reg3 , reg4 : std_logic := '0' ;
273 signal reg5 , reg6 : std_logic := '0' ;
274 signal reg7 , reg8 : std_logic := '0' ;
275 signal reg9 , reg10 : std_logic := '0' ;
276 signal reg11 , reg12 : std_logic := '0' ;
277 signal reg13 , reg14 : std_logic := '0' ;
278 signal reg15 , reg16 : std_logic := '0' ;
279 signal reg17 , reg18 : std_logic := '0' ;
280 signal reg19 , reg20 : std_logic := '0' ;
281 signal L1A_in_int : std_logic := '0';
282 signal TOB_err_4b_in_i : STD_LOGIC_VECTOR (3 downto 0);
283 signal TEST_CONTROL_REG_i : std_logic_VECTOR (31 downto 0);
285 signal RAW_data_FIFO_flags_i : STD_LOGIC_VECTOR (31 downto 0);
286 signal TOB_data_FIFO_flags_i : STD_LOGIC_VECTOR (31 downto 0);
287 signal RAW_FIFO_sw_rst_i : STD_LOGIC ;
288 signal TOB_FIFO_sw_rst_i : STD_LOGIC ;
289 signal SPY_RAM_wr_addr_rst_i : STD_LOGIC ;
292 signal XTOB_eg_Valid_flg_in_i : STD_LOGIC_VECTOR (7 downto 0) ;
293 signal XTOB_eg_sync_in_i : STD_LOGIC ;
296 signal XTOB_tau_Valid_flg_in_i : STD_LOGIC_VECTOR (7 downto 0) ;
297 signal XTOB_tau_sync_in_i : STD_LOGIC ;
301 signal T_TOB_32b_in_i : STD_LOGIC_VECTOR (31 downto 0);
302 signal T_TOB_sync_in_i : STD_LOGIC ;
303 signal T_TOB_valid_in_i : STD_LOGIC ;
304 signal TOB_type_i : STD_LOGIC ;
306 signal OUT_TOB_BCN_i : std_logic_vector (6 downto 0);
307 signal OUT_XTOB_BCN_i : std_logic_vector (6 downto 0);
309 signal ECR_1dly : std_logic ;
310 signal raw_rd_all_i : std_logic ;
311 signal read_on_err_i : std_logic ;
313 signal TOB_ready_in_i : std_logic ;
314 signal RAW_ready_in_i : std_logic ;
315 signal RAW_FIFO_FULL_THRESH_ASSERT_i : STD_LOGIC_VECTOR(8 downto 0);
316 signal RAW_FIFO_FULL_THRESH_NEGATE_i : STD_LOGIC_VECTOR(8 downto 0);
317 signal RAW_FIFO_data_count_i : STD_LOGIC_VECTOR(8 downto 0);
318 signal raw_busy_thresh_assert_i : STD_LOGIC_VECTOR(8 downto 0);
319 signal raw_busy_thresh_negate_i : STD_LOGIC_VECTOR(8 downto 0);
321 signal TOB_out_is_char_i : std_logic ;
322 signal TOB_out_i : STD_LOGIC_VECTOR(31 downto 0);
324 signal RAW_out_is_char_i : std_logic ;
325 signal RAW_data_out_i : STD_LOGIC_VECTOR(31 downto 0);
327 signal L1A_ID_int : STD_LOGIC_VECTOR(31 downto 0);
328 signal L1A_ID_Event_i : STD_LOGIC_VECTOR(31 downto 0);
329 signal local_BCN_i : std_logic_vector(11 downto 0);
330 signal FIFO_error_flags_54b_i : STD_LOGIC_VECTOR (53 downto 0);
331 signal busy_raw_counter_i : STD_LOGIC_VECTOR (31 downto 0);
332 signal busy_tob_counter_i : STD_LOGIC_VECTOR (31 downto 0);
333 signal real_time_40m_counter_i : std_logic_vector( 31 downto 0);
334 signal busy_raw_duration_counter_i : std_logic_vector( 31 downto 0);
335 signal busy_tob_duration_counter_i : std_logic_vector( 31 downto 0);
337 signal ipbus_out_raw_dpram_i : ipb_rbus;
338 signal ipbus_in_raw_dpram_i : ipb_wbus;
339 signal ipbus_out_tob_dpram_i : ipb_rbus;
340 signal ipbus_in_tob_dpram_i : ipb_wbus;
342 signal busy_tob_i, busy_raw_i : std_logic ;
343 signal busy_tob_tmp, busy_raw_tmp : std_logic ;
344 signal busy_tob_1dly, busy_raw_1dly : std_logic ;
345 signal busy_counter_rst_i : std_logic ;
346 signal ECR_debug_counter_i : std_logic_vector( 31 downto 0);
347 signal L1A_debug_counter_i : std_logic_vector( 31 downto 0);
348 signal raw_fsm_monitor_i : std_logic_vector( 31 downto 0);
349 signal tob_fsm_monitor_i : std_logic_vector( 39 downto 0);
350 signal sync_280m_i : std_logic;
351 signal busy_cntr_latch_i : std_logic;
352 signal busy_reg_1, busy_reg_2 : std_logic;
353 signal tob_double_word_en_i : std_logic;
354 signal tob_double_word_counter_i : std_logic_vector( 31 downto 0);
356 signal TOB_BCN_FIFO_tidemark_i : std_logic_vector(15 downto 0);
357 signal TOB_data_FIFO_tidemark_i : std_logic_vector(15 downto 0);
358 signal XTOB_data_FIFO_tidemark_i : std_logic_vector(15 downto 0);
359 signal TOB_LO_FIFO_tidemark_i : std_logic_vector(15 downto 0);
361 signal RAW_BCN_FIFO_tidemark_i : std_logic_vector(15 downto 0);
362 signal RAW_data_FIFO_tidemark_i : std_logic_vector(15 downto 0);
363 signal RAW_LO_FIFO_tidemark_i : std_logic_vector(15 downto 0);
365 signal ttc_parity_int : std_logic := '0';
367 signal ttc_err_history_debug: std_logic_vector(31 downto 0) := (others => '0');
368 signal l1a_id_good_debug: std_logic_vector(31 downto 0) := (others => '0');
369 signal l1a_id_err_debug: std_logic_vector(31 downto 0) := (others => '0');
370 signal l1a_id_expected_debug: std_logic_vector(31 downto 0) := (others => '0');
371 signal bcn_err_expected_debug: std_logic_vector(31 downto 0) := (others => '0');
372 signal l1id_parity_err_cntr_debug: std_logic_vector(31 downto 0) := (others => '0');
373 signal l1id_mismatch_cntr_debug: std_logic_vector(31 downto 0) := (others => '0');
374 signal bcn_parity_err_cntr_debug: std_logic_vector(31 downto 0) := (others => '0');
375 signal bcn_mismatch_cntr_debug: std_logic_vector(31 downto 0) := (others => '0');
378 attribute TIG : string ;
379 attribute TIG of busy_tob_i : signal is "true" ;
380 attribute TIG of busy_tob_1dly : signal is "true" ;
381 attribute TIG of busy_tob_tmp : signal is "true" ;
382 attribute TIG of busy_raw_i : signal is "true" ;
383 attribute TIG of busy_raw_1dly : signal is "true" ;
384 attribute TIG of busy_raw_tmp : signal is "true" ;
386 attribute keep : string ;
387 attribute max_fanout : integer;
388 attribute keep of L1A_ID_i : signal is "true" ;
389 attribute max_fanout of L1A_ID_i : signal is 40;
412 end process tob_out_reg;
420 end process raw_out_reg;
428 end generate TOB_type_gen;
443 busy_tob_1dly <= busy_tob_i;
444 if busy_tob_1dly = '0' AND busy_tob_i = '1' then
450 busy_raw_1dly <= busy_raw_i;
451 if busy_raw_1dly = '0' AND busy_raw_i = '1' then
459 U0_ECR_debug_counter :
entity TOB_rdout_lib.
cntr_generic
466 RST => RST_i
OR rst_ECR_dbg_cntr_i ,
467 Q => ECR_debug_counter_i
470 U0_L1A_debug_counter :
entity TOB_rdout_lib.
cntr_generic
477 RST => RST_i
OR rst_L1A_dbg_cntr_i ,
478 Q => L1A_debug_counter_i
488 RST => RST_i
OR busy_counter_rst_i ,
489 Q => busy_tob_counter_i
499 RST => RST_i
OR busy_counter_rst_i ,
500 Q => busy_raw_counter_i
503 U0_busy_tob_duration_counter :
entity TOB_rdout_lib.
cntr_generic
508 CE =>
(busy_tob_i
AND sync_280m_i
),
510 RST => RST_i
OR busy_counter_rst_i ,
511 Q => busy_tob_duration_counter_i
514 U0_busy_raw_duration_counter :
entity TOB_rdout_lib.
cntr_generic
519 CE =>
(busy_raw_i
AND sync_280m_i
),
521 RST => RST_i
OR busy_counter_rst_i ,
522 Q => busy_raw_duration_counter_i
525 U0_real_time_40m_counter :
entity TOB_rdout_lib.
cntr_generic
532 RST => RST_i
OR busy_counter_rst_i ,
533 Q => real_time_40m_counter_i
536 U0_tob_double_word_counter :
entity TOB_rdout_lib.
cntr_generic
541 CE => tob_double_word_en_i,
543 RST => RST_i
OR SPY_RAM_wr_addr_rst_i ,
544 Q => tob_double_word_counter_i
553 rst_in => RST_i
OR busy_counter_rst_i ,
555 value_bus => "
0000000" & BCN_FIFO_TOB_rd_data_count_i ,
556 tide_mark_out => TOB_BCN_FIFO_tidemark_i
565 rst_in => RST_i
OR busy_counter_rst_i ,
567 value_bus => "
0000000" & TOB_FIFO_data_count_i ,
568 tide_mark_out => TOB_data_FIFO_tidemark_i
577 rst_in => RST_i
OR busy_counter_rst_i ,
579 value_bus => "
0000000" & XTOB_eg_FIFO_data_count_i ,
580 tide_mark_out => XTOB_data_FIFO_tidemark_i
589 rst_in => RST_i
OR busy_counter_rst_i ,
591 value_bus => "
000" & TOB_Link_outpout_FIFO_rd_data_count_i ,
592 tide_mark_out => TOB_LO_FIFO_tidemark_i
599 raw_rd_all_i <= TEST_CONTROL_REG_i(0) ;
628 L1A_ID_int <= L1A_ID_EXT_i & L1A_ID_i;
631 U0_TOBs_readout :
entity TOB_rdout_lib.
TOBs_rdout
651 TOBS_sync_in => T_TOB_sync_in_i,
711 raw_rd_all_i <= TEST_CONTROL_REG_i(0) ;
719 rst_in => RST_i
OR busy_counter_rst_i ,
721 value_bus => "
0000000" & BCN_FIFO_RAW_rd_data_count_i ,
722 tide_mark_out => RAW_BCN_FIFO_tidemark_i
731 rst_in => RST_i
OR busy_counter_rst_i ,
733 value_bus => "
0000000" & RAW_FIFO_data_count_i ,
734 tide_mark_out => RAW_data_FIFO_tidemark_i
743 rst_in => RST_i
OR busy_counter_rst_i ,
745 value_bus => "
000" & Link_output_FIFO_RAW_rd_data_count_i ,
746 tide_mark_out => RAW_LO_FIFO_tidemark_i
820 BCN_FIFO_TOB_pFULL_THRESH_ASSERT => BCN_FIFO_TOB_pFULL_THRESH_assert_i,
821 BCN_FIFO_TOB_pFULL_THRESH_NEGATE => BCN_FIFO_TOB_pFULL_THRESH_negate_i,
892 variable bcn_count : unsigned (11 downto 0) := (others => '0');
902 bcn_count := ("000000000000");
904 if bcn_count = 3563 then
905 bcn_count := (others => '0');
907 bcn_count := bcn_count + 1;
910 local_BCN_i <= std_logic_vector(bcn_count);
920 reg7 <= RDOUT_PULSE_REG_i(2) ;
922 RAW_FIFO_sw_rst_i <= reg7 AND (NOT reg8) ;
932 reg9 <= RDOUT_PULSE_REG_i(3) ;
934 TOB_FIFO_sw_rst_i <= reg9 AND (NOT reg10) ;
945 reg11 <= RDOUT_PULSE_REG_i(5) ;
947 SPY_RAM_wr_addr_rst_i <= reg11 AND (NOT reg12) ;
955 reg13 <= RDOUT_PULSE_REG_i(6) ;
957 busy_counter_rst_i <= reg13 AND (NOT reg14) ;
964 reg15 <= RDOUT_PULSE_REG_i(7) ;
966 rst_ECR_dbg_cntr_i <= reg15 AND (NOT reg16) ;
974 reg17 <= RDOUT_PULSE_REG_i(8) ;
976 rst_L1A_dbg_cntr_i <= reg17 AND (NOT reg18) ;
984 reg19 <= RDOUT_PULSE_REG_i(9) ;
986 busy_cntr_latch_i <= reg19 AND (NOT reg20) ;
993 rst_i => rst_L1A_dbg_cntr_i,
994 l1a_id_ext_i => L1A_ID_int,
995 l1a_in_i => L1A_in_int,
996 ecr_in_i => ECR_1dly,
997 bcn_id_lcl_i => local_BCN_i,
998 ttc_parity_i => TTC_parity_int,
1000 err_history_o => ttc_err_history_debug,
1001 l1a_id_good_o => l1a_id_good_debug,
1002 l1a_id_err_o => l1a_id_err_debug,
1003 l1a_id_expected_o => l1a_id_expected_debug,
1004 bcn_err_expected_o => bcn_err_expected_debug,
1005 l1id_parity_err_cntr_o => l1id_parity_err_cntr_debug,
1006 l1id_mismatch_cntr_o => l1id_mismatch_cntr_debug,
1007 bcn_parity_err_cntr_o => bcn_parity_err_cntr_debug,
1008 bcn_mismatch_cntr_o => bcn_mismatch_cntr_debug
External data-types and functions.
( OUTPUT_TOBS- 1 downto 0) AlgoXTriggerObject AlgoXOutput
Algorithm XOUTPUT port.
RAW Calorimeter Data Readout Logic for process FPGA.
in RAW_TXOUTCLK std_logic
Calorimeter TXOUTCLK to read Calorimeter data to MGT for transmission to control FPGA.
out RAW_data_out std_logic_vector( 31 downto 0)
calorimeter 32b data output to MGT & Control FPGA
in RAW_FIFO_FULL_THRESH_ASSERT std_logic_vector( 8 downto 0)
RAW FIFO full flag assert threshold.
out read_on_err_out STD_LOGIC
Read RAW data on error flag.
in raw_busy_thresh_negate STD_LOGIC_VECTOR( 8 downto 0)
raw BUSY flag threshold de-assert
out raw_fsm_monitor std_logic_vector( 31 downto 0)
Monitor RAW Readout state machines.
out ipbus_out_raw_dpram ipb_rbus
IPBus signal coming from RAW SPY DPRAM.
in TTC_read_all_in std_logic
Privilege Read signal input.
in RST_spy_mem_wr_addr std_logic
RST_spy_mem_wr_addr, counter reset Pulse by software command.
out RAW_data_FIFO_flags std_logic_vector( 31 downto 0)
RAW data block FIFO flags.
out SPY_mem_wr_addr std_logic_vector( 10 downto 0)
RAW Data SPY Memory write address register (read only)
out frame_count std_logic_vector( 31 downto 0)
numer of frames in the link output FIFO to be transmitted to MGT & Control FPGA
in clk_280M_in std_logic
280Mhz input signal
in RAW_FIFO_sw_rst std_logic
RAW Readout FIFO reset Pulse by software command.
in mgt_enable_in STD_LOGIC_VECTOR( 48 downto 0)
MGT enable signals - use to enable/disable readout on error.
in hw_addr std_logic_vector( 1 downto 0)
FPGA Hardware Address.
in pre_ld_wr_addr std_logic_vector( 9 downto 0)
latency pre-load for DPRAM write address
in cntr_load_en std_logic
latency pre-load enable signal for DRPAM write address
in raw_rd_all_in std_logic
readout all raw data links, when set all RAW data from 49 fibres are readout
in clk_40M_rdout std_logic
40Mhz input signal used only for RAW data readout
in L1A_ID_in std_logic_vector( 31 downto 0)
8b Extended L1A ID & 24b LIA_ID of the L1A Counter
in ipbus_in_raw_dpram ipb_wbus
IPBus signal going to RAW SPY DPRAM.
in RAW_FIFO_pFULL_THRESH_NEGATE std_logic_vector( 8 downto 0)
36b derandomisation FIFO partial full flag negate threshold
in Link_output_FIFO_RAW_pfull_thresh_negate std_logic_vector( 12 downto 0)
Link output FIFO (before MGT) partial full flag negate threshold.
in RAW_FIFO_FULL_THRESH_NEGATE std_logic_vector( 8 downto 0)
RAW FIFO full flag negate threshold.
out BCN_FIFO_RAW_rd_data_count STD_LOGIC_VECTOR( 8 downto 0)
BCN & L1A FIFO occupancy for RAW Readout.
in ipb_clk std_logic
ipb_clk signal is input from master to slaves
in RAW_FIFO_pFULL_THRESH_ASSERT std_logic_vector( 8 downto 0)
Derandomisation FIFO partial full flag assert threshold.
in BCN_FIFO_pFULL_THRESH_negate std_logic_vector( 8 downto 0)
BCN FIFO partial full flag negate threshold.
in BCN_ID_in std_logic_vector( 11 downto 0)
Bunch Crossing ID 12 bits.
FPGA_NUMBER integer := 1
Integer used to distinguish different FPGAs having a slightly different firmware.
in Link_output_FIFO_RAW_pfull_thresh_assert std_logic_vector( 12 downto 0)
Link output FIFO (before MGT) partial full flag assert threshold.
in clk_load_in std_logic
40Mhz input signal at 20% duty cycle
out busy_raw std_logic
raw data busy out to control FPGA
in RAW_ready_in std_logic
Ready signal from control FPGA to receive RAW calorimeter data.
out Link_output_FIFO_RAW_rd_data_count std_logic_vector( 12 downto 0)
Link output FIFO (before MGT) occupancy data count.
out link_error_flags std_logic_vector( 53 downto 0)
54-b error flags from the Error Flag FIFO to IPBUS register
in L1A_in std_logic
L1A input signal.
in BCN_FIFO_pFULL_THRESH_assert std_logic_vector( 8 downto 0)
BCN FIFO partial full flag assert threshold.
in RAW_data_in RAW_data_227_type
Calorimeter data array 49 x 227b input frames.
out RAW_out_to_MGT_is_char std_logic
calorimeter data is CHAR signal to MGT & Control FPGA
out RAW_FIFO_data_count std_logic_vector( 8 downto 0)
RAW FIFO occupancy data count.
in raw_busy_thresh_assert STD_LOGIC_VECTOR( 8 downto 0)
raw BUSY flag threshold assert
Top Level of Readout Logic for process FPGA.
Top Level of Readout Logic for process FPGA.
out RAW_data_out STD_LOGIC_VECTOR( 31 downto 0)
calorimeter data 32b out to MGT
in RST std_logic
Reset from 40MHz MMCM lock signal.
in TOB_TXOUTCLK STD_LOGIC
TOB TXOUTCLK to read XTOB/TOB data to MGT for transmission to control FPGA.
in ipb_rst std_logic
ipb_rst signal is input from master to slaves
in XTOB_tau_in AlgoXOutput
XTOBs tau 64b.
in TOB_ready_in std_logic
Ready signal from control FPGA to receive TOBs data.
in BCR_in STD_LOGIC
BCR signal input.
in XTOB_tau_Valid_flg_in STD_LOGIC_VECTOR( 7 downto 0)
8b XTOB tau has valid d
in mgt_enable_in STD_LOGIC_VECTOR( 48 downto 0)
out busy_tob std_logic
tob data busy out
in XTOB_eg_Valid_flg_in STD_LOGIC_VECTOR( 7 downto 0)
8b XTOB e/g has valid d
out IPb_out ipb_rbus
IPb_out signal going from slaves to master.
in XTOB_tau_sync_in STD_LOGIC
XTOB tau sync sig.
in TTC_L1A_ID_EXT_in STD_LOGIC_VECTOR( 7 downto 0)
Extended L1A ID provided by TTC - ECRID.
out TOB_out STD_LOGIC_VECTOR( 31 downto 0)
32b sorted XTOB/TOB out to MGT
in clk_load_in STD_LOGIC
40Mhz input signal at 20% duty cycle
in T_TOB_32b_in STD_LOGIC_VECTOR( 31 downto 0)
Sorted TOB data readout 32b * 7 in series, only 6 is used - F1 reads e/g TOBs and F2 reads tau TOBs.
in TTC_parity_in STD_LOGIC
Odd parity over ECR ID and L1A ID provided by TTC.
in T_TOB_sync_in STD_LOGIC
sorted TOB start signal
in L1A_in STD_LOGIC
L1A signal input.
in OUT_TOB_BCN std_logic_vector( 6 downto 0)
sorted TOB BC_ID with delay through ALGO/sorting block
in shelf_number STD_LOGIC_VECTOR( 3 downto 0)
shelf number input
out local_BCN_out STD_LOGIC_VECTOR( 11 downto 0)
Local BCN generated in Process FPGA.
in IPb_in ipb_wbus
IPb_in signal going from master to slaves.
in efex_slot_num STD_LOGIC_VECTOR( 3 downto 0)
eFEX slot number input
in ipb_clk std_logic
ipb_clk signal is input from master to slaves
in XTOB_eg_in AlgoXOutput
XTOBs e/g 64b * 8.
in TTC_L1A_ID_in STD_LOGIC_VECTOR( 23 downto 0)
L1A ID provided by TTC.
in clk_200M_in STD_LOGIC
200Mhz input signal
in OUT_XTOB_BCN std_logic_vector( 6 downto 0)
XTOB BC_ID with delay through ALGO/sorting block.
FPGA_NUMBER integer := 1
Integer used to distinguish different FPGAs having a slightly different firmware.
in TTC_read_all_in STD_LOGIC
Privilege Read signal input (previledge read)
out busy_raw std_logic
raw data busy out
in ECR_in STD_LOGIC
ECR signal input.
in RAW_ready_in std_logic
Ready signal from control FPGA to receive RAW calorimeter data.
in clk_40M_in STD_LOGIC
40Mhz input signal
in RAW_TXOUTCLK STD_LOGIC
Calorimeter TXOUTCLK to read Calorimeter data to MGT for transmission to control FPGA.
in hw_addr STD_LOGIC_VECTOR( 1 downto 0)
FPGA Hardware Address.
out TOB_out_is_char STD_LOGIC
32b data out to MGT is CHAR
in T_TOB_valid_in STD_LOGIC
sorted TOB valid signal
in RAW_data_in RAW_data_227_type
calorimeter data array 49 x 224b input frames
out RAW_out_is_char STD_LOGIC
calorimeter data 32b out to MGT is CHAR
in XTOB_eg_sync_in STD_LOGIC
XTOB e/g sync sig.
in clk_280M_in STD_LOGIC
280Mhz input signal
in clk_40M_rdout STD_LOGIC
40Mhz input signal used only for RAW data readout
Merged Sorted TOB and Local XTOB Readout Logic for process FPGA.
out T_TOB_FIFO_data_count STD_LOGIC_VECTOR( 8 downto 0)
sorted TOBs FIFO occupancy data count
in Link_output_FIFO_pFULL_THRESH_negate STD_LOGIC_VECTOR( 12 downto 0)
Link output FIFO (before MGT) partial full flag negate threshold.
in TOB_type_in STD_LOGIC
TOB Type 0 = e/g for pFPGA U1, TOB Type U1 = tau for pFPGA 2, also Zero for U3 & U4.
out tob_double_word_en STD_LOGIC
TOB double word enable to increments double word counter,.
in T_TOBs_FIFO_pFULL_THRESH_assert STD_LOGIC_VECTOR( 8 downto 0)
sorted TOBs FIFO prog FULL threshold assert
out Link_output_FIFO_rd_data_count STD_LOGIC_VECTOR( 12 downto 0)
Link output FIFO (before MGT) occupancy read data count.
out SPY_TOB_mem_wr_addr STD_LOGIC_VECTOR( 10 downto 0)
TOB/XTOB Readout SPY Memory register (read only)
in trigger_slice_in STD_LOGIC_VECTOR( 3 downto 0)
Trigger slice number - on L1A.
in tob_busy_thresh_assert STD_LOGIC_VECTOR( 8 downto 0)
sorted TOB BUSY flag threshold assert
in pre_ld_TOB_wr_addr STD_LOGIC_VECTOR( 8 downto 0)
latency pre load for TOB DRP wr address
in TOB_TXOUTCLK STD_LOGIC
280Mhz clk to read data into MGT
in DPR_locations_to_rd STD_LOGIC_VECTOR( 2 downto 0)
number of slices (DRP locations) to read 1 or 2 or 3
in RST_spy_mem_wr_addr std_logic
spy memory write address counter reset Pulse by software command
in TOBs_32b_in STD_LOGIC_VECTOR( 31 downto 0)
Sorted TOB data 32b * 7 in series, F1 reads e/g TOBs and F2 reads tau TOBs. Same firmware in both FPG...
in tob_busy_thresh_negate STD_LOGIC_VECTOR( 8 downto 0)
sorted TOB BUSY flag threshold de-assert
in TOBs_valid_flg_in STD_LOGIC
sorted TOB write signal
in XTOB_eg_FIFO_pFULL_THRESH_assert STD_LOGIC_VECTOR( 8 downto 0)
e/g XTOB FIFO prog FULL threshold assert
in cntr_load_en STD_LOGIC
latency pre-load enable for DRPAM write address
in XTOB_eg_FIFO_pFULL_THRESH_negate STD_LOGIC_VECTOR( 8 downto 0)
e/g XTOB FIFO prog FULL threshold de-assert
in ipbus_in_tob_dpram ipb_wbus
IPBus signal going to RAW SPY DPRAM.
in TOB_ready_in std_logic
Ready signal from control FPGA to receive TOBs data.
out tob_fsm_monitor std_logic_vector( 39 downto 0)
Monitor TOB Readout state machines.
in XTOB_tau_Valid_flg_in STD_LOGIC_VECTOR( 7 downto 0)
8b XTOB tau has valid data
out busy_tob std_logic
tob data busy out to control FPGA
in XTOB_eg_512b_in AlgoXOutput
array 8 x 64b words XTOB e/g
in XTOB_eg_Valid_flg_in STD_LOGIC_VECTOR( 7 downto 0)
8b XTOB e/g has valid data
in XTOB_tau_sync_in STD_LOGIC
XTOB tau sync signal.
out TOB_out_to_MGT STD_LOGIC_VECTOR( 31 downto 0)
Event TOBs 32b out to MGT.
in L1A_in STD_LOGIC
L1A signal input.
in XTOB_tau_FIFO_pFULL_THRESH_assert STD_LOGIC_VECTOR( 8 downto 0)
tau XTOB FIFO prog FULL threshold assert
in OUT_TOB_BCN std_logic_vector( 6 downto 0)
sorted TOB BCN with delay through ALGO/sorting block
out sync_280m_out STD_LOGIC
280MHz synch signal output
in shelf_number STD_LOGIC_VECTOR( 3 downto 0)
shelf number input
out ipbus_out_tob_dpram ipb_rbus
IPBus signal coming from RAW SPY DPRAM to IPBus.
out TOB_data_FIFO_flags STD_LOGIC_VECTOR( 31 downto 0)
TOB data block FIFO flags.
out TOB_out_to_MGT_is_char STD_LOGIC
data is char to MGT
in efex_slot_num STD_LOGIC_VECTOR( 3 downto 0)
eFEX slot number input
in ipb_clk std_logic
ipb_clk signal is input from master to slaves
in BCN_FIFO_pFULL_THRESH_negate std_logic_vector( 8 downto 0)
BCN FIFO partial full flag negate threshold.
out XTOB_eg_FIFO_rd_data_count STD_LOGIC_VECTOR( 8 downto 0)
occupancy counter of e/g XTOB FIFO - read clock
in T_TOBs_FIFO_pFULL_THRESH_negate STD_LOGIC_VECTOR( 8 downto 0)
sorted TOBs FIFO prog FULL threshold de-assert
in clk_200M_in STD_LOGIC
200Mhz input signal
in XTOB_tau_FIFO_pFULL_THRESH_negate STD_LOGIC_VECTOR( 8 downto 0)
tau XTOB FIFO prog FULL threshold de-assert
in BCN_ID_in STD_LOGIC_VECTOR( 11 downto 0)
BC Counter.
in OUT_XTOB_BCN std_logic_vector( 6 downto 0)
XTOB BCN with delay through ALGO/sorting block.
FPGA_NUMBER integer := 1
Integer used to distinguish different FPGAs having a slightly different firmware.
in L1A_ID_in STD_LOGIC_VECTOR( 31 downto 0)
8b Extended L1A ID & 24b LIA_ID of the L1A Counter
out L1A_ID_Event_out STD_LOGIC_VECTOR( 31 downto 0)
8b Ext L1A ID from TTC input + 24b L1A ID of counter from TTC FIFO - inserted in the event header
in clk_40M_in STD_LOGIC
40MHz clock input signal
in pre_ld_tau_XTOB_wr_addr STD_LOGIC_VECTOR( 8 downto 0)
latency pre load for tau XTOB DRP wr address
out BCN_FIFO_TOB_rd_data_count STD_LOGIC_VECTOR( 8 downto 0)
BCN & L1A FIFO occupancy for TOB Readout.
in Link_output_FIFO_pFULL_THRESH_assert STD_LOGIC_VECTOR( 12 downto 0)
Link output FIFO (before MGT) partial full flag assert threshold.
in hw_addr STD_LOGIC_VECTOR( 1 downto 0)
FPGA Hardware Address.
in pre_ld_eg_XTOB_wr_addr STD_LOGIC_VECTOR( 8 downto 0)
latency pre load for e/g XTOB DRP wr address
in BCN_FIFO_pFULL_THRESH_assert std_logic_vector( 8 downto 0)
BCN FIFO partial full flag assert threshold.
in TOB_FIFO_sw_rst std_logic
TOB Readout FIFO reset Pulse by software command.
in XTOB_eg_sync_in STD_LOGIC
XTOB e/g sync signal.
in read_on_err_in STD_LOGIC
Read RAW data on error flag.
in clk_280M_in STD_LOGIC
280MHz clock input signal
in XTOB_tau_512b_in AlgoXOutput
array 8 x 64b words XTOB tau
out XTOB_tau_FIFO_rd_data_count STD_LOGIC_VECTOR( 8 downto 0)
tau XTOBs FIFO occupancy data count - read clock
Observes BCN ID, L1A ID, and parity bits.
Generic Counter for process FPGA.
in CLK STD_LOGIC
Clock signal input.
in CE STD_LOGIC
Enable signal input.
out Q STD_LOGIC_VECTOR( width- 1 downto 0)
Counter Output signal.
in RST STD_LOGIC
Reset signal input.
IPBUS readout slave definitions of registers used in the Top Level Readout Block.
in RAW_data_FIFO_flags STD_LOGIC_VECTOR( 31 downto 0)
Full and Empty flags for all FIFOs in the RAW Readout Logic.
in ipbus_in_tob_dpram ipb_rbus
IPBus access bus signal coming from TOB SPY DPRAM.
out TOB_Link_output_FIFO_pFULL_THRESH_NEGATE STD_LOGIC_VECTOR( 12 downto 0)
Prog Full flag negate threshold for Link Output FIFO of TOBs Readout.
out RAW_FIFO_FULL_THRESH_ASSERT STD_LOGIC_VECTOR( 8 downto 0)
Full flag assert threshold for de-randomisation FIFO of RAW Data Readout.
out raw_fsm_monitor std_logic_vector( 31 downto 0)
Monitor RAW Readout state machines.
out TOB_WR_ADDR_OFFSET STD_LOGIC_VECTOR( 8 downto 0)
Write Address Offset for TOB circular DPRAM.
out trigger_slice STD_LOGIC_VECTOR( 3 downto 0)
Trigger slice number - on L1A.
in BCN_FIFO_RAW_rd_data_count STD_LOGIC_VECTOR( 31 downto 0)
BCN & L1A FIFO occupancy for RAW Readout.
in ipb_rst std_logic
IPBus Reset input.
out TOB_SLICES_TO_RD STD_LOGIC_VECTOR( 2 downto 0)
Number of cosecutive Slices to read from TOBs circular DPRAM.
in SPY_RAW_mem_wr_addr STD_LOGIC_VECTOR( 10 downto 0)
Current write address of RAW SPY Memory - used for IPBus access and to calculate occupancy.
in busy_tob_duration_counter STD_LOGIC_VECTOR( 31 downto 0)
Busy counter for TOB BUSY duration.
in tob_double_word_counter STD_LOGIC_VECTOR( 31 downto 0)
Number of identical TOB double words counter.
out TEST_CONTROL_REG STD_LOGIC_VECTOR( 31 downto 0)
Test Control Register at Top Level Readout Firmware.
in bcn_mismatch_cntr_debug std_logic_vector( 31 downto 0)
Mismatch error count on BCN.
out tob_busy_thresh_assert STD_LOGIC_VECTOR( 8 downto 0)
sorted TOB BUSY flag threshold assert
out BCN_FIFO_RAW_pFULL_THRESH_assert STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag assert threshold for TTC FIFO.
in RAW_FIFO_data_count STD_LOGIC_VECTOR( 31 downto 0)
Occupancy level ofde-randomisation FIFO of RAW Data Readout.
in TOB_data_FIFO_flags STD_LOGIC_VECTOR( 31 downto 0)
Full and Empty flags for all FIFOs in the TOBs Readout Logic.
out raw_busy_thresh_assert STD_LOGIC_VECTOR( 8 downto 0)
raw BUSY flag threshold assert
in busy_raw_counter STD_LOGIC_VECTOR( 31 downto 0)
Busy counter for RAW data buffers.
out XTOB_TAU_WR_ADDR_OFFSET STD_LOGIC_VECTOR( 8 downto 0)
Write Address Offset for XTOB tau circular DPRAM.
out BCN_FIFO_RAW_pFULL_THRESH_negate STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag negate threshold for TTC FIFO.
in l1id_parity_err_cntr_debug std_logic_vector( 31 downto 0)
Parity error count on L1A.
out tob_fsm_monitor std_logic_vector( 39 downto 0)
Monitor TOB Readout state machines.
out XTOB_TAU_FIFO_pFULL_THRESH_ASSERT STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag assert threshold for de-randomisation FIFO of XTOBs tau Readout.
out RDOUT_PULSE_REG STD_LOGIC_VECTOR( 31 downto 0)
Control Pulse Register for RAW Readout, all values are set to ZERO following a write to this register...
in XTOB_TAU_FIFO_DATA_COUNT STD_LOGIC_VECTOR( 31 downto 0)
Occupancy level of de-randomisation FIFO of XTOBs tau Readout.
out IPb_out ipb_rbus
IPBus output bus going from slaves to master.
out RAW_FIFO_pFULL_THRESH_ASSERT STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag assert threshold for de-randomisation FIFO of RAW Data Readout.
in RAW_frame_count STD_LOGIC_VECTOR( 31 downto 0)
Number of complete RAW Frames in Link Output FIFO to be transmitted to cFPGA.
in ttc_err_history_debug std_logic_vector( 31 downto 0)
History of last 8 TTC errors.
in SPY_TOB_mem_wr_addr STD_LOGIC_VECTOR( 10 downto 0)
Current write address of TOBs SPY Memory - used for IPBus access and to calculate occupancy.
out RAW_FIFO_pFULL_THRESH_NEGATE STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag negate threshold for de-randomisation FIFO of RAW Data Readout.
in L1A_ID STD_LOGIC_VECTOR( 31 downto 0)
8b Extended L1A ID + 24b L1A ID of L1A counter
out XTOB_EG_WR_ADDR_OFFSET STD_LOGIC_VECTOR( 8 downto 0)
Write Address Offset for XTOB e/g circular DPRAM.
out raw_busy_thresh_negate STD_LOGIC_VECTOR( 8 downto 0)
raw BUSY flag threshold de-assert
in l1a_id_err_debug std_logic_vector( 31 downto 0)
Shows last corrupt L1A ID.
in bcn_err_expected_debug std_logic_vector( 31 downto 0)
Error, bad BCN and expected BCN on BCN error.
in IPb_in ipb_wbus
IPBus input bus going from master to slaves.
in link_error_flags STD_LOGIC_VECTOR( 53 downto 0)
54-b error flags from the Error Flag FIFO to IPBUS register
in ipb_clk std_logic
IPBus Clock input.
in XTOB_EG_FIFO_DATA_COUNT STD_LOGIC_VECTOR( 31 downto 0)
Occupancy level of de-randomisation FIFO of XTOBs e/g Readout.
out XTOB_TAU_FIFO_pFULL_THRESH_NEGATE STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag negate threshold for de-randomisation FIFO of XTOBs tau Readout.
in l1a_id_good_debug std_logic_vector( 31 downto 0)
Shows last good L1A ID.
in TOB_FIFO_DATA_COUNT STD_LOGIC_VECTOR( 31 downto 0)
Occupancy level of de-randomisation FIFO of TOBs Readout.
out RAW_FIFO_FULL_THRESH_NEGATE STD_LOGIC_VECTOR( 8 downto 0)
Full flag negate threshold for de-randomisation FIFO of RAW Data Readout.
in busy_tob_counter STD_LOGIC_VECTOR( 31 downto 0)
Busy counter for TOB data buffers.
in real_time_40m_counter STD_LOGIC_VECTOR( 31 downto 0)
Real time 40MHz counter, counting number of 40MHz ticks.
out ipbus_out_tob_dpram ipb_wbus
IPBus access bus signal going to TOB SPY DPRAM.
in busy_raw_duration_counter STD_LOGIC_VECTOR( 31 downto 0)
Busy counter for RAW BUSY Duration.
in L1A_ID_Event STD_LOGIC_VECTOR( 31 downto 0)
8b Ext L1A ID from TTC input + 24b L1A ID of counter from TTC FIFO - inserted in the event header
in Link_output_FIFO_RAW_rd_data_count STD_LOGIC_VECTOR( 31 downto 0)
Occupancy level of Link Output FIFO of RAW Data Readout.
in BCN_FIFO_TOB_rd_data_count STD_LOGIC_VECTOR( 31 downto 0)
BCN & L1A FIFO occupancy for TOB Readout.
in bcn_parity_err_cntr_debug std_logic_vector( 31 downto 0)
Parity error count on BCN.
out Link_output_FIFO_RAW_pfull_thresh_assert STD_LOGIC_VECTOR( 12 downto 0)
Prog Full flag assert threshold for Link Output FIFO of RAW Data Readout.
out RAW_WR_ADDR_OFFSET STD_LOGIC_VECTOR( 9 downto 0)
Write Address Offset for RAW circular DPRAM.
out tob_busy_thresh_negate STD_LOGIC_VECTOR( 8 downto 0)
sorted TOB BUSY flag threshold de-assert
in l1a_id_expected_debug std_logic_vector( 31 downto 0)
Shows last expected L1A ID on error.
out TOB_FIFO_pFULL_THRESH_NEGATE STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag negate threshold for de-randomisation FIFO of TOBs Readout.
out Link_output_FIFO_RAW_pfull_thresh_negate STD_LOGIC_VECTOR( 12 downto 0)
Prog Full flag negate threshold for Link Output FIFO of RAW Data Readout.
out TOB_FIFO_pFULL_THRESH_ASSERT STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag assert threshold for de-randomisation FIFO of TOBs Readout.
out XTOB_EG_FIFO_pFULL_THRESH_ASSERT STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag assert threshold for de-randomisation FIFO of XTOBs e/g Readout.
in l1id_mismatch_cntr_debug std_logic_vector( 31 downto 0)
Mismatch error count on L1A.
out TOB_Link_output_FIFO_pFULL_THRESH_ASSERT STD_LOGIC_VECTOR( 12 downto 0)
Prog Full flag assert threshold for Link Output FIFO of TOBs Readout.
out ipbus_out_raw_dpram ipb_wbus
IPBus access bus signal going to RAW SPY DPRAM.
in TOB_LINK_OUTPUT_FIFO_RD_DATA_COUNT STD_LOGIC_VECTOR( 31 downto 0)
Occupancy level of Link Output FIFO of TOBs Readout.
in ipbus_in_raw_dpram ipb_rbus
IPBus access bus signal coming from RAW SPY DPRAM.
in BCN_in STD_LOGIC_VECTOR( 11 downto 0)
Bunch Crossing Number.
in L1A_debug_counter STD_LOGIC_VECTOR( 31 downto 0)
L1A_debug_counter.
in ECR_debug_counter STD_LOGIC_VECTOR( 31 downto 0)
ECR_debug_counter.
out XTOB_EG_FIFO_pFULL_THRESH_NEGATE STD_LOGIC_VECTOR( 8 downto 0)
Prog Full flag negate threshold for de-randomisation FIFO of XTOBs e/g Readout.
Instantiate tide mark calculation for a 16 bit data input.