hw01_sol

hw01_sol - LSU EE 4720 Homework 1 Solution Due 2 March 2011...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: LSU EE 4720 Homework 1 Solution Due: 2 March 2011 Problem 1: The MIPS code below executes on the illustrated implementation. The loop iterates for many cycles. format&#13; immed&#13; IR&#13; Addr&#13; 25:21&#13; 20:16&#13; IF&#13; ID&#13; EX&#13; WB&#13; ME&#13; rsv&#13; rtv&#13; IMM&#13; NPC&#13; ALU&#13; Addr&#13; Data&#13; Data&#13; Addr&#13; D In&#13; +1&#13; PC&#13; Mem&#13; Port&#13; Addr&#13; Data&#13; Out&#13; Addr&#13; Data&#13; In&#13; Mem&#13; Port&#13; Data&#13; Out&#13; rtv&#13; ALU&#13; MD&#13; dst&#13; dst&#13; dst&#13; Decode&#13; dest. reg&#13; NPC&#13; =&#13; 30&#13; 2&#13; 2’b0&#13; + 15:0&#13; 25:0&#13; 29:26&#13; 29:0&#13; 0&#13;1&#13; 15:0&#13; c4:r2&#13; c6:r1&#13; c8:r3&#13; c11:r2&#13; Impractical Bypass!&#13; lw r2, 0(r5) LOOP: lw r1, 0(r2) lw r3, 0(r1) sw r3, 4(r2) bne r3, r0 LOOP addi r2, r3, 0 # SOLUTION lw r2, 0(r5) IF ID EX ME WB LOOP: # Cycles 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 lw r1, 0(r2) IF ID -> EX ME WB FIRST ITERATION lw r3, 0(r1) IF -> ID -> EX ME WB sw r3, 4(r2) IF -> ID -> EX ME WB bne r3, r0 LOOP IF -> ID EX ME WB addi r2, r3, 0 IF ID EX ME WB # Cycles 1...
View Full Document

This note was uploaded on 12/11/2011 for the course EE 4720 taught by Professor Staff during the Fall '08 term at LSU.

Page1 / 2

hw01_sol - LSU EE 4720 Homework 1 Solution Due 2 March 2011...

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

View Full Document
Ask a homework question - tutors are online