-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPong_Game.vhd.bak
50 lines (46 loc) · 1.07 KB
/
Pong_Game.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
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity Pong_Game is
port( clk50_in : in std_logic;
redout : out std_logic_vector(9 downto 0);
blueout : out std_logic_vector(9 downto 0);
greenout : out std_logic_vector(9 downto 0);
vs_out : out std_logic;
hs_out : out std_logic;
sync : out std_logic;
clk25_out : std_logic);
end Pong_Game;
architecture behavioral of Pong_Game is
signal clk25 : std_logic;
signal horizontal_count : std_logic_vector(9 downto 0);
signal vertical_count : std_logic_vector(9 downto 0);
begin
clk25_out <= clk25;
sync <= '0';
process (clk50_in)
begin
if clk50_in'event and clk50_in='1' then
if (clk25 = '0') then
clk25 <= '1';
else
clk25 <= '0';
end if;
end if;
end process;
process (clk25)
begin
if clk25'event and clk25 = '1' then
redout <= "0000000000";
greenout <= "0000000000";
blueout <= "1111111111";
else
redout <= "0000000000";
greenout <= "0000000000";
blueout <= "0000000000";
end if;
vs_out <= '1';
hs_out <= '1';
end process;
end behavioral;