HOME

TheInfoList



OR:

Scoreboarding is a centralized method, first used in the
CDC 6600 The CDC 6600 was the flagship of the 6000 series of mainframe computer systems manufactured by Control Data Corporation. Generally considered to be the first successful supercomputer, it outperformed the industry's prior recordholder, the IBM ...
computer, for dynamically scheduling instructions so that they can execute out of order when there are no conflicts and the hardware is available. In a scoreboard, the
data dependencies A data dependency in computer science is a situation in which a program statement (instruction) refers to the data of a preceding statement. In compiler theory, the technique used to discover data dependencies among statements (or instructions) is ...
of every instruction are logged, tracked and strictly observed at all times. Instructions are released only when the scoreboard determines that there are no conflicts with previously issued ("in flight") instructions. If an instruction is stalled because it is unsafe to issue (or there are insufficient resources), the scoreboard monitors the flow of executing instructions until all dependencies have been resolved before the stalled instruction is issued. In essence: reads proceed on the absence of write hazards, and writes proceed in the absence of read hazards. Scoreboarding is essentially a hardware implementation of the same underlying algorithm seen in
dataflow language In computer programming, dataflow programming is a programming paradigm that models a program as a directed graph of the data flowing between operations, thus implementing dataflow principles and architecture. Dataflow programming languages share ...
s, creating a
Directed Acyclic Graph In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one ve ...
, where the same logic is applied in the
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
runtime.


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 and where conflicts
WAR War is an intense armed conflict between states, governments, societies, or paramilitary groups such as mercenaries, insurgents, and militias. It is generally characterized by extreme violence, destruction, and mortality, using regular o ...
and
RAW Raw is an adjective usually describing: * Raw materials, basic materials from which products are manufactured or made * Raw food, uncooked food Raw or RAW may also refer to: Computing and electronics * .RAW, a proprietary mass spectrometry dat ...
and
WAW Waw or WAW may refer to: * Waw (letter), a letter in many Semitic abjads * Waw, the velomobile * Another spelling for the town Wau, South Sudan * Waw Township, Burma *Warsaw Chopin Airport, an international airport serving Warsaw, Poland (IATA ai ...
are detected. RAW and WAR hazards are recorded using a Dependency Matrix (constructed from SR NOR latches in the original 6600 design) as it will be needed in the following stages. Simultaneously, an entry is recorded in a second Matrix, which records the instruction order as a
Directed Acyclic Graph In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one ve ...
. In order to avoid output dependencies (
WAW Waw or WAW may refer to: * Waw (letter), a letter in many Semitic abjads * Waw, the velomobile * Another spelling for the town Wau, South Sudan * Waw Township, Burma *Warsaw Chopin Airport, an international airport serving Warsaw, Poland (IATA ai ...
– 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. No instruction is ever issued unless it is fully trackable from start to finish. # Read operands: After an instruction has been issued and correctly allocated to the required hardware module (named a Computation Unit in Thornton's book), the Unit waits until all operands become available. The read only proceeds when write dependencies (
RAW Raw is an adjective usually describing: * Raw materials, basic materials from which products are manufactured or made * Raw food, uncooked food Raw or RAW may also refer to: Computing and electronics * .RAW, a proprietary mass spectrometry dat ...
– Read after Write) have been dropped from all other Units. To avoid Register File Port contention, a Priority Picker selects one Computational Unit (in the case where several Units are clear of hazards). # Execution: When all operands have been fetched, the Computation Unit starts its execution. After the result is ready, the scoreboard is notified. # Write Result: In this stage the result is ready but has not yet been written to its destination register. The write may not proceed until the Unit is clear of all (
WAR War is an intense armed conflict between states, governments, societies, or paramilitary groups such as mercenaries, insurgents, and militias. It is generally characterized by extreme violence, destruction, and mortality, using regular o ...
– Write after Read) hazards. The only additional delays here are based on availability of register file ports: in the 6600 a Priority Picker was used to select one result per write port. Once written the unit is marked as no longer busy, and all hazards and state is dropped. Note that only in advanced (augmented, precise) scoreboards with "Shadow" capability will the Write Result phase be prevented (delayed). The original 6600 did not have this capability. It is critical to note above that Reads only proceed in the absence of ''write'' hazards, and that writes proceed in the absence of ''Read'' hazards. This is logical but contraindicative to expectations. In particular, note that Writes must wait to write after read in order to give other units the opportunity to read the current value in a register, before overwriting it with the new one. Hence why writes must wait until the ''absence'' of WaR hazards.


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 for and are not yet read. * Register Status: Indicates, for each register, which function unit will write results into it.


The original 6600 algorithm

The detailed algorithm for the scoreboard control, outlined in the original patent, is described below: function issue(''op'', ''dst'', ''src1'', ''src2'') wait until (!Busy UAND !Result 'dst''; // FU can be any functional unit that can execute operation ''op'' Busy U← Yes; Op U← ''op''; Fi U← ''dst''; Fj U← ''src1''; Fk U← ''src2''; Qj U← Result 'src1'' Qk U← Result 'src2'' Rj U← Qj U

0; Rk U← Qk U

0; 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 (∀f ) foreach f do if Qj ''FU'' then Rj ← Yes; if Qk ''FU'' then Rk ← Yes; Result i[''FU''_←_0;_//_0_means_no_FU_generates_the_register's_result _____RegFile_i[''FU''.html"_;"title="i[''FU''">i[''FU''_←_''computed_value''; _____Busy_'FU''←_No;


__Remarks_

Thornton's_book_pre-dates_modern_computing__terminology. *_Function_Units_(pipelines)_were_called_"Computation_Units". *_"First_Order_Conflict"_covered_both_stall_due_to_all_Units_being_busy_and_also_covered_Hazard_(computer_architecture)#Write_after_write_(WAW).html" ;"title="'FU''.html" ;"title="i[''FU''">i[''FU'' ← 0; // 0 means no FU generates the register's result RegFile i[''FU'' ← ''computed value''; Busy 'FU''← No;


Remarks

Thornton's book pre-dates modern computing terminology. * Function Units (pipelines) were called "Computation Units". * "First Order Conflict" covered both stall due to all Units being busy and also covered Hazard_(computer_architecture)#Write_after_write_(WAW)">WAW conflict. * "Second Order Conflict" was the term used for RAW conflict. * "Third Order Conflict" covered Hazard_(computer_architecture)#Write_after_read_(WAR), WAR conflict. Stalling only occurred at the issue stage, when "First Order" conflicts were detected. Some other techniques like
Tomasulo algorithm Tomasulo's algorithm is a computer architecture hardware algorithm for dynamic scheduling of instructions that allows out-of-order execution and enables more efficient use of multiple execution units. It was developed by Robert Tomasulo at IBM in ...
additionally resolve WAW dependencies with
register renaming In computer architecture, register renaming is a technique that abstracts logical registers from physical registers. Every logical register has a set of physical registers associated with it. When a machine language instruction refers to a partic ...
. The original
CDC 6600 The CDC 6600 was the flagship of the 6000 series of mainframe computer systems manufactured by Control Data Corporation. Generally considered to be the first successful supercomputer, it outperformed the industry's prior recordholder, the IBM ...
likely did not have WAW hazard tracking simply because its designers had to deliver product, and then moved on to the 7600: stalling instead was the most expedient option. There is no ''technical'' reason why Register renaming should not be added to Scoreboards. An analysis of both algorithms was carried out by Luke Leighton and a transformation process outlined which shows equivalence between the Tomasulo algorithm and the 6600 Scoreboard algorithm. WAW hazards resolution is indeed missing from the original algorithm: the 6600 would stall at the first occurrence of a Write Hazard.


See also

*
Instruction level parallelism Instruction-level parallelism (ILP) is the parallel or simultaneous execution of a sequence of instructions in a computer program. More specifically ILP refers to the average number of instructions run per step of this parallel execution. Disc ...
*
Tomasulo algorithm Tomasulo's algorithm is a computer architecture hardware algorithm for dynamic scheduling of instructions that allows out-of-order execution and enables more efficient use of multiple execution units. It was developed by Robert Tomasulo at IBM in ...
*
Out-of-order execution In computer engineering, out-of-order execution (or more formally dynamic execution) is a paradigm used in most high-performance central processing units to make use of instruction cycles that would otherwise be wasted. In this paradigm, a proce ...


References

{{reflist *
Glenford Myers Glenford Myers (born December 12, 1946) is an American computer scientist, entrepreneur, and author. He founded two successful high-tech companies (RadiSys and IP Fabrics), authored eight textbooks in the computer sciences, and made important con ...
, "Register scoreboarding on a microprocessor chip", United States Patent 4891753


External links


Dynamic Scheduling - Scoreboard
* ''Computer Architecture: A Quantitative Approach'', John L. Hennessy & David A. Patterson *
EECS 252 Graduate Computer Architecture Lec XX - TOPIC
', Electrical Engineering and Computer Sciences, Berkeley, University of California.
Scoreboarding example
Instruction processing