30 use IEEE.STD_LOGIC_1164.
ALL;
31 use IEEE.STD_LOGIC_UNSIGNED.
ALL;
35 use work.ipbus_decode_L1CaloHubRodChannel.
all;
48 COUNTER_WIDTH : integer := 5;
52 ipb_clk: in std_logic;
53 ipb_rst: in std_logic;
55 ipb_out: out ipb_rbus;
57 pp_clock : in std_logic;
59 time_count : in STD_LOGIC_VECTOR (31 downto 0);
60 aurora_chan_stat : in STD_LOGIC_VECTOR (31 downto 0);
61 tob_fifo_level: in STD_LOGIC_VECTOR (15 downto 0);
62 tob_fifo_busy_threshold : in STD_LOGIC_VECTOR (15 downto 0);
63 bulk_fifo_level: in STD_LOGIC_VECTOR (15 downto 0);
64 bulk_fifo_busy_threshold : in STD_LOGIC_VECTOR (15 downto 0);
65 tob_fifo_xoff_threshold : in STD_LOGIC_VECTOR (15 downto 0);
66 bulk_fifo_xoff_threshold : in STD_LOGIC_VECTOR (15 downto 0);
68 hdr_crc_tag : in std_logic;
69 pkt_len_violation : in std_logic;
71 aurora_channel_control : out STD_LOGIC_VECTOR (31 downto 0);
72 chan_disable : in std_logic;
74 aurora_user_clk : in std_logic;
75 init_clk : in std_logic;
76 clk_160 : in std_logic;
77 rt_clk : in std_logic;
78 bp_reg_reset : in std_logic;
79 master_reset : in std_logic;
85 ufc_message : in STD_LOGIC_Vector(7 downto 0);
86 ufc_parity_error : in STD_LOGIC;
87 ufc_channel_Busy : in STD_LOGIC;
88 ufc_parity_disable : out std_logic;
89 channel_busy : out std_logic;
95 s_tvalid : in std_logic;
97 repeat_l1id_counter : in STD_LOGIC_vector(31 downto 0);
98 repeat_l1id_counter_reset : out STD_LOGIC;
99 packets_read_counter : in STD_LOGIC_vector(31 downto 0);
100 packets_read_counter_reset: out STD_LOGIC
137 COUNTER_WIDTH :
integer :=
5
140 clock :
in STD_LOGIC;
141 reset :
in STD_LOGIC;
142 pulse_in :
in STD_LOGIC;
143 pulse_out :
out STD_LOGIC
153 init_clk :
in STD_LOGIC;
154 chan_reg_reset :
in STD_LOGIC;
155 bp_reg_reset :
in STD_LOGIC;
156 master_reset :
in STD_LOGIC;
157 channel_up :
in STD_LOGIC;
158 error_counter_reset :
in STD_LOGIC;
159 aurora_reset_out :
out STD_LOGIC;
160 GT_reset :
out STD_LOGIC;
161 fex_reset :
out STD_LOGIC;
162 self_reset_count :
out std_logic_vector(
31 downto 0);
163 chan_up_time :
out std_logic_vector(
31 downto 0);
164 channel_down_auto_reset_disable :
in std_logic
169 COMPONENT ila_self_reset
173 probe0 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
174 probe1 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
175 probe2 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
176 probe3 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
177 probe4 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
178 probe5 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
179 probe6 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
180 probe7 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
181 probe8 :
IN STD_LOGIC_VECTOR(
31 DOWNTO 0);
182 probe9 :
IN STD_LOGIC_VECTOR(
31 DOWNTO 0);
183 probe10 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
184 probe11 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0);
185 probe12 :
IN STD_LOGIC_VECTOR(
0 DOWNTO 0)
191 cwidth:
positive :=
4
194 clock :
in STD_LOGIC;
195 counter_reset :
in STD_LOGIC;
196 system_reset :
in STD_LOGIC;
197 error :
in STD_LOGIC;
198 error_count :
out STD_LOGIC_VECTOR(cwidth
-1 downto 0)
205 pp_clock :
in STD_LOGIC;
207 s_tvalid :
in STD_LOGIC;
208 reset :
in STD_LOGIC;
209 tob_rx_time :
out std_logic_vector(
15 downto 0);
210 tob_rx_time_max :
out std_logic_vector(
15 downto 0)
228 signal ipbw: ipb_wbus_array(N_SLAVES - 1 downto 0);
229 signal ipbr: ipb_rbus_array(N_SLAVES - 1 downto 0);
231 signal tob_fifo_control : std_logic_vector (31 downto 0);
232 signal Tob_fifo_status : std_logic_vector (31 downto 0);
233 signal Tob_fifo_fill_level : std_logic_vector (31 downto 0);
234 signal Tob_fifo_busy_Count : std_logic_vector (31 downto 0);
235 signal Tob_fifo_xoff_count : std_logic_vector (31 downto 0);
237 signal bulk_fifo_control : std_logic_vector (31 downto 0);
238 signal bulk_fifo_status : std_logic_vector (31 downto 0);
239 signal bulk_fifo_fill_level : std_logic_vector (31 downto 0);
240 signal bulk_fifo_busy_Count : std_logic_vector (31 downto 0);
241 signal bulk_fifo_xoff_count : std_logic_vector (31 downto 0);
242 signal Aurora_channel_status : std_logic_vector (31 downto 0);
243 signal data_integrity_status : std_logic_vector (31 downto 0);
244 signal hard_error_count : std_logic_vector (3 downto 0);
245 signal soft_error_count : std_logic_vector (3 downto 0);
246 signal frame_error_count : std_logic_vector (3 downto 0);
247 signal protocol_error_count : std_logic_vector (3 downto 0);
248 signal header_crc_error_count : std_logic_vector (3 downto 0);
249 signal trailer_crc_error_count: std_logic_vector (3 downto 0);
250 signal odd_word_error_count : std_logic_vector (3 downto 0);
251 signal aurora_channel_control_i : std_logic_vector (31 downto 0);
252 signal error_counter_reset : std_logic;
255 signal tob_counter_reset : std_logic;
256 signal bulk_busy_counter_reset : std_logic;
257 signal bulk_xoff_counter_reset : std_logic;
258 signal tfifo_xoff_tcount : std_logic_vector (31 downto 0);
260 signal channel_control_reset : std_logic;
261 signal channel_control_stb : std_logic;
262 signal channel_reset_pulse : std_logic;
264 signal tob_fifo_rst_rst : std_logic;
265 signal tob_fifo_rst_stb : std_logic;
266 signal tob_fifo_reset : std_logic_vector (31 downto 0);
268 signal bulk_fifo_rst_rst : std_logic;
269 signal bulk_fifo_rst_stb : std_logic;
270 signal bulk_fifo_reset : std_logic_vector (31 downto 0);
272 signal aurora_reset_disable_i : std_logic_vector (31 downto 0);
273 signal channel_down_auto_reset_disable : std_logic;
274 signal pkt_len_violation_auto_reset_disable : std_logic;
276 signal chan_reset_trig : std_logic;
277 signal channel_up : std_logic;
279 signal crc_error : std_logic;
280 signal prev_hdr_crc_tag : std_logic;
282 signal frame_err : std_logic;
284 signal tob_watermark_reset : std_logic;
285 signal tob_watermark : std_logic_vector (15 downto 0);
286 signal bulk_watermark_reset : std_logic;
287 signal bulk_watermark : std_logic_vector (15 downto 0);
288 signal pkt_maxlen_error_count : std_logic_vector (3 downto 0);
292 signal ufc_channel_Busy_i : std_logic;
293 signal ufc_reset : std_logic;
295 signal ufc_timer_0 : std_logic_vector(33 downto 0);
296 signal ufc_timer_1 : std_logic_vector(33 downto 0);
297 signal ufc_timer_2 : std_logic_vector(33 downto 0);
298 signal ufc_timer_3 : std_logic_vector(33 downto 0);
299 signal ufc_timer_4 : std_logic_vector(33 downto 0);
300 signal ufc_timer_5 : std_logic_vector(33 downto 0);
302 signal ufc_timer_reset : std_logic_vector(31 downto 0);
303 signal t_reset : std_logic_vector(31 downto 0);
305 signal ufc_status : std_logic_vector(31 downto 0);
306 signal ufc_busy_control : std_logic_vector(31 downto 0);
308 signal ufc_parity_count : std_logic_vector(31 downto 0);
309 signal ufc_timer_rst_rst : std_logic;
310 signal ufc_timer_rst_stb : std_logic;
312 signal tob_fifo_busy : std_logic;
313 signal tob_fifo_xoff_i : std_logic;
314 signal bulk_fifo_busy : std_logic;
315 signal bulk_fifo_xoff_i : std_logic;
316 signal tob_fifo_busy_enable : std_logic;
317 signal tob_fifo_xoff_enable : std_logic;
318 signal tob_fifo_force_busy : std_logic;
319 signal bulk_fifo_busy_enable : std_logic;
320 signal bulk_fifo_xoff_enable : std_logic;
321 signal bulk_fifo_force_busy : std_logic;
324 signal tob_fifo_force_xoff : std_logic;
325 signal bulk_fifo_force_xoff : std_logic;
326 signal aurora_self_reset_count : std_logic_vector(31 downto 0);
327 signal chan_up_time : std_logic_vector(31 downto 0);
329 signal tob_rx_time : std_logic_vector(15 downto 0);
330 signal tob_rx_time_max : std_logic_vector(15 downto 0);
335 fabric:
entity work.ipbus_fabric_sel
338 SEL_WIDTH => IPBUS_SEL_WIDTH
)
342 sel => ipbus_sel_L1CaloHubRodChannel
(ipb_in.ipb_addr
),
343 ipb_to_slaves => ipbw,
344 ipb_from_slaves => ipbr
352 Tob_fifo_control_reg:
entity work.ipbus_reg_v
356 ipbus_in => ipbw
(N_SLV_Tob_fifo_control
),
357 ipbus_out => ipbr
(N_SLV_Tob_fifo_control
),
358 q
(0) => tob_fifo_control
360 tob_fifo_busy_enable <= tob_fifo_control(0);
361 tob_fifo_xoff_enable <= tob_fifo_control(1);
362 tob_fifo_force_busy <= tob_fifo_control(4);
363 tob_fifo_force_xoff <= tob_fifo_control(5);
365 Tob_fifo_reset_reg:
entity work.ipbus_reg_v
368 reset => tob_fifo_rst_rst,
369 ipbus_in => ipbw
(N_SLV_Tob_fifo_reset
),
370 ipbus_out => ipbr
(N_SLV_Tob_fifo_reset
),
371 stb
(0) => tob_fifo_rst_stb,
372 q
(0) => tob_fifo_reset
374 tob_fifo_rst_rst <= tob_fifo_rst_stb or ipb_rst;
376 aurora_channel_control(3) <= tob_fifo_reset(0);
377 repeat_l1id_counter_reset <= tob_fifo_reset(5);
378 packets_read_counter_reset <= tob_fifo_reset(6);
383 Tob_fifo_status_reg:
entity work.ipbus_syncreg_v
391 ipb_in => ipbw
(N_SLV_Tob_fifo_status
),
392 ipb_out => ipbr
(N_SLV_Tob_fifo_status
),
394 d
(0) => Tob_fifo_status,
395 qmask =>
(others =>
(others => '1'
)),
407 Tob_fifo_status(0) <= '1' WHEN (tob_fifo_level > x"fff") ELSE '0';
408 Tob_fifo_status(1) <= '1' WHEN (tob_fifo_level > tob_fifo_busy_threshold) ELSE '0';
409 Tob_fifo_status(2) <= '1' WHEN (tob_fifo_level > tob_fifo_xoff_threshold) ELSE '0';
412 Tob_fifo_fill_level_reg :
entity work.ipbus_syncreg_v
420 ipb_in => ipbw
(N_SLV_Tob_fifo_fill_level
),
421 ipb_out => ipbr
(N_SLV_Tob_fifo_fill_level
),
423 d
(0) => Tob_fifo_fill_level,
424 qmask =>
(others =>
(others => '1'
)),
429 Tob_fifo_fill_level(15 downto 0) <= tob_fifo_level;
430 Tob_fifo_fill_level(31 downto 16) <= tob_watermark;
433 tob_fifo_watermark :
entity work.
watermark
435 watermark_width =>
16
439 level => tob_fifo_level,
440 reset => tob_watermark_reset,
441 watermark => tob_watermark
444 tob_watermark_reset <= (ipb_rst or tob_fifo_reset(3));
449 Tob_fifo_busy_Count_reg :
entity work.ipbus_syncreg_v
457 ipb_in => ipbw
(N_SLV_Tob_fifo_busy_count
),
458 ipb_out => ipbr
(N_SLV_Tob_fifo_busy_count
),
460 d
(0) => Tob_fifo_busy_count,
461 qmask =>
(others =>
(others => '1'
)),
469 reset => tob_fifo_reset
(1),
470 threshold => tob_fifo_busy_threshold,
471 level => tob_fifo_level,
472 above_count => Tob_fifo_busy_Count,
473 busy => tob_fifo_busy
476 Tob_fifo_xoff_Count_reg :
entity work.ipbus_syncreg_v
484 ipb_in => ipbw
(N_SLV_Tob_fifo_xoff_count
),
485 ipb_out => ipbr
(N_SLV_Tob_fifo_xoff_count
),
487 d
(0) => Tob_fifo_xoff_count,
488 qmask =>
(others =>
(others => '1'
)),
496 reset => tob_fifo_reset
(2),
497 threshold => tob_fifo_xoff_threshold,
498 level => tob_fifo_level,
499 above_count => Tob_fifo_xoff_Count,
500 busy => tob_fifo_xoff_i
504 Bulk_fifo_control_reg:
entity work.ipbus_reg_v
508 ipbus_in => ipbw
(N_SLV_bulk_fifo_control
),
509 ipbus_out => ipbr
(N_SLV_bulk_fifo_control
),
510 q
(0) => bulk_fifo_control
513 bulk_fifo_busy_enable <= bulk_fifo_control(0);
514 bulk_fifo_xoff_enable <= bulk_fifo_control(1);
515 bulk_fifo_force_busy <= bulk_fifo_control(4);
516 bulk_fifo_force_xoff <= bulk_fifo_control(5);
522 bulk_fifo_reset_reg:
entity work.ipbus_reg_v
525 reset => bulk_fifo_rst_rst,
526 ipbus_in => ipbw
(N_SLV_bulk_fifo_reset
),
527 ipbus_out => ipbr
(N_SLV_bulk_fifo_reset
),
528 stb
(0) => bulk_fifo_rst_stb,
529 q
(0) => bulk_fifo_reset
531 bulk_fifo_rst_rst <= bulk_fifo_rst_stb or ipb_rst;
532 bulk_busy_counter_reset <= bulk_fifo_reset(1);
533 bulk_xoff_counter_reset <= bulk_fifo_reset(2);
534 aurora_channel_control(4) <= bulk_fifo_reset(0);
537 bulk_fifo_status_reg:
entity work.ipbus_syncreg_v
545 ipb_in => ipbw
(N_SLV_bulk_fifo_status
),
546 ipb_out => ipbr
(N_SLV_bulk_fifo_status
),
548 d
(0) => bulk_fifo_status,
549 qmask =>
(others =>
(others => '1'
)),
556 bulk_fifo_status(0) <= '1' WHEN (bulk_fifo_level > x"fff") ELSE '0';
557 bulk_fifo_status(1) <= '1' WHEN (bulk_fifo_level > bulk_fifo_busy_threshold) ELSE '0';
558 bulk_fifo_status(2) <= '1' WHEN (bulk_fifo_level > bulk_fifo_xoff_threshold) ELSE '0';
561 bulk_fifo_fill_level_reg :
entity work.ipbus_syncreg_v
569 ipb_in => ipbw
(N_SLV_bulk_fifo_fill_level
),
570 ipb_out => ipbr
(N_SLV_bulk_fifo_fill_level
),
572 d
(0) => bulk_fifo_fill_level,
573 qmask =>
(others =>
(others => '1'
)),
578 bulk_fifo_fill_level(15 downto 0) <= bulk_fifo_level;
579 bulk_fifo_fill_level(31 downto 16) <= bulk_watermark;
582 bulk_fifo_watermark :
entity work.
watermark
584 watermark_width =>
16
588 level => bulk_fifo_level,
589 reset => bulk_watermark_reset,
590 watermark => bulk_watermark
593 bulk_watermark_reset <= (ipb_rst or bulk_fifo_reset(3));
600 bulk_fifo_busy_Count_reg :
entity work.ipbus_syncreg_v
608 ipb_in => ipbw
(N_SLV_bulk_fifo_busy_count
),
609 ipb_out => ipbr
(N_SLV_bulk_fifo_busy_count
),
611 d
(0) => bulk_fifo_busy_count,
612 qmask =>
(others =>
(others => '1'
)),
620 reset => bulk_busy_counter_reset,
621 threshold => bulk_fifo_busy_threshold,
622 level => bulk_fifo_level,
623 above_count => bulk_fifo_busy_Count,
624 busy => bulk_fifo_busy
628 bulk_fifo_xoff_Count_reg :
entity work.ipbus_syncreg_v
636 ipb_in => ipbw
(N_SLV_bulk_fifo_xoff_count
),
637 ipb_out => ipbr
(N_SLV_bulk_fifo_xoff_count
),
639 d
(0) => bulk_fifo_xoff_count,
640 qmask =>
(others =>
(others => '1'
)),
649 reset => bulk_xoff_counter_reset,
650 threshold => bulk_fifo_xoff_threshold,
651 level => bulk_fifo_level,
652 above_count => bulk_fifo_xoff_Count,
653 busy => bulk_fifo_xoff_i
659 Aurora_channel_control_reg:
entity work.ipbus_reg_v
662 reset => channel_control_reset,
663 ipbus_in => ipbw
(N_SLV_aurora_channel_control
),
664 ipbus_out => ipbr
(N_SLV_aurora_channel_control
),
665 stb
(0) => channel_control_stb,
666 q
(0) => aurora_channel_control_i
669 channel_control_reset <= ipb_rst or channel_control_stb;
671 channel_reset_pulse <= aurora_channel_control_i(0) or (pkt_len_violation and not pkt_len_violation_auto_reset_disable) ;
681 pulse_in => channel_reset_pulse,
683 pulse_out => chan_reset_trig
687 aurora_channel_control(1) <= aurora_channel_control_i(1);
689 error_counter_reset <= aurora_channel_control_i(1);
691 Aurora_autoreset_disable:
entity work.ipbus_reg_v
695 ipbus_in => ipbw
(N_SLV_aurora_autoreset_disable
),
696 ipbus_out => ipbr
(N_SLV_aurora_autoreset_disable
),
697 q
(0) => aurora_reset_disable_i
700 channel_down_auto_reset_disable <= aurora_reset_disable_i(0);
701 pkt_len_violation_auto_reset_disable <= aurora_reset_disable_i(1);
705 aurora_channel_control(2) <= chan_disable;
710 Aurora_channel_status_reg :
entity work.ipbus_syncreg_v
718 ipb_in => ipbw
(N_SLV_Aurora_channel_status
),
719 ipb_out => ipbr
(N_SLV_Aurora_channel_status
),
721 d
(0) => Aurora_channel_status,
722 qmask =>
(others =>
(others => '1'
)),
727 Aurora_channel_status(0) <= aurora_chan_stat(0);
728 Aurora_channel_status(1) <= aurora_chan_stat(1);
729 Aurora_channel_status(2) <= aurora_chan_stat(2);
730 Aurora_channel_status(3) <= '0';
731 Aurora_channel_status(7 downto 4) <= aurora_chan_stat(7 downto 4);
732 Aurora_channel_status(11 downto 8) <= hard_error_count(3 downto 0);
733 Aurora_channel_status(15 downto 12) <= soft_error_count(3 downto 0);
734 Aurora_channel_status(19 downto 16) <= frame_error_count(3 downto 0);
735 Aurora_channel_status(23 downto 20) <= header_crc_error_count(3 downto 0);
736 Aurora_channel_status(27 downto 24) <= trailer_crc_error_count(3 downto 0);
737 Aurora_channel_status(31 downto 28) <= pkt_maxlen_error_count(3 downto 0);
740 data_integrity_status_reg :
entity work.ipbus_syncreg_v
748 ipb_in => ipbw
(N_SLV_data_integrity_status
),
749 ipb_out => ipbr
(N_SLV_data_integrity_status
),
751 d
(0) => data_integrity_status,
752 qmask =>
(others =>
(others => '1'
)),
757 data_integrity_status(3 downto 0) <= protocol_error_count(3 downto 0);
758 data_integrity_status(7 downto 4) <= odd_word_error_count(3 downto 0);
759 data_integrity_status(31 downto 8) <= x"000000";
770 counter_reset => error_counter_reset,
771 system_reset => ipb_rst,
772 error => aurora_chan_stat
(8),
773 error_count => hard_error_count
779 counter_reset => error_counter_reset,
780 system_reset => ipb_rst,
781 error => aurora_chan_stat
(9),
782 error_count => soft_error_count
788 counter_reset => error_counter_reset,
789 system_reset => ipb_rst,
790 error => aurora_chan_stat
(11),
791 error_count => protocol_error_count
798 counter_reset => error_counter_reset,
799 system_reset => ipb_rst,
801 error_count => frame_error_count
806 frame_err <= aurora_chan_stat(10);
811 counter_reset => error_counter_reset,
812 system_reset => ipb_rst,
813 error => aurora_chan_stat
(12),
814 error_count => odd_word_error_count
824 process(pp_clock, master_reset, ipb_rst)
827 if (master_reset or ipb_rst) = '1' then
828 prev_hdr_crc_tag <= '0';
829 elsif rising_edge(pp_clock) then
830 prev_hdr_crc_tag <= hdr_crc_tag;
834 crc_error <= hdr_crc_tag and not prev_hdr_crc_tag;
839 counter_reset => error_counter_reset,
840 system_reset => ipb_rst,
842 error_count => header_crc_error_count
850 trailer_crc_error_count <= (others => '0');
854 channel_up <= aurora_chan_stat(0) or chan_disable;
861 init_clk => init_clk,
862 chan_reg_reset => chan_reset_trig,
863 bp_reg_reset => bp_reg_reset,
864 master_reset => master_reset,
865 channel_up => channel_up,
866 error_counter_reset => error_counter_reset,
867 aurora_reset_out => aurora_channel_control
(30),
868 GT_reset => aurora_channel_control
(31),
869 fex_reset => aurora_channel_control
(29),
870 self_reset_count => aurora_self_reset_count,
871 chan_up_time => chan_up_time,
872 channel_down_auto_reset_disable => channel_down_auto_reset_disable
876 probe_self_reset : ila_self_reset
880 probe0
(0) => chan_reset_trig,
881 probe1
(0) => bp_reg_reset,
882 probe2
(0) => master_reset,
883 probe3
(0) => channel_up,
884 probe4
(0) => error_counter_reset,
885 probe5
(0) => aurora_channel_control
(29),
886 probe6
(0) => aurora_channel_control
(30),
887 probe7
(0) => aurora_channel_control
(31),
888 probe8 => aurora_self_reset_count,
889 probe9 => chan_up_time,
890 probe10
(0) => channel_down_auto_reset_disable,
891 probe11
(0) => chan_disable,
892 probe12
(0) => aurora_chan_stat
(0)
904 counter_reset => error_counter_reset,
905 system_reset => ipb_rst,
906 error => pkt_len_violation,
907 error_count => pkt_maxlen_error_count
928 UFC_Busy_control_reg :
entity work.ipbus_reg_v
932 ipbus_in => ipbw
(N_SLV_UFC_busy_control
),
933 ipbus_out => ipbr
(N_SLV_UFC_busy_control
),
934 q
(0) => ufc_busy_control
938 channel_busy <= (ufc_message(0) and ufc_busy_control(0)) or (ufc_message(1) and ufc_busy_control(1)) or (tob_fifo_busy and tob_fifo_busy_enable) or (bulk_fifo_busy and bulk_fifo_busy_enable) or (bulk_fifo_force_busy) or (tob_fifo_force_busy);
941 aurora_channel_control(6) <= (tob_fifo_xoff_i and tob_fifo_xoff_enable) or (tob_fifo_force_xoff);
943 aurora_channel_control(7) <= (bulk_fifo_xoff_i and bulk_fifo_xoff_enable) or (bulk_fifo_force_xoff);
946 ufc_parity_disable <= ufc_busy_control(8);
957 FEX_Busy_timer_reset_reg:
entity work.ipbus_reg_v
960 reset => ufc_timer_rst_rst,
961 ipbus_in => ipbw
(N_SLV_FEX_busy_timer_reset
),
962 ipbus_out => ipbr
(N_SLV_FEX_busy_timer_reset
),
963 stb
(0) => ufc_timer_rst_stb,
964 q
(0) => ufc_timer_reset
966 ufc_timer_rst_rst <= ufc_timer_rst_stb or ipb_rst;
971 Fex_busy_status_reg :
entity work.ipbus_syncreg_v
979 ipb_in => ipbw
(N_SLV_Fex_busy_status
),
980 ipb_out => ipbr
(N_SLV_Fex_busy_status
),
982 d
(0) => ufc_status
(31 downto 0),
983 qmask =>
(others =>
(others => '1'
)),
988 ufc_status(2 downto 0) <= ufc_message(2 downto 0);
989 ufc_status(5 downto 3) <= ufc_message(6 downto 4);
990 ufc_status(31 downto 6) <= (others => '0');
993 Fex_tob_busy_timer_reg :
entity work.ipbus_syncreg_v
1001 ipb_in => ipbw
(N_SLV_FEX_TOB_BUSY_TIMER
),
1002 ipb_out => ipbr
(N_SLV_FEX_TOB_BUSY_TIMER
),
1004 d
(0) => ufc_timer_0
(31 downto 0),
1005 qmask =>
(others =>
(others => '1'
)),
1012 process(pp_clock, t_reset(
0))
1014 if t_reset(0) = '1' then
1015 ufc_timer_0 <= (others => '0');
1016 elsif rising_edge(pp_clock) then
1017 if (ufc_message(0) = '1') then
1018 ufc_timer_0 <= (ufc_timer_0 + 1);
1020 ufc_timer_0 <= ufc_timer_0;
1025 t_reset(0) <= ufc_timer_reset(0) or ipb_rst;
1028 Fex_raw_busy_timer_reg :
entity work.ipbus_syncreg_v
1036 ipb_in => ipbw
(N_SLV_FEX_RAW_BUSY_TIMER
),
1037 ipb_out => ipbr
(N_SLV_FEX_RAW_BUSY_TIMER
),
1039 d
(0) => ufc_timer_1
(31 downto 0),
1040 qmask =>
(others =>
(others => '1'
)),
1047 process(pp_clock, t_reset(
1))
1049 if t_reset(1) = '1' then
1050 ufc_timer_1 <= (others => '0');
1051 elsif rising_edge(pp_clock) then
1052 if (ufc_message(1) = '1') then
1053 ufc_timer_1 <= (ufc_timer_1 + 1);
1055 ufc_timer_1 <= ufc_timer_1;
1060 t_reset(1) <= ufc_timer_reset(1) or ipb_rst;
1198 UFC_parity_error_count_reg :
entity work.ipbus_syncreg_v
1206 ipb_in => ipbw
(N_SLV_UFC_PARITY_ERROR_COUNT
),
1207 ipb_out => ipbr
(N_SLV_UFC_PARITY_ERROR_COUNT
),
1208 slv_clk => aurora_user_clk,
1209 d
(0) => ufc_parity_count,
1210 qmask =>
(others =>
(others => '1'
)),
1215 t_reset(8) <= ufc_timer_reset(8) or ipb_rst;
1219 process(pp_clock, t_reset(
8))
1221 if t_reset(8) = '1' then
1222 ufc_parity_count <= (others => '0');
1223 elsif rising_edge(pp_clock) then
1224 if (ufc_parity_error = '1') and (ufc_parity_count /= 0x"FFFF") then
1225 ufc_parity_count <= (ufc_parity_count + 1);
1227 ufc_parity_count <= ufc_parity_count;
1232 Aurora_self_reset_count_reg:
entity work.ipbus_syncreg_v
1240 ipb_in => ipbw
(N_SLV_AURORA_AUTO_RESET_COUNT
),
1241 ipb_out => ipbr
(N_SLV_AURORA_AUTO_RESET_COUNT
),
1242 slv_clk => init_clk,
1243 d
(0) => aurora_self_reset_count,
1244 qmask =>
(others =>
(others => '1'
)),
1249 Aurora_channel_up_timer_reg:
entity work.ipbus_syncreg_v
1257 ipb_in => ipbw
(N_SLV_AURORA_CHAN_UP_TIME
),
1258 ipb_out => ipbr
(N_SLV_AURORA_CHAN_UP_TIME
),
1259 slv_clk => init_clk,
1260 d
(0) => chan_up_time,
1261 qmask =>
(others =>
(others => '1'
)),
1267 TOB_rcv_timer_reg:
entity work.ipbus_syncreg_v
1275 ipb_in => ipbw
(N_SLV_TOB_RX_TIMER
),
1276 ipb_out => ipbr
(N_SLV_TOB_RX_TIMER
),
1277 slv_clk => pp_clock,
1278 d
(0) => tob_rx_time_max & tob_rx_time ,
1279 qmask =>
(others =>
(others => '1'
)),
1286 pp_clock => pp_clock,
1288 s_tvalid => s_tvalid,
1289 reset => tob_fifo_reset
(4),
1290 tob_rx_time => tob_rx_time,
1291 tob_rx_time_max => tob_rx_time_max
1294 Tob_l1id_repeat_reg :
entity work.ipbus_syncreg_v
1302 ipb_in => ipbw
(N_SLV_Tob_repeat_l1ID_counter
),
1303 ipb_out => ipbr
(N_SLV_Tob_repeat_l1ID_counter
),
1304 slv_clk => pp_clock,
1305 d
(0) => repeat_l1id_counter,
1306 qmask =>
(others =>
(others => '1'
)),
1311 Tob_packets_read_reg :
entity work.ipbus_syncreg_v
1319 ipb_in => ipbw
(N_SLV_Tob_packets_read
),
1320 ipb_out => ipbr
(N_SLV_Tob_packets_read
),
1321 slv_clk => pp_clock,
1322 d
(0) => packets_read_counter,
1323 qmask =>
(others =>
(others => '1'
)),