程序代写代做代考 Instruction Sequence

Instruction Sequence

lw $t0, 0 ($s0)
lw $t1, 0 ($t0)
lw $t2, 0 ($t1)
addi $t2, $t2, 5
sw $t2, 0 ($t1)
addi $s0, $s0, 4
add $t6, $t4, $s5

1. Indicate the dependencies present 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 eliminate any

hazards.

Instruction Sequence

lw $t0, 0 ($s0)
lw $t1, 0 ($t0)
lw $t2, 0 ($t1)
addi $t2, $t2, 5
sw $t2, 0 ($t1)
addi $s0, $s0, 4
add $t6, $t4, $s5

1. Indicate the dependencies present in the given code.

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

hazards.

LW, NOP, NOP, LW, NOP, NOP, LW, NOP, NOP, ADDI, NOP, NOP, SW, ADDI, ADD

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

hazards.

LW, NOP, LW, NOP, LW, ADDI, SW, ADDI, ADD

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *