Master the fundamental concepts of pipelining & out-of-order execution through this focused micro-challenge.
Tomasulo's algorithm (1967) schedules instructions dynamically using reservation stations and a Common Data Bus (CDB). It renamed physical registers decades before modern Intel cores branded it differently.
cLoading…
For example, an ADD waiting on a LOAD clears its qj tag when the load broadcasts its value on the CDB, allowing the adder to fire without writing the architectural register yet.
For this exercise, you will simulate two ALU stations and a CDB broadcast loop. This task asks you to compare Tomasulo scheduling against your in-order five-stage pipeline on the same instruction trace.
Keep the relevant datasheet, ISA manual, or architecture textbook chapter open while you implement. When your output disagrees with the reference trace on the same program, the bug is usually a mis-decoded opcode, a stale register read, or a flag bit left unchanged after arithmetic.
For this exercise, you will use those habits while implementing the requirement in the starter code. Microarchitectural product names change across CPU generations, but the control ideas (fetch, bypass, cache lines, vector lanes) stay stable enough to debug from first principles.
Simulate Tomasulo's algorithm in C.
Requirements:
Test:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github