From 84cd83be6ef3260d88f8f2ee8e25a4da51ecf1cc Mon Sep 17 00:00:00 2001 From: Pepping <pepping> Date: Mon, 17 Oct 2016 15:11:31 +0000 Subject: [PATCH] Initial commti --- .../tb/vhdl/tb_tb_fringe_stop_unit.vhd | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 libraries/dsp/fringe_stop/tb/vhdl/tb_tb_fringe_stop_unit.vhd diff --git a/libraries/dsp/fringe_stop/tb/vhdl/tb_tb_fringe_stop_unit.vhd b/libraries/dsp/fringe_stop/tb/vhdl/tb_tb_fringe_stop_unit.vhd new file mode 100644 index 0000000000..25b04aee3c --- /dev/null +++ b/libraries/dsp/fringe_stop/tb/vhdl/tb_tb_fringe_stop_unit.vhd @@ -0,0 +1,76 @@ + +------------------------------------------------------------------------------- +-- +-- Copyright (C) 2012 +-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/> +-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +------------------------------------------------------------------------------- +-- +-- Purpose: Testbench for the fringe_stop_unit. +-- +-- +-- Usage +-- > as 8 +-- > run -all +-- > Testbench is self-checking +-- > Evalute the WAVE window. + +LIBRARY IEEE, common_lib, technology_lib, mm_lib, diag_lib, dp_lib; +USE IEEE.std_logic_1164.ALL; +USE IEEE.numeric_std.ALL; +USE common_lib.common_pkg.ALL; +USE common_lib.common_mem_pkg.ALL; +USE common_lib.common_str_pkg.ALL; +USE common_lib.tb_common_pkg.ALL; +USE common_lib.tb_common_mem_pkg.ALL; +USE technology_lib.technology_select_pkg.ALL; +USE mm_lib.mm_file_unb_pkg.ALL; +USE mm_lib.mm_file_pkg.ALL; +USE dp_lib.dp_stream_pkg.ALL; +USE diag_lib.diag_pkg.ALL; +USE work.fringe_stop_pkg.ALL; + + +ENTITY tb_tb_fringe_stop_unit IS +END tb_tb_fringe_stop_unit; + +ARCHITECTURE tb OF tb_tb_fringe_stop_unit IS + SIGNAL tb_end : STD_LOGIC := '0'; -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end' +BEGIN + +-- Usage +-- > as 8 +-- > run -all +-- > Testbenches are self-checking + +-- g_sim_type : NATURAL := 0; -- 0 = Increment, 1 = Increment over the maximum, 2 = Decrease, 3 = Decrease over the minimum +-- g_in_dat_w : POSITIVE := 8; -- Width of the incoming data. +-- g_fs_offset_w : POSITIVE := 10; -- Width of the offset of the linear coefficient +-- g_accu_w : POSITIVE := 31; -- Width of the accumulation register +-- g_fs_step_w : POSITIVE := 17; -- Width of the step of the linear coefficient +-- g_nof_channels : POSITIVE := 4; -- Number of serial channels for which the fringe stopping must be applied uniquely +-- g_phasor_w : POSITIVE := 9 -- Width of the phasor values in the lookup table +-- + + gen_sim_types : FOR I IN 0 TO 3 GENERATE + sim : ENTITY work.tb_fringe_stop_unit GENERIC MAP (I, 8, 10, 31, 17, 4, 9); + END GENERATE; + +END tb; + + + -- GitLab