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

Add g_read_all_sub_sel to speed up sim.

parent 5e3f3037
No related branches found
No related tags found
1 merge request!283Resolve L2SDP-696
Pipeline #36944 passed
...@@ -155,6 +155,7 @@ ENTITY tb_lofar2_unb2c_sdp_station_bf IS ...@@ -155,6 +155,7 @@ ENTITY tb_lofar2_unb2c_sdp_station_bf IS
g_bf_remnant_y_gain : REAL := 0.04; -- g_beamlet Y BF weight normalized gain for remnant sp g_bf_remnant_y_gain : REAL := 0.04; -- g_beamlet Y BF weight normalized gain for remnant sp
g_bf_remnant_x_phase : REAL := 170.0; -- g_beamlet X BF weight phase rotation in degrees for remnant sp g_bf_remnant_x_phase : REAL := 170.0; -- g_beamlet X BF weight phase rotation in degrees for remnant sp
g_bf_remnant_y_phase : REAL := -135.0; -- g_beamlet Y BF weight phase rotation in degrees for remnant sp g_bf_remnant_y_phase : REAL := -135.0; -- g_beamlet Y BF weight phase rotation in degrees for remnant sp
g_read_all_sub_sel : BOOLEAN := FALSE; -- when FALSE only read subband selection for g_beamlet, to save sim time
g_read_all_SST : BOOLEAN := TRUE; -- when FALSE only read SST for g_subband, to save sim time g_read_all_SST : BOOLEAN := TRUE; -- when FALSE only read SST for g_subband, to save sim time
g_read_all_BST : BOOLEAN := TRUE -- when FALSE only read BST for g_beamlet, to save sim time g_read_all_BST : BOOLEAN := TRUE -- when FALSE only read BST for g_beamlet, to save sim time
); );
...@@ -407,7 +408,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf IS ...@@ -407,7 +408,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf IS
-- BF -- BF
-- . beamlet subband selection -- . beamlet subband selection
SIGNAL sp_subband_select : NATURAL := 0; SIGNAL sp_subband_select : NATURAL := 0;
SIGNAL sp_subband_select_arr : t_natural_arr(0 TO c_sdp_S_sub_bf * c_sdp_N_pol-1) := (OTHERS => 0); -- Q_fft = N_pol = 2 SIGNAL sp_subband_select_arr : t_integer_arr(0 TO c_sdp_S_sub_bf * c_sdp_N_pol-1) := (OTHERS => -1); -- Q_fft = N_pol = 2
-- . beamlet X-pol -- . beamlet X-pol
SIGNAL sp_bf_x_weights_re_arr : t_integer_arr(0 TO c_sdp_S_pn-1) := (OTHERS => 0); SIGNAL sp_bf_x_weights_re_arr : t_integer_arr(0 TO c_sdp_S_pn-1) := (OTHERS => 0);
...@@ -630,8 +631,6 @@ BEGIN ...@@ -630,8 +631,6 @@ BEGIN
p_mm_stimuli : PROCESS p_mm_stimuli : PROCESS
VARIABLE v_bsn : NATURAL; VARIABLE v_bsn : NATURAL;
VARIABLE v_sp_sst : REAL := 0.0;
VARIABLE v_bst : REAL := 0.0;
VARIABLE v_data_lo, v_data_hi : STD_LOGIC_VECTOR(c_word_w-1 DOWNTO 0); VARIABLE v_data_lo, v_data_hi : STD_LOGIC_VECTOR(c_word_w-1 DOWNTO 0);
VARIABLE v_stat_data : STD_LOGIC_VECTOR(c_longword_w-1 DOWNTO 0); VARIABLE v_stat_data : STD_LOGIC_VECTOR(c_longword_w-1 DOWNTO 0);
VARIABLE v_len, v_span, v_offset, v_addr, v_sel : NATURAL; -- address ranges, indices VARIABLE v_len, v_span, v_offset, v_addr, v_sel : NATURAL; -- address ranges, indices
...@@ -931,15 +930,18 @@ BEGIN ...@@ -931,15 +930,18 @@ BEGIN
FOR U IN 0 TO c_sdp_N_beamsets-1 LOOP FOR U IN 0 TO c_sdp_N_beamsets-1 LOOP
-- Same selection for both beamsets, so fine to use only one sp_subband_select_arr() -- Same selection for both beamsets, so fine to use only one sp_subband_select_arr()
FOR B IN 0 TO c_sdp_S_sub_bf-1 LOOP FOR B IN 0 TO c_sdp_S_sub_bf-1 LOOP
-- Same selection for all SP, so fine to only read subband selection for g_sp IF g_read_all_sub_sel OR B = g_beamlet THEN
v_addr := v_P + B * c_sdp_N_pol + v_A * v_span + U * c_mm_span_ram_ss_ss_wide; -- Same selection for all SP, so fine to only read subband selection for g_sp
mmf_mm_bus_rd(c_mm_file_ram_ss_ss_wide, v_addr, rd_data, tb_clk); v_addr := v_P + B * c_sdp_N_pol + v_A * v_span + U * c_mm_span_ram_ss_ss_wide;
v_sel := (TO_UINT(rd_data) - v_P) / c_sdp_N_pol; mmf_mm_bus_rd(c_mm_file_ram_ss_ss_wide, v_addr, rd_data, tb_clk);
sp_subband_select_arr(B) <= v_sel; v_sel := (TO_UINT(rd_data) - v_P) / c_sdp_N_pol;
sp_subband_select <= v_sel; -- for time series view in Wave window sp_subband_select_arr(B * c_sdp_N_pol + v_P) <= v_sel;
sp_subband_select <= v_sel; -- for time series view in Wave window
END IF;
END LOOP; END LOOP;
END LOOP; END LOOP;
proc_common_wait_some_cycles(tb_clk, 1); proc_common_wait_some_cycles(tb_clk, 1);
ASSERT sp_subband_select_arr(g_beamlet * c_sdp_N_pol + v_P) = g_subband REPORT "Wrong subband select at beamlet index." SEVERITY ERROR;
proc_common_wait_some_cycles(ext_clk, 100); -- delay for ease of view in Wave window proc_common_wait_some_cycles(ext_clk, 100); -- delay for ease of view in Wave window
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
......
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