Skip to content
Snippets Groups Projects
Commit e489663d authored by Jonathan Hargreaves's avatar Jonathan Hargreaves
Browse files

Started adding IQUV and IAB components to arts sc4 design. TODO: synth and sim

parent 1e3c2fe4
No related branches found
No related tags found
No related merge requests found
...@@ -253,8 +253,10 @@ BEGIN ...@@ -253,8 +253,10 @@ BEGIN
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
u_arts_unb1_sc4_processing: ENTITY work.arts_unb1_sc4_processing u_arts_unb1_sc4_processing: ENTITY work.arts_unb1_sc4_processing
GENERIC MAP ( GENERIC MAP (
g_nof_telescopes => 12, g_sim => g_sim,
g_nof_tabs => 1 g_technology => c_tech_select_default,
g_nof_telescopes => c_nof_telescopes,
g_nof_tabs => c_nof_tabs
) )
PORT MAP ( PORT MAP (
dp_clk => dp_clk, dp_clk => dp_clk,
...@@ -268,10 +270,14 @@ BEGIN ...@@ -268,10 +270,14 @@ BEGIN
src_out_arr => arts_unb1_sc4_processing_src_out_arr src_out_arr => arts_unb1_sc4_processing_src_out_arr
); );
arts_unb1_sc4_processing_snk_in_arr <= arts_unb1_sc4_input_src_out_arr;
arts_unb1_sc4_output_snk_in_arr <= arts_unb1_sc4_processing_src_out_arr;
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Output reordering & packetizing stage -- Output reordering & packetizing stage
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
u_arts_unb1_sc4_output: ENTITY arts_unb1_sc4_bg_lib.arts_unb1_sc4_output u_arts_unb1_sc4_output: ENTITY arts_unb1_sc4_lib.arts_unb1_sc4_output
GENERIC MAP ( GENERIC MAP (
g_sim => g_sim, g_sim => g_sim,
g_override_payload_data => FALSE, g_override_payload_data => FALSE,
......
...@@ -41,6 +41,8 @@ LIBRARY bf_lib; ...@@ -41,6 +41,8 @@ LIBRARY bf_lib;
ENTITY arts_unb1_sc4_processing IS --FIXME Given the generics, this could be used for SC3 as well (8 dishes, less TABs). Rename/move required? ENTITY arts_unb1_sc4_processing IS --FIXME Given the generics, this could be used for SC3 as well (8 dishes, less TABs). Rename/move required?
GENERIC ( GENERIC (
g_sim : BOOLEAN := FALSE;
g_technology : NATURAL := c_tech_select_default;
g_nof_telescopes : NATURAL := 12; g_nof_telescopes : NATURAL := 12;
g_nof_polarizations : NATURAL := 2; g_nof_polarizations : NATURAL := 2;
g_nof_tabs : NATURAL := 1;--FIXME 1 TAB = 1 bf_unit first. 12 later. g_nof_tabs : NATURAL := 1;--FIXME 1 TAB = 1 bf_unit first. 12 later.
...@@ -125,6 +127,7 @@ ARCHITECTURE str OF arts_unb1_sc4_processing IS ...@@ -125,6 +127,7 @@ ARCHITECTURE str OF arts_unb1_sc4_processing IS
CONSTANT c_bf_bf_weights_file_name : STRING := "hex/bf_weights"; CONSTANT c_bf_bf_weights_file_name : STRING := "hex/bf_weights";
CONSTANT c_bf_ss_wide_file_prefix : STRING := "hex/bf_ss_wide"; CONSTANT c_bf_ss_wide_file_prefix : STRING := "hex/bf_ss_wide";
SIGNAL ram_bf_ss_ss_wide_mosi : t_mem_mosi; --FIXME Move to entity I/O later. SIGNAL ram_bf_ss_ss_wide_mosi : t_mem_mosi; --FIXME Move to entity I/O later.
SIGNAL ram_bf_ss_ss_wide_miso : t_mem_miso; SIGNAL ram_bf_ss_ss_wide_miso : t_mem_miso;
SIGNAL ram_bf_weights_mosi : t_mem_mosi; SIGNAL ram_bf_weights_mosi : t_mem_mosi;
...@@ -141,6 +144,40 @@ ARCHITECTURE str OF arts_unb1_sc4_processing IS ...@@ -141,6 +144,40 @@ ARCHITECTURE str OF arts_unb1_sc4_processing IS
SIGNAL bf_bst_src_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0); SIGNAL bf_bst_src_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0);
SIGNAL bf_qua_src_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0); SIGNAL bf_qua_src_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0);
-- Signals and Constants for the IQUV after the TABs
CONSTANT c_nof_int_iquv : NATURAL := g_nof_fft_bins/4;
CONSTANT c_in_data_w_iquv : NATURAL := 12;
CONSTANT c_out_data_w_iquv : NATURAL := 8;
CONSTANT c_use_accum_iquv : BOOLEAN := TRUE; -- do the accumulation in the IQUV module
SIGNAL iquv_i_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0);
SIGNAL iquv_q_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0);
SIGNAL iquv_u_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0);
SIGNAL iquv_v_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0);
SIGNAL iquv_src_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0);
-- Signals and Constants for the IQUV IAB
CONSTANT c_nof_int_iquv_iab : NATURAL := g_nof_fft_bins/4;
CONSTANT c_in_data_w_iquv_iab : NATURAL := 12;
CONSTANT c_out_data_w_iquv_iab: NATURAL := 8;
CONSTANT c_use_accum_iquv_iab : BOOLEAN := TRUE; -- do the accumulation after adding the 12 telescope streams
SIGNAL iquv_iab_i_out : t_dp_sosi;
SIGNAL iquv_iab_q_out : t_dp_sosi;
SIGNAL iquv_iab_u_out : t_dp_sosi;
SIGNAL iquv_iab_v_out : t_dp_sosi;
SIGNAL iquv_iab_src_out_arr : t_dp_sosi_arr(g_nof_tabs-1 DOWNTO 0)
-- constants used to connect different output configurations
CONSTANT c_output_tab_only : NATURAL := 0;
CONSTANT c_output_tab_iquv : NATURAL := 1;
CONSTANT c_output_iquv_iab_all: NATURAL := 2;
CONSTANT c_output_select : NATURAL := c_output_iquv_iab_to_all; -- Make your choice here
BEGIN BEGIN
...@@ -285,18 +322,89 @@ BEGIN ...@@ -285,18 +322,89 @@ BEGIN
out_qua_sosi_arr => bf_qua_src_out_arr out_qua_sosi_arr => bf_qua_src_out_arr
); );
src_out_arr <= bf_raw_src_out_arr; --FIXME add IAB as MS stream later.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- IQUV calculation of TABs -- IQUV calculation of TABs
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
--FIXME
gen_iquv : FOR i IN 0 TO g_nof_tabs-1 GENERATE
u_iquv : ENTITY work.iquv
GENERIC MAP (
g_sim => g_sim,
g_technology => g_technology,
g_use_accum => c_use_accum_iquv,
g_nof_int => g_nof_int_iquv,
g_in_data_w => g_in_data_w_iquv,
g_out_data_w => g_out_data_w_iquv
)
PORT MAP (
dp_rst => dp_rst,
dp_clk => dp_clk,
in_complex => bf_raw_src_out_arr(i),
i_out => iquv_i_out_arr(i),
q_out => iquv_q_out_arr(i),
u_out => iquv_u_out_arr(i),
v_out => iquv_v_out_arr(i)
);
iquv_src_out_arr(i).valid <= iquv_iab_i_out.valid;
iquv_src_out_arr(i).data(4*c_out_data_w_iquv-1 downto 0) <= iquv_v_out.data(c_out_data_w_iquv-1 downto 0)
& iquv_u_out.data(c_out_data_w_iquv-1 downto 0)
& iquv_q_out.data(c_out_data_w_iquv-1 downto 0)
& iquv_i_out.data(c_out_data_w_iquv-1 downto 0);
END GENERATE;
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- IAB Beam Former + IAB IQUV calculation -- IAB Beam Former + IAB IQUV calculation
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
--FIXME --FIXME
u_iquv_iab : ENTITY work.iquv_iab
GENERIC MAP (
g_sim => g_sim,
g_technology => g_technology,
g_use_accum => c_use_accum_iquv_iab,
g_nof_streams => c_nof_telescopes,
g_nof_int => c_nof_int_iquv_iab,
g_in_data_w => c_in_data_w_iquv_iab,
g_out_data_w => c_out_data_w_iquv_iab
)
PORT MAP (
dp_rst => dp_rst,
dp_clk => dp_clk,
in_complex_arr => in_complex_arr,
i_out => iquv_iab_i_out,
q_out => iquv_iab_q_out,
u_out => iquv_iab_u_out,
v_out => iquv_iab_v_out
);
gen_iquv_iab_outputs : FOR i IN 0 TO g_nof_tabs-1 GENERATE
iquv_iab_src_out_arr(i).valid <= iquv_iab_i_out.valid;
iquv_iab_src_out_arr(i).data(4*c_out_data_w_iquv_iab-1 downto 0) <= iquv_iab_v_out.data(c_out_data_w_iquv_iab-1 downto 0)
& iquv_iab_u_out.data(c_out_data_w_iquv_iab-1 downto 0)
& iquv_iab_q_out.data(c_out_data_w_iquv_iab-1 downto 0)
& iquv_iab_i_out.data(c_out_data_w_iquv_iab-1 downto 0);
END GENERATE;
-------------------------------------------------------------------------------
-- Connect the outputs according to the selected configuration
-------------------------------------------------------------------------------
gen_output_tab_only : IF c_output_select = c_output_tab_only GENERATE
src_out_arr <= bf_raw_src_out_arr;
END GENERATE;
gen_output_tab_iquv : IF c_output_select = c_output_tab_iquv GENERATE
src_out_arr <= iquv_src_out_arr;
END GENERATE;
gen_output_iquv_iab_all : IF c_output_select = c_output_iquv_iab_all GENERATE
src_out_arr <= iquv_iab_src_out_arr;
END GENERATE;
END str; END str;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment