Question: Problem 1: Given the following code: lw $t0, 0($s0) lw $t1, 0($s1) add $t0, $t0, $t1 sw $t0, 0($s0) 1. Identify all of the data

Problem 1: Given the following code:

lw $t0, 0($s0)

lw $t1, 0($s1)

add $t0, $t0, $t1

sw $t0, 0($s0)

1. Identify all of the data dependencies in the code.

2. Execute the code on a pipelined computer by filling in the slots of a table similar to the following one, where each row represents an instruction and each column represents a clock cycle. Assuming forwarding is not available, insert stalls where they are necessary and calculate the total clock cycles.

Problem 1: Given the following code: lw $t0, 0($s0) lw $t1, 0($s1)

3. Do 2. again, this time assuming forwarding is available.

Instruction 123 4 lw St1, 0($s1) | | IF | ID | EX | MEM | WB

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!