JP2006004234A - Instruction execution control system for microprocessor - Google Patents
Instruction execution control system for microprocessor Download PDFInfo
- Publication number
- JP2006004234A JP2006004234A JP2004180782A JP2004180782A JP2006004234A JP 2006004234 A JP2006004234 A JP 2006004234A JP 2004180782 A JP2004180782 A JP 2004180782A JP 2004180782 A JP2004180782 A JP 2004180782A JP 2006004234 A JP2006004234 A JP 2006004234A
- Authority
- JP
- Japan
- Prior art keywords
- data
- conflict
- instruction execution
- determination circuit
- occurrence
- 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.)
- Pending
Links
Images
Abstract
Description
本発明はマイクロプロセッサの処理能力を向上させるための命令実行制御方式に関する。 The present invention relates to an instruction execution control system for improving the processing capability of a microprocessor.
従来、マイクロプロセッサの処理能力向上技術として、処理の並列度を高めるための様々な技術が開発されている。VLIW(Very Long Instruction Word)方式に関する処理能力向上技術としては特許文献1に記載されているものがある。 Conventionally, various techniques for improving the parallelism of processing have been developed as techniques for improving the processing capability of a microprocessor. Patent Document 1 discloses a technology for improving processing capability related to the VLIW (Very Long Instruction Word) method.
VLIW方式は1つの命令語中に複数の命令を収容し、それらを同時に実行する方式であり、実行する命令間に依存関係(データコンフリクト等)が極力発生しないように、事前にコンパイラによってプログラムを最適化する。同時に実行される命令がない場合はNOP(No Operation)命令が実行されるため、処理性能を向上させるためにはコンパイラによる最適化技術が要求される。
しかしながら、従来の方式では、データコンフリクト等の依存関係が頻発する場合はパイプラインストールが大きな問題となり、処理能力が悪化してしまうという問題があった。 However, the conventional method has a problem that the pipeline installation becomes a big problem when the dependency such as data conflict occurs frequently, and the processing capability deteriorates.
本発明は、マイクロプロセッサの命令実行において、データコンフリクトが生じた場合に制御系が自動的に状況を判断し、コンパイラによる最適化を必要とせずに、実行する命令間の依存関係によるコンフリクトを回避することが可能な命令実行制御方式を提供することを目的とする。 In the present invention, when a data conflict occurs in the instruction execution of the microprocessor, the control system automatically determines the situation and avoids the conflict due to the dependency between the instructions to be executed without requiring optimization by the compiler. An object of the present invention is to provide an instruction execution control method that can be used.
本発明の命令実行制御方式における第1の態様は、命令メモリ、デコーダ、演算部、記憶領域を有し、パイプライン方式で命令を実行するマイクロプロセッサにおいて、前記デコーダにおける複数の命令デコード情報により命令実行時のデータコンフリクト発生を予測判定しデータコンフリクト発生時のタイミングと前記記憶領域のデータアドレスを特定する判定回路と、前記判定回路によりデータコンフリクト発生が予測された場合にコンフリクト回避制御信号を生成する制御回路と、前記コンフリクト回避制御信号に応じて前記判定回路により特定された前記記憶領域のデータアドレスのデータを一時保持するラッチと、前記コンフリクト回避制御信号に応じて前記判定回路により特定されたデータコンフリクト発生時のタイミングでデータ選択を行うセレクタと、を備えてパイプラインストールの回避を行うものである。 According to a first aspect of the instruction execution control system of the present invention, in a microprocessor having an instruction memory, a decoder, an operation unit, and a storage area and executing instructions in a pipeline system, instructions are executed by a plurality of instruction decode information in the decoder. A determination circuit that predicts and determines the occurrence of data conflict at the time of execution and identifies the timing when the data conflict occurs and the data address of the storage area, and generates a conflict avoidance control signal when the determination circuit predicts the occurrence of data conflict A control circuit; a latch that temporarily holds data at the data address of the storage area specified by the determination circuit in response to the conflict avoidance control signal; and data specified by the determination circuit in response to the conflict avoidance control signal At the time of conflict occurrence And the selector to perform the data selection, is performed to avoid pipeline stall equipped with a.
本発明の命令実行制御方式における第2の態様は、第1の態様の命令実行制御方式において、前記セレクタは、通常は前記記憶領域のデータを選択し、前記判定回路により特定されたデータコンフリクト発生時のタイミングでは前記ラッチに保持されたデータを選択し、前記選択したデータを前記演算部に送るものである。 According to a second aspect of the instruction execution control system of the present invention, in the instruction execution control system according to the first aspect, the selector normally selects data in the storage area and generates a data conflict specified by the determination circuit. At the timing, the data held in the latch is selected and the selected data is sent to the arithmetic unit.
これら第1および第2の態様の構成によれば、判定回路によりデータコンフリクト発生を予測判定し、制御回路によりデータコンフリクトを回避するための制御信号を生成することによって、データコンフリクト発生時に必要となる記憶領域のデータをラッチに一時保持し、データコンフリクト発生時にラッチのデータを選択することで誤ったデータを使用しないようにすることができるため、データコンフリクトを回避することができ、処理能力を向上させることができる。 According to the configurations of the first and second aspects, the determination circuit predicts and determines the occurrence of data conflict, and the control circuit generates the control signal for avoiding the data conflict, which is necessary when the data conflict occurs. Data in the storage area is temporarily held in the latch, and when the data conflict occurs, the data in the latch can be selected so that the wrong data is not used, so data conflict can be avoided and the processing capacity is improved. Can be made.
本発明の命令実行制御方式における第3の態様は、第1の態様の命令実行制御方式において、前記デコーダおよび前記判定回路は、パイプラインの段数に応じてデータコンフリクト発生の予測判定に必要な複数の命令を常時処理するものである。 According to a third aspect of the instruction execution control system of the present invention, in the instruction execution control system of the first aspect, the decoder and the determination circuit include a plurality of decoders necessary for predicting the occurrence of data conflict according to the number of pipeline stages. Is always processed.
この構成によれば、データコンフリクト発生の予測判定に必要な数命令先の命令コードを保持し、データコンフリクトが発生するのか否かの判定を行うことができるため、パイプライン段数によらずデータコンフリクト発生を予測判定することができる。 According to this configuration, it is possible to retain the instruction code of several instructions ahead necessary for predicting the occurrence of the data conflict and determine whether or not the data conflict occurs, so that the data conflict can be performed regardless of the number of pipeline stages. Occurrence can be predicted.
本発明によれば、データコンフリクトの発生をあらかじめ予測し、そのデータをラッチに一時保持することにより、所定のアドレスからの正しいデータを使用するとともに、そのアドレスに対するデータの書き込みも同時にできるため、データコンフリクトを回避することができ、マイクロプロセッサの処理性能を向上させることができる。 According to the present invention, the occurrence of a data conflict is predicted in advance, and the data is temporarily held in the latch, so that correct data from a predetermined address can be used and data can be written to the address at the same time. Conflicts can be avoided and the processing performance of the microprocessor can be improved.
以下、本発明の実施形態について図面を参照しながら説明する。図1は本発明の一実施の形態に係る命令実行制御方式を実施するマイクロプロセッサの構成を示すブロック図である。図1において、マイクロプロセッサは、命令メモリ1、デコーダ2、演算部3、記憶領域(レジスタ、メモリ)4、判定回路10、制御回路11、ラッチ12、セレクタ13、14から構成され、データバス1、データバス2、データバス3を備えている。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a microprocessor for implementing an instruction execution control system according to an embodiment of the present invention. In FIG. 1, the microprocessor includes an instruction memory 1, a
命令メモリ1から読み出された命令はデコーダ2でデコードされ、そのデータがデータバス1を介して演算部3および記憶領域4に送られる。セレクタ14は記憶領域4またはラッチ12のデータを選択し、それがデータバス2を介して演算部3に送られる。演算部3の出力はデータバス3を介して記憶領域4に送られる。
The instruction read from the instruction memory 1 is decoded by the
判定回路10はデコーダ2によるデコード結果の情報からコンフリクトが発生する時間と記憶領域のアドレスを判断する。制御回路11は判定回路10の判断結果に基づき制御信号1と制御信号2を生成する。
The
制御信号1はコンフリクトが発生するアドレスのデータを選択し、そのデータを記憶領域4からラッチ12へ転送し、これをラッチ12で一時保持する。制御信号2はデータが衝突しないように、記憶領域4もしくはラッチ12の一方のデータを選択する。すなわち、コンフリクトが発生している場合はラッチ12のデータをデータバス2に転送し、コンフリクトが発生していない場合は記憶領域4のデータをデータバス2に転送する。
The control signal 1 selects data at an address where a conflict occurs, transfers the data from the
図2は、従来方式の問題例として、5段パイプライン制御時にコンフリクトが発生する場合を説明する図である。図2に示す5段パイプラインにおいて、各段はそれぞれ、IF(命令フェッチ)、DEC(命令デコーダ)、EX(命令実行)、MA(メモリアクセス)、WB(レジスタ書き込み)である。 FIG. 2 is a diagram illustrating a case where a conflict occurs during 5-stage pipeline control as an example of a problem with the conventional method. In the 5-stage pipeline shown in FIG. 2, each stage is IF (instruction fetch), DEC (instruction decoder), EX (instruction execution), MA (memory access), and WB (register write).
命令Aと命令Bの関係として、命令Aにおいて特定のレジスタにデータをライトしようとすることと同時に、命令Bにおいてこのレジスタからデータをリードする場合にコンフリクトが発生する。従来方式であれば数サイクルのストールが発生し、処理が悪化していた。 As a relation between the instruction A and the instruction B, a conflict occurs when data is read from this register in the instruction B at the same time that data is written in the specific register in the instruction A. In the case of the conventional method, a stall of several cycles occurred, and the processing deteriorated.
図3は本実施形態による命令実行制御動作を示すフローチャートである。ステップ31において命令メモリ1からのデータをデコーダ2で命令デコードし、ステップ32において判定回路10によりコンフリクトが発生する可能性を判断し、コンフリクト発生によりバス制御が必要と判断した場合は、その時間とアドレスを特定する。
FIG. 3 is a flowchart showing an instruction execution control operation according to the present embodiment. In
その情報に基づき、ステップ33において制御回路11が制御信号を生成し、ステップ34においてコンフリクトが発生しているアドレスのデータをラッチ12に一時保持する。ラッチ12に保持されたデータは、ステップ35においてコンフリクトが発生する時間にセレクタ14を介してデータバスに転送される。
Based on the information, the
このようにして、コンフリクトが発生している箇所に対して読み出しと同時にデータを書き込むことができるため、コンフリクトが生じても処理性能を落とすことなく命令を実行することができる。 In this way, data can be written at the same time as reading to a location where a conflict has occurred. Therefore, even if a conflict occurs, an instruction can be executed without degrading the processing performance.
本発明のマイクロプロセッサにおける命令実行制御方式は、コンフリクトが発生した場合の回避を可能にすし、汎用的なプロセッサにおいてコンフリクト発生による処理性能の悪化を回避することができる点において有用である。 The instruction execution control method in the microprocessor of the present invention is useful in that it can be avoided when a conflict occurs, and a general-purpose processor can avoid deterioration in processing performance due to the occurrence of conflict.
1 命令メモリ
2 デコーダ
3 演算部
4 記憶領域(レジスタ、メモリ)
10 判定回路
11 制御回路
12 ラッチ
13、14 セレクタ
31〜35 ステップ
IF 命令フェッチ
DEC 命令デコーダ
EX 命令実行
MA メモリアクセス
WB レジスタ書き込み
1
10
Claims (3)
前記デコーダにおける複数の命令デコード情報により命令実行時のデータコンフリクト発生を予測判定し、データコンフリクト発生時のタイミングと前記記憶領域のデータアドレスを特定する判定回路と、
前記判定回路によりデータコンフリクト発生が予測された場合にコンフリクト回避制御信号を生成する制御回路と、
前記コンフリクト回避制御信号に応じて前記判定回路により特定された前記記憶領域のデータアドレスのデータを一時保持するラッチと、
前記コンフリクト回避制御信号に応じて前記判定回路により特定されたデータコンフリクト発生時のタイミングでデータ選択を行うセレクタと、
を備えてパイプラインストールの回避を行うマイクロプロセッサの命令実行制御方式。 An instruction execution control method in a microprocessor that has an instruction memory, a decoder, a calculation unit, and a storage area and executes instructions in a pipeline manner,
A determination circuit for predicting and determining occurrence of data conflict at the time of executing an instruction based on a plurality of instruction decode information in the decoder, and specifying a timing at the time of data conflict occurrence and a data address of the storage area;
A control circuit that generates a conflict avoidance control signal when a data conflict occurrence is predicted by the determination circuit;
A latch that temporarily holds data at the data address of the storage area specified by the determination circuit in response to the conflict avoidance control signal;
A selector that performs data selection at the time of occurrence of data conflict specified by the determination circuit according to the conflict avoidance control signal;
A microprocessor instruction execution control system that avoids pipeline installation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004180782A JP2006004234A (en) | 2004-06-18 | 2004-06-18 | Instruction execution control system for microprocessor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004180782A JP2006004234A (en) | 2004-06-18 | 2004-06-18 | Instruction execution control system for microprocessor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006004234A true JP2006004234A (en) | 2006-01-05 |
Family
ID=35772572
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004180782A Pending JP2006004234A (en) | 2004-06-18 | 2004-06-18 | Instruction execution control system for microprocessor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006004234A (en) |
-
2004
- 2004-06-18 JP JP2004180782A patent/JP2006004234A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8954946B2 (en) | Static branch prediction method and code execution method for pipeline processor, and code compiling method for static branch prediction | |
CN112368677B (en) | Selectively performing early branch prediction based on type of branch instruction | |
KR100983135B1 (en) | Processor and method of grouping and executing dependent instructions in a packet | |
JP4864840B2 (en) | Microprocessor | |
JP4202244B2 (en) | VLIW DSP and method of operating the same | |
WO2019236294A1 (en) | Storing incidental branch predictions to reduce latency of misprediction recovery | |
JP5233078B2 (en) | Processor and processing method thereof | |
US20080282071A1 (en) | Microprocessor and register saving method | |
JP2001243070A (en) | Processor and branch predicting method and compile method | |
JP2008299729A (en) | Processor | |
JP2006004234A (en) | Instruction execution control system for microprocessor | |
JP4889235B2 (en) | Program control processor | |
JP4728877B2 (en) | Microprocessor and pipeline control method | |
US20040019773A1 (en) | Illegal instruction processing method and processor | |
KR100516214B1 (en) | A digital signal processor for parallel processing of instructions and its process method | |
JP2008107913A (en) | Program, software conversion device and computer | |
US20110010529A1 (en) | Instruction execution control method, instruction format, and processor | |
JP5679263B2 (en) | Information processing apparatus and microinstruction processing method | |
US20090119492A1 (en) | Data Processing Apparatus and Method for Handling Procedure Call Instructions | |
JP3150667B2 (en) | Condition flag rewriting control method and circuit | |
EP4208783A1 (en) | Alternate path for branch prediction redirect | |
JP2004287919A (en) | Arithmetic unit, controller, processor, arithmetic method, and arithmetic program | |
JP2005149297A (en) | Processor and assembler thereof | |
KR101949417B1 (en) | Processor, Apparatus and method for generating instruction | |
JP2006235723A (en) | Instruction fetch circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20060327 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070122 |
|
RD02 | Notification of acceptance of power of attorney |
Effective date: 20071114 Free format text: JAPANESE INTERMEDIATE CODE: A7422 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20071121 |
|
RD02 | Notification of acceptance of power of attorney |
Effective date: 20071128 Free format text: JAPANESE INTERMEDIATE CODE: A7422 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20071205 |
|
RD04 | Notification of resignation of power of attorney |
Effective date: 20071212 Free format text: JAPANESE INTERMEDIATE CODE: A7424 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080430 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20081202 |