![]() |
eFEX firmware
1.7.3
ATLAS l1-calo - electron and tau feature extraction firmware for eFEX boards
|
Merged Sorted TOB and Local XTOB Readout Logic for process FPGA. More...
Entities | |
| RTL | architecture |
| Merged Sorted TOB and Local XTOB Readout Logic for process FPGA. More... | |
Libraries | |
| ieee | |
| ipbus_lib | |
| UNISIM | |
| UNIMACRO | |
| TOB_rdout_lib | |
| algolib | |
Use Clauses | |
| std_logic_1164 | |
| numeric_std | |
| ipbus | |
| vcomponents | |
| TOB_rdout_ip_pkg | Package <TOB_rdout_ip_pkg> |
| data_type_pkg | Package <data_type_pkg> |
| AlgoDataTypes | Package <AlgoDataTypes> |
Generics | |
| FPGA_NUMBER | integer := 1 |
| Integer used to distinguish different FPGAs having a slightly different firmware. | |
Ports | ||
| RST | in | std_logic |
| hw_addr | in | STD_LOGIC_VECTOR ( 1 downto 0 ) |
| FPGA Hardware Address. | ||
| RST_spy_mem_wr_addr | in | std_logic |
| spy memory write address counter reset Pulse by software command | ||
| TOB_FIFO_sw_rst | in | std_logic |
| TOB Readout FIFO reset Pulse by software command. | ||
| XTOB_eg_512b_in | in | AlgoXOutput |
| array 8 x 64b words XTOB e/g | ||
| XTOB_eg_Valid_flg_in | in | STD_LOGIC_VECTOR ( 7 downto 0 ) |
| 8b XTOB e/g has valid data | ||
| XTOB_eg_sync_in | in | STD_LOGIC |
| XTOB e/g sync signal. | ||
| XTOB_tau_512b_in | in | AlgoXOutput |
| array 8 x 64b words XTOB tau | ||
| XTOB_tau_Valid_flg_in | in | STD_LOGIC_VECTOR ( 7 downto 0 ) |
| 8b XTOB tau has valid data | ||
| XTOB_tau_sync_in | in | STD_LOGIC |
| XTOB tau sync signal. | ||
| OUT_XTOB_BCN | in | std_logic_vector ( 6 downto 0 ) |
| XTOB BCN with delay through ALGO/sorting block. | ||
| TOBs_32b_in | 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 FPGAs, use hw addr to differentiate. | ||
| TOBs_sync_in | in | STD_LOGIC |
| sorted TOB start signal | ||
| TOBs_valid_flg_in | in | STD_LOGIC |
| sorted TOB write signal | ||
| OUT_TOB_BCN | in | std_logic_vector ( 6 downto 0 ) |
| sorted TOB BCN with delay through ALGO/sorting block | ||
| TOB_type_in | in | STD_LOGIC |
| TOB Type 0 = e/g for pFPGA U1, TOB Type U1 = tau for pFPGA 2, also Zero for U3 & U4. | ||
| read_on_err_in | in | STD_LOGIC |
| Read RAW data on error flag. | ||
| clk_40M_in | in | STD_LOGIC |
| 40MHz clock input signal | ||
| clk_200M_in | in | STD_LOGIC |
| 200Mhz input signal | ||
| clk_280M_in | in | STD_LOGIC |
| 280MHz clock input signal | ||
| TOB_TXOUTCLK | in | STD_LOGIC |
| 280Mhz clk to read data into MGT | ||
| shelf_number | in | STD_LOGIC_VECTOR ( 3 downto 0 ) |
| shelf number input | ||
| efex_slot_num | in | STD_LOGIC_VECTOR ( 3 downto 0 ) |
| eFEX slot number input | ||
| L1A_in | in | STD_LOGIC |
| L1A signal input. | ||
| BCN_ID_in | in | STD_LOGIC_VECTOR ( 11 downto 0 ) |
| BC Counter. | ||
| L1A_ID_in | in | STD_LOGIC_VECTOR ( 31 downto 0 ) |
| 8b Extended L1A ID & 24b LIA_ID of the L1A Counter | ||
| TOB_ready_in | in | std_logic |
| Ready signal from control FPGA to receive TOBs data. | ||
| TOB_out_to_MGT_is_char | out | STD_LOGIC |
| data is char to MGT | ||
| TOB_out_to_MGT | out | STD_LOGIC_VECTOR ( 31 downto 0 ) |
| Event TOBs 32b out to MGT. | ||
| L1A_ID_Event_out | 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 | ||
| pre_ld_TOB_wr_addr | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| latency pre load for TOB DRP wr address | ||
| pre_ld_eg_XTOB_wr_addr | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| latency pre load for e/g XTOB DRP wr address | ||
| pre_ld_tau_XTOB_wr_addr | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| latency pre load for tau XTOB DRP wr address | ||
| cntr_load_en | in | STD_LOGIC |
| latency pre-load enable for DRPAM write address | ||
| DPR_locations_to_rd | in | STD_LOGIC_VECTOR ( 2 downto 0 ) |
| number of slices (DRP locations) to read 1 or 2 or 3 | ||
| trigger_slice_in | in | STD_LOGIC_VECTOR ( 3 downto 0 ) |
| Trigger slice number - on L1A. | ||
| TOB_data_FIFO_flags | out | STD_LOGIC_VECTOR ( 31 downto 0 ) |
| TOB data block FIFO flags. | ||
| XTOB_eg_FIFO_rd_data_count | out | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| occupancy counter of e/g XTOB FIFO - read clock | ||
| XTOB_eg_FIFO_pFULL_THRESH_assert | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| e/g XTOB FIFO prog FULL threshold assert | ||
| XTOB_eg_FIFO_pFULL_THRESH_negate | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| e/g XTOB FIFO prog FULL threshold de-assert | ||
| XTOB_tau_FIFO_rd_data_count | out | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| tau XTOBs FIFO occupancy data count - read clock | ||
| XTOB_tau_FIFO_pFULL_THRESH_assert | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| tau XTOB FIFO prog FULL threshold assert | ||
| XTOB_tau_FIFO_pFULL_THRESH_negate | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| tau XTOB FIFO prog FULL threshold de-assert | ||
| T_TOB_FIFO_data_count | out | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| sorted TOBs FIFO occupancy data count | ||
| T_TOBs_FIFO_pFULL_THRESH_assert | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| sorted TOBs FIFO prog FULL threshold assert | ||
| T_TOBs_FIFO_pFULL_THRESH_negate | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| sorted TOBs FIFO prog FULL threshold de-assert | ||
| tob_busy_thresh_assert | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| sorted TOB BUSY flag threshold assert | ||
| tob_busy_thresh_negate | in | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| sorted TOB BUSY flag threshold de-assert | ||
| BCN_FIFO_pFULL_THRESH_assert | in | std_logic_vector ( 8 downto 0 ) |
| BCN FIFO partial full flag assert threshold. | ||
| BCN_FIFO_pFULL_THRESH_negate | in | std_logic_vector ( 8 downto 0 ) |
| BCN FIFO partial full flag negate threshold. | ||
| BCN_FIFO_TOB_rd_data_count | out | STD_LOGIC_VECTOR ( 8 downto 0 ) |
| BCN & L1A FIFO occupancy for TOB Readout. | ||
| Link_output_FIFO_pFULL_THRESH_assert | in | STD_LOGIC_VECTOR ( 12 downto 0 ) |
| Link output FIFO (before MGT) partial full flag assert threshold. | ||
| Link_output_FIFO_pFULL_THRESH_negate | in | STD_LOGIC_VECTOR ( 12 downto 0 ) |
| Link output FIFO (before MGT) partial full flag negate threshold. | ||
| Link_output_FIFO_rd_data_count | out | STD_LOGIC_VECTOR ( 12 downto 0 ) |
| Link output FIFO (before MGT) occupancy read data count. | ||
| SPY_TOB_mem_wr_addr | out | STD_LOGIC_VECTOR ( 10 downto 0 ) |
| TOB/XTOB Readout SPY Memory register (read only) | ||
| ipb_clk | in | std_logic |
| ipb_clk signal is input from master to slaves | ||
| ipbus_out_tob_dpram | out | ipb_rbus |
| IPBus signal coming from RAW SPY DPRAM to IPBus. | ||
| ipbus_in_tob_dpram | in | ipb_wbus |
| IPBus signal going to RAW SPY DPRAM. | ||
| busy_tob | out | std_logic |
| tob data busy out to control FPGA | ||
| sync_280m_out | out | STD_LOGIC |
| 280MHz synch signal output | ||
| tob_double_word_en | out | STD_LOGIC |
| TOB double word enable to increments double word counter,. | ||
| tob_fsm_monitor | out | std_logic_vector ( 39 downto 0 ) |
| Monitor TOB Readout state machines. | ||
Merged Sorted TOB and Local XTOB Readout Logic for process FPGA.
This module received Merged Sorted TOB and Local XTOB data and produces events of 32b words for transmission to control FPGA
This module is only instanstiated for Process FPGA 1 and 2, and is disabled for Process FPGA 3 and 4.
Different TOB/XTOB data event are generated depending on FPGA Number, buffer levels and control settings.
The Merging FPGAs generate TOB/XTOB data events which consist of maximum 20 tau XTOBs, 20 e/g XTOBs and up to 6 TOBs.
The Non-Merging FPGAs generate XTOB data events which consist of maximum 20 tau XTOBs, 20 e/g XTOBs and do not include Merged TOBs.
Sequence of Buffers occupancy levels:
Under Safe Mode operation if the occupancy of TTC FIFO or TOB/XTOB Data FIFO, reaches its FULL occupancy level, then the system synchronisation is lost.
The output of TOB Readout is:
Header Word 1:
Header Word 2:
Trailer Word 1: Slice Trailer
Trailer Word 2: Event Trailer
CHAR constants are defined in data_type_pkg.vhd
TRIGGER SLICE:
07/03/2024 Due to intermitent read error of L1_ID, and further investigations, we found that the input to L1_ID & BNCN FIFO has crossed clock domain from 40MHz to 280MHz. To rule out this may be the cause of error, it was decided to remove read_on_err_in signal from the slice trailer and set it to ZERO.
Definition at line 149 of file TOBs_rdout.vhd.
1.9.1