IFIDEXMEMWB2-WIDE · 5 STAGES

Other project 6 of 7

Pipeline Simulator

CMPT 305

A cycle-by-cycle simulator of a 2-wide, 5-stage processor pipeline, written in C++. It replays real instruction traces of hundreds of megabytes and measures how pipeline depth changes run time.

My role
Simulator core, results
Team
3 people
When
Spring 2026

Hardest problem

Getting the hazards right at speed. The simulator tracks data, control and structural hazards every cycle, and the traces were too big to scan from the start each run. I added a sparse index that remembers a file offset every 100,000 lines, so each of the 72 runs jumps straight to its starting instruction.

Bar chart: average run time drops as pipeline depth goes from 1 to 4 on all three traces
RESULTS, 72 RUNS
C++ code for the pipeline stages, hazard flags and sparse trace index
SIMULATOR CORE

C++ · Make · Instruction traces

Luis Tanafranca

Open to SWE co-op, 2027

Today

Hey, thanks for stopping by.

I'm looking for a software engineering co-op for 2027. Happy to talk about anything on the map.