13 use IEEE.STD_LOGIC_1164.
ALL;
15 use IEEE.NUMERIC_STD.
ALL;
17 library TOB_rdout_lib;
54 signal SIPO_sync_in_i : std_logic ;
55 signal FIFO_wr_en_i : std_logic := '0' ;
56 signal DRP_rd_en_i : std_logic ;
57 signal DPR_rd_addr_i : STD_LOGIC_VECTOR (8 downto 0);
58 signal DPR_rd_addr_tmp : unsigned (8 downto 0);
59 signal DPR_wr_addr_i : STD_LOGIC_VECTOR (8 downto 0);
61 signal slice_count_i : unsigned (2 downto 0);
64 attribute keep : string ;
65 attribute max_fanout : integer;
66 attribute keep of DPR_wr_addr_i : signal is "true" ;
67 attribute max_fanout of DPR_wr_addr_i : signal is 40;
68 attribute keep of DPR_rd_addr_i : signal is "true" ;
69 attribute max_fanout of DPR_rd_addr_i : signal is 40;
70 attribute keep of FIFO_wr_en_i : signal is "true" ;
71 attribute max_fanout of FIFO_wr_en_i : signal is 40;
72 attribute keep of DRP_rd_en_i : signal is "true" ;
73 attribute max_fanout of DRP_rd_en_i : signal is 40;
85 SIGNAL current_state : STATE_TYPE;
86 signal count : integer range 0 to 7;
87 signal tmp : std_logic_vector (7 downto 0);
103 U0_clk_proc :
process (
CLK_IN)
107 DPR_wr_addr_i <= std_logic_vector ( unsigned(pre_ld_wr_addr) + unsigned(DPR_rd_addr_i) ) ;
119 CE => SIPO_sync_in_i ,
127 U3_rd_XTOB_fsm :
process (
CLK_IN)
132 current_state <= idle ;
133 FIFO_wr_en_i <= '0' ;
136 DPR_rd_addr_tmp <= (others => '0');
139 CASE current_state is
146 current_state <= ser_1 ;
149 current_state <= idle ;
154 if slice_count_i = count then
155 current_state <= ser_4 ;
160 current_state <= ser_1 ;
161 DPR_rd_addr_tmp <= DPR_rd_addr_tmp + 1 ;
169 FIFO_wr_en_i <= '0' ;
172 current_state <= idle ;
175 current_state <= ser_4;
185 tmp <= std_logic_vector(to_unsigned(count, tmp'length));
Top of fsm_TOB_wr_to_FIFO for process FPGA.
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.