w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tb_tst_serloop1_b3.vhd
Go to the documentation of this file.
1-- $Id: tb_tst_serloop1_b3.vhd 1369 2023-02-08 18:59:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2023- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: tb_tst_serloop1_b3 - sim
7-- Description: Test bench for sys_tst_serloop1_b3
8--
9-- Dependencies: simlib/simclk
10-- xlib/sfs_gsim_core
11-- sys_tst_serloop1_b3 [UUT]
12-- tb/tb_tst_serloop
13--
14-- To test: sys_tst_serloop1_b3
15--
16-- Target Devices: generic
17--
18-- Revision History:
19-- Date Rev Version Comment
20-- 2023-02-07 1369 1.0 Initial version (cloned from tb_tst_serloop1_n4)
21------------------------------------------------------------------------------
22
23library ieee;
24use ieee.std_logic_1164.all;
25use ieee.numeric_std.all;
26use ieee.std_logic_textio.all;
27use std.textio.all;
28
29use work.slvtypes.all;
30use work.xlib.all;
31use work.simlib.all;
32use work.sys_conf.all;
33
36
37architecture sim of tb_tst_serloop1_b3 is
38
39 signal CLK100 : slbit := '0';
40
41 signal CLK : slbit := '0';
42
43 signal I_RXD : slbit := '1';
44 signal O_TXD : slbit := '1';
45 signal I_SWI : slv16 := (others=>'0');
46 signal I_BTN : slv5 := (others=>'0');
47
48 signal RXD : slbit := '1';
49 signal TXD : slbit := '1';
50 signal SWI : slv16 := (others=>'0');
51 signal BTN : slv5 := (others=>'0');
52
53 constant clock_period : Delay_length := 10 ns;
54 constant clock_offset : Delay_length := 200 ns;
55 constant delay_time : Delay_length := 2 ns;
56
57begin
58
59 SYSCLK : simclk
60 generic map (
63 port map (
64 CLK => CLK100
65 );
66
67 GEN_CLKSYS : sfs_gsim_core
68 generic map (
69 VCO_DIVIDE => sys_conf_clksys_vcodivide,
70 VCO_MULTIPLY => sys_conf_clksys_vcomultiply,
71 OUT_DIVIDE => sys_conf_clksys_outdivide)
72 port map (
73 CLKIN => CLK100,
74 CLKFX => CLK,
75 LOCKED => open
76 );
77
78 UUT : entity work.sys_tst_serloop1_b3
79 port map (
81 I_RXD => I_RXD,
82 O_TXD => O_TXD,
83 I_SWI => I_SWI,
84 I_BTN => I_BTN,
85 O_LED => open,
86 O_ANO_N => open,
87 O_SEG_N => open
88 );
89
90 GENTB : entity work.tb_tst_serloop
91 port map (
92 CLKS => CLK,
93 CLKH => CLK,
94 P0_RXD => RXD,
95 P0_TXD => TXD,
96 P0_RTS_N => '0',
97 P0_CTS_N => open,
98 P1_RXD => open, -- port 1 unused for b3 !
99 P1_TXD => '0',
100 P1_RTS_N => '0',
101 P1_CTS_N => open,
102 SWI => SWI(7 downto 0),
103 BTN => BTN(3 downto 0)
104 );
105
106 I_RXD <= RXD after delay_time;
107 TXD <= O_TXD after delay_time;
108
109 I_SWI <= SWI after delay_time;
110 I_BTN <= BTN after delay_time;
111
112end sim;
VCO_DIVIDE positive := 1
OUT_DIVIDE positive := 1
in CLKIN slbit
VCO_MULTIPLY positive := 1
out LOCKED slbit
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( 4 downto 0) slv5
Definition: slvtypes.vhd:37
std_logic_vector( 15 downto 0) slv16
Definition: slvtypes.vhd:48
std_logic slbit
Definition: slvtypes.vhd:30
Delay_length := 2 ns delay_time
Delay_length := 10 ns clock_period
slv16 :=( others => '0') SWI
Delay_length := 200 ns clock_offset
slv5 :=( others => '0') I_BTN
slv5 :=( others => '0') BTN
slv16 :=( others => '0') I_SWI
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