ROD firmware  1.0.5
ATLAS l1-calo - ROD_eFEX and ROD_jFEX firmware for the L1Calo ROD board

Back to ROD documentation
backplane_regs.vhd
1 ----------------------------------------------------------------------------------
2 -- Company:
3 -- Engineer:
4 --
5 -- Create Date: 24.04.2019 10:41:24
6 -- Design Name:
7 -- Module Name: backplane_regs - RTL
8 -- Project Name:
9 -- Target Devices:
10 -- Tool Versions:
11 -- Description:
12 --
13 -- Dependencies:
14 --
15 -- Revision:
16 -- Revision 0.01 - File Created
17 -- Additional Comments:
18 --
19 ----------------------------------------------------------------------------------
20 
21 
22 library IEEE;
23 use IEEE.STD_LOGIC_1164.ALL;
24 use work.ipbus.all;
25 --use work.ipbus_decode_jfex_chan_regs.all;
26 --use work.ipbus_decode_rod_backplane_regs.all;
27 use work.ipbus_decode_L1CaloHubRodBackplaneRegisters.all;
28 
29 -- Uncomment the following library declaration if using
30 -- arithmetic functions with Signed or Unsigned values
31 --use IEEE.NUMERIC_STD.ALL;
32 use IEEE.STD_LOGIC_UNSIGNED.ALL;
33 
34 -- Uncomment the following library declaration if instantiating
35 -- any Xilinx leaf cells in this code.
36 --library UNISIM;
37 --use UNISIM.VComponents.all;
38 
39 entity backplane_regs is
40  Port (
41  ipb_clk: in std_logic;
42  ipb_rst: in std_logic;
43  ipb_in: in ipb_wbus;
44  ipb_out: out ipb_rbus;
45 
46  pp_clock : in std_logic;
47  clk_40 : in std_logic;
48  clk_160 : in std_logic;
49  clk_125 : in std_logic;
50  rt_clk : in std_logic;
51  ck_pll_lock : in std_logic;
52  timer_reset : in std_logic;
53 -- proc_soft_reset : out std_logic;
54 
55  CK_INT : in STD_LOGIC;
56  SMBALERT_B : in STD_LOGIC;
57  T_WRN_B : in STD_LOGIC;
58 
59 
60  channel_up : in STD_LOGIC_VECTOR (23 downto 0);
61  chan_enable : out STD_LOGIC_VECTOR (23 downto 0);
62  first_chan : out STD_LOGIC_vector(4 downto 0);
63  last_chan : out STD_LOGIC_vector(4 downto 0);
64  ro_status : in STD_LOGIC_VECTOR (7 downto 0);
65 
66  time_count : out STD_LOGIC_VECTOR (31 downto 0); --synchronous to the pp_clock
67  tob_fifo_busy_threshold : out STD_LOGIC_VECTOR (31 downto 0); --synchronous to ipb_clk
68  bulk_fifo_busy_threshold : out STD_LOGIC_VECTOR (31 downto 0); --synchronous to ipb_clk
69  tob_fifo_xoff_threshold : out STD_LOGIC_VECTOR (31 downto 0); --synchronous to ipb_clk
70  bulk_fifo_xoff_threshold : out STD_LOGIC_VECTOR (31 downto 0); --synchronous to ipb_clk
71  backplane_control : out STD_LOGIC_VECTOR (31 downto 0);
72 -- backplane_ttc_control : out STD_LOGIC_VECTOR (31 downto 0);
73  chan_disable : out STD_LOGIC_VECTOR (31 downto 0);
74  combined_busy : in std_logic;
75  ro_user_clock : in std_logic
76  );
77 end backplane_regs;
78 architecture RTL of backplane_regs is
79 
80 component priority_encoder
81  Port (
82  chan_ena : in STD_LOGIC_VECTOR (23 downto 0);
83  clock : in STD_LOGIC;
84  first_chan : out STD_LOGIC_vector(4 downto 0);
85  last_chan : out STD_LOGIC_vector(4 downto 0)
86  );
87 end component;
88 
89 component clock_test_ipbus is
90  generic
91 (
92  COUNTER_WIDTH_40 : integer := 8;
93  reset_count : std_logic_vector(15 downto 0) := x"03ff"; --count_125 rollover resets the system
94  count_40_term : std_logic_vector(7 downto 0) := x"45";
95  count_160_term : std_logic_vector(7 downto 0) := x"45"
96 
97  --for a shorter test sequence, use the values below
98  --reset_count : std_logic_vector(15 downto 0) := x"01ff"; --count_125 rollover resets the system
99  --count_40_term : std_logic_vector(7 downto 0) := x"A2";
100  --count_160_term : std_logic_vector(7 downto 0) := x"A2"
101 );
102 
103  Port (
104  clock_40 : in STD_LOGIC;
105  clock_160 : in STD_LOGIC;
106  clock_125 : in STD_LOGIC;
107  reset : in STD_LOGIC;
108  clock_160_lock : in STD_LOGIC;
109  clk_40_good : out std_logic;
110  clk_160_good : out std_logic;
111  count_40 : out std_logic_vector(counter_width_40-1 downto 0);
112  count_160 : out std_logic_vector(counter_width_40-1 downto 0);
113  count_125 : out std_logic_vector(counter_width_40-1 downto 0)
114 
115  );
116 end component;
117 
118 
119 
120 signal ipbw: ipb_wbus_array(N_SLAVES - 1 downto 0);
121 signal ipbr: ipb_rbus_array(N_SLAVES - 1 downto 0);
122 signal time_counter : STD_LOGIC_VECTOR (31 downto 0);
123 signal time_count_reg : std_logic_vector( 31 downto 0);
124 
125 signal backplane_control_reg_rst : std_logic;
126 signal backplane_control_reg_stb : std_logic;
127 
128 signal first_chan_i : STD_LOGIC_vector(4 downto 0);
129 signal last_chan_i : STD_LOGIC_vector(4 downto 0);
130 signal first_last : STD_LOGIC_vector(31 downto 0);
131 
132 signal chan_ena : STD_LOGIC_vector(23 downto 0);
133 signal chan_dis : STD_LOGIC_vector(31 downto 0);
134 signal ro_status_32 : STD_LOGIC_vector(31 downto 0);
135 
136 signal count_40 : STD_LOGIC_vector(7 downto 0);
137 signal count_160 : STD_LOGIC_vector(7 downto 0);
138 signal count_125 : STD_LOGIC_vector(7 downto 0);
139 signal clk_40_good : STD_LOGIC;
140 signal clk_160_good : STD_LOGIC;
141 
142 signal clock_status_32 : STD_LOGIC_vector(31 downto 0);
143 
144 signal backplane_control_two : STD_LOGIC_vector(31 downto 0);
145 signal backplane_control_i : STD_LOGIC_vector(31 downto 0);
146 
147 signal clk_test_reset : STD_LOGIC;
148 
149 signal SMBALERT : STD_LOGIC;
150 signal T_WARN : STD_LOGIC;
151 
152 signal busy_active_time : STD_LOGIC_vector(31 downto 0);
153 signal busy_active_time_reset : STD_LOGIC;
154 
155 signal ro_cpll_lock : STD_LOGIC;
156 signal ro_cpll_lock_delay_1 : STD_LOGIC;
157 signal ro_cpll_lock_delay_2 : STD_LOGIC;
158 signal ro_cpll_lock_lost : STD_LOGIC;
159 
160 signal CK_INT_delay_1 : STD_LOGIC;
161 signal CK_INT_delay_2 : STD_LOGIC;
162 signal silab_ck_int_sticky : STD_LOGIC;
163 
164 
165 attribute ASYNC_REG : string;
166 signal chan_enable_r1 : STD_LOGIC_vector(23 downto 0);
167 attribute ASYNC_REG of chan_enable_r1 : signal is "TRUE";
168 signal chan_enable_r2 : STD_LOGIC_vector(23 downto 0);
169 attribute ASYNC_REG of chan_enable_r2 : signal is "TRUE";
170 
171 begin
172 
173 -- ipbus address decode
174 
175 fabric: entity work.ipbus_fabric_sel
176  generic map(
177  NSLV => N_SLAVES,
178  SEL_WIDTH => IPBUS_SEL_WIDTH)
179  port map(
180  ipb_in => ipb_in,
181  ipb_out => ipb_out,
182 -- sel => ipbus_decode_my_module(ipb_in.ipb_addr),
183 -- sel => ipbus_sel_my_module(ipb_in.ipb_addr),
184 -- sel => ipbus_sel_jfex_chan_regs(ipb_in.ipb_addr),
185 -- sel => ipbus_sel_rod_backplane_regs(ipb_in.ipb_addr),
186  sel => ipbus_sel_L1CaloHubRodBackplaneRegisters(ipb_in.ipb_addr),
187  ipb_to_slaves => ipbw,
188  ipb_from_slaves => ipbr
189  );
190 
191 
192 
193 
194 --addr 0
195 Time_count_value: entity work.ipbus_syncreg_v
196  generic map (
197  N_CTRL => 0,
198  N_STAT => 1
199  )
200  port map(
201  clk => ipb_clk,
202  rst => ipb_rst,
203 -- ipb_in => ipbw(N_SLV_BACKPLANE_TIME_COUNT_VALUE),
204 -- ipb_out => ipbr(N_SLV_BACKPLANE_TIME_COUNT_VALUE),
205  ipb_in => ipbw(N_SLV_TIME_COUNT_VALUE),
206  ipb_out => ipbr(N_SLV_TIME_COUNT_VALUE),
207  slv_clk => rt_clk,
208  d(0) => time_count_reg,
209  qmask => (others => (others => '1')),
210  stb => open,
211  rstb => open
212  );
213 
214 
215 --addr 1
216 Tob_fifo_busy_threshold_reg: entity work.ipbus_reg_v
217  port map(
218  clk => ipb_clk,
219  reset => ipb_rst,
220 -- ipbus_in => ipbw(N_SLV_BACKPLANE_TOB_FIFO_BUSY_THRESHOLD),
221 -- ipbus_out => ipbr(N_SLV_BACKPLANE_TOB_FIFO_BUSY_THRESHOLD),
222  ipbus_in => ipbw(N_SLV_TOB_FIFO_BUSY_THRESHOLD),
223  ipbus_out => ipbr(N_SLV_TOB_FIFO_BUSY_THRESHOLD),
224  q(0) => TOB_FIFO_BUSY_THRESHOLD
225  );
226 
227 --addr 2
228 Tob_fifo_xoff_threshold_reg: entity work.ipbus_reg_v
229  port map(
230  clk => ipb_clk,
231  reset => ipb_rst,
232 -- ipbus_in => ipbw(N_SLV_BACKPLANE_TOB_FIFO_XOFF_THRESHOLD),
233 -- ipbus_out => ipbr(N_SLV_BACKPLANE_TOB_FIFO_XOFF_THRESHOLD),
234  ipbus_in => ipbw(N_SLV_TOB_FIFO_XOFF_THRESHOLD),
235  ipbus_out => ipbr(N_SLV_TOB_FIFO_XOFF_THRESHOLD),
236  q(0) => tob_fifo_xoff_threshold
237  );
238 
239 
240 --addr 3
241 Bulk_fifo_busy_threshold_reg: entity work.ipbus_reg_v
242  port map(
243  clk => ipb_clk,
244  reset => ipb_rst,
245 -- ipbus_in => ipbw(N_SLV_BACKPLANE_BULK_FIFO_BUSY_THRESHOLD),
246 -- ipbus_out => ipbr(N_SLV_BACKPLANE_BULK_FIFO_BUSY_THRESHOLD),
247  ipbus_in => ipbw(N_SLV_BULK_FIFO_BUSY_THRESHOLD),
248  ipbus_out => ipbr(N_SLV_BULK_FIFO_BUSY_THRESHOLD),
249  q(0) => bulk_fifo_busy_threshold
250  );
251 
252 
253 
254 --addr 4
255 Bulk_fifo_xoff_threshold_reg: entity work.ipbus_reg_v
256  port map(
257  clk => ipb_clk,
258  reset => ipb_rst,
259 -- ipbus_in => ipbw(N_SLV_BACKPLANE_BULK_FIFO_XOFF_THRESHOLD),
260 -- ipbus_out => ipbr(N_SLV_BACKPLANE_BULK_FIFO_XOFF_THRESHOLD),
261  ipbus_in => ipbw(N_SLV_BULK_FIFO_XOFF_THRESHOLD),
262  ipbus_out => ipbr(N_SLV_BULK_FIFO_XOFF_THRESHOLD),
263  q(0) => bulk_fifo_xoff_threshold
264  );
265 
266 --addr 5
267 --Backplane_control_reg: entity work.ipbus_reg_v
268 -- port map(
269 -- clk => ipb_clk,
270 -- reset => ipb_rst,
271 -- ipbus_in => ipbw(N_SLV_BACKPLANE_BACKPLANE_CONTROL),
272 -- ipbus_out => ipbr(N_SLV_BACKPLANE_BACKPLANE_CONTROL),
273 -- q(0) => backplane_control
274 -- );
275 
276 --addr 5
277 
278 backplane_control_reg: entity work.ipbus_reg_v
279  port map(
280  clk => ipb_clk,
281  reset => backplane_control_reg_rst,
282 -- ipbus_in => ipbw(N_SLV_BACKPLANE_BACKPLANE_CONTROL),
283 -- ipbus_out => ipbr(N_SLV_BACKPLANE_BACKPLANE_CONTROL),
284  ipbus_in => ipbw(N_SLV_BACKPLANE_CONTROL),
285  ipbus_out => ipbr(N_SLV_BACKPLANE_CONTROL),
286  stb(0) => backplane_control_reg_stb,
287  q(0) => backplane_control_i
288  );
289 backplane_control_reg_rst <= backplane_control_reg_stb or ipb_rst;
290 backplane_control(28 downto 0) <= backplane_control_i(28 downto 0); --29, 30 and 31 are used by reg_2
291 
292 Backplane_control_reg_2_reg: entity work.ipbus_reg_v
293  port map(
294  clk => ipb_clk,
295  reset => ipb_rst,
296  ipbus_in => ipbw(N_SLV_BACKPLANE_CONTROL_2),
297  ipbus_out => ipbr(N_SLV_BACKPLANE_CONTROL_2),
298  q(0) => backplane_control_two
299  );
300 
301 backplane_control(31) <= backplane_control_two(0);
302 --backplane_control(30) <= not backplane_control_two(1); --LPM mode by default - set for dfe mode
303 backplane_control(30) <= '1'; --Aurora LPM enable
304 backplane_control(29) <= backplane_control_two(1);
305 
306 
307 --backplane_TTC_control_reg: entity work.ipbus_reg_v
308 -- port map(
309 -- clk => ipb_clk,
310 -- reset => ipb_rst,
311 ---- ipbus_in => ipbw(N_SLV_BACKPLANE_TTC_CONTROL),
312 ---- ipbus_out => ipbr(N_SLV_BACKPLANE_TTC_CONTROL),
313 -- ipbus_in => ipbw(N_SLV_TTC_CONTROL),
314 -- ipbus_out => ipbr(N_SLV_TTC_CONTROL),
315 ---- stb(0) => backplane_TTC_control_reg_stb,
316 -- q(0) => backplane_ttc_control
317 -- );
318 
319 channel_map: entity work.ipbus_syncreg_v
320  generic map (
321  N_CTRL => 0,
322  N_STAT => 1
323  )
324  port map(
325  clk => ipb_clk,
326  rst => ipb_rst,
327 -- ipb_in => ipbw(N_SLV_BACKPLANE_CHANNEL_MAP),
328 -- ipb_out => ipbr(N_SLV_BACKPLANE_CHANNEL_MAP),
329  ipb_in => ipbw(N_SLV_CHANNEL_MAP),
330  ipb_out => ipbr(N_SLV_CHANNEL_MAP),
331  slv_clk => pp_clock,
332  d(0) => x"00" & chan_ena ,
333  qmask => (others => (others => '1')),
334  stb => open,
335  rstb => open
336  );
337 
338 
339 channel_disable: entity work.ipbus_reg_v
340  port map(
341  clk => ipb_clk,
342  reset => ipb_rst,
343 -- ipbus_in => ipbw(N_SLV_BACKPLANE_CHAN_DISABLE),
344 -- ipbus_out => ipbr(N_SLV_BACKPLANE_CHAN_DISABLE),
345  ipbus_in => ipbw(N_SLV_CHAN_DISABLE),
346  ipbus_out => ipbr(N_SLV_CHAN_DISABLE),
347 -- stb(0) => backplane_TTC_control_reg_stb,
348  q(0) => chan_dis
349  );
350 
351 chan_disable <= chan_dis;
352 
353 
354 first_last_chan: entity work.ipbus_syncreg_v
355  generic map (
356  N_CTRL => 0,
357  N_STAT => 1
358  )
359  port map(
360  clk => ipb_clk,
361  rst => ipb_rst,
362 -- ipb_in => ipbw(N_SLV_BACKPLANE_FIRST_LAST_CHAN),
363 -- ipb_out => ipbr(N_SLV_BACKPLANE_FIRST_LAST_CHAN),
364  ipb_in => ipbw(N_SLV_FIRST_LAST_CHAN),
365  ipb_out => ipbr(N_SLV_FIRST_LAST_CHAN),
366  slv_clk => pp_clock,
367  d(0) => first_last,
368  qmask => (others => (others => '1')),
369  stb => open,
370  rstb => open
371  );
372 
373 --address 6
374 ro_ctrl_status : entity work.ipbus_syncreg_v
375  generic map (
376  N_CTRL => 0,
377  N_STAT => 1
378  )
379  port map(
380  clk => ipb_clk,
381  rst => ipb_rst,
382 -- ipb_in => ipbw(N_SLV_BACKPLANE_RO_CTRL_LINK_STAT),
383 -- ipb_out => ipbr(N_SLV_BACKPLANE_RO_CTRL_LINK_STAT),
384  ipb_in => ipbw(N_SLV_RO_CTRL_LINK_STAT),
385  ipb_out => ipbr(N_SLV_RO_CTRL_LINK_STAT),
386  slv_clk => pp_clock,
387  d(0) => ro_status_32,
388  qmask => (others => (others => '1')),
389  stb => open,
390  rstb => open
391  );
392 
393 --ro_status_32 <= (x"000000" & ro_status);
394 ro_status_32 <= (x"000000" & "00" & ro_cpll_lock_lost & ro_status(4 downto 0));
395 
396 --readout control cpll lock lost sticky bit --------
397 
398 ro_cpll_lock <= ro_status(3);
399 
400 process (clk_125) begin --sample with clk125 because it's independent of potentially failing ro_user_clk
401  if rising_edge (clk_125) then
402  ro_cpll_lock_delay_1 <= ro_cpll_lock;
403  ro_cpll_lock_delay_2 <= ro_cpll_lock_delay_1;
404  end if;
405 end process;
406 
407 
408 process (clk_125) begin --sample with clk125 because it's independent of potentially failing ro_user_clk
409  if rising_edge (clk_125) then
410  if (backplane_control(3) = '1') then
411  ro_cpll_lock_lost <= '0';
412  elsif (ro_cpll_lock_delay_1 = '0') and (ro_cpll_lock_delay_2 = '1') then --this is falling edge of cplllock
413  ro_cpll_lock_lost <= '1';
414  else
415  ro_cpll_lock_lost <= ro_cpll_lock_lost;
416  end if;
417  end if;
418  end process;
419 
420 
421 
422 
423 clock_status : entity work.ipbus_syncreg_v
424  generic map (
425  N_CTRL => 0,
426  N_STAT => 1
427  )
428  port map(
429  clk => ipb_clk,
430  rst => ipb_rst,
431 -- ipb_in => ipbw(N_SLV_BACKPLANE_RO_CTRL_LINK_STAT),
432 -- ipb_out => ipbr(N_SLV_BACKPLANE_RO_CTRL_LINK_STAT),
433  ipb_in => ipbw(N_SLV_CLOCK_STATUS),
434  ipb_out => ipbr(N_SLV_CLOCK_STATUS),
435  slv_clk => pp_clock,
436  d(0) => clock_status_32,
437  qmask => (others => (others => '1')),
438  stb => open,
439  rstb => open
440  );
441 
442 
443 clock_status_32(31 downto 24) <= count_125;
444 clock_status_32(23 downto 16) <= count_40;
445 clock_status_32(15 downto 8) <= count_160;
446 
447 clock_status_32(6) <= silab_ck_int_sticky;
448 clock_status_32(5) <= SMBALERT;
449 clock_status_32(4) <= T_WARN;
450 clock_status_32(3) <= CK_INT;
451 clock_status_32(2) <= clk_40_good;
452 clock_status_32(1) <= clk_160_good;
453 clock_status_32(0) <= ck_pll_lock;
454 
455 T_WARN <= not T_WRN_B;
456 SMBALERT <= not SMBALERT_B;
457 
458 
459 process (clk_125) begin
460  if rising_edge (clk_125) then
461  CK_INT_delay_1 <= CK_INT;
462  CK_INT_delay_2 <= CK_INT_delay_1;
463  end if;
464 end process;
465 
466 process (clk_125) begin
467  if rising_edge (clk_125) then
468  if (backplane_control(9) = '1') then
469  silab_ck_int_sticky <= '0';
470  elsif (CK_INT_delay_1 = '0') and (CK_INT_delay_2 = '1') then --this is falling edge of cplllock
471  silab_ck_int_sticky <= '1';
472  else
473  silab_ck_int_sticky <= silab_ck_int_sticky;
474  end if;
475  end if;
476  end process;
477 
478 
479 
480 
481 --process(channel_up)
482 process(channel_up, chan_dis)
483  begin
484  for i in 23 downto 0 loop
485  chan_ena(i) <= channel_up(i) AND NOT chan_dis(i);
486  end loop;
487  end process;
488 
489 --chan_enable <= chan_ena;
490 
491 process (pp_clock) begin
492  if rising_edge (pp_clock) then
493  chan_enable_r1 <= chan_ena;
494  chan_enable_r2 <= chan_enable_r1;
495  end if;
496  end process;
497 
498 chan_enable <= chan_enable_r2;
499 --place holder---------------------------------------------------------------------
500 ------------add TTC and Readout Control MGT status and control in here --------------
501 ---------------------------------------------------------------------------------
502 --but, actually, TTC fifo should look similar to one of the channels, so perhaps it should have its own reg bank like the aurora channels
503 --------------------------------------------------------------------------------------------------------------------------------------------
504 
505 --place holder
506 -- add clock tester and register here
507 -- need to import clk40
508 
509 
510 
511 
512 
513 
514 --process(rt_clk, timer_reset)
515 process(rt_clk, timer_reset, backplane_control(2))
516  begin
517  if (timer_reset = '1') or (backplane_control(2) = '1') then -- async (p)reset -> put 'reset in sensitivity list
518  time_counter <= (others => '0');
519  elsif rising_edge(rt_clk) then
520  time_counter <= (time_counter + 1);
521  end if;
522  end process;
523 
524 
525 time_count <= time_counter(31 downto 0);
526 time_count_reg <= time_counter(31 downto 0);
527 
528 first_last_encode : priority_encoder
529  Port map (
530  chan_ena => chan_ena,
531  clock => pp_clock,
532  first_chan => first_chan_i,
533  last_chan => last_chan_i
534  );
535 
536 first_chan <= first_chan_i;
537 last_chan <= last_chan_i;
538 first_last <= x"00" & "000" & last_chan_i & x"00" & "000" & first_chan_i;
539 
540 
541 
542 
543 
544 clk_tester : clock_test_ipbus
545  generic map (
546  reset_count => x"03ff",
547  count_40_term => x"45",
548  count_160_term => x"45"
549  -- reset_count => x"01ff",
550  -- count_40_term => x"a2",
551  -- count_160_term => x"a2"
552  )
553  port map (
554  clock_40 => clk_40,
555  clock_160 => clk_160,
556  clock_125 => clk_125,
557  reset => clk_test_reset,
558  clock_160_lock => ck_pll_lock,
559  clk_40_good => clk_40_good,
560  clk_160_good => clk_160_good,
561  count_40 => count_40,
562  count_160 => count_160,
563  count_125 => count_125
564  );
565 
566 clk_test_reset <= backplane_control(7) ;
567 
568 
569 busy_active_time_reg : entity work.ipbus_syncreg_v
570  generic map (
571  N_CTRL => 0,
572  N_STAT => 1
573  )
574  port map (
575  clk => ipb_clk,
576  rst => ipb_rst,
577  ipb_in => ipbw(N_SLV_Busy_Active_TIME),
578  ipb_out => ipbr(N_SLV_Busy_Active_TIME),
579  slv_clk => rt_clk, --pp_clock,
580  d(0) => busy_active_time,
581  qmask => (others => (others => '1')),
582  stb => open,
583  rstb => open
584  );
585 
586 busy_active_time_reset <= backplane_control_i(8);
587 
588 
589 process(rt_clk, ipb_rst, busy_active_time_reset)
590  begin
591  if (ipb_rst or busy_active_time_reset) = '1' then -- async (p)reset -> put 'reset in sensitivity list
592  busy_active_time <= (others => '0');
593  elsif rising_edge(rt_clk) then
594  if (combined_busy = '1') and (busy_active_time < x"ffffffff") then
595  busy_active_time <= (busy_active_time + 1);
596  else
597  busy_active_time <= busy_active_time;
598  end if;
599  end if;
600  end process;
601 
602 
603 
604 
605 end RTL;