Skip to content
Snippets Groups Projects

Clarify g_nof_destinations_max design revision parameter and package constants...

Merged Eric Kooistra requested to merge L2SDP-964 into master
2 files
+ 170
169
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -22,15 +22,29 @@
-- Purpose:
-- Construct beamformer data output (BDO) payloads for multiple destinations.
-- Description:
-- * Get N_destinations from sdp_bdo_destinations_reg.
-- * 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]
-- * The nof_destinations_max determines how to MM control the beamlet packet
-- destination(s) MAC/IP/UDP port:
-- . nof_destinations_max = 1 then use sdp_bdo_one_destination.vhd and
-- MM program the one destination MAC/IP/UDP port from dp_offload_tx_v3.
-- . nof_destinations_max > 1 then use sdp_bdo_multiple_destinations.vhd and
-- MM program the one or more destination MAC/IP/UDP port via
-- sdp_bdo_destinations_reg.
-- * Get nof_destinations from sdp_bdo_destinations_reg. The nof_destinations
-- is MM programmable between 1 and nof_destinations_max.
-- * The nof_blocks_per_packet is not MM programmable, but based on
-- nof_destinations to ensure that the packet fits in a jumbo frame or
-- equal to c_sdp_bdo_reorder_nof_blocks_max to make maximum use of the
-- available reorder buffer size.
-- * Merge, reorder and unmerge beamlet data for nof_destinations > 1 from:
-- (int8) [t] [nof_blocks_per_packet][S_sub_bf / nof_destinations] [N_pol_bf][N_complex]
-- to:
-- (int8) [t] [S_sub_bf / N_destinations][N_blocks_per_packet] [N_pol_bf][N_complex]
-- (int8) [t] [S_sub_bf / nof_destinations][nof_blocks_per_packet] [N_pol_bf][N_complex]
--
-- . where (int8) [N_pol_bf][N_complex] = c_sdp_W_dual_pol_beamlet = 32b
-- dual polarization beamlet word
-- . where N_destinations packets together transport the S_sub_bf beamlets.
-- . where nof_destinations packets together transport the S_sub_bf beamlets.
-- * Only support transposed beamlet data output, because each destination
-- must receive all blocks (= time samples) per beamlet.
-- References:
-- [1] https://support.astron.nl/confluence/display/L2M/L4+SDPFW+Decision%3A+Multiple+beamlet+output+destinations
--
@@ -48,8 +62,8 @@ library IEEE, common_lib, dp_lib, reorder_lib;
entity sdp_bdo_multiple_destinations is
generic (
g_beamset_id : natural := 0;
g_use_transpose : boolean := false
g_nof_destinations_max : natural := 1;
g_beamset_id : natural := 0
);
port (
mm_clk : in std_logic;
@@ -71,25 +85,17 @@ end sdp_bdo_multiple_destinations;
architecture str of sdp_bdo_multiple_destinations is
constant c_beamlet_index : natural := g_beamset_id * c_sdp_S_sub_bf;
-- Reorder c_nof_ch = c_nof_ch_sel = c_nof_ch_in
constant c_reorder_nof_blocks_max : natural := c_sdp_bdo_reorder_nof_blocks_max; -- = 16
constant c_reorder_nof_blocks_w : natural := ceil_log2(c_reorder_nof_blocks_max + 1);
constant c_reorder_nof_ch_max : natural := c_reorder_nof_blocks_max *
c_sdp_nof_beamlets_per_block *
c_sdp_nof_words_per_beamlet; -- = 7808
-- Look up table constants as function of N_destinations
constant c_m : natural := c_sdp_bdo_nof_destinations_max; -- 16
constant c_nof_blocks_per_packet_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_nof_blocks_per_packet_look_up_table;
constant c_reorder_nof_blocks_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_reorder_nof_blocks_look_up_table;
constant c_reorder_nof_ch_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_reorder_nof_ch_look_up_table;
constant c_nof_beamlets_per_block_first_destination_arr : t_natural_arr(1 to c_m) := func_sdp_sdo_nof_beamlets_per_block_first_destination_look_up_table;
constant c_nof_beamlets_per_block_last_destination_arr : t_natural_arr(1 to c_m) := func_sdp_sdo_nof_beamlets_per_block_last_destination_look_up_table;
constant c_nof_ch_per_packet_first_destination_arr : t_natural_arr(1 to c_m) := func_sdp_sdo_nof_ch_per_packet_first_destination_look_up_table;
constant c_nof_ch_per_packet_last_destination_arr : t_natural_arr(1 to c_m) := func_sdp_sdo_nof_ch_per_packet_last_destination_look_up_table;
-- Look up table constants as function of nof_destinations in range(g_nof_destinations_max)
constant c_m : natural := g_nof_destinations_max;
constant c_reorder_nof_blocks_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_reorder_nof_blocks_look_up_table(g_nof_destinations_max);
constant c_reorder_nof_ch_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_reorder_nof_ch_look_up_table(g_nof_destinations_max);
constant c_nof_beamlets_per_block_first_destination_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_nof_beamlets_per_block_first_destination_look_up_table(g_nof_destinations_max);
constant c_nof_beamlets_per_block_last_destination_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_nof_beamlets_per_block_last_destination_look_up_table(g_nof_destinations_max);
constant c_nof_ch_per_packet_first_destination_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_nof_ch_per_packet_first_destination_look_up_table(g_nof_destinations_max);
constant c_nof_ch_per_packet_last_destination_arr : t_natural_arr(1 to c_m) := func_sdp_bdo_nof_ch_per_packet_last_destination_look_up_table(g_nof_destinations_max);
constant c_beamlet_index_per_destination_mat : t_natural_matrix(1 to c_m, 0 to c_m - 1) :=
func_sdp_sdo_beamlet_index_per_destination_look_up_matrix;
func_sdp_bdo_beamlet_index_per_destination_look_up_matrix(g_nof_destinations_max);
constant c_nof_ch_per_packet_max : natural := largest(c_nof_ch_per_packet_first_destination_arr);
constant c_nof_ch_per_packet_w : natural := ceil_log2(c_nof_ch_per_packet_max + 1);
@@ -97,10 +103,9 @@ architecture str of sdp_bdo_multiple_destinations is
signal i_destinations_info : t_sdp_bdo_destinations_info;
-- Dynamic merge, reorder, unmerge packet sizes
-- . default use values for N_destinations = 1
signal nof_blocks_per_packet : natural := c_nof_blocks_per_packet_arr(1);
-- . default use values for nof_destinations = 1
signal reorder_nof_blocks : natural := c_reorder_nof_blocks_arr(1);
signal reorder_nof_blocks_slv : std_logic_vector(c_reorder_nof_blocks_w - 1 downto 0);
signal reorder_nof_blocks_slv : std_logic_vector(c_sdp_bdo_reorder_nof_blocks_w - 1 downto 0);
signal reorder_nof_ch : natural := c_reorder_nof_ch_arr(1);
signal nof_beamlets_per_block_first_destination : natural := c_nof_beamlets_per_block_first_destination_arr(1);
signal nof_beamlets_per_block_last_destination : natural := c_nof_beamlets_per_block_last_destination_arr(1);
@@ -110,14 +115,12 @@ architecture str of sdp_bdo_multiple_destinations is
signal nof_ch_per_packet : natural;
signal nof_ch_per_packet_slv : std_logic_vector(c_nof_ch_per_packet_w - 1 downto 0);
-- . default use values for N_destinations = 1 and destination index = 0
-- . default use values for nof_destinations = 1 and destination index = 0
signal beamlet_index_per_destination_bset_0 : natural := c_beamlet_index_per_destination_mat(1, 0);
signal beamlet_index_per_destination : natural := c_beamlet_index + c_beamlet_index_per_destination_mat(1, 0);
signal select_copi : t_mem_copi := c_mem_copi_rst;
signal select_cipo : t_mem_cipo := c_mem_cipo_rst;
signal r_identity : t_reorder_identity;
signal d_identity : t_reorder_identity;
signal r_transpose : t_reorder_transpose;
signal d_transpose : t_reorder_transpose;
@@ -137,6 +140,9 @@ begin
-----------------------------------------------------------------------------
-- Use dynamic sizes for beamlet data output to multiple destination.
u_sdp_bdo_destinations_reg : entity work.sdp_bdo_destinations_reg
generic map (
g_nof_destinations_max => g_nof_destinations_max
)
port map (
-- Clocks and reset
mm_clk => mm_clk,
@@ -162,7 +168,6 @@ begin
begin
if rising_edge(dp_clk) then
v_DN := i_destinations_info.nof_destinations_act;
nof_blocks_per_packet <= i_destinations_info.nof_blocks_per_packet_act;
reorder_nof_blocks <= c_reorder_nof_blocks_arr(v_DN);
reorder_nof_ch <= c_reorder_nof_ch_arr(v_DN);
nof_beamlets_per_block_first_destination <= c_nof_beamlets_per_block_first_destination_arr(v_DN);
@@ -181,12 +186,12 @@ begin
-----------------------------------------------------------------------------
-- Use slv in port map to avoid vcom-1436: Actual expression (function call
-- "TO_UVEC") of formal "nof_pkt" is not globally static.
reorder_nof_blocks_slv <= to_uvec(reorder_nof_blocks, c_reorder_nof_blocks_w);
reorder_nof_blocks_slv <= to_uvec(reorder_nof_blocks, c_sdp_bdo_reorder_nof_blocks_w);
u_dp_packet_merge : entity dp_lib.dp_packet_merge
generic map(
g_use_ready => false, -- no flow control
g_nof_pkt => c_reorder_nof_blocks_max,
g_nof_pkt => c_sdp_bdo_reorder_nof_blocks_max,
g_bsn_increment => 1
)
port map(
@@ -206,13 +211,15 @@ begin
-----------------------------------------------------------------------------
-- reorder_col_select
-- . See tb_reorder_col_select_all.vhd for how to control col_select_copi /
-- cipo with p_reorder_identity or p_reorder_transpose.
-- cipo with p_reorder_transpose.
-- . Reorder nof_ch_sel = c_nof_ch_in = reorder_nof_ch, because the reorder
-- outputs all input.
-----------------------------------------------------------------------------
u_reorder_col_select : entity reorder_lib.reorder_col_select
generic map (
g_dsp_data_w => c_sdp_W_dual_pol_beamlet / c_nof_complex, -- = 32b / 2
g_nof_ch_in => c_reorder_nof_ch_max,
g_nof_ch_sel => c_reorder_nof_ch_max,
g_nof_ch_in => c_sdp_bdo_reorder_nof_ch_max,
g_nof_ch_sel => c_sdp_bdo_reorder_nof_ch_max,
g_use_complex => false
)
port map (
@@ -245,37 +252,19 @@ begin
p_dp_clk : process(dp_clk)
begin
if rising_edge(dp_clk) then
r_identity <= d_identity;
r_transpose <= d_transpose;
end if;
end process;
-- Pass on beamlet data in original order or in transposed order
select_copi <= r_transpose.select_copi when g_use_transpose else r_identity.select_copi;
p_reorder_identity : process(dp_rst, select_cipo, reorder_nof_ch, r_identity)
variable v : t_reorder_identity;
begin
if select_cipo.waitrequest = '0' then
-- Read from reorder_col_select page
v := func_reorder_identity(reorder_nof_ch, r_identity);
else
-- No read, new reorder_col_select page not available yet
v := c_reorder_identity_rst;
end if;
-- Synchronous reset
if dp_rst = '1' then
v := c_reorder_identity_rst;
end if;
d_identity <= v;
end process;
-- Pass on beamlet data in transposed order
select_copi <= r_transpose.select_copi;
p_reorder_transpose : process(dp_rst, select_cipo, nof_blocks_per_packet, nof_beamlets_per_block, r_transpose)
p_reorder_transpose : process(dp_rst, select_cipo, reorder_nof_blocks, nof_beamlets_per_block, r_transpose)
variable v : t_reorder_transpose;
begin
if select_cipo.waitrequest = '0' then
-- Read from reorder_col_select page
v := func_reorder_transpose(nof_blocks_per_packet, nof_beamlets_per_block, r_transpose);
v := func_reorder_transpose(reorder_nof_blocks, nof_beamlets_per_block, r_transpose);
else
-- No read, new reorder_col_select page not available yet
v := c_reorder_transpose_rst;
@@ -288,14 +277,14 @@ begin
end process;
-----------------------------------------------------------------------------
-- dp_packet_unmerge for N_destinations
-- dp_packet_unmerge for nof_destinations
-----------------------------------------------------------------------------
nof_ch_per_packet_slv <= to_uvec(nof_ch_per_packet, c_nof_ch_per_packet_w);
u_dp_packet_unmerge : entity dp_lib.dp_packet_unmerge
generic map (
g_use_ready => false, -- no flow control
g_nof_pkt => c_reorder_nof_blocks_max,
g_nof_pkt => g_nof_destinations_max,
g_pkt_len => c_nof_ch_per_packet_max,
g_bsn_increment => 1
)
Loading