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

No functional change. Use short index variables names in capitals, to ease...

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