Skip to content
Snippets Groups Projects

Resolve L2SDP-162

Merged Eric Kooistra requested to merge L2SDP-162 into master
67 files
+ 13340
16590
Compare changes
  • Side-by-side
  • Inline
Files
67
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--
--
-- Copyright 2020
-- Copyright 2021
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
--
@@ -33,6 +33,7 @@ LIBRARY IEEE, common_lib, dp_lib, pfs_lib, pft2_lib;
@@ -33,6 +33,7 @@ LIBRARY IEEE, common_lib, dp_lib, pfs_lib, pft2_lib;
USE IEEE.std_logic_1164.ALL;
USE IEEE.std_logic_1164.ALL;
USE common_lib.common_pkg.ALL;
USE common_lib.common_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL;
 
USE pfs_lib.pfs_pkg.ALL;
USE pft2_lib.pft_pkg.ALL;
USE pft2_lib.pft_pkg.ALL;
ENTITY pfb2 IS
ENTITY pfb2 IS
@@ -44,7 +45,8 @@ ENTITY pfb2 IS
@@ -44,7 +45,8 @@ ENTITY pfb2 IS
g_pfs_nof_taps : NATURAL := 16;
g_pfs_nof_taps : NATURAL := 16;
g_pfs_in_dat_w : NATURAL := 12;
g_pfs_in_dat_w : NATURAL := 12;
g_pfs_out_dat_w : NATURAL := 18;
g_pfs_out_dat_w : NATURAL := 18;
g_pfs_coef_dat_w : NATURAL := 16;
g_pfs_coef_dat_w : NATURAL := c_pfs_coef_w; -- = 16, should match coefs in g_pfs_coefs_file
 
g_pfs_coefs_file : STRING := c_pfs_coefs_file; -- = "data/pfs_coefsbuf_1024.hex"
-- pft2
-- pft2
g_pft_mode : PFT_MODE_TYPE := PFT_MODE_REAL2;
g_pft_mode : PFT_MODE_TYPE := PFT_MODE_REAL2;
@@ -69,7 +71,6 @@ ARCHITECTURE str OF pfb2 IS
@@ -69,7 +71,6 @@ ARCHITECTURE str OF pfb2 IS
SIGNAL pfs_in_dat_y : STD_LOGIC_VECTOR(g_pfs_in_dat_w-1 DOWNTO 0);
SIGNAL pfs_in_dat_y : STD_LOGIC_VECTOR(g_pfs_in_dat_w-1 DOWNTO 0);
SIGNAL pfs_in_val : STD_LOGIC;
SIGNAL pfs_in_val : STD_LOGIC;
SIGNAL pfs_in_sync : STD_LOGIC;
SIGNAL pfs_in_sync : STD_LOGIC;
SIGNAL fil_out_dat_x : STD_LOGIC_VECTOR(g_pfs_out_dat_w-1 DOWNTO 0);
SIGNAL fil_out_dat_x : STD_LOGIC_VECTOR(g_pfs_out_dat_w-1 DOWNTO 0);
SIGNAL fil_out_dat_y : STD_LOGIC_VECTOR(g_pfs_out_dat_w-1 DOWNTO 0);
SIGNAL fil_out_dat_y : STD_LOGIC_VECTOR(g_pfs_out_dat_w-1 DOWNTO 0);
SIGNAL fil_out_val : STD_LOGIC;
SIGNAL fil_out_val : STD_LOGIC;
@@ -95,7 +96,8 @@ BEGIN
@@ -95,7 +96,8 @@ BEGIN
g_nof_taps => c_nof_coeffs,
g_nof_taps => c_nof_coeffs,
g_in_dat_w => g_pfs_in_dat_w,
g_in_dat_w => g_pfs_in_dat_w,
g_out_dat_w => g_pfs_out_dat_w,
g_out_dat_w => g_pfs_out_dat_w,
g_coef_dat_w => g_pfs_coef_dat_w
g_coef_dat_w => g_pfs_coef_dat_w,
 
g_coefs_file => g_pfs_coefs_file
)
)
PORT MAP (
PORT MAP (
in_dat_x => pfs_in_dat_x,
in_dat_x => pfs_in_dat_x,
@@ -113,8 +115,8 @@ BEGIN
@@ -113,8 +115,8 @@ BEGIN
END GENERATE;
END GENERATE;
no_pfs : IF g_pfs_bypass=TRUE GENERATE
no_pfs : IF g_pfs_bypass=TRUE GENERATE
fil_out_dat_x <= SHIFT_SVEC(pfs_in_dat_x, g_pfs_in_dat_w - g_pfs_out_dat_w); -- < 0 is shift left, > 0 is shift right
fil_out_dat_x <= SHIFT_SVEC(RESIZE_SVEC(pfs_in_dat_x, g_pfs_out_dat_w), g_pfs_in_dat_w - g_pfs_out_dat_w); -- < 0 is shift left, > 0 is shift right
fil_out_dat_y <= SHIFT_SVEC(pfs_in_dat_y, g_pfs_in_dat_w - g_pfs_out_dat_w); -- < 0 is shift left, > 0 is shift right
fil_out_dat_y <= SHIFT_SVEC(RESIZE_SVEC(pfs_in_dat_y, g_pfs_out_dat_w), g_pfs_in_dat_w - g_pfs_out_dat_w); -- < 0 is shift left, > 0 is shift right
fil_out_val <= pfs_in_val;
fil_out_val <= pfs_in_val;
fil_out_sync <= pfs_in_sync;
fil_out_sync <= pfs_in_sync;
END GENERATE;
END GENERATE;
Loading