1 |
5 |
ktt1 |
--------------------------------------------------------------------------------
|
2 |
|
|
-- _ _ __ ____ --
|
3 |
|
|
-- / / | | / _| | __| --
|
4 |
|
|
-- | |_| | _ _ / / | |_ --
|
5 |
|
|
-- | _ | | | | | | | | _| --
|
6 |
|
|
-- | | | | | |_| | \ \_ | |__ --
|
7 |
|
|
-- |_| |_| \_____| \__| |____| microLab --
|
8 |
|
|
-- --
|
9 |
|
|
-- Bern University of Applied Sciences (BFH) --
|
10 |
|
|
-- Quellgasse 21 --
|
11 |
|
|
-- Room HG 4.33 --
|
12 |
|
|
-- 2501 Biel/Bienne --
|
13 |
|
|
-- Switzerland --
|
14 |
|
|
-- --
|
15 |
|
|
-- http://www.microlab.ch --
|
16 |
|
|
--------------------------------------------------------------------------------
|
17 |
|
|
-- GECKO4com
|
18 |
|
|
--
|
19 |
|
|
-- 2010/2011 Dr. Theo Kluter
|
20 |
|
|
--
|
21 |
|
|
-- This VHDL code is free code: you can redistribute it and/or modify
|
22 |
|
|
-- it under the terms of the GNU General Public License as published by
|
23 |
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
24 |
|
|
-- (at your option) any later version.
|
25 |
|
|
--
|
26 |
|
|
-- This VHDL code is distributed in the hope that it will be useful,
|
27 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
28 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
29 |
|
|
-- GNU General Public License for more details.
|
30 |
|
|
-- You should have received a copy of the GNU General Public License
|
31 |
|
|
-- along with these sources. If not, see <http://www.gnu.org/licenses/>.
|
32 |
|
|
--
|
33 |
|
|
|
34 |
|
|
LIBRARY ieee;
|
35 |
|
|
USE ieee.std_logic_1164.all;
|
36 |
|
|
USE ieee.std_logic_arith.all;
|
37 |
|
|
|
38 |
|
|
ENTITY xc3s200an_top IS
|
39 |
|
|
PORT ( clock_25MHz : IN std_logic;
|
40 |
|
|
clock_16MHz : IN std_logic;
|
41 |
|
|
|
42 |
|
|
user_clock_1_in : IN std_logic;
|
43 |
|
|
user_clock_1_fb : IN std_logic;
|
44 |
|
|
user_clock_2_in : IN std_logic;
|
45 |
|
|
user_clock_2_fb : IN std_logic;
|
46 |
|
|
|
47 |
|
|
user_clock_1_out : OUT std_logic;
|
48 |
|
|
user_clock_2_out : OUT std_logic;
|
49 |
|
|
clock_25MHz_out : OUT std_logic;
|
50 |
|
|
clock_48MHz_out : OUT std_logic;
|
51 |
|
|
|
52 |
|
|
user_clock_1_lock : OUT std_logic;
|
53 |
|
|
user_clock_2_lock : OUT std_logic;
|
54 |
|
|
|
55 |
|
|
jtag_ndet : IN std_logic;
|
56 |
|
|
|
57 |
|
|
fx2_clk : OUT std_logic;
|
58 |
|
|
|
59 |
|
|
leds_a : OUT std_logic_vector( 7 DOWNTO 0 );
|
60 |
|
|
leds_k : OUT std_logic_vector( 7 DOWNTO 0 );
|
61 |
|
|
|
62 |
|
|
flash_address : OUT std_logic_vector( 19 DOWNTO 0 );
|
63 |
|
|
flash_data : INOUT std_logic_vector( 15 DOWNTO 0 );
|
64 |
|
|
flash_n_byte : OUT std_logic;
|
65 |
|
|
flash_n_ce : OUT std_logic;
|
66 |
|
|
flash_n_oe : OUT std_logic;
|
67 |
|
|
flash_n_we : OUT std_logic;
|
68 |
|
|
flash_ready_n_busy : IN std_logic;
|
69 |
|
|
|
70 |
|
|
SDA : INOUT std_logic;
|
71 |
|
|
SCL : IN std_logic;
|
72 |
|
|
|
73 |
|
|
-- FX2 Interface
|
74 |
|
|
fx2_n_int0 : OUT std_logic;
|
75 |
|
|
fx2_pa1 : IN std_logic; -- 0 when fx2 is ready
|
76 |
|
|
fx2_pa3 : IN std_logic; -- 1 full_speed 0 high-speed
|
77 |
|
|
fx2_flaga : IN std_logic; -- ep8 fifo n_empty flag
|
78 |
|
|
fx2_flagb : IN std_logic; -- ep6 fifo n_full flag
|
79 |
|
|
-- fx2_flagc : IN std_logic; -- ep6 fifo n_full flag
|
80 |
|
|
|
81 |
|
|
fx2_data : INOUT std_logic_vector( 7 DOWNTO 0 );
|
82 |
|
|
fx2_fifo_addr : OUT std_logic_vector( 1 DOWNTO 0 );
|
83 |
|
|
fx2_ifclock : OUT std_logic;
|
84 |
|
|
fx2_n_oe : OUT std_logic;
|
85 |
|
|
fx2_n_re : OUT std_logic;
|
86 |
|
|
fx2_n_we : OUT std_logic;
|
87 |
|
|
fx2_n_pkt_end : OUT std_logic;
|
88 |
|
|
|
89 |
|
|
fx2_data_nibble : OUT std_logic_vector( 3 DOWNTO 0 );
|
90 |
|
|
fx2_data_select : IN std_logic_vector( 3 DOWNTO 0 );
|
91 |
|
|
|
92 |
|
|
-- power sensing interface
|
93 |
|
|
n_usb_power : IN std_logic;
|
94 |
|
|
n_bus_power : IN std_logic;
|
95 |
|
|
n_usb_charge : IN std_logic;
|
96 |
|
|
|
97 |
|
|
-- Switches
|
98 |
|
|
n_hex_switch : IN std_logic_vector( 3 DOWNTO 0 );
|
99 |
|
|
button1 : IN std_logic;
|
100 |
|
|
button2 : IN std_logic;
|
101 |
|
|
button3 : IN std_logic;
|
102 |
|
|
|
103 |
|
|
-- fpga interface
|
104 |
|
|
fpga_done : IN std_logic;
|
105 |
|
|
fpga_busy : IN std_logic;
|
106 |
|
|
fpga_n_init : IN std_logic;
|
107 |
|
|
fpga_n_prog : OUT std_logic;
|
108 |
|
|
fpga_rd_n_wr : OUT std_logic;
|
109 |
|
|
fpga_n_cs : OUT std_logic;
|
110 |
|
|
fpga_cclk : OUT std_logic;
|
111 |
|
|
fpga_data : INOUT std_logic_vector( 7 DOWNTO 0 );
|
112 |
|
|
|
113 |
|
|
-- RS232 passthrough
|
114 |
|
|
RxD_in : IN std_logic;
|
115 |
|
|
RxD_out : OUT std_logic;
|
116 |
|
|
TxD_in : IN std_logic;
|
117 |
|
|
TxD_out : OUT std_logic;
|
118 |
|
|
|
119 |
|
|
-- Signals for transparent mode
|
120 |
|
|
scpi_disabled : OUT std_logic;
|
121 |
|
|
ESB_bit : IN std_logic;
|
122 |
|
|
STATUS3_bit : IN std_logic;
|
123 |
|
|
|
124 |
|
|
-- reset interface
|
125 |
|
|
n_reset_system : INOUT std_logic;
|
126 |
|
|
|
127 |
|
|
-- bus interface
|
128 |
|
|
bus_reset : IN std_logic;
|
129 |
|
|
bus_n_start_transmission : IN std_logic;
|
130 |
|
|
bus_n_end_transmission : INOUT std_logic;
|
131 |
|
|
bus_n_data_valid : INOUT std_logic_vector( 1 DOWNTO 0 );
|
132 |
|
|
bus_data_addr_cntrl : INOUT std_logic_vector(15 DOWNTO 0 );
|
133 |
|
|
bus_n_start_send : OUT std_logic;
|
134 |
|
|
bus_n_error : OUT std_logic;
|
135 |
|
|
data_request_irq : OUT std_logic;
|
136 |
|
|
data_available_irq : OUT std_logic;
|
137 |
|
|
error_irq : OUT std_logic;
|
138 |
|
|
user_n_reset : OUT std_logic;
|
139 |
|
|
|
140 |
|
|
-- vga interface
|
141 |
|
|
red : OUT std_logic;
|
142 |
|
|
green : OUT std_logic;
|
143 |
|
|
blue : OUT std_logic;
|
144 |
|
|
hsync : OUT std_logic;
|
145 |
|
|
vsync : OUT std_logic);
|
146 |
|
|
END xc3s200an_top;
|