1 |
2 |
danv |
--------------------------------------------------------------------------------
|
2 |
|
|
--
|
3 |
3 |
danv |
-- Copyright 2020
|
4 |
|
|
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
|
5 |
|
|
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
|
6 |
|
|
--
|
7 |
|
|
-- Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
|
|
-- you may not use this file except in compliance with the License.
|
9 |
|
|
-- You may obtain a copy of the License at
|
10 |
|
|
--
|
11 |
|
|
-- http://www.apache.org/licenses/LICENSE-2.0
|
12 |
|
|
--
|
13 |
|
|
-- Unless required by applicable law or agreed to in writing, software
|
14 |
|
|
-- distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
|
|
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
|
|
-- See the License for the specific language governing permissions and
|
17 |
|
|
-- limitations under the License.
|
18 |
2 |
danv |
--
|
19 |
|
|
--------------------------------------------------------------------------------
|
20 |
|
|
|
21 |
|
|
-- Purpose:
|
22 |
|
|
-- Description:
|
23 |
|
|
-- Generates FFT testbenches (tb_rTwoSDF) for various g_in_dat_w and
|
24 |
|
|
-- g_nof_points. Note that twiddlePkg.vhd must be generated for the largest
|
25 |
|
|
-- value of g_nof_points used in this structure.
|
26 |
|
|
|
27 |
|
|
library ieee, common_pkg_lib;
|
28 |
|
|
use IEEE.std_logic_1164.all;
|
29 |
|
|
use IEEE.std_logic_unsigned.all;
|
30 |
|
|
use IEEE.numeric_std.all;
|
31 |
|
|
use IEEE.std_logic_textio.all;
|
32 |
|
|
use STD.textio.all;
|
33 |
|
|
use common_pkg_lib.common_pkg.all;
|
34 |
|
|
use work.rTwoSDFPkg.all;
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
entity tb_tb_rTwoSDF is
|
38 |
|
|
end entity tb_tb_rTwoSDF;
|
39 |
|
|
|
40 |
|
|
architecture tb of tb_tb_rTwoSDF is
|
41 |
|
|
|
42 |
|
|
signal tb_end : std_logic := '0'; -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
|
43 |
|
|
|
44 |
|
|
begin
|
45 |
|
|
|
46 |
|
|
-- -- generics for tb
|
47 |
|
|
-- g_use_uniNoise_file : boolean := true;
|
48 |
|
|
-- g_in_en : natural := 0; -- 1 = always active, others = random control
|
49 |
|
|
-- -- generics for rTwoSDF
|
50 |
|
|
-- g_use_reorder : boolean := true;
|
51 |
|
|
-- g_nof_points : natural := 1024;
|
52 |
|
|
-- g_in_dat_w : natural := 8;
|
53 |
|
|
-- g_out_dat_w : natural := 14;
|
54 |
|
|
-- g_guard_w : natural := 2 -- guard bits are used to avoid overflow in single FFT stage.
|
55 |
|
|
|
56 |
|
|
--u_act_impulse_16p_16i_16o : entity work.tb_rTwoSDF generic map (false, 1, true, 16, 16, 16, 2);
|
57 |
|
|
u_act_noise_1024p_8i_14o : entity work.tb_rTwoSDF generic map (true, 1, true, 1024, 8, 14, 2);
|
58 |
|
|
u_rnd_noise_1024p_8i_14o : entity work.tb_rTwoSDF generic map (true, 0, true, 1024, 8, 14, 2);
|
59 |
|
|
u_rnd_noise_1024p_8i_14o_flipped : entity work.tb_rTwoSDF generic map (true, 0, false, 1024, 8, 14, 2);
|
60 |
|
|
|
61 |
|
|
end tb;
|