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
1 file
+ 10
10
Compare changes
  • Side-by-side
  • Inline
@@ -34,121 +34,145 @@ use work.sdp_pkg.all;
package sdp_bdo_pkg is
-- Beamlet data output (BDO) for multiple destinations
constant c_sdp_bdo_nof_destinations_max : natural := 16;
constant c_sdp_bdo_reorder_nof_blocks_max : natural := largest(16, c_sdp_cep_nof_blocks_per_packet);
constant c_sdp_bdo_destinations_info_nof_hdr_fields : natural := c_sdp_bdo_nof_destinations_max * 3 + 4; -- = 52 fields
-- Define the maximum number of destination to size the address span of the
-- MM register in sdp_bdo_destinations_reg. The actual nof_destinations_max
-- <= c_sdp_bdo_mm_nof_destinations_max is defined as revision constant, so
-- that it can differ per design revision.
constant c_sdp_bdo_mm_nof_destinations_max : natural := 32;
-- Define the maximum number of blocks (= time samples per beamlet) here as
-- a package constant, because it can be the same for all design revisions.
-- The actual reorder_nof_blocks_max depends slightly on
-- nof_destinations_max, because the number of blocks has to fit in a jumbo
-- frame. Therefore func_sdp_bdo_reorder_nof_blocks_look_up_table()
-- determines the actual reorder_nof_blocks.
-- The nof_blocks_per_packet = reorder_nof_blocks. The beamlet packets will
-- have the same nof_blocks_per_packet for each destination, because the
-- blocks represent beamlet time samples that have to be kept together per
-- destination. The beamlets are distributed to the different destinations
-- based on their beamlet index as defined by
-- func_sdp_bdo_nof_beamlets_per_block_first_destinations_look_up_table().
-- The minimum value is c_sdp_cep_nof_blocks_per_packet = 4 to fill a jumbo
-- frame when nof_destinations = 1.
-- The maximum value is a balance between having sufficiently large packets
-- nof_destinations > 1 and how many block RAM resources are available for
-- the reordering. Therefore c_sdp_bdo_reorder_nof_blocks_max = 16 is a
-- suitable compromise value.
constant c_sdp_bdo_reorder_nof_blocks_max : natural := 16;
constant c_sdp_bdo_reorder_nof_blocks_w : natural := ceil_log2(c_sdp_bdo_reorder_nof_blocks_max + 1);
constant c_sdp_bdo_reorder_nof_ch_max : natural := c_sdp_bdo_reorder_nof_blocks_max *
c_sdp_nof_beamlets_per_block *
c_sdp_nof_words_per_beamlet; -- = 7808
-- 32 * 3 + 4 = 100 fields
constant c_sdp_bdo_destinations_info_nof_hdr_fields : natural := c_sdp_bdo_mm_nof_destinations_max * 3 + 4;
type t_sdp_bdo_destinations_info is record
eth_destination_mac_arr : t_slv_48_arr(c_sdp_bdo_nof_destinations_max - 1 downto 0);
ip_destination_address_arr : t_slv_32_arr(c_sdp_bdo_nof_destinations_max - 1 downto 0);
udp_destination_port_arr : t_slv_16_arr(c_sdp_bdo_nof_destinations_max - 1 downto 0);
eth_destination_mac_arr : t_slv_48_arr(c_sdp_bdo_mm_nof_destinations_max - 1 downto 0);
ip_destination_address_arr : t_slv_32_arr(c_sdp_bdo_mm_nof_destinations_max - 1 downto 0);
udp_destination_port_arr : t_slv_16_arr(c_sdp_bdo_mm_nof_destinations_max - 1 downto 0);
nof_destinations : natural;
nof_destinations_act : natural;
nof_destinations_max : natural;
nof_blocks_per_packet_act : natural;
nof_blocks_per_packet : natural;
end record;
constant t_sdp_bdo_destinations_info_rst : t_sdp_bdo_destinations_info :=
constant c_sdp_bdo_destinations_info_rst : t_sdp_bdo_destinations_info :=
( (others => (others => '0')),
(others => (others => '0')),
(others => (others => '0')),
1,
1,
c_sdp_bdo_nof_destinations_max,
1,
c_sdp_cep_nof_blocks_per_packet);
-- Parse user input to determine actual nof_destinations
function func_sdp_bdo_parse_nof_destinations(nof_destinations : natural) return natural;
function func_sdp_bdo_parse_nof_destinations(nof_destinations, c_nof_destinations_max : natural) return natural;
-- Use functions that return look up tables to precalculate the values as
-- constant arrays
-- . One ch (channel) = one 32b word = one dual polarization beamlet (Xre, Xim, Yre, Yim)
-- . Look up table arrays for: t_natural_arr(1 to c_sdp_bdo_nof_destinations_max)
function func_sdp_bdo_nof_blocks_per_packet_look_up_table return t_natural_arr;
function func_sdp_bdo_reorder_nof_blocks_look_up_table return t_natural_arr;
function func_sdp_bdo_reorder_nof_ch_look_up_table return t_natural_arr;
function func_sdp_sdo_nof_beamlets_per_block_first_destination_look_up_table return t_natural_arr;
function func_sdp_sdo_nof_beamlets_per_block_last_destination_look_up_table return t_natural_arr;
function func_sdp_sdo_nof_ch_per_packet_first_destination_look_up_table return t_natural_arr;
function func_sdp_sdo_nof_ch_per_packet_last_destination_look_up_table return t_natural_arr;
-- . Look up table arrays for: t_natural_arr(1 to c_nof_destinations_max)
function func_sdp_bdo_reorder_nof_blocks_look_up_table(c_nof_destinations_max : natural) return t_natural_arr;
function func_sdp_bdo_reorder_nof_ch_look_up_table(c_nof_destinations_max : natural) return t_natural_arr;
function func_sdp_bdo_nof_beamlets_per_block_first_destinations_look_up_table(c_nof_destinations_max : natural) return t_natural_arr;
function func_sdp_bdo_nof_beamlets_per_block_last_destination_look_up_table(c_nof_destinations_max : natural) return t_natural_arr;
function func_sdp_bdo_nof_ch_per_packet_first_destinations_look_up_table(c_nof_destinations_max : natural) return t_natural_arr;
function func_sdp_bdo_nof_ch_per_packet_last_destination_look_up_table(c_nof_destinations_max : natural) return t_natural_arr;
-- Look up table matrix for:
-- t_natural_matrix(1 to c_sdp_bdo_nof_destinations_max, -- N_destinations
-- 0 to c_sdp_bdo_nof_destinations_max - 1) -- destination index
function func_sdp_sdo_beamlet_index_per_destination_look_up_matrix return t_natural_matrix;
-- t_natural_matrix(1 to c_nof_destinations_max, -- N_destinations
-- 0 to c_nof_destinations_max - 1) -- destination index
function func_sdp_bdo_beamlet_index_per_destination_look_up_matrix(c_nof_destinations_max : natural) return t_natural_matrix;
end package sdp_bdo_pkg;
package body sdp_bdo_pkg is
function func_sdp_bdo_parse_nof_destinations(nof_destinations : natural) return natural is
function func_sdp_bdo_parse_nof_destinations(nof_destinations, c_nof_destinations_max : natural) return natural is
constant c_last_arr : t_natural_arr(1 to c_nof_destinations_max) :=
func_sdp_bdo_nof_beamlets_per_block_last_destination_look_up_table(c_nof_destinations_max);
variable v_DN : natural := 1;
begin
-- Parse input nof_destinations value
if nof_destinations = 0 then
return 1;
elsif nof_destinations > c_sdp_bdo_nof_destinations_max then
return c_sdp_bdo_nof_destinations_max;
v_DN := 1; -- force to at least 1 destination
elsif nof_destinations > c_nof_destinations_max then
v_DN := c_nof_destinations_max;
else
return nof_destinations;
v_DN := nof_destinations;
end if;
-- Check whether nof beamlet indices can be distributed over v_DN
-- destinations, else force to use one less destination, see
-- func_sdp_bdo_nof_beamlets_per_block_last_destination_look_up_table()
-- description for further explanation.
if c_last_arr(v_DN) = 0 then
v_DN := v_DN - 1;
end if;
return v_DN;
end func_sdp_bdo_parse_nof_destinations;
function func_sdp_bdo_nof_blocks_per_packet_look_up_table return t_natural_arr is
variable v_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max);
function func_sdp_bdo_reorder_nof_blocks_look_up_table(c_nof_destinations_max : natural) return t_natural_arr is
variable v_arr : t_natural_arr(1 to c_nof_destinations_max);
begin
-- Determine nof_blocks_per_packet as function of number of destinations
-- DN.
-- . With 1 destination c_sdp_cep_nof_blocks_per_packet = 4 can fit in a
-- jumbo frame.
-- Determine reorder_nof_blocks = nof_blocks_per_packet as function of
-- c_sdp_bdo_reorder_nof_blocks_max and the number of destinations DN.
-- . With DN = 1 destination c_sdp_cep_nof_blocks_per_packet = 4 can fit
-- in a jumbo frame.
-- . With DN destinations DN * c_sdp_cep_nof_blocks_per_packet can fit in
-- a jumbo frame, because the number of beamlets per destination reduces
-- by DN.
-- a jumbo frame, because the number of beamlet indices per destination
-- reduces by DN.
-- DN = 1:16 --> 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64
-- . In total there are maximum c_sdp_bdo_reorder_nof_blocks_max = 16
-- blocks to distribute over DN destinations.
-- . Taking smallest yields the actual maximum number of blocks per packet
-- per destination, as function of number of destinations DN:
-- . In total there can be maximum c_sdp_bdo_reorder_nof_blocks_max = 16
-- blocks per packet, due to the size of the reorder buffer. Taking
-- smallest yields the actual number of blocks per packet, as function
-- of number of destinations DN:
-- DN = 1:16 --> 4, 8, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
for DN in 1 to c_sdp_bdo_nof_destinations_max loop
v_arr(DN) := smallest(c_sdp_bdo_reorder_nof_blocks_max, DN * c_sdp_cep_nof_blocks_per_packet);
end loop;
return v_arr;
end func_sdp_bdo_nof_blocks_per_packet_look_up_table;
function func_sdp_bdo_reorder_nof_blocks_look_up_table return t_natural_arr is
constant c_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max) :=
func_sdp_bdo_nof_blocks_per_packet_look_up_table;
variable v_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max);
begin
-- Determine reorder_nof_blocks as function of number of destinations DN.
-- . The number of blocks per destination is given by c_arr, so the number
-- of blocks that need to be merged for the reorder is DN * c_arr(DN):
-- DN = 1:16 --> 4, 16, 15, 16, 15, 12, 14, 16, 9, 10, 11, 12, 13, 14, 15, 16
for DN in 1 to c_sdp_bdo_nof_destinations_max loop
v_arr(DN) := DN * c_arr(DN);
for DN in 1 to c_nof_destinations_max loop
v_arr(DN) := smallest(DN * c_sdp_cep_nof_blocks_per_packet, c_sdp_bdo_reorder_nof_blocks_max);
end loop;
return v_arr;
end func_sdp_bdo_reorder_nof_blocks_look_up_table;
function func_sdp_bdo_reorder_nof_ch_look_up_table return t_natural_arr is
constant c_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max) :=
func_sdp_bdo_reorder_nof_blocks_look_up_table;
variable v_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max);
function func_sdp_bdo_reorder_nof_ch_look_up_table(c_nof_destinations_max : natural) return t_natural_arr is
constant c_arr : t_natural_arr(1 to c_nof_destinations_max) :=
func_sdp_bdo_reorder_nof_blocks_look_up_table(c_nof_destinations_max);
variable v_arr : t_natural_arr(1 to c_nof_destinations_max);
begin
-- Determine reorder nof_ch as function of number of destinations DN.
-- . The number of blocks to reorder is given by c_arr, so the number
-- of ch (channels = words) that need to be reordered is c_sdp_S_sub_bf
-- * c_arr(DN):
-- DN = 1:16 --> 1952, 7808, 7320, 7808, 7320, 5856, 6832, 7808
-- 4392, 4880, 5368, 5856, 6344, 6832, 7320, 7808
for DN in 1 to c_sdp_bdo_nof_destinations_max loop
-- . The number of blocks to reorder is given by c_arr, so the number of
-- ch (channels = words = dual pol, complex beamlets) that need to be
-- reordered is c_sdp_S_sub_bf * c_arr(DN):
-- DN = 1:16 --> 1952, 3904, 5856, 7808, 7808, 7808, 7808, 7808
-- 7808, 7808, 7808, 7808, 7808, 7808, 7808, 7808
for DN in 1 to c_nof_destinations_max loop
v_arr(DN) := c_sdp_S_sub_bf * c_arr(DN);
end loop;
return v_arr;
end func_sdp_bdo_reorder_nof_ch_look_up_table;
function func_sdp_sdo_nof_beamlets_per_block_first_destination_look_up_table return t_natural_arr is
variable v_first_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max);
function func_sdp_bdo_nof_beamlets_per_block_first_destinations_look_up_table(c_nof_destinations_max : natural) return t_natural_arr is
variable v_first_arr : t_natural_arr(1 to c_nof_destinations_max);
begin
-- Determine nof_beamlets_per_block for the first 1:DN-1 destinations, as
-- function of number of destinations DN.
@@ -156,67 +180,87 @@ package body sdp_bdo_pkg is
-- distribute over DN destinations, so ceil(488 / DN) yields the number of
-- blocks for the first 1:DN-1 destinations:
-- DN = 1:16 --> v_first_arr = 488, 244, 163, 122, 98, 82, 70, 61, 55, 49, 45, 41, 38, 35, 33, 31
for DN in 1 to c_sdp_bdo_nof_destinations_max loop
for DN in 1 to c_nof_destinations_max loop
v_first_arr(DN) := ceil_div(c_sdp_S_sub_bf, DN);
end loop;
return v_first_arr;
end func_sdp_sdo_nof_beamlets_per_block_first_destination_look_up_table;
end func_sdp_bdo_nof_beamlets_per_block_first_destinations_look_up_table;
function func_sdp_sdo_nof_beamlets_per_block_last_destination_look_up_table return t_natural_arr is
variable v_first_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max) :=
func_sdp_sdo_nof_beamlets_per_block_first_destination_look_up_table;
variable v_last_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max);
function func_sdp_bdo_nof_beamlets_per_block_last_destination_look_up_table(c_nof_destinations_max : natural) return t_natural_arr is
variable v_first_arr : t_natural_arr(1 to c_nof_destinations_max) :=
func_sdp_bdo_nof_beamlets_per_block_first_destinations_look_up_table(c_nof_destinations_max);
variable v_last_arr : t_natural_arr(1 to c_nof_destinations_max);
variable v_last : integer;
begin
-- Determine nof_beamlets_per_block for the last destination with index DN,
-- as function of number of destinations DN.
-- Determine remaining nof_beamlets_per_block for the last destination
-- with index DN, as function of number of destinations DN.
-- . In total there are c_sdp_S_sub_bf = 488 dual polarization beamlets to
-- distribute over DN destinations, so 488 - (DN-1) * ceil(488 / DN)
-- beamlets remain for the last destination:
-- DN = 1:16 --> v_first_arr = 488, 244, 163, 122, 98, 82, 70, 61, 55, 49, 45, 41, 38, 35, 33, 31
-- DN = 1:16 --> v_last_arr = 488, 244, 162, 122, 96, 78, 68, 61, 48, 47, 38, 37, 32, 33, 26, 23
--
-- DN = 17:32 --> v_first_arr = 29, 28, 26, 25, 24, 23, 22, 21, 20, 19, 19, 18, 17, 17, 16, 16
-- DN = 17:32 --> v_last_arr = 24, 12, 20, 13, 8, 5, 4, 5, 8, 13, -6, 2, 12, -5, 8, -8
-- 27, 30, 32
-- Remark:
-- . The v_last_arr may be < v_first_arr - 1, so the last destination may
-- contain much less beamlets than the others. In combination with
-- dp_packet_unmerge it is not feasible to distribute the beamlets evenly
-- over all destinations, using v_hi beamlets for some first destinations
-- and v_lo = v_hi - 1 for the remaining destinations. This is because
-- dp_packet_unmerge can only unmerge the same packet length for N - 1
-- blocks and then unmerge the remaining data in the last block until the
-- eop.
--
for DN in 1 to c_sdp_bdo_nof_destinations_max loop
v_last_arr(DN) := c_sdp_S_sub_bf - (DN - 1) * v_first_arr(DN);
-- . The v_last_arr(DN) <= v_first_arr(DN), because dp_packet_unmerge
-- can only unmerge the same packet length for N - 1 blocks and then
-- unmerge the remaining data in the last block until the input eop.
-- . The v_last_arr(DN) can be < v_first_arr(DN) - 1, so the last
-- destination then contains much less beamlets than the others.
-- . In combination with dp_packet_unmerge it is not feasible to
-- distribute the beamlets evenly over all destinations, using v_first
-- beamlets for some first destinations and v_first - 1 beamlets for
-- the remaining destinations.
-- . The v_last must be > 0. Therefor some number of destinations are
-- not possible in combination with c_sdp_S_sub_bf = 488. From the
-- v_last_arr it follows that DN = 27, 30 and 32 are not possible for
-- multiple destination BDO.
for DN in 1 to c_nof_destinations_max loop
v_last := c_sdp_S_sub_bf - (DN - 1) * v_first_arr(DN);
if v_last > 0 then
v_last_arr(DN) := v_last;
else
v_last_arr(DN) := 0; -- force 0 to fit in natural
end if;
end loop;
return v_last_arr;
end func_sdp_sdo_nof_beamlets_per_block_last_destination_look_up_table;
end func_sdp_bdo_nof_beamlets_per_block_last_destination_look_up_table;
function func_sdp_sdo_nof_ch_per_packet_first_destination_look_up_table return t_natural_arr is
constant c_nof_blocks_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max) :=
func_sdp_bdo_nof_blocks_per_packet_look_up_table;
constant c_nof_beamlets_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max) :=
func_sdp_sdo_nof_beamlets_per_block_first_destination_look_up_table;
variable v_len_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max);
function func_sdp_bdo_nof_ch_per_packet_first_destinations_look_up_table(c_nof_destinations_max : natural) return t_natural_arr is
constant c_nof_blocks_arr : t_natural_arr(1 to c_nof_destinations_max) :=
func_sdp_bdo_reorder_nof_blocks_look_up_table(c_nof_destinations_max);
constant c_nof_beamlets_arr : t_natural_arr(1 to c_nof_destinations_max) :=
func_sdp_bdo_nof_beamlets_per_block_first_destinations_look_up_table(c_nof_destinations_max);
variable v_len_arr : t_natural_arr(1 to c_nof_destinations_max);
begin
-- Determine nof_ch per packet for the first 1:DN-1 destinations, as
-- function of number of destinations DN.
-- The packet lengths follow from c_nof_blocks_arr * c_nof_beamlets_arr:
-- DN = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
-- . c_nof_blocks_arr = 4, 8, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
-- . c_nof_beamlets_arr = 488, 244, 163, 122, 98, 82, 70, 61, 55, 49, 45, 41, 38, 35, 33, 31
-- . v_len_arr = 1952,1952,1956,1952,1568,1312,1120, 976, 880, 784, 720, 656, 608, 560, 528, 496
-- . nof octets = 7808,7808,7824,7808,6272,5248,4480,3904,3520,3136,2880,2624,2432,2240,2112,1984
for DN in 1 to c_sdp_bdo_nof_destinations_max loop
--
-- DN = 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
-- . c_nof_blocks_arr = 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
-- . c_nof_beamlets_arr = 29, 28, 26, 25, 24, 23, 22, 21, 20, 19, 19, 18, 17, 17, 16, 16
-- . v_len_arr = 464, 448, 416, 400, 384, 368, 352, 336, 320, 304, 304, 288, 272, 272, 256, 256
-- . nof octets = 1856,1792,1664,1600,1536,1472,1408,1344,1280,1216,1216,1152,1088,1088,1024,1024
for DN in 1 to c_nof_destinations_max loop
v_len_arr(DN) := c_nof_blocks_arr(DN) * c_nof_beamlets_arr(DN);
end loop;
return v_len_arr;
end func_sdp_sdo_nof_ch_per_packet_first_destination_look_up_table;
end func_sdp_bdo_nof_ch_per_packet_first_destinations_look_up_table;
function func_sdp_sdo_nof_ch_per_packet_last_destination_look_up_table return t_natural_arr is
constant c_nof_blocks_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max) :=
func_sdp_bdo_nof_blocks_per_packet_look_up_table;
constant c_nof_beamlets_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max) :=
func_sdp_sdo_nof_beamlets_per_block_last_destination_look_up_table;
variable v_len_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max);
function func_sdp_bdo_nof_ch_per_packet_last_destination_look_up_table(c_nof_destinations_max : natural) return t_natural_arr is
constant c_nof_blocks_arr : t_natural_arr(1 to c_nof_destinations_max) :=
func_sdp_bdo_reorder_nof_blocks_look_up_table(c_nof_destinations_max);
constant c_nof_beamlets_arr : t_natural_arr(1 to c_nof_destinations_max) :=
func_sdp_bdo_nof_beamlets_per_block_last_destination_look_up_table(c_nof_destinations_max);
variable v_len_arr : t_natural_arr(1 to c_nof_destinations_max);
begin
-- Determine nof_ch per packet for the first 1:DN-1 destinations, as
-- function of number of destinations DN.
@@ -225,22 +269,22 @@ package body sdp_bdo_pkg is
-- . c_nof_beamlets_arr = 488, 244, 162, 122, 96, 78, 68, 61, 48, 47, 38, 37, 32, 33, 26, 23
-- . v_len_arr = 1952,1952,1944,1952,1536,1248,1088, 976, 768, 752, 608, 592, 512, 528, 416, 368
-- . nof octets = 7808,7808,7776,7808,6144,4992,4352,3904,3072,3008,2432,2368,2048,2112,1664,1472
for DN in 1 to c_sdp_bdo_nof_destinations_max loop
for DN in 1 to c_nof_destinations_max loop
v_len_arr(DN) := c_nof_blocks_arr(DN) * c_nof_beamlets_arr(DN);
end loop;
return v_len_arr;
end func_sdp_sdo_nof_ch_per_packet_last_destination_look_up_table;
end func_sdp_bdo_nof_ch_per_packet_last_destination_look_up_table;
function func_sdp_sdo_beamlet_index_per_destination_look_up_matrix return t_natural_matrix is
constant c_len_arr : t_natural_arr(1 to c_sdp_bdo_nof_destinations_max) :=
func_sdp_sdo_nof_beamlets_per_block_first_destination_look_up_table;
variable v_index_mat : t_natural_matrix(1 to c_sdp_bdo_nof_destinations_max,
0 to c_sdp_bdo_nof_destinations_max - 1);
function func_sdp_bdo_beamlet_index_per_destination_look_up_matrix(c_nof_destinations_max : natural) return t_natural_matrix is
constant c_len_arr : t_natural_arr(1 to c_nof_destinations_max) :=
func_sdp_bdo_nof_beamlets_per_block_first_destinations_look_up_table(c_nof_destinations_max);
variable v_index_mat : t_natural_matrix(1 to c_nof_destinations_max,
0 to c_nof_destinations_max - 1);
variable v_beamlet_index : natural;
variable v_step : natural;
begin
-- Determine beamlet index of first beamlet in packet per destination with
-- index DN, as function of number of destinations DN.
-- index DI, as function of number of destinations DN.
-- . Beamlet index for first destination starts at 0
-- . Beamlet index for the other destinations increments with number of
-- beamlets per previous destination given by c_len_arr.
@@ -280,10 +324,10 @@ package body sdp_bdo_pkg is
-- v_beamlet_index += v_step
-- print(lineStr)
--
for DN in 1 to c_sdp_bdo_nof_destinations_max loop
for DN in 1 to c_nof_destinations_max loop
v_beamlet_index := 0;
v_step := c_len_arr(DN);
for DI in 0 to c_sdp_bdo_nof_destinations_max - 1 loop
for DI in 0 to c_nof_destinations_max - 1 loop
if v_beamlet_index < c_sdp_S_sub_bf then
v_index_mat(DN, DI) := v_beamlet_index;
end if;
@@ -291,5 +335,5 @@ package body sdp_bdo_pkg is
end loop;
end loop;
return v_index_mat;
end func_sdp_sdo_beamlet_index_per_destination_look_up_matrix;
end func_sdp_bdo_beamlet_index_per_destination_look_up_matrix;
end sdp_bdo_pkg;
Loading