程序代写代做代考 computer architecture Introduction to Computer Architecture Dependencies and Forwarding

Introduction to Computer Architecture Dependencies and Forwarding

Instruction Sequence

lw $t0, 0 ($a0)

addi $t9, $zero, 53

mult $t9, $t0

mflo $t0

lw $t1, 4 ($a0)

lw $t1, 0 ($t1)

addi $t1, $t1, -9

addi $t9, $zero, 7

mult $t9, $t1

mflo $t1

add $t0, $t0, $t1

sw $t0, 0 ($a0)

1. Indicate the dependencies in the given code.

2. Assume there is no forwarding in this pipelined processor; add NOP instructions to eliminate any

hazards.

3. Assume there is forwarding in this pipelined processor; add NOP instructions to eliminiate any

hazards.

Objectives:

1. To understand how dependencies arise.

2. To understand how dependencies affect data flow in a pipelined processor.

3. To understand how forwarding can help alleviate data hazards in a pipelined processor.