Project · April 2026 · working

FPGA calculator in VHDL (Basys 2)

A programmable two-stage calculator implemented in VHDL on a Basys 2 FPGA: three 8-bit inputs and two operators drive an FSM through add, subtract, multiply, and a custom sequential-division component, with results on the seven-segment display.

VHDLFPGADigital designFSMCoursework

What it is

A programmable calculator built in VHDL on a Digilent Basys 2 FPGA, as the final assignment for DTU’s 30081 Digitalteknik. It evaluates two-stage expressions of the form:

RESULT = (InputA Op1 InputB) Op2 InputC

where the three 8-bit operands and the two operators are entered on switches and buttons, and the result is shown on the seven-segment display. It supports the four arithmetic operations — add, subtract, multiply, and divide.

Demo: entering three operands and two operators on the Basys 2, and computing a two-stage result live on the seven-segment display.

How it works

The design is a top module (Calc_Top) wiring together custom submodules:

The hard parts

Results

A working calculator on the Basys 2 that evaluates two-operator expressions across all four operations and displays the result live — demonstrated on hardware in the linked video.

Tools & skills demonstrated

VHDL from the ground up: FSM design, a custom multi-cycle arithmetic datapath (including sequential division), seven-segment multiplexing, and input debouncing — implemented and verified on a real FPGA board.


← All projects

Available for Jan 2027 Praktik