As part of my degree Capstone Project at the University of Alberta, I worked with Mason Strong and Stefan Martynkiw to produce a system capable of displaying simple graphics using an Altera DE2 development board.
Our system used a Nios-II soft-processor (similar to MIPS) combined with custom CPU instructions written in VHDL to accelerate simple graphics operations such as drawing rectangles, lines, or circles, as well as copying pixel buffers around in the device's memory.
In order to output our video frames to a display, we created a custom frame reader component to read pixel data from a buffer and stream it to other components, including a custom colour palette decoding component, to a VGA timing generator component, and out to a display.
To interact with our system, we implemented a VHDL component allowing us to read input from Sega Genesis controllers. With these input devices, we were able to use our platform to implement a simple Pong-style game.
All custom components were connected using Avalon memory-mapped or streaming interfaces. Using an Avalon Memory-Mapped interface allowed the CPU to configure custom hardware blocks through a series of registers added to the hardware, and for the hardware to talk directly to memory devices on the board. The Avalon Streaming interface allowed us to easily create a continuous video data pipeline even with several custom and third-party components.
The final graphics system could achieve 640x480 resolution at 60 fps (depending on how many graphical operations are executed), and was capable of 16-bit colour (256 on-screen). This performance is sufficient to acceptably display photographs, especially when combined with custom colour palettes.
Check out the source code for this project on GitHub!
This project was awarded the 2016 Eleven Prize, an award that is given out each year to one ECE Capstone project by Eleven Engineering Inc.
Copyright © 2016 Stephen Just