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

Generalised sdp_scope to also use it in node_sdp_beamformer.

parent e31e1154
No related branches found
No related tags found
2 merge requests!100Removed text for XSub that is now written in Confluence Subband correlator...,!57Resolve L2SDP-170
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
-- Author: R. van der Walle -- Author: R. van der Walle
-- Purpose: -- Purpose:
-- . Scope component to show the desired subband from the PFB output in the wave -- . Scope component to show the desired time index (beamlet/subband) from
-- window. -- the sp_sosi_arr input in the wave window based on g_selection.
-- Description: -- Description:
-- First deinterleaves the input then feed that to dp_wideband_sp_arr_scope.
-- Remark: -- Remark:
-- . Only for simulation. -- . Only for simulation.
-- . g_selected_subband can be 0 - 511.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
LIBRARY IEEE, common_lib, dp_lib; LIBRARY IEEE, common_lib, dp_lib;
...@@ -40,45 +40,54 @@ USE work.sdp_pkg.ALL; ...@@ -40,45 +40,54 @@ USE work.sdp_pkg.ALL;
ENTITY sdp_scope IS ENTITY sdp_scope IS
GENERIC ( GENERIC (
g_sim : BOOLEAN := FALSE; g_sim : BOOLEAN := FALSE;
g_selected_subband : NATURAL := 0 g_selection : NATURAL := 0;
g_nof_input : NATURAL := 2;
g_n_deinterleave : NATURAL := 2;
g_dat_w : NATURAL := 18
); );
PORT ( PORT (
clk : IN STD_LOGIC; clk : IN STD_LOGIC;
rst : IN STD_LOGIC; rst : IN STD_LOGIC;
-- Streaming input for P_pfb complex streams -- Streaming input for complex streams
sp_sosi_arr : IN t_dp_sosi_arr(c_sdp_P_pfb-1 DOWNTO 0); sp_sosi_arr : IN t_dp_sosi_arr(g_nof_input-1 DOWNTO 0);
-- Scope output for S_pn streams -- Scope output for deinterleaved streams
scope_sosi_arr : OUT t_dp_sosi_integer_arr(c_sdp_S_pn-1 DOWNTO 0) scope_sosi_arr : OUT t_dp_sosi_integer_arr(g_nof_input*g_n_deinterleave-1 DOWNTO 0)
); );
END sdp_scope; END sdp_scope;
ARCHITECTURE str OF sdp_scope IS ARCHITECTURE str OF sdp_scope IS
TYPE t_dp_sosi_2arr_n IS ARRAY (INTEGER RANGE <>) OF t_dp_sosi_arr(g_n_deinterleave-1 DOWNTO 0);
SIGNAL cnt : NATURAL; SIGNAL cnt : NATURAL;
SIGNAL deinterleaved_sosi_arr : t_dp_sosi_arr(c_sdp_S_pn-1 DOWNTO 0); SIGNAL deinterleaved_sosi_2arr_n : t_dp_sosi_2arr_n(g_nof_input-1 DOWNTO 0);
SIGNAL subband_sosi_arr : t_dp_sosi_arr(c_sdp_S_pn-1 DOWNTO 0) := (OTHERS=>c_dp_sosi_rst); SIGNAL deinterleaved_sosi_arr : t_dp_sosi_arr(g_nof_input*g_n_deinterleave-1 DOWNTO 0);
SIGNAL selected_sosi_arr : t_dp_sosi_arr(g_nof_input*g_n_deinterleave-1 DOWNTO 0) := (OTHERS=>c_dp_sosi_rst);
BEGIN BEGIN
sim_only : IF g_sim=TRUE GENERATE sim_only : IF g_sim=TRUE GENERATE
gen_deinterleave : FOR I IN 0 TO c_sdp_P_pfb-1 GENERATE gen_deinterleave : FOR I IN 0 TO g_nof_input-1 GENERATE
u_dp_deinterleave : ENTITY dp_lib.dp_deinterleave_one_to_n u_dp_deinterleave : ENTITY dp_lib.dp_deinterleave_one_to_n
GENERIC MAP( GENERIC MAP(
g_pipeline => 0, g_pipeline => 0,
g_nof_outputs => c_sdp_Q_fft g_nof_outputs => g_n_deinterleave
) )
PORT MAP( PORT MAP(
rst => rst, rst => rst,
clk => clk, clk => clk,
snk_in => sp_sosi_arr(I), snk_in => sp_sosi_arr(I),
src_out_arr(0) => deinterleaved_sosi_arr(2*I), src_out_arr => deinterleaved_sosi_2arr_n(I)
src_out_arr(1) => deinterleaved_sosi_arr(2*I+1)
); );
gen_flat : FOR J IN 0 TO g_n_deinterleave-1 GENERATE
deinterleaved_sosi_arr(g_n_deinterleave*I+J) <= deinterleaved_sosi_2arr_n(I)(J);
END GENERATE;
END GENERATE; END GENERATE;
p_cnt : PROCESS(rst, clk) p_cnt : PROCESS(rst, clk)
...@@ -96,8 +105,8 @@ BEGIN ...@@ -96,8 +105,8 @@ BEGIN
END IF; END IF;
END PROCESS; END PROCESS;
-- Select subband -- Select desired index.
subband_sosi_arr <= deinterleaved_sosi_arr WHEN cnt = g_selected_subband; selected_sosi_arr <= deinterleaved_sosi_arr WHEN cnt = g_selection;
--------------------------------------------------------------- ---------------------------------------------------------------
-- SIGNAL SCOPE -- SIGNAL SCOPE
...@@ -107,13 +116,13 @@ BEGIN ...@@ -107,13 +116,13 @@ BEGIN
g_sim => g_sim, g_sim => g_sim,
g_use_sclk => FALSE, g_use_sclk => FALSE,
g_complex => TRUE, g_complex => TRUE,
g_nof_streams => c_sdp_S_pn, g_nof_streams => g_nof_input*g_n_deinterleave,
g_wideband_factor => 1, g_wideband_factor => 1,
g_dat_w => c_sdp_W_subband g_dat_w => g_dat_w
) )
PORT MAP ( PORT MAP (
DCLK => clk, DCLK => clk,
sp_sosi_arr => subband_sosi_arr, sp_sosi_arr => selected_sosi_arr,
scope_sosi_arr => scope_sosi_arr scope_sosi_arr => scope_sosi_arr
); );
END GENERATE; END GENERATE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment