subject

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?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
You picked the corridor which led you here. if the guards find you, they're going to be really angry! what is the synonym of angry
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
Write a function so that the main program below can be replaced by the simpler code that calls function original main program: miles_per_hour = float( minutes_traveled = float( hours_traveled = minutes_traveled / 60.0 miles_traveled = hours_traveled * miles_per_hour print('miles: %f' % miles_traveled) sample output with inputs: 70.0 100.0 miles: 116.666667
Answers: 3
question
Computers and Technology, 22.06.2019 17:50
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
You know the right answer?
Assume that the following code segment is run on a MIPS processor with hazard detection and forwardi...
Questions
question
Mathematics, 30.10.2020 01:00
question
Arts, 30.10.2020 01:00
question
Geography, 30.10.2020 01:00
question
Geography, 30.10.2020 01:00
question
Mathematics, 30.10.2020 01:00
Questions on the website: 13722360