Back to projects

05 / Digital Design · VHDL

5-Stage Pipelined ARM Processor

Course: Computer Architecture Discipline: Digital design in VHDL Date: 2025 In Progress

A complete LEGv8-subset ARM-style processor in VHDL — built from the ground up as a single-cycle datapath, then pipelined into five stages with hazard detection and data forwarding, and verified via waveform analysis.

Project mission: engineer a complete five-stage pipelined processor from scratch — implementing hazard detection and data forwarding entirely in VHDL.

Overview

As the term project for my Computer Architecture course, I designed and implemented a simplified ARM-like processor using VHDL. The processor supports a subset of ARM instructions (specifically LEGv8), including arithmetic operations, memory access, and control flow.

The project began with the foundational components — PC, instruction and data memory, register file, and ALU. I first wired these together into a single-cycle architecture to validate basic functionality before transitioning to a pipelined design. That shift introduced challenges around instruction dependencies and timing, which I addressed through hazard detection and data forwarding.

Single-cycle ARM processor architecture diagram
Single-cycle processor architecture.

Pipelining the datapath

The pipeline follows the classic five-stage approach: Instruction Fetch, Instruction Decode, Execute, Memory Access, and Write Back. Each stage operates concurrently with the others, creating a processing pipeline that can theoretically complete one instruction per clock cycle. The real complexity comes from data hazards — situations where instructions depend on results from previous instructions still moving through the pipeline.

Single-cycle CPU entity declaration
Top-level CPU entity declaration.
CPU simulation waveform
GTKWave simulation waveform — instruction execution traced through the pipeline.

Verification

Verification involved developing comprehensive testbenches that could automatically validate processor functionality across various instruction sequences. Using GTKWave for waveform analysis, I could observe signal propagation through each pipeline stage, verify timing relationships, and debug the complex interactions between hazard-detection logic and data forwarding.

Image credits

  • Single-cycle architecture diagram: Patterson, David A., and John L. Hennessy. Computer Organization and Design — The Hardware/Software Interface (Arm® Edition). ISBN 978-0-12-801733-3.

Textbook diagram used for educational purposes under fair use. Code screenshots and simulations are personal development work.