vertigo_vhdl 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/vertigo +7 -0
- data/lib/vertigo.rb +4 -0
- data/lib/vertigo/ast.rb +87 -0
- data/lib/vertigo/ast_vertigo_rkgen.rb +607 -0
- data/lib/vertigo/code.rb +57 -0
- data/lib/vertigo/compiler.rb +61 -0
- data/lib/vertigo/generic_lexer.rb +61 -0
- data/lib/vertigo/generic_parser.rb +44 -0
- data/lib/vertigo/indent.rb +20 -0
- data/lib/vertigo/lexer.rb +172 -0
- data/lib/vertigo/parser.rb +1458 -0
- data/lib/vertigo/pretty_printer.rb +749 -0
- data/lib/vertigo/runner.rb +115 -0
- data/lib/vertigo/tb_generator.rb +81 -0
- data/lib/vertigo/template.tb.vhd +72 -0
- data/lib/vertigo/token.rb +67 -0
- data/lib/vertigo/version.rb +3 -0
- data/lib/vertigo/vertigo.rkg +354 -0
- data/lib/vertigo/visitor_vertigo_rkgen.rb +447 -0
- data/tests/ghdl_tests/fsm.vhd +98 -0
- data/tests/ghdl_tests/fsm_synth.vhd +248 -0
- data/tests/ghdl_tests/test_fsm.vhd +162 -0
- data/tests/parser_tests/else.vhd +64 -0
- data/tests/parser_tests/test_MUST_fail.vhd +1 -0
- data/tests/parser_tests/test_accelerator.vhd +160 -0
- data/tests/parser_tests/test_accelerator_pp.vhd +144 -0
- data/tests/parser_tests/test_aggregate.vhd +17 -0
- data/tests/parser_tests/test_aggregate_pp.vhd +15 -0
- data/tests/parser_tests/test_archi_1.vhd +45 -0
- data/tests/parser_tests/test_archi_1_pp.vhd +41 -0
- data/tests/parser_tests/test_array_array_00.vhd +25 -0
- data/tests/parser_tests/test_array_array_00_pp.vhd +25 -0
- data/tests/parser_tests/test_array_urange.vhd +25 -0
- data/tests/parser_tests/test_array_urange_pp.vhd +25 -0
- data/tests/parser_tests/test_chu-1.vhd +80 -0
- data/tests/parser_tests/test_chu-1_pp.vhd +104 -0
- data/tests/parser_tests/test_concat.vhd +11 -0
- data/tests/parser_tests/test_concat_pp.vhd +14 -0
- data/tests/parser_tests/test_counter.vhd +35 -0
- data/tests/parser_tests/test_counter_pp.vhd +35 -0
- data/tests/parser_tests/test_de2.vhd +358 -0
- data/tests/parser_tests/test_de2_pp.vhd +274 -0
- data/tests/parser_tests/test_encode.vhd +2679 -0
- data/tests/parser_tests/test_encode_pp.vhd +2549 -0
- data/tests/parser_tests/test_fsm.vhd +162 -0
- data/tests/parser_tests/test_fsm_pp.vhd +125 -0
- data/tests/parser_tests/test_fsm_synth.vhd +248 -0
- data/tests/parser_tests/test_fsm_synth_pp.vhd +197 -0
- data/tests/parser_tests/test_function-01.vhd +33 -0
- data/tests/parser_tests/test_function-01_pp.vhd +18 -0
- data/tests/parser_tests/test_lfsr.vhd +75 -0
- data/tests/parser_tests/test_lfsr_pp.vhd +44 -0
- data/tests/parser_tests/test_microwatt_cache_ram.vhd +1 -0
- data/tests/parser_tests/test_microwatt_cache_ram_pp.vhd +68 -0
- data/tests/parser_tests/test_microwatt_common.vhd +1 -0
- data/tests/parser_tests/test_microwatt_common_pp.vhd +336 -0
- data/tests/parser_tests/test_microwatt_control.vhd +1 -0
- data/tests/parser_tests/test_microwatt_control_pp.vhd +187 -0
- data/tests/parser_tests/test_microwatt_core.vhd +1 -0
- data/tests/parser_tests/test_microwatt_core_debug.vhd +1 -0
- data/tests/parser_tests/test_microwatt_core_debug_pp.vhd +104 -0
- data/tests/parser_tests/test_microwatt_core_pp.vhd +231 -0
- data/tests/parser_tests/test_microwatt_core_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_core_tb_pp.vhd +43 -0
- data/tests/parser_tests/test_microwatt_countzero.vhd +1 -0
- data/tests/parser_tests/test_microwatt_countzero_pp.vhd +120 -0
- data/tests/parser_tests/test_microwatt_countzero_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_countzero_tb_pp.vhd +70 -0
- data/tests/parser_tests/test_microwatt_cr_file.vhd +1 -0
- data/tests/parser_tests/test_microwatt_cr_file_pp.vhd +74 -0
- data/tests/parser_tests/test_microwatt_cr_hazard.vhd +1 -0
- data/tests/parser_tests/test_microwatt_cr_hazard_pp.vhd +51 -0
- data/tests/parser_tests/test_microwatt_crhelpers.vhd +1 -0
- data/tests/parser_tests/test_microwatt_crhelpers_pp.vhd +48 -0
- data/tests/parser_tests/test_microwatt_dcache.vhd +1 -0
- data/tests/parser_tests/test_microwatt_dcache_pp.vhd +481 -0
- data/tests/parser_tests/test_microwatt_dcache_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_dcache_tb_pp.vhd +98 -0
- data/tests/parser_tests/test_microwatt_decode1.vhd +1 -0
- data/tests/parser_tests/test_microwatt_decode1_pp.vhd +138 -0
- data/tests/parser_tests/test_microwatt_decode2.vhd +1 -0
- data/tests/parser_tests/test_microwatt_decode2_pp.vhd +300 -0
- data/tests/parser_tests/test_microwatt_decode_types.vhd +1 -0
- data/tests/parser_tests/test_microwatt_decode_types_pp.vhd +67 -0
- data/tests/parser_tests/test_microwatt_divider.vhd +1 -0
- data/tests/parser_tests/test_microwatt_divider_pp.vhd +132 -0
- data/tests/parser_tests/test_microwatt_divider_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_divider_tb_pp.vhd +95 -0
- data/tests/parser_tests/test_microwatt_dmi_dtm_dummy.vhd +1 -0
- data/tests/parser_tests/test_microwatt_dmi_dtm_dummy_pp.vhd +29 -0
- data/tests/parser_tests/test_microwatt_dmi_dtm_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_dmi_dtm_tb_pp.vhd +197 -0
- data/tests/parser_tests/test_microwatt_dmi_dtm_xilinx.vhd +1 -0
- data/tests/parser_tests/test_microwatt_dmi_dtm_xilinx_pp.vhd +139 -0
- data/tests/parser_tests/test_microwatt_execute1.vhd +1 -0
- data/tests/parser_tests/test_microwatt_execute1_pp.vhd +689 -0
- data/tests/parser_tests/test_microwatt_fetch1.vhd +1 -0
- data/tests/parser_tests/test_microwatt_fetch1_pp.vhd +88 -0
- data/tests/parser_tests/test_microwatt_fetch2.vhd +1 -0
- data/tests/parser_tests/test_microwatt_fetch2_pp.vhd +79 -0
- data/tests/parser_tests/test_microwatt_glibc_random.vhd +1 -0
- data/tests/parser_tests/test_microwatt_glibc_random_helpers.vhd +1 -0
- data/tests/parser_tests/test_microwatt_glibc_random_helpers_pp.vhd +25 -0
- data/tests/parser_tests/test_microwatt_glibc_random_pp.vhd +41 -0
- data/tests/parser_tests/test_microwatt_gpr_hazard.vhd +1 -0
- data/tests/parser_tests/test_microwatt_gpr_hazard_pp.vhd +68 -0
- data/tests/parser_tests/test_microwatt_helpers.vhd +1 -0
- data/tests/parser_tests/test_microwatt_helpers_pp.vhd +153 -0
- data/tests/parser_tests/test_microwatt_icache.vhd +1 -0
- data/tests/parser_tests/test_microwatt_icache_pp.vhd +337 -0
- data/tests/parser_tests/test_microwatt_icache_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_icache_tb_pp.vhd +104 -0
- data/tests/parser_tests/test_microwatt_insn_helpers.vhd +1 -0
- data/tests/parser_tests/test_microwatt_insn_helpers_pp.vhd +208 -0
- data/tests/parser_tests/test_microwatt_loadstore1.vhd +1 -0
- data/tests/parser_tests/test_microwatt_loadstore1_pp.vhd +222 -0
- data/tests/parser_tests/test_microwatt_logical.vhd +1 -0
- data/tests/parser_tests/test_microwatt_logical_pp.vhd +87 -0
- data/tests/parser_tests/test_microwatt_multiply.vhd +1 -0
- data/tests/parser_tests/test_microwatt_multiply_pp.vhd +84 -0
- data/tests/parser_tests/test_microwatt_multiply_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_multiply_tb_pp.vhd +75 -0
- data/tests/parser_tests/test_microwatt_plru.vhd +1 -0
- data/tests/parser_tests/test_microwatt_plru_pp.vhd +46 -0
- data/tests/parser_tests/test_microwatt_plru_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_plru_tb_pp.vhd +93 -0
- data/tests/parser_tests/test_microwatt_ppc_fx_insns.vhd +1 -0
- data/tests/parser_tests/test_microwatt_ppc_fx_insns_pp.vhd +665 -0
- data/tests/parser_tests/test_microwatt_register_file.vhd +1 -0
- data/tests/parser_tests/test_microwatt_register_file_pp.vhd +86 -0
- data/tests/parser_tests/test_microwatt_rotator.vhd +1 -0
- data/tests/parser_tests/test_microwatt_rotator_pp.vhd +149 -0
- data/tests/parser_tests/test_microwatt_rotator_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_rotator_tb_pp.vhd +134 -0
- data/tests/parser_tests/test_microwatt_sim_bram.vhd +1 -0
- data/tests/parser_tests/test_microwatt_sim_bram_helpers.vhd +1 -0
- data/tests/parser_tests/test_microwatt_sim_bram_helpers_pp.vhd +52 -0
- data/tests/parser_tests/test_microwatt_sim_bram_pp.vhd +53 -0
- data/tests/parser_tests/test_microwatt_sim_console.vhd +1 -0
- data/tests/parser_tests/test_microwatt_sim_console_pp.vhd +43 -0
- data/tests/parser_tests/test_microwatt_sim_jtag.vhd +1 -0
- data/tests/parser_tests/test_microwatt_sim_jtag_pp.vhd +64 -0
- data/tests/parser_tests/test_microwatt_sim_jtag_socket.vhd +1 -0
- data/tests/parser_tests/test_microwatt_sim_jtag_socket_pp.vhd +36 -0
- data/tests/parser_tests/test_microwatt_sim_uart.vhd +1 -0
- data/tests/parser_tests/test_microwatt_sim_uart_pp.vhd +90 -0
- data/tests/parser_tests/test_microwatt_soc.vhd +1 -0
- data/tests/parser_tests/test_microwatt_soc_pp.vhd +195 -0
- data/tests/parser_tests/test_microwatt_utils.vhd +1 -0
- data/tests/parser_tests/test_microwatt_utils_pp.vhd +39 -0
- data/tests/parser_tests/test_microwatt_wishbone_arbiter.vhd +1 -0
- data/tests/parser_tests/test_microwatt_wishbone_arbiter_pp.vhd +54 -0
- data/tests/parser_tests/test_microwatt_wishbone_bram_tb.vhd +1 -0
- data/tests/parser_tests/test_microwatt_wishbone_bram_tb_pp.vhd +157 -0
- data/tests/parser_tests/test_microwatt_wishbone_bram_wrapper.vhd +1 -0
- data/tests/parser_tests/test_microwatt_wishbone_bram_wrapper_pp.vhd +62 -0
- data/tests/parser_tests/test_microwatt_wishbone_debug_master.vhd +1 -0
- data/tests/parser_tests/test_microwatt_wishbone_debug_master_pp.vhd +124 -0
- data/tests/parser_tests/test_microwatt_wishbone_types.vhd +1 -0
- data/tests/parser_tests/test_microwatt_wishbone_types_pp.vhd +38 -0
- data/tests/parser_tests/test_microwatt_writeback.vhd +1 -0
- data/tests/parser_tests/test_microwatt_writeback_pp.vhd +87 -0
- data/tests/parser_tests/test_package-1.vhd +68 -0
- data/tests/parser_tests/test_package-1_pp.vhd +53 -0
- data/tests/parser_tests/test_precedence.vhd +13 -0
- data/tests/parser_tests/test_precedence_pp.vhd +16 -0
- data/tests/parser_tests/test_selected_sig.vhd +14 -0
- data/tests/parser_tests/test_selected_sig_pp.vhd +10 -0
- data/tests/parser_tests/test_slice.vhd +15 -0
- data/tests/parser_tests/test_slice_pp.vhd +16 -0
- data/tests/parser_tests/test_tb-00.vhd +94 -0
- data/tests/parser_tests/test_tb-00_pp.vhd +71 -0
- data/tests/parser_tests/test_type_decl_02.vhd +9 -0
- data/tests/parser_tests/test_type_decl_02_pp.vhd +11 -0
- data/tests/parser_tests/test_use.vhd +7 -0
- data/tests/parser_tests/test_use_pp.vhd +10 -0
- data/tests/parser_tests/test_while_1.vhd +38 -0
- data/tests/parser_tests/test_while_1_pp.vhd +26 -0
- data/tests/parser_tests/test_with-00.vhd +21 -0
- data/tests/parser_tests/test_with-00_pp.vhd +12 -0
- data/tests/tb_gen_tests/test_accelerator.vhd +160 -0
- metadata +224 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
-- generated by Vertigo VHDL tool
|
|
2
|
+
library ieee;
|
|
3
|
+
use ieee.std_logic_1164.all;
|
|
4
|
+
architecture test_var of test is
|
|
5
|
+
begin
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
test : process
|
|
9
|
+
|
|
10
|
+
type testit is array(natural range <>) of boolean;
|
|
11
|
+
|
|
12
|
+
type mem is array(natural range <>,natural range <>) of std_logic;
|
|
13
|
+
variable tempcond : boolean := true;
|
|
14
|
+
variable ram2 : mem(0 to 7,0 to 7) := (
|
|
15
|
+
('0','0','0','0','0','0','0','0'),
|
|
16
|
+
('0','0','0','0','0','0','0','0'),
|
|
17
|
+
('0','0','0','0','0','0','0','0'),
|
|
18
|
+
('0','0','0','0','0','0','0','0'),
|
|
19
|
+
('0','0','0','0','0','0','0','0'),
|
|
20
|
+
('0','0','0','0','0','0','0','0'),
|
|
21
|
+
('0','0','0','0','0','0','0','0'),
|
|
22
|
+
('0','0','0','0','0','0','0','0'));
|
|
23
|
+
begin
|
|
24
|
+
end process;
|
|
25
|
+
end test_var;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
library ieee;
|
|
2
|
+
use ieee.std_logic_1164.all;
|
|
3
|
+
|
|
4
|
+
architecture test_var of test is
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
begin -- test_var
|
|
8
|
+
|
|
9
|
+
test : process
|
|
10
|
+
type TestIt is array(natural range <>) of boolean;
|
|
11
|
+
type Mem is array (natural range <>, natural range <>) of std_logic;
|
|
12
|
+
variable TempCond : boolean := true;
|
|
13
|
+
variable RAM2 : Mem (0 to 7, 0 to 7) :=
|
|
14
|
+
(('0', '0', '0', '0', '0', '0', '0', '0'),
|
|
15
|
+
('0', '0', '0', '0', '0', '0', '0', '0'),
|
|
16
|
+
('0', '0', '0', '0', '0', '0', '0', '0'),
|
|
17
|
+
('0', '0', '0', '0', '0', '0', '0', '0'),
|
|
18
|
+
('0', '0', '0', '0', '0', '0', '0', '0'),
|
|
19
|
+
('0', '0', '0', '0', '0', '0', '0', '0'),
|
|
20
|
+
('0', '0', '0', '0', '0', '0', '0', '0'),
|
|
21
|
+
('0', '0', '0', '0', '0', '0', '0', '0'));
|
|
22
|
+
begin -- process test
|
|
23
|
+
end process test;
|
|
24
|
+
|
|
25
|
+
end test_var;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
-- generated by Vertigo VHDL tool
|
|
2
|
+
library ieee;
|
|
3
|
+
use ieee.std_logic_1164.all;
|
|
4
|
+
architecture test_var of test is
|
|
5
|
+
begin
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
test : process
|
|
9
|
+
|
|
10
|
+
type testit is array(natural range <>) of boolean;
|
|
11
|
+
|
|
12
|
+
type mem is array(natural range <>,natural range <>) of std_logic;
|
|
13
|
+
variable tempcond : boolean := true;
|
|
14
|
+
variable ram2 : mem(0 to 7,0 to 7) := (
|
|
15
|
+
('0','0','0','0','0','0','0','0'),
|
|
16
|
+
('0','0','0','0','0','0','0','0'),
|
|
17
|
+
('0','0','0','0','0','0','0','0'),
|
|
18
|
+
('0','0','0','0','0','0','0','0'),
|
|
19
|
+
('0','0','0','0','0','0','0','0'),
|
|
20
|
+
('0','0','0','0','0','0','0','0'),
|
|
21
|
+
('0','0','0','0','0','0','0','0'),
|
|
22
|
+
('0','0','0','0','0','0','0','0'));
|
|
23
|
+
begin
|
|
24
|
+
end process;
|
|
25
|
+
end test_var;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
library ieee;
|
|
2
|
+
use ieee.std_logic_1164.all;
|
|
3
|
+
use ieee.numeric_std.all;
|
|
4
|
+
|
|
5
|
+
entity ram_ctrl_test is
|
|
6
|
+
port(
|
|
7
|
+
clk, reset: in std_logic;
|
|
8
|
+
sw: in std_logic_vector(7 downto 0);
|
|
9
|
+
btn: in std_logic_vector(2 downto 0);
|
|
10
|
+
led: out std_logic_vector(7 downto 0);
|
|
11
|
+
ad: out std_logic_vector(17 downto 0);
|
|
12
|
+
we_n, oe_n: out std_logic;
|
|
13
|
+
dio_a: inout std_logic_vector(15 downto 0);
|
|
14
|
+
ce_a_n, ub_a_n, lb_a_n: out std_logic
|
|
15
|
+
);
|
|
16
|
+
end ram_ctrl_test;
|
|
17
|
+
|
|
18
|
+
architecture arch of ram_ctrl_test is
|
|
19
|
+
constant ADDR_W: integer:=18;
|
|
20
|
+
constant DATA_W: integer:=16;
|
|
21
|
+
signal addr: std_logic_vector(ADDR_W-1 downto 0);
|
|
22
|
+
signal data_f2s, data_s2f:
|
|
23
|
+
std_logic_vector(DATA_W-1 downto 0);
|
|
24
|
+
signal mem, rw: std_logic;
|
|
25
|
+
signal data_reg: std_logic_vector(7 downto 0);
|
|
26
|
+
signal db_btn: std_logic_vector(2 downto 0);
|
|
27
|
+
|
|
28
|
+
begin
|
|
29
|
+
ctrl_unit: entity work.sram_ctrl
|
|
30
|
+
port map(
|
|
31
|
+
clk=>clk, reset=>reset,
|
|
32
|
+
mem=>mem, rw =>rw, addr=>addr, data_f2s=>data_f2s,
|
|
33
|
+
ready=>open, data_s2f_r=>data_s2f,
|
|
34
|
+
data_s2f_ur=>open, ad=>ad,
|
|
35
|
+
we_n=>we_n, oe_n=>oe_n, dio_a=>dio_a,
|
|
36
|
+
ce_a_n=>ce_a_n, ub_a_n=>ub_a_n, lb_a_n=>lb_a_n);
|
|
37
|
+
|
|
38
|
+
debounce_unit0: entity work.debounce
|
|
39
|
+
port map(
|
|
40
|
+
clk=>clk, reset=>reset, sw=>btn(0),
|
|
41
|
+
db_level=>open, db_tick=>db_btn(0));
|
|
42
|
+
debounce_unit1: entity work.debounce
|
|
43
|
+
port map(
|
|
44
|
+
clk=>clk, reset=>reset, sw=>btn(1),
|
|
45
|
+
db_level=>open, db_tick=>db_btn(1));
|
|
46
|
+
debounce_unit2: entity work.debounce
|
|
47
|
+
port map(
|
|
48
|
+
clk=>clk, reset=>reset, sw=>btn(2),
|
|
49
|
+
db_level=>open, db_tick=>db_btn(2));
|
|
50
|
+
|
|
51
|
+
--data registers
|
|
52
|
+
process(clk)
|
|
53
|
+
begin
|
|
54
|
+
if (clk'event and clk='1') then
|
|
55
|
+
if (db_btn(0)='1') then
|
|
56
|
+
data_reg <= sw;
|
|
57
|
+
end if;
|
|
58
|
+
end if;
|
|
59
|
+
end process;
|
|
60
|
+
-- address
|
|
61
|
+
addr <= "0000000000" & sw;
|
|
62
|
+
--
|
|
63
|
+
process(db_btn,data_reg)
|
|
64
|
+
begin
|
|
65
|
+
data_f2s <= (others=>'0');
|
|
66
|
+
if db_btn(1)='1' then -- write
|
|
67
|
+
mem <= '1';
|
|
68
|
+
rw <= '0';
|
|
69
|
+
data_f2s <= "00000000" & data_reg;
|
|
70
|
+
elsif db_btn(2)='1' then -- read
|
|
71
|
+
mem <= '1';
|
|
72
|
+
rw <= '1';
|
|
73
|
+
else
|
|
74
|
+
mem <= '0';
|
|
75
|
+
rw <= '1';
|
|
76
|
+
end if;
|
|
77
|
+
end process;
|
|
78
|
+
-- output
|
|
79
|
+
led <= data_s2f(7 downto 0);
|
|
80
|
+
end arch;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
-- generated by Vertigo VHDL tool
|
|
2
|
+
library ieee;
|
|
3
|
+
use ieee.std_logic_1164.all;
|
|
4
|
+
use ieee.numeric_std.all;
|
|
5
|
+
|
|
6
|
+
entity ram_ctrl_test is
|
|
7
|
+
port(
|
|
8
|
+
clk : in std_logic;
|
|
9
|
+
reset : in std_logic;
|
|
10
|
+
sw : in std_logic_vector(7 downto 0);
|
|
11
|
+
btn : in std_logic_vector(2 downto 0);
|
|
12
|
+
led : out std_logic_vector(7 downto 0);
|
|
13
|
+
ad : out std_logic_vector(17 downto 0);
|
|
14
|
+
we_n : out std_logic;
|
|
15
|
+
oe_n : out std_logic;
|
|
16
|
+
dio_a : inout std_logic_vector(15 downto 0);
|
|
17
|
+
ce_a_n : out std_logic;
|
|
18
|
+
ub_a_n : out std_logic;
|
|
19
|
+
lb_a_n : out std_logic);
|
|
20
|
+
end entity ram_ctrl_test;
|
|
21
|
+
|
|
22
|
+
architecture arch of ram_ctrl_test is
|
|
23
|
+
constant addr_w : integer := 18;
|
|
24
|
+
constant data_w : integer := 16;
|
|
25
|
+
signal addr : std_logic_vector(addr_w - 1 downto 0);
|
|
26
|
+
signal data_f2s : std_logic_vector(data_w - 1 downto 0);
|
|
27
|
+
signal data_s2f : std_logic_vector(data_w - 1 downto 0);
|
|
28
|
+
signal mem : std_logic;
|
|
29
|
+
signal rw : std_logic;
|
|
30
|
+
signal data_reg : std_logic_vector(7 downto 0);
|
|
31
|
+
signal db_btn : std_logic_vector(2 downto 0);
|
|
32
|
+
begin
|
|
33
|
+
|
|
34
|
+
ctrl_unit : entity work.sram_ctrl
|
|
35
|
+
port map(
|
|
36
|
+
clk => clk,
|
|
37
|
+
reset => reset,
|
|
38
|
+
mem => mem,
|
|
39
|
+
rw => rw,
|
|
40
|
+
addr => addr,
|
|
41
|
+
data_f2s => data_f2s,
|
|
42
|
+
ready => open,
|
|
43
|
+
data_s2f_r => data_s2f,
|
|
44
|
+
data_s2f_ur => open,
|
|
45
|
+
ad => ad,
|
|
46
|
+
we_n => we_n,
|
|
47
|
+
oe_n => oe_n,
|
|
48
|
+
dio_a => dio_a,
|
|
49
|
+
ce_a_n => ce_a_n,
|
|
50
|
+
ub_a_n => ub_a_n,
|
|
51
|
+
lb_a_n => lb_a_n);
|
|
52
|
+
|
|
53
|
+
debounce_unit0 : entity work.debounce
|
|
54
|
+
port map(
|
|
55
|
+
clk => clk,
|
|
56
|
+
reset => reset,
|
|
57
|
+
sw => btn(0),
|
|
58
|
+
db_level => open,
|
|
59
|
+
db_tick => db_btn(0));
|
|
60
|
+
|
|
61
|
+
debounce_unit1 : entity work.debounce
|
|
62
|
+
port map(
|
|
63
|
+
clk => clk,
|
|
64
|
+
reset => reset,
|
|
65
|
+
sw => btn(1),
|
|
66
|
+
db_level => open,
|
|
67
|
+
db_tick => db_btn(1));
|
|
68
|
+
|
|
69
|
+
debounce_unit2 : entity work.debounce
|
|
70
|
+
port map(
|
|
71
|
+
clk => clk,
|
|
72
|
+
reset => reset,
|
|
73
|
+
sw => btn(2),
|
|
74
|
+
db_level => open,
|
|
75
|
+
db_tick => db_btn(2));
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
process(clk)
|
|
79
|
+
begin
|
|
80
|
+
if (clk'event and clk = '1') then
|
|
81
|
+
if (db_btn(0) = '1') then
|
|
82
|
+
data_reg <= sw;
|
|
83
|
+
end if;
|
|
84
|
+
end if;
|
|
85
|
+
end process;
|
|
86
|
+
addr <= "0000000000" & sw;
|
|
87
|
+
|
|
88
|
+
process(db_btn,data_reg)
|
|
89
|
+
begin
|
|
90
|
+
data_f2s <= (others => '0');
|
|
91
|
+
if db_btn(1) = '1' then
|
|
92
|
+
mem <= '1';
|
|
93
|
+
rw <= '0';
|
|
94
|
+
data_f2s <= "00000000" & data_reg;
|
|
95
|
+
elsif db_btn(2) = '1' then
|
|
96
|
+
mem <= '1';
|
|
97
|
+
rw <= '1';
|
|
98
|
+
else
|
|
99
|
+
mem <= '0';
|
|
100
|
+
rw <= '1';
|
|
101
|
+
end if;
|
|
102
|
+
end process;
|
|
103
|
+
led <= data_s2f(7 downto 0);
|
|
104
|
+
end arch;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
library ieee;
|
|
2
|
+
use ieee.std_logic_1164.all;
|
|
3
|
+
use ieee.numeric_std.all;
|
|
4
|
+
|
|
5
|
+
entity counter is
|
|
6
|
+
generic (N : natural := 8);
|
|
7
|
+
port(
|
|
8
|
+
reset_n : in std_logic;
|
|
9
|
+
clk : in std_logic;
|
|
10
|
+
inc : in std_logic;
|
|
11
|
+
dec : in std_logic;
|
|
12
|
+
value : out signed(N-1 downto 0)
|
|
13
|
+
);
|
|
14
|
+
end entity;
|
|
15
|
+
|
|
16
|
+
architecture rtl of counter is
|
|
17
|
+
signal value_s : signed(N-1 downto 0);
|
|
18
|
+
begin
|
|
19
|
+
|
|
20
|
+
process(reset_n,clk)
|
|
21
|
+
begin
|
|
22
|
+
if reset_n='0' then
|
|
23
|
+
value_s <= to_signed(0,N);
|
|
24
|
+
elsif rising_edge(clk) then
|
|
25
|
+
if inc='1' then
|
|
26
|
+
value_s <= value_s + 1;
|
|
27
|
+
elsif dec='1' then
|
|
28
|
+
value_s <= value_s - 1;
|
|
29
|
+
end if;
|
|
30
|
+
end if;
|
|
31
|
+
end process;
|
|
32
|
+
|
|
33
|
+
value <= value_s;
|
|
34
|
+
|
|
35
|
+
end rtl;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
-- generated by Vertigo VHDL tool
|
|
2
|
+
library ieee;
|
|
3
|
+
use ieee.std_logic_1164.all;
|
|
4
|
+
use ieee.numeric_std.all;
|
|
5
|
+
|
|
6
|
+
entity counter is
|
|
7
|
+
generic(
|
|
8
|
+
n : natural8 := 8);
|
|
9
|
+
port(
|
|
10
|
+
reset_n : in std_logic;
|
|
11
|
+
clk : in std_logic;
|
|
12
|
+
inc : in std_logic;
|
|
13
|
+
dec : in std_logic;
|
|
14
|
+
value : out signed(n - 1 downto 0));
|
|
15
|
+
end entity counter;
|
|
16
|
+
|
|
17
|
+
architecture rtl of counter is
|
|
18
|
+
signal value_s : signed(n - 1 downto 0);
|
|
19
|
+
begin
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
process(reset_n,clk)
|
|
23
|
+
begin
|
|
24
|
+
if reset_n = '0' then
|
|
25
|
+
value_s <= to_signed(0,n);
|
|
26
|
+
elsif rising_edge(clk) then
|
|
27
|
+
if inc = '1' then
|
|
28
|
+
value_s <= value_s + 1;
|
|
29
|
+
elsif dec = '1' then
|
|
30
|
+
value_s <= value_s - 1;
|
|
31
|
+
end if;
|
|
32
|
+
end if;
|
|
33
|
+
end process;
|
|
34
|
+
value <= value_s;
|
|
35
|
+
end rtl;
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
--
|
|
2
|
+
-- DE2 top-level module that includes the simple audio component
|
|
3
|
+
--
|
|
4
|
+
-- From JCLL, jean-christophe.le_lann@ensta-bretagne.fr
|
|
5
|
+
-- ...From Stephen A. Edwards, Columbia University, sedwards@cs.columbia.edu
|
|
6
|
+
-- ......From an original by Terasic Technology, Inc.
|
|
7
|
+
-- ......(DE2_TOP.v, part of the DE2 system board CD supplied by Altera)
|
|
8
|
+
--
|
|
9
|
+
|
|
10
|
+
library IEEE;
|
|
11
|
+
use IEEE.std_logic_1164.all;
|
|
12
|
+
use IEEE.numeric_std.all;
|
|
13
|
+
|
|
14
|
+
entity DE2 is
|
|
15
|
+
|
|
16
|
+
port (
|
|
17
|
+
-- Clocks
|
|
18
|
+
|
|
19
|
+
CLOCK_27 : in std_logic; -- 27 MHz
|
|
20
|
+
CLOCK_50 : in std_logic; -- 50 MHz
|
|
21
|
+
EXT_CLOCK : in std_logic; -- External Clock
|
|
22
|
+
|
|
23
|
+
-- Buttons and switches
|
|
24
|
+
|
|
25
|
+
KEY : in std_logic_vector(3 downto 0); -- Push buttons
|
|
26
|
+
SW : in std_logic_vector(17 downto 0); -- DPDT switches
|
|
27
|
+
|
|
28
|
+
HEX0, HEX1, HEX2, HEX3, HEX4, HEX5, HEX6, HEX7 : out std_logic_vector(6 downto 0);-- 7-segment displays
|
|
29
|
+
LEDG : out std_logic_vector(7 downto 0); -- Green LEDs
|
|
30
|
+
LEDR : out std_logic_vector(17 downto 0); -- Red LEDs
|
|
31
|
+
|
|
32
|
+
-- RS-232 interface
|
|
33
|
+
|
|
34
|
+
UART_TXD : out std_logic; -- UART transmitter
|
|
35
|
+
UART_RXD : in std_logic; -- UART receiver
|
|
36
|
+
|
|
37
|
+
-- IRDA interface
|
|
38
|
+
|
|
39
|
+
-- IRDA_TXD : out std_logic; -- IRDA Transmitter
|
|
40
|
+
IRDA_RXD : in std_logic; -- IRDA Receiver
|
|
41
|
+
|
|
42
|
+
-- SDRAM
|
|
43
|
+
|
|
44
|
+
DRAM_DQ : inout std_logic_vector(15 downto 0); -- Data Bus
|
|
45
|
+
DRAM_ADDR : out std_logic_vector(11 downto 0); -- Address Bus
|
|
46
|
+
DRAM_LDQM : out std_logic; -- Low-byte Data Mask
|
|
47
|
+
DRAM_UDQM : out std_logic; -- High-byte Data Mask
|
|
48
|
+
DRAM_WE_N : out std_logic; -- Write Enable
|
|
49
|
+
DRAM_CAS_N : out std_logic; -- Column Address Strobe
|
|
50
|
+
DRAM_RAS_N : out std_logic; -- Row Address Strobe
|
|
51
|
+
DRAM_CS_N : out std_logic; -- Chip Select
|
|
52
|
+
DRAM_BA_0 : out std_logic; -- Bank Address 0
|
|
53
|
+
DRAM_BA_1 : out std_logic; -- Bank Address 0
|
|
54
|
+
DRAM_CLK : out std_logic; -- Clock
|
|
55
|
+
DRAM_CKE : out std_logic; -- Clock Enable
|
|
56
|
+
|
|
57
|
+
-- FLASH
|
|
58
|
+
|
|
59
|
+
FL_DQ : inout std_logic_vector(7 downto 0); -- Data bus
|
|
60
|
+
FL_ADDR : out std_logic_vector(21 downto 0); -- Address bus
|
|
61
|
+
FL_WE_N : out std_logic; -- Write Enable
|
|
62
|
+
FL_RST_N : out std_logic; -- Reset
|
|
63
|
+
FL_OE_N : out std_logic; -- Output Enable
|
|
64
|
+
FL_CE_N : out std_logic; -- Chip Enable
|
|
65
|
+
|
|
66
|
+
-- SRAM
|
|
67
|
+
|
|
68
|
+
SRAM_DQ : inout std_logic_vector(15 downto 0); -- Data bus 16 Bits
|
|
69
|
+
SRAM_ADDR : out std_logic_vector(17 downto 0); -- Address bus 18 Bits
|
|
70
|
+
SRAM_UB_N : out std_logic; -- High-byte Data Mask
|
|
71
|
+
SRAM_LB_N : out std_logic; -- Low-byte Data Mask
|
|
72
|
+
SRAM_WE_N : out std_logic; -- Write Enable
|
|
73
|
+
SRAM_CE_N : out std_logic; -- Chip Enable
|
|
74
|
+
SRAM_OE_N : out std_logic; -- Output Enable
|
|
75
|
+
|
|
76
|
+
-- USB controller
|
|
77
|
+
|
|
78
|
+
OTG_DATA : inout std_logic_vector(15 downto 0); -- Data bus
|
|
79
|
+
OTG_ADDR : out std_logic_vector(1 downto 0); -- Address
|
|
80
|
+
OTG_CS_N : out std_logic; -- Chip Select
|
|
81
|
+
OTG_RD_N : out std_logic; -- Write
|
|
82
|
+
OTG_WR_N : out std_logic; -- Read
|
|
83
|
+
OTG_RST_N : out std_logic; -- Reset
|
|
84
|
+
OTG_FSPEED : out std_logic; -- USB Full Speed, 0 = Enable, Z = Disable
|
|
85
|
+
OTG_LSPEED : out std_logic; -- USB Low Speed, 0 = Enable, Z = Disable
|
|
86
|
+
OTG_INT0 : in std_logic; -- Interrupt 0
|
|
87
|
+
OTG_INT1 : in std_logic; -- Interrupt 1
|
|
88
|
+
OTG_DREQ0 : in std_logic; -- DMA Request 0
|
|
89
|
+
OTG_DREQ1 : in std_logic; -- DMA Request 1
|
|
90
|
+
OTG_DACK0_N : out std_logic; -- DMA Acknowledge 0
|
|
91
|
+
OTG_DACK1_N : out std_logic; -- DMA Acknowledge 1
|
|
92
|
+
|
|
93
|
+
-- 16 X 2 LCD Module
|
|
94
|
+
|
|
95
|
+
LCD_ON, -- Power ON/OFF
|
|
96
|
+
LCD_BLON, -- Back Light ON/OFF
|
|
97
|
+
LCD_RW, -- Read/Write Select, 0 = Write, 1 = Read
|
|
98
|
+
LCD_EN, -- Enable
|
|
99
|
+
LCD_RS : out std_logic; -- Command/Data Select, 0 = Command, 1 = Data
|
|
100
|
+
LCD_DATA : inout std_logic_vector(7 downto 0); -- Data bus 8 bits
|
|
101
|
+
|
|
102
|
+
-- SD card interface
|
|
103
|
+
|
|
104
|
+
SD_DAT, -- SD Card Data
|
|
105
|
+
SD_DAT3, -- SD Card Data 3
|
|
106
|
+
SD_CMD : inout std_logic; -- SD Card Command Signal
|
|
107
|
+
SD_CLK : out std_logic; -- SD Card Clock
|
|
108
|
+
|
|
109
|
+
-- USB JTAG link
|
|
110
|
+
|
|
111
|
+
TDI, -- CPLD -> FPGA (data in)
|
|
112
|
+
TCK, -- CPLD -> FPGA (clk)
|
|
113
|
+
TCS : in std_logic; -- CPLD -> FPGA (CS)
|
|
114
|
+
TDO : out std_logic; -- FPGA -> CPLD (data out)
|
|
115
|
+
|
|
116
|
+
-- I2C bus
|
|
117
|
+
|
|
118
|
+
I2C_SDAT : inout std_logic; -- I2C Data
|
|
119
|
+
I2C_SCLK : out std_logic; -- I2C Clock
|
|
120
|
+
|
|
121
|
+
-- PS/2 port
|
|
122
|
+
|
|
123
|
+
PS2_DAT, -- Data
|
|
124
|
+
PS2_CLK : in std_logic; -- Clock
|
|
125
|
+
|
|
126
|
+
-- VGA output
|
|
127
|
+
|
|
128
|
+
VGA_CLK, -- Clock
|
|
129
|
+
VGA_HS, -- H_SYNC
|
|
130
|
+
VGA_VS, -- V_SYNC
|
|
131
|
+
VGA_BLANK, -- BLANK
|
|
132
|
+
VGA_SYNC : out std_logic; -- SYNC
|
|
133
|
+
VGA_R, -- Red[9:0]
|
|
134
|
+
VGA_G, -- Green[9:0]
|
|
135
|
+
VGA_B : out std_logic_vector(9 downto 0); -- Blue[9:0]
|
|
136
|
+
|
|
137
|
+
-- Ethernet Interface
|
|
138
|
+
|
|
139
|
+
ENET_DATA : inout std_logic_vector(15 downto 0); -- DATA bus 16Bits
|
|
140
|
+
ENET_CMD, -- Command/Data Select, 0 = Command, 1 = Data
|
|
141
|
+
ENET_CS_N, -- Chip Select
|
|
142
|
+
ENET_WR_N, -- Write
|
|
143
|
+
ENET_RD_N, -- Read
|
|
144
|
+
ENET_RST_N, -- Reset
|
|
145
|
+
ENET_CLK : out std_logic; -- Clock 25 MHz
|
|
146
|
+
ENET_INT : in std_logic; -- Interrupt
|
|
147
|
+
|
|
148
|
+
-- Audio CODEC
|
|
149
|
+
|
|
150
|
+
AUD_ADCLRCK : inout std_logic; -- ADC LR Clock
|
|
151
|
+
AUD_ADCDAT : in std_logic; -- ADC Data
|
|
152
|
+
AUD_DACLRCK : inout std_logic; -- DAC LR Clock
|
|
153
|
+
AUD_DACDAT : out std_logic; -- DAC Data
|
|
154
|
+
AUD_BCLK : inout std_logic; -- Bit-Stream Clock
|
|
155
|
+
AUD_XCK : out std_logic; -- Chip Clock
|
|
156
|
+
|
|
157
|
+
-- Video Decoder
|
|
158
|
+
|
|
159
|
+
TD_DATA : in std_logic_vector(7 downto 0); -- Data bus 8 bits
|
|
160
|
+
TD_HS, -- H_SYNC
|
|
161
|
+
TD_VS : in std_logic; -- V_SYNC
|
|
162
|
+
TD_RESET : out std_logic; -- Reset
|
|
163
|
+
|
|
164
|
+
-- General-purpose I/O
|
|
165
|
+
|
|
166
|
+
GPIO_0, -- GPIO Connection 0
|
|
167
|
+
GPIO_1 : inout std_logic_vector(35 downto 0) -- GPIO Connection 1
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
end DE2;
|
|
171
|
+
|
|
172
|
+
architecture RTL of DE2 is
|
|
173
|
+
signal reset_n : std_logic;
|
|
174
|
+
signal start : std_logic;
|
|
175
|
+
signal req_a : std_logic;
|
|
176
|
+
signal req_b : std_logic;
|
|
177
|
+
signal a, b : std_logic_vector(3 downto 0);
|
|
178
|
+
signal ready : std_logic;
|
|
179
|
+
signal res : std_logic_vector(7 downto 0);
|
|
180
|
+
signal state_o : std_logic_vector(3 downto 0); --one hot for LOGIC archi !
|
|
181
|
+
signal state_num : std_logic_vector(3 downto 0);
|
|
182
|
+
|
|
183
|
+
function binTo7Seg(bin : std_logic_vector(3 downto 0)) return std_logic_vector is
|
|
184
|
+
variable res : std_logic_vector(6 downto 0);
|
|
185
|
+
begin
|
|
186
|
+
res := "0000000";
|
|
187
|
+
case bin is
|
|
188
|
+
when "0000" => res := "0111111"; --0
|
|
189
|
+
when "0001" => res := "0000110"; --1
|
|
190
|
+
when "0010" => res := "1011011"; --2
|
|
191
|
+
when "0011" => res := "1001111"; --3
|
|
192
|
+
when "0100" => res := "1100110"; --4
|
|
193
|
+
when "0101" => res := "1101101"; --5
|
|
194
|
+
when "0110" => res := "1111101"; --6
|
|
195
|
+
when "0111" => res := "0000111"; --7
|
|
196
|
+
when "1000" => res := "1111111"; --8
|
|
197
|
+
when "1001" => res := "1101111"; --9
|
|
198
|
+
when "1010" => res := "1110111"; --A
|
|
199
|
+
when "1011" => res := "1111100"; --b
|
|
200
|
+
when "1100" => res := "0111001"; --C
|
|
201
|
+
when "1101" => res := "1011110"; --d
|
|
202
|
+
when "1110" => res := "1111001"; --E
|
|
203
|
+
when "1111" => res := "1110001"; --F
|
|
204
|
+
when others => null;
|
|
205
|
+
end case;
|
|
206
|
+
return res;
|
|
207
|
+
end binTo7Seg;
|
|
208
|
+
|
|
209
|
+
function one_hot_to_dec (bin : std_logic_vector(3 downto 0)) return std_logic_vector is
|
|
210
|
+
variable res : std_logic_vector(3 downto 0);
|
|
211
|
+
begin
|
|
212
|
+
res := "0000";
|
|
213
|
+
for i in bin'range loop
|
|
214
|
+
if bin(i) = '1' then
|
|
215
|
+
return std_logic_vector(to_unsigned(i, 4));
|
|
216
|
+
end if;
|
|
217
|
+
end loop;
|
|
218
|
+
return res;
|
|
219
|
+
end one_hot_to_dec;
|
|
220
|
+
|
|
221
|
+
--=====================================================================
|
|
222
|
+
signal sta : std_logic_vector(3 downto 0);
|
|
223
|
+
constant PRESSED : std_logic :='0';
|
|
224
|
+
begin
|
|
225
|
+
|
|
226
|
+
-----------------------------------------------------------------------------
|
|
227
|
+
---- inputs
|
|
228
|
+
-----------------------------------------------------------------------------
|
|
229
|
+
reset_n <= '0' when KEY(0)=PRESSED else '1';
|
|
230
|
+
start <= '1' when KEY(1)=PRESSED else '0';
|
|
231
|
+
req_a <= '1' when KEY(2)=PRESSED else '0';
|
|
232
|
+
req_b <= '1' when KEY(3)=PRESSED else '0';
|
|
233
|
+
a <= SW(3 downto 0);
|
|
234
|
+
b <= SW(3 downto 0);
|
|
235
|
+
|
|
236
|
+
-------------------------------------------------------------------------------
|
|
237
|
+
---- outputs
|
|
238
|
+
-------------------------------------------------------------------------------
|
|
239
|
+
LEDG(0) <= ready;
|
|
240
|
+
HEX0 <= not binTo7Seg(res(3 downto 0)) when ready = '1' else
|
|
241
|
+
not binTo7Seg(SW(3 downto 0));
|
|
242
|
+
HEX1 <= not binTo7Seg(res(7 downto 4)) when ready = '1' else
|
|
243
|
+
not "0001000";
|
|
244
|
+
HEX5 <= not binTo7Seg("0101"); -- letter S
|
|
245
|
+
HEX4 <= not binTo7Seg(state_num); -- state number
|
|
246
|
+
HEX2 <= not "0001000"; --nicer
|
|
247
|
+
HEX3 <= not "0001000";
|
|
248
|
+
HEX6 <= not "0001000";
|
|
249
|
+
HEX7 <= not "0001000" when start='1' else "0001000";
|
|
250
|
+
state_num <= one_hot_to_dec(state_o);
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
DESIGN : entity work.MultSeq(logic)
|
|
254
|
+
port map (
|
|
255
|
+
clk => CLOCK_27,
|
|
256
|
+
reset_n => reset_n,
|
|
257
|
+
start => start,
|
|
258
|
+
req_a => req_a,
|
|
259
|
+
req_b => req_b,
|
|
260
|
+
a => a,
|
|
261
|
+
b => b,
|
|
262
|
+
ready => ready,
|
|
263
|
+
res => res,
|
|
264
|
+
state_o => state_o
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
-----------------------------------------
|
|
268
|
+
-- Unassigned
|
|
269
|
+
-----------------------------------------
|
|
270
|
+
LEDR <= (others => '0');
|
|
271
|
+
|
|
272
|
+
-- LCD
|
|
273
|
+
LCD_ON <= '1';
|
|
274
|
+
LCD_BLON <= '1';
|
|
275
|
+
LCD_RW <= '1';
|
|
276
|
+
LCD_EN <= '0';
|
|
277
|
+
LCD_RS <= '0';
|
|
278
|
+
|
|
279
|
+
-- VGA
|
|
280
|
+
VGA_CLK <= '0';
|
|
281
|
+
VGA_HS <= '0';
|
|
282
|
+
VGA_VS <= '0';
|
|
283
|
+
VGA_BLANK <= '0';
|
|
284
|
+
VGA_SYNC <= '0';
|
|
285
|
+
VGA_R <= (others => '0');
|
|
286
|
+
VGA_G <= (others => '0');
|
|
287
|
+
VGA_B <= (others => '0');
|
|
288
|
+
|
|
289
|
+
--SD
|
|
290
|
+
SD_DAT3 <= '1';
|
|
291
|
+
SD_CMD <= '1';
|
|
292
|
+
SD_CLK <= '1';
|
|
293
|
+
|
|
294
|
+
-- SRAM
|
|
295
|
+
SRAM_DQ <= (others => 'Z');
|
|
296
|
+
SRAM_ADDR <= (others => '0');
|
|
297
|
+
SRAM_UB_N <= '1';
|
|
298
|
+
SRAM_LB_N <= '1';
|
|
299
|
+
SRAM_CE_N <= '1';
|
|
300
|
+
SRAM_WE_N <= '1';
|
|
301
|
+
SRAM_OE_N <= '1';
|
|
302
|
+
|
|
303
|
+
UART_TXD <= '0';
|
|
304
|
+
|
|
305
|
+
-- DRAM
|
|
306
|
+
DRAM_ADDR <= (others => '0');
|
|
307
|
+
DRAM_LDQM <= '0';
|
|
308
|
+
DRAM_UDQM <= '0';
|
|
309
|
+
DRAM_WE_N <= '1';
|
|
310
|
+
DRAM_CAS_N <= '1';
|
|
311
|
+
DRAM_RAS_N <= '1';
|
|
312
|
+
DRAM_CS_N <= '1';
|
|
313
|
+
DRAM_BA_0 <= '0';
|
|
314
|
+
DRAM_BA_1 <= '0';
|
|
315
|
+
DRAM_CLK <= '0';
|
|
316
|
+
DRAM_CKE <= '0';
|
|
317
|
+
|
|
318
|
+
-- FLASH
|
|
319
|
+
FL_ADDR <= (others => '0');
|
|
320
|
+
FL_WE_N <= '1';
|
|
321
|
+
FL_RST_N <= '0';
|
|
322
|
+
FL_OE_N <= '1';
|
|
323
|
+
FL_CE_N <= '1';
|
|
324
|
+
OTG_ADDR <= (others => '0');
|
|
325
|
+
OTG_CS_N <= '1';
|
|
326
|
+
OTG_RD_N <= '1';
|
|
327
|
+
OTG_RD_N <= '1';
|
|
328
|
+
OTG_WR_N <= '1';
|
|
329
|
+
OTG_RST_N <= '1';
|
|
330
|
+
OTG_FSPEED <= '1';
|
|
331
|
+
OTG_LSPEED <= '1';
|
|
332
|
+
OTG_DACK0_N <= '1';
|
|
333
|
+
OTG_DACK1_N <= '1';
|
|
334
|
+
|
|
335
|
+
TDO <= '0';
|
|
336
|
+
|
|
337
|
+
-- ETHERNET
|
|
338
|
+
ENET_CMD <= '0';
|
|
339
|
+
ENET_CS_N <= '1';
|
|
340
|
+
ENET_WR_N <= '1';
|
|
341
|
+
ENET_RD_N <= '1';
|
|
342
|
+
ENET_RST_N <= '1';
|
|
343
|
+
ENET_CLK <= '0';
|
|
344
|
+
|
|
345
|
+
-- Video decoder
|
|
346
|
+
TD_RESET <= '1'; -- NEED TO ACTIVATE 27 Mhz
|
|
347
|
+
|
|
348
|
+
-- Set all bidirectional ports to tri-state
|
|
349
|
+
DRAM_DQ <= (others => 'Z');
|
|
350
|
+
FL_DQ <= (others => 'Z');
|
|
351
|
+
OTG_DATA <= (others => 'Z');
|
|
352
|
+
LCD_DATA <= (others => 'Z');
|
|
353
|
+
SD_DAT <= 'Z';
|
|
354
|
+
ENET_DATA <= (others => 'Z');
|
|
355
|
+
GPIO_0 <= (others => 'Z');
|
|
356
|
+
GPIO_1 <= (others => 'Z');
|
|
357
|
+
|
|
358
|
+
end RTL;
|