w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tb_tst_serloop2_b3.vhd
Go to the documentation of this file.
1-- $Id: tb_tst_serloop2_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_serloop2_b3 - sim
7-- Description: Test bench for sys_tst_serloop2_b3
8--
9-- Dependencies: simlib/simclk
10-- xlib/sfs_gsim_core
11-- sys_tst_serloop2_b3 [UUT]
12-- tb/tb_tst_serloop
13--
14-- To test: sys_tst_serloop2_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_serloop2_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_serloop2_b3 is
38
39 signal CLK100 : slbit := '0';
40
41 signal CLKS : slbit := '0';
42 signal CLKH : slbit := '0';
43
44 signal I_RXD : slbit := '1';
45 signal O_TXD : slbit := '1';
46 signal I_SWI : slv16 := (others=>'0');
47 signal I_BTN : slv5 := (others=>'0');
48
49 signal RXD : slbit := '1';
50 signal TXD : slbit := '1';
51 signal SWI : slv16 := (others=>'0');
52 signal BTN : slv5 := (others=>'0');
53
54 constant clock_period : Delay_length := 10 ns;
55 constant clock_offset : Delay_length := 200 ns;
56 constant delay_time : Delay_length := 2 ns;
57
58begin
59
60 SYSCLK : simclk
61 generic map (
64 port map (
65 CLK => CLK100
66 );
67
68 GEN_CLKSYS : sfs_gsim_core
69 generic map (
70 VCO_DIVIDE => sys_conf_clksys_vcodivide,
71 VCO_MULTIPLY => sys_conf_clksys_vcomultiply,
72 OUT_DIVIDE => sys_conf_clksys_outdivide)
73 port map (
74 CLKIN => CLK100,
75 CLKFX => CLKH,
76 LOCKED => open
77 );
78
79 GEN_CLKSER : sfs_gsim_core
80 generic map (
81 VCO_DIVIDE => sys_conf_clkser_vcodivide,
82 VCO_MULTIPLY => sys_conf_clkser_vcomultiply,
83 OUT_DIVIDE => sys_conf_clkser_outdivide)
84 port map (
85 CLKIN => CLK100,
86 CLKFX => CLKS,
87 LOCKED => open
88 );
89
90 UUT : entity work.sys_tst_serloop2_b3
91 port map (
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 );
101
102 GENTB : entity work.tb_tst_serloop
103 port map (
104 CLKS => CLKS,
105 CLKH => CLKH,
106 P0_RXD => RXD,
107 P0_TXD => TXD,
108 P0_RTS_N => '0',
109 P0_CTS_N => open,
110 P1_RXD => open, -- port 1 unused for b3 !
111 P1_TXD => '0',
112 P1_RTS_N => '0',
113 P1_CTS_N => open,
114 SWI => SWI(7 downto 0),
115 BTN => BTN(3 downto 0)
116 );
117
118 I_RXD <= RXD after delay_time;
119 TXD <= O_TXD after delay_time;
120
121 I_SWI <= SWI after delay_time;
122 I_BTN <= BTN after delay_time;
123
124end 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