lukem512 / risky-business

A simple simulator of a SuperScalar RISC machine.
https://lukemitchell.co/risky-business/
0 stars 0 forks source link

Allow multiple-cycle instruction execution #19

Open lukem512 opened 8 years ago

lukem512 commented 8 years ago

In reality instructions take a variable number of cycles to execute. The simulator currently assumes all instructions execute in a single cycle - which makes the pipeline and SS much simpler. To continue, the EU should take multiple cycles to perform some instructions.

This will also require changes to the FU and DU as, at times, the DU will be waiting for a free EU, and likewise the FU for a free DU.

lukem512 commented 8 years ago

This is in progress: 1cf67cb.

n = # FUs
m = # DUs
l  = # EUs

The application seems to work for n FUs, where n < m, l and where m == l.