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

Back to ROD documentation
aurora_pipe.vhd
1 ----------------------------------------------------------------------------------
2 -- Company:
3 -- Engineer:
4 --
5 -- Create Date: 29.07.2019 12:46:52
6 -- Design Name:
7 -- Module Name: aurora_pipe - 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 
25 -- Uncomment the following library declaration if using
26 -- arithmetic functions with Signed or Unsigned values
27 use IEEE.NUMERIC_STD.ALL;
28 use IEEE.STD_LOGIC_UNSIGNED.ALL;
29 
30 -- Uncomment the following library declaration if instantiating
31 -- any Xilinx leaf cells in this code.
32 --library UNISIM;
33 --use UNISIM.VComponents.all;
34 
35 entity aurora_pipe is
36  generic (
37  channel_num : STD_LOGIC_VECTOR (11 downto 0) := "000000000000";
38  lmem : STD_LOGIC_VECTOR (3 downto 0) := "0000";
39  max_packet_length : STD_LOGIC_VECTOR (15 downto 0) := x"02A0"
40  );
41 
42  Port ( pp_clock : in STD_LOGIC;
43  aurora_user_clk : in STD_LOGIC;
44  reset : in STD_LOGIC;
45  aurora_chan_stat : in STD_LOGIC_VECTOR (31 downto 0);
46  s_axis_tvalid : in STD_LOGIC;
47  s_axis_tlast : in STD_LOGIC;
48  s_axis_tdata : in STD_LOGIC_VECTOR (63 downto 0);
49  m_axis_tvalid : out STD_LOGIC;
50  m_axis_tlast : out STD_LOGIC;
51  m_axis_tdata : out STD_LOGIC_VECTOR (63 downto 0);
52  m_first_cyc : out STD_LOGIC;
53  crc_error : out STD_LOGIC;
54  m_tval_tob : out STD_LOGIC;
55  m_tval_calo : out STD_LOGIC;
56  pkt_len_violation : out STD_LOGIC;
57 
58  comb_error : in STD_LOGIC;
59  m_comb_error : out std_logic
60 
61  );
62 end aurora_pipe;
63 
64 architecture RTL of aurora_pipe is
65 
66 component CRC
67  generic(
68  Nbits : positive := 64;
69  CRC_Width : positive := 9;
70 -- G_Poly: Std_Logic_Vector :=x"17d";
71  --G_Poly: Std_Logic_Vector := "101111101";
72  G_Poly: Std_Logic_Vector := "011111011";
73  G_InitVal: std_logic_vector:= "111111111"
74  );
75  port(
76  CRC : out std_logic_vector(CRC_Width-1 downto 0);
77  Calc : in std_logic;
78  Clk : in std_logic;
79  DIn : in std_logic_vector(Nbits-1 downto 0);
80  Reset : in std_logic);
81 end component;
82 
83 
84 component pulse_stretch is
85  generic (
86  COUNTER_WIDTH : integer := 7
87  );
88  Port (
89  clock : in STD_LOGIC;
90  reset : in STD_LOGIC;
91  pulse_in : in STD_LOGIC;
92  pulse_out : out STD_LOGIC
93 
94  );
95 end component;
96 
97 
98 signal axis_tvalid_1 : STD_LOGIC := '0';
99 signal axis_tlast_1 : STD_LOGIC := '0';
100 signal axis_tdata_1 : STD_LOGIC_VECTOR (63 downto 0);
101 signal first_cyc_1 : STD_LOGIC := '0';
102 signal comb_error_1 : STD_LOGIC := '0';
103 
104 signal axis_tvalid_2 : STD_LOGIC := '0';
105 signal axis_tlast_2 : STD_LOGIC := '0';
106 signal axis_tdata_2 : STD_LOGIC_VECTOR (63 downto 0);
107 signal first_cyc_2 : STD_LOGIC := '0';
108 signal comb_error_2 : STD_LOGIC := '0';
109 
110 signal axis_tvalid_3 : STD_LOGIC := '0';
111 signal axis_tlast_3 : STD_LOGIC := '0';
112 signal axis_tdata_3 : STD_LOGIC_VECTOR (63 downto 0);
113 signal first_cyc_3 : STD_LOGIC := '0';
114 signal comb_error_3 : STD_LOGIC := '0';
115 signal tval_tob_3 : STD_LOGIC := '0';
116 signal tval_calo_3 : STD_LOGIC := '0';
117 
118 signal axis_tvalid_4 : STD_LOGIC := '0';
119 signal axis_tlast_4 : STD_LOGIC := '0';
120 signal axis_tdata_4 : STD_LOGIC_VECTOR (63 downto 0);
121 signal first_cyc_4 : STD_LOGIC := '0';
122 signal comb_error_4 : STD_LOGIC := '0';
123 signal tval_tob_4 : STD_LOGIC := '0';
124 signal tval_calo_4 : STD_LOGIC := '0';
125 
126 signal m_axis_tvalid_i : STD_LOGIC := '0';
127 signal m_axis_tlast_i : STD_LOGIC := '0';
128 signal m_axis_tdata_i : STD_LOGIC_VECTOR (63 downto 0);
129 signal m_first_cyc_i : STD_LOGIC := '0';
130 signal s_first_cyc : STD_LOGIC;
131 signal tvalid_prev : STD_LOGIC := '0';
132 signal generated_crc: STD_LOGIC_VECTOR (8 downto 0);
133 signal header_crc : STD_LOGIC_VECTOR (8 downto 0);
134 signal crc_error_i : STD_LOGIC;
135 signal crc_error_3 : STD_LOGIC := '0';
136 signal crc_error_4 : STD_LOGIC := '0';
137 signal crc_input_low : STD_LOGIC_VECTOR (31 downto 0);
138 signal crc_input_high : STD_LOGIC_VECTOR (31 downto 0);
139 signal crc_input_flip : STD_LOGIC_VECTOR (63 downto 0);
140 signal m_tval_tob_i : STD_LOGIC := '0';
141 signal tval_tob : STD_LOGIC := '0';
142 signal m_tval_calo_i : STD_LOGIC := '0';
143 signal tval_calo : STD_LOGIC := '0';
144 
145 signal pkt_count : STD_LOGIC_VECTOR (15 downto 0) := x"0000";
146 signal trailer_value : STD_LOGIC_VECTOR (63 downto 0);
147 signal terminate_pkt : STD_LOGIC := '0';
148 signal terminate_pkt_1 : STD_LOGIC := '0';
149 signal terminate_pkt_2 : STD_LOGIC := '0';
150 signal terminate_pkt_flag : STD_LOGIC := '0';
151 signal pkt_len_violation_i : STD_LOGIC := '0';
152 signal in_progress : STD_LOGIC;
153 
154 signal calc_crc20 : STD_LOGIC;
155 signal generated_crc20 : STD_LOGIC_vector(19 downto 0);
156 signal reg_crc20 : STD_LOGIC_vector(19 downto 0) := x"00000";
157 
158 signal m_comb_error_i : std_logic;
159 signal pipe_lock : std_logic;
160 signal valid_low : std_logic;
161 signal valid_low_1 : std_logic;
162 signal valid_low_2 : std_logic;
163 signal valid_low_3 : std_logic;
164 
165 begin
166 
167 
168 
169 ----first pipeline stage-----
170 --process (aurora_user_clk) begin
171 process (aurora_user_clk, reset, pkt_len_violation_i, aurora_chan_stat(0), pipe_lock) begin
172 --Making asynchronous reset because aurora_user_clk stops during reset
173  if (reset = '1') or (pkt_len_violation_i = '1') or (aurora_chan_stat(0) = '0') or (pipe_lock = '1') then
174 -- if (reset = '1') then --or (pkt_len_violation_i = '1') then --2021_05_01 EF removing pkt_len_violation_i
175  axis_tvalid_1 <= '0';
176  axis_tlast_1 <= '0';
177 -- axis_tdata_1 <= (others => '0'); --no need to reset data
178  first_cyc_1 <= '0';
179 
180  elsif rising_edge (aurora_user_clk) then
181  axis_tdata_1 <= s_axis_tdata;
182  comb_error_1 <= comb_error;
183 -- if (reset = '1') or (pkt_len_violation_i = '1') then
184 -- axis_tvalid_1 <= '0';
185 -- axis_tlast_1 <= '0';
186 -- first_cyc_1 <= '0';
187 -- else
188  axis_tvalid_1 <= s_axis_tvalid;
189  axis_tlast_1 <= s_axis_tlast;
190 -- axis_tdata_1 <= s_axis_tdata;
191  first_cyc_1 <= s_first_cyc;
192 
193 -- end if;
194  end if;
195 end process;
196 
197 
198 ----second pipeline stage-----
199 --process (aurora_user_clk) begin
200 process (aurora_user_clk, reset, pkt_len_violation_i, aurora_chan_stat(0)) begin
201 --Making asynchronous reset because aurora_user_clk stops during reset
202  if (reset = '1')or (pkt_len_violation_i = '1') or (aurora_chan_stat(0) = '0') then
203 -- if (reset = '1') then --or (pkt_len_violation_i = '1') then --2021_05_01 EF removing pkt_len_violation_i
204  axis_tvalid_2 <= '0';
205  axis_tlast_2 <= '0';
206  first_cyc_2 <= '0';
207 
208  elsif rising_edge (aurora_user_clk) then
209  axis_tdata_2 <= axis_tdata_1;
210  comb_error_2 <= comb_error_1;
211  -- if (reset = '1')or (pkt_len_violation_i = '1') then
212  -- axis_tvalid_2 <= '0';
213  -- axis_tlast_2 <= '0';
214 --first_cyc_2 <= '0';
215 -- else
216  axis_tvalid_2 <= axis_tvalid_1;
217  axis_tlast_2 <= axis_tlast_1;
218  -- axis_tdata_2 <= axis_tdata_1;
219  first_cyc_2 <= first_cyc_1;
220 -- end if;
221  end if;
222 end process;
223 
224 ----third pipeline stage-----
225 --process (aurora_user_clk) begin
226 process (aurora_user_clk, reset, pkt_len_violation_i, aurora_chan_stat(0)) begin
227 --Making asynchronous reset because aurora_user_clk stops during reset
228  if (reset = '1') or (pkt_len_violation_i = '1') or (aurora_chan_stat(0) = '0') then
229 -- if (reset = '1') then --or (pkt_len_violation_i = '1') then --2021_05_01 EF removing pkt_len_violation_i
230  axis_tvalid_3 <= '0';
231  axis_tlast_3 <= '0';
232  first_cyc_3 <= '0';
233  tval_tob_3 <= '0';
234  tval_calo_3 <= '0';
235  elsif rising_edge (aurora_user_clk) then
236  axis_tdata_3 <= axis_tdata_2;
237  comb_error_3 <= comb_error_2;
238  -- if (reset = '1') or (pkt_len_violation_i = '1') then
239  -- axis_tvalid_3 <= '0';
240  -- axis_tlast_3 <= '0';
241  -- first_cyc_3 <= '0';
242  -- tval_tob_3 <= '0';
243  -- tval_calo_3 <= '0';
244  -- else
245  axis_tvalid_3 <= axis_tvalid_2;
246  axis_tlast_3 <= axis_tlast_2;
247 -- axis_tdata_3 <= axis_tdata_2;
248  first_cyc_3 <= first_cyc_2;
249 
250  tval_tob_3 <= tval_tob;
251  tval_calo_3 <= tval_calo;
252  end if;
253 -- end if;
254 end process;
255 
256 
257 ----rescue trailer insertion stage
258 --process (aurora_user_clk) begin
259 -- if rising_edge (aurora_user_clk) then
260 -- if (reset = '1') then
261 -- axis_tvalid_4 <= '0';
262 -- axis_tlast_4 <= '0';
263 -- first_cyc_4 <= '0';
264 -- tval_tob_4 <= '0';
265 -- tval_calo_4 <= '0';
266 -- -- m_axis_tdata_i <= (others => '0');
267 -- else
268 -- axis_tvalid_4 <= axis_tvalid_3;
269 -- axis_tlast_4 <= axis_tlast_3;
270 -- first_cyc_4 <= first_cyc_3;
271 -- tval_tob_4 <= tval_tob_3;
272 -- tval_calo_4 <= tval_calo_3 and not crc_error_3;
273 -- crc_error_4 <= crc_error_3 and first_cyc_3;
274 -- if (terminate_pkt = '1') then
275 -- axis_tdata_4 <= trailer_value;
276 -- axis_tlast_4 <= '1';
277 -- else
278 -- axis_tdata_4 <= axis_tdata_3;
279 -- axis_tlast_4 <= axis_tlast_3;
280 -- end if;
281 -- end if;
282 -- end if;
283 --end process;
284 
285 ----rescue trailer insertion stage
286 -->! Note that if there is a crc error, then TVAL_Calo is cleared and TVAL_TOB is set.
287 -->! This is because all packets with header crc errors must be routed through the TOB fifo for error processing.
288 process (aurora_user_clk) begin
289  if rising_edge (aurora_user_clk) then
290  crc_error_4 <= crc_error_3 and first_cyc_3;
291  if (reset = '1') then
292  first_cyc_4 <= '0';
293  tval_tob_4 <= '0';
294  tval_calo_4 <= '0';
295  else
296  first_cyc_4 <= first_cyc_3;
297  tval_tob_4 <= tval_tob_3 or (crc_error_3 and first_cyc_3);
298  tval_calo_4 <= tval_calo_3 and not crc_error_3;
299  end if;
300  end if;
301 end process;
302 
303 process (aurora_user_clk) begin
304  if rising_edge (aurora_user_clk) then
305  if (reset = '1') then
306  axis_tvalid_4 <= '0';
307  axis_tlast_4 <= '0';
308  axis_tdata_4 <= axis_tdata_3;
309  comb_error_4 <= comb_error_3;
310  elsif (terminate_pkt = '1') then
311  axis_tdata_4 <= trailer_value;
312  axis_tlast_4 <= '1';
313  axis_tvalid_4 <= '1';
314  else
315  axis_tvalid_4 <= axis_tvalid_3;
316  axis_tlast_4 <= axis_tlast_3;
317  axis_tdata_4 <= axis_tdata_3;
318  comb_error_4 <= comb_error_3;
319 
320  end if;
321  end if;
322 end process;
323 
324 
325 trailer_value <= channel_num & "0000" & max_packet_length & x"5a5a5" & x"A" & '0' & "0101100";
326 -- 12 4 16 20 4 1 7
327 --trailer_value <= channel_num & "0000" & max_packet_length & reg_crc20 & x"A" & '0' & "0101100";
328 -- 12 4 16 20 4 1 7
329 
330 ----fifth pipeline stage-----
331 process (aurora_user_clk) begin
332  if rising_edge (aurora_user_clk) then
333  m_axis_tdata_i <= axis_tdata_4;
334  m_comb_error_i <= comb_error_4;
335  if (reset = '1') then
336  m_axis_tvalid_i <= '0';
337  m_axis_tlast_i <= '0';
338  m_first_cyc_i <= '0';
339  m_tval_tob_i <= '0';
340  m_tval_calo_i <= '0';
341  crc_error_i <= '0';
342 -- m_axis_tdata_i <= (others => '0');
343  else
344  m_axis_tvalid_i <= axis_tvalid_4;
345  m_axis_tlast_i <= axis_tlast_4;
346 -- m_axis_tdata_i <= axis_tdata_4;
347  m_first_cyc_i <= first_cyc_4;
348  m_tval_tob_i <= tval_tob_4;
349  m_tval_calo_i <= tval_calo_4;
350  crc_error_i <= crc_error_4;
351 
352  end if;
353  end if;
354 end process;
355 
356 m_axis_tvalid <= m_axis_tvalid_i;
357 m_axis_tlast <= m_axis_tlast_i;
358 m_axis_tdata <= m_axis_tdata_i;
359 m_first_cyc <= m_first_cyc_i;
360 m_tval_tob <= m_tval_tob_i;
361 m_tval_calo <= m_tval_calo_i;
362 m_comb_error <= m_comb_error_i;
363 
364 
365 process (aurora_user_clk) begin
366  if rising_edge (aurora_user_clk) then
367  if (reset = '1') then
368  tvalid_prev <= '0';
369  else
370  tvalid_prev <= (not s_axis_tvalid) or (s_axis_tlast and s_axis_tvalid);
371  end if;
372  end if;
373  end process;
374 
375  process(aurora_user_clk, terminate_pkt) begin
376  if (terminate_pkt = '1') then
377  in_progress <= '0';
378  elsif rising_edge (aurora_user_clk) then
379  if (reset = '1') or (s_axis_tlast = '1') then
380  in_progress <= '0';
381  elsif (s_first_cyc = '1') and (s_axis_tlast = '0') then
382  in_progress <= '1';
383  else
384  in_progress <= in_progress;
385  end if;
386  end if;
387  end process;
388 
389 --s_first_cyc <= s_axis_tvalid and tvalid_prev and not s_axis_tlast;
390 s_first_cyc <= s_axis_tvalid and tvalid_prev and not s_axis_tlast and not in_progress;
391 
392 process (aurora_user_clk) begin
393  if rising_edge (aurora_user_clk) then
394  if (reset = '1') then
395  header_crc <= (others => '0');
396  else
397  header_crc <= axis_tdata_2(28 downto 20);
398  end if;
399  end if;
400  end process;
401 --header_crc <= axis_tdata_2(28 downto 20);
402 
403 crc_input_low <= axis_tdata_1(63 downto 32);
404 crc_input_flip <= axis_tdata_1(31 downto 29) & "000000000" & axis_tdata_1(19 downto 0) & axis_tdata_1(63 downto 32);
405 
406 crc_gen : CRC
407  generic map (
408  Nbits => 64,
409  CRC_Width => 9,
410 -- G_Poly: Std_Logic_Vector :=x"17d";
411  --G_Poly: Std_Logic_Vector := "101111101";
412  G_Poly => "011111011",
413  G_InitVal => "111111111"
414  )
415  port map (
416  CRC => generated_CRC,
417  Calc => first_cyc_1,
418  Clk => aurora_user_clk,
419  DIn => crc_input_flip,
420  Reset => first_cyc_1
421  );
422 
423 crc_error_3 <= '1' when generated_CRC /= header_crc else '0';
424 
425 crc_error <= crc_error_i;
426 
427 ---------------------------------IN PROGRESS----------------------------------------------------
428 --CRC20 is being removed from the input pipe. It was placed here in order to build the Corrrective Trailer if needed,
429 --However, I've realised that there is no time to insert the corrective header without the risk of losing an incoming data word.
430 --The Aurora input can not be held back for any cycles.
431 --crc20_gen : CRC
432 -- generic map (
433 -- Nbits => 64,
434 -- CRC_Width => 20,
435 -- -- G_Poly => x"c1acf",
436 -- G_Poly => x"8349f",
437 -- G_InitVal => x"fffff"
438 -- )
439 -- port map (
440 -- CRC => generated_CRC20,
441 -- Calc => calc_crc20,
442 -- Clk => aurora_user_clk,
443 -- DIn(31 downto 0) => axis_tdata_1(63 downto 32),
444 -- DIn(63 downto 32) => axis_tdata_1(31 downto 0),
445  --- Reset => first_cyc_1
446 -- );
447 --
448 --calc_crc20 <= not first_cyc_1 and axis_tvalid_1;
449 --
450 --process (aurora_user_clk) begin
451 -- if rising_edge (aurora_user_clk) then
452 -- if reset = '1' then
453 -- reg_crc20<= x"00000";
454 -- elsif axis_tlast_3 = '1' then
455 -- reg_crc20 <= generated_CRC20;
456 -- else
457 -- reg_crc20 <= reg_crc20;
458 -- end if;
459 -- end if;
460 --end process;
461 ---------------------------------------------------------------------------------------
462 
463 --stream ID decoding
464 --tval_tob <= first_cyc_2 and axis_tdata_2(0) and not axis_tdata_2(1);
465 --tval_calo <= first_cyc_2 and axis_tdata_2(6);-- and not s_crc_error;
466 --updated streamid definition 25-Nov-19
467 tval_tob <= first_cyc_2 and not axis_tdata_2(7);
468 tval_calo <= first_cyc_2 and axis_tdata_2(7);-- and not s_crc_error;
469 
470 --packet length counter
471 process (aurora_user_clk, pkt_len_violation_i) begin
472  if pkt_len_violation_i = '1' then -- async (p)reset -> put 'reset in sensitivity list
473  pkt_count <= (others => '0');
474  elsif rising_edge (aurora_user_clk) then
475  if (reset = '1') or (s_axis_tlast = '1') or (pipe_lock = '1') then -- or (terminate_pkt = '1') then
476  pkt_count <= (others => '0');
477  elsif (s_axis_tvalid = '1') then
478  pkt_count <= (pkt_count + 1);
479  else
480  pkt_count <= pkt_count;
481  end if;
482  end if;
483  end process;
484 
485 
486 --2021_04_30 EF disabling terminate packet function due to problems with aurora_user_clk stopping
487 --terminate_pkt <= '0';
488 -- process (aurora_user_clk) begin
489 -- if rising_edge (aurora_user_clk) then
490 -- if (reset = '1') or (terminate_pkt = '1') then
491 -- terminate_pkt <= '0';
492 -- elsif (pkt_count = max_packet_length) then
493 -- terminate_pkt <= '1';
494 -- end if;
495 -- end if;
496 -- end process;
497 --replacing above with a flag set function
498 
499 --2021_05_05 EF restoring terminate_pkt function but clocked with pp_clock instead of aurora_user_clk
500 --and triggering on pkt_count >=
501 
502  process (pp_clock) begin
503  -- if rising_edge (aurora_user_clk) then
504  if rising_edge (pp_clock) then
505  if (reset = '1') or (terminate_pkt_1 = '1') then
506  terminate_pkt_1 <= '0';
507  elsif (pkt_count >= max_packet_length) and (pkt_len_violation_i = '0') then
508  terminate_pkt_1 <= '1';
509  end if;
510  end if;
511  end process;
512 
513  process (pp_clock) begin
514  -- if rising_edge (aurora_user_clk) then
515  if rising_edge (pp_clock) then
516  terminate_pkt_2 <= terminate_pkt_1;
517  end if;
518  end process;
519 
520  terminate_pkt <= terminate_pkt_1 or terminate_pkt_2;
521 --replacing above with a flag set function
522 
523 
524 
525 process (aurora_user_clk) begin
526  if rising_edge (aurora_user_clk) then
527  if (reset = '1') or (terminate_pkt_flag = '1') then
528  terminate_pkt_flag <= '0';
529  elsif (pkt_count = max_packet_length) then
530  terminate_pkt_flag <= '1';
531  end if;
532  end if;
533  end process;
534 
535 
536 --pkt_len_violation <= terminate_pkt;
537 --add pulse stretcher onto terminate_pkt to make lkt_len_violation
538 
539 pulse_stretcher : pulse_stretch
540  generic map (
541  COUNTER_WIDTH => 4
542  )
543  Port map (
544 -- clock => aurora_user_clk, --ef changing this to pp_clock because aurora_user_clk was stopping and causing continuous assertion of pkt_len_violation_i
545  clock => pp_clock,
546  reset => reset,
547  pulse_in => terminate_pkt,
548 -- pulse_in => terminate_pkt_flag,
549  pulse_out => pkt_len_violation_i
550  );
551 
552 pkt_len_violation <= pkt_len_violation_i;
553 
554 
555 --pipe lock is to keep the pipe clean following a max packet length error. Pipe Lock is cleared when tvalid is brought low
556 --indicating that the FEX has regained control or that the Aurora link has been reset.
557 
558 --because jfex s_axis_tvali is always low every second cycle, it's necessary to detect multiple cycles where it is low in
559 -- order to determine if the FEX has really stopped sending
560 
561 --This scheme doesn't sample tlast, so it could be fooled if the FEX sends a never-ending packet using bursts of tvalid and no tlast.
562 
563 process (aurora_user_clk, pkt_len_violation_i) begin
564  if pkt_len_violation_i = '1' then
565  valid_low_1 <= '0';
566  valid_low_2 <= '0';
567  valid_low_3 <= '0';
568  elsif rising_edge (aurora_user_clk) then
569  valid_low_1 <= not s_axis_tvalid;
570  valid_low_2 <= valid_low_1;
571  valid_low_3 <= valid_low_2;
572  end if;
573  end process;
574 
575  valid_low <= valid_low_1 and valid_low_2 and valid_low_3;
576 
577 
578 
579 process (aurora_user_clk, pkt_len_violation_i) begin
580  if pkt_len_violation_i = '1' then
581  pipe_lock <= '1';
582  elsif rising_edge (aurora_user_clk) then
583  if (valid_low = '1') then --
584  pipe_lock <= '0';
585  else
586  pipe_lock <= pipe_lock;
587  end if;
588  end if;
589  end process;
590 
591 end RTL;
Definition: crc.vhd:25