Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Athokshay Ashok
VHDL-Maze
Commits
86e40b93
Unverified
Commit
86e40b93
authored
Apr 26, 2019
by
rmega12
Committed by
GitHub
Apr 26, 2019
Browse files
commit for the night
parent
0790e73a
Changes
1
Hide whitespace changes
Inline
Side-by-side
basic_game.vhd
0 → 100644
View file @
86e40b93
-- Paddle mover, basically
library
IEEE
;
use
IEEE
.
std_logic_1164
.
all
;
use
IEEE
.
numeric_std
.
all
;
entity
GAME
is
port
(
--L : in std_logic;
--R : in std_logic;
clk
:
in
std_logic
;
--paddle_in : in unsigned (9 downto 0);
--ball_x_position : out unsigned (9 downto 0);
--ball_y_position : out unsigned (9 downto 0);
paddle_out
:
out
unsigned
(
9
downto
0
)
--game_over : out std_logic
--ball_array : out signed(99 downto 0);
);
end
;
architecture
GAME_ARCH
of
GAME
is
signal
paddle
:
unsigned
(
9
downto
0
)
:
=
10
d
"8"
;
signal
temp
:
std_logic
:
=
'1'
;
begin
process
(
clk
)
is
begin
if
rising_edge
(
clk
)
then
-- PADDLE (changes 'paddle')
--if L = '1' and R = '0' then
--paddle <= paddle - 1 when paddle >= 63;
--elsif L = '0' and R = '1' then
--paddle <= paddle + 1 when paddle <= 495; -- 575-80 (rightmost edge of screen minus width of paddle)
--end if;
paddle_out
<=
paddle
;
paddle
<=
paddle
+
0
;
-- MAPPING TO OUTPUTS (shifting for pixel)
--ball_x_position <= 11d"150";
--ball_y_position <= 11d"150";
--paddle_position <= paddle (15 downto 5);
end
if
;
end
process
;
end
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment