Assume that $s0 is initialized to 11 and $s1 is initialized to 22. Suppose you executed the

Question:

Assume that $s0 is initialized to 11 and $s1 is initialized to 22. Suppose you executed the code below on a version of the pipeline from Section 4.6 that does not handle data hazards (i.e., the programmer is responsible for addressing data hazards by inserting NOP instructions where necessary). What would the final values of register $s4 be? Assume the register file is written at the beginning of the cycle and read at the end of a cycle. Therefore, an ID stage will return the results of a WB state occurring during the same cycle. See Section 4.8 and Figure 4.51 for details. 

addi $s0, $s1, 5 

add $s2, $s0, $s1 

addi $s3, $s0, 15 

add $s4, $s0, $s0

Data from figure 4.51

Sox. POS Add Instruction memory 2 Instruction Read Read register 2 We Wie data Instruction (15-0 Instruction

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: