hw01_sol

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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
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
 immed
 IR
 Addr
 25:21
 20:16
 IF
 ID
 EX
 WB
 ME
 rsv
 rtv
 IMM
 NPC
 ALU
 Addr
 Data
 Data
 Addr
 D In
 +1
 PC
 Mem
 Port
 Addr
 Data
 Out
 Addr
 Data
 In
 Mem
 Port
 Data
 Out
 rtv
 ALU
 MD
 dst
 dst
 dst
 Decode
 dest. reg
 NPC
 =
 30
 2
 2’b0
 + 15:0
 25:0
 29:26
 29:0
 0
1
 15:0
 c4:r2
 c6:r1
 c8:r3
 c11:r2
 Impractical Bypass!
 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 Right Arrow Icon
Ask a homework question - tutors are online