Line 28... |
Line 28... |
--
|
--
|
-- Remarks: . The unit can handle only one sync at a time. Therfor the
|
-- Remarks: . The unit can handle only one sync at a time. Therfor the
|
-- sync interval should be larger than the total pipeline
|
-- sync interval should be larger than the total pipeline
|
-- stages of the wideband fft.
|
-- stages of the wideband fft.
|
|
|
library ieee, common_pkg_lib, common_ram_lib, dp_pkg_lib, rTwoSDF_lib, statistics_lib, mm_lib, dp_requantize_lib;
|
library ieee, common_pkg_lib, astron_ram_lib, dp_pkg_lib, astron_r2sdf_fft_lib, astron_statistics_lib, astron_mm_lib, astron_requantize_lib;
|
use IEEE.std_logic_1164.all;
|
use IEEE.std_logic_1164.all;
|
use common_pkg_lib.common_pkg.all;
|
use common_pkg_lib.common_pkg.all;
|
use common_ram_lib.common_ram_pkg.all;
|
use astron_ram_lib.common_ram_pkg.all;
|
use dp_pkg_lib.dp_stream_pkg.ALL;
|
use dp_pkg_lib.dp_stream_pkg.ALL;
|
use rTwoSDF_lib.rTwoSDFPkg.all;
|
use astron_r2sdf_fft_lib.rTwoSDFPkg.all;
|
use statistics_lib.all;
|
use astron_statistics_lib.all;
|
use work.fft_pkg.all;
|
use work.fft_pkg.all;
|
|
|
entity fft_wide_unit is
|
entity fft_wide_unit is
|
generic (
|
generic (
|
g_fft : t_fft := c_fft; -- generics for the FFT
|
g_fft : t_fft := c_fft; -- generics for the FFT
|
g_pft_pipeline : t_fft_pipeline := c_fft_pipeline; -- For the pipelined part, defined in rTwoSDF_lib.rTwoSDFPkg
|
g_pft_pipeline : t_fft_pipeline := c_fft_pipeline; -- For the pipelined part, defined in astron_r2sdf_fft_lib.rTwoSDFPkg
|
g_fft_pipeline : t_fft_pipeline := c_fft_pipeline -- For the parallel part, defined in rTwoSDF_lib.rTwoSDFPkg
|
g_fft_pipeline : t_fft_pipeline := c_fft_pipeline -- For the parallel part, defined in astron_r2sdf_fft_lib.rTwoSDFPkg
|
);
|
);
|
port (
|
port (
|
dp_rst : in std_logic := '0';
|
dp_rst : in std_logic := '0';
|
dp_clk : in std_logic;
|
dp_clk : in std_logic;
|
mm_rst : in std_logic;
|
mm_rst : in std_logic;
|
Line 107... |
Line 107... |
-- COMBINE MEMORY MAPPED INTERFACES
|
-- COMBINE MEMORY MAPPED INTERFACES
|
---------------------------------------------------------------
|
---------------------------------------------------------------
|
-- Combine the internal array of mm interfaces for the subband
|
-- Combine the internal array of mm interfaces for the subband
|
-- statistics to one array that is connected to the port of the
|
-- statistics to one array that is connected to the port of the
|
-- fft_wide_unit.
|
-- fft_wide_unit.
|
u_mem_mux_sst : entity mm_lib.common_mem_mux
|
u_mem_mux_sst : entity astron_mm_lib.common_mem_mux
|
generic map (
|
generic map (
|
g_nof_mosi => g_fft.wb_factor,
|
g_nof_mosi => g_fft.wb_factor,
|
g_mult_addr_w => ceil_log2(g_fft.stat_data_sz*c_nof_stats)
|
g_mult_addr_w => ceil_log2(g_fft.stat_data_sz*c_nof_stats)
|
)
|
)
|
port map (
|
port map (
|
Line 177... |
Line 177... |
-- subband statistics unit is placed.
|
-- subband statistics unit is placed.
|
-- Since the subband statistics module uses embedded DSP blocks
|
-- Since the subband statistics module uses embedded DSP blocks
|
-- for multiplication, the incoming data cannot be wider
|
-- for multiplication, the incoming data cannot be wider
|
-- than 18 bit. Therefor a quantizer is inserted.
|
-- than 18 bit. Therefor a quantizer is inserted.
|
gen_subband_stats: for I in 0 to g_fft.wb_factor-1 generate
|
gen_subband_stats: for I in 0 to g_fft.wb_factor-1 generate
|
u_quantizer_for_bst : entity dp_requantize_lib.dp_requantize
|
u_quantizer_for_bst : entity astron_requantize_lib.dp_requantize
|
GENERIC MAP (
|
GENERIC MAP (
|
g_complex => TRUE,
|
g_complex => TRUE,
|
g_representation => "SIGNED",
|
g_representation => "SIGNED",
|
g_lsb_w => c_lsb_w,
|
g_lsb_w => c_lsb_w,
|
g_lsb_round => TRUE,
|
g_lsb_round => TRUE,
|
Line 199... |
Line 199... |
snk_in => fft_out_sosi_arr(I),
|
snk_in => fft_out_sosi_arr(I),
|
src_out => sst_in_sosi_arr(I),
|
src_out => sst_in_sosi_arr(I),
|
out_ovr => OPEN
|
out_ovr => OPEN
|
);
|
);
|
|
|
u_subband_stats : entity statistics_lib.st_sst
|
u_subband_stats : entity astron_statistics_lib.st_sst
|
generic map(
|
generic map(
|
g_nof_stat => c_nof_stats,
|
g_nof_stat => c_nof_stats,
|
g_in_data_w => g_fft.stage_dat_w,
|
g_in_data_w => g_fft.stage_dat_w,
|
g_stat_data_w => g_fft.stat_data_w,
|
g_stat_data_w => g_fft.stat_data_w,
|
g_stat_data_sz => g_fft.stat_data_sz
|
g_stat_data_sz => g_fft.stat_data_sz
|