1 |
2 |
danv |
-------------------------------------------------------------------------------
|
2 |
|
|
--
|
3 |
3 |
danv |
-- Copyright 2020
|
4 |
2 |
danv |
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
|
5 |
|
|
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
|
6 |
3 |
danv |
--
|
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 |
|
|
LIBRARY IEEE;
|
22 |
|
|
USE IEEE.std_logic_1164.ALL;
|
23 |
|
|
|
24 |
|
|
ENTITY tb_tb_common_add_sub IS
|
25 |
|
|
END tb_tb_common_add_sub;
|
26 |
|
|
|
27 |
|
|
ARCHITECTURE tb OF tb_tb_common_add_sub IS
|
28 |
|
|
SIGNAL tb_end : STD_LOGIC := '0'; -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
|
29 |
|
|
BEGIN
|
30 |
|
|
-- g_direction : STRING := "SUB"; -- "SUB" or "ADD"
|
31 |
|
|
-- g_sel_add : STD_LOGIC :='1'; -- '0' = sub, '1' = add, only valid for g_direction = "BOTH"
|
32 |
|
|
-- g_pipeline_in : NATURAL := 0; -- input pipelining 0 or 1
|
33 |
|
|
-- g_pipeline_out : NATURAL := 1; -- output pipelining >= 0
|
34 |
|
|
-- g_in_dat_w : NATURAL := 5;
|
35 |
|
|
-- g_out_dat_w : NATURAL := 5; -- g_in_dat_w or g_in_dat_w+1
|
36 |
|
|
|
37 |
|
|
u_add_5_5 : ENTITY work.tb_common_add_sub GENERIC MAP ("ADD", '1', 0, 2, 5, 5);
|
38 |
|
|
u_add_5_6 : ENTITY work.tb_common_add_sub GENERIC MAP ("ADD", '1', 0, 2, 5, 6);
|
39 |
|
|
u_sub_5_5 : ENTITY work.tb_common_add_sub GENERIC MAP ("SUB", '0', 0, 2, 5, 5);
|
40 |
|
|
u_sub_5_6 : ENTITY work.tb_common_add_sub GENERIC MAP ("SUB", '0', 0, 2, 5, 6);
|
41 |
|
|
u_both_add_5_5 : ENTITY work.tb_common_add_sub GENERIC MAP ("BOTH", '1', 0, 2, 5, 5);
|
42 |
|
|
u_both_add_5_6 : ENTITY work.tb_common_add_sub GENERIC MAP ("BOTH", '1', 0, 2, 5, 6);
|
43 |
|
|
u_both_sub_5_5 : ENTITY work.tb_common_add_sub GENERIC MAP ("BOTH", '0', 0, 2, 5, 5);
|
44 |
|
|
u_both_sub_5_6 : ENTITY work.tb_common_add_sub GENERIC MAP ("BOTH", '0', 0, 2, 5, 6);
|
45 |
|
|
|
46 |
|
|
END tb;
|