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 flash_if IS
|
39 |
|
|
PORT ( clock : IN std_logic;
|
40 |
|
|
reset : IN std_logic;
|
41 |
|
|
msec_tick : IN std_logic;
|
42 |
|
|
|
43 |
|
|
-- here the control interface is defined
|
44 |
|
|
start_erase : IN std_logic;
|
45 |
|
|
start_read : IN std_logic;
|
46 |
|
|
start_write : IN std_logic;
|
47 |
|
|
done : OUT std_logic;
|
48 |
|
|
flash_present : OUT std_logic;
|
49 |
|
|
flash_s1_empty : OUT std_logic;
|
50 |
|
|
flash_idle : OUT std_logic;
|
51 |
|
|
size_error : OUT std_logic;
|
52 |
|
|
flash_n_busy : OUT std_logic;
|
53 |
|
|
start_config : OUT std_logic;
|
54 |
|
|
|
55 |
|
|
-- here the push fifo interface is defined
|
56 |
|
|
push : OUT std_logic;
|
57 |
|
|
push_data : OUT std_logic_vector( 7 DOWNTO 0 );
|
58 |
|
|
push_size : OUT std_logic;
|
59 |
|
|
push_last : OUT std_logic;
|
60 |
|
|
fifo_full : IN std_logic;
|
61 |
|
|
|
62 |
|
|
-- here the write fifo is defined
|
63 |
|
|
bitfile_size : IN std_logic_vector( 31 DOWNTO 0 );
|
64 |
|
|
we_fifo : IN std_logic;
|
65 |
|
|
we_data : IN std_logic_vector( 7 DOWNTO 0 );
|
66 |
|
|
we_last : IN std_logic;
|
67 |
|
|
we_fifo_full : OUT std_logic;
|
68 |
|
|
|
69 |
|
|
-- Here the scpi interface is defined
|
70 |
|
|
start_command : IN std_logic;
|
71 |
|
|
command_id : IN std_logic_vector( 6 DOWNTO 0 );
|
72 |
|
|
scpi_pop : OUT std_logic;
|
73 |
|
|
scpi_pop_data : IN std_logic_vector( 7 DOWNTO 0 );
|
74 |
|
|
scpi_pop_last : IN std_logic;
|
75 |
|
|
scpi_empty : IN std_logic;
|
76 |
|
|
scpi_push : OUT std_logic;
|
77 |
|
|
scpi_push_data : OUT std_logic_vector( 7 DOWNTO 0 );
|
78 |
|
|
scpi_push_size : OUT std_logic;
|
79 |
|
|
scpi_full : IN std_logic;
|
80 |
|
|
|
81 |
|
|
-- Here the vga interface is defined
|
82 |
|
|
we_char : OUT std_logic;
|
83 |
|
|
we_ascii : OUT std_logic_vector( 7 DOWNTO 0 );
|
84 |
|
|
we_addr : OUT std_logic_vector( 10 DOWNTO 0 );
|
85 |
|
|
|
86 |
|
|
-- define the flash interface
|
87 |
|
|
flash_address : OUT std_logic_vector( 19 DOWNTO 0 );
|
88 |
|
|
flash_data_in : IN std_logic_vector( 15 DOWNTO 0 );
|
89 |
|
|
flash_data_out : OUT std_logic_vector( 15 DOWNTO 0 );
|
90 |
|
|
flash_data_oe : OUT std_logic_vector( 15 DOWNTO 0 );
|
91 |
|
|
flash_n_byte : OUT std_logic;
|
92 |
|
|
flash_n_ce : OUT std_logic;
|
93 |
|
|
flash_n_oe : OUT std_logic;
|
94 |
|
|
flash_n_we : OUT std_logic;
|
95 |
|
|
flash_ready_n_busy : IN std_logic);
|
96 |
|
|
END flash_if;
|