w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
sys_tst_snhumanio_n3.vhd
Go to the documentation of this file.
1-- $Id: sys_tst_snhumanio_n3.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: sys_tst_snhumanio_n3 - syn
7-- Description: snhumanio tester design for nexys3
8--
9-- Dependencies: vlib/genlib/clkdivce
10-- bplib/bpgen/sn_humanio
11-- tst_snhumanio
12-- vlib/nxcramlib/nx_cram_dummy
13--
14-- Test bench: -
15--
16-- Target Devices: generic
17-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.31
18--
19-- Synthesized (xst):
20-- Date Rev ise Target flop lutl lutm slic t peri
21-- 2011-11-27 433 13.1 O40d xc3s1200e-4 151 195 - 65 t 6.1
22--
23-- Revision History:
24-- Date Rev Version Comment
25-- 2011-11-27 433 1.0 Initial version
26------------------------------------------------------------------------------
27-- Usage of Nexys 3 Switches, Buttons, LEDs:
28--
29
30library ieee;
31use ieee.std_logic_1164.all;
32
33use work.slvtypes.all;
34use work.genlib.all;
35use work.bpgenlib.all;
36use work.nxcramlib.all;
37use work.sys_conf.all;
38
39-- ----------------------------------------------------------------------------
40
41entity sys_tst_snhumanio_n3 is -- top level
42 -- implements nexys3_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 I_SWI : in slv8; -- n3 switches
48 I_BTN : in slv5; -- n3 buttons
49 O_LED : out slv8; -- n3 leds
50 O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low)
51 O_SEG_N : out slv8; -- 7 segment disp: segments (act.low)
52 O_MEM_CE_N : out slbit; -- cram: chip enable (act.low)
53 O_MEM_BE_N : out slv2; -- cram: byte enables (act.low)
54 O_MEM_WE_N : out slbit; -- cram: write enable (act.low)
55 O_MEM_OE_N : out slbit; -- cram: output enable (act.low)
56 O_MEM_ADV_N : out slbit; -- cram: address valid (act.low)
57 O_MEM_CLK : out slbit; -- cram: clock
58 O_MEM_CRE : out slbit; -- cram: command register enable
59 I_MEM_WAIT : in slbit; -- cram: mem wait
60 O_MEM_ADDR : out slv23; -- cram: address lines
61 IO_MEM_DATA : inout slv16; -- cram: data lines
62 O_PPCM_CE_N : out slbit; -- ppcm: ...
63 O_PPCM_RST_N : out slbit -- ppcm: ...
64 );
66
67architecture syn of sys_tst_snhumanio_n3 is
68
69 signal CLK : slbit := '0';
70
71 signal SWI : slv8 := (others=>'0');
72 signal BTN : slv5 := (others=>'0');
73 signal LED : slv8 := (others=>'0');
74 signal DSP_DAT : slv16 := (others=>'0');
75 signal DSP_DP : slv4 := (others=>'0');
76
77 signal RESET : slbit := '0';
78 signal CE_MSEC : slbit := '0';
79
80begin
81
82 RESET <= '0'; -- so far not used
83
84 CLK <= I_CLK100;
85
86 CLKDIV : clkdivce
87 generic map (
88 CDUWIDTH => 7,
89 USECDIV => 100,
90 MSECDIV => 1000)
91 port map (
92 CLK => CLK,
93 CE_USEC => open,
95 );
96
97 HIO : sn_humanio
98 generic map (
99 BWIDTH => 5,
100 DEBOUNCE => sys_conf_hio_debounce)
101 port map (
102 CLK => CLK,
103 RESET => RESET,
104 CE_MSEC => CE_MSEC,
105 SWI => SWI,
106 BTN => BTN,
107 LED => LED,
108 DSP_DAT => DSP_DAT,
109 DSP_DP => DSP_DP,
110 I_SWI => I_SWI,
111 I_BTN => I_BTN,
112 O_LED => O_LED,
113 O_ANO_N => O_ANO_N,
115 );
116
117 HIOTEST : entity work.tst_snhumanio
118 generic map (
119 BWIDTH => 5)
120 port map (
121 CLK => CLK,
122 RESET => RESET,
123 CE_MSEC => CE_MSEC,
124 SWI => SWI,
125 BTN => BTN,
126 LED => LED,
127 DSP_DAT => DSP_DAT,
128 DSP_DP => DSP_DP
129 );
130
131 O_TXD <= I_RXD;
132
133 SRAM_PROT : nx_cram_dummy -- connect CRAM to protection dummy
134 port map (
135 O_MEM_CE_N => O_MEM_CE_N,
136 O_MEM_BE_N => O_MEM_BE_N,
137 O_MEM_WE_N => O_MEM_WE_N,
138 O_MEM_OE_N => O_MEM_OE_N,
139 O_MEM_ADV_N => O_MEM_ADV_N,
140 O_MEM_CLK => O_MEM_CLK,
141 O_MEM_CRE => O_MEM_CRE,
142 I_MEM_WAIT => I_MEM_WAIT,
143 O_MEM_ADDR => O_MEM_ADDR,
144 IO_MEM_DATA => IO_MEM_DATA
145 );
146
147 O_PPCM_CE_N <= '1'; -- keep parallel PCM memory disabled
148 O_PPCM_RST_N <= '1'; --
149
150end 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( 22 downto 0) slv23
Definition: slvtypes.vhd:56
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
std_logic_vector( 1 downto 0) slv2
Definition: slvtypes.vhd:34
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