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, common_pkg_lib;
|
22 |
|
|
USE IEEE.std_logic_1164.ALL;
|
23 |
|
|
USE common_pkg_lib.common_pkg.ALL;
|
24 |
|
|
|
25 |
|
|
ENTITY tb_tb_common_multiplexer IS
|
26 |
|
|
END tb_tb_common_multiplexer;
|
27 |
|
|
|
28 |
|
|
ARCHITECTURE tb OF tb_tb_common_multiplexer 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 |
|
|
-- Usage:
|
32 |
|
|
-- > as 3
|
33 |
|
|
-- > run -all
|
34 |
|
|
|
35 |
|
|
-- g_pipeline_demux_in : NATURAL := 1;
|
36 |
|
|
-- g_pipeline_demux_out : NATURAL := 1;
|
37 |
|
|
-- g_nof_streams : NATURAL := 4;
|
38 |
|
|
-- g_pipeline_mux_in : NATURAL := 1;
|
39 |
|
|
-- g_pipeline_mux_out : NATURAL := 1;
|
40 |
|
|
-- g_dat_w : NATURAL := 8;
|
41 |
|
|
-- g_random_in_val : BOOLEAN := TRUE;
|
42 |
|
|
-- g_test_nof_cycles : NATURAL := 500
|
43 |
|
|
|
44 |
|
|
u_demux_mux_p0000 : ENTITY work.tb_common_multiplexer GENERIC MAP (0, 0, 4, 0, 0, 8, TRUE, 500000);
|
45 |
|
|
u_demux_mux_p0000_nof_1 : ENTITY work.tb_common_multiplexer GENERIC MAP (0, 0, 1, 0, 0, 8, TRUE, 500000);
|
46 |
|
|
u_demux_mux_p0011 : ENTITY work.tb_common_multiplexer GENERIC MAP (0, 0, 4, 1, 1, 8, TRUE, 500000);
|
47 |
|
|
u_demux_mux_p1100 : ENTITY work.tb_common_multiplexer GENERIC MAP (1, 1, 4, 0, 0, 8, TRUE, 500000);
|
48 |
|
|
u_demux_mux_p1111 : ENTITY work.tb_common_multiplexer GENERIC MAP (1, 1, 4, 1, 1, 8, TRUE, 500000);
|
49 |
|
|
u_demux_mux_p1010 : ENTITY work.tb_common_multiplexer GENERIC MAP (1, 0, 4, 1, 0, 8, TRUE, 500000);
|
50 |
|
|
u_demux_mux_p0101 : ENTITY work.tb_common_multiplexer GENERIC MAP (0, 1, 4, 0, 1, 8, TRUE, 500000);
|
51 |
|
|
u_demux_mux_p1234_nof_1 : ENTITY work.tb_common_multiplexer GENERIC MAP (1, 2, 1, 3, 4, 8, TRUE, 500000);
|
52 |
|
|
u_demux_mux_p1234_nof_5 : ENTITY work.tb_common_multiplexer GENERIC MAP (1, 2, 5, 3, 4, 8, TRUE, 500000);
|
53 |
|
|
|
54 |
|
|
END tb;
|