Skip to content
Indexproject · 2025

A small 8-bit processor my lab partner and I designed in VHDL and ran on an Altera FPGA board for COE328 at TMU. It steps through its own microcode and shows every result on the seven-segment displays.

VHDLFPGAQuartus

What it is

This was the final lab in COE328, Digital Systems, which I built with my partner Suhail Abdelmola in fall 2025. The goal was a stripped-down processor: two 8-bit registers hold the inputs, a control unit decides what happens to them, an ALU does the math, and two seven-segment displays show the answer. Every block was written in VHDL, wired together in Quartus, and loaded onto a Cyclone II FPGA on an Altera DE2 board.

The processor running on the DE2, results on the seven-segment displays
The processor running on the DE2, results on the seven-segment displays

How the control works

Nothing outside the chip tells it what to do. A finite state machine counts from 0 to 8 on each clock edge, and a 4-to-16 decoder turns that count into a one-hot microcode line. Whichever line is high picks the ALU operation, so the board walks through a fixed program on its own: add, subtract, NOT, NAND, NOR, AND, XOR, OR and XNOR. Subtraction also raises a sign flag when the result goes negative.

Top-level schematic in Quartus: registers, FSM, decoder, ALU and display drivers
Top-level schematic in Quartus: registers, FSM, decoder, ALU and display drivers

Swapping the ALU

Later problem sets kept the control unit and replaced the ALU underneath it. Version two reversed bits, swapped nibbles, took two's complements, shifted with fill bits and added fixed offsets like B minus 5. A third version ignored the math entirely and checked the parity of the state count, printing a y or an n on the display. The FSM, decoder and registers never changed between versions, only the ALU block did.

Functional simulation of the full design stepping through states 0 to 8
Functional simulation of the full design stepping through states 0 to 8