w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
sys_tst_snhumanio_n4d.vhd
Go to the documentation of this file.
1-- $Id: sys_tst_snhumanio_n4d.vhd 1247 2022-07-06 07:04:33Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2017-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: sys_tst_snhumanio_n4d - syn
7-- Description: snhumanio tester design for nexys4d
8--
9-- Dependencies: vlib/genlib/clkdivce
10-- bplib/bpgen/sn_humanio
11-- tst_snhumanio
12--
13-- Test bench: -
14--
15-- Target Devices: generic
16-- Tool versions: viv 2016.2-2022.1; ghdl 0.31-2.0.0
17--
18-- Synthesized:
19-- Date Rev viv Target flop lutl lutm bram slic
20-- 2022-07-05 1247 2022.1 xc7a100t-1 154 164 0 0 67
21-- 2019-02-02 1108 2018.3 xc7a100t-1 154 187 0 0 74
22-- 2019-02-02 1108 2017.2 xc7a100t-1 154 185 0 0 68
23--
24-- Revision History:
25-- Date Rev Version Comment
26-- 2017-01-04 838 1.0 Initial version
27------------------------------------------------------------------------------
28-- Usage of Nexys 4DDR Switches, Buttons, LEDs:
29--
30
31library ieee;
32use ieee.std_logic_1164.all;
33
34use work.slvtypes.all;
35use work.genlib.all;
36use work.bpgenlib.all;
37use work.sys_conf.all;
38
39-- ----------------------------------------------------------------------------
40
41entity sys_tst_snhumanio_n4d is -- top level
42 -- implements nexys4d_aif
43 port (
44 I_CLK100 : in slbit; -- 100 MHz clock
45 I_RXD : in slbit; -- receive data (board view)
46 O_TXD : out slbit; -- transmit data (board view)
47 O_RTS_N : out slbit; -- rx rts (board view; act.low)
48 I_CTS_N : in slbit; -- tx cts (board view; act.low)
49 I_SWI : in slv16; -- n4d switches
50 I_BTN : in slv5; -- n4d buttons
51 I_BTNRST_N : in slbit; -- n4d reset button
52 O_LED : out slv16; -- n4d leds
53 O_RGBLED0 : out slv3; -- n4d rgb-led 0
54 O_RGBLED1 : out slv3; -- n4d rgb-led 1
55 O_ANO_N : out slv8; -- 7 segment disp: anodes (act.low)
56 O_SEG_N : out slv8 -- 7 segment disp: segments (act.low)
57 );
59
60architecture syn of sys_tst_snhumanio_n4d is
61
62 signal CLK : slbit := '0';
63
64 signal SWI : slv8 := (others=>'0');
65 signal BTN : slv5 := (others=>'0');
66 signal LED : slv8 := (others=>'0');
67 signal DSP_DAT : slv16 := (others=>'0');
68 signal DSP_DP : slv4 := (others=>'0');
69
70 signal RESET : slbit := '0';
71 signal CE_MSEC : slbit := '0';
72
73begin
74
75 RESET <= '0'; -- so far not used
76
77 CLK <= I_CLK100;
78
79 CLKDIV : clkdivce
80 generic map (
81 CDUWIDTH => 7,
82 USECDIV => 100,
83 MSECDIV => 1000)
84 port map (
85 CLK => CLK,
86 CE_USEC => open,
88 );
89
90 HIO : sn_humanio
91 generic map (
92 BWIDTH => 5,
93 DEBOUNCE => sys_conf_hio_debounce)
94 port map (
95 CLK => CLK,
96 RESET => RESET,
98 SWI => SWI,
99 BTN => BTN,
100 LED => LED,
101 DSP_DAT => DSP_DAT,
102 DSP_DP => DSP_DP,
103 I_SWI => I_SWI(7 downto 0),
104 I_BTN => I_BTN,
105 O_LED => O_LED(7 downto 0),
106 O_ANO_N => O_ANO_N(3 downto 0),
108 );
109
110 HIOTEST : entity work.tst_snhumanio
111 generic map (
112 BWIDTH => 5)
113 port map (
114 CLK => CLK,
115 RESET => RESET,
116 CE_MSEC => CE_MSEC,
117 SWI => SWI,
118 BTN => BTN,
119 LED => LED,
120 DSP_DAT => DSP_DAT,
121 DSP_DP => DSP_DP
122 );
123
124 O_TXD <= I_RXD;
125 O_RTS_N <= I_CTS_N;
126
127 O_LED(15 downto 8) <= not I_SWI(15 downto 8);
128 O_ANO_N(7 downto 4) <= (others=>'1');
129
130 O_RGBLED0 <= (others=>'0');
131 O_RGBLED1 <= (others=>not I_BTNRST_N);
132
133end syn;
out CE_MSEC slbit
Definition: clkdivce.vhd:39
USECDIV positive := 50
Definition: clkdivce.vhd:33
CDUWIDTH positive := 6
Definition: clkdivce.vhd:32
out CE_USEC slbit
Definition: clkdivce.vhd:37
MSECDIV positive := 1000
Definition: clkdivce.vhd:34
in CLK slbit
Definition: clkdivce.vhd:36
std_logic_vector( 3 downto 0) slv4
Definition: slvtypes.vhd:36
std_logic_vector( 4 downto 0) slv5
Definition: slvtypes.vhd:37
std_logic_vector( 2 downto 0) slv3
Definition: slvtypes.vhd:35
std_logic_vector( 15 downto 0) slv16
Definition: slvtypes.vhd:48
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 7 downto 0) slv8
Definition: slvtypes.vhd:40
in DSP_DP slv(( 2** DCWIDTH)- 1 downto 0)
Definition: sn_humanio.vhd:63
DEBOUNCE boolean := true
Definition: sn_humanio.vhd:54
out O_LED slv( LWIDTH- 1 downto 0)
Definition: sn_humanio.vhd:66
in DSP_DAT slv( 4*( 2** DCWIDTH)- 1 downto 0)
Definition: sn_humanio.vhd:62
out SWI slv( SWIDTH- 1 downto 0)
Definition: sn_humanio.vhd:59
in I_BTN slv( BWIDTH- 1 downto 0)
Definition: sn_humanio.vhd:65
in I_SWI slv( SWIDTH- 1 downto 0)
Definition: sn_humanio.vhd:64
out O_SEG_N slv8
Definition: sn_humanio.vhd:69
out BTN slv( BWIDTH- 1 downto 0)
Definition: sn_humanio.vhd:60
in CLK slbit
Definition: sn_humanio.vhd:56
BWIDTH positive := 4
Definition: sn_humanio.vhd:51
out O_ANO_N slv(( 2** DCWIDTH)- 1 downto 0)
Definition: sn_humanio.vhd:67
in LED slv( LWIDTH- 1 downto 0)
Definition: sn_humanio.vhd:61
in RESET slbit := '0'
Definition: sn_humanio.vhd:57
in CE_MSEC slbit
Definition: sn_humanio.vhd:58
slv16 :=( others => '0') DSP_DAT
slv8 :=( others => '0') LED
slv8 :=( others => '0') SWI
slv4 :=( others => '0') DSP_DP
slv5 :=( others => '0') BTN
in RESET slbit
out DSP_DP slv4
in CLK slbit
in BTN slv( BWIDTH- 1 downto 0)
BWIDTH positive := 4
out DSP_DAT slv16
out LED slv8
in CE_MSEC slbit