Scoreboarding

Scoreboarding

Scoreboarding is a centralized method, used in the CDC 6600, for dynamically scheduling a pipeline so that the instructions can execute out of order when there are no conflicts and the hardware is available. In a scoreboard, the data dependencies of every instruction are logged. Instructions are released only when the scoreboard determines that there are no conflicts with previously issued and incomplete instructions. If an instruction is stalled because it is unsafe to continue, the scoreboard monitors the flow of executing instructions until all dependencies have been resolved before the stalled instruction is issued.

Stages

Instructions are decoded in order and go through the following four stages.

# Issue: The system checks which registers will be read and written by this instruction. This information is remembered as it will be needed in the following stages. In order to avoid output dependencies (WAW - Write after Write) the instruction is stalled until instructions intending to write to the same register are completed. The instruction is also stalled when required functional units are currently busy.
# Read operands: After an instruction has been issued and correctly allocated to the required hardware module, the instruction waits until all operands become available. This procedure resolves real dependencies (RAW - Read after Write) because registers which are intended to be written by another instruction are not considered "available" until they are actually written.
# Execution: When all operands have been fetched, the functional unit starts its execution. After the result is ready, the scoreboard is notified.
# Write Result: In this stage the result is about to be written to its destination register. However, this operation is delayed until earlier instructions—which intend to read registers this instruction wants to write to—have completed their "read operands" stage. This way, so called data dependencies (WAR - Write after Read) can be addressed.

Data structure

To control the execution of the instructions, the scoreboard maintains three status tables:

* Instruction Status: Indicates, for each instruction being executed, which of the four stages it is in.
* Functional Unit Status: Indicates the state of each functional unit. Each function unit maintains 9 fields in the table:
** Busy: Indicates whether the unit is being used or not
** Op: Operation to perform in the unit (e.g. MUL, DIV or MOD)
** Fi: Destination register
** Fj,Fk: Source-register numbers
** Qj,Qk: Functional units that will produce the source registers Fj, Fk
** Rj,Rk: Flags that indicates when Fj, Fk are ready
* Register Status: Indicates, for each register, which function unit will write results into it.

The algorithm

The detailed algorithm for the scoreboard control is described below:

function issue("op", "dst", "src1", "src2") wait until (!Busy [FU] AND !Result ["dst"] ); // FU can be any functional unit that can execute operation "op" Busy [FU] ← Yes; Op [FU] ← "op"; Fi [FU] ← "dst"; Fj [FU] ← "src1"; Fk [FU] ← "src2"; Qj [FU] ← Result ["src1"] ; Qk [FU] ← Result ["src2"] ; Rj [FU] ← not Qj; Rk [FU] ← not Qk; Result ["dst"] ← FU; function read_operands("FU") wait until (Rj ["FU"] AND Rk ["FU"] ); Rj ["FU"] ← No; Rk ["FU"] ← No; function execute("FU") // Execute whatever "FU" must do function write_back("FU") wait until (forallf {(Fj [f] ≠Fi ["FU"] OR Rj [f] =No) AND (Fk [f] ≠Fi ["FU"] OR Rk [f] =No)}) foreach f do if Qj [f] ="FU" then Rj [f] ← Yes; if Qk [f] ="FU" then Rk [f] ← Yes; Result [Fi ["FU"] ← 0; Busy ["FU"] ← No;

Remarks

The scorebording method must stall the issue stage when there is no functional unit available. In this case, future instructions that could potentially be executed will wait until the structural hazard is resolved. Some other techniques like Tomasulo algorithm can avoid the structural hazard and also resolve WAR and WAW dependencies with register renaming.

External links

* [http://www.cs.umd.edu/class/fall2001/cmsc411/projects/dynamic/scoreboard.html Dynamic Scheduling - Scoreboard]
* "Computer Architecture: A Quantitative Approach", John L. Hennessy & David A. Patterson
* " [http://www.eecs.berkeley.edu/~culler/courses/cs252-s05/lectures/cs252s05-lec06-scoreboard.ppt EECS 252 Graduate Computer Architecture Lec XX - TOPIC] ", Electrical Engineering and Computer Sciences, Berkeley, University of California.

See also

* Instruction level parallelism
* Tomasulo algorithm
* Out-of-order execution


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Scoreboarding — bzw. Punkttafel Verfahren ist ein Algorithmus zur Implementierung von dynamischem Scheduling in Prozessoren. Hierbei wird an zentraler Stelle, im Scoreboard (auch Punkttafel), überprüft, ob Betriebsmittelabhängigkeiten, Datenabhängigkeiten oder… …   Deutsch Wikipedia

  • Außer-der-Reihe-Ausführung — Dieser Artikel oder Abschnitt ist nicht hinreichend mit Belegen (Literatur, Webseiten oder Einzelnachweisen) versehen. Die fraglichen Angaben werden daher möglicherweise demnächst gelöscht. Hilf Wikipedia, indem du die Angaben recherchierst und… …   Deutsch Wikipedia

  • Out-of-Order-Execution — Dieser Artikel oder Abschnitt ist nicht hinreichend mit Belegen (Literatur, Webseiten oder Einzelnachweisen) versehen. Die fraglichen Angaben werden daher möglicherweise demnächst gelöscht. Hilf Wikipedia, indem du die Angaben recherchierst und… …   Deutsch Wikipedia

  • Out-of-order — Dieser Artikel oder Abschnitt ist nicht hinreichend mit Belegen (Literatur, Webseiten oder Einzelnachweisen) versehen. Die fraglichen Angaben werden daher möglicherweise demnächst gelöscht. Hilf Wikipedia, indem du die Angaben recherchierst und… …   Deutsch Wikipedia

  • Tomasulo algorithm — The Tomasulo algorithm is a hardware algorithm developed in 1967 by Robert Tomasulo from IBM. It allows sequential instructions that would normally be stalled due to certain dependencies to execute non sequentially (out of order execution). It… …   Wikipedia

  • Parallel computing — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computing …   Wikipedia

  • Hazard (computer architecture) — Hazards are problems with the instruction pipeline in central processing unit (CPU) microarchitectures that potentially result in incorrect computation. There are typically three types of hazards: data hazards structural hazards control hazards… …   Wikipedia

  • Out-of-order execution — In computer engineering, out of order execution (OoOE or OOE) is a paradigm used in most high performance microprocessors to make use of instruction cycles that would otherwise be wasted by a certain type of costly delay. In this paradigm, a… …   Wikipedia

  • Out-of-order execution — (in etwa: Außer der Reihe Ausführung) bezeichnet die Möglichkeit, Befehle in den Ausführungseinheiten eines (meist) superskalaren Prozessors außerhalb der Programmreihenfolge auszuführen, mit dem Ziel, die Pipelines möglichst gut auszulasten.… …   Deutsch Wikipedia

  • Tomasulo — Der Tomasulo Algorithmus ist ein Algorithmus zur Implementierung von dynamischem Scheduling in Prozessoren. Er wurde von Robert Tomasulo bei IBM entwickelt ursprünglich für die Gleitkommaeinheit des 360/91[1]. Inhaltsverzeichnis 1 Einordnung 2… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”