Line 24... |
Line 24... |
-- Usage:
|
-- Usage:
|
-- > as 10
|
-- > as 10
|
-- > run -all
|
-- > run -all
|
-- Testbench is selftesting.
|
-- Testbench is selftesting.
|
|
|
library IEEE, common_pkg_lib, dp_pkg_lib, diag_lib, rTwoSDF_lib, common_ram_lib, mm_lib, common_components_lib;
|
library IEEE, common_pkg_lib, dp_pkg_lib, astron_diagnostics_lib, astron_r2sdf_fft_lib, astron_ram_lib, astron_mm_lib, common_components_lib;
|
use IEEE.std_logic_1164.ALL;
|
use IEEE.std_logic_1164.ALL;
|
use IEEE.numeric_std.ALL;
|
use IEEE.numeric_std.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 common_pkg_lib.common_lfsr_sequences_pkg.ALL;
|
use common_pkg_lib.common_lfsr_sequences_pkg.ALL;
|
use common_pkg_lib.tb_common_pkg.ALL;
|
use common_pkg_lib.tb_common_pkg.ALL;
|
use mm_lib.tb_common_mem_pkg.ALL;
|
use astron_mm_lib.tb_common_mem_pkg.ALL;
|
use dp_pkg_lib.dp_stream_pkg.ALL;
|
use dp_pkg_lib.dp_stream_pkg.ALL;
|
use diag_lib.diag_pkg.ALL;
|
use astron_diagnostics_lib.diag_pkg.ALL;
|
use rTwoSDF_lib.twiddlesPkg.all;
|
use astron_r2sdf_fft_lib.twiddlesPkg.all;
|
use rTwoSDF_lib.rTwoSDFPkg.all;
|
use astron_r2sdf_fft_lib.rTwoSDFPkg.all;
|
|
|
entity tb_fft_r2_bf_par is
|
entity tb_fft_r2_bf_par is
|
generic(
|
generic(
|
g_stage : natural := 4;
|
g_stage : natural := 4;
|
g_element : natural := 2
|
g_element : natural := 2
|
);
|
);
|
end tb_fft_r2_bf_par;
|
end tb_fft_r2_bf_par;
|
|
|
architecture tb of tb_fft_r2_bf_par is
|
architecture tb of tb_fft_r2_bf_par is
|
|
|
constant c_pipeline : t_fft_pipeline := c_fft_pipeline; -- defined in rTwoSDF_lib.rTwoSDFPkg
|
constant c_pipeline : t_fft_pipeline := c_fft_pipeline; -- defined in astron_r2sdf_fft_lib.rTwoSDFPkg
|
|
|
constant c_clk_period : time := 10 ns;
|
constant c_clk_period : time := 10 ns;
|
constant c_nof_points : natural := 1024; -- Number of points should be a power of 2
|
constant c_nof_points : natural := 1024; -- Number of points should be a power of 2
|
constant c_conjugate : boolean := FALSE;
|
constant c_conjugate : boolean := FALSE;
|
|
|
Line 137... |
Line 137... |
proc_common_wait_some_cycles(clk, c_nof_points + 20);
|
proc_common_wait_some_cycles(clk, c_nof_points + 20);
|
tb_end <= '1';
|
tb_end <= '1';
|
wait;
|
wait;
|
end process;
|
end process;
|
|
|
u_block_generator : entity diag_lib.mms_diag_block_gen
|
u_block_generator : entity astron_diagnostics_lib.mms_diag_block_gen
|
generic map(
|
generic map(
|
g_nof_streams => c_nof_streams,
|
g_nof_streams => c_nof_streams,
|
g_buf_dat_w => c_nof_complex*c_in_dat_w,
|
g_buf_dat_w => c_nof_complex*c_in_dat_w,
|
g_buf_addr_w => c_bg_addr_w, -- Waveform buffer size 2**g_buf_addr_w nof samples
|
g_buf_addr_w => c_bg_addr_w, -- Waveform buffer size 2**g_buf_addr_w nof samples
|
g_file_name_prefix => c_bg_prefix
|
g_file_name_prefix => c_bg_prefix
|