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, 22.06.2019 02:00
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
question
Computers and Technology, 22.06.2019 04:30
Which of the statements below is true? the formatting, standard, and drawing commands are unavailable. the formatting, standard, and drawing commands have been used. the formatting, standard, and drawing toolbars are displayed. the formatting, standard, and drawing toolbars are hidden.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
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, 02.03.2021 16:30
question
Chemistry, 02.03.2021 16:30
question
Mathematics, 02.03.2021 16:30
Questions on the website: 13722367