Skip to content
Snippets Groups Projects
Commit 6b0d3b01 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

No functional change. Use short index variables v_Q, v_B to ease recognizing them as loop indices.

parent 3b42b2f2
No related branches found
No related tags found
1 merge request!219No functional change. Use short index variables names in capitals, to ease...
......@@ -77,30 +77,31 @@ BEGIN
-- [N_pol_bf][S_pn/Q_fft]_[S_sub_bf][Q_fft]. Therefore this counter
-- has to account for this difference in order.
p_cnt : PROCESS(dp_clk, dp_rst)
VARIABLE v_Q_fft, v_S_sub_bf : NATURAL;
-- Use short index variables v_Q, v_B names, to ease recognizing them as (loop) indices.
VARIABLE v_Q, v_B : NATURAL;
BEGIN
IF dp_rst = '1' THEN
cnt <= 0;
v_Q_fft := 0;
v_S_sub_bf := 0;
v_Q := 0;
v_B := 0;
ELSIF rising_edge(dp_clk) THEN
IF in_sosi_arr(0).valid = '1' THEN
IF in_sosi_arr(0).eop = '1' THEN
v_Q_fft := 0;
v_S_sub_bf := 0;
v_Q := 0;
v_B := 0;
ELSE
IF v_Q_fft >= c_sdp_Q_fft-1 THEN
v_Q_fft := 0;
IF v_S_sub_bf >= c_sdp_S_sub_bf-1 THEN
v_S_sub_bf := 0;
IF v_Q >= c_sdp_Q_fft-1 THEN
v_Q := 0;
IF v_B >= c_sdp_S_sub_bf-1 THEN
v_B := 0;
ELSE
v_S_sub_bf := v_S_sub_bf + 1;
v_B := v_B + 1;
END IF;
ELSE
v_Q_fft := v_Q_fft + 1;
v_Q := v_Q + 1;
END IF;
END IF;
cnt <= v_Q_fft * c_sdp_S_sub_bf + v_S_sub_bf;
cnt <= v_Q * c_sdp_S_sub_bf + v_B;
END IF;
END IF;
END PROCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment