w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
sys_tst_snhumanio_s3.vhd
Go to the documentation of this file.
1-- $Id: sys_tst_snhumanio_s3.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_s3 - syn
7-- Description: snhumanio tester design for s3board
8--
9-- Dependencies: vlib/genlib/clkdivce
10-- bplib/bpgen/sn_humanio
11-- tst_snhumanio
12-- s3board/s3_sram_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-09-18 410 13.1 O40d xc3s1000-4 149 211 - 143 t 11.4
22--
23-- Revision History:
24-- Date Rev Version Comment
25-- 2011-10-25 419 1.0.2 get entity name right...
26-- 2011-10-15 416 1.0.1 remove O_CLKSYS top level port
27-- 2011-09-18 410 1.0 Initial version
28------------------------------------------------------------------------------
29-- Usage of S3BOARD 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.s3boardlib.all;
39use work.sys_conf.all;
40
41-- ----------------------------------------------------------------------------
42
43entity sys_tst_snhumanio_s3 is -- top level
44 -- implements s3board_aif
45 port (
46 I_CLK50 : in slbit; -- 50 MHz clock
47 I_RXD : in slbit; -- receive data (board view)
48 O_TXD : out slbit; -- transmit data (board view)
49 I_SWI : in slv8; -- s3 switches
50 I_BTN : in slv4; -- s3 buttons
51 O_LED : out slv8; -- s3 leds
52 O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low)
53 O_SEG_N : out slv8; -- 7 segment disp: segments (act.low)
54 O_MEM_CE_N : out slv2; -- sram: chip enables (act.low)
55 O_MEM_BE_N : out slv4; -- sram: byte enables (act.low)
56 O_MEM_WE_N : out slbit; -- sram: write enable (act.low)
57 O_MEM_OE_N : out slbit; -- sram: output enable (act.low)
58 O_MEM_ADDR : out slv18; -- sram: address lines
59 IO_MEM_DATA : inout slv32 -- sram: data lines
60 );
62
63architecture syn of sys_tst_snhumanio_s3 is
64
65 signal CLK : slbit := '0';
66
67 signal SWI : slv8 := (others=>'0');
68 signal BTN : slv4 := (others=>'0');
69 signal LED : slv8 := (others=>'0');
70 signal DSP_DAT : slv16 := (others=>'0');
71 signal DSP_DP : slv4 := (others=>'0');
72
73 signal RESET : slbit := '0';
74 signal CE_MSEC : slbit := '0';
75
76begin
77
78 RESET <= '0'; -- so far not used
79
80 CLK <= I_CLK50;
81
82 CLKDIV : clkdivce
83 generic map (
84 CDUWIDTH => 7,
85 USECDIV => 50,
86 MSECDIV => 1000)
87 port map (
88 CLK => CLK,
89 CE_USEC => open,
91 );
92
93 HIO : sn_humanio
94 generic map (
95 BWIDTH => 4,
96 DEBOUNCE => sys_conf_hio_debounce)
97 port map (
98 CLK => CLK,
99 RESET => RESET,
100 CE_MSEC => CE_MSEC,
101 SWI => SWI,
102 BTN => BTN,
103 LED => LED,
104 DSP_DAT => DSP_DAT,
105 DSP_DP => DSP_DP,
106 I_SWI => I_SWI,
107 I_BTN => I_BTN,
108 O_LED => O_LED,
109 O_ANO_N => O_ANO_N,
111 );
112
113 HIOTEST : entity work.tst_snhumanio
114 generic map (
115 BWIDTH => 4)
116 port map (
117 CLK => CLK,
118 RESET => RESET,
119 CE_MSEC => CE_MSEC,
120 SWI => SWI,
121 BTN => BTN,
122 LED => LED,
123 DSP_DAT => DSP_DAT,
124 DSP_DP => DSP_DP
125 );
126
127 O_TXD <= I_RXD;
128
129 SRAM_PROT : s3_sram_dummy -- connect SRAM to protection dummy
130 port map (
131 O_MEM_CE_N => O_MEM_CE_N,
132 O_MEM_BE_N => O_MEM_BE_N,
133 O_MEM_WE_N => O_MEM_WE_N,
134 O_MEM_OE_N => O_MEM_OE_N,
135 O_MEM_ADDR => O_MEM_ADDR,
136 IO_MEM_DATA => IO_MEM_DATA
137 );
138
139end 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( 17 downto 0) slv18
Definition: slvtypes.vhd:51
std_logic_vector( 31 downto 0) slv32
Definition: slvtypes.vhd:59
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
slv4 :=( 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