-
Notifications
You must be signed in to change notification settings - Fork 0
/
top_level_vhd.vhd.bak
61 lines (53 loc) · 1.7 KB
/
top_level_vhd.vhd.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY top_level_vhd IS
PORT(
CLOCK_50 : IN STD_LOGIC;
SW : IN STD_LOGIC_VECTOR( 9 DOWNTO 0 );
VGA_R : OUT STD_LOGIC_VECTOR( 5 DOWNTO 0 );
VGA_G : OUT STD_LOGIC_VECTOR( 5 DOWNTO 0 );
VGA_B : OUT STD_LOGIC_VECTOR( 5 DOWNTO 0 );
VGA_HS : OUT STD_LOGIC;
VGA_VS : OUT STD_LOGIC;
VGA_CLK : OUT STD_LOGIC;
VGA_BLANK : OUT STD_LOGIC;
GPIO_0 : OUT STD_LOGIC_VECTOR( 35 DOWNTO 0 );
LEDR : OUT STD_LOGIC_VECTOR( 9 DOWNTO 0 ));
END top_level_vhd;
ARCHITECTURE behavioral OF top_level_vhd IS
COMPONENT display_vhd IS
PORT(
sw0,sw1,sw2,sw3 : IN STD_LOGIC;
sw9,sw8,sw7,sw6 : IN STD_LOGIC;
i_clk :IN STD_LOGIC;
VGA_R : OUT STD_LOGIC_VECTOR( 5 DOWNTO 0 );
VGA_G : OUT STD_LOGIC_VECTOR( 5 DOWNTO 0 );
VGA_B : OUT STD_LOGIC_VECTOR( 5 DOWNTO 0 );
VGA_HS : OUT STD_LOGIC;
VGA_VS : OUT STD_LOGIC;
VGA_CLK : OUT STD_LOGIC;
VGA_BLANK : OUT STD_LOGIC);
END COMPONENT;
BEGIN
module_vga : display_vhd
PORT MAP (
sw0 => SW(0),
sw1 => SW(1),
sw2 => SW(2),
sw3 => SW(3),
sw6 => SW(6),
sw7 => SW(7),
sw8 => SW(8),
sw9 => SW(9),
i_clk => CLOCK_50,
VGA_R => VGA_R,
VGA_G => VGA_G,
VGA_B => VGA_B,
VGA_HS => VGA_HS,
VGA_VS => VGA_VS,
VGA_CLK => VGA_CLK,
VGA_BLANK => VGA_BLANK
);
END behavioral;