Skip to content
Snippets Groups Projects
Commit ccb077f3 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

Processed review comments of the merge of L2SDP-130

parent 0f100813
Branches
No related tags found
1 merge request!38Resolve L2SDP-130
......@@ -46,6 +46,7 @@ USE wpfb_lib.wpfb_pkg.ALL;
ENTITY node_sdp_filterbank IS
GENERIC (
g_sim : BOOLEAN := FALSE;
g_nof_streams : NATURAL := 12 -- CONSTANT
);
PORT (
......@@ -60,36 +61,36 @@ ENTITY node_sdp_filterbank IS
reg_si_mosi : IN t_mem_mosi := c_mem_mosi_rst;
reg_si_miso : OUT t_mem_miso;
ram_st_sst_mosi : IN t_mem_mosi; -- Subband statistics registers
ram_st_sst_miso : OUT t_mem_miso := c_mem_miso_rst;
ram_fil_coefs_mosi : IN t_mem_mosi;
ram_fil_coefs_miso : OUT t_mem_miso := c_mem_miso_rst
ram_st_sst_mosi : IN t_mem_mosi := c_mem_mosi_rst;
ram_st_sst_miso : OUT t_mem_miso;
ram_fil_coefs_mosi : IN t_mem_mosi := c_mem_mosi_rst;
ram_fil_coefs_miso : OUT t_mem_miso
);
END node_sdp_filterbank;
ARCHITECTURE str OF node_sdp_filterbank IS
-- In SDP c_nof_channels = 2**nof_chan = 1 and wb_factor = 1,
-- therefore these parameters are not explicitly used in calculation of derived constants
CONSTANT c_wpfb_lofar_subbands : t_wpfb :=
(1, 1024, 0, 6,
16, 1, 14, 16, 16,
true, false, true, 16, 18, 1, 18, 2, true, 54, 2, 195313,
c_fft_pipeline, c_fft_pipeline, c_fil_ppf_pipeline);
CONSTANT c_in_dat_w : NATURAL := c_wpfb_lofar_subbands.fil_in_dat_w;
CONSTANT c_nof_channels : NATURAL := 2**c_wpfb_lofar_subbands.nof_chan;
CONSTANT c_nof_data_per_block : NATURAL := c_nof_channels * c_wpfb_lofar_subbands.nof_points;
CONSTANT c_nof_valid_per_block : NATURAL := c_nof_data_per_block / c_wpfb_lofar_subbands.wb_factor;
CONSTANT c_nof_stats : NATURAL := c_nof_valid_per_block;
CONSTANT c_in_dat_w : NATURAL := c_wpfb_lofar_subbands.fil_in_dat_w;
CONSTANT c_out_dat_w : NATURAL := c_wpfb_lofar_subbands.fft_out_dat_w;
CONSTANT c_coefs_file_prefix : STRING := "UNUSED"; --"data/coefs_wide";
SIGNAL ram_st_sst_mosi_arr : t_mem_mosi_arr(c_wpfb_lofar_subbands.nof_wb_streams*c_wpfb_lofar_subbands.wb_factor-1 DOWNTO 0);
SIGNAL ram_st_sst_miso_arr : t_mem_miso_arr(c_wpfb_lofar_subbands.nof_wb_streams*c_wpfb_lofar_subbands.wb_factor-1 DOWNTO 0) := (OTHERS => c_mem_miso_rst);
SIGNAL ram_st_sst_mosi_arr : t_mem_mosi_arr(c_wpfb_lofar_subbands.nof_wb_streams-1 DOWNTO 0) := (OTHERS => c_mem_mosi_rst);
SIGNAL ram_st_sst_miso_arr : t_mem_miso_arr(c_wpfb_lofar_subbands.nof_wb_streams-1 DOWNTO 0) := (OTHERS => c_mem_miso_rst);
SIGNAL wpfb_unit_out_sosi_arr : t_dp_sosi_arr(c_wpfb_lofar_subbands.nof_wb_streams*c_wpfb_lofar_subbands.wb_factor-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL wpfb_unit_fil_sosi_arr : t_dp_sosi_arr(c_wpfb_lofar_subbands.nof_wb_streams*c_wpfb_lofar_subbands.wb_factor-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL wpfb_unit_in_sosi_arr : t_dp_sosi_arr(c_wpfb_lofar_subbands.nof_wb_streams*c_wpfb_lofar_subbands.wb_factor-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL si_sosi_arr : t_dp_sosi_arr(g_nof_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL si_sosi_arr : t_dp_sosi_arr(g_nof_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL wpfb_unit_out_sosi_arr : t_dp_sosi_arr(c_wpfb_lofar_subbands.nof_wb_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL wpfb_unit_fil_sosi_arr : t_dp_sosi_arr(c_wpfb_lofar_subbands.nof_wb_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL wpfb_unit_in_sosi_arr : t_dp_sosi_arr(c_wpfb_lofar_subbands.nof_wb_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL scope_sosi_arr : t_dp_sosi_integer_arr(c_wpfb_lofar_subbands.nof_wb_streams-1 DOWNTO 0);
BEGIN
---------------------------------------------------------------
......@@ -120,19 +121,17 @@ BEGIN
-- Connect the 12 ADC streams to the re and im fields of the PFB input.
p_pfb_streams : PROCESS(si_sosi_arr)
BEGIN
FOR I IN 0 TO c_wpfb_lofar_subbands.nof_wb_streams*c_wpfb_lofar_subbands.wb_factor-1 LOOP
FOR I IN 0 TO c_wpfb_lofar_subbands.nof_wb_streams-1 LOOP
wpfb_unit_in_sosi_arr(I) <= si_sosi_arr(2*I);
wpfb_unit_in_sosi_arr(I).re(c_in_dat_w-1 DOWNTO 0) <= si_sosi_arr(2*I).data(c_in_dat_w-1 DOWNTO 0);
wpfb_unit_in_sosi_arr(I).im(c_in_dat_w-1 DOWNTO 0) <= si_sosi_arr(2*I+1).data(c_in_dat_w-1 DOWNTO 0);
wpfb_unit_in_sosi_arr(I).re <= RESIZE_DP_DSP_DATA(si_sosi_arr(2*I).data);
wpfb_unit_in_sosi_arr(I).im <= RESIZE_DP_DSP_DATA(si_sosi_arr(2*I+1).data);
END LOOP;
END PROCESS;
-- PFB
u_wpfb_unit_dev : ENTITY wpfb_lib.wpfb_unit_dev
GENERIC MAP (
g_big_endian_wb_in => TRUE,
g_wpfb => c_wpfb_lofar_subbands,
g_dont_flip_channels => FALSE,
g_use_prefilter => TRUE,
g_stats_ena => FALSE,
g_use_bg => FALSE,
......@@ -147,13 +146,6 @@ BEGIN
ram_fil_coefs_mosi => ram_fil_coefs_mosi,
ram_fil_coefs_miso => ram_fil_coefs_miso,
ram_st_sst_mosi => c_mem_mosi_rst,
ram_st_sst_miso => OPEN,
reg_bg_ctrl_mosi => c_mem_mosi_rst,
reg_bg_ctrl_miso => OPEN,
ram_bg_data_mosi => c_mem_mosi_rst,
ram_bg_data_miso => OPEN,
in_sosi_arr => wpfb_unit_in_sosi_arr,
fil_sosi_arr => wpfb_unit_fil_sosi_arr,
out_sosi_arr => wpfb_unit_out_sosi_arr
......@@ -165,11 +157,10 @@ BEGIN
---------------------------------------------------------------
-- SUBBAND STATISTICS
---------------------------------------------------------------
gen_stats_streams: FOR S IN 0 TO c_wpfb_lofar_subbands.nof_wb_streams-1 GENERATE
gen_stats_wideband: FOR P IN 0 TO c_wpfb_lofar_subbands.wb_factor-1 GENERATE
gen_stats_streams: FOR I IN 0 TO c_wpfb_lofar_subbands.nof_wb_streams-1 GENERATE
u_subband_stats : ENTITY st_lib.st_sst
GENERIC MAP(
g_nof_stat => c_nof_stats,
g_nof_stat => c_wpfb_lofar_subbands.nof_points,
g_in_data_w => c_wpfb_lofar_subbands.fft_out_dat_w,
g_stat_data_w => c_wpfb_lofar_subbands.stat_data_w,
g_stat_data_sz => c_wpfb_lofar_subbands.stat_data_sz
......@@ -179,11 +170,10 @@ BEGIN
mm_clk => mm_clk,
dp_rst => dp_rst,
dp_clk => dp_clk,
in_complex => wpfb_unit_out_sosi_arr(S*c_wpfb_lofar_subbands.wb_factor+P),
ram_st_sst_mosi => ram_st_sst_mosi_arr(S*c_wpfb_lofar_subbands.wb_factor+P),
ram_st_sst_miso => ram_st_sst_miso_arr(S*c_wpfb_lofar_subbands.wb_factor+P)
in_complex => wpfb_unit_out_sosi_arr(I),
ram_st_sst_mosi => ram_st_sst_mosi_arr(I),
ram_st_sst_miso => ram_st_sst_miso_arr(I)
);
END GENERATE;
END GENERATE;
---------------------------------------------------------------
......@@ -193,8 +183,8 @@ BEGIN
-- statistics to one array.
u_mem_mux_sst : ENTITY common_lib.common_mem_mux
GENERIC MAP (
g_nof_mosi => c_wpfb_lofar_subbands.nof_wb_streams*c_wpfb_lofar_subbands.wb_factor,
g_mult_addr_w => ceil_log2(c_wpfb_lofar_subbands.stat_data_sz*c_nof_stats)
g_nof_mosi => c_wpfb_lofar_subbands.nof_wb_streams,
g_mult_addr_w => ceil_log2(c_wpfb_lofar_subbands.stat_data_sz*c_wpfb_lofar_subbands.nof_points)
)
PORT MAP (
mosi => ram_st_sst_mosi,
......@@ -203,4 +193,22 @@ BEGIN
miso_arr => ram_st_sst_miso_arr
);
---------------------------------------------------------------
-- SIGNAL SCOPE
---------------------------------------------------------------
u_dp_wideband_sp_arr_scope : ENTITY dp_lib.dp_wideband_sp_arr_scope
GENERIC MAP (
g_sim => g_sim,
g_use_sclk => FALSE,
g_complex => TRUE,
g_nof_streams => c_wpfb_lofar_subbands.nof_wb_streams,
g_wideband_factor => 1,
g_dat_w => c_out_dat_w
)
PORT MAP (
DCLK => dp_clk,
sp_sosi_arr => wpfb_unit_out_sosi_arr,
scope_sosi_arr => scope_sosi_arr
);
END str;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment