In this lab, we will program the FPGA on the Nexys2 board to display a “bouncing ball” on a 640 x 480 VGA monitor connected to the VGA interface on the board. This will requires us to generate the required sync and video signals consistent with the VGA standard.
This code is necessary in order to properly set the multiple properties and pins for our board / vga connector. It also helps manage the clock signal that this lab uses.
After adding all the necessary code run through synthesis, Implementation, and Bit-stream to make sure all the code was input properly and no errors occur.
Connect your Nexys 4 DDR Board to the monitor in the lab using the VGA port on the board. Change the settings on the monitor until the bouncing ball appears on the screen.
In the Ball source file code copy the Ball_y_motion line and paste it immediately after, edit it to say Ball_x_ motion.
Next copy the entire mball process and repeat for every instance of y changing them to x.
This should add x-motion to the ball equal to your original y-motion.