Professional Documents
Culture Documents
Tutorial 6
Tutorial 6
B has a CPI of 2.5 and can be run at a clock rate of 750 Mhz. We have a particular program we
wish to run. When compiled for computer A, this program has exactly 100,000 instructions. How
many instructions would the program need to have when compiled for Computer B, in order for
the two computers to have exactly the same execution time for this program?
Q5. For the given code sequence stalls are inserted to remove hazards according to the standard
rule, perform the loop unrolling three times and reschedule it so as to remove any stalls from
the code when it is run on a DLX pipelined machine.
LD F0,6(R1) ;
F0=array element
SUBD F4,F0 ,F2 ;
add scalar in F2
SD 12(R1), F4 ;
store result
SUBI R1,R1,#8 ;
decrement pointer;8 bytes (per DW)
BNEZ R1,Loop