{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw4_sol

# hw4_sol - Homework 4 Solutions 1.a.i Loop lw \$t1,40(\$t6...

This preview shows pages 1–3. Sign up to view the full content.

Homework 4 – Solutions 1.a.i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Loop: lw \$t1,40(\$t6) IF ID EX MEM WB NOOP NOOP add \$t1, \$s0, \$t1 IF ID EX MEM WB NOOP NOOP sw \$t1, 20(\$t5) IF ID EX MEM WB addi \$t5, \$t5, -4 IF ID EX MEM WB addi \$t6, \$t6, 4 IF ID EX MEM WB NOOP bne \$t5, \$s1, Loop IF ID EX MEM WB 15 cycles 1.a.ii 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Loop: lw \$t1,40(\$t6) IF ID EX MEM WB add \$t1, \$s0, \$t1 IF ID EX MEM WB sw \$t1, 20(\$t5) IF ID EX MEM WB addi \$t5, \$t5, -4 IF ID EX MEM WB addi \$t6, \$t6, 4 IF ID EX MEM WB bne \$t5, \$s1, Loop IF ID EX MEM WB 15 cycles 1.a.iii 1 2 3 4 5 6 7 8 9 10 11 Loop: lw \$t1,40(\$t6) IF ID EX MEM WB add \$t1, \$s0, \$t1 IF ID EX MEM WB sw \$t1, 20(\$t5) IF ID EX MEM WB addi \$t5, \$t5, -4 IF ID EX MEM WB addi \$t6, \$t6, 4 IF ID EX MEM WB bne \$t5, \$s1, Loop IF ID EX MEM WB 11 Cycles

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
1.b.i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Loop: lw \$t1,40(\$t6) I F I D E X ME M W B add \$t1, \$s0, \$t1 I F ID E X ME M WB sw \$t1, 20(\$t5) IF ID EX ME M WB addi \$t5, \$t5, - 4 IF ID EX ME M WB addi \$t6, \$t6, 4 IF ID EX ME M WB bne \$t5, \$s1, Loop IF ID EX ME M WB Stall IF ID EX ME M WB Stall IF ID EX ME M WB Stall
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

hw4_sol - Homework 4 Solutions 1.a.i Loop lw \$t1,40(\$t6...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online