w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tb_tst_serloop_s3.vhd
Go to the documentation of this file.
1-- $Id: tb_tst_serloop_s3.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_serloop_s3 - sim
7-- Description: Test bench for sys_tst_serloop_s3
8--
9-- Dependencies: simlib/simclk
10-- vlib/xlib/dcm_sfs
11-- sys_tst_serloop_s3 [UUT]
12-- tb/tb_tst_serloop
13--
14-- To test: sys_tst_serloop_s3
15--
16-- Target Devices: generic
17--
18-- Revision History:
19-- Date Rev Version Comment
20-- 2016-09-03 805 1.2 remove CLK_STOP logic (simstop via report)
21-- 2011-12-23 444 1.1 use new simclk
22-- 2011-11-17 426 1.0.1 use dcm_sfs now
23-- 2011-11-06 420 1.0 Initial version
24------------------------------------------------------------------------------
25
26library ieee;
27use ieee.std_logic_1164.all;
28use ieee.numeric_std.all;
29use ieee.std_logic_textio.all;
30use std.textio.all;
31
32use work.slvtypes.all;
33use work.xlib.all;
34use work.simlib.all;
35
38
39architecture sim of tb_tst_serloop_s3 is
40
41 signal CLK50 : slbit := '0';
42
43 signal CLKS : slbit := '0';
44
45 signal I_RXD : slbit := '1';
46 signal O_TXD : slbit := '1';
47 signal I_SWI : slv8 := (others=>'0');
48 signal I_BTN : slv4 := (others=>'0');
49
50 signal O_FUSP_RTS_N : slbit := '0';
51 signal I_FUSP_CTS_N : slbit := '0';
52 signal I_FUSP_RXD : slbit := '1';
53 signal O_FUSP_TXD : slbit := '1';
54
55 signal RXD : slbit := '1';
56 signal TXD : slbit := '1';
57 signal SWI : slv8 := (others=>'0');
58 signal BTN : slv4 := (others=>'0');
59
60 signal FUSP_RTS_N : slbit := '0';
61 signal FUSP_CTS_N : slbit := '0';
62 signal FUSP_RXD : slbit := '1';
63 signal FUSP_TXD : slbit := '1';
64
65 constant clock_period : Delay_length := 20 ns;
66 constant clock_offset : Delay_length := 200 ns;
67 constant delay_time : Delay_length := 2 ns;
68
69begin
70
71 SYSCLK : simclk
72 generic map (
75 port map (
76 CLK => CLK50
77 );
78
79 DCM_S : dcm_sfs
80 generic map (
81 CLKFX_DIVIDE => 5,
82 CLKFX_MULTIPLY => 6,
83 CLKIN_PERIOD => 20.0)
84 port map (
85 CLKIN => CLK50,
86 CLKFX => CLKS,
87 LOCKED => open
88 );
89
90 UUT : entity work.sys_tst_serloop_s3
91 port map (
92 I_CLK50 => CLK50,
93 I_RXD => I_RXD,
94 O_TXD => O_TXD,
95 I_SWI => I_SWI,
96 I_BTN => I_BTN,
97 O_LED => open,
98 O_ANO_N => open,
99 O_SEG_N => open,
100 O_MEM_CE_N => open,
101 O_MEM_BE_N => open,
102 O_MEM_WE_N => open,
103 O_MEM_OE_N => open,
104 O_MEM_ADDR => open,
105 IO_MEM_DATA => open,
110 );
111
112 GENTB : entity work.tb_tst_serloop
113 port map (
114 CLKS => CLKS,
115 CLKH => CLKS,
116 P0_RXD => RXD,
117 P0_TXD => TXD,
118 P0_RTS_N => '0',
119 P0_CTS_N => open,
120 P1_RXD => FUSP_RXD,
121 P1_TXD => FUSP_TXD,
124 SWI => SWI,
125 BTN => BTN
126 );
127
128 I_RXD <= RXD after delay_time;
129 TXD <= O_TXD after delay_time;
134
135 I_SWI <= SWI after delay_time;
136 I_BTN <= BTN after delay_time;
137
138end sim;
CLKFX_DIVIDE positive := 1
in CLKIN slbit
CLKFX_MULTIPLY positive := 1
out LOCKED slbit
CLKIN_PERIOD real := 20.0
out CLKFX slbit
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