JPS6250934A - Interrupting control system of processor - Google Patents

Interrupting control system of processor

Info

Publication number
JPS6250934A
JPS6250934A JP60189637A JP18963785A JPS6250934A JP S6250934 A JPS6250934 A JP S6250934A JP 60189637 A JP60189637 A JP 60189637A JP 18963785 A JP18963785 A JP 18963785A JP S6250934 A JPS6250934 A JP S6250934A
Authority
JP
Japan
Prior art keywords
instruction
program
interrupt
execution
code
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
Application number
JP60189637A
Other languages
Japanese (ja)
Other versions
JPH0795278B2 (en
Inventor
Yoshihiro Miyazaki
義弘 宮崎
Soichi Takatani
高谷 壮一
Masayuki Tanji
雅行 丹治
Atsuhiko Nishikawa
敦彦 西川
Shinichiro Yamaguchi
伸一朗 山口
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60189637A priority Critical patent/JPH0795278B2/en
Priority to US06/900,987 priority patent/US4764869A/en
Publication of JPS6250934A publication Critical patent/JPS6250934A/en
Publication of JPH0795278B2 publication Critical patent/JPH0795278B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Abstract

PURPOSE:To stop the processing, to generate the interruption, to prevent the changing of the program level, to resume the instruction by the return instruc tion and to execute the processing when the request of the priority level higher than the present program level is detected by the interrupting request from the external part on the way of the execution of the instruction. CONSTITUTION:A work register 65 of an arithmetic unit 6 decides whether or not a priority interrupting existing signal 14 is on. As the result, when it is detected that the interruption with the priority level higher than the present program occurs at the time of on, namely, on the way of the sequence, the first code different from the code by the interruption after the instruction is completed is saved to the main memory device, and the value provided for the interruption is set to a program counter 21. The program level is unchanged, the execution of the present instruction is completed, the execution of the next instruction is started and after the interruption is executed by the program of the branching destination, the return instruction is executed. Thus, the identifi cation code popped from the staff is decided, in case of the first code, the interrupting result saved at the main memory device is recovered, and the processing is resumed from the way of the execution of the instruction.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、処理装置の割込制御方式に関わり、特に、命
令実行途中での割込に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to an interrupt control method for a processing device, and particularly relates to an interrupt during execution of an instruction.

〔発明の背景〕[Background of the invention]

文字処理やリスト処理を高速に実行するために、これら
の処理をファームウェア化することがあるが、この場合
、1つの命令の実行時間が非常に長いため、命令実行途
中で割込を入れることができなければ、外部に対する応
答性が落ちてしまう。
In order to execute character processing and list processing at high speed, these processes are sometimes implemented in firmware, but in this case, since the execution time of one instruction is extremely long, it is necessary to insert an interrupt in the middle of instruction execution. If this is not possible, responsiveness to the outside world will decline.

この命令実行途中割込の実現方法としては公知例1rV
AX  11 Architecture Handb
ookJ及び公知例2「米国特許第3401375号」
に述べられている方式がある。
A known example 1rV is a method for realizing interrupts during instruction execution.
AX 11 Architecture Handb
ookJ and known example 2 "US Patent No. 3401375"
There is a method described in

公知例の該当部分を簡単に説明する。まず、一般の割込
は第2図(a)、第2図(b)に示すように、割込要求
があると命令の切れ目でプログラムカウンタ、プログラ
ムレベルの切換を行い、割込に対応した処理終了後、プ
ログラムカウンタ、プログラムレベルを回復する。これ
に対しVAXIIArchitecture Hand
book P 52 e P 53に記載のProce
ssor 5tatus Longwordでは、 F
 P D (FirstPart Done)フラグを
設け、第3図(a)、第3図(b)に示す如く制御する
ことにより命令実行途中での割込を可能としている。
The relevant part of the known example will be briefly explained. First, for general interrupts, as shown in Figure 2 (a) and Figure 2 (b), when there is an interrupt request, the program counter and program level are switched at the end of the instruction to respond to the interrupt. After processing is completed, the program counter and program level are restored. On the other hand, VAXII Architecture Hand
Procedure described in book P 52 e P 53
In ssor 5tatus Longword, F
By providing a P D (First Part Done) flag and controlling it as shown in FIGS. 3(a) and 3(b), it is possible to interrupt during instruction execution.

しかし、本方式では、繰り返し処理の途中結果を汎用レ
ジスタを用いて保存するため、繰り返し処理を含んだ命
令の実行により、16本しかない汎用レジスタの中の数
本の内容が破壊されてしまう。そのため、汎用レジスタ
は他の目的にも使用するため、繰り返し処理を含んだ命
令実行の前に、あらかじめ、破壊される可能性のあるレ
ジスタの内容を退避し、同命令実行終了後回復する等の
無駄な処理を行わねばならないという欠点がある。
However, in this method, intermediate results of repetitive processing are stored using general-purpose registers, so the contents of several of the only 16 general-purpose registers are destroyed by execution of an instruction that includes repetitive processing. Therefore, since general-purpose registers are used for other purposes, it is necessary to save the contents of registers that may be destroyed before executing an instruction that involves repeated processing, and restore the contents after the execution of the same instruction. The disadvantage is that unnecessary processing must be performed.

しかも、これらの命令は常に実行時間が長いわけではな
く、サーチやパターンマツチング等では実行時間が短い
ことも多く、退避2回復の時間の占める割合は大きい。
Furthermore, these instructions do not always take a long time to execute; search, pattern matching, etc. often take a short time to execute, and the time taken up by saving and restoring takes up a large proportion of the time.

具体的には1例えば16バイトの転送に、これらの命令
を使うと、1回のメモリアクセスで4バイトの読出しま
たは書込みを行うとして、レジスタ退避用アクセス4回
、本来の目的のためのメモリアクセス8回、レジスタ回
復用アクセス4回で実にレジスタ退避9同復に50%の
時間を費やしてしまう。
Specifically, if you use these instructions to transfer, for example, 16 bytes, and one memory access reads or writes 4 bytes, you will need 4 register save accesses and 4 memory accesses for the original purpose. 8 times and 4 accesses for register recovery, 50% of the time is actually spent saving and restoring the register 9 times.

〔発明の目的〕[Purpose of the invention]

本発明は、従来例の欠点を軽減した命令実行途中割込を
実現することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to realize an interrupt in the middle of instruction execution that alleviates the drawbacks of the conventional example.

〔発明の概要〕[Summary of the invention]

本発明は、外部からの割込要求で現在のプログラムレベ
ルより優先レベルの高い要求の有無を命令実行の途中で
検出した場合、処理を中新し命令実行途中割込を発生す
ること、この割込ではプログラムレベルを不変とするこ
と、従って割込先で前記割込要求が通常の割込として処
理されること、処理後、2回の復帰命令により、前記命
令実行途中から再開することを特徴とする。
According to the present invention, when the presence or absence of an external interrupt request with a higher priority level than the current program level is detected in the middle of instruction execution, the process is restarted and an interrupt is generated in the middle of instruction execution. In this case, the program level remains unchanged, so the interrupt request is processed as a normal interrupt at the interrupt destination, and after processing, the execution of the instruction is resumed from the point where the instruction was executed by two return instructions. shall be.

第1図(a)、第1図(b)は本発明の概略制御方式を
示す。
FIG. 1(a) and FIG. 1(b) schematically show the control method of the present invention.

図中口は1つのマクロ命令、他はマイクロ命令による処
理を示す。
The opening in the figure shows processing by one macroinstruction, and the others show processing by microinstructions.

〔発明の実施例〕[Embodiments of the invention]

本発明の実施例を以下に説明する。 Examples of the present invention will be described below.

第4図は、基本処理機構2の構成概略を示す。FIG. 4 shows a schematic configuration of the basic processing mechanism 2. As shown in FIG.

システムバスインタフェイス制御機構3は、システムバ
ス1を介して主記憶や入出力装置とのデータ転送を制御
する。命令解読ユニット4はマクロ命令を解読し、マイ
クロ命令先頭番地を生成する。
The system bus interface control mechanism 3 controls data transfer with the main memory and input/output devices via the system bus 1. The instruction decoding unit 4 decodes the macroinstruction and generates a microinstruction start address.

演算制御系5はマイクロ命令を制御する。演算ユニット
6はマイクロ命令の元で制御され、実際の演算を実行す
る。
The arithmetic control system 5 controls microinstructions. The arithmetic unit 6 is controlled under microinstructions and performs the actual arithmetic operations.

第5図は、命令解読ユニット4の構成を示す。FIG. 5 shows the configuration of the instruction decoding unit 4.

プログラムカウンタ(PC)21は解読しようとしてい
るマクロ命令の主メモリ上の番地を指している。セレク
タ22は次のPCを選択するもので、分岐する場合には
B入力部ち演算ユニットから渡される値を、そうでない
場合はインクリメンタ23の出力結果を選択する。読み
出されたマクロ命令は命令バッファレジスタ24にセッ
トされ、その出力は命令解読器25によって解読されマ
クロ命令に対応する。マイクロプログラムの先頭番地3
1が生成される。一方、システムバスがらの割込要求信
号7は、コンコーダ28により最も高い割込レベルが計
算される。その結果32と固定パターン27とが合成さ
れ、割込のための処理を行うマイクロプログラムの先頭
番地33が生成される1割込レベル32とプログラムレ
ベル30は比較器29で比較され、その出力14は、割
込レベルがプログラムレベルより高く、割込を受付ける
べき場合にオン、そうでないときオフである。
A program counter (PC) 21 points to the address in main memory of the macro instruction to be decoded. The selector 22 selects the next PC, and when branching, selects the value passed from the B input section or arithmetic unit, and otherwise selects the output result of the incrementer 23. The read macro instruction is set in the instruction buffer register 24, and its output is decoded by the instruction decoder 25 and corresponds to the macro instruction. Microprogram starting address 3
1 is generated. On the other hand, for the interrupt request signal 7 from the system bus, the highest interrupt level is calculated by the concoder 28. The result 32 and the fixed pattern 27 are combined to generate the starting address 33 of a microprogram that performs interrupt processing.1 The interrupt level 32 and the program level 30 are compared by a comparator 29, and the output 14 is on when the interrupt level is higher than the program level and interrupts should be accepted, and off otherwise.

セレクタ26はこの優先割込存在信号14がオンのとき
前記割込用先頭番地33を選択し、オフのとき前記マク
ロ命令用先頭番地31を選択し、次の処理のためのマイ
クロプログラム先頭番地13としている。この機構は、
マクロ命令の切れ目で割込を入れるために使用される。
The selector 26 selects the interrupt start address 33 when the priority interrupt presence signal 14 is on, selects the macro instruction start address 31 when it is off, and selects the microprogram start address 13 for the next process. It is said that This mechanism is
Used to insert an interrupt at the end of a macro instruction.

更に、前記優先割込存在信号14は、演算制御系2に出
力されているが、これは、本発明のポイントである命令
実行途中割込に使用される。
Furthermore, the priority interrupt presence signal 14 is output to the arithmetic control system 2, and is used for interrupts during instruction execution, which is the key point of the present invention.

第6図は、演算制御系5の構成を示す、マイクロプログ
ラムは制御記憶44に格納されている。
FIG. 6 shows the configuration of the arithmetic control system 5, and the microprogram is stored in the control memory 44.

マイクロプログラムカウンタ(MPC)42は次に実行
しようとするマイクロ命令の制御記憶44上の番地を示
す、セレクタ41は次のMPCを選択するもので、次の
処理へ移るときは命令解読ユニットから渡される先頭番
地13を、演算結果で分岐するときは演算ユニットの出
力データ16を。
A microprogram counter (MPC) 42 indicates the address in the control memory 44 of the next microinstruction to be executed.The selector 41 selects the next MPC. When branching at the starting address 13 based on the calculation result, the output data 16 of the calculation unit is used.

分岐のマイクロ命令実行時は、マイクロ命令の一部48
を、次の番地のマイクロ命令に進むときはインクリメン
タ43の出力を選択する。次番地制御系46はマイクロ
命令の一部49と条件成立信号50を元に前記セレクタ
41を制御する6セレクタ47は条件判定のためのセレ
クタであり、マイクロ命令の一部51でどの信号を選択
するか制御する。このセレクタ47の1人力に、前記優
先割込存在信号14が入力されており、マイクロ命令は
この信号のオン、オフを判定することができる。
When executing a branch microinstruction, part of the microinstruction 48
When proceeding to the microinstruction at the next address, the output of the incrementer 43 is selected. The next address control system 46 controls the selector 41 based on the part 49 of the microinstruction and the condition fulfillment signal 50. The selector 47 is a selector for condition judgment, and selects which signal is selected by the part 51 of the microinstruction. or control. The priority interrupt presence signal 14 is input to one of the selectors 47, and the microinstruction can determine whether this signal is on or off.

第7図は、演算ユニット6の構成を示す5セレクタ61
はプログラムカウンタ10プログラムレベル12.シス
テムバースリードデータ9゜マイクロ命令の一部15の
いずれかを選択し、入力バス62にのせることができる
。マクロ命令用の汎用レジスタ(GRO−GR7)64
あるいはマイクロ命令用のワークレジスタ(WKO−W
K7)65の出力は入力バス62または入力バス63に
のせることができる。演算器66は入力バス62゜入力
バス63を入力し、演算結果を出力バス16に出力する
。このバスは汎用レジスタ(GRO〜GR7)64.’
7−クレジスタ (WKO〜WK7)65に入力される
と共に、他のユニットにも接続される。
FIG. 7 shows a 5 selector 61 showing the configuration of the arithmetic unit 6.
is program counter 10 program level 12. Any one of the system bus read data 9° microinstruction portions 15 can be selected and placed on the input bus 62. General-purpose register (GRO-GR7) 64 for macro instructions
Or a work register for microinstructions (WKO-W
The output of K7) 65 can be placed on input bus 62 or input bus 63. The arithmetic unit 66 inputs the input bus 62 and the input bus 63, and outputs the calculation result to the output bus 16. This bus includes general purpose registers (GRO to GR7) 64. '
7-Creister (WKO to WK7) 65 and is also connected to other units.

第8図は、実行時間の長いマクロ命令(文字処理命令、
リスト処理命令等)のマイクロプログラムのフローチャ
ートを示す、ステップ101゜102ではオペランドを
ワークレジスタWKI。
Figure 8 shows macro instructions (character processing instructions,
In steps 101 and 102, the operand is set to the work register WKI.

WK2にセットする。このマイクロプログラムはWKI
、WK2をポインタとして使用し、更新しながらステッ
プ103からステップ105までを何回も繰り返し実行
し、ある条件が成立したときステップ106に抜け、命
令実行を終了する。ステップ103では、前記の優先割
込存在信号14がオンかどうか判定し、オン即ち、命令
途中で現在のプログラムレベルより優先レベルの高い割
込が発生したことを検出したとき、ステップ107に進
む。ステップ107では戻りのマイクロ命令番地として
、ステップ104の番地である1003をWK7にセッ
トする。実際はステップ107のマイクロ命令の定数部
15(第4図参照)を1003のパターンにしておき、
セレクタ61.演算器66を通してWK7にセットする
(第7図参照)・ステップ108では命令途中割込処理
マイクロプログラム訂INTに分岐する。
Set to WK2. This microprogram is WKI
, WK2 as a pointer, steps 103 to 105 are repeatedly executed while updating them, and when a certain condition is met, the program exits to step 106 and ends the instruction execution. In step 103, it is determined whether the priority interrupt presence signal 14 is on, and when it is detected that it is on, that is, an interrupt with a higher priority level than the current program level has occurred in the middle of an instruction, the process proceeds to step 107. In step 107, the address 1003 in step 104 is set in WK7 as the return microinstruction address. Actually, the constant part 15 of the microinstruction in step 107 (see Figure 4) is set to the pattern 1003,
Selector 61. It is set to WK7 through the arithmetic unit 66 (see FIG. 7). At step 108, the process branches to the instruction mid-instruction interrupt processing microprogram correction INT.

第9図は、前記命令途中割込処理マイクロプログラムの
フローチャートを示す。ステップ110では汎用レジス
タGR7(GR7はスタックポインタとして使用されて
いる)を4減算し、その結果をGR7及びMAR(メモ
リアドレスレジスタ:システムバスインタフェイス制御
機構2のレジスタで第4図の出力バス16を通して演算
ユニット6からセットできる)にセットする。WK7を
MWR(メモリライトデータレジスタ:システムバスイ
ンタフェイス制御機構2のレジスタで、出力バス16を
通して演算ユニット6からセットできる)にセットする
。それと同時にメモリライトを起動する(MWTの記号
で示す)。この起動によりMARで示される主メモリア
ドレスにMWRの内容がライトされる。即ちWK7がス
タックにブツシュされる。同様にしてステップ111で
WK2をスタックにブツシュし、ステップ112でWK
Iをスタックにブツシュする。ステップ110からステ
ップ112は内部の途中結果の退避処理である。ステッ
プ113では、識別コードとして「8」をスタックにブ
ツシュする。
FIG. 9 shows a flowchart of the instruction mid-interrupt processing microprogram. In step 110, the general-purpose register GR7 (GR7 is used as a stack pointer) is subtracted by 4, and the result is stored in GR7 and MAR (memory address register: a register of the system bus interface control mechanism 2 and output bus 16 in FIG. 4). can be set from the arithmetic unit 6 through the Set WK7 to MWR (memory write data register: a register of the system bus interface control mechanism 2, which can be set from the arithmetic unit 6 through the output bus 16). At the same time, memory write is started (indicated by the symbol MWT). This activation causes the contents of the MWR to be written to the main memory address indicated by MAR. That is, WK7 is pushed onto the stack. Similarly, in step 111, WK2 is pushed onto the stack, and in step 112, WK2 is pushed onto the stack.
Push I onto the stack. Steps 110 to 112 are processes for saving internal intermediate results. In step 113, "8" is pushed onto the stack as an identification code.

(「8」のパターンはマイクロ命令の定数部15で生成
される。)ステップ114ではPCをスタックにブツシ
ュし、ステップ115ではプログラムレベルをスタック
にブツシュする。(PCはインタフェイス10を通して
、またプログラムレベルはインタフェイス12を通して
演算ユニット6に転送される。)ステップ117では命
令実行終了し次命令の実行を開始する。この時点におい
て、スタックには第10図のような退避情報が作られて
いる。次にステップ116では主メモリの32番地より
読み出したデータをPCにセットする。
(The "8" pattern is generated in the constant section 15 of the microinstruction.) Step 114 bushes the PC onto the stack, and step 115 bushes the program level onto the stack. (The PC is transferred to the arithmetic unit 6 through the interface 10, and the program level is transferred to the arithmetic unit 6 through the interface 12.) In step 117, execution of the instruction is completed and execution of the next instruction is started. At this point, save information as shown in FIG. 10 has been created in the stack. Next, in step 116, the data read from address 32 of the main memory is set in the PC.

主メモリの最初の数10番地は、第11図に示すように
割込ベクタテーブルになっており、32番地には命令途
中割込に対応するマクロプログラムの先頭番地(240
0)、、が格納されている。次にステップ117では命
令実行を終了する。
The first 10 addresses of the main memory are an interrupt vector table as shown in Figure 11, and the 32nd address is the starting address (240
0), , are stored. Next, in step 117, the instruction execution ends.

前記処理終了後、命令解読ユニットが生成したマイクロ
プログラム先頭アドレス13に従って次のマイクロプロ
グラムに分岐するが、このとき、優先割込存在信号14
はオンであったわけであるから、第5図で説明したよう
に、該優先割込に対応するマイクロプログラムの先頭番
地が命令解読ユニットにより生成される。
After the processing is completed, the instruction decoding unit branches to the next microprogram according to the first address 13 of the generated microprogram, but at this time, the priority interrupt presence signal 14
Since this is on, the instruction decoding unit generates the starting address of the microprogram corresponding to the priority interrupt, as explained in FIG.

第12図は、優先割込に対応するマイクロプログラムの
フローチャートを示す。例として、レベル3割込に対応
するマイクロプログラムを示す。
FIG. 12 shows a flowchart of a microprogram corresponding to priority interrupts. As an example, a microprogram corresponding to level 3 interrupts is shown.

ステップ120では識別コードとしてrOJをスタック
にブツシュする。ステップ121ではPCをスタックに
ブツシュする。ステップ122ではプログラムレベルを
スタックにブツシュする。この時点でスタックは第13
図のようになっている。
In step 120, rOJ is pushed onto the stack as an identification code. In step 121, the PC is pushed onto the stack. Step 122 pushes the program level onto the stack. At this point the stack is number 13
It looks like the picture.

次にステップ123では主メモリの12番地(第11図
参照)より読み出したデータをPCにセットする。ステ
ップ124では割込レベルと等しい数である「3」をプ
ログラムレベルにセットする。
Next, in step 123, the data read from address 12 of the main memory (see FIG. 11) is set in the PC. In step 124, the program level is set to "3", which is a number equal to the interrupt level.

ステップ125では命令実行を終了し、次命令の実行を
開始する。
In step 125, instruction execution is ended and execution of the next instruction is started.

前記処理終了後、命令解読ユニットが生成するマイクロ
プログラム先頭アドレス13は、プログラムレベルが「
3」に上がったため優先割込存在信号14はオフである
ため、PCを元に読み出したマクロ命令のデコードによ
り生成されたアドレスである。PCにセットした値は、
第11図で示すように、(2180)1gである。
After the above processing is completed, the microprogram start address 13 generated by the instruction decoding unit has a program level of "
3'', the priority interrupt presence signal 14 is off, so this address is generated by decoding the macro instruction read out from the PC. The value set on the PC is
As shown in FIG. 11, it is (2180) 1 g.

第14図は、 (2180)1.番地から始まるレベル
3割込対応のマクロプログラムである。このプログラム
の最終ステップ132では割込復帰命令が実行される。
FIG. 14 shows (2180)1. This is a macro program that supports level 3 interrupts starting from address. In the final step 132 of this program, an interrupt return instruction is executed.

第15図は割込復帰命令のマイクロプログラムを示す、
ステップ140ではスタックよりポツプした値(割込前
のプログラムレベル=O)をプログラムレベルにセット
する。ステップ141ではスタックよりポツプした値(
割込前のプロクラムカウンター (2400)□6)を
プログラムカウンタにセットする。ステップ142では
スタックよりポツプした値(識別コード=O)をWK3
にセットする。ステップ143ではWK3の値をチェッ
クする。ステップ144ではチェック結果が「0」かど
うか判定する。この場合WK3は「0」であるから条件
成立であり、ステップ145に進み命令実行を終了する
。この結果、 (2400)1.番地の命令途中割込対
応マクロプログラムに分岐する。
FIG. 15 shows the microprogram of the interrupt return instruction.
In step 140, the value popped from the stack (program level before interrupt=O) is set to the program level. In step 141, the value popped from the stack (
Set the program counter before interrupt (2400)□6) to the program counter. In step 142, the value popped from the stack (identification code = O) is set to WK3.
Set to . In step 143, the value of WK3 is checked. In step 144, it is determined whether the check result is "0". In this case, since WK3 is "0", the condition is met, and the process advances to step 145 to end the instruction execution. As a result, (2400)1. Branches to a macro program that supports interrupts during the instruction at the address.

第16図は、(2400)、、番地から始まる命令途中
割込対応のマクロプログラムである。このプログラムで
は割込復帰命令のみが実行される。
FIG. 16 shows a macro program that supports interrupts during instructions starting from address (2400). In this program, only the interrupt return instruction is executed.

第17図は割込復帰命令のマイクロプログラムを示す、
ただし前半は第15図に記載されており本図は命令途中
割込からの復帰に関する部分である。まず第15図のス
テップ140ではスタックよりポツプした値(割込前の
プログラムレベル=0)をプログラムレベルにセットす
る。ステップ141ではスタックよりポツプした値(次
のマクロ命令の先頭番地)をPCにセットする。ステッ
プ142ではスタックよりポツプした値(識別コード=
8)をWK3にセットする。ステップ143ではWK3
の値をチェックする。ステップ144ではチェック結果
がOかどうか判定する。
FIG. 17 shows the microprogram of the interrupt return instruction.
However, the first half is shown in FIG. 15, and this figure is the part related to return from an interrupt during an instruction. First, in step 140 of FIG. 15, the value popped from the stack (program level before interrupt=0) is set to the program level. In step 141, the value popped from the stack (the starting address of the next macro instruction) is set in the PC. In step 142, the value popped from the stack (identification code =
Set 8) to WK3. In step 143, WK3
Check the value of . In step 144, it is determined whether the check result is O.

この場合WK3は「8〃」であるから条件不成立であり
第17図のステップ160に進む、ステップ160では
WK 3−8の値をチェックする。ステップ161では
チェック結果が「0」かどうか判定する。この場合WK
3は「8」であるから条件成立であり、ステップ162
に進む、ステップ162ではスタックよりポツプした値
(割込発生時のWKIの値)をWKIにセットする。ス
テップ163ではスタックよりポツプした値(割込発生
時のWK2の値)をWK2にセットする。ステップ16
4ではスタックよりポツプした値(再開すべきM P 
C= 1003)をWK7にセットする。ステップ16
5ではWK7をMPCにセットする。このセットは第4
図でセレクタ41が出力バス16を選択することにより
行われる。その結果、途中結果WKI、WK2の回復と
、中断したマイクロ命令の再開を実現する。
In this case, since WK3 is "8", the condition is not satisfied, and the process proceeds to step 160 in FIG. 17. In step 160, the value of WK3-8 is checked. In step 161, it is determined whether the check result is "0". In this case WK
Since 3 is "8", the condition is met, and step 162
In step 162, the value popped from the stack (the value of WKI at the time of occurrence of the interrupt) is set in WKI. In step 163, the value popped from the stack (the value of WK2 at the time of occurrence of the interrupt) is set in WK2. Step 16
4, the value popped from the stack (MP to restart
C=1003) in WK7. Step 16
5 sets WK7 to MPC. This set is the 4th
This is done by the selector 41 selecting the output bus 16 in the figure. As a result, the intermediate results WKI and WK2 can be recovered and the interrupted microinstruction can be restarted.

第18図(a)、第18図(b)は本発明の変形例を示
す。割込復帰命令は退避情報の中の識別コードで命令途
中割込かどうかを区別するのではなく、命令コードで区
別する。即ち、一般割込復帰命令の他に命令途中割込復
帰命令を設けることを特徴とする。
FIG. 18(a) and FIG. 18(b) show a modification of the present invention. Interrupt return instructions are not distinguished by the identification code in the save information to determine whether or not they are interrupts in the middle of an instruction, but by the instruction code. That is, the present invention is characterized in that an instruction mid-instruction interrupt return instruction is provided in addition to the general interrupt return instruction.

〔発明の効果〕〔Effect of the invention〕

以上のように本発明によれば、汎用レジスタを途中結果
で破壊することなく、レジスタの無駄な退避・回復が不
要である。具体的には、16バイトの転送の場合、従来
ならばレジスタ退避用アクセス4回、本来の目的のため
のメモリアクセス8回、レジスタ回復用アクセス4回で
計16回のところを、本来の目的のためのメモリアクセ
ス8回のみですみ、高速化できる。
As described above, according to the present invention, general-purpose registers are not destroyed by intermediate results, and unnecessary saving and restoring of registers is unnecessary. Specifically, in the case of a 16-byte transfer, 16 times in total (4 accesses for register saving, 8 memory accesses for the original purpose, and 4 accesses for register recovery) would be performed for the original purpose. Only 8 memory accesses are required for this process, which can speed up the process.

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

第1図は本発明の概略制御方式、第2図は一般的な割込
の制御方式、第3図は公知例の割込の制御方式、第4図
は基本処理機構の構成概略、第5図は命令解読ユニット
の構成、第6図は演算制御系の構成、第7図は演算ユニ
ットの構成、第8図は実行時間の長いマクロ命令のマイ
クロプログラム、第9図は命令途中割込処理マイクロプ
ログラム、第10図は命令途中割込のスタック退避情報
の構成、第11図は割込ベクタテーブルの構成、第12
図はレベル3割込対応マイクロプログラム、第13図は
レベル3割込のスタック退避情報の構成、第14図はレ
ベル3割込対応マクロプログラム、第15図は割込復帰
命令のマイクロプログラム、第16図は命令途中割込対
応マクロプログラム、第17図は割込復帰命令のマイク
ロプログラム(命令途中割込関係)、第18図(a)、
(b)は本発明の変形例の概略制御方式を示す図である
。 3・・・システムバスインタフェイス制御機構、4・・
・命令解読ユニット、5・・・演算制御系、6・・・演
算ユニット。
Fig. 1 is a schematic control system of the present invention, Fig. 2 is a general interrupt control system, Fig. 3 is a known interrupt control system, Fig. 4 is an outline of the configuration of the basic processing mechanism, and Fig. 5 is a general interrupt control system. Figure 6 shows the configuration of the instruction decoding unit, Figure 6 shows the configuration of the arithmetic control system, Figure 7 shows the configuration of the arithmetic unit, Figure 8 shows the microprogram for macro instructions that take a long time to execute, and Figure 9 shows the interrupt processing during instructions. Microprogram, Figure 10 shows the configuration of stack save information for interrupts during instructions, Figure 11 shows the configuration of the interrupt vector table, and Figure 12 shows the structure of the interrupt vector table.
The figure shows a microprogram that supports level 3 interrupts, Figure 13 shows the configuration of stack save information for level 3 interrupts, Figure 14 shows a macro program that supports level 3 interrupts, Figure 15 shows a microprogram for interrupt return instructions, and Figure 15 shows a microprogram for level 3 interrupts. Figure 16 shows a macro program that supports interrupts in the middle of instructions, Figure 17 shows a microprogram for interrupt return instructions (related to interrupts in the middle of instructions), Figure 18 (a),
(b) is a diagram showing a schematic control method of a modified example of the present invention. 3... System bus interface control mechanism, 4...
- Instruction decoding unit, 5... Arithmetic control system, 6... Arithmetic unit.

Claims (1)

【特許請求の範囲】[Claims] 1、外部からの割込要求で現在のプログラムレベルより
優先レベルの高い要求の有無を命令実行の途中で検出し
、前記検出時、内部の途中結果、および識別コードとし
て命令終了後の割込で使用されるコードとは異なる第1
のコードを主記憶装置に退避し、途中割込用にあらかじ
め設定された値をプログラムカウンタに設定し、プログ
ラムレベルは不変のまま、現命令の実行を終了し次命令
の実行を開始し、分岐先のプログラムにおいて割込復帰
命令が実行され、この中で前記識別コードを判定し、第
1のコードである場合、主記憶装置に退避していた前記
途中結果を回復し、命令実行の途中から処理再開するよ
うにしたことを特徴とする、処理装置の割込制御方式。
1. The presence or absence of an external interrupt request with a higher priority level than the current program level is detected during instruction execution, and at the time of said detection, an internal intermediate result and an identification code are detected in the interrupt after the instruction is completed. The first code is different from the code used.
saves the code in the main memory, sets the preset value for intermediate interrupts in the program counter, finishes execution of the current instruction, starts execution of the next instruction, and branches while the program level remains unchanged. An interrupt return instruction is executed in the previous program, the identification code is determined, and if it is the first code, the intermediate result saved in the main memory is recovered, and the code is restarted from the middle of instruction execution. An interrupt control method for a processing device, characterized in that processing is restarted.
JP60189637A 1985-08-30 1985-08-30 Processing device interrupt control method Expired - Lifetime JPH0795278B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP60189637A JPH0795278B2 (en) 1985-08-30 1985-08-30 Processing device interrupt control method
US06/900,987 US4764869A (en) 1985-08-30 1986-08-27 Method and apparatus for controlling interruption in the course of instruction execution in a processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60189637A JPH0795278B2 (en) 1985-08-30 1985-08-30 Processing device interrupt control method

Publications (2)

Publication Number Publication Date
JPS6250934A true JPS6250934A (en) 1987-03-05
JPH0795278B2 JPH0795278B2 (en) 1995-10-11

Family

ID=16244630

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60189637A Expired - Lifetime JPH0795278B2 (en) 1985-08-30 1985-08-30 Processing device interrupt control method

Country Status (2)

Country Link
US (1) US4764869A (en)
JP (1) JPH0795278B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0319027A (en) * 1989-06-16 1991-01-28 Mitsubishi Electric Corp Data processor

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5218703A (en) * 1988-07-07 1993-06-08 Siemens Aktiengesellschaft Circuit configuration and method for priority selection of interrupts for a microprocessor
US5291604A (en) * 1991-08-30 1994-03-01 Intel Corporation Transparent system interrupts with automated halt state restart
JPH06139031A (en) * 1992-10-27 1994-05-20 Ricoh Co Ltd Printer controller
JP3135094B2 (en) * 1993-03-13 2001-02-13 株式会社リコー Integrated business network system
US5440703A (en) * 1993-09-20 1995-08-08 International Business Machines Corporation System and method for saving state information in a multi-execution unit processor when interruptable instructions are identified
US5835743A (en) * 1994-06-30 1998-11-10 Sun Microsystems, Inc. Application binary interface and method of interfacing binary application program to digital computer
DE69610450T2 (en) * 1995-03-13 2001-04-26 Sun Microsystems Inc Virtual input / output processor
US5850556A (en) * 1996-12-26 1998-12-15 Cypress Semiconductor Corp. Interruptible state machine
FR2894693A1 (en) * 2005-12-09 2007-06-15 St Microelectronics Sa Register saving/restoring instruction executing method for e.g. microcontroller, involves updating register`s save/restoration advancement state for each generation of micro instructions, and storing state upon save/restoration interruption
JP2008299501A (en) * 2007-05-30 2008-12-11 Sanyo Electric Co Ltd Processor
US8392644B2 (en) * 2010-07-30 2013-03-05 Mips Technologies, Inc. System and method for automatic hardware interrupt handling

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS50143446A (en) * 1974-05-08 1975-11-18
JPS5199436A (en) * 1975-02-28 1976-09-02 Hitachi Ltd
JPS55115159A (en) * 1979-02-24 1980-09-04 Nec Corp Information processing unit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4429360A (en) * 1978-10-23 1984-01-31 International Business Machines Corporation Process and apparatus for interrupting and restarting sequential list-processing operations

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS50143446A (en) * 1974-05-08 1975-11-18
JPS5199436A (en) * 1975-02-28 1976-09-02 Hitachi Ltd
JPS55115159A (en) * 1979-02-24 1980-09-04 Nec Corp Information processing unit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0319027A (en) * 1989-06-16 1991-01-28 Mitsubishi Electric Corp Data processor

Also Published As

Publication number Publication date
JPH0795278B2 (en) 1995-10-11
US4764869A (en) 1988-08-16

Similar Documents

Publication Publication Date Title
JP3176093B2 (en) Microprocessor interrupt controller
US5003458A (en) Suspended instruction restart processing system based on a checkpoint microprogram address
JPH0713772A (en) Data processor
JPS6250934A (en) Interrupting control system of processor
JPS63261449A (en) Data processor
JPS645330B2 (en)
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
JPH0810437B2 (en) Guest execution control method for virtual machine system
JPS6217773B2 (en)
JP2562838B2 (en) Processor and store buffer control method
US20050216708A1 (en) Processor for performing context switching, a method for performing context switching, a computer program for perform context switching
JPH04288625A (en) Microcomputer
JP2531791B2 (en) Abnormality handling method when accessing Fetch
JPH06324861A (en) System and method for controlling cpu
JP2765831B2 (en) Data processing device
JP2843844B2 (en) Parallel processing unit
JPH03103924A (en) Data processor
JP2574918B2 (en) Interrupt return processing method
JP2503210B2 (en) Micro program controller
JPH04338825A (en) Arithmetic processor
JP2743947B2 (en) Micro program control method
JPH0535499A (en) Data processing device and method
JPH01175052A (en) Microaddress register mechanism
JPS63247834A (en) Processing method for pseudo instruction of floating point function
JPS6346542A (en) Information processor