AlexOlson.com Pong! (in Verilog!?!)
1. Would you like to play a Game?
The final project of the Verilog course I took during my Spring 2003 semester involved making our own version of Pong . We were given an evaluation board from Altera which contained a seven-segment display, a VGA interface, and two push buttons. Everything else was implemented in Verilog. My version of pong has a few features that were more than what was required:
  • There balls instead of one (simultaneously)
  • All three balls will bounce off each other (which result in purely elastic collisions)
  • Balls rapidly change color as they approach the bottom of the screen.
  • Balls can be different sizes.
  • The speed of the balls increases with every bounce from the paddle.
  • The seven-segment display shows the score (number of bounces off the paddle)
  • Balls can have any of 64 possible velocities (and almost that many angles).

The following are also possible with my code:

  • The walls can move and change in size (thickness)!
  • The balls can change size -- length or width -- while the game is running!

Below is a screenshot from a testbench that I developed. My testbench generated a PNM file and I used the pnmtobmp utility to make a nice BMP....

If you are intersted in the code, I would be happy to show parts of it to you. I used GCC to pre-process my code because the then-current Altera software was extremely buggy when it comes to `defines and functions in Verilog.