1 |
2 |
danv |
-------------------------------------------------------------------------------
|
2 |
|
|
--
|
3 |
|
|
-- Copyright (C) 2017
|
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 |
|
|
-- Author:
|
23 |
|
|
-- E. Kooistra Feb 2017 Initial.
|
24 |
|
|
-- Purpose: Multi testbench of tb_mm_file to verify mm_file and mm_file_pkg.
|
25 |
|
|
-- Usage:
|
26 |
|
|
-- > as 4
|
27 |
|
|
-- > run -all
|
28 |
|
|
|
29 |
|
|
LIBRARY IEEE;
|
30 |
|
|
USE IEEE.std_logic_1164.ALL;
|
31 |
|
|
|
32 |
|
|
ENTITY tb_tb_mm_file IS
|
33 |
|
|
END tb_tb_mm_file;
|
34 |
|
|
|
35 |
|
|
ARCHITECTURE tb OF tb_tb_mm_file IS
|
36 |
|
|
SIGNAL tb_end : STD_LOGIC := '0'; -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
|
37 |
|
|
BEGIN
|
38 |
|
|
-- g_tb_index : NATURAL := 0;
|
39 |
|
|
-- g_mm_nof_accesses : NATURAL := 100;
|
40 |
|
|
-- g_mm_timeout : TIME := sel_a_b(g_mm_throttle_en, 1 ns, 0 ns); -- default 0 for full speed MM, use > 0 to define number of mm_clk without MM access after which the MM file IO is paused
|
41 |
|
|
-- g_mm_pause : TIME := 1 us; -- defines the time for which MM file IO is paused to reduce the file IO rate when the MM slave is idle
|
42 |
|
|
-- g_timeout_gap : INTEGER := -1; -- no gap when < 0, else force MM access gap after g_timeout_gap wr or rd strobes
|
43 |
|
|
-- g_cross_clock_domain : BOOLEAN := FALSE --TRUE
|
44 |
|
|
|
45 |
|
|
u_one_clk : ENTITY work.tb_mm_file GENERIC MAP (0, 10000, 0 ns, 1 us, -1, FALSE);
|
46 |
|
|
u_one_clk_mm_throttle : ENTITY work.tb_mm_file GENERIC MAP (1, 10000, 100 ns, 1 us, -1, FALSE);
|
47 |
|
|
u_cross_clk : ENTITY work.tb_mm_file GENERIC MAP (2, 1000, 0 ns, 1 us, -1, TRUE);
|
48 |
|
|
u_cross_clk_mm_throttle : ENTITY work.tb_mm_file GENERIC MAP (3, 1000, 100 ns, 1 us, -1, TRUE);
|
49 |
|
|
u_with_gap_one_clk : ENTITY work.tb_mm_file GENERIC MAP (4, 10000, 0 ns, 1 us, 3, FALSE);
|
50 |
|
|
u_with_gap_one_clk_mm_throttle : ENTITY work.tb_mm_file GENERIC MAP (5, 10000, 100 ns, 1 us, 3, FALSE);
|
51 |
|
|
u_with_gap_cross_clk : ENTITY work.tb_mm_file GENERIC MAP (6, 1000, 0 ns, 1 us, 3, TRUE);
|
52 |
|
|
u_with_gap_cross_clk_mm_throttle : ENTITY work.tb_mm_file GENERIC MAP (7, 1000, 100 ns, 1 us, 3, TRUE);
|
53 |
|
|
|
54 |
|
|
END tb;
|