JPH04235638A - Microprocessor provided with prefetching function - Google Patents

Microprocessor provided with prefetching function

Info

Publication number
JPH04235638A
JPH04235638A JP3001269A JP126991A JPH04235638A JP H04235638 A JPH04235638 A JP H04235638A JP 3001269 A JP3001269 A JP 3001269A JP 126991 A JP126991 A JP 126991A JP H04235638 A JPH04235638 A JP H04235638A
Authority
JP
Japan
Prior art keywords
instruction
fetched
stage
queue
microprocessor
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
Application number
JP3001269A
Other languages
Japanese (ja)
Inventor
Shoji Daito
大東 尚司
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Fuji Facom Corp
Original Assignee
Fuji Electric Co Ltd
Fuji Facom Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd, Fuji Facom Corp filed Critical Fuji Electric Co Ltd
Priority to JP3001269A priority Critical patent/JPH04235638A/en
Publication of JPH04235638A publication Critical patent/JPH04235638A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Retry When Errors Occur (AREA)

Abstract

PURPOSE:To improve a conventional case where the processing speed is deteriorated even with a microcomputer provided with a prefetching function owing to a fact that the parity check of the instruction fetched by the microcomputer is carried out via software in order to discriminate whether the fetched instruction becomes abnormal by the noises, etc., or not. CONSTITUTION:In a microcomputer provided with a prefetching function the fetched instruction is fetched at the first stage of a multi-stage instruction queue 3A having a FIFO configuration. Then the microcomputer fetches and carries out the instruction of the final stage of the queue 3A and then checks the parity of the instruction fetched at the first stage of the queue 3A. If the abnormality is confirmed, the relevant instruction is immediately disused and '$1' is added to a program counter 4. Then another instruction is automatically refetched by a built-in function. Thus the final instruction executing speed is never deterioration even with such an automatic retry operation.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はプリフェッチ機能を持ち
、命令フェッチと演算実行を同時に処理可能なマイクロ
プロセッサ、特に誤った命令のプリフェッチを検出し自
動的にリトライする機能を備えたマイクロプロセッサに
関する。なお以下各図において同一の符号は同一もしく
は相当部分を示す。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor having a prefetch function and capable of simultaneously processing instruction fetch and arithmetic execution, and more particularly to a microprocessor having a function of detecting an erroneous instruction prefetch and automatically retrying the prefetch. Note that in the following figures, the same reference numerals indicate the same or corresponding parts.

【0002】0002

【従来の技術】この種のプリフェッチ機能を持つマイク
ロプロセッサは一般に図5に示す構成を用いている。マ
イクロプロセッサ1はインストラクション・メモリ8か
ら読み出した(フェッチした)命令をプリフェッチ・ユ
ニット2内に設けられたFIFO(first  in
  first  out)構造の命令キュー3に貯め
込み、順次インストラクション実行ユニット5に受渡し
、命令実行を行う。このように命令実行と並行して次の
命令をフェッチすることにより、処理速度の向上を計っ
ている。
2. Description of the Related Art A microprocessor having this type of prefetch function generally uses the configuration shown in FIG. The microprocessor 1 reads (fetched) instructions from the instruction memory 8 into a FIFO (first in
The instructions are stored in an instruction queue 3 having a first out) structure and are sequentially delivered to an instruction execution unit 5 for instruction execution. In this way, processing speed is improved by fetching the next instruction in parallel with instruction execution.

【0003】0003

【発明が解決しようとする課題】上述のようなプリフェ
ッチ機能付マイクロプロセッサにおいて、インストラク
ション・メモリ8からフェッチした命令がノイズ等の外
的要因により、誤って命令キュー3に入るとインストラ
クション実行ユニット5が誤った処理をしてしまうとい
う問題がある。従来、この対策として図6に示すように
インストラクション・メモリ8にパリティビット9を付
加し、外部のパリティチェッカ10を介し、マイクロプ
ロセッサ1によって現実にプリフェッチされた命令のパ
リティをデータ線7から検出し、このパリティとパリテ
ィビット9から読出された当該命令についてのパリティ
とを比較するパリティチェックを行うことにより、命令
キュー3に正しく命令がフェッチされたか否かを確認す
る方法が用いられている。そして誤った命令を検出した
場合には、マイクロプロセッサ1の動作を中止するか、
もしくは、ソフトウェアによる処理によって、誤った命
令のアドレスを再度プログラム・カウンタ4にセットし
て命令フェッチを行い、エラーが検出されなければ、命
令実行を継続する(リトライ処理)という手法が用いら
れている。しかしながらこの方法には、ソフトウェアに
よる処理に時間が掛り処理速度が遅くなっていまうとい
う欠点がある。そこでこの発明の課題はソフトウェアに
よる処理なしで処理速度に影響を与えることなく自動的
にリトライ処理を行う、信頼性の高いプリフェッチ機能
付マイクロプロセッサを提供することにある。
[Problems to be Solved by the Invention] In the above-mentioned microprocessor with a prefetch function, if an instruction fetched from the instruction memory 8 is mistakenly entered into the instruction queue 3 due to an external factor such as noise, the instruction execution unit 5 There is a problem with incorrect processing. Conventionally, as a countermeasure against this, a parity bit 9 is added to the instruction memory 8 as shown in FIG. 6, and the parity of the instruction actually prefetched by the microprocessor 1 is detected from the data line 7 via an external parity checker 10. A method is used to check whether the instruction has been correctly fetched into the instruction queue 3 by performing a parity check that compares this parity with the parity of the instruction read from the parity bit 9. If an incorrect instruction is detected, either the operation of the microprocessor 1 is stopped or
Alternatively, a method is used in which the address of the erroneous instruction is set in the program counter 4 again through software processing, the instruction is fetched, and if no error is detected, instruction execution is continued (retry processing). . However, this method has the disadvantage that the software processing takes time and the processing speed becomes slow. SUMMARY OF THE INVENTION An object of the present invention is to provide a highly reliable microprocessor with a prefetch function that automatically performs retry processing without affecting processing speed without software processing.

【0004】0004

【課題を解決するための手段】前記の課題を解決するた
めに、請求項1のプリフェッチ機能付マイクロプロセッ
サ(1Aなど)は、『検査ビット(パリティビット9な
ど)と共にメモリに格納されている被実行命令をプログ
ラムカウンタ(4など)の示すアドレスで順次フェッチ
して複数段のFIFO構造の命令キュー(3Aなど)に
取込みつつ、この命令キューから(インストラクション
実行ユニット5などを介し)被実行命令を取出して実行
するプリフェッチ機能付マイクロプロセッサであって、
[Means for Solving the Problems] In order to solve the above problems, a microprocessor (such as 1A) with a prefetch function according to claim 1 is provided with the following: Executable instructions are sequentially fetched at the address indicated by the program counter (4, etc.) and loaded into a multi-stage FIFO-structured instruction queue (3A, etc.), and the executed instructions are fetched from this instruction queue (via the instruction execution unit 5, etc.). A microprocessor with a prefetch function for fetching and executing,

【0005】前記命令キューの1段目に取込んだ被実行
命令の検査ビットと前記メモリにおける当該被実行命令
の検査ビットとを比較して、前記命令キューにフェッチ
した当該被実行命令の正,不正を判別する手段(パリテ
ィチェッカ10Aなど)と、この判別手段によって前記
命令キューの1段目にフェッチした被実行命令が不正で
あると判別された場合には自動的にその命令キューの内
容を破棄し、前記プログラムカウンタを当該被実行命令
のアドレスに戻し、再度フェッチを行う手段(リトライ
制御部12など)を備えた』ものとし、また
The test bits of the executed instruction fetched into the first stage of the instruction queue are compared with the check bits of the executed instruction in the memory, and the accuracy of the executed instruction fetched into the instruction queue is determined. A means for determining whether the instruction is invalid (such as a parity checker 10A), and if the determining means determines that the executed instruction fetched in the first stage of the instruction queue is invalid, the contents of the instruction queue are automatically checked. and means (such as a retry control unit 12) for re-fetching the instruction, returning the program counter to the address of the executed instruction, and re-fetching the instruction.

【0006
】請求項2のプリフェッチ機能付マイクロプロセッサは
請求項1のマイクロプロセッサにおいて、『前記再フェ
ッチの繰返し回数を計数する手段(エラーカウンタ13
など)を備え、この繰返し回数が所定回数を越えたとき
はフェッチ異常を示す信号(エラー警報11など)を出
力し、命令の実行を中止する』ものとする。
0006
A microprocessor with a prefetch function according to a second aspect of the present invention is a microprocessor according to a first aspect, which further includes a means for counting the number of repetitions of the re-fetching (an error counter 13).
etc.), and when the number of repetitions exceeds a predetermined number, a signal indicating fetch abnormality (error alarm 11, etc.) is output and execution of the instruction is stopped.

【0007】[0007]

【作  用】命令キューの1段目にフェッチした命令が
正しいかどうか判断する機能を持ち、正しい場合には次
段の命令キューに受渡し、インストラクション実行ユニ
ットにて実行する。正しくない場合には次段の命令キュ
ーには渡さないで、その命令を破棄し、自動的にプログ
ラム・カウンタをデクリメント(−1)して(通常、プ
ログラムカウンタは次の命令を指しているため)、再度
インストラクションメモリより同アドレスにてフェッチ
し直す(リトライ処理)。その命令が正しければ、次段
の命令キューに受渡し、インストラクション実行ユニッ
トにて実行する。再度、正しくなければリトライ処理を
行うが数回連続してエラーが検出される場合はノイズ等
の一時的な要因ではなくメモリ内容そのものが破壊され
ていると考えられるので外部にエラー警報を出力し、マ
イクロプロセッサを止める。
[Operation] It has the function of determining whether the instruction fetched to the first stage of the instruction queue is correct, and if it is correct, it is passed to the next stage of the instruction queue and executed by the instruction execution unit. If it is incorrect, the instruction is discarded without being passed to the next instruction queue, and the program counter is automatically decremented (-1) (usually, the program counter points to the next instruction). ), the instruction is fetched again from the instruction memory at the same address (retry processing). If the instruction is correct, it is passed to the next stage instruction queue and executed by the instruction execution unit. If it is not correct again, retry processing is performed, but if an error is detected several times in a row, it is thought that the memory contents themselves have been destroyed rather than a temporary cause such as noise, so an error alarm is output externally. , stops the microprocessor.

【0008】[0008]

【実施例】以下図1ないし図4に基づいて本発明の実施
例を説明する。図1は本発明の一実施例としてのマイク
ロプロセッサの構成を示し、この図は図5,図6に対応
している。また図2は図1の動作説明用の実行命令の例
を示し、図3は図2の命令が正常にフェッチされた場合
の図1の動作のタイミングチャートを、図4は同じく異
常フェッチの場合の動作タイミングチャートを夫々示す
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS. 1 to 4. FIG. 1 shows the configuration of a microprocessor as an embodiment of the present invention, and this figure corresponds to FIGS. 5 and 6. Furthermore, FIG. 2 shows an example of an execution instruction for explaining the operation of FIG. 1, FIG. 3 is a timing chart of the operation of FIG. 1 when the instruction of FIG. 2 is fetched normally, and FIG. 4 is a case of abnormal fetch. The operation timing chart of each is shown below.

【0009】図1においては図6に対しマイクロプロセ
ッサが新たなマイクロプロセッサ1Aに置換わり、さら
にこのマイクロプロセッサ1Aの新たなプリフェッチユ
ニット2A内には、4段の命令キュー3Aが設けられ、
パリティチェッカが10Aとして内蔵され、かつエラー
カウンタ13を内蔵するリトライ制御部12が新設され
ている。
In FIG. 1, the microprocessor in FIG. 6 is replaced by a new microprocessor 1A, and a four-stage instruction queue 3A is provided in the new prefetch unit 2A of this microprocessor 1A.
A retry control section 12 is newly installed, which includes a built-in parity checker of 10A and an error counter 13.

【0010】ここでパリティチェッカ10Aは4段の命
令キュー3A内の1段目の命令キューにフェッチされた
命令のパリティチェックを外部のインストラクションメ
モリ8に付加されたパリティビット9を参照して行う。 パリティチェッカ10Aのエラー検出信号ERはリトラ
イ制御部12に入力される。リトライ制御部12はこの
エラー検出信号ERが入力されるとプログラムカウンタ
4に対して、デクリメント要求DCをあげ、かつエラー
カウンタ13をインクリメントする。プログラムカウン
タ4は通常、フェッチ毎にインクリメントしているがデ
クリメント要求DCがあればデクリメントを優先する。 これにより、アドレス線6を介し再度エラーが起こった
アドレスの命令がインストラクションメモリ8からフェ
ッチし直される。フェッチし直された命令を再度、パリ
ティチェッカ10Aがパリティチェックを行い、正常で
あれば2段目の命令キューに送る。また、同時にエラー
カウンタ13をリセットしておく。
Here, the parity checker 10A performs a parity check of the instruction fetched into the first stage instruction queue in the four stage instruction queue 3A by referring to the parity bit 9 added to the external instruction memory 8. The error detection signal ER of the parity checker 10A is input to the retry control section 12. When this error detection signal ER is input, the retry control unit 12 issues a decrement request DC to the program counter 4 and increments the error counter 13. The program counter 4 normally increments every fetch, but if there is a decrement request DC, priority is given to decrementing it. As a result, the instruction at the address where the error occurred is fetched again from the instruction memory 8 via the address line 6. The parity checker 10A performs a parity check on the re-fetched instruction again, and if it is normal, sends it to the second stage instruction queue. At the same time, the error counter 13 is reset.

【0011】再度、フェッチされた命令が正常でない場
合には上記、リトライ処理を繰り返すが、この繰り返し
回数を計数するエラーカウンタ13の計数値がある設定
値以上になった場合には、インストラクションメモリ8
の内容そのものが破壊されているものとして、マイクロ
プロセッサ1A自身の動作を止めることにより、暴走を
防ぎ、高信頼性を確保する。また同時に外部へエラー警
報11を出力する。
If the fetched instruction is not normal again, the retry process described above is repeated, but if the count of the error counter 13 that counts the number of repetitions exceeds a certain set value, the instruction memory 8
Assuming that the contents of the microprocessor 1A itself have been destroyed, by stopping the operation of the microprocessor 1A itself, runaway is prevented and high reliability is ensured. At the same time, an error alarm 11 is output to the outside.

【0012】ここで図2に示すような命令を実行してい
るときを例として説明する。プログラムカウンタ4の現
在値PCおよびその+1,+2,+3のインクリメント
値で示されている各アドレスに夫々命令A,B,C,D
が順番に格納されており、演算実行にはそれぞれ2,3
,2,1クロックを要し、命令フェッチはすべて1クロ
ックで行なえるとする。
[0012] Here, an example will be explained in which an instruction as shown in FIG. 2 is executed. Instructions A, B, C, and D are sent to each address indicated by the current value PC of the program counter 4 and its +1, +2, and +3 increment values.
are stored in order, and it takes 2 and 3 to execute the calculation, respectively.
, 2, and 1 clock, and all instruction fetches can be performed in one clock.

【0013】図3は命令フェッチが全て正常な場合のタ
イミングチャートであり、命令フェッチと演算実行は並
行して行えるため、命令フェッチの時間は演算実行時間
に影響を与えることはない。
FIG. 3 is a timing chart when all instruction fetches are normal, and since instruction fetching and operation execution can be performed in parallel, the instruction fetch time does not affect the operation execution time.

【0014】次に図4は命令Cをフェッチした時に異常
を検出した場合のタイミングチャートであり、前述した
動作により直ちに自動的にリトライ処理が行われ、その
結果、正常な命令Cをフェッチし直しても、演算実行に
与える影響を全く無くすことができる。
Next, FIG. 4 is a timing chart when an abnormality is detected when fetching instruction C, and retry processing is immediately and automatically performed by the operation described above, and as a result, normal instruction C is re-fetched. However, it is possible to completely eliminate any influence on the execution of calculations.

【0015】[0015]

【発明の効果】本発明によればプリフェッチした命令の
エラーチェックを命令キューの初段で行い。エラー検出
時、直ちに当該命令を再フェッチする自動リトライ機能
をマイクロプロセッサ内に組込むようにしたので、
According to the present invention, error checking of prefetched instructions is performed at the first stage of the instruction queue. An automatic retry function is built into the microprocessor to immediately re-fetch the instruction when an error is detected.

【0
016】ノイズ等の一時的な外的要因により、誤った命
令がフェッチされた時に、自動的にリトライ処理がされ
るため、リトライのためのソフトウェアが不要で、また
リトライによる速度低下を最小限に留めることができる
。これにより信頼性の高いマイクロプロセッサを構築す
ることが可能である。
0
[016] When an incorrect instruction is fetched due to temporary external factors such as noise, retry processing is automatically performed, so no software is required for retrying, and speed reduction due to retrying is minimized. It can be fastened. This makes it possible to construct a highly reliable microprocessor.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の一実施例としてのプリフェッチ機能付
マイクロプロセッサの構成図
FIG. 1 is a configuration diagram of a microprocessor with a prefetch function as an embodiment of the present invention.

【図2】図1の動作説明用の実行命令を示す図[Fig. 2] A diagram showing execution instructions for explaining the operation of Fig. 1.

【図3】
同じく正常フェッチ時の動作タイミングチャート
[Figure 3]
Similarly, the operation timing chart during normal fetching

【図4】同じく異常フェッチ時の動作タイミングチャー
[Figure 4] Operation timing chart during abnormal fetch

【図5】図1に対応する従来例としての構成図[Fig. 5] Configuration diagram as a conventional example corresponding to Fig. 1

【図6】
図1に対応する従来の他の例としての構成図
[Figure 6]
A configuration diagram as another conventional example corresponding to FIG. 1

【符号の説明】[Explanation of symbols]

1A  マイクロプロセッサ 2A  プリフェッチユニット 3A  命令キュー 4    プログラムカウンタ 5    インストラクション実行ユニット6    
アドレス線 7    データ線 8    インストラクションメモリ 9    パリティビット 10A  パリティチェッカ 11    エラー警報 12    リトライ制御部 13    エラーカウンタ ER  エラー検出信号 DC  デクリメント要求
1A Microprocessor 2A Prefetch unit 3A Instruction queue 4 Program counter 5 Instruction execution unit 6
Address line 7 Data line 8 Instruction memory 9 Parity bit 10A Parity checker 11 Error alarm 12 Retry control unit 13 Error counter ER Error detection signal DC Decrement request

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】検査ビットと共にメモリに格納されている
被実行命令をプログラムカウンタの示すアドレスで順次
フェッチして複数段のFIFO構造の命令キューに取込
みつつ、この命令キューから被実行命令を取出して実行
するプリフェッチ機能付マイクロプロセッサであって、
前記命令キューの1段目に取込んだ被実行命令の検査ビ
ットと前記メモリにおける当該被実行命令の検査ビット
とを比較して前記命令キューにフェッチした当該被実行
命令の正,不正を判別する手段と、この判別手段によっ
て前記命令キューの1段目にフェッチした被実行命令が
不正であると判別された場合には自動的にその命令キュ
ーの内容を破棄し、前記プログラムカウンタを当該被実
行命令のアドレスに戻し、再度フェッチを行う手段を備
えたことを特徴とするプリフェッチ機能付マイクロプロ
セッサ。
Claim 1: The instructions to be executed stored in the memory along with the check bits are sequentially fetched at the address indicated by the program counter and taken into an instruction queue having a multi-stage FIFO structure, and the instructions to be executed are taken out from the instruction queue. A microprocessor with a prefetch function that executes
A check bit of the executed instruction fetched into the first stage of the instruction queue is compared with a check bit of the executed instruction in the memory to determine whether the executed instruction fetched into the instruction queue is correct or invalid. and if the determining means determines that the executed instruction fetched to the first stage of the instruction queue is invalid, the contents of the instruction queue are automatically discarded, and the program counter is set to the executed instruction. A microprocessor with a prefetch function characterized by having a means for returning to an instruction address and fetching again.
【請求項2】請求項1に記載のマイクロプロセッサにお
いて、前記再フェッチの繰返し回数を計数する手段を備
え、この繰返し回数が所定回数を越えたときはフェッチ
異常を示す信号を出力し、命令の実行を中止することを
特徴とするプリフェッチ機能付マイクロプロセッサ。
2. The microprocessor according to claim 1, further comprising means for counting the number of times the re-fetch is repeated, and when the number of repetitions exceeds a predetermined number, outputs a signal indicating a fetch abnormality, and outputs a signal indicating a fetch abnormality. A microprocessor with a prefetch function characterized by stopping execution.
JP3001269A 1991-01-10 1991-01-10 Microprocessor provided with prefetching function Pending JPH04235638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3001269A JPH04235638A (en) 1991-01-10 1991-01-10 Microprocessor provided with prefetching function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3001269A JPH04235638A (en) 1991-01-10 1991-01-10 Microprocessor provided with prefetching function

Publications (1)

Publication Number Publication Date
JPH04235638A true JPH04235638A (en) 1992-08-24

Family

ID=11496736

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3001269A Pending JPH04235638A (en) 1991-01-10 1991-01-10 Microprocessor provided with prefetching function

Country Status (1)

Country Link
JP (1) JPH04235638A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06242949A (en) * 1993-01-15 1994-09-02 Internatl Business Mach Corp <Ibm> Queue control type order cash
US5878278A (en) * 1994-10-03 1999-03-02 International Business Machines Corporation System for controlling connection requests by each IO controllers storing and managing a request queue wherein additional channel addresses can be added

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06242949A (en) * 1993-01-15 1994-09-02 Internatl Business Mach Corp <Ibm> Queue control type order cash
US5878278A (en) * 1994-10-03 1999-03-02 International Business Machines Corporation System for controlling connection requests by each IO controllers storing and managing a request queue wherein additional channel addresses can be added

Similar Documents

Publication Publication Date Title
US5237666A (en) Apparatus using address of a predetermined preceding instruction and target instruction address stored in history table to prefetch target instruction
US6754856B2 (en) Memory access debug facility
US5109381A (en) Apparatus and method for detecting errors in a pipeline data processor
US6895527B1 (en) Error recovery for speculative memory accesses
JPH04235638A (en) Microprocessor provided with prefetching function
US6990569B2 (en) Handling problematic events in a data processing apparatus
US5283891A (en) Error information saving apparatus of computer
EP0324952B1 (en) Branching circuit for a pipelined processor
JP2793386B2 (en) Computer error information storage device for computer
JPH07105000A (en) Fetch error controller
EP0655686B1 (en) Retry control method and device for control processor
JP2001188688A (en) Runaway detecting circuit
EP0525672A2 (en) Microprocessor with program tracing
JPH07129414A (en) Data processor
JPH09319621A (en) Circuit, method for detecting program runaway, software developing device for detection and software generating method for the same
JP3169879B2 (en) Microprocessor runaway detection method
JPH0371236A (en) Error detecting system
JP2793526B2 (en) Super scalar processor
JPH03186937A (en) Cpu bus data diagnostic device
JP2001159976A (en) Malfunction prevention mechanism for microcomputer
JPS62144246A (en) Computer
JPS6385831A (en) Control circuit for microprocessor
JPS62127944A (en) Information processor
JPS62182934A (en) Program executing device
WO2010097844A1 (en) Runaway detection device