This is a basic simulator of the Tomasulo's Algorithm. It takes in a file containing instructions and simulates the algorithm.
- GCC (g++)
- GNU Make
- Git
Clone the repository and run make
in the root directory.
Run ./tomasulo <input-file>
in the root directory.
The simulator takes in a text file containing instructions. The file must be in the following format:
<op> <dest>, <src1>, <src2>
or
<op> <dest/src>, <imm>(<src>)
where:
<op>
is one of the following:add
,sub
,mul
,div
,lw
,sw
<dest>
is the destination register<src1>
is the first source register<src2>
is the second source register<imm>
is an immediate value
Avaible registers in the input file are r0
... r11
.
help
orh
- display help messageregisters
orr
- display registersfus
orf
- display functional unitsstatus
ors
- display status of instructionsnext
orn
- execute next clock cycleclock
orc
- display current clock cycleexit
ore
- exit simulator