Question: Consider the following MIPS assembly code segment: ADD $t 0 , $t 1 , $t 2 SUB $t 3 , $t 4 , $t 5
Consider the following MIPS assembly code segment: ADD $t $t $t SUB $t $t $t BEQ $t $t TARGET AND $t $t $t OR $t $t $t TARGET: ADDI $t $t Assume the processor uses a stage MIPS pipeline with stages: IF Instruction Fetch ID Instruction Decode EX Execute MEM Memory Access and WB Write Back The branch prediction strategy is always not taken If a branch is mispredicted, there is a cycle penalty. There is a data dependency between the ADD and BEQ instructions, causing the pipeline to stall for cycle. Calculate the total number of cycles required to execute this code sequence.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
