101 use ieee.std_logic_1164.
all;
102 use ieee.numeric_std.
all;
105 use ipbus_lib.ipbus.
all;
108 use UNISIM.vcomponents.
all;
111 use UNIMACRO.vcomponents.
all;
113 library TOB_rdout_lib;
221 signal DPR_rd_addr_i : std_logic_vector (9 downto 0);
222 signal DPR_wr_addr_i : std_logic_vector (9 downto 0);
223 signal DPR_rd_addr_i_1dly : std_logic_vector (9 downto 0);
224 signal DPR_wr_addr_i_1dly : std_logic_vector (9 downto 0);
226 signal FIFO_RAW_Data_dout_i : DPR_RAW_out_36_type;
227 signal FIFO_RAW_Data_dout_i_1dly : DPR_RAW_out_36_type;
229 signal link_error_flags_tmp : link_error_type;
230 signal link_err_4b_in_i : std_logic_vector (3 downto 0);
231 signal channel_error_49b_i : std_logic_vector (48 downto 0);
232 signal link_error_flags_54b_i : std_logic_vector (53 downto 0);
233 signal FIFO_error_flags_54b_i : std_logic_vector (53 downto 0);
234 signal req_err_rd_raw_i : std_logic := '0';
235 signal FIFO_error_flags_valid_i : std_logic;
238 signal PISO_data_out_i : DPR_RAW_out_36_type;
239 signal DPR_RAW_out_i : DPR_RAW_out_36_type;
240 signal DPR_RAW_out_i_1dly : DPR_RAW_out_36_type;
242 signal RST_i : std_logic;
243 signal Read_all_i : std_logic;
244 signal RAW_FIFO_sw_rst_i : std_logic;
245 signal clk_in_280M_i : std_logic;
246 signal PISO_sync_out_i : t_49_arr_1b;
247 signal PISO_data_out_valid_i : t_49_arr_1b;
249 signal L1A_in_i, L1A_in_1dly : std_logic;
250 signal L1A_in_a : std_logic;
251 signal L1A_in_b : std_logic;
252 signal DRP_rd_en_i : std_logic;
253 signal DRP_rd_en_i_1dly : std_logic;
255 signal FIFO_wr_en_i : std_logic;
256 signal FIFO_wr_en_i_1dly : std_logic;
257 signal FIFO_wr_en_i_2dly : t_49_arr_1b;
258 signal FIFO_rd_en_i : t_49_arr_1b;
260 signal BCN_FIFO_rd_en_i : std_logic;
261 signal en_error_valid_i : std_logic;
262 signal en_error_valid_1dly, en_error_valid_2dly, en_error_valid_3dly : std_logic;
263 signal en_error_valid_4dly : std_logic;
265 signal link_err_FIFO_empty_i : std_logic;
266 signal BCN_FIFO_full_i : std_logic;
267 signal BCN_FIFO_empty_i : std_logic;
268 signal BCN_FIFO_valid_i : std_logic;
269 signal BCN_FIFO_prog_full_i : std_logic;
270 signal BCN_FIFO_Data_in_i : std_logic_vector(46 downto 0);
271 signal BCN_FIFO_Data_out_i : std_logic_vector(46 downto 0);
273 signal BCN_FIFO_pFULL_THRESH_assert_i : std_logic_vector(8 downto 0);
274 signal BCN_FIFO_pFULL_THRESH_negate_i : std_logic_vector(8 downto 0);
276 signal Link_output_FIFO_RAW_pfull_thresh_assert_i : std_logic_vector(12 downto 0);
277 signal Link_output_FIFO_RAW_pfull_thresh_negate_i : std_logic_vector(12 downto 0);
279 signal RAW_data_FIFO_pFULL_THRESH_assert_i : std_logic_vector(8 downto 0);
280 signal RAW_data_FIFO_pFULL_THRESH_negate_i : std_logic_vector(8 downto 0);
281 signal RAW_data_FIFO_count_i : std_logic_vector(8 downto 0);
282 signal FIFO_RAW_Data_prog_full_i : std_logic_vector(48 downto 0);
283 signal FIFO_RAW_Data_full_i : std_logic;
284 signal FIFO_RAW_Data_empty_i : std_logic_vector(48 downto 0);
285 signal FIFO_RAW_Data_valid_i : t_49_arr_1b;
286 signal FIFO_RAW_Data_valid_i_1dly : t_49_arr_1b;
287 signal sync_280m_i : t_49_arr_1b;
289 signal FIFO_RAW_Data_prog_full_tmp : std_logic;
290 signal FIFO_RAW_Data_empty_tmp : std_logic;
292 signal frame_cntr_dec_en_i : std_logic;
293 signal frame_counter_dec_en_i : std_logic;
294 signal op_fifo_frame_count_i : std_logic_vector (11 downto 0);
295 signal frame_cntr_en_i, frame_cntr_en_ii : std_logic;
296 signal RAW_out_valid_i, RAW_data_out_valid_i, RAW_out_valid_1dly : std_logic;
297 signal RAW_out_char_MGT_i : std_logic;
298 signal RAW_data_out_MGT_i : std_logic_vector(31 downto 0);
299 signal RAW_out_is_char_i, RAW_out_to_MGT_is_char_i, RAW_out_char_MGT_1dly : std_logic;
300 signal RAW_out_i, q_int, RAW_data_out_i, RAW_data_out_1dly : std_logic_vector(31 downto 0);
302 signal FIFO_RAW_in_i : std_logic_vector(32 downto 0);
304 signal Link_output_FIFO_RAW_out_i : std_logic_vector (32 downto 0);
305 signal Link_output_FIFO_rd_en_i : std_logic;
306 signal Link_output_FIFO_RAW_valid_i : std_logic;
308 signal Link_output_FIFO_full_i : std_logic;
309 signal Link_output_FIFO_empty_i : std_logic;
310 signal Link_output_FIFO_prog_full_i : std_logic;
312 signal reg1, reg2 : std_logic := '0';
313 signal RAW_safe_mode_i : std_logic;
314 signal RAW_busy_assert_i : std_logic;
318 signal enable_raw_spy_mem_wr : std_logic;
319 signal SPY_mem_wr_addr_i : std_logic_vector (10 downto 0);
320 signal SPY_mem_wr_addr_en_i : std_logic;
321 signal SPY_mem_rd_data_i : std_logic_vector (35 downto 0);
322 signal RAW_data_FIFO_flags_i : std_logic_vector (31 downto 0);
323 signal delayed_crc_error_i : std_logic_vector (48 downto 0);
324 signal busy_raw_i : std_logic;
325 signal SPY_mem_wr_addr_tc_i : std_logic;
328 type DPRAM_addr_1b_type is array ((chan_no - 1) downto 0) of std_logic_vector (0 downto 0);
329 type RAW_fifo_d_count_type is array ((chan_no - 1) downto 0) of std_logic_vector (8 downto 0);
330 signal data_count_i : RAW_fifo_d_count_type;
332 signal LO_FIFO_RAW_rd_data_count_i : std_logic_vector (12 downto 0);
333 signal LO_FIFO_RAW_wr_data_count_i : std_logic_vector (12 downto 0);
334 signal RAW_data_in_1dly : RAW_data_227_type;
335 signal raw_data_dpram_fsm_i, raw_data_mux_fsm_i, raw_data_mgt_fsm_i : std_logic_vector (7 downto 0);
338 attribute mark_debug : string;
339 attribute keep : string;
340 attribute max_fanout : integer;
342 attribute keep of RAW_out_valid_i : signal is "true";
343 attribute max_fanout of RAW_out_valid_i : signal is 100;
345 attribute keep of FIFO_RAW_in_i : signal is "true";
347 attribute keep of RAW_FIFO_sw_rst_i : signal is "true";
348 attribute max_fanout of RAW_FIFO_sw_rst_i : signal is 100;
350 attribute keep of FIFO_wr_en_i_2dly : signal is "true";
351 attribute max_fanout of FIFO_wr_en_i_2dly : signal is 30;
353 attribute keep of FIFO_rd_en_i : signal is "true";
354 attribute max_fanout of FIFO_rd_en_i : signal is 30;
356 attribute keep of FIFO_wr_en_i : signal is "true";
357 attribute max_fanout of FIFO_wr_en_i : signal is 30;
359 attribute keep of SPY_mem_wr_addr_en_i : signal is "true";
360 attribute max_fanout of SPY_mem_wr_addr_en_i : signal is 30;
362 attribute keep of BCN_FIFO_empty_i : signal is "true";
363 attribute max_fanout of BCN_FIFO_empty_i : signal is 30;
364 attribute keep of Link_output_FIFO_prog_full_i : signal is "true";
365 attribute max_fanout of Link_output_FIFO_prog_full_i : signal is 30;
366 attribute keep of FIFO_RAW_Data_prog_full_i : signal is "true";
367 attribute max_fanout of FIFO_RAW_Data_prog_full_i : signal is 30;
369 attribute keep of DPR_wr_addr_i_1dly : signal is "true";
370 attribute max_fanout of DPR_wr_addr_i_1dly : signal is 30;
372 attribute keep of RAW_data_out_1dly : signal is "true";
373 attribute keep of RAW_out_valid_1dly : signal is "true";
374 attribute keep of RAW_data_out_MGT_i : signal is "true";
375 attribute keep of RAW_out_char_MGT_i : signal is "true";
376 attribute keep of RAW_data_out_i : signal is "true";
377 attribute keep of RAW_data_out_valid_i : signal is "true";
378 attribute keep of BCN_FIFO_Data_in_i : signal is "true";
380 attribute keep of RAW_data_in_1dly : signal is "true";
381 attribute keep of PISO_data_out_i : signal is "true";
382 attribute keep of FIFO_RAW_Data_dout_i : signal is "true";
383 attribute keep of delayed_crc_error_i : signal is "true";
414 RAW_data_FIFO_flags_i(0) <= FIFO_RAW_Data_empty_tmp;
415 RAW_data_FIFO_flags_i(1) <= FIFO_RAW_Data_prog_full_tmp;
416 RAW_data_FIFO_flags_i(2) <= FIFO_RAW_Data_full_i;
418 RAW_data_FIFO_flags_i(3) <= BCN_FIFO_empty_i;
419 RAW_data_FIFO_flags_i(4) <= BCN_FIFO_prog_full_i;
420 RAW_data_FIFO_flags_i(5) <= BCN_FIFO_full_i;
422 RAW_data_FIFO_flags_i(6) <= Link_output_FIFO_empty_i;
423 RAW_data_FIFO_flags_i(7) <= Link_output_FIFO_prog_full_i;
424 RAW_data_FIFO_flags_i(8) <= Link_output_FIFO_full_i;
426 RAW_data_FIFO_flags_i(9) <= RAW_safe_mode_i;
428 RAW_data_FIFO_flags_i(11) <= busy_raw_i;
429 RAW_data_FIFO_flags_i(31 downto 12) <= (others => '0');
435 raw_fsm_monitor <= X"00" & raw_data_mgt_fsm_i & raw_data_mux_fsm_i & raw_data_dpram_fsm_i ;
437 U0_clk :
process (clk_in_280M_i)
439 if rising_edge (clk_in_280M_i) then
440 FIFO_RAW_Data_prog_full_tmp <= OR FIFO_RAW_Data_prog_full_i;
441 FIFO_RAW_Data_empty_tmp <= OR FIFO_RAW_Data_empty_i;
463 clk => clk_in_280M_i,
464 rst => RAW_FIFO_sw_rst_i,
467 fifo_data_count => data_count_i
(22),
468 busy_flag => busy_raw_i
482 GEN_CHANNEL : for i in 0 to chan_no-1 generate
504 U2_PISO_RAW :
entity TOB_rdout_lib.
PISO_RAW_data -- convert
224b to 7 x
32b words
for Circular DPR
506 RST => RAW_FIFO_sw_rst_i,
516 U3_DPRAM_RAW_Data : DPR_36b_1024 -- it
is in the IP
package
518 clka => clk_in_280M_i,
520 wea => stdv
(PISO_data_out_valid_i
(i
)),
521 addra => DPR_wr_addr_i_1dly,
522 dina => PISO_data_out_i
(i
),
523 clkb => clk_in_280M_i,
524 enb => DRP_rd_en_i_1dly,
525 addrb => DPR_rd_addr_i_1dly,
526 doutb => DPR_RAW_out_i
(i
)
530 U4_FIFO_RAW_Data : FIFO_36b_512 -- the flags from these
49 FIFOs are
not used
532 srst => RAW_FIFO_sw_rst_i,
533 clk => clk_in_280M_i,
534 din => DPR_RAW_out_i_1dly
(i
),
535 wr_en => FIFO_wr_en_i_2dly
(i
),
536 rd_en => FIFO_rd_en_i
(i
),
537 dout => FIFO_RAW_Data_dout_i
(i
),
538 valid => FIFO_RAW_Data_valid_i
(i
),
539 prog_full_thresh_assert => RAW_data_FIFO_pFULL_THRESH_assert_i,
540 prog_full_thresh_negate => RAW_data_FIFO_pFULL_THRESH_negate_i,
541 data_count => data_count_i
(i
),
542 prog_full => FIFO_RAW_Data_prog_full_i
(i
),
544 empty => FIFO_RAW_Data_empty_i
(i
)
549 U5_1_clk :
process (clk_in_280M_i)
551 if rising_edge (clk_in_280M_i) then
553 FIFO_RAW_Data_dout_i_1dly(i) <= FIFO_RAW_Data_dout_i(i);
554 FIFO_RAW_Data_valid_i_1dly(i) <= FIFO_RAW_Data_valid_i(i);
556 DPR_RAW_out_i_1dly(i) <= DPR_RAW_out_i(i);
557 link_error_flags_tmp(i) <= DPR_RAW_out_i_1dly(i)(35 downto 32);
559 FIFO_wr_en_i_2dly(i) <= FIFO_wr_en_i_1dly and (not(FIFO_RAW_Data_prog_full_i(i)));
564 end generate GEN_CHANNEL;
573 (clk_in => clk_in_280M_i,
574 rst_in => RAW_FIFO_sw_rst_i,
597 link_error_flags_54b_i <= req_err_rd_raw_i & link_err_4b_in_i & channel_error_49b_i;
602 U5_FIFO_link_err : FIFO_54b_512
604 rst => RAW_FIFO_sw_rst_i,
605 wr_clk => clk_in_280M_i,
606 rd_clk => clk_in_280M_i,
607 din => link_error_flags_54b_i,
608 wr_en => en_error_valid_4dly,
609 rd_en => BCN_FIFO_rd_en_i,
610 dout => FIFO_error_flags_54b_i,
611 valid => FIFO_error_flags_valid_i,
613 empty => link_err_FIFO_empty_i
623 RST => RAW_FIFO_sw_rst_i,
639 rst_in => RAW_FIFO_sw_rst_i,
640 clk_in => clk_in_280M_i,
648 U5c_1_clk :
process (clk_in_280M_i)
650 if rising_edge (clk_in_280M_i) then
651 DPR_rd_addr_i_1dly <= DPR_rd_addr_i;
652 DPR_wr_addr_i_1dly <= DPR_wr_addr_i;
653 DRP_rd_en_i_1dly <= DRP_rd_en_i;
654 FIFO_wr_en_i_1dly <= FIFO_wr_en_i;
656 en_error_valid_1dly <= en_error_valid_i;
657 en_error_valid_2dly <= en_error_valid_1dly;
658 en_error_valid_3dly <= en_error_valid_2dly;
659 en_error_valid_4dly <= en_error_valid_3dly;
674 U6_FIFO_BCN_L1A : FIFO_47b_512 -- the flags from this FIFO
is used
676 rst => RAW_FIFO_sw_rst_i,
678 rd_clk => clk_in_280M_i,
679 din => BCN_FIFO_Data_in_i,
681 rd_en => BCN_FIFO_rd_en_i,
682 dout => BCN_FIFO_Data_out_i,
683 valid => BCN_FIFO_valid_i,
685 prog_full_thresh_assert => BCN_FIFO_pFULL_THRESH_assert_i,
686 prog_full_thresh_negate => BCN_FIFO_pFULL_THRESH_negate_i,
687 prog_full => BCN_FIFO_prog_full_i,
688 full => BCN_FIFO_full_i,
689 empty => BCN_FIFO_empty_i
711 RST => RAW_FIFO_sw_rst_i,
738 FIFO_RAW_in_i <= RAW_out_is_char_i & RAW_out_i;
750 U8_RAW_Link_output_FIFO : FIFO_33b_8192
752 wr_rst => RAW_FIFO_sw_rst_i,
753 wr_clk => clk_in_280M_i,
754 wr_en => RAW_out_valid_i,
755 din => FIFO_RAW_in_i,
756 rd_rst => RAW_FIFO_sw_rst_i,
758 rd_en => Link_output_FIFO_rd_en_i,
759 dout => Link_output_FIFO_RAW_out_i,
760 full => Link_output_FIFO_full_i,
761 empty => Link_output_FIFO_empty_i,
762 prog_full => Link_output_FIFO_prog_full_i,
763 valid => Link_output_FIFO_RAW_valid_i,
764 prog_full_thresh_assert => Link_output_FIFO_RAW_pfull_thresh_assert_i,
765 prog_full_thresh_negate => Link_output_FIFO_RAW_pfull_thresh_negate_i,
766 wr_data_count => LO_FIFO_RAW_wr_data_count_i,
767 rd_data_count => LO_FIFO_RAW_rd_data_count_i
800 clk_src => clk_in_280M_i ,
801 rst_src => RAW_FIFO_sw_rst_i ,
802 pulse_src => frame_cntr_en_i,
804 pulse_dest => frame_cntr_en_ii
819 RST => RAW_FIFO_sw_rst_i,
820 UP => frame_cntr_en_ii,
821 DOWN => frame_cntr_dec_en_i,
822 Q => op_fifo_frame_count_i
829 RAW_data_out_1dly <= RAW_data_out_i;
830 RAW_data_out_MGT_i <= RAW_data_out_1dly;
831 RAW_out_char_MGT_1dly <= RAW_out_to_MGT_is_char_i;
832 RAW_out_char_MGT_i <= RAW_out_char_MGT_1dly;
833 RAW_out_valid_1dly <= RAW_data_out_valid_i;
838 SPY_mem_wr_addr_en_i <= (RAW_out_valid_1dly and enable_raw_spy_mem_wr);
846 U12_RAW_SPY_mem :
entity ipbus_lib.ipbus_dpram
856 we => SPY_mem_wr_addr_en_i,
857 d => RAW_data_out_1dly,
859 addr => SPY_mem_wr_addr_i
874 CE => SPY_mem_wr_addr_en_i,
877 Q => SPY_mem_wr_addr_i
886 enable_raw_spy_mem_wr <= '1';
888 if SPY_mem_wr_addr_i = "11111111111" then
889 enable_raw_spy_mem_wr <= '0';
893 end process U14_stop_wr;
FSM to read RAW Event data from Link Output FIFO to MGT for process FPGA.
out RAW_data_out STD_LOGIC_VECTOR( 31 downto 0)
32b RAW to connect to output MGT to control FPGA
in frame_counter STD_LOGIC_VECTOR( 11 downto 0)
Frame counter register.
in FIFO_MGT_TOBs STD_LOGIC_VECTOR( 32 downto 0)
RAW from Link Output FIFO.
out FIFO_MGT_rd_en STD_LOGIC
Read enalbe singal to Link Output FIFO.
out raw_data_mgt_fsm STD_LOGIC_VECTOR( 7 downto 0)
Monitor state machine status register.
in LO_FIFO_empty std_logic
Link Output FIFO Empty Flag.
out RAW_data_is_char STD_LOGIC
RAW is CHAR to connect to output MGT to control FPGA.
out RAW_data_out_valid STD_LOGIC
RAW is valid signal to wr to SPY memory.
out frame_counter_dec_en STD_LOGIC
Decrement Frame Counter.
in RAW_ready_in std_logic
Ready signal from control FPGA to receive RAW data from process FPGA.
in TOB_FIFO_sw_rst std_logic
TOB Readout FIFO reset Pulse by software command ORed with SYS_RST.
in FIFO_MGT_TOB_valid STD_LOGIC
RAW from Link Output FIFO valid signal.
Calorimeter data PISO for process FPGA.
in data_sync_in STD_LOGIC
calorimeter data valid/synch signal
in RAW_link_data_in STD_LOGIC_VECTOR( 226 downto 0)
calorimeter data array 49 x 227b input frames
out data_out_valid STD_LOGIC
calorimeter data valid signal out
out data_sync_out STD_LOGIC
calorimeter data synch signal out
in clk_in_280M STD_LOGIC
280MHz clock input signal
out data_out STD_LOGIC_VECTOR( 35 downto 0)
calorimeter Error & Data out 36b
RAW Calorimeter Data Readout Logic for process FPGA.
integer := 49 chan_no
number of input fibres
std_logic RAW_ready_in_i
Control FPGA Ready signal internal.
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
Generate Full Flag for RAW data de-randomisation FIFO.
out full_flag_out STD_LOGIC
Full Flag for RAW input FIFO.
in negate_count_in STD_LOGIC_VECTOR( 8 downto 0)
negate count input to set Full Flag
in assert_count_in STD_LOGIC_VECTOR( 8 downto 0)
assert count input to set Full Flag
in fifo_data_count STD_LOGIC_VECTOR( 8 downto 0)
RAW FIFO data count input.
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.
in CLK STD_LOGIC
Clock signal input.
in DOWN STD_LOGIC
Count DOWN 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.
in UP STD_LOGIC
Count UP signal input.
Transfer calorimeter data from Circular DPRAM to de-randomisation FIFO.
out DPR_wr_addr STD_LOGIC_VECTOR( 9 downto 0)
DPRAM write address.
out DPR_rd_addr STD_LOGIC_VECTOR( 9 downto 0)
DPRAM read address.
out DRP_rd_en STD_LOGIC
DPRAM read enable.
out FIFO_wr_en STD_LOGIC
FIFO write enable.
in L1A_in STD_LOGIC
TTC L1A input.
out raw_data_dpram_fsm STD_LOGIC_VECTOR( 7 downto 0)
Monitor state machine status register.
out en_error_valid STD_LOGIC
Enable capture of error flags from last RAW word.
in pre_ld_wr_addr STD_LOGIC_VECTOR( 9 downto 0)
latency offset for DPRAM wr address
in RST STD_LOGIC
Reset input.
in CLK_280M STD_LOGIC
Clock 280 MHz.
FSM to write RAW calolimeter data to Link Output FIFO for process FPGA.
out raw_data_mux_fsm STD_LOGIC_VECTOR( 7 downto 0)
Monitor state machine status register.
out RAW_rdout_fifo_rd_en_out t_49_arr_1b
read enable signal to all RAW data FIFOs
in raw_rd_all_in STD_LOGIC
readout all raw data links
in bcn_fifo_47b_in STD_LOGIC_VECTOR( 46 downto 0)
BCN fifo data 47b = 1b FIFO_RAW_Data_prog_full_i + 0 + 1b Privilege Read + 12b BCN_ID_in + 32b L1A_ID...
in BCN_FIFO_prog_full_in STD_LOGIC
BCN & L1A FIFO prog full flag.
in FIFO_error_flags_54b STD_LOGIC_VECTOR( 53 downto 0)
Link Error FIFO = ZERO + 1-b request RAW data on error + ORed 3-bit link error + 49-bit channel error...
out BCN_fifo_rd_en_out STD_LOGIC
read enable signal to BCN & L1A FIFOs
in BCN_FIFO_empty STD_LOGIC
FIFO empty flag from BCN L1A FIFO.
out RAW_safe_mode_out STD_LOGIC
Safe Mode operation flag for RAW readout.
in mgt_enable_in STD_LOGIC_VECTOR( 48 downto 0)
MGT enable signals - use to enable readout on error.
in LO_FIFO_data_count_in STD_LOGIC_VECTOR( 12 downto 0)
Link Output FIFO data count.
out RAW_out_valid STD_LOGIC
RAW data valid signal to Link_outpout_FIFO.
in valid_RAW_in t_49_arr_1b
RAW data valid signal.
in RAW_FIFO_prog_full_in std_logic
RAW Input FIFO partial FULL flag.
in link_err_FIFO_empty STD_LOGIC
FIFO empty flag from link error FIFO.
in valid_BCN_in std_logic
RAW data valid signal.
in rdout_RAW_36b_in DPR_RAW_out_36_type
raw data 36b = 4b+32b ERR+RAW
in hw_addr STD_LOGIC_VECTOR( 1 downto 0)
FPGA Hardware Address.
in LO_FIFO_prog_full_in std_logic
Link Output FIFO partial FULL flag to receive RAW calorimeter data.
out RAW_out STD_LOGIC_VECTOR( 31 downto 0)
RAW data 32b to Link_outpout_FIFO.
out RAW_out_is_char STD_LOGIC
RAW data is CHAR signal to Link_outpout_FIFO.
out frame_cntr_en STD_LOGIC
Comp;leted frame counter enable.
in clk_280M_in STD_LOGIC
fabric 280MHz clock
Generate Synch at 280MHz.
in clk_40M STD_LOGIC
Clock 40MHz in.
out sync_280m_out STD_LOGIC
280MHz synch signal output
in RST STD_LOGIC
Reset in.
in clk_280M STD_LOGIC
Clock 2800MHz in.
This is the RAW Data Error Flag Module.
in err_flag_in link_error_type
array of ERROR bits for each MGT input link
in en_error_valid_in STD_LOGIC
Enable capture of error flags from last RAW input data.
N integer
number of input fibre channels
out req_err_rd_raw std_logic
flag requesting RAW data readout on error
out channel_error_map STD_LOGIC_VECTOR( 48 downto 0)
49-bit channel error map to input into RAW readout
out err_flag_out STD_LOGIC_VECTOR( 3 downto 0)
4-bit link error ouput to RAW readout (zero + input_crc + input_disparity + not_in_table)