From e0934f12833135c059c5612b57c5d7bfacda11e9 Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Thu, 28 Sep 2023 11:35:30 +0200 Subject: [PATCH] Use g_nof_destinations_max as design revison parameter. --- .../sdp/src/vhdl/sdp_beamformer_output.vhd | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_beamformer_output.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_beamformer_output.vhd index 984d6a34d0..b8106aecc7 100644 --- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_beamformer_output.vhd +++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_beamformer_output.vhd @@ -46,10 +46,10 @@ use work.sdp_bdo_pkg.all; entity sdp_beamformer_output is generic ( - g_beamset_id : natural := 0; - g_use_transpose : boolean := false; - g_use_multiple_destinations : boolean := false; - g_sim_force_bsn_error : boolean := true + g_beamset_id : natural := 0; + g_use_transpose : boolean := false; + g_nof_destinations_max : natural := 1; + g_sim_force_bsn_error : boolean := true ); port ( dp_clk : in std_logic; @@ -99,8 +99,8 @@ architecture str of sdp_beamformer_output is -- field_sel = '0' for DP (dynamic), '1' for MM (fixed or programmable via MM of dp_offload_tx_v3) constant c_cep_hdr_field_sel : std_logic_vector(c_sdp_cep_nof_hdr_fields - 1 downto 0) := - sel_a_b(g_use_multiple_destinations, func_sdp_cep_hdr_field_sel_dst('0'), - func_sdp_cep_hdr_field_sel_dst('1')); + sel_a_b(g_nof_destinations_max = 1, func_sdp_cep_hdr_field_sel_dst('1'), + func_sdp_cep_hdr_field_sel_dst('0')); -- BDO packet size control -- . One 32b word contains 1 dual pol beamlet of 4 octets (Xre, Xim, Yre, Yim). @@ -229,7 +229,7 @@ begin -- [0:3] = [Xre, Xim, Yre, Yim] dp_repack_beamlet_word <= unpack_data(dp_repack_beamlet_src_out.data(c_sdp_W_dual_pol_beamlet - 1 downto 0)); - gen_one_destination : if g_use_multiple_destinations = false generate + gen_one_destination : if g_nof_destinations_max = 1 generate ----------------------------------------------------------------------------- -- Merge and reorder beamlet data for one destination from: -- (int8) [t] [N_blocks_per_packet][S_sub_bf] [N_pol_bf][N_complex] @@ -252,7 +252,7 @@ begin ); end generate; - gen_multiple_destinations : if g_use_multiple_destinations = true generate + gen_multiple_destinations : if g_nof_destinations_max > 1 generate ----------------------------------------------------------------------------- -- Merge, reorder and unmerge beamlet data for N_destinations >= 1 from: -- (int8) [t] [N_blocks_per_packet][S_sub_bf / N_destinations] [N_pol_bf][N_complex] @@ -265,8 +265,8 @@ begin ----------------------------------------------------------------------------- u_sdp_bdo_multiple_destinations : entity work.sdp_bdo_multiple_destinations generic map ( - g_beamset_id => g_beamset_id, - g_use_transpose => g_use_transpose + g_nof_destinations_max => g_nof_destinations_max, + g_beamset_id => g_beamset_id ) port map ( mm_clk => mm_clk, @@ -433,13 +433,13 @@ begin p_assemble_offload_info : process(destinations_info) begin - if g_use_multiple_destinations = false then + if g_nof_destinations_max = 1 then -- Use constant defaults for beamlet data output to one destination. nof_blocks_per_packet <= c_sdp_cep_nof_blocks_per_packet; -- = 4; nof_beamlets_per_block <= c_sdp_S_sub_bf; -- = 488 dual pol beamlets; else -- Use dynamic sizes for beamlet data output to multiple destination. - nof_blocks_per_packet <= destinations_info.nof_blocks_per_packet_act; + nof_blocks_per_packet <= destinations_info.nof_blocks_per_packet; nof_beamlets_per_block <= c_sdp_S_sub_bf; -- = 488 dual pol beamlets; -- TODO check channel field to set destination addresses in dp_offload_tx_hdr_fields -- GitLab