JPH0322032A - Program exception code control circuit - Google Patents
Program exception code control circuitInfo
- Publication number
- JPH0322032A JPH0322032A JP1156567A JP15656789A JPH0322032A JP H0322032 A JPH0322032 A JP H0322032A JP 1156567 A JP1156567 A JP 1156567A JP 15656789 A JP15656789 A JP 15656789A JP H0322032 A JPH0322032 A JP H0322032A
- Authority
- JP
- Japan
- Prior art keywords
- exception code
- exception
- code
- completion type
- detected
- 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.)
- Granted
Links
Landscapes
- Advance Control (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
〔概要]
検出される例外コードをプログラムに通知するプログラ
ム例外コード制御回路に関し、2種以上の完了型例外が
検出されるときにも適切に対応できるようにすることを
目的とし、例外コードがないことを表すコードを初期コ
ードにして例外コードを一時的に保持するラッチ手段と
、例外コードを記憶するメモリ手段と、検出される例外
コードとラッチ手段の保持データとを人力データとして
、一般例外コードが検出されるときにはそれを選択し、
−i例外コードが検出されずに完了型例外コードが検出
されるときに、保持データが初期コードであるときには
検出される完了型例外コードを選択するとともに、完了
型例外コードであるときには保持されるものか検出され
るものの内の優先度の高い方を選沢し、いずれの例外コ
ードも検出されないときに、保持データが完了型例外コ
ードであるときにはそれを選択するとともに、初期コー
ドであるときにはいずれの入力データも選択しないよう
処理する選択手段とを備え、ラッチ手段は、命令実行中
に所定の周期に従って選択手段の出力を入力として保持
データを更新していくとともに、メモリ手段は、プログ
ラム割込処理時に最終的に更新されたこの保持データの
例外コードを記憶するよう構戒する。[Detailed Description of the Invention] [Summary] An object of the present invention is to enable a program exception code control circuit that notifies a program of a detected exception code to appropriately respond even when two or more types of completion type exceptions are detected. A latch means for temporarily holding the exception code by using a code indicating that there is no exception code as an initial code, a memory means for storing the exception code, and a detected exception code and data held by the latch means. As human data, when a general exception code is detected, select it,
-i When no exception code is detected and a completion type exception code is detected, if the retained data is an initial code, selects the detected completion type exception code, and if it is a completion type exception code, it is retained. If no exception code is detected, if the held data is a completion type exception code, select it, and if it is an initial code, select the one with higher priority. The latch means inputs the output of the selection means and updates the held data according to a predetermined cycle during instruction execution, and the memory means updates the held data according to a predetermined cycle during execution of the instruction. Care is taken to remember the exception code of this retained data that was finally updated during processing.
〔産業上の利用分野]
本発明は、プログラム命令の実行時に検出される割込種
別を表す一般例外コード及び完了型例外コードをプログ
ラムに通知するよう処理するプロダラム例外コード制御
回路に関し、特に、少ないゲート数で回路を実装できる
ようにするとともに、同一命令で2種以上の完了型例外
が検出されるような場合にも適切に対応できるようにす
るプログラム例外コード制御回路に関するものである.
プログラム例外コード制御回路は、プログラム命令の実
行時に検出される割込種別を表す例外コードをメモリ上
の固定アドレスに格納するための制御回路であり、検出
される例外コードがプログラム命令の抑止・無効・中断
を指定する一般例外コードであるときには、直ちに割込
処理に入るために検出される例外コードを固定アドレス
に格納すべく処理するとともに、検出される例外コード
がプログラム命令の完了を待って割込処理に入ることを
指定する完了型例外コードであるときには、プログラム
命令の完了を待って検出される例外コードを固定アドレ
スに格納すべく処理することになる.
近年、アドレス拡張、新VM機構、拡張記憶等の追加機
能が検討され、それによって新しい例外コードが定義さ
れるようになってきている。これから、ピント数の増加
に伴うプログラム例外コード制御回路のハード量の増加
が問題になってきている。また、追加機能によっては、
同一命令で2種以上の完了型例外が検出されるようなも
のについて、完了型例外の優先度順に命令を実行させて
いくことが不可能になるものがでてきており、プログラ
ム例外コード制御回路がこれに対応できるよう構威され
る必要性がでてきている。[Industrial Application Field] The present invention relates to a program exception code control circuit that processes a general exception code and a completion type exception code indicating the interrupt type detected during the execution of a program instruction so as to notify the program. This invention relates to a program exception code control circuit that allows a circuit to be implemented with a limited number of gates, and also allows for appropriate handling of cases where two or more types of completion type exceptions are detected in the same instruction.
The program exception code control circuit is a control circuit that stores an exception code representing the interrupt type detected when a program instruction is executed at a fixed address in memory, and the detected exception code suppresses or invalidates the program instruction. - If it is a general exception code that specifies interruption, the detected exception code is processed so as to be stored at a fixed address in order to immediately enter interrupt processing, and the detected exception code is not allocated until the program instruction is completed. If it is a completion-type exception code that specifies entry into processing, the exception code is detected after waiting for the program instruction to complete and is processed to be stored at a fixed address. In recent years, additional functions such as address expansion, new VM mechanisms, expanded storage, etc. have been considered, and new exception codes have been defined accordingly. From now on, an increase in the amount of hardware required for program exception code control circuits as the number of focus points increases has become a problem. Also, depending on the additional features,
For programs where two or more types of completion type exceptions are detected in the same instruction, it is becoming impossible to execute the instructions in the priority order of the completion type exceptions, and the program exception code control circuit There is a growing need for the government to be organized to deal with this.
第4図に、パイプラインのラストステージであるライト
ステージに従って、従来のプログラム例外コード制御回
路の構成を示す。第4図(a)中、10は一般例外検出
回路であって、プログラムの一般例外を検出してその一
般例外コードを出力するもの、1lは完了型例外検出回
路であって、プログラムの完了型例外を検出してその完
了型例外コードを出力するもの、12はCMPL X
Vラッチであって、完了型例外検出回路1lにより完了
型例外が検出されるときにセットされてHl出力を出力
(図中のCMPL XV信号)するもの、13はCM
PL XCレジスタであって、完了型例外検出回路1
1が出力する完了型例外コードを格納するもの、14は
例外コード選択回路であって、例外コードの有効信号を
参照して、一般例外検出回路10の一般例外コード出力
、CMP LXCレジスタ13の完了型例外コード出力
、完了型例外検出回路11の完了型例外コード出力の順
位順に従っていずれか1つの出力の例外コードを選択す
るもの、15はPGM XCレジスタであって、例外コ
ード選択回路14が選択した例外コードを格納するもの
、16はORゲートであって、プログラム命令の完了を
表すEND OP信号がでるときか、RESTORE
STATE信号がでるときにCMPL XVラッ
チl2のHl出力をリセットするもの、17はORゲー
トであって、完了型例外検出回路11が完了型例外コー
ドの有効信号を出力するときか、CMPL XVラッ
チ12がHl出力を出力するときにI{I出力を出力す
るもの、18はANDゲートであって、ORゲート17
がHl出力を出力し、かつEND OP信号がでると
きにHl出力を出力するもの、19はORゲートであっ
て、ANDゲート18がHl出力を出力するときか、一
般例外検出回路10が一般例外コードの有効信号を出力
するときにHl出力を出力するもの、20はANDゲー
トであって、ORゲート19が}II出力を出力し、か
つマシンチェックを行っていないときにでるPGMR
U P T E N B L信号があるときにHl出
力を出力(図中のSET PGM LCH信号)す
るもの、21はPGM RUPTラッチであって、A
NDゲート20のHl出力をラッチ(図中のPGM
RUPT LCH信号)するものである。FIG. 4 shows the configuration of a conventional program exception code control circuit according to the write stage, which is the last stage of the pipeline. In FIG. 4(a), 10 is a general exception detection circuit, which detects a general exception of a program and outputs the general exception code, and 1l is a completion type exception detection circuit, which detects a general exception of a program and outputs the general exception code. 12 is CMPL X which detects an exception and outputs its completion type exception code.
A V latch which is set when a completion type exception is detected by the completion type exception detection circuit 1l and outputs a Hl output (CMPL XV signal in the figure), 13 is a CM
PL XC register, completion type exception detection circuit 1
1 stores the completion-type exception code to be output, and 14 is an exception code selection circuit that refers to the valid signal of the exception code to output the general exception code of the general exception detection circuit 10 and the completion type of the CMP LXC register 13. 15 is a PGM XC register which is selected by the exception code selection circuit 14. 16 is an OR gate that stores the exception code, and when the END OP signal indicating the completion of a program instruction is issued,
17 is an OR gate that resets the Hl output of the CMPL XV latch 12 when the STATE signal is output, and when the completion type exception detection circuit 11 outputs a valid signal of the completion type exception code, the CMPL XV latch 12 18 is an AND gate, and OR gate 17 outputs an I{I output when outputs an Hl output.
19 is an OR gate which outputs a Hl output when the AND gate 18 outputs an Hl output, and when the AND gate 18 outputs an Hl output, the general exception detection circuit 10 detects a general exception. 20 is an AND gate that outputs Hl output when outputting a code valid signal, and PGMR that is output when OR gate 19 outputs }II output and machine check is not performed.
21 is a PGM RUPT latch that outputs Hl output (SET PGM LCH signal in the figure) when there is an U P T E N B L signal;
Latch the Hl output of the ND gate 20 (PGM in the figure)
RUPT LCH signal).
図中の二重線は例外コード信号を表し、実線は検出信号
を表している。また、一般例外検出回路10及び完了型
例外検出回路1lは、実際にはパイプラインの各ステー
ジに存在していて、それらの各ステージの一般例外検出
回路10及び完了型例外検出回路11により検出された
例外コードが、ライトステージの一般例外検出回路10
及び完了型例外検出回路1lに送り込まれてくることに
なるが、ここでは説明の便宜上簡略化して図示してある
。The double line in the figure represents an exception code signal, and the solid line represents a detection signal. Further, the general exception detection circuit 10 and the completion type exception detection circuit 1l actually exist in each stage of the pipeline, and the general exception detection circuit 10 and the completion type exception detection circuit 11 of each stage detect the The exception code is detected by the general exception detection circuit 10 of the write stage.
and is sent to the completion type exception detection circuit 1l, but is shown here in a simplified manner for convenience of explanation.
第4図(b)に示すように、CMPL Xcレジスタl
3をイネープル状態にするためのCMPL XC
CLK ENBL信号は、バッファ22に従っ7cM
PL XVラッチ12がLO出力を出力しているとき
に出力されることになり、PGM RUPTランチ2
lをイネープル状態にするためのPGM RUPT
LCH CLK ENBL信号は、ORゲート2
3に従って、PROCESS STATE信号かST
OP STATE信号のいずれか一方の出力があると
きに出力されることになり、PGM XCレジスタl
5をイネープル状態にするためのPGM XC C
LK ENBL信号は、ANDゲート24に従って、
PGM RUPT LCH CLK ENBL
信号が出力される条件で、かつANDゲート20からS
ET PGM LCH信号が出力されるときに出力
されることになる.
以上に説明したORゲート16の人力となるRESTO
RE STATE信号と、ORゲート23の人力とな
るPROCESS STATE信号及びSTOP
STATE信号とは、ステートマシンの出力信号である
.第5図に、このステートマシンの遷移図を示す.
次に、このようにtlfflされる従来のプログラム例
外コード制御回路の動作処理について説明する.一般例
外検出回路10が一般例外の発生を検出して一般例外コ
ードを出力すると、例外コード選択回路14は、CMP
L XCレジスタl3の完了型例外コードや完了型例
外検出回路1lの完了型例外コードの有無に関係なく、
この出力される一般例外コードを選択するとともに、A
NDゲート20は、SET PGM LCH信号を
出力する,SET PGM LCH信号が出力され
ると、ANDゲート24は、PROCESS STA
TE信号との論理積に従ってPGM XC CLK
ENBL信号を出力し、PGM XCレジスタl
5は、このPGM XC CLK ENBL信号
に従ってイネーブル状態となって例外コード選択回路l
4が選沢した一般例外コードを格納する。そして、SE
T PGM LCH信号が出力されると、図示しな
い論理に従ってステートがPROCESSステートから
RESTOREステートに遷移することになるので、P
GM xC CLK ENBL信号は1マシンサイク
ル分で消滅する。このようにして、第5図に示すように
、RESTOREステートを経由してENDPROCス
テートに遷移して割込処理のマイクロプログラムが起動
されることで、PGM XCレジスタ15に格納され
ている一般例外コードがメモリ上の固定アドレスのとこ
ろに格納されて、プログラムに対して一般例外コードが
通知されるよう処理されることになる。As shown in FIG. 4(b), the CMPL Xc register l
CMPL XC to enable 3
The CLK ENBL signal is 7cM according to buffer 22.
It will be output when the PL XV latch 12 is outputting the LO output, and the PGM RUPT launch 2
PGM RUPT to enable l
LCH CLK ENBL signal is OR gate 2
3, the PROCESS STATE signal or ST
It will be output when either one of the OP STATE signals is output, and the PGM XC register l
PGM XC C to enable 5
The LK ENBL signal, according to AND gate 24,
PGM RUPT LCH CLK ENBL
Under the condition that the signal is output, and from the AND gate 20
It will be output when the ET PGM LCH signal is output. RESTO which is the human power of OR gate 16 explained above
RE STATE signal, PROCESS STATE signal and STOP which are human power of OR gate 23
The STATE signal is the output signal of the state machine. Figure 5 shows the transition diagram of this state machine. Next, the operation processing of the conventional program exception code control circuit that is tlffled in this way will be explained. When the general exception detection circuit 10 detects the occurrence of a general exception and outputs a general exception code, the exception code selection circuit 14 selects the CMP
Regardless of the presence or absence of the completion type exception code of the LXC register l3 or the completion type exception code of the completion type exception detection circuit 1l,
Select this general exception code to be output, and
The ND gate 20 outputs the SET PGM LCH signal. When the SET PGM LCH signal is output, the AND gate 24 outputs the PROCESS STA signal.
PGM XC CLK according to AND with TE signal
Outputs ENBL signal and registers PGM
5 is enabled according to this PGM XC CLK ENBL signal and the exception code selection circuit l
4 stores the selected general exception code. And S.E.
When the T PGM LCH signal is output, the state transitions from the PROCESS state to the RESTORE state according to logic not shown.
The GM xC CLK ENBL signal disappears in one machine cycle. In this way, as shown in FIG. 5, the general exception code stored in the PGM is stored at a fixed address in memory, and processed to notify the program of the general exception code.
一方、完了型例外検出回路1lが複数フローからなるプ
ログラム命令の途中のフローで完了型例外(複数発生す
るときには、最も優先度の高いものが最初となるように
プログラム命令が構威されている)の発生を検出して完
了型例外コードを出力すルト、CMPL Xvラッチ1
2は、CMPL XV信号を出力することで完了型例
外が発生したことを表示し、CMPL XCレジスタ
13は、その出力される完了型例外コードを格納すると
ともに、バソファ22に従ってディスイネーブル状態に
転じてその完了型例外コードを保持するよう処理する。On the other hand, the completion type exception detection circuit 1l detects a completion type exception in the middle of a program instruction consisting of multiple flows (when multiple flows occur, the program instructions are configured so that the one with the highest priority is placed first) CMPL Xv latch 1, which detects the occurrence of the
2 indicates that a completion type exception has occurred by outputting the CMPL XV signal, and the CMPL Process to retain the completion type exception code.
この処理に従って、例外コード選択回路14は、一般例
外検出回路10が一般例外コードを出力していないこと
を条件に、このCMPL XCレジスタl3の完了型
例外コードを選択する。そして、ANDゲート18がE
ND OP信号に従ってその完了型例外を発生させた
プログラム命令の完了を確認すると、ANDゲート20
は、SET PGM LCH信号を出力する。According to this process, the exception code selection circuit 14 selects the completion type exception code of the CMPL XC register 13 on the condition that the general exception detection circuit 10 does not output a general exception code. Then, AND gate 18 is E
When the completion of the program instruction that caused the completion type exception is confirmed according to the ND OP signal, the AND gate 20
outputs the SET PGM LCH signal.
このようにして、SET PGM LCH信号が出
力されると、上述した一般例外が検出されたときの処理
と同様の処理に従って、発生した完了型例外コードがP
C,M XCレジスタ15を介してメモリ上の固定ア
ドレスのところに格納されることで、プログラムに対し
て通知されるよう処理されることになる。In this way, when the SET PGM LCH signal is output, the generated completion-type exception code is converted to
By storing the data at a fixed address in the memory via the C, M XC register 15, it is processed so as to be notified to the program.
一方、完了型例外検出回路11がプログラム命令の最終
のフローで完了型例外の発生を検出して完了型例外コー
ドを出力すると、例外コード選択回路l4は、一般例外
検出回路lOが一般例外コードを出力していなく、かつ
CMPL XCレジスタ13が完了型例外コードを保
持していないことを条件に、この完了型例外検出回路1
1の完了型例外コードを選択する。そして、上述したC
MPL XCレジスタl3に保持される完了型例外コ
ードと同様の処理に従い、完了型例外を発生させたプロ
グラム命令の完了ち待って、発生した完了型例外コード
がPC;M XCレジスタ15を介してメモリ上の固
定アドレスのところに格納されることで、プログラムに
対して通知されるよう処理されることになる。On the other hand, when the completion-type exception detection circuit 11 detects the occurrence of a completion-type exception in the final flow of a program instruction and outputs a completion-type exception code, the exception code selection circuit l4 detects that the general exception detection circuit lO detects the general exception code. This completion type exception detection circuit 1 is not output and the CMPL XC register 13 does not hold a completion type exception code.
Select completion type exception code 1. And the above C
Following the same processing as the completion type exception code held in the MPL XC register l3, the generated completion type exception code is stored in the memory via the PC; By storing it at the fixed address above, it will be processed to notify the program.
上述したように、RESTOREステートを経由して割
込処理のENDPROCステートに遷移することで、P
GM MCレジスタ15に格納されている例外コード
がメモリに展開されると、このENDPROCステート
では、更にプログラム割込用新PSWをセットし、そし
て、次のSTARTステートを経由して、PROCES
Sステートに入ることで割込ルーチンの実行に入るよう
処理することになる。As mentioned above, by transitioning to the ENDPROC state for interrupt processing via the RESTORE state, P
When the exception code stored in the GM MC register 15 is expanded to the memory, in this ENDPROC state, a new PSW for program interrupt is further set, and then, via the next START state, PROCES
By entering the S state, processing is performed to enter execution of the interrupt routine.
第6図に、プログラム命令の途中のフローで完了型例外
が検出されたときのタイムチャートを示す.このタイム
チャートでは、最初のフローで完了型例外が検出された
例を示してある。なお、この図に示すように、PGM
RUPTランチ21は、PROCESS STAT
E信号に従って送出されるPGM RUPT LC
H CLK ENBL信号によりイネーブル状態と
なって、ANDゲート20からのSET PGM
LCH信号によりPGM RUPT LCt{信号
を出力するとともに、RESTOREステートに遷移す
ることでディスイネーブル状態となってこのPGMRU
PT LCH信号を保持し、そして、PROCESS
ステートに遷移することで再びイネーブル状態となって
このPGM RUPT LCH信号を消滅するよう
処理することになる。Figure 6 shows a time chart when a completion type exception is detected in the middle of a program instruction flow. This time chart shows an example where a completion type exception is detected in the first flow. In addition, as shown in this figure, PGM
RUPT Lunch 21 is PROCESS STAT
PGM RUPT LC sent out according to E signal
The SET PGM from AND gate 20 is enabled by the H CLK ENBL signal.
The LCH signal outputs the PGM RUPT LCt{ signal, and the PGMRU becomes disabled by transitioning to the RESTORE state.
Hold PT LCH signal and PROCESS
By transitioning to the state, the PGM RUPT LCH signal becomes enabled again and the PGM RUPT LCH signal is processed to disappear.
しかしながら、このような従来のプログラム例外コード
制御回路では、CMPL XCレジスタl3が出力機
能を有するレジスタとなるために、ゲート数が多くなっ
てしまうという問題点があった。この問題点は、完了型
例外種別の増加に伴って必要となるビット数が増えると
ともに大きなものとなっていたのである。However, such a conventional program exception code control circuit has a problem in that the number of gates increases because the CMPL XC register l3 is a register having an output function. This problem becomes more serious as the number of required bits increases as the number of completion type exception types increases.
そして、従来のプログラム例外コード制御回路では、例
外コード選択回路14が、CMPL XCレジスタ1
3の完了型例外コードを完了型例外検出回路1lの完了
型例外コードよりも優先的に選択するよう処理していた
ことから、同一命令で2種以上の完了型例外が検出され
るようなプログラム命令については、優先度の高い完了
型例外が先に検出されることになるようにと実行手順を
定めていく必要があるが、新たに追加される機能によっ
ては、このような実行手順を採用することができないよ
うなプログラム命令もでてくることがあって、対処する
ことができないという問題点がでてきた.
しかも、従来のプログラム例外コード制御回路では、P
GM XCレジスタl5は、命令が正常終了しても割
込処理を行った例外コードを保持し続けることから、割
込処理した例外コードをサービスプロセッサから知るこ
とができるという利点はあるものの、現時点で実行した
命令でプログラム例外が発生したかのような誤解を生じ
させるという問題点もあったのである。In the conventional program exception code control circuit, the exception code selection circuit 14 selects the CMPL XC register 1
Since the completion type exception code of 3 was selected with priority over the completion type exception code of the completion type exception detection circuit 1l, the program detected two or more types of completion type exceptions with the same instruction. For instructions, it is necessary to define an execution procedure so that a completion type exception with a high priority is detected first, but depending on the newly added function, such an execution procedure may be adopted. However, there are cases where program instructions that cannot be executed are generated, and this has become a problem that cannot be dealt with. Moreover, in the conventional program exception code control circuit, P
GM There was also the problem that it gave rise to a misunderstanding that a program exception had occurred due to the executed instruction.
本発明はかかる事情に鑑みてなされたものであって、こ
のような従来技術の問題点を解決できる新たなプログラ
ム例外コード制御回路の提供を目的とするものである。The present invention has been made in view of the above circumstances, and it is an object of the present invention to provide a new program exception code control circuit that can solve the problems of the prior art.
第l図は本発明の原理構戒図である。 FIG. 1 is a diagram showing the principle structure of the present invention.
図中、1は一般例外検出手段であって、プログラムの一
般例外を検出してその一般例外コードを出力するもの、
2は完了型例外検出手段であって、プログラムの完了型
例外を検出してその完了型例外コードを出力するもの、
3は完了型例外コード表示手段であって、完了型例外検
出手段2により完了型例外が検出されたことを表示する
もの、4は例外コードラッチ手段であって、例外コード
がないことを表すコードを初期コードにして、プログラ
ム命令の実行中に検出される例外コードを所定の周期に
従って更新しながら一時的に保持していくもの、5は例
外コード選択手段であって、般例外検出手段1により検
出される一般例外コードと、完了型例外検出手段2によ
り検出される完了型例外コードと、例外コードラッチ千
段4により保持される例外コードとを入力データとして
、予め定められる選択手順に従っていずれか1つの例外
コードを選択して例外コードラッチ千段4に出力するも
の、6は例外コードメモリ手段であって、プログラム割
込処理の終了時に最終的に更新された例外コードラッチ
手段4の例外コードを記憶するもの、7は割込処理要求
手段であって、般例外検出手段lが発生する一般例外コ
ードの有効信号と、完了型例外検出手段2が発生する完
了型例外コードの有効信号と、完了型例外コード表示手
段3が発生する表示信号と、END OP信号とを入
力として、割込処理に入るための割込要求信号を出力す
るものである。In the figure, 1 is a general exception detection means that detects a general exception in a program and outputs the general exception code;
2 is a completion type exception detection means that detects a completion type exception of a program and outputs the completion type exception code;
3 is a completion type exception code display means for displaying that a completion type exception has been detected by the completion type exception detection means 2; 4 is an exception code latch means for displaying a code indicating that there is no exception code; 5 is an exception code selection means which is used as an initial code to temporarily hold an exception code detected during the execution of a program instruction while updating it according to a predetermined cycle. The detected general exception code, the completion type exception code detected by the completion type exception detection means 2, and the exception code held by the exception code latch 4 are input data, and one of them is selected according to a predetermined selection procedure. 6 is an exception code memory means which selects one exception code and outputs it to the exception code latch stage 4, which stores the exception code of the exception code latch means 4 that is finally updated at the end of program interrupt processing. , 7 is an interrupt processing requesting means, which stores a valid signal of the general exception code generated by the general exception detection means 1, a valid signal of the completion type exception code generated by the completion type exception detection means 2, It receives the display signal generated by the completion type exception code display means 3 and the END OP signal as input, and outputs an interrupt request signal for entering interrupt processing.
ここで、例外コード選択手段5は、ステートマシンがS
TOPステートにあるときにあって、いずれの例外コー
ドも検出されていないことを条件に、例外コードラッチ
手段4の保持データを選択するよう処理することになる
。Here, the exception code selection means 5 specifies that the state machine is S.
Processing is performed to select the data held by the exception code latch means 4 on the condition that no exception code is detected in the TOP state.
本発明では、例外コード選択手段5は、一般例外及び完
了型例外が検出されないときにはいずれの人力データも
選択しないよう処理するので、例外コードラッチ手段4
は、例外コードがないことを表す初期コードを保持し続
けることになる.このとき、一般例外検出千段1が一般
例外を検出すると、例外コード選択手段5は、他の人力
データに関係なく一般例外検出千段lが出力する一般例
外コードを選択して例外コードラッチ手段4にセットす
るよう処理する。そして、割込処理要求千段7は、一般
例外検出手段1からの一般例外コードの有効信号を検出
すると、例外コードラッチ手段40更新処理を終了して
割込要求信号を出力するよう処理する.このようにして
、割込処理が起動されると、例外コードラッチ手段4に
格納されている一般例外コードがプログラムに通知され
ることになるとともに、例外コードメモリ千段6は、割
込処理の終了時にプログラムに通知した例外コードラッ
チ手段4の一般例外コードを記憶するよう処理する。In the present invention, the exception code selection means 5 processes so as not to select any manual data when a general exception and a completion type exception are not detected, so the exception code latch means 5
will continue to retain the initial code indicating that there is no exception code. At this time, when the general exception detection stage 1 detects a general exception, the exception code selection means 5 selects the general exception code output by the general exception detection stage 1 regardless of other manual data, and selects the general exception code output by the general exception detection stage 1, Process to set it to 4. When the interrupt processing request stage 7 detects the valid signal of the general exception code from the general exception detection means 1, it completes the update process of the exception code latch means 40 and outputs an interrupt request signal. In this way, when the interrupt processing is started, the general exception code stored in the exception code latch means 4 is notified to the program, and the exception code memory 6 is used for interrupt processing. Processing is performed to store the general exception code of the exception code latch means 4 notified to the program at the time of termination.
また、例外コード選択手段5は、完了型例外検出千段2
が完了型例外を検出すると、一般例外が検出されていな
いことを条件にこの完了型例外の完了型例外コードを選
択して例外コードラッチ手段4にセットするよう処理す
る.この後、例外コード選択手段5は、完了型例外検出
手段2から新たな完了型例外コードが通知されないとき
には、例外コードラッチ手段4が保持する完了型例外コ
ードを選択することで例外コードラッチ手段4がそのま
まの完了型例外コードを保持するよう処理する。一方、
完了型例外検出手段2から新たな完了型例外コードが通
知されるときには、例外コード選択手段5は、例外コー
ドラッチ手段4が保持する完了型例外コードの優先度と
新たに通知される完了型例外コードの優先度とを比較し
て、優先度の高い方の完了型例外コードを選択して例外
コードラッチ手段4にセットするよう処理する。このよ
うにして、例外コードラッチ千段4は、一In例外が検
出されずに完了型例外が検出されるときには、優先度の
高い完了型例外コードに更新しながら完了型例外コード
を保持するよう処理する。Further, the exception code selection means 5 includes the completion type exception detection stage 2.
When detects a completion type exception, the process selects the completion type exception code of this completion type exception and sets it in the exception code latch means 4, provided that no general exception is detected. Thereafter, when the exception code selection means 5 is not notified of a new completion type exception code from the completion type exception detection means 2, the exception code selection means 5 selects the completion type exception code held by the exception code latch means 4. process so that it retains the intact completion type exception code. on the other hand,
When a new completion type exception code is notified from the completion type exception detection means 2, the exception code selection means 5 selects the priority of the completion type exception code held by the exception code latch means 4 and the newly notified completion type exception. The priorities of the codes are compared, and the completion type exception code with the higher priority is selected and set in the exception code latch means 4. In this way, the exception code latch 4 is configured to hold the completion type exception code while updating it to a completion type exception code with a higher priority when a completion type exception is detected without an In exception being detected. Process.
そして、割込処理要求手段7は、END OP信号に
従って完了型例外コードに係る命令の完了を検出すると
、例外コードラッチ千段4の更新処理を終了して割込要
求信号を出力するよう処理する。このようにして、割込
処理が起動されると、例外コードラッチ手段4に格納さ
れている完了型例外コードがプログラムに通知されるこ
とになるとともに、例外コードメモリ手段6は、割込処
理の終了時にプログラムに通知した例外コードラッチ千
段4の完了型例外コードを記憶するよう処理する.
このように、本発明では、例外コードラッチ手段4は、
ループバックしながら最も優先度の高い完了型例外コー
ドを保持するよう構戒するので、優先度の高い完了型例
外が先に検出されることになるようにできないプログラ
ム命令に対しても適切に対応できるようになる。そして
、従来技術のCMPL XCレジスタ13が出力機能
を有するレジスタであるのに対して、例外コードメモリ
手段6は出力機能を有しないレジスタで済むので、ゲー
ト数も少なくて実装できるようになる。When the interrupt processing request means 7 detects the completion of the instruction related to the completion type exception code according to the END OP signal, it completes the update processing of the exception code latch 4 and outputs an interrupt request signal. . In this way, when the interrupt processing is started, the completion type exception code stored in the exception code latch means 4 is notified to the program, and the exception code memory means 6 is used for interrupt processing. Processes to store the completion type exception code of exception code latch 4, which was notified to the program at the time of termination. In this way, in the present invention, the exception code latch means 4
Since we take care to preserve the completion type exception code with the highest priority while looping back, we can respond appropriately to program instructions that cannot be detected so that the completion type exception with the highest priority is detected first. become able to. Furthermore, while the CMPL XC register 13 of the prior art is a register with an output function, the exception code memory means 6 can be a register without an output function, so that it can be implemented with a small number of gates.
しかも、割込処理の起動に従って命令が正常終了した場
合には、例外コードラッチ手段4には例外コードがない
ことを表す初期コードがセットされるので、現時点で実
行した命令でプログラム例外が発生したかのような誤解
を招くことがなくなるとともに、例外コードメモリ手段
6に従って割込処理した例外コードを知ることも確保さ
れるのである.
そして、例外コード選択千段5は、ステートマシンがS
TOPステートにあるときにあって、いずれの例外コー
ドも検出されていないことを条件に、例外コードラッチ
千段4の保持データをループバックするよう処理するこ
とから、サービスプロセッサの処理をCPUが代行する
処理や、CPU命令とその例外によるプログラム割込処
理をサービスプロセンサが代行する処理も実現できるよ
うになるのである。Moreover, if the instruction ends normally according to the start of the interrupt process, an initial code indicating that there is no exception code is set in the exception code latch means 4, so that a program exception occurs with the currently executed instruction. Such misunderstandings can be avoided, and it is also ensured that the exception code used for interrupt processing can be known in accordance with the exception code memory means 6. Then, in the exception code selection stage 5, the state machine is S
When the CPU is in the TOP state and no exception code is detected, the data held in the exception code latch 4 is looped back, so the CPU takes over the processing of the service processor. This also makes it possible to implement processing in which the service processor takes over the processing of program interruptions caused by CPU commands and their exceptions.
以下、実施例に従って本発明を詳細に説明する。 Hereinafter, the present invention will be explained in detail according to examples.
第2図に、パイプラインのラストステージであるライト
ステージに従って、本発明のプログラム例外コード制御
回路の一実施例の構成を示す。図中、第4図に示したも
のと同じものについては、同一の記号で示してある。第
2図(a)中、15aは本発明に係るPGM XCレ
ジスタであって、例外コードがないことを表すALL“
0“′を初期コードにして、プログラム命令の実行中に
検出される例外コードを所定の周期に従って更新しなが
ら一時的に保持していくもの、14aは本発明に係る例
外コード選択回路であって、一般例外検出回路lOから
の一般例外コードと、ループバックされるPGM X
Cレジスタ15aの完了型例外コードと、完了型例外検
出回路11からの完了型例外コードと、ALL“0”の
コードとを入力コードとして、例外コードの有効信号と
PGM XCレジスタ15aに保持される完了型例外
コードの優先度を参照することで、いずれか1つの入力
コードを選択するもの、30はRETAINレジスタで
あって、プログラム割込処理の終了時に最終的に更新さ
れたPGM XCレジスタ15aの例外コードを記憶
するものである.
第2図(b)に示すように、PGM XCレジスタ1
5aをイネーブル状態にするためのPGM XC
CLK ENBL信号と、PGM RUPTラッチ
21をイネーブル状態にするためのPGM RUPT
LCH CLK ENBL信号は、ORゲート
31に従って、PROCESS STATE信号かS
TOP STATE信号のいずれか一方の出力がある
ときに出力されることになり、RETAINレジスタ3
0をイネーブル状態にするためのRETAIN CL
K ENBL信号は、ANDゲート32に従って、P
GM RtJPT LCH信号が出力される条件で
、かつSTRAT STATE信号が出力されるとき
に出力されることになる。FIG. 2 shows the configuration of an embodiment of the program exception code control circuit of the present invention according to the write stage, which is the last stage of the pipeline. In the figure, the same parts as shown in FIG. 4 are indicated by the same symbols. In FIG. 2(a), 15a is a PGM
14a is an exception code selection circuit according to the present invention, which uses 0"' as an initial code and temporarily stores an exception code detected during execution of a program instruction while updating it according to a predetermined cycle. , the general exception code from the general exception detection circuit lO and the PGM X that is looped back.
Using the completion type exception code of the C register 15a, the completion type exception code from the completion type exception detection circuit 11, and the ALL "0" code as input codes, the valid signal of the exception code and the PGM XC register 15a hold the input code. One input code is selected by referring to the priority of the completion type exception code. 30 is a RETAIN register, and the PGM XC register 15a which is finally updated at the end of program interrupt processing It stores exception codes. As shown in FIG. 2(b), PGM XC register 1
PGM XC to enable 5a
CLK ENBL signal and PGM RUPT to enable PGM RUPT latch 21
The LCH CLK ENBL signal is either the PROCESS STATE signal or the S
It will be output when either one of the TOP STATE signals is output, and the RETAIN register 3
RETAIN CL to enable 0
The K ENBL signal, according to AND gate 32,
It will be output under the conditions that the GM RtJPT LCH signal is output and when the STRAT STATE signal is output.
次に、このように構威される本発明のプログラム例外コ
ード制御回路の動作処理について説明する.
一般例外検出回路10が一般例外を検出せず、かつ完了
型例外検出回路l1が完了型例外を検出していないとき
には、例外コード選択回路14aは、ALL“0”の入
力データを選択して、PROCESS STATE信
号に従ってイネープル状態となっているPGM MC
レジスタ15aにセットするよう処理する。このように
して、一般例外も完了型例外も検出されないときには、
PGM XCレジスタ15aは、例外コードがないこ
とを表すALL“0”を保持し続けることになる。Next, the operation processing of the program exception code control circuit of the present invention configured as described above will be explained. When the general exception detection circuit 10 does not detect a general exception and the completion type exception detection circuit l1 does not detect a completion type exception, the exception code selection circuit 14a selects the input data of ALL "0", PGM MC in enabled state according to PROCESS STATE signal
Processing is performed to set it in the register 15a. In this way, when neither a general exception nor a completion type exception is detected,
The PGM XC register 15a continues to hold ALL "0" indicating that there is no exception code.
一方、一般例外検出回路10が一般例外の発生を検出し
て一般例外コードを出力すると、例外コード選択回路1
4aは、完了型例外検出回路1lの完了型例外コードや
ループバックされるPGM MCレジスタ15aの保
持コードやALL゛0゛゜の入カコードに関係なく、こ
の出力される一般例外コードを選択して、イネーブル状
態となっているPGM XCレジスタ15aにセット
するよう処理するとともに、ANDゲート20は、割込
要求信号であるSET PGM LCH信号を出力
する.このとき、従来技術と同様にPGM RUPT
ラッチ21がセットされることで、PGM RUPT
LCH信号が出力される.このようにして、SET
PGM LCI{信号が出力されると、図示しな
い論理に従ってステートがPROCESSステートから
RESTOREステートに遷移して割込処理に入ること
になるので、PGM XCレジスタ15aがディスイ
ネーブル状態になって一般例外コードがPGM XC
レジスタ15aに保持されることになる。On the other hand, when the general exception detection circuit 10 detects the occurrence of a general exception and outputs a general exception code, the exception code selection circuit 1
4a selects this general exception code to be output, regardless of the completion type exception code of the completion type exception detection circuit 1l, the hold code of the PGM MC register 15a to be looped back, or the input code of ALL゛0゛゜. At the same time, the AND gate 20 outputs the SET PGM LCH signal, which is an interrupt request signal. At this time, as in the prior art, PGM RUPT
By setting the latch 21, PGM RUPT
LCH signal is output. In this way, SET
When the PGM LCI{ signal is output, the state transitions from the PROCESS state to the RESTORE state according to the logic not shown and enters interrupt processing, so the PGM XC register 15a becomes disabled and the general exception code is output. PGM XC
It will be held in the register 15a.
SET PGM LCH信号に従って割込処理が起
動されることで、RESTOREステートを経由してE
NDPROCステートに遷移して割込処理のマイクロプ
ログラムが起動されると、PGM XCレジスタ15
aに格納されている一般例外コードがメモリ上の固定ア
ドレスのところに格納されて、プログラムに対してその
一般例外コードが通知されるよう処理される。そして、
割込処理が終了して割込ルーチンの実行に入るべ<ST
ART STATE信号が出力されると、出力されて
いるPGM RUPT LCH信号との論理積に従
って、ANDゲート32からRETAIN CLK
ENBL信号が出力されることでRETAINレジス
タ30がイネーブル状態となって、PGM XCレジ
スタ15aに格納されている一般例外コードがRETA
INレジスタ30に記憶されることになる.
一方、完了型例外検出回路1lが完了型例外の発生を検
出して完了型例外コードを出力すると、例外コード選択
回路14aは、一般例外コードが出力されていないこと
を条件にこの出力される完了型例外コードを選択して、
イネープル状態となっているPC;M XCレジスタ
15aにセットするよう処理するとともに、ANDゲー
ト20は、割込要求信号であるSET PGM L
CH信号を出力する.そして、CMPL XVラッチ
12は、CMPL XV信号を出力することで完了型
例外が発生したことを表示する。By starting the interrupt processing according to the SET PGM LCH signal, the E
When the interrupt processing microprogram is activated by transitioning to the NDPROC state, the PGM XC register 15
The general exception code stored in a is stored at a fixed address in memory, and the general exception code is processed to be notified to the program. and,
After the interrupt processing is finished, the execution of the interrupt routine begins.<ST
When the ART STATE signal is output, the RETAIN CLK is output from the AND gate 32 according to the AND with the output PGM RUPT LCH signal.
When the ENBL signal is output, the RETAIN register 30 is enabled, and the general exception code stored in the PGM XC register 15a is set to RETAIN.
It will be stored in the IN register 30. On the other hand, when the completion type exception detection circuit 1l detects the occurrence of a completion type exception and outputs a completion type exception code, the exception code selection circuit 14a detects the completion type exception code that is output on the condition that the general exception code is not output. Select the type exception code and
PC in the enabled state: Processes to set it in the M
Outputs CH signal. The CMPL XV latch 12 then outputs the CMPL XV signal to indicate that a completion type exception has occurred.
このようにして、PGM XCレジスタ15aに完了型
例外コードが保持されると、例外コード選択回路14a
は、一般例外検出回路10から一般例外コードが通知さ
れず、かつ完了型例外検出回路l1から新たな完了型例
外コードが通知されないときには、PGM XCレジ
スタ15aが保持する完了型例外コードを選択して出力
する.この選択処理に従って、PGMMCレジスタ15
aは、END OP信号がでるまでの間、PGM
XC CLK ENBL信号のクロック周期に同期
して同じ完了型例外コードをループバックしながら更新
することで保持し続けるよう処理することになる.例外
コード選択回路14aは、この保持処理時に、CMPL
XVラッチl2の表示に従って完了型例外検出回路
1lから新たな完了型例外コードの通知を受け取ること
を知ると、保持している完了型例外コードが持つ優先度
(完了型例外コード同士間の優先度)と通知される新た
な完了型例外コードが持つ優先度とを比較して、優先度
の高い方の完了型例外コードを選択して出力する.この
選択処理に従って、PGM XCレジスタ15aは、
完了型例外検出回路l1から保持している完了型例外コ
ードよりも優先度の高い完了型例外コードが通知される
ときには、その新たな完了型例外コードに更新しながら
完了型例外コードを保持し続けるよう処理することにな
る。In this way, when the completion type exception code is held in the PGM XC register 15a, the exception code selection circuit 14a
When a general exception code is not notified from the general exception detection circuit 10 and a new completion type exception code is not notified from the completion type exception detection circuit l1, the completion type exception code held in the PGM Output. According to this selection process, the PGMMC register 15
a is PGM until the END OP signal is output.
Processing is performed so that it continues to be held by updating the same completion type exception code while looping back in synchronization with the clock cycle of the XC CLK ENBL signal. The exception code selection circuit 14a selects the CMPL during this holding process.
When it is learned that a notification of a new completion type exception code will be received from the completion type exception detection circuit 1l according to the display of the XV latch l2, the priority of the held completion type exception code (priority between completion type exception codes) is determined. ) and the priority of the new completion type exception code that is notified, and selects and outputs the completion type exception code with the higher priority. According to this selection process, the PGM XC register 15a is
When a completion-type exception code with a higher priority than the completion-type exception code held by the completion-type exception detection circuit l1 is notified, the completion-type exception code is continued to be held while updating to the new completion-type exception code. It will be processed as follows.
そして、完了型例外コードを発生させたプログラム命令
のEND OP信号がでることで、ANDゲート20
よりSET PGM LCH信号が出力されると、
一般例外コードが出力されるときと同様の処理に従って
、PGM XCレジスタl5aがディスイネーブル状
態になることで完了型例外コードの更新処理が停止され
るとともに、起動される割込処理のマイクロプログラム
に従って更新の終了した最も高い優先度を持つ完了型例
外コードがメモリ上の固定アドレスのところに格納され
て、プログラムに対してその完了型例外コードが通知さ
れるよう処理される。そして、割込処理の終了に伴って
RETAIN CLK ENBL信号が出力されて
RETAINレジスタ3oがイネープル状態となること
で、割込処理に入ったPGM XCレジスタ15aの
完了型例外コードがRETAINレジスタ3oに記憶さ
れることになる.
第3図に、プログラム命令の途中のフローで完了型例外
が検出されたときのタイムチャートを示す。このタイム
チャートと第6図のタイムチャートとを比較することで
分かるように、従来技術では、PGM XCレジスタ
15が次のプログラム例外発生時までの間、割込処理に
入った例外コードを保持し続けるのに対して、本発明で
は、RETATNレジスク30が割込処理に入った例外
コードを保持するとともに、PGM XCレジスタ1
5aは正常状態に復帰すると例外コードをクリアして保
持しないよう処理することになる。これから、本発明で
は、サービスプロセッサからPGM XCレジスタ1
5aをスキャンアウトしたときに、現時点で実行した命
令でプログラム例外が発生したかのような誤解を招くこ
とが起こらないようにできるとともに、RETAINレ
ジスタ30をスキャンアウトすることで割込処理に入っ
た例外コードを知ることも確保されるのである。Then, when the END OP signal of the program instruction that generated the completion type exception code is output, the AND gate 20
When the SET PGM LCH signal is output from
According to the same process as when a general exception code is output, the PGM The completion-type exception code with the highest priority that has completed is stored at a fixed address in memory, and processing is performed so that the program is notified of the completion-type exception code. Then, when the interrupt processing is completed, the RETAIN CLK ENBL signal is output and the RETAIN register 3o is enabled, so that the completion type exception code of the PGM XC register 15a that has entered the interrupt processing is stored in the RETAIN register 3o. It will be done. FIG. 3 shows a time chart when a completion type exception is detected in the flow of a program instruction. As can be seen by comparing this time chart with the time chart in FIG. 6, in the conventional technology, the PGM XC register 15 retains the exception code that entered the interrupt process until the next program exception occurs. In contrast, in the present invention, the RETATN register 30 holds the exception code that entered the interrupt process, and the PGM XC register 1
5a clears the exception code and does not retain it when the normal state is restored. From now on, in the present invention, from the service processor to the PGM XC register 1
When scanning out RETAIN register 30, it is possible to prevent the misunderstanding that a program exception has occurred due to the currently executed instruction. It also ensures that you know the exception code.
そして、例外コード選択回路14aは、ステートマシン
がSTOPステートにあるときにあっていずれの例外コ
ードも検出されていないときには、PGM XCレジ
スタ15aの保持データをループバックするよう処理す
る.この処理に従って、STOPステート中にレジスタ
変更等のサービスプロセソサ処理をCPUが代行する機
能を実現できるようになるとともに、CPU命令とその
例外によるプログラム割込をサービスプロセッサが代行
することが実現できるようになる.
以上図示実施例について説明したが、本発明はこれに限
定されるものではない.例えば、実施例では、例外コー
ド選択回路14aは、初期コードであるALL”O”を
入力するよう構威して選択させるものを開示したが、一
般例外及び完了型例外が検出されないときにはいずれの
入力データも選択しないように構戒すれば、ALL“0
”を入力しなくても等価な処理を実現できることになる
のである。Then, when the state machine is in the STOP state and no exception code is detected, the exception code selection circuit 14a processes the data held in the PGM XC register 15a to loop back. According to this process, it becomes possible to realize a function in which the CPU performs service processor processing such as changing registers during the STOP state, and also enables the service processor to perform program interrupts caused by CPU instructions and their exceptions on behalf of the CPU. become. Although the illustrated embodiment has been described above, the present invention is not limited thereto. For example, in the embodiment, the exception code selection circuit 14a is configured to select the initial code ALL "O" by forcing it to be input, but when a general exception or a completion type exception is not detected, any input If you take care not to select any data, ALL “0”
This means that equivalent processing can be achieved without inputting ``.
このように、本発明によれば、PGM XCレジスタ
15aはループバックしながら最も優先度の高い完了型
例外コードを保持するよう構成するので、優先度の高い
完了型例外が先に検出されることになるようにできない
プログラム命令に対しても適切に対応できるようになる
。As described above, according to the present invention, the PGM It will be possible to respond appropriately to program instructions that cannot be made as desired.
そして、従来技術のCMPL XCレジスタ13が出
力機能を有するレジスタであるのに対して、RETAI
Nレジスタ30は出力機能を有しないレジスタであるの
で、ゲート数も少なくて実装できるようになる.しかも
、命令が正常終了した場合にあっても、現時点で実行し
た命令でプログラム例外が発生したかのような誤解を招
くことがないとともに、割込処理した例外コードを知る
ことも確保されるのである.
更に、SET PGM LCH信号は、マシンチェ
ックのためのゲート回路を介して生或されるPGM
RUPT ENBL信号を介して生或されることから
遅延が避けられない信号となるが、本発明では、PGM
XCレジスタ15aをイネープル状態にするための
PGM XC CLKENBL信号を、このSET
PGM LCH信号に関係なく生威できるように
なることから、割込処理の応答性を高めることができる
という利点もててくることになる。And, while the CMPL XC register 13 of the prior art is a register with an output function, the RETAI
Since the N register 30 is a register that does not have an output function, it can be implemented with a small number of gates. Furthermore, even if an instruction completes normally, it does not give rise to the misunderstanding that a program exception has occurred due to the currently executed instruction, and it is also ensured that the exception code that handled the interrupt can be known. be. Furthermore, the SET PGM LCH signal is a PGM signal generated through a gate circuit for machine check.
Since it is generated via the RUPT ENBL signal, it is an unavoidable signal that is delayed, but in the present invention, the PGM
This SET sets the PGM XC CLKENBL signal to enable the XC register 15a.
Since the interrupt processing can be performed regardless of the PGM LCH signal, there is an advantage that the responsiveness of interrupt processing can be improved.
第1図は本発明の原理構戒図、
第2図は本発明のプログラム例外コード制御回路の一実
施例、
第3図は本発明のプログラム例外コード制御回路のタイ
ムチャート、
第4図は従来のプログラム例外コード制御回路の構戒図
、
第5図はステートマシンの遷移図、
第6図は従来のプログラム例外コード制御回路のタイム
チャートである。
図中、1は一般例外検出手段、2は完了型例外検出手段
、3は完了型例外コード表示手段、4は例外コードラッ
チ手段、5は例外コード選択手段、6は例外コードメモ
リ手段、7は割込処理要求手段、10は一般例外検出回
路、1lは完了型例外検出回路、12はCMPL X
Vラッチ、l3はCMPL XCレジスタ、14及び
14aは例外コード選択回路、15及び15aはPGM
XCレジスタ、21はPGM RUPTラ・7チ
、30はR ETA I Nレジスタである。FIG. 1 is a diagram of the principle structure of the present invention, FIG. 2 is an embodiment of the program exception code control circuit of the present invention, FIG. 3 is a time chart of the program exception code control circuit of the present invention, and FIG. 4 is a conventional example. FIG. 5 is a state machine transition diagram, and FIG. 6 is a time chart of a conventional program exception code control circuit. In the figure, 1 is a general exception detection means, 2 is a completion type exception detection means, 3 is a completion type exception code display means, 4 is an exception code latch means, 5 is an exception code selection means, 6 is an exception code memory means, and 7 is a completion type exception detection means. Interrupt processing request means; 10 is a general exception detection circuit; 1l is a completion type exception detection circuit; 12 is a CMPL
V latch, l3 is CMPL XC register, 14 and 14a are exception code selection circuits, 15 and 15a are PGM
The XC register, 21 is the PGM RUPT register, and 30 is the RETAIN register.
Claims (2)
表す一般例外コード及び完了型例外コードをプログラム
に通知するプログラム例外コード制御回路において、 例外コードがないことを表すコードを初期コードにして
、検出される例外コードを一時的に保持する例外コード
ラッチ手段(4)と、 該例外コードラッチ手段(4)が保持する例外コードを
記憶する例外コードメモリ手段(6)と、検出される一
般例外コードと検出される完了型例外コードと上記例外
コードラッチ手段の保持データとを入力データとして、
一般例外コードが検出されるときには該一般例外コード
を選択し、一般例外コードが検出されずに完了型例外コ
ードが検出されるときに、該保持データが初期コードを
保持するときには検出される完了型例外コードを選択す
るとともに、該保持データが完了型例外コードを保持す
るときには該保持される完了型例外コードか検出される
完了型例外コードの内の優先度の高い方の完了型例外コ
ードを選択し、そして、一般例外コード及び完了型例外
コードが検出されないときに、該保持データが完了型例
外コードを保持するときには該完了型例外コードを選択
するとともに、該保持データが初期コードを保持すると
きにはいずれの入力データも選択しないよう処理する例
外コード選択手段(5)とを備え、上記例外コードラッ
チ手段(4)は、プログラム命令の実行中に所定の周期
に従って上記例外コード選択手段(5)の選択出力を入
力として保持データを更新していくとともに、上記例外
コードメモリ手段(6)は、プログラム割込処理時に、
最終的に更新された上記例外コードラッチ手段(4)の
例外コードを記憶するよう処理してなることを、特徴と
するプログラム例外コード制御回路。(1) In the program exception code control circuit that notifies the program of the general exception code and completion type exception code that represent the interrupt type detected during execution of a program instruction, a code indicating that there is no exception code is used as the initial code, Exception code latch means (4) for temporarily holding a detected exception code; exception code memory means (6) for storing the exception code held by the exception code latch means (4); and a general exception to be detected. code, the detected completion type exception code, and the data held by the exception code latch means as input data,
When a general exception code is detected, select the general exception code, and when the general exception code is not detected and a completion type exception code is detected, and the retained data holds the initial code, the completion type to be detected. In addition to selecting an exception code, if the retained data holds a completion type exception code, select the completion type exception code that has a higher priority between the held completion type exception code or the detected completion type exception code. Then, when a general exception code and a completion type exception code are not detected, if the held data holds a completion type exception code, select the completion type exception code, and if the held data holds an initial code, select the completion type exception code. exception code selection means (5) for processing so as not to select any input data; In addition to updating the held data using the selection output as input, the exception code memory means (6) also updates the data during program interrupt processing.
A program exception code control circuit characterized in that it stores the finally updated exception code of the exception code latch means (4).
路において、 例外コード選択手段(5)は、ステートマシンがストッ
プステートにあるときにあって、いずれの例外コードも
検出されていないことを条件に、例外コードラッチ手段
(4)の保持データを選択するよう処理してなることを
、 特徴とするプログラム例外コード制御回路。(2) In the program exception code control circuit according to claim (1), the exception code selection means (5) is provided when the state machine is in the stop state and no exception code is detected. A program exception code control circuit characterized in that the program exception code control circuit performs processing to select the data held by the exception code latch means (4).
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1156567A JP2809710B2 (en) | 1989-06-19 | 1989-06-19 | Program exception code control circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1156567A JP2809710B2 (en) | 1989-06-19 | 1989-06-19 | Program exception code control circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0322032A true JPH0322032A (en) | 1991-01-30 |
| JP2809710B2 JP2809710B2 (en) | 1998-10-15 |
Family
ID=15630606
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1156567A Expired - Fee Related JP2809710B2 (en) | 1989-06-19 | 1989-06-19 | Program exception code control circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2809710B2 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2016509716A (en) * | 2013-01-23 | 2016-03-31 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Computer program, computer system and method for processing vector exception codes |
| US10101998B2 (en) | 2013-01-23 | 2018-10-16 | International Business Machines Corporation | Vector checksum instruction |
| US10146534B2 (en) | 2013-01-23 | 2018-12-04 | International Business Machines Corporation | Vector Galois field multiply sum and accumulate instruction |
| US10203956B2 (en) | 2013-01-23 | 2019-02-12 | International Business Machines Corporation | Vector floating point test data class immediate instruction |
-
1989
- 1989-06-19 JP JP1156567A patent/JP2809710B2/en not_active Expired - Fee Related
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2016509716A (en) * | 2013-01-23 | 2016-03-31 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Computer program, computer system and method for processing vector exception codes |
| US10101998B2 (en) | 2013-01-23 | 2018-10-16 | International Business Machines Corporation | Vector checksum instruction |
| US10146534B2 (en) | 2013-01-23 | 2018-12-04 | International Business Machines Corporation | Vector Galois field multiply sum and accumulate instruction |
| US10203956B2 (en) | 2013-01-23 | 2019-02-12 | International Business Machines Corporation | Vector floating point test data class immediate instruction |
| US10338918B2 (en) | 2013-01-23 | 2019-07-02 | International Business Machines Corporation | Vector Galois Field Multiply Sum and Accumulate instruction |
| JP2019145164A (en) * | 2013-01-23 | 2019-08-29 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Computer program, and computer system and method for handling vector exception code |
| US10606589B2 (en) | 2013-01-23 | 2020-03-31 | International Business Machines Corporation | Vector checksum instruction |
| US10671389B2 (en) | 2013-01-23 | 2020-06-02 | International Business Machines Corporation | Vector floating point test data class immediate instruction |
| US10877753B2 (en) | 2013-01-23 | 2020-12-29 | International Business Machines Corporation | Vector galois field multiply sum and accumulate instruction |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2809710B2 (en) | 1998-10-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS6239780B2 (en) | ||
| US4747045A (en) | Information processing apparatus having an instruction prefetch circuit | |
| JPH0348537B2 (en) | ||
| JPH0322032A (en) | Program exception code control circuit | |
| US5634077A (en) | Information processing system with control methods and apparatus for information storage and interrupt request handling scheme | |
| JP3531856B2 (en) | Program control method and program control device | |
| JPS5868162A (en) | Retry processing system | |
| JP3755168B2 (en) | Programmable controller | |
| JPS60108973A (en) | Method for finding the minimum value of array elements and element number of the minimum element | |
| JPS6242301B2 (en) | ||
| CN1026633C (en) | Operation processor | |
| JP2896207B2 (en) | A / D converter | |
| JP2544533B2 (en) | Programmable controller sequence instruction processor | |
| JPS59144955A (en) | Information processor | |
| JPH06161778A (en) | Multiflow instruction control method and instruction processing device | |
| US5123093A (en) | Operational processor for performing a memory access and an operational process in parallel | |
| JP2635863B2 (en) | Central processing unit | |
| JPS6218933B2 (en) | ||
| JPS6365528A (en) | Coprocessor | |
| JPH05189015A (en) | Programmable controller | |
| JPH0736820A (en) | I/o controller | |
| JPH05189014A (en) | Programmable controller | |
| JPS62212755A (en) | Channel controller | |
| JPH03164945A (en) | Data processor | |
| JPH03228140A (en) | Microprogram controller |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |