HW8-sol - that need no register writes; for these...

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

View Full Document Right Arrow Icon
1 CSE 341: Computer Organization Spring 2011 Solution to HW #8 4.16.1 For every instruction, the IF/ID register keeps the PC + 4 and the instruction word itself. The ID/EX register keeps all control signals for the EX, MEM, and WB stages, PC + 4, the two values read from Registers, the sign-extended lowermost 16 bits of the instruction word, and Rd and Rt fields of the instruction word (even for instructions whose format does not use these fields). The EX/MEM register keeps control signals for MEM and WB stages, the PC + 4 + Offset (where Offset is the sign-extended lowermost 16 bits of the instructions, even for instructions that have no offset field), the ALU result and the value of its Zero output, the value that was read from the second register in the ID stage (even for instructions that never need this value), and the number of the destination register (even for instructions
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: that need no register writes; for these instructions the number of the destination register is simply a random choice between Rd or Rt). The MEM/WB register keeps the WB control signals, the value read from memory (or a random value if there was no memory read), the ALU result, and the number of the destination register. 4.20.2 Only RAW dependences can become data hazards. With forwarding, only RAW dependences from a load to the very next instruction become hazards. Without forwarding, any RAW dependence from an instruction to one of the following three instructions becomes a hazard: 2 4.21.2 We can move up an instruction by swapping its place with another instruction that has no dependences with it, so we can try to fill some nop slots with such instructions. We can also use R7 to eliminate WAW or WAR dependences so we can have more instructions to move up....
View Full Document

This document was uploaded on 10/20/2011.

Page1 / 2

HW8-sol - that need no register writes; for these...

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