w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tb_tst_serloop1_n2.vhd
Go to the documentation of this file.
1-- $Id: tb_tst_serloop1_n2.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2011-2016 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: tb_tst_serloop1_n2 - sim
7-- Description: Test bench for sys_tst_serloop1_n2
8--
9-- Dependencies: simlib/simclk
10-- sys_tst_serloop2_n2 [UUT]
11-- tb/tb_tst_serloop
12--
13-- To test: sys_tst_serloop1_n2
14--
15-- Target Devices: generic
16--
17-- Revision History:
18-- Date Rev Version Comment
19-- 2016-09-03 805 1.2 remove CLK_STOP logic (simstop via report)
20-- 2011-12-23 444 1.1 use new simclk; remove clksys output hack
21-- 2011-12-16 439 1.0 Initial version
22------------------------------------------------------------------------------
23
24library ieee;
25use ieee.std_logic_1164.all;
26use ieee.numeric_std.all;
27use ieee.std_logic_textio.all;
28use std.textio.all;
29
30use work.slvtypes.all;
31use work.xlib.all;
32use work.simlib.all;
33
36
37architecture sim of tb_tst_serloop1_n2 is
38
39 signal CLK50 : slbit := '0';
40
41 signal I_RXD : slbit := '1';
42 signal O_TXD : slbit := '1';
43 signal I_SWI : slv8 := (others=>'0');
44 signal I_BTN : slv4 := (others=>'0');
45
46 signal O_FUSP_RTS_N : slbit := '0';
47 signal I_FUSP_CTS_N : slbit := '0';
48 signal I_FUSP_RXD : slbit := '1';
49 signal O_FUSP_TXD : slbit := '1';
50
51 signal RXD : slbit := '1';
52 signal TXD : slbit := '1';
53 signal SWI : slv8 := (others=>'0');
54 signal BTN : slv4 := (others=>'0');
55
56 signal FUSP_RTS_N : slbit := '0';
57 signal FUSP_CTS_N : slbit := '0';
58 signal FUSP_RXD : slbit := '1';
59 signal FUSP_TXD : slbit := '1';
60
61 constant clock_period : Delay_length := 20 ns;
62 constant clock_offset : Delay_length := 200 ns;
63 constant delay_time : Delay_length := 2 ns;
64
65begin
66
67 SYSCLK : simclk
68 generic map (
71 port map (
72 CLK => CLK50
73 );
74
75 UUT : entity work.sys_tst_serloop1_n2
76 port map (
77 I_CLK50 => CLK50,
78 I_RXD => I_RXD,
79 O_TXD => O_TXD,
80 I_SWI => I_SWI,
81 I_BTN => I_BTN,
82 O_LED => open,
83 O_ANO_N => open,
84 O_SEG_N => open,
85 O_MEM_CE_N => open,
86 O_MEM_BE_N => open,
87 O_MEM_WE_N => open,
88 O_MEM_OE_N => open,
89 O_MEM_ADV_N => open,
90 O_MEM_CLK => open,
91 O_MEM_CRE => open,
92 I_MEM_WAIT => '0',
93 O_MEM_ADDR => open,
94 IO_MEM_DATA => open,
95 O_FLA_CE_N => open,
100 );
101
102 GENTB : entity work.tb_tst_serloop
103 port map (
104 CLKS => CLK50,
105 CLKH => CLK50,
106 P0_RXD => RXD,
107 P0_TXD => TXD,
108 P0_RTS_N => '0',
109 P0_CTS_N => open,
110 P1_RXD => FUSP_RXD,
111 P1_TXD => FUSP_TXD,
114 SWI => SWI,
115 BTN => BTN
116 );
117
118 I_RXD <= RXD after delay_time;
119 TXD <= O_TXD after delay_time;
124
125 I_SWI <= SWI after delay_time;
126 I_BTN <= BTN after delay_time;
127
128end sim;
out CLK slbit
Definition: simclk.vhd:33
OFFSET Delay_length := 200 ns
Definition: simclk.vhd:31
PERIOD Delay_length := 20 ns
Definition: simclk.vhd:30
std_logic_vector( 3 downto 0) slv4
Definition: slvtypes.vhd:36
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 7 downto 0) slv8
Definition: slvtypes.vhd:40
Delay_length := 2 ns delay_time
slv8 :=( others => '0') SWI
slv4 :=( others => '0') I_BTN
Delay_length := 200 ns clock_offset
slv4 :=( others => '0') BTN
slv8 :=( others => '0') I_SWI
Delay_length := 20 ns clock_period
out P0_RXD slbit
in P1_RTS_N slbit
in P1_TXD slbit
in P0_TXD slbit
out P0_CTS_N slbit
out P1_RXD slbit
in P0_RTS_N slbit
out P1_CTS_N slbit
Definition: xlib.vhd:35