1 |
2 |
danv |
-------------------------------------------------------------------------------
|
2 |
|
|
--
|
3 |
|
|
-- Copyright (C) 2009
|
4 |
|
|
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
|
5 |
|
|
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
|
6 |
|
|
--
|
7 |
|
|
-- This program is free software: you can redistribute it and/or modify
|
8 |
|
|
-- it under the terms of the GNU General Public License as published by
|
9 |
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
10 |
|
|
-- (at your option) any later version.
|
11 |
|
|
--
|
12 |
|
|
-- This program is distributed in the hope that it will be useful,
|
13 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
|
|
-- GNU General Public License for more details.
|
16 |
|
|
--
|
17 |
|
|
-- You should have received a copy of the GNU General Public License
|
18 |
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19 |
|
|
--
|
20 |
|
|
-------------------------------------------------------------------------------
|
21 |
|
|
|
22 |
|
|
LIBRARY IEEE;
|
23 |
|
|
USE IEEE.std_logic_1164.ALL;
|
24 |
|
|
|
25 |
|
|
ENTITY tb_tb_common_add_sub IS
|
26 |
|
|
END tb_tb_common_add_sub;
|
27 |
|
|
|
28 |
|
|
ARCHITECTURE tb OF tb_tb_common_add_sub IS
|
29 |
|
|
SIGNAL tb_end : STD_LOGIC := '0'; -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
|
30 |
|
|
BEGIN
|
31 |
|
|
-- g_direction : STRING := "SUB"; -- "SUB" or "ADD"
|
32 |
|
|
-- g_sel_add : STD_LOGIC :='1'; -- '0' = sub, '1' = add, only valid for g_direction = "BOTH"
|
33 |
|
|
-- g_pipeline_in : NATURAL := 0; -- input pipelining 0 or 1
|
34 |
|
|
-- g_pipeline_out : NATURAL := 1; -- output pipelining >= 0
|
35 |
|
|
-- g_in_dat_w : NATURAL := 5;
|
36 |
|
|
-- g_out_dat_w : NATURAL := 5; -- g_in_dat_w or g_in_dat_w+1
|
37 |
|
|
|
38 |
|
|
u_add_5_5 : ENTITY work.tb_common_add_sub GENERIC MAP ("ADD", '1', 0, 2, 5, 5);
|
39 |
|
|
u_add_5_6 : ENTITY work.tb_common_add_sub GENERIC MAP ("ADD", '1', 0, 2, 5, 6);
|
40 |
|
|
u_sub_5_5 : ENTITY work.tb_common_add_sub GENERIC MAP ("SUB", '0', 0, 2, 5, 5);
|
41 |
|
|
u_sub_5_6 : ENTITY work.tb_common_add_sub GENERIC MAP ("SUB", '0', 0, 2, 5, 6);
|
42 |
|
|
u_both_add_5_5 : ENTITY work.tb_common_add_sub GENERIC MAP ("BOTH", '1', 0, 2, 5, 5);
|
43 |
|
|
u_both_add_5_6 : ENTITY work.tb_common_add_sub GENERIC MAP ("BOTH", '1', 0, 2, 5, 6);
|
44 |
|
|
u_both_sub_5_5 : ENTITY work.tb_common_add_sub GENERIC MAP ("BOTH", '0', 0, 2, 5, 5);
|
45 |
|
|
u_both_sub_5_6 : ENTITY work.tb_common_add_sub GENERIC MAP ("BOTH", '0', 0, 2, 5, 6);
|
46 |
|
|
|
47 |
|
|
END tb;
|