CS223_2024f_Project
CS223_2024f_Project
Fall 2024
Introduction
You are going to implement a Video Graphics Array (VGA) module in SystemVerilog, which will enable your
Basys 3 board to generate high-quality graphics on a monitor. Your implementation will include designing
a controller that can handle the timing and synchronization of the VGA signal, as well as controlling the
pixel output on the screen. This project will allow you to demonstrate your knowledge in digital design,
state machines, read/write control logic, and memory operations, all while working with a complex, high-speed
peripheral like the VGA interface. Your implementation will enable the Basys3 board to generate graphics on
the screen in full color and resolution, and will be fully compatible with common video monitors, such as the
ones present in the lab.
1
Figure 1: VGA display timings.
The sizes of pixel drawing and blank intervals for 640 × 480 @ 60Hz VGA signal are given to you in Tables 1
and 2. For more information on VGA specification and connector pinout, you may also check this resource [2].
You are expected to conduct your own research on the VGA specification for use in your implementation.
Scanline part Pixels Time (µs) Frame part Lines Time (µs)
Visible area 640 25.422045680238 Visible area 480 15.253227408143
Front porch 16 0.63555114200596 Front porch 10 0.31777557100298
Sync pulse 96 3.8133068520357 Sync pulse 2 0.063555114200596
Back porch 48 1.9066534260179 Back porch 33 1.0486593843098
Whole line 800 31.777557100298 Whole frame 525 16.683217477656
2
the cursor. Next, utilize the leftmost switch to assign a "brush" size mode. When this switch is logic-level low,
the brush should draw on a single pixel. Conversely, when it’s logic-level high, the brush should draw on a 3 × 3
area centered around the cursor. Experiment with creating basic shapes using button movement, and set the
starting canvas to a purely white background.
At the end of this stage:
• You have a blank canvas with a white background on display
• You have a plus-shaped cursor that can be controlled with directional buttons
• You selected eight colors and assigned them to individual switches for selection
• You set a brush size switch that selects the paint area as either 1 × 1 or 3 × 3
• You color the canvas by pressing the BTNC
Remarks
At the end, you successfully implemented and verified a drawing canvas application using a VGA controller,
seamlessly incorporating fundamental digital design concepts into your work. Congratulations! Here are a few
remarks that you should consider:
• You can directly implement the whole project in one go, skipping the intermediate steps. However, stages
allow you to incrementally implement the project, ensuring you can easily fix issues as you encounter
them. You can pinpoint and fix the problem faster if you have less components to worry about.
• You may receive partial points if your design has partial functionality; for instance, if it functions correctly
only up to stage 2. In that case, you might want to include proper simulations, and testbenches for each
stage in your report. This is another reason you might want to follow the project stages.
• Please remember that you will be demonstrating your designs in the assigned lab session. It is preferable
if you test everything beforehand. Lab hours should be reserved solely for the demo, so it is advised to
complete your work before coming to the lab.
• Do not forget to check the VGA cable for any defects while testing your project!
• While you may choose not to, it is strongly advised that you treat Vivado warnings as
errors. More often than not, they indicate potential issues. Vivado only raises errors when
it encounters a fatal error, i.e., when your design is not synthesizable or when it cannot
generate a bitstream. Possible logical errors might still be implementable; thus, Vivado
does not consider them as errors, only as warnings.
• [10] Be ready for any questions your TA may ask during and after your demo.
3
Project Report
In the project report, you need to submit the following:
• Cover page with your name, surname, ID, and section number
• Detailed explanation of your design and implementation along with the VGA specification
• RTL schematics and state diagram for VGA controller, drawing logic, cursor control, PS/2 mouse control
• Block diagram of each module you implement
• Testbenches (optional, mainly for partial points if everything does not work properly)
• References (if you have any)
References
[1] Vga signal 640 x 480 @ 60 hz industry standard timing — 60hz. http://www.tinyvga.com/vga-timing/
640x480@60Hz. [Accessed 15-11-2024].
[2] Javier Valcarce. Vga signal format timing and specifications. http://javiervalcarce.eu/html/
vga-signal-format-timming-specs-en.html. [Accessed 15-11-2024].