Project: FPGA-based CPU Design with SystemVerilog
This project involved designing and implementing a fully functional computer from scratch using an FPGA programmed in SystemVerilog. The result was a custom-built CPU that successfully ran the classic game Pong, displayed on a VGA monitor. The project showcased not only low-level hardware design but also testing and optimisation of digital circuits.
Project Description
In this project, I collaborated with a teammate to develop a complete CPU from scratch using SystemVerilog. We used an FPGA as the target hardware platform and created the necessary modules for the ALU, PC, register, and VGA interface. By meticulously designing the hardware architecture, we ensured that the computer could execute basic operations and interface with external peripherals such as the VGA display. The final demonstration featured our custom version of the Pong game running on the system, illustrating the successful completion of this digital systems design challenge.
Key Features
- Custom CPU Design: Designed the architecture and logic for a CPU from scratch, including the ALU, control unit, and registers, using SystemVerilog on an FPGA.
- SystemVerilog Programming: Leveraged SystemVerilog to program the FPGA, developing complex logic circuits and test benches to verify the functionality of each module.
- VGA Display Interface: Integrated a VGA interface to display the Pong game, handling pixel generation, synchronisation, and video output timing.
- Hardware Optimisation: Optimised the CPU's hardware design to minimise resource usage on the FPGA while maintaining functional integrity.
- Test Bench Development: Developed comprehensive test benches to simulate the CPU and ensure that all components operated as intended.
Technologies Used
The following technologies and tools were essential in building this FPGA-based computer:
- FPGA: The hardware platform used for prototyping the custom CPU design.
- SystemVerilog: A hardware description language used to design and simulate the CPU and its components.
- CPU Architecture: Designed the CPU's architecture from scratch, including the ALU, registers, and control logic.
- Test Benches: Developed for verifying the logic of each module and testing the overall system performance.
- VGA Display: Used to interface with the monitor, enabling real-time rendering of the Pong game.
- Low-level Programming: Focused on the transistor-level logic and low-level control necessary to operate the CPU.
Project Code
Here you can find the GitHub link to the code we developed for this project: