Docsity

High Performance Computer Architecture - Homework 2 | CS 6290, Assignments of Computer Science

Toggle sidebar
bg1
Name: GTid:
Homework 2
Prof. Loh
CS6290 - Spring 2007
Handed Out: 05 Feb 2006 (Mon)
Due: 16 Sep 2006 (Fri - by email)
For problems 1-3, unless otherwise specified, make the following assumptions:
•One instruction can issue (allocate) per cycle
•Latencies: ADD (1), LOAD(4), MUL(8), DIV(20)
•There is one adder, one multiply/divide unit, one load port
•Functional units are not pipelined
•Write Result and Exec occur in the same cycle (i.e., an instruction writes to the CDB in cycle n, and
its dependent instruction can start execution in cycle nas well)
•There is a single CDB
•Reservation stations: ADD(3), LD(2), MD(2); call these AD1-AD3, LD1-LD2, MD1-MD2
•An instruction stalls at issue if an appropriate reserveration station (RS) is not available. It may issue
in the cycle after the previous instruction writesback (i.e., if ADD X is stalled because all add RS’s
are occupied, and then one of the ADD’s writes back on cycle n, then the ADD X can issue on cycle
n+1).
•If more than one reservation station is available (e.g., ADD1 and ADD3), issue the instruction to the
RS with the lower number (e.g., ADD1).
1
pf3

Partial preview of the text

Download High Performance Computer Architecture - Homework 2 | CS 6290 and more Assignments Computer Science in PDF only on Docsity!

Name: GTid:

Homework 2

Prof. Loh

CS6290 - Spring 2007

Handed Out: 05 Feb 2006 (Mon)

Due: 16 Sep 2006 (Fri - by email)

For problems 1-3, unless otherwise specified, make the following assumptions:

  • One instruction can issue (allocate) per cycle
  • Latencies: ADD (1), LOAD(4), MUL(8), DIV(20)
  • There is one adder, one multiply/divide unit, one load port
  • Functional units are not pipelined
  • Write Result and Exec occur in the same cycle (i.e., an instruction writes to the CDB in cycle n, and its dependent instruction can start execution in cycle n as well)
  • There is a single CDB
  • Reservation stations: ADD(3), LD(2), MD(2); call these AD1-AD3, LD1-LD2, MD1-MD
  • An instruction stalls at issue if an appropriate reserveration station (RS) is not available. It may issue in the cycle after the previous instruction writesback (i.e., if ADD X is stalled because all add RS’s are occupied, and then one of the ADD’s writes back on cycle n, then the ADD X can issue on cycle n+1).
  • If more than one reservation station is available (e.g., ADD1 and ADD3), issue the instruction to the RS with the lower number (e.g., ADD1).
  1. Tomasulo’s Algorithm For each of the following instructions, write the RS identifier that the instruction issues to, write the sources (e.g., R2 if read from the register file, MD1 if waiting on MD1’s result), and the cycle in which the instruction issues, executes, and writes-back its result. Instruction RS Source(s) Issue Execute Writeback Comments DIV R1 = R2/R3 MD1 R2, R3 1 2-21 22 LOAD R4 = 0[R5] MUL R2 = R1 * R ADD R3 = R5 + R DIV R6 = R7/R ADD R1 = R4+R LOAD R4 = 4[R5] ADD R1 = R1 + R ADD R1 = R1 + R LOAD R3 = 0[R5]
  2. Reorder-buffer Repeat the previous exercise using the same assumptions except with the following differences: - There is a re-order buffer with six entries (ROB1-ROB6). - Rename instructions based on the ROB identifier. - Instructions commit in program order, at a rate of at most one instruction per cycle. - Similar to the deallocation of RS entries, if an instruction in ROBi commits in cycle n, a new instruction cannot issue into ROBi until cycle n+1.

Instruction RS ROB Source(s) Issue Execute Writeback Commit Comments DIV R1 = R2/R3 MD1 ROB1 R2, R3 1 2-21 22 23 LOAD R4 = 0[R5] MUL R2 = R1 * R ADD R3 = R5 + R DIV R6 = R7/R ADD R1 = R4+R LOAD R4 = 4[R5] ADD R1 = R1 + R ADD R1 = R1 + R LOAD R3 = 0[R5]