Computers and Technology

Assume that the following code segment is run on a MIPS processor with hazard detection and forwarding, in order, 5 stages pipeline (F (instruction fetch), D (instruction decode), E (execute). M(memory access, W (write-back)), static not taken branch prediction (branches are always predicted as not taken), etc.. Below is the code segment that is running on the processor. # code segment bge $R1, SRO, L2 sw $R2, 100(SR1) # $R2 -> MISR1 +100] sh1 $R2, $R2, 1 beq $RO, SRO, L3 L2: lw SR2, 100(SR1) #M[$R1+100] -> SR2 addi $R2, SR2, 100 addi $R3, $R3, 1
beq SRO, SRO, STR L3:
END L1:
a) How many cycles does this program take? Assume all data and instructions are already in the cache, and that all register values are initially 0. The branches are always going to be evaluated as "not taken" and they require two stall clock cycles each.
b) An optimizing compiler is used to re - write re-order the code for faster execution. Given that the branches are always going to be "not taken", how would the new code look like? How many cycles would the code take?

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:00, bowmanari2154
What is used to analyze and summarize your data without graphical support
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, tchloe448
What makes myhexadecimalnumber a child of mynumber? which methods does myhexadecimalnumber inherit directly from the mynumber class? what can an instance of the mynumber class do? what can an instance of the myhexadecimalnumber class do? which methods are overridden? why are they overridden? how many examples of overloading are there? why was this done? where is the super keyword used? what is it doing? why isn’t the incoming value set immediately in the second myhexadecimalnumber constructor? how many examples can you find of an inherited method being called?
Answers: 1
image
Computers and Technology, 23.06.2019 19:50, Aprillove7939
Which feature is selected to practice and save the timing of a presentation
Answers: 1
image
Computers and Technology, 24.06.2019 22:30, anselmojohn4370
Distinguish between a skill resume and a chronological resume and explain when it is best to use each format
Answers: 1
Do you know the correct answer?
Assume that the following code segment is run on a MIPS processor with hazard detection and forwardi...

Questions in other subjects:

Konu
Mathematics, 27.01.2020 19:31