DE10332311B3 - Pipeline processing method for implementation of jump commands in which to speed processing jump command addresses and control information are stored in a special jump memory - Google Patents
Pipeline processing method for implementation of jump commands in which to speed processing jump command addresses and control information are stored in a special jump memory Download PDFInfo
- Publication number
- DE10332311B3 DE10332311B3 DE2003132311 DE10332311A DE10332311B3 DE 10332311 B3 DE10332311 B3 DE 10332311B3 DE 2003132311 DE2003132311 DE 2003132311 DE 10332311 A DE10332311 A DE 10332311A DE 10332311 B3 DE10332311 B3 DE 10332311B3
- Authority
- DE
- Germany
- Prior art keywords
- jump
- command
- memory
- control information
- pipeline
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000003672 processing method Methods 0.000 title 1
- 238000000034 method Methods 0.000 claims abstract description 23
- 238000006073 displacement reaction Methods 0.000 claims 2
- 230000006837 decompression Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000010561 standard procedure Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30145—Instruction analysis, e.g. decoding, instruction word fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3802—Instruction prefetching
- G06F9/3804—Instruction prefetching for branches, e.g. hedging, branch folding
- G06F9/3806—Instruction prefetching for branches, e.g. hedging, branch folding using address prediction, e.g. return stack, branch history buffer
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Advance Control (AREA)
Abstract
Description
Die vorliegende Erfindung betrifft ein Verfahren zur beschleunigten Ausführung eines Sprungbefehls, der mittels einer Pipeline-Verarbeitung eines Mikroprozessors ausgeführt wird.The present invention relates to a method for accelerated execution of a jump instruction, which is executed by pipeline processing a microprocessor.
Um die Effizienz moderner Mikroprozessoren zu steigern wird die mittlere Ausführungszeit von Befehlen durch eine Pipeline-Architektur mit mehreren Stufen beschleunigt. Dabei bearbeitet jede Pipeline-Stufe eine spezifische Aufgabe, bevor die Ausführung an die nächste Stufe der Pipeline weitergegeben wird. Somit kann auf jeder Stufe im Prozeß schneller an der jeweils spezifischen Aufgabe gearbeitet werden, wodurch die Pipeline insgesamt mit höheren Geschwindigkeiten arbeitet und der Gesamtdurchsatz und somit die Performance des Mikroprozessors erhöht wird.The efficiency of modern microprocessors the average execution time of instructions is increased by accelerated a pipeline architecture with multiple stages. there each pipeline stage processes a specific task before the execution to the next Stage of the pipeline is passed. So at every level faster in the process be worked on the specific task, whereby the Pipeline overall with higher Speeds works and the total throughput and thus the Performance of the microprocessor is increased.
Ein zu verarbeitender Befehl wird in nacheinander auszuführende Verarbeitungsschritte zerlegt und in den separaten Pipelinestufen ausgeführt. Ein Befehl kann beispielsweise in den folgenden Stufen einer Pipeline verarbeitet werden:
- – Laden des Befehls aus dem Befehlsspeicher oder aus einem externen Speicher,
- – Dekodieren des Befehls,
- – Bestimmung der Operanden des Befehls,
- – Laden der Operanden aus dem Speicher,
- – Ausführen der für den Befehl erforderlichen einen oder mehreren Operationen in einer oder mehreren Stufen und
- – Zurückschreiben der Ergebnisse der Operation oder der Adresse eines Sprungziels in Register oder Speicher.
- - loading the command from the command memory or from an external memory,
- - decoding the command,
- - determination of the operands of the instruction,
- Loading the operands from the memory,
- - Perform the one or more operations required for the command in one or more stages and
- - Write back the results of the operation or the address of a jump destination in register or memory.
Zur Ausführung des Befehls kann die Pipeline weitere hier nicht aufgeführte Stufen umfassen. So kann beispielsweise das Dekodieren eines Befehls mehrere Dekodierstufen erfordern, um Steuerinformationen der zur Ausführung des Befehls erforderlichen Schritte zu erhalten und diese an eine Ausführungseinheit eines Mikroprozessors weiterleiten zu können.To execute the command, the Pipeline include other stages not listed here. So can for example the decoding of a command several decoding stages require to provide control information of those required to execute the command Receive steps and these to an execution unit of a microprocessor to be able to forward.
Beim Vorliegen von Kontroll- und Datenabhängigkeiten zwischen nacheinander auszuführenden Befehlen muß die Pipeline angehalten werden.In the presence of control and data dependencies between successive executions The must command Pipeline to be stopped.
Kontrollabhängigkeiten liegen beispielsweise bei bedingten Sprüngen vor, da der nächste auszuführende Befehl erst bekannt ist, wenn die Bedingung des Sprungs ausgewertet ist. Die Abarbeitung des nächsten Befehls kann im Allgemeinen nicht überlappend gestartet werden.There are control dependencies, for example with conditional jumps before since the next one executed Command is only known when the condition of the jump is evaluated is. Processing the next one Command generally cannot be started overlapping.
Von Datenabhängigkeiten spricht man, wenn das Ergebnis eines Befehls in einem nachfolgenden Befehl als Operand benötigt wird.One speaks of data dependencies if that Result of an instruction in a subsequent instruction as an operand needed becomes.
Die Verarbeitung aller Befehle nach einer Abhängigkeit wird somit blockiert, bis die Bearbeitung aller Befehle vor der Abhängigkeit abgeschlossen ist. Dies hat zur Folge, daß die Pipeline angehalten wird und die Abarbeitung des Befehls um einige Prozeßzyklen verzögert ausgeführt wird.Processing all commands after a dependency is blocked until all commands have been processed before dependence is completed. As a result, the pipeline is stopped and the execution of the command is delayed by a few process cycles.
Eine Standardmethode, die einen Zeitverlust bei der Abarbeitung des Befehls in der Pipeline möglichst gering hält, stellt die Sprungvorhersage, die sogenannte Branch-Prediction, dar. Die dynamische Sprungvorhersage zur Beschleunigung der Ausführung von Sprüngen wird über einen sogenannten Branch-Prediction-Buffer, einem kleinen Speicher, realisiert, der zum Beispiel durch den niederwertigen Adreßteil des Sprungbefehls indiziert wird. Ein Speicher beinhaltet bestimmte Bits, die sogenannten Prediction-Bits als zum Beispiel 1-Bit oder 2-Bit Informationen, anhand derer es möglich ist, vorherzusagen, ob ein Sprung mit hoher Wahrscheinlichkeit ausgeführt wird oder nicht. Die Erzielung einer ho hen Genauigkeit einer Sprungvorhersage erfordert bei dieser Methode eine komplexe Logik für die Berechnung von Sprungwahrscheinlichkeiten.A standard method of wasting time keeps the execution of the command in the pipeline as low as possible represents the branch prediction. The dynamic branch prediction to speed up execution of jumps is about a so-called branch prediction buffer, a small memory, which is indicated, for example, by the low-order address part of the jump instruction becomes. A memory contains certain bits, the so-called prediction bits than 1-bit or 2-bit information, for example possible is to predict whether a jump is likely to occur or not. Achieving high accuracy of a jump prediction This method requires complex logic to calculate Jump probabilities.
Eine weitere Methode zur virtuellen Verkürzung der Pipeline im Zusammenhang mit der Branch-Prediction stellt die Verwendung eines Sprungziels-Speichers, eines sogenannten Branch-Target-Buffers, dar. Der Branch-Target-Buffer ist ein kleiner zusätzlicher Cachespeicher, der die vorhergesagte Zielsprungadresse für einen Sprungbefehl aufbewahrt und in der Regel mit den niederwertigsten Bits der Adresse des Sprungbefehls adressiert wird. Auf den Branch-Target-Buffer wird bereits während des Ladens des Befehls mit Hilfe der Befehlsadresse des aktuellen Befehls zugegriffen. Sollte es sich um einen Sprungbefehl handeln, kennt man die Zielsprungadresse bereits zum Ende des Befehls. Wird also im Branch-Target-Buffer zu einem Sprungbefehl ein Eintrag einer Sprungzieladresse gefunden, wird der zugeordnete Programmzähler als neuer Programmzähler gesetzt, wenn der Sprung genommen werden soll. Der unter der Zielsprungadresse befindliche Befehl muß von der vorhergesagten Adresse aus dem Befehlsspeicher geladen und anschließend in den vorgesehenen Dekodierstufen dekodiert werden, so daß die Steuerinformation zur Ausführung des Befehls der Ausführungsstufe der Pipeline zugeführt werden kann.Another method of virtual shortening the pipeline related to the branch prediction represents the Use of a jump target memory, a so-called branch target buffer. The branch target buffer is a small additional cache that keeps the predicted destination jump address for a jump instruction and usually addressed with the least significant bits of the address of the jump instruction becomes. The branch target buffer is already in use during the Load the command using the command address of the current command accessed. If it is a jump command, you know the destination jump address at the end of the command. So in Branch target buffer for a branch instruction found an entry of a branch target address, becomes the assigned program counter as a new program counter set if the jump should be taken. The one under the destination jump address command must be from the predicted address from the instruction memory and then in the intended decoding stages are decoded so that the control information for execution the execution level command fed to the pipeline can be.
In der
Eine weitere Methode, das Anhalten einer Pipeline zu verkürzen, wird über die in einem sogenannten Trace-Cache gespeicherten dekodierten Befehle verwirklicht. In diesem Trace-Cache wird unabhängig davon, ob es sich bei dem Befehl um einen Sprungbefehl handelt oder nicht, der dekodierte Befehl gespeichert. Auch diese Methode zeichnet sich durch einen hohen Implementierungsaufwand aus.Another method of stopping to shorten a pipeline, is about the decoded instructions stored in a so-called trace cache realized. In this trace cache becomes independent whether the instruction is a jump instruction or not, the decoded instruction is saved. This method also draws is characterized by a high implementation effort.
Die
Aufgabe der vorliegenden Erfindung ist es, ein Verfahren vorzuschlagen, bei dem Programme mit Sprungbefehlen beschleunigt ausgeführt werden.Object of the present invention is to propose a procedure in which programs with jump instructions accelerated become.
Die Aufgabe wird durch ein Verfahren gelöst, bei dem beim Vorliegen eines auszuführenden Sprungbefehls von einer Schreibstufe ein Sprung-Speicher nach einem Eintrag einer bekannten Sprungzieladresse und einer über zumindest eine Dekodierstufe erzeugte Steuerinformation des unter dieser Adresse befindlichen Befehls abgefragt wird,
- – beim Auffinden des Eintrags im Sprung-Speicher gleichzeitig die Steuerinformation an eine Ausführungsstufe der Pipeline weitergeleitet und der auf den Befehl unter der Sprungzieladresse folgende Befehl in eine Ladestufe der Pipeline geladen wird und
- – bei Nichtauffinden des Eintrags die Sprungzieladresse und der Steuerinformation des unter dieser Adresse befindlichen Befehls nach der Ausführung des Sprungbefehls in dem Sprung-Speicher abgespeichert wird.
- - When the entry in the jump memory is found, the control information is simultaneously forwarded to an execution stage of the pipeline and the command following the command under the jump destination address is loaded into a loading stage of the pipeline and
- - If the entry is not found, the jump destination address and the control information of the command located at this address are stored in the jump memory after the execution of the jump command.
Das erfindungsgemäße Verfahren weist den Vorteil auf, daß Sprungbefehle, die im Laufe einer Programmausführung vorher bereits ausgeführt wurden, beschleunigt werden. Dadurch daß ein Sprung-Speicher vorgesehen ist, der eine Zielsprungadresse und den dekodierten Befehl, d.h. die Steuerinformation des unter dieser Adresse befindlichen Befehls, speichert, kann die Dekodierstufe bzw. mehrere Dekodierstufen übersprungen werden. Dies hat zur Folge, daß die Pipeline virtuell um die Stufe des Dekodierens verkürzt wird und somit auch der Zeitverlust bei Sprüngen, da Taktzyklen eingespart werden, effektiv verkürzt wird.The method according to the invention has the advantage on that jump commands, which in the course of a program execution previously executed were accelerated. In that a jump memory is provided which is a destination hop address and the decoded instruction, i.e. the control information of the command located at this address, stores, the decoding stage or several decoding stages can be skipped become. As a result, the Pipeline is virtually shortened by the level of decoding and thus also the loss of time when jumping, since clock cycles are saved are effectively shortened becomes.
Zur Realisierung des Verfahrens bedarf es lediglich der Nutzung eines Speicherbereichs eines bereits verfügbaren Speichers eines Mikroprozessors oder der Verwendung eines zusätzlichen kleinen Cache-Speichers, so daß hierzu nur in geringem Umfang zusätzliche Hardware erforderlich ist.Requires to implement the procedure it is simply the use of a memory area of an already available memory a microprocessor or the use of an additional one small cache, so this only minor additional ones Hardware is required.
In Abhängigkeit der Verfügbarkeit von Speicherressourcen bietet das Verfahren auch die Möglichkeit, lediglich eine Vorstufe der dekodierten Steuerinformation eines Befehls in dem Sprung-Speicher abzuspeichern. Selbst das Einsparen der Ausführung einer einzelnen Dekodierstufe bewirkt bereits eine deutliche Steigerung in der Performance.Depending on availability of storage resources, the method also offers the possibility of just a preliminary stage of the decoded control information Command to store in the jump memory. Even saving the execution a single decoding stage already results in a significant increase in performance.
Werden die abzuspeichernden Steuerinformationen komprimiert, werden weitere Speicherressourcen eingespart. Die benötigten Steuerinformationen müssen lediglich beim Auslesen zur weiteren Verarbeitung beispielsweise durch eine Dekompressionsstufe dekomprimiert werden.Will the tax information to be saved compressed, additional memory resources are saved. The tax information required have to only when reading out for further processing, for example be decompressed by a decompression stage.
Nachfolgend werden Einzelheiten des erfindungsgemäßen Verfahrens anhand eines Beispiels unter Bezugnahme auf die Zeichnung näher erläutert.Below are details of the inventive method explained in more detail using an example with reference to the drawing.
Es zeigt:It shows:
Die
In der ersten Stufe
Wird beispielsweise in die Ladestufe
Wird in dem Sprung-Speicher
Somit wird die Ausführung von Sprungbefehlen, die im Laufe einer Programmausführung bereits ausgeführt wurden, wesentlich beschleunigt, da beim erneuten Laden des Sprungbefehls die Informationen zur Ausführung des unter dem Sprungziel befindlichen Befehls bereits im Sprung-Speicher vorliegen und somit einzelne Stufen der Pipeline übersprungen werden können. Hierdurch wird die Gesamtperformance des Mikroprozessors wesentlich erhöht.Thus the execution of Jump commands that have already been executed during program execution significantly accelerated because the reload of the jump command the execution information of the command located under the jump target is already in the jump memory are available and individual stages of the pipeline are thus skipped can. This makes the overall performance of the microprocessor essential elevated.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE2003132311 DE10332311B3 (en) | 2003-07-16 | 2003-07-16 | Pipeline processing method for implementation of jump commands in which to speed processing jump command addresses and control information are stored in a special jump memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE2003132311 DE10332311B3 (en) | 2003-07-16 | 2003-07-16 | Pipeline processing method for implementation of jump commands in which to speed processing jump command addresses and control information are stored in a special jump memory |
Publications (1)
Publication Number | Publication Date |
---|---|
DE10332311B3 true DE10332311B3 (en) | 2004-10-07 |
Family
ID=32946478
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
DE2003132311 Expired - Fee Related DE10332311B3 (en) | 2003-07-16 | 2003-07-16 | Pipeline processing method for implementation of jump commands in which to speed processing jump command addresses and control information are stored in a special jump memory |
Country Status (1)
Country | Link |
---|---|
DE (1) | DE10332311B3 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5511175A (en) * | 1990-02-26 | 1996-04-23 | Nexgen, Inc. | Method an apparatus for store-into-instruction-stream detection and maintaining branch prediction cache consistency |
DE69031229T2 (en) * | 1989-02-03 | 1998-05-07 | Nec Corp | Pipeline microprocessor with an instruction decoder that performs early decoding |
-
2003
- 2003-07-16 DE DE2003132311 patent/DE10332311B3/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE69031229T2 (en) * | 1989-02-03 | 1998-05-07 | Nec Corp | Pipeline microprocessor with an instruction decoder that performs early decoding |
US5511175A (en) * | 1990-02-26 | 1996-04-23 | Nexgen, Inc. | Method an apparatus for store-into-instruction-stream detection and maintaining branch prediction cache consistency |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE10084556B4 (en) | Optimized execution of statically most likely predicted branch instructions | |
DE69534113T2 (en) | Compression of the command words of a computer | |
DE2715073C3 (en) | Microprogrammed computer control device | |
DE69932066T2 (en) | MECHANISM FOR "STORE-TO-LOAD FORWARDING" | |
DE69738188T2 (en) | METHOD AND APPARATUS FOR INCREASED ACCURACY IN THE BRANCHING FORECAST IN A SUPERSCALAR MICROPROCESSOR | |
EP0689694B1 (en) | Process for the machine-generation of parallel processable command groups from a program for super-scalar microprocessors | |
DE60004640T2 (en) | METHOD AND DEVICE FOR JUMP FORECASTING USING A HYBRID BRANCH HISTORY WITH A COMMON ACCESS STRUCTURE | |
DE60032794T2 (en) | BIT DECOMPRESSION PROCESSING WITH A VERSATILE ALIGNMENT TOOL | |
DE69133571T2 (en) | Data processor with the ability to execute two instructions simultaneously | |
DE10306051B4 (en) | A method for optimizing the processing of instructions by a processor and processors for performing the methods | |
DE112004001040T5 (en) | Method and data processor with reduced operation interruption due to operand dependencies | |
DE4134392C2 (en) | Method and apparatus for invalidating commands in devices with parallel processing | |
DE102005001679B4 (en) | Microprocessor device, and method for branch prediction for conditional branch instructions in a microprocessor device | |
DE10332311B3 (en) | Pipeline processing method for implementation of jump commands in which to speed processing jump command addresses and control information are stored in a special jump memory | |
CH635451A5 (en) | ARRANGEMENT FOR SWITCHING BETWEEN PROGRAMS TO BE PROCESSED IN A DATA PROCESSING SYSTEM. | |
DE2702722A1 (en) | INSTRUCTION INTERPRETATION IN ELECTRONIC DATA PROCESSING SYSTEMS | |
DE69835159T2 (en) | MICROPROCESSOR with extreme value commands and comparison commands | |
DE10028064B4 (en) | Computer system with ROM correction units | |
DE10196152B3 (en) | Programmable control device | |
DE102016108081A1 (en) | Microprocessor with additional commands for binary search and associated search method | |
DE102005036605B4 (en) | Fast universal computer architecture with automatic program variant selection | |
DE19983210B4 (en) | Programmable control device | |
DE19950784B4 (en) | A branch instruction prediction system for a computer instruction pipeline and a method for prefetching a instruction code during execution of a conditional branch instruction | |
WO1991019251A1 (en) | Method of processing a user programme in a parallel-computer system | |
DE3740877A1 (en) | System and method to increase the data throughput performance in a pipeline microprocessor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
8100 | Publication of patent without earlier publication of application | ||
8364 | No opposition during term of opposition | ||
R119 | Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal fee |