w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tb_tst_serloop1_n3.vhd
Go to the documentation of this file.
1-- $Id: tb_tst_serloop1_n3.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_n3 - sim
7-- Description: Test bench for sys_tst_serloop1_n3
8--
9-- Dependencies: simlib/simclk
10-- sys_tst_serloop1_n3 [UUT]
11-- tb/tb_tst_serloop
12--
13-- To test: sys_tst_serloop1_n3
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
21-- 2011-12-11 438 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.simlib.all;
32
35
36architecture sim of tb_tst_serloop1_n3 is
37
38 signal CLK100 : slbit := '0';
39
40 signal I_RXD : slbit := '1';
41 signal O_TXD : slbit := '1';
42 signal I_SWI : slv8 := (others=>'0');
43 signal I_BTN : slv5 := (others=>'0');
44
45 signal O_FUSP_RTS_N : slbit := '0';
46 signal I_FUSP_CTS_N : slbit := '0';
47 signal I_FUSP_RXD : slbit := '1';
48 signal O_FUSP_TXD : slbit := '1';
49
50 signal RXD : slbit := '1';
51 signal TXD : slbit := '1';
52 signal SWI : slv8 := (others=>'0');
53 signal BTN : slv5 := (others=>'0');
54
55 signal FUSP_RTS_N : slbit := '0';
56 signal FUSP_CTS_N : slbit := '0';
57 signal FUSP_RXD : slbit := '1';
58 signal FUSP_TXD : slbit := '1';
59
60 constant clock_period : Delay_length := 10 ns;
61 constant clock_offset : Delay_length := 200 ns;
62 constant delay_time : Delay_length := 2 ns;
63
64begin
65
66 SYSCLK : simclk
67 generic map (
70 port map (
71 CLK => CLK100
72 );
73
74 UUT : entity work.sys_tst_serloop1_n3
75 port map (
77 I_RXD => I_RXD,
78 O_TXD => O_TXD,
79 I_SWI => I_SWI,
80 I_BTN => I_BTN,
81 O_LED => open,
82 O_ANO_N => open,
83 O_SEG_N => open,
84 O_MEM_CE_N => open,
85 O_MEM_BE_N => open,
86 O_MEM_WE_N => open,
87 O_MEM_OE_N => open,
88 O_MEM_ADV_N => open,
89 O_MEM_CLK => open,
90 O_MEM_CRE => open,
91 I_MEM_WAIT => '0',
92 O_MEM_ADDR => open,
93 IO_MEM_DATA => open,
94 O_PPCM_CE_N => open,
95 O_PPCM_RST_N => open,
100 );
101
102 GENTB : entity work.tb_tst_serloop
103 port map (
104 CLKS => CLK100,
105 CLKH => CLK100,
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(3 downto 0)
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( 4 downto 0) slv5
Definition: slvtypes.vhd:37
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 7 downto 0) slv8
Definition: slvtypes.vhd:40
Delay_length := 2 ns delay_time
Delay_length := 10 ns clock_period
slv8 :=( others => '0') SWI
Delay_length := 200 ns clock_offset
slv5 :=( others => '0') I_BTN
slv8 :=( others => '0') I_SWI
slv5 :=( others => '0') BTN
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