Lecture Notes on Loose Ends - Computer Architecture | ECE 511, Study notes of Computer Architecture and Organization

Material Type: Notes; Class: Computer Architecture; Subject: Electrical and Computer Engr; University: University of Illinois - Urbana-Champaign; Term: Fall 2004;

Typology: Study notes

Pre 2010

Uploaded on 03/16/2009

koofers-user-z4d
koofers-user-z4d šŸ‡ŗšŸ‡ø

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 511: Computer Architecture 4 Oct 2004
Lecture 11: Loose Ends
Lecturer: Matt Frank Scribe: Troy Becicka
1 How does the scoreboard determine when the source registers
for an instruction are ready?
Consider the following set of instructions in the scoreboard:
Instruction True dep. Issue Ready (complete)
MUL10 R5←R1, R20 0 10
ADD5R6←R3, R40 1 6
SUB5R7←R5, R610 10 15
ADD5R12 ←R8, R90 2 7
ADD5R13 ←R10, R11 0 3 8
DIV20 R14 ←R12, R13 8 8 28
The scoreboard maintains a Register Ready Table, which has one bit for each physical register.
As an instruction enters the scoreboard (dispatch), its physical destination register is marked not
ready. As an instruction completes, its physical destination register is marked ready.
There is a lot of pressure on the Register Ready Table. For instance, with a scoreboard size of
8, we need 2 write ports and 16 read ports. We need two write ports because we must mark the
entering (dispatched) instruction’s destination register not ready and the completing instruction’s
destination register ready. We need 16 read ports because all 8 instructions in the scoreboard need
to read the ready status of both of their source registers each cycle.
Assume we have 27= 128 physical registers. In order to allow each scoreboard instruction to
access the Register Ready Table (RRT), we could route all 128 RRT output lines to the two source
register columns of the scoreboard. Each physical source register Riwould then use the 7-bit i
value as a MUX select to select the correct ready bit. Each instruction in the scoreboard could then
AND its two ready bits together to determine if the instruction was ready to issue.
An alternative is to have each instruction in the scoreboard watch the writeback bus and com-
pare each of its source registers with the name of the physical destination register being written
back. However, we would still need the RRT since an instruction’s source registers may have be-
come ready well before the instruction entered the scoreboard.
When multiple instructions are ready to issue on the same cycle, we can use a priority encoder
to select which instruction to issue first.
If you have a bypass path from the end of the Execute stage to the beginning of Execute, you
need to let the scoreboard RRT know that the register whose value you are bypassing will be ready
before it is written to the register file.
11: Loose Ends-1
pf2

Partial preview of the text

Download Lecture Notes on Loose Ends - Computer Architecture | ECE 511 and more Study notes Computer Architecture and Organization in PDF only on Docsity!

ECE 511: Computer Architecture 4 Oct 2004

Lecture 11: Loose Ends

Lecturer: Matt Frank Scribe: Troy Becicka

1 How does the scoreboard determine when the source registers

for an instruction are ready?

Consider the following set of instructions in the scoreboard:

Instruction True dep. Issue Ready (complete) MUL 10 R 5 ← R 1 , R 2 0 0 10 ADD 5 R 6 ← R 3 , R 4 0 1 6 SUB 5 R 7 ← R 5 , R 6 10 10 15 ADD 5 R 12 ← R 8 , R 9 0 2 7 ADD 5 R 13 ← R 10 , R 11 0 3 8 DIV 20 R 14 ← R 12 , R 13 8 8 28

The scoreboard maintains a Register Ready Table, which has one bit for each physical register. As an instruction enters the scoreboard (dispatch), its physical destination register is marked not ready. As an instruction completes, its physical destination register is marked ready. There is a lot of pressure on the Register Ready Table. For instance, with a scoreboard size of 8, we need 2 write ports and 16 read ports. We need two write ports because we must mark the entering (dispatched) instruction’s destination register not ready and the completing instruction’s destination register ready. We need 16 read ports because all 8 instructions in the scoreboard need to read the ready status of both of their source registers each cycle. Assume we have 27 = 128 physical registers. In order to allow each scoreboard instruction to access the Register Ready Table (RRT), we could route all 128 RRT output lines to the two source register columns of the scoreboard. Each physical source register Ri would then use the 7-bit i value as a MUX select to select the correct ready bit. Each instruction in the scoreboard could then AND its two ready bits together to determine if the instruction was ready to issue. An alternative is to have each instruction in the scoreboard watch the writeback bus and com- pare each of its source registers with the name of the physical destination register being written back. However, we would still need the RRT since an instruction’s source registers may have be- come ready well before the instruction entered the scoreboard. When multiple instructions are ready to issue on the same cycle, we can use a priority encoder to select which instruction to issue first. If you have a bypass path from the end of the Execute stage to the beginning of Execute, you need to let the scoreboard RRT know that the register whose value you are bypassing will be ready before it is written to the register file.

2 Arbitrating the writeback bus

Instruction Issue Complete MUL 10 0 10 ADD 5 1 6 ADD 5 2 7 ADD 5 3 8 ADD 5 4 9 ADD 5 5 10

On cycle 5, the scoreboard decides it cannot issue the last ADD because it will complete on cycle 10, along with the MUL, which was issued on cycle 0. Thus, we need to arbitrate the writeback bus in order to avoid conflicts. We can accomplish this by maintaining a writeback bus busy array.

Cycle 0 1 2 3 4 5 6 7 8 9 10 11 12 WB bus busy 0 0 0 0 0 0 1 1 1 1 1...

This structure allows us to arbitrate the writeback bus, but it assumes we know how long in- structions will take to execute. Of course, this is not the case with memory access instructions.