Other project 6 of 7
Pipeline Simulator
CMPT 305A 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.


C++ · Make · Instruction traces
