23 use ieee.std_logic_1164.
all;
24 use ieee.numeric_std.
all;
27 use UNISIM.VCOMPONENTS.
ALL;
29 library TOB_rdout_lib;
36 library Infrastructure_lib;
95 constant DLY : time := 0 ns;
99 signal TOB_valid_out_i : array_8_of_5b;
101 signal SIPO_TOB_out_i : array_8_of_240b;
102 signal XTOB_sync_out_i : STD_LOGIC_VECTOR (7 downto 0);
104 signal DPR_XTOBs_in_i : array_8_of_252b;
105 signal DPR_XTOBs_out_i : array_8_of_252b;
106 signal FIFO_XTOB_data_out_i : array_8_of_252b;
107 signal XTOB_FIFO_wr_data_count_i : array_8_of_9b;
108 signal XTOB_FIFO_rd_data_count_i : array_8_of_9b;
110 signal DPR_XTOB_rd_addr_i : STD_LOGIC_VECTOR (8 downto 0);
111 signal DPR_XTOB_wr_addr_i : STD_LOGIC_VECTOR (8 downto 0);
112 signal DRP_XTOB_rd_en_i : STD_LOGIC;
113 signal FIFO_XTOB_wr_en_i : STD_LOGIC;
114 signal FIFO_XTOB_rd_en_i : STD_LOGIC;
115 signal XTOB_FIFO_valid_i : STD_LOGIC_VECTOR (7 downto 0);
116 signal XTOB_FIFO_valid_tmp : STD_LOGIC;
117 signal XTOB_FIFO_full_i : STD_LOGIC_VECTOR (7 downto 0);
118 signal XTOB_FIFO_full_tmp : STD_LOGIC;
119 signal XTOB_FIFO_empty_i : STD_LOGIC_VECTOR (7 downto 0);
120 signal XTOB_FIFO_empty_tmp : STD_LOGIC;
121 signal XTOB_FIFO_prog_full_i : STD_LOGIC_VECTOR (7 downto 0);
122 signal XTOB_FIFO_prog_full_tmp : STD_LOGIC;
123 signal ALGO_XTOB_BCN_out_i : std_logic_vector (6 downto 0);
128 attribute TIG : string ;
129 attribute TIG of XTOB_FIFO_rd_data_count_i : signal is "true" ;
131 attribute keep : string ;
132 attribute max_fanout : integer;
135 attribute keep of XTOB_FIFO_prog_full_i : signal is "true" ;
136 attribute max_fanout of XTOB_FIFO_prog_full_i : signal is 30;
138 attribute keep of XTOB_FIFO_valid_tmp : signal is "true" ;
139 attribute keep of XTOB_FIFO_full_tmp : signal is "true" ;
140 attribute keep of XTOB_FIFO_empty_tmp : signal is "true" ;
141 attribute keep of XTOB_FIFO_prog_full_tmp : signal is "true" ;
177 U2_XTOB_BCN_Delay :
entity Infrastructure_lib.
GeneralDelay
184 data_out => ALGO_XTOB_BCN_out_i
196 GEN_XTOB_RAM : for i in 0 to 7 GENERATE
198 U2_XTOBs_eg :
entity TOB_rdout_lib.
SIPO_unit -- convert
5 x
array of 48b XTOBs into one
240b words
for Circular DPRAMs
211 DPR_XTOBs_in_i(i) <= ALGO_XTOB_BCN_out_i & TOB_valid_out_i(i) & SIPO_TOB_out_i(i) ;
214 U3_XTOB_DRP : DPR_252b_512 -- XTOBs (
5*48b) +
5b valid +
7b XTOB_BCN
for 1 ALGO
block into DPRAM
218 wea => stdv
(XTOB_sync_out_i
(i
)) ,
219 addra => DPR_XTOB_wr_addr_i ,
220 dina => DPR_XTOBs_in_i
(i
) ,
222 enb => DRP_XTOB_rd_en_i ,
223 addrb => DPR_XTOB_rd_addr_i ,
224 doutb => DPR_XTOBs_out_i
(i
)
227 U5_XTOBs_FIFO : FIFO_252b_512 -- XXTOBs (
5*48b) +
5b valid +
7b XTOB_BCN
for 1 algo
block into FIFO
232 din => DPR_XTOBs_out_i
(i
) ,
233 wr_en => FIFO_XTOB_wr_en_i,
234 rd_en => FIFO_XTOB_rd_en_i,
235 dout => FIFO_XTOB_data_out_i
(i
) ,
238 wr_data_count => XTOB_FIFO_wr_data_count_i
(i
) ,
239 rd_data_count => XTOB_FIFO_rd_data_count_i
(i
) ,
240 full => XTOB_FIFO_full_i
(i
) ,
241 empty => XTOB_FIFO_empty_i
(i
) ,
242 valid => XTOB_FIFO_valid_i
(i
) ,
243 prog_full => XTOB_FIFO_prog_full_i
(i
)
246 END GENERATE GEN_XTOB_RAM ;
272 XTOB_FIFO_valid_tmp <= XTOB_FIFO_valid_i(2) ;
273 XTOB_FIFO_full_tmp <= XTOB_FIFO_full_i(2) ;
274 XTOB_FIFO_empty_tmp <= XTOB_FIFO_empty_i(2) ;
275 XTOB_FIFO_prog_full_tmp <= XTOB_FIFO_prog_full_i(2) ;
278 XTOB_FIFO_valid_tmp <= XTOB_FIFO_valid_i(3) ;
279 XTOB_FIFO_full_tmp <= XTOB_FIFO_full_i(3) ;
280 XTOB_FIFO_empty_tmp <= XTOB_FIFO_empty_i(3) ;
281 XTOB_FIFO_prog_full_tmp <= XTOB_FIFO_prog_full_i(3) ;
284 XTOB_FIFO_valid_tmp <= XTOB_FIFO_valid_i(0) ;
285 XTOB_FIFO_full_tmp <= XTOB_FIFO_full_i(0) ;
286 XTOB_FIFO_empty_tmp <= XTOB_FIFO_empty_i(0) ;
287 XTOB_FIFO_prog_full_tmp <= XTOB_FIFO_prog_full_i(0) ;
290 XTOB_FIFO_valid_tmp <= XTOB_FIFO_valid_i(4) ;
291 XTOB_FIFO_full_tmp <= XTOB_FIFO_full_i(4) ;
292 XTOB_FIFO_empty_tmp <= XTOB_FIFO_empty_i(4) ;
293 XTOB_FIFO_prog_full_tmp <= XTOB_FIFO_prog_full_i(4) ;
External data-types and functions.
( OUTPUT_TOBS- 1 downto 0) AlgoXTriggerObject AlgoXOutput
Algorithm XOUTPUT port.
Shift register for data delay.
XTOB SIPO for process FPGA.
in XTOB_sync_in STD_LOGIC
1b synch signal input
out XTOB_out STD_LOGIC_VECTOR( 239 downto 0)
5 XTOBs (34b) * 5 = 170b
out XTOB_sync_out STD_LOGIC
1b synch signal output
out XTOB_valid_out STD_LOGIC_VECTOR( 4 downto 0)
XTOBs valid signals 5b.
in XTOB_in STD_LOGIC_VECTOR( 47 downto 0)
33b XTOBs from 1 algo block
in XTOB_valid_in STD_LOGIC
1b XTOB valid signal
Top of Sorting XTOBs module for process FPGA.
Top of Sorting XTOBs module for process FPGA.
in XTOB_sync_in STD_LOGIC
XTOB sync signal.
out FIFO_XTOB_data_out array_8_of_252b
XTOBs output of fifo {array 8 of [(5*48b) + 5b valid] + 7b BCN}.
out XTOB_FIFO_empty STD_LOGIC
XTOBs FIFO empty flag.
in trigger_slice_in STD_LOGIC_VECTOR( 3 downto 0)
Trigger slice number - on L1A.
in DPR_locations_to_rd STD_LOGIC_VECTOR( 2 downto 0)
number of multi-slice locations to read from DPRAM
out XTOB_FIFO_prog_full STD_LOGIC
XTOBs FIFO prog full flag.
out XTOB_FIFO_valid STD_LOGIC
XTOBs FIFO data valid signal.
in XTOB_FIFO_pFULL_THRESH_negate STD_LOGIC_VECTOR( 8 downto 0)
Threshold to negate XTOB FIFO prog full flag.
out XTOB_FIFO_rd_data_count STD_LOGIC_VECTOR( 8 downto 0)
occupancy of XTOB derandomisation FIFO - read count
in XTOB_FIFO_sw_rst std_logic
TOB Readout FIFO reset Pulse by software command OR SYS_RST.
in L1A_in STD_LOGIC
L1A signal input.
in XTOB_512b_in AlgoXOutput
array 8 x 64b words XTOBs
in ALGO_XTOB_BCN_in std_logic_vector( 6 downto 0)
sorted XTOB BCN with delay through ALGO/sorting block
in FIFO_rd_en STD_LOGIC
read XTOB data into Shift Registers
in XTOB_FIFO_pFULL_THRESH_assert STD_LOGIC_VECTOR( 8 downto 0)
Threshold to assert XTOB FIFO prog full flag.
in clk_200M_in STD_LOGIC
200Mhz input signal
FPGA_NUMBER integer := 1
Integer used to distinguish different FPGAs having a slightly different firmware.
out XTOB_FIFO_full STD_LOGIC
XTOBs FIFO full flag.
in XTOB_Valid_flg_in STD_LOGIC_VECTOR( 7 downto 0)
8b XTOB has valid data
in pre_ld_wr_addr_XTOB STD_LOGIC_VECTOR( 8 downto 0)
latency pre-load for XTOB DRPAM write address
out xtob_data_dpram_fsm STD_LOGIC_VECTOR( 7 downto 0)
Monitor state machine status register.
in clk_280M_in STD_LOGIC
280Mhz input signal
Top of fsm_TOB_wr_to_FIFO for process FPGA.
in trigger_slice_in STD_LOGIC_VECTOR( 3 downto 0)
Trigger slice number - on L1A.
in SIPO_sync_in STD_LOGIC
SIPO TOBs synch signal input.
in DPR_locations_to_rd STD_LOGIC_VECTOR( 2 downto 0)
number of multi-slice locations to read from DPRAM
out DPR_rd_addr STD_LOGIC_VECTOR( 8 downto 0)
DPRAM read address.
out DRP_rd_en STD_LOGIC
DPRAM read enable.
in pre_ld_wr_addr STD_LOGIC_VECTOR( 8 downto 0)
latency pre-load for DRPAM write address
out FIFO_wr_en STD_LOGIC
enable sorted TOBs write into derandomisatiion FIFO
in L1A_in STD_LOGIC
L1A signal input.
in CLK_IN STD_LOGIC
Clock input signal.
in TOB_FIFO_sw_rst std_logic
TOB Readout FIFO reset Pulse by software command.
out tob_data_dpram_fsm STD_LOGIC_VECTOR( 7 downto 0)
Monitor state machine status register.
out DPR_wr_addr STD_LOGIC_VECTOR( 8 downto 0)
DPRAM write address.