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, 23.06.2019 15:00
1. which of the following statements are true about routers and routing on the internet. choose two answers. a. protocols ensure that a single path between two computers is established before sending packets over it. b. routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for them to route internet traffic. c. a packet traveling between two computers on the internet may be rerouted many times along the way or even lost or "dropped". d. routers act independently and route packets as they see fit.
Answers: 2
question
Computers and Technology, 23.06.2019 20:40
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Cómo pongo un tomo de llamada sin pagar?
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, 20.09.2021 09:30
question
Mathematics, 20.09.2021 09:30
question
Mathematics, 20.09.2021 09:30
Questions on the website: 13722363