w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
sys_tst_snhumanio_b3.vhd
Go to the documentation of this file.
1-- $Id: sys_tst_snhumanio_b3.vhd 1247 2022-07-06 07:04:33Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2015-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: sys_tst_snhumanio_b3 - syn
7-- Description: snhumanio tester design for basys3
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 2014.4-2022.1; ghdl 0.31-2.0.0
17--
18-- Synthesized (viv):
19-- Date Rev viv Target flop lutl lutm bram slic
20-- 2022--7-05 1247 2022.1 xc7a35t-1 154 161 0 0 67
21-- 2019-02-02 1108 2018.3 xc7a35t-1 154 187 0 0 75
22-- 2019-02-02 1108 2017.2 xc7a35t-1 154 184 0 0 69
23-- 2015-01-30 636 2014.4 xc7a35t-1 154 133 0 0 63
24--
25-- Revision History:
26-- Date Rev Version Comment
27-- 2015-01-16 636 1.0 Initial version
28------------------------------------------------------------------------------
29-- Usage of Basys 3 Switches, Buttons, LEDs:
30--
31
32library ieee;
33use ieee.std_logic_1164.all;
34
35use work.slvtypes.all;
36use work.genlib.all;
37use work.bpgenlib.all;
38use work.sys_conf.all;
39
40-- ----------------------------------------------------------------------------
41
42entity sys_tst_snhumanio_b3 is -- top level
43 -- implements basys3_aif
44 port (
45 I_CLK100 : in slbit; -- 100 MHz clock
46 I_RXD : in slbit; -- receive data (board view)
47 O_TXD : out slbit; -- transmit data (board view)
48 I_SWI : in slv16; -- b3 switches
49 I_BTN : in slv5; -- b3 buttons
50 O_LED : out slv16; -- b3 leds
51 O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low)
52 O_SEG_N : out slv8 -- 7 segment disp: segments (act.low)
53 );
55
56architecture syn of sys_tst_snhumanio_b3 is
57
58 signal CLK : slbit := '0';
59
60 signal SWI : slv8 := (others=>'0');
61 signal BTN : slv5 := (others=>'0');
62 signal LED : slv8 := (others=>'0');
63 signal DSP_DAT : slv16 := (others=>'0');
64 signal DSP_DP : slv4 := (others=>'0');
65
66 signal RESET : slbit := '0';
67 signal CE_MSEC : slbit := '0';
68
69begin
70
71 RESET <= '0'; -- so far not used
72
73 CLK <= I_CLK100;
74
75 CLKDIV : clkdivce
76 generic map (
77 CDUWIDTH => 7,
78 USECDIV => 100,
79 MSECDIV => 1000)
80 port map (
81 CLK => CLK,
82 CE_USEC => open,
84 );
85
86 HIO : sn_humanio
87 generic map (
88 BWIDTH => 5,
89 DEBOUNCE => sys_conf_hio_debounce)
90 port map (
91 CLK => CLK,
92 RESET => RESET,
94 SWI => SWI,
95 BTN => BTN,
96 LED => LED,
97 DSP_DAT => DSP_DAT,
98 DSP_DP => DSP_DP,
99 I_SWI => I_SWI(7 downto 0),
100 I_BTN => I_BTN,
101 O_LED => O_LED(7 downto 0),
102 O_ANO_N => O_ANO_N,
104 );
105
106 HIOTEST : entity work.tst_snhumanio
107 generic map (
108 BWIDTH => 5)
109 port map (
110 CLK => CLK,
111 RESET => RESET,
112 CE_MSEC => CE_MSEC,
113 SWI => SWI,
114 BTN => BTN,
115 LED => LED,
116 DSP_DAT => DSP_DAT,
117 DSP_DP => DSP_DP
118 );
119
120 O_TXD <= I_RXD;
121 O_LED(15 downto 8) <= not I_SWI(15 downto 8);
122
123end 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( 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