Hi, I need a verilog HDL code for a simple project, the project is as follows:
you start off as a single blue square on the bottom of the screen(background black), then once the game starts, blocks(red squares) start falling from the top of the screen and you use KEYand Key on the DE2 board as controls to move your square right/left to dodge the falling blocks. if you get hit by a falling block the game terminates and goes back to it's original state(a single blue square at bottom of screen).
the below is the vga adapter we use
module part1(SW,KEY,CLOCK_50,VGA_R, VGA_G, VGA_B,
VGA_HS, VGA_VS, VGA_BLANK, VGA_SYNC, VGA_CLK,LEDR);
input [17:0] SW;
input [3:0] KEY;
output [9:0] VGA_R;
output [9:0] VGA_G;
output [9:0] VGA_B;
defparam [url removed, login to view] = "160x120";
defparam [url removed, login to view] = "FALSE";
defparam VGA.BITS_PER_COLOUR_CHANNEL = 1;
defparam VGA.BACKGROUND_IMAGE = "image.colour.mif"
the code must be of verilog HDL file and coded with a fsm in it.
if possible, comment on your code so i can understand what's happening.