Skip to content
Snippets Groups Projects
Commit c49d50a8 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Corrected func_sdp_gn_index_to_pn_index to use v_index as variable, because...

Corrected func_sdp_gn_index_to_pn_index to use v_index as variable, because g_index can be a signal.
parent eac93a96
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,7 @@ PACKAGE sdp_pkg is ...@@ -73,7 +73,7 @@ PACKAGE sdp_pkg is
CONSTANT c_sdp_N_crosslets_max : NATURAL := 7; CONSTANT c_sdp_N_crosslets_max : NATURAL := 7;
CONSTANT c_sdp_N_fft : NATURAL := 1024; CONSTANT c_sdp_N_fft : NATURAL := 1024;
CONSTANT c_sdp_N_pn_lb : NATURAL := 16; CONSTANT c_sdp_N_pn_lb : NATURAL := 16;
CONSTANT c_sdp_N_pn_max : NATURAL := 16; CONSTANT c_sdp_N_pn_max : NATURAL := 16; -- gn 0:31 --> pn 0:15, pn 0:15 per antenna band
CONSTANT c_sdp_N_pol : NATURAL := 2; CONSTANT c_sdp_N_pol : NATURAL := 2;
CONSTANT c_sdp_N_pol_bf : NATURAL := 2; CONSTANT c_sdp_N_pol_bf : NATURAL := 2;
CONSTANT c_sdp_N_ring_lanes_max : NATURAL := 8; CONSTANT c_sdp_N_ring_lanes_max : NATURAL := 8;
...@@ -540,12 +540,11 @@ PACKAGE BODY sdp_pkg IS ...@@ -540,12 +540,11 @@ PACKAGE BODY sdp_pkg IS
-- MOD it is possible to do: -- MOD it is possible to do:
-- --
-- pn_index = gn_index[3:0], because log2(16) = 4 -- pn_index = gn_index[3:0], because log2(16) = 4
CONSTANT c_pn_w : NATURAL := ceil_log2(c_sdp_N_pn_max); -- = 4 CONSTANT c_w : NATURAL := ceil_log2(c_sdp_N_pn_max); -- = 4
-- use sufficient bits to fit both PN index and GN index in v_index
CONSTANT c_w : NATURAL := ceil_log2(c_sdp_N_pn_max + gn_index); VARIABLE v_index : STD_LOGIC_VECTOR(c_word_w-1 DOWNTO 0) := TO_UVEC(gn_index, c_word_w);
CONSTANT c_index : STD_LOGIC_VECTOR(c_w-1 DOWNTO 0) := TO_UVEC(gn_index, c_w);
BEGIN BEGIN
RETURN TO_UINT(c_index(c_pn_w-1 DOWNTO 0)); RETURN TO_UINT(v_index(c_w-1 DOWNTO 0));
END func_sdp_gn_index_to_pn_index; END func_sdp_gn_index_to_pn_index;
FUNCTION func_sdp_modulo_N_sub(sub_index : NATURAL) RETURN NATURAL IS FUNCTION func_sdp_modulo_N_sub(sub_index : NATURAL) RETURN NATURAL IS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment