include("../../head");
?>
WebHASE: Tomasulo's Algorithm
Welcome to the WebHASE viewer applet for the HASE simulation of
the Tomasulo's Algorithm. The applet may take some time to load
WebHASE creates two Java applet windows, one displaying the
model and one containing the Playback Controls which can be used to
start, stop, pause and rewind the animation. The animation shows what
happens in the simulation model of Tomasulo's Algorithm as
instructions and data from the Instruction/Data Source unit are
processed. The contents of the Source unit can be viewed by activating
the mouse over the Source unit icon and selecting the appropriate View
option. Each option brings up a viewing window (note that the
viewing windows may sometimes need to be resized).
Demonstration Program
The model contains a Demonstration Program which
forms the scalar (dot) product of two 4-element vectors. The
following table lists the program instructions in the form in which
they are held in the Source Unit's instruction memory and the
corresponding pseudo instructions which the Source Unit sends to the
Floating-point Operation Stack:
Program instructions | Pseudo instructions |
LOAD F0 0 | LD F0 FLB1 |
LOAD F1 2 | LD F1 FLB2 |
MULRS F1 3 | MUL F1 FLB3 |
ADDRR F0 F1 | ADD F0 F1 |
LOAD F2 4 | LD F2 FLB4 |
MULRS F2 5 | MUL F2 FLB5 |
ADDRR F0 F2 | ADD F0 F2 |
LOAD F3 6 | LD F3 FLB6 |
MULRS F3 7 | MUL F3 FLB1 |
ADDRR F0 F3 | ADD F0 F3 |
LOAD F1 8 | LD F1 FLB2 |
MULRS F1 9 | MUL F1 FLB3 |
ADDRR F0 F1 | ADD F0 F1 |
STORE F0 1 | ST F0 SDB1 |
STOP 0 | STOP 0 |
Program Actions
As the program executes, the following actions occur in the system:
LD F0 FLB1
- Sets FLB1 tag in FPR0; when the data arrives in FLB1 it is
copied into FPR0
LD F1 FLB2
- Sets FLB2 tag in FPR1; before the data arrives, the tag has been moved
to Multiply RS1 Source, so the data goes there instead
MUL F1 FLB3
- Uses Multiply Reservation Station 1
- Copies FLB2 tag from FPR1 to RS1 Sink and sets Multiply RS1 tag in
FPR1
- Sets FLB3 tag in RS1 Source;
when the data arrives in FLB3 it is copied into RS1 Source
- When result appears on CDB it is copied into FPR1 and Add RS1 Source
ADD F0 F1
- Uses Add Reservation Station 1
- Copies data from FPR0 to RS1 Sink and sets Add RS1 tag in FPR0
- Copies Multiply RS1 tag from FPR1 to RS1 Source
- When result appears on CDB it is copied into Add RS2 Sink
LD F2 FLB4
- Sets FLB4 tag in FPR2; before the data arrives in FLB4, the
tag has been moved into Multiply RS2 Source so the data goes
there instead
MUL F2 FLB5
- Uses Multiply Reservation Station 2
- Copies FLB4 tag from FPR2 to RS2 Sink and sets Multiply RS2 tag
in FPR2
- Sets FLB5 tag in RS2 Source; when data arrives in FLB5 it is copied
into Multiply RS2 Source
- When result appears on CDB it is copied into FPR2 and Add RS2 Source
ADD F0 F2
- Uses Add Reservation Station 2
- Copies Add RS1 tag from FPR0 to RS2 Source and sets Add RS2 tag in FPR0
- Copies Multiply RS2 tag from FPR2 to RS2 Sink
- When result appears on CDB it is copied into Add RS3 Sink
LD F3 FLB6
- Sets FLB6 tag in FPR3; as the data arrives in FLB6, the
tag is being moved into Multiply RS2 Source so the data goes
there instead
MUL F3 FLB1
- Uses Multiply Reservation Station 1
- Sets Multiply RS1 tag in FPR3
- Takes FLB6 tag from FPR3, but FLB6 tag and data appear on the CDB
before the tag is sent to RS1 Sink, so the data is sent instead
- Sets FLB1 tag in RS1 Source
- When result appears it is copied into FPR3 and Add RS3 Source
ADD F0 F3
- Uses Add Reservation Station 3
- Copies Add RS1 tag from FPR0 to RS3 Sink and sets Add RS3 tag in FPR0
- Copies Multiply RS2 tag from FPR3 into RS3 Source
- When result appears it is copied into Add RS1 Sink
LD F1 FLB2
- Sets FLB2 tag in FPR1; when the data arrives it is copied into
Multiply RS1 Source
MUL F1 FLB3
- Uses Multiply Reservation Station 2
- Takes Add RS3 tag from FPR1, but this tag appears on the CDB before
the tag is sent to Multiply RS2 source, so data is sent instead
- Sets Multiply RS2 tag in FPR1
- Would set FLB3 tag in RS2 Source, but FLB3 tag and data appear on
the CDB before the tag is sent to RS2, so data is sent instead
- When result appears it is copied into FPR1 and Add RS1 Source
ADD F0 F1
- Uses Add Reservation Station 1
- Copies Add RS3 tag from FPR0 to RS1 Sink and sets Add RS1 tag in FPR0
- Copies Multiply RS2 tag from FPR1 to RS1 Source
- When result appears it is copied into FPR0 and SDB1
ST F0 SDB1
- Copies Add RS1 tag from FPR0 into SDB1. When the data arrives
it is sent to Memory
hase@dcs.ed.ac.uk