.global A
A: .float 2.0
.global B
B: .float 1.0
.global C
C: .float 0.0
.align 4
.global _main
_main:
addi r1, r0, A
addi r2, r0, B
ld f6, 0(r1)
ld f2, 0(r2)
multf f0,f2,f4
subf f8,f6,f2
divf f10,f0,f6
addd f6, f8, f2
nop
nop
nop
nop
nop
nop
nop
trap #0
specify there is only one add FP unit
(yueh) ~/dlxsim % dlxsim -SCORE -au1
(dlxsim) stats hw
Memory size: 65536 bytes.
Scoreboarding Hardware Configuration
1 integer_unit, latency = 1 cycles
1 add/subtract units, latency = 2 cycles
1 divide units, latency = 40 cycles
2 multiply units, latency = 10 cycles
Load sample code
(dlxsim) load ex2.s
Use step execution
(dlxsim) step _main
stopped after single step, pc = _main+0x4: addi r2,r0,0x104
(dlxsim) step
stopped after single step, pc = _main+0x4: addi r2,r0,0x104
(dlxsim) step
stopped after single step, pc = _main+0x4: addi r2,r0,0x104
(dlxsim) step
stopped after single step, pc = 0x0: ld f6,0x0(r1)
(dlxsim) step
stopped after single step, pc = 0x0: ld f6,0x0(r1)
(dlxsim) step
stopped after single step, pc = 0x0: ld f6,0x0(r1)
(dlxsim) step
stopped after single step, pc = 0x0: ld f2,0x0(r2)
(dlxsim) step
stopped after single step, pc = 0x0: ld f2,0x0(r2)
(dlxsim) step
stopped after single step, pc = 0x0: ld f2,0x0(r2)
(dlxsim) step
stopped after single step, pc = 0x0: ld f2,0x0(r2)
(dlxsim) step
stopped after single step, pc = _main+0x10: multf f0,f2,f4
(dlxsim) step
stopped after single step, pc = _main+0x14: subf f8,f6,f2
Print scoreboard content
(dlxsim) stats score
SCOREBOARD 12 th clock cycle
Instruction Issue Read opnds Exe complete Write Result
+============================================================================+
addi r1,r0,0x100 V V V V
addi r2,r0,0x104 V V V V
ld f6,0x0(r1) V V V V
ld f2,0x0(r2) V V
multf f0,f2,f4 V
+============================================================================+
FU no. Name Busy Op Fi Fj Fk Qj Qk Rj Rk
+=======================================================================+
1 int YES ld f2 NO NO
2 mul YES multf f0 f2 f4 1 NO YES
3 mul NO (null)
4 add NO (null)
5 div NO (null)
+=======================================================================+
F0 F2 F4 F6 F8 F10 F12 F14 F16 F18 F20 F22 F24 F26 F28 F30
+-----------------------------------------------------------------------------+
FU 2 1
+=============================================================================+
go to trap
(dlxsim) go
TRAP #0 received
Dump all infomation
(dlxsim) stats
SCOREBOARD 42 th clock cycle
Instruction Issue Read opnds Exe complete Write Result
+============================================================================+
addi r1,r0,0x100 V V V V
addi r2,r0,0x104 V V V V
ld f6,0x0(r1) V V V V
ld f2,0x0(r2) V V V V
multf f0,f2,f4 V V V V
subf f8,f6,f2 V V V V
divf f10,f0,f6 V V
addd f6,f8,f2 V V V V
nop V V V V
nop V V V V
nop V V V V
nop V V V V
nop V V V V
nop V V V V
nop V V V V
trap 0x0 V V V
nop V
+============================================================================+
FU no. Name Busy Op Fi Fj Fk Qj Qk Rj Rk
+=======================================================================+
1 int YES nop YES YES
2 mul NO (null)
3 mul NO (null)
4 add NO (null)
5 div NO divf f10 f0 f6 2 NO NO
+=======================================================================+
F0 F2 F4 F6 F8 F10 F12 F14 F16 F18 F20 F22 F24 F26 F28 F30
+-----------------------------------------------------------------------------+
FU 5
+=============================================================================+
Quit the program
(dlxsim) quit
Last Updated: 1995.5.10