1 |
29 |
wfjm |
-- $Id: s3boardlib.vhd 649 2015-02-21 21:10:16Z mueller $
|
2 |
2 |
wfjm |
--
|
3 |
12 |
wfjm |
-- Copyright 2007-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
4 |
2 |
wfjm |
--
|
5 |
|
|
-- This program is free software; you may redistribute and/or modify it under
|
6 |
|
|
-- the terms of the GNU General Public License as published by the Free
|
7 |
|
|
-- Software Foundation, either version 2, or at your option any later version.
|
8 |
|
|
--
|
9 |
|
|
-- This program is distributed in the hope that it will be useful, but
|
10 |
|
|
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
11 |
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
12 |
|
|
-- for complete details.
|
13 |
|
|
--
|
14 |
|
|
------------------------------------------------------------------------------
|
15 |
|
|
-- Package Name: s3boardlib
|
16 |
|
|
-- Description: S3BOARD components
|
17 |
|
|
--
|
18 |
|
|
-- Dependencies: -
|
19 |
29 |
wfjm |
-- Tool versions: xst 8.1-14.7; ghdl 0.18-0.31
|
20 |
2 |
wfjm |
-- Revision History:
|
21 |
|
|
-- Date Rev Version Comment
|
22 |
12 |
wfjm |
-- 2011-07-09 391 1.3.5 move s3_rs232_iob_int_ext to bpgenlib
|
23 |
|
|
-- 2011-07-08 390 1.3.4 move s3_(dispdrv|humanio*) to bpgenlib
|
24 |
|
|
-- 2011-07-03 387 1.3.3 move s3_rs232_iob_(int|ext) to bpgenlib
|
25 |
9 |
wfjm |
-- 2010-12-30 351 1.3.2 use rblib; rename human s3_humanio_rri -> _rbus
|
26 |
8 |
wfjm |
-- 2010-11-06 336 1.3.1 rename input pin CLK -> I_CLK50
|
27 |
2 |
wfjm |
-- 2010-06-03 300 1.3 add s3_humanio_rri (now needs rrilib)
|
28 |
|
|
-- 2010-05-21 292 1.2.2 rename _PM1_ -> _FUSP_
|
29 |
|
|
-- 2010-05-16 291 1.2.1 rename memctl_s3sram -> s3_sram_memctl; _usp->_fusp
|
30 |
|
|
-- 2010-05-01 286 1.2 added s3board_usp_aif (base+pm1_rs232)
|
31 |
|
|
-- 2010-04-17 278 1.1.6 rename, prefix dispdrv,sram_summy with s3_;
|
32 |
|
|
-- add s3_rs232_iob_(int|ext|int_ext)
|
33 |
|
|
-- 2010-04-11 276 1.1.5 add DEBOUNCE for s3_humanio
|
34 |
|
|
-- 2010-04-10 275 1.1.4 add s3_humanio
|
35 |
|
|
-- 2008-02-17 117 1.1.3 memctl_s3sram: use req,we interface
|
36 |
|
|
-- 2008-01-20 113 1.1.2 rename memdrv -> memctl_s3sram
|
37 |
|
|
-- 2007-12-16 101 1.1.1 use _N for active low
|
38 |
|
|
-- 2007-12-09 100 1.1 add sram memory signals; sram_dummy; memdrv
|
39 |
|
|
-- 2007-09-23 84 1.0 Initial version
|
40 |
|
|
------------------------------------------------------------------------------
|
41 |
|
|
|
42 |
|
|
library ieee;
|
43 |
|
|
use ieee.std_logic_1164.all;
|
44 |
|
|
|
45 |
|
|
use work.slvtypes.all;
|
46 |
|
|
|
47 |
|
|
package s3boardlib is
|
48 |
|
|
|
49 |
|
|
component s3board_aif is -- S3BOARD, abstract iface, base
|
50 |
|
|
port (
|
51 |
8 |
wfjm |
I_CLK50 : in slbit; -- 50 MHz board clock
|
52 |
2 |
wfjm |
I_RXD : in slbit; -- receive data (board view)
|
53 |
|
|
O_TXD : out slbit; -- transmit data (board view)
|
54 |
|
|
I_SWI : in slv8; -- s3 switches
|
55 |
|
|
I_BTN : in slv4; -- s3 buttons
|
56 |
|
|
O_LED : out slv8; -- s3 leds
|
57 |
|
|
O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low)
|
58 |
|
|
O_SEG_N : out slv8; -- 7 segment disp: segments (act.low)
|
59 |
|
|
O_MEM_CE_N : out slv2; -- sram: chip enables (act.low)
|
60 |
|
|
O_MEM_BE_N : out slv4; -- sram: byte enables (act.low)
|
61 |
|
|
O_MEM_WE_N : out slbit; -- sram: write enable (act.low)
|
62 |
|
|
O_MEM_OE_N : out slbit; -- sram: output enable (act.low)
|
63 |
|
|
O_MEM_ADDR : out slv18; -- sram: address lines
|
64 |
|
|
IO_MEM_DATA : inout slv32 -- sram: data lines
|
65 |
|
|
);
|
66 |
|
|
end component;
|
67 |
|
|
|
68 |
|
|
component s3board_fusp_aif is -- S3BOARD, abstract iface, base+fusp
|
69 |
|
|
port (
|
70 |
8 |
wfjm |
I_CLK50 : in slbit; -- 50 MHz board clock
|
71 |
2 |
wfjm |
I_RXD : in slbit; -- receive data (board view)
|
72 |
|
|
O_TXD : out slbit; -- transmit data (board view)
|
73 |
|
|
I_SWI : in slv8; -- s3 switches
|
74 |
|
|
I_BTN : in slv4; -- s3 buttons
|
75 |
|
|
O_LED : out slv8; -- s3 leds
|
76 |
|
|
O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low)
|
77 |
|
|
O_SEG_N : out slv8; -- 7 segment disp: segments (act.low)
|
78 |
|
|
O_MEM_CE_N : out slv2; -- sram: chip enables (act.low)
|
79 |
|
|
O_MEM_BE_N : out slv4; -- sram: byte enables (act.low)
|
80 |
|
|
O_MEM_WE_N : out slbit; -- sram: write enable (act.low)
|
81 |
|
|
O_MEM_OE_N : out slbit; -- sram: output enable (act.low)
|
82 |
|
|
O_MEM_ADDR : out slv18; -- sram: address lines
|
83 |
|
|
IO_MEM_DATA : inout slv32; -- sram: data lines
|
84 |
|
|
O_FUSP_RTS_N : out slbit; -- fusp: rs232 rts_n
|
85 |
|
|
I_FUSP_CTS_N : in slbit; -- fusp: rs232 cts_n
|
86 |
|
|
I_FUSP_RXD : in slbit; -- fusp: rs232 rx
|
87 |
|
|
O_FUSP_TXD : out slbit -- fusp: rs232 tx
|
88 |
|
|
);
|
89 |
|
|
end component;
|
90 |
|
|
|
91 |
|
|
component s3_sram_dummy is -- SRAM protection dummy
|
92 |
|
|
port (
|
93 |
|
|
O_MEM_CE_N : out slv2; -- sram: chip enables (act.low)
|
94 |
|
|
O_MEM_BE_N : out slv4; -- sram: byte enables (act.low)
|
95 |
|
|
O_MEM_WE_N : out slbit; -- sram: write enable (act.low)
|
96 |
|
|
O_MEM_OE_N : out slbit; -- sram: output enable (act.low)
|
97 |
|
|
O_MEM_ADDR : out slv18; -- sram: address lines
|
98 |
|
|
IO_MEM_DATA : inout slv32 -- sram: data lines
|
99 |
|
|
);
|
100 |
|
|
end component;
|
101 |
|
|
|
102 |
|
|
component s3_sram_memctl is -- SRAM driver
|
103 |
|
|
port (
|
104 |
|
|
CLK : in slbit; -- clock
|
105 |
|
|
RESET : in slbit; -- reset
|
106 |
|
|
REQ : in slbit; -- request
|
107 |
|
|
WE : in slbit; -- write enable
|
108 |
|
|
BUSY : out slbit; -- controller busy
|
109 |
|
|
ACK_R : out slbit; -- acknowledge read
|
110 |
|
|
ACK_W : out slbit; -- acknowledge write
|
111 |
|
|
ACT_R : out slbit; -- signal active read
|
112 |
|
|
ACT_W : out slbit; -- signal active write
|
113 |
|
|
ADDR : in slv18; -- address
|
114 |
|
|
BE : in slv4; -- byte enable
|
115 |
|
|
DI : in slv32; -- data in (memory view)
|
116 |
|
|
DO : out slv32; -- data out (memory view)
|
117 |
|
|
O_MEM_CE_N : out slv2; -- sram: chip enables (act.low)
|
118 |
|
|
O_MEM_BE_N : out slv4; -- sram: byte enables (act.low)
|
119 |
|
|
O_MEM_WE_N : out slbit; -- sram: write enable (act.low)
|
120 |
|
|
O_MEM_OE_N : out slbit; -- sram: output enable (act.low)
|
121 |
|
|
O_MEM_ADDR : out slv18; -- sram: address lines
|
122 |
|
|
IO_MEM_DATA : inout slv32 -- sram: data lines
|
123 |
|
|
);
|
124 |
|
|
end component;
|
125 |
|
|
|
126 |
12 |
wfjm |
end package s3boardlib;
|