Question: Consider the following RISC V Code ( use this data for both ( a ) and ( b ) subparts: addi s 0 , zero,
Consider the following RISC V Code use this data for both a and b subparts:
addi s zero,
L:
lw ts
beq t s FD
addi s s
addi s s
bne s zero, L
jal zero, NFD
FD: addi s zero,
NFD: sw ss
Assume that s contains x which is starting
address of an array which consists of words which are
powers of till
eg
xxx
x
Assume s contains x
a Assume that normal stage pipelined processor discussed in class which supports EXtoEX and
MEMtoEX forwarding and Hazard detection, is used to execute the above program. Assume the
processor uses predict nottaken static branch predictor. For each instruction, determine the clock cycle
numbers in which it enters IF ID EX Mem and WB stage. If any instruction does not enter a particular
pipeline stage, then you can mark NA or in the corresponding column. If any instruction is executed
more than once, all the clock cycle numbers in which the instruction enters the pipeline stage should be
mentioned separated by a semicolon. For example, if lw ts instruction enters instruction fetch twice
because of looping once in nd clock cycle and second time in th clock cycle then in the column
corresponding to IF you have to write ;
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
