JPH04367941A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH04367941A
JPH04367941A JP14437891A JP14437891A JPH04367941A JP H04367941 A JPH04367941 A JP H04367941A JP 14437891 A JP14437891 A JP 14437891A JP 14437891 A JP14437891 A JP 14437891A JP H04367941 A JPH04367941 A JP H04367941A
Authority
JP
Japan
Prior art keywords
instruction
interrupt
buffer
instructions
address
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
JP14437891A
Other languages
Japanese (ja)
Other versions
JP3074790B2 (en
Inventor
Akira Kuwata
桑田 明
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP03144378A priority Critical patent/JP3074790B2/en
Publication of JPH04367941A publication Critical patent/JPH04367941A/en
Application granted granted Critical
Publication of JP3074790B2 publication Critical patent/JP3074790B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To execute the processing immediately after receiving the interruption processing, and to improve the interruption responsiveness by providing an instruction buffer for storing in advance instructions of the number determined in advance for constituting the head of a subroutine of the interruption processing. CONSTITUTION:When an interruption control part 4 receives an interruption, a gate 7 is turned on, and three instructions for constituting the head of an instruction processing subroutine stored in an instruction buffer 3 in advance are outputted to an instruction decoder 2. Simultaneously, an address correcting part 5 adds 3 being the number of instructions outputted from the instruction buffer 3, to an address generated by an address generating part 6 and outputs it to an address terminal TA, and starts a fetch. Subsequently, when the contents of an instruction queue 1 are saved, immediately the instructions stored in buffers 31-33. respectively of the instruction buffer 3 are fetched successively, and decoding is executed by the instruction decoder 2. Also, the instruction after the buffer 33 passes through the fetch, and store to the instruction queue 1, and goes into a decoding stage subsequently to an output instruction from the buffer 33.

Description

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

【0001】0001

【産業上の利用分野】本発明はマイクロプロセッサに関
し、特に外部割込み処理の機能を有するマイクロプロセ
ッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor, and more particularly to a microprocessor having an external interrupt processing function.

【0002】0002

【従来の技術】命令待ち行列(キュー)を有するマイク
ロプロセッサ、たとえば、米国インテル社の8086等
では、外部割込み処理のような分岐動作を行なう場合に
は、一度命令キューの内容を退避させ、再度割込み先の
命令をフエッチしなければならない。
BACKGROUND OF THE INVENTION In a microprocessor having an instruction queue, such as the 8086 manufactured by Intel Corporation in the United States, when performing a branch operation such as external interrupt processing, the contents of the instruction queue are saved and re-entered. The instruction to be interrupted must be fetched.

【0003】従来のこの種のマイクロプロセッサは、図
5に示すように、命令キュー1と、命令キュー1から出
力される命令デコーダ2と、外部からの割込み入力に対
応して割込み処理の制御を行なう割込み制御部4と、ア
ドレス生成部6とを備えて構成されていた。
As shown in FIG. 5, a conventional microprocessor of this type includes an instruction queue 1, an instruction decoder 2 output from the instruction queue 1, and an instruction decoder 2 that controls interrupt processing in response to interrupt input from the outside. The interrupt control section 4 was configured to include an interrupt control section 4 for performing interrupt processing, and an address generation section 6.

【0004】次に、従来のマイクロプロセッサの動作に
ついて説明する。
Next, the operation of a conventional microprocessor will be explained.

【0005】図6は従来のマイクロプロセッサの割込み
処理を示すフローチャートである。
FIG. 6 is a flowchart showing interrupt processing of a conventional microprocessor.

【0006】外部から割込み入力があると割込み入力端
子TIがアクティブになり、割込み制御部4はマイクロ
プロセッサ内部の処理実行の状態に合わせ、タイミング
をみてこの割込みを受け付ける。割込みを受け付けると
、命令キュー1の既にフエッチされていた命令コードを
退避レジスタ等に退避する。同時に割込み処理サブルー
チンへ分岐するため、アドレス生成部6によりアドレス
計算を行なう。
[0006] When an interrupt input is received from the outside, the interrupt input terminal TI becomes active, and the interrupt control unit 4 accepts this interrupt at a timing that matches the processing execution state inside the microprocessor. When an interrupt is accepted, the instruction code that has already been fetched from the instruction queue 1 is saved to a save register or the like. At the same time, the address generation section 6 performs address calculation in order to branch to the interrupt processing subroutine.

【0007】ここで、図6のタイムチャートに示すよう
に、割込み先の命令の再フエッチを開始してから、命令
キュー1への取込み、命令デコーダ2での命令デコード
を経て割込み処理の実行に入るまでに3クロックを要す
る。この場合は、命令コードが1ワードであり、したが
って、1回のフエッチで取込みを完了できる例を示して
いる。しかし、命令コードが長くなると、フエッチから
割込み処理の実行に入るまでの所要クロック数はさらに
多くなるというものであった。
As shown in the time chart of FIG. 6, after starting re-fetching of the interrupt destination instruction, the instruction is fetched into the instruction queue 1, the instruction is decoded by the instruction decoder 2, and then the interrupt processing is executed. It takes 3 clocks to enter. In this case, the instruction code is one word, and therefore, an example is shown in which the fetching can be completed with one fetch. However, as the instruction code becomes longer, the number of clocks required from fetch to execution of interrupt processing increases.

【0008】[0008]

【発明が解決しようとする課題】上述した従来のマイク
ロプロセッサは、割込み発生時にアドレス計算を行なっ
てから実際に処理の実行を開始するまでに数クロック分
から十数クロック分の時間が必要であるので割込み応答
が遅くなるという欠点を有していた。
[Problems to be Solved by the Invention] The above-mentioned conventional microprocessor requires a period of time ranging from several clocks to more than ten clocks after calculating an address when an interrupt occurs until it actually starts executing processing. This has the disadvantage that the interrupt response is slow.

【0009】[0009]

【課題を解決するための手段】本発明のマイクロプロセ
ッサは、外部割込み処理の機能を有するマイクロプロセ
ッサにおいて、前記外部割込み処理のサブルーチンの先
頭を構成する予め定めた数の命令を格納しておく命令バ
ッファを備えて構成されている。
[Means for Solving the Problems] The microprocessor of the present invention is a microprocessor having an external interrupt processing function, in which a predetermined number of instructions constituting the beginning of the external interrupt processing subroutine are stored. It is configured with a buffer.

【0010】0010

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments Next, embodiments of the present invention will be described with reference to the drawings.

【0011】図1は本発明のマイクロプロセッサの第一
の実施例を示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of a microprocessor according to the present invention.

【0012】本実施例のマイクロプロセッサは、図1に
示すように、従来と同様の命令キュー1と、命令キュー
1から出力される命令デコーダ2と、外部からの割込み
入力に対応して割込み処理の制御を行なう割込み制御部
4と、アドレス生成部6とに加えて、割込み処理サブル
ーチンの先頭を構成する命令のうち本実施例では1ワー
ドの命令語長で3命令分を格納できるバッファ31,3
2,33からなる命令バッファ3と、アドレス生成部6
で生成したアドレスに命令バッファ3に格納した命令の
数すなわち3を加算するアドレス補正部5と、ゲート7
とを備えて構成されている。
As shown in FIG. 1, the microprocessor of this embodiment includes an instruction queue 1 similar to the conventional one, an instruction decoder 2 output from the instruction queue 1, and an interrupt processing function in response to an external interrupt input. In addition to the interrupt control section 4 and the address generation section 6, there is also a buffer 31 which can store three instructions with a one-word instruction word length in this embodiment, among the instructions forming the head of the interrupt processing subroutine. 3
An instruction buffer 3 consisting of 2 and 33 components, and an address generation section 6
an address correction unit 5 that adds the number of instructions stored in the instruction buffer 3, that is, 3, to the address generated by the gate 7;
It is composed of:

【0013】次に、本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

【0014】図2は本実施例のマイクロプロセッサの割
込み処理を示すフローチャートである。
FIG. 2 is a flowchart showing the interrupt processing of the microprocessor of this embodiment.

【0015】外部から割込み入力があると割込み入力端
子TIがアクティブになり、割込み制御部4はマイクロ
プロセッサ内部の処理実行の状態に合わせ、タイミング
をみてこの割込みを受け付ける。割込みを受け付けると
、命令キュー1の既にフエッチされていた命令コードを
退避レジスタ等に退避する。同時に割込み処理サブルー
チンへ分岐するため、アドレス生成部6によりアドレス
計算を行なう。
When an interrupt is input from the outside, the interrupt input terminal TI becomes active, and the interrupt control section 4 accepts this interrupt at a timing that matches the processing execution state inside the microprocessor. When an interrupt is accepted, the instruction code that has already been fetched from the instruction queue 1 is saved to a save register or the like. At the same time, the address generation section 6 performs address calculation in order to branch to the interrupt processing subroutine.

【0016】一方、割込み制御部4が割込みを受け付け
ると、ゲート7をオンとし、予め命令バッフア3に格納
されている割込み処理サブルーチンの先頭を構成する3
つの命令を命令デコーダ2に出力する。同時にアドレス
補正部5はアドレス生成部6で生成されたアドレスに命
令バッファ3から出力した命令の数である3を加算して
アドレス端子TAに出力し、フエッチを開始する。
On the other hand, when the interrupt control unit 4 accepts an interrupt, it turns on the gate 7 and executes the interrupt processing subroutine 3 which constitutes the beginning of the interrupt processing subroutine stored in the instruction buffer 3 in advance.
outputs one instruction to the instruction decoder 2. At the same time, the address correction unit 5 adds 3, which is the number of instructions output from the instruction buffer 3, to the address generated by the address generation unit 6, and outputs the result to the address terminal TA, and starts fetching.

【0017】図2のタイムチャートに示すように、命令
キュー1の内容を退避すると、直ちに命令バッファ3の
バッファ31,32,33にそれぞれ格納されている命
令を順次取だし、命令デコーダ2でデコードを行なう。 さらにバッファ33以降の命令は、フエッチ、命令キュ
ー1への格納を経て、バッファ33からの出力命令の次
にデコードステージに入る。
As shown in the time chart of FIG. 2, immediately after the contents of the instruction queue 1 are saved, the instructions stored in the buffers 31, 32, and 33 of the instruction buffer 3 are sequentially taken out and decoded by the instruction decoder 2. Do this. Further, the instructions after the buffer 33 are fetched and stored in the instruction queue 1, and then enter the decode stage next to the output instruction from the buffer 33.

【0018】以上述べたように、命令バッフア3に予め
割込み処理サブルーチンの先頭を構成する命令のいくつ
かを格納しておくことにより、命令フエッチから割込み
処理実行までのアイドルサイクルを埋めることが可能と
なり、応答性を向上することができる。
As described above, by storing some of the instructions forming the beginning of the interrupt processing subroutine in advance in the instruction buffer 3, it becomes possible to fill the idle cycle from fetching the instruction to executing the interrupt processing. , responsiveness can be improved.

【0019】次に、本発明の第二の実施例について説明
する。
Next, a second embodiment of the present invention will be explained.

【0020】大部分のマイクロプロセッサは複数の割込
み入力端子を備えている。しかし、割込みの種類には種
々あり、高速応答を必要とするものから、必ずしも高速
性を必要としないものもある。本実施例では、3入力の
割込み入力のうちの一つが高速応答を必要とする場合の
例を示す。
Most microprocessors have multiple interrupt input terminals. However, there are various types of interrupts, and some require high-speed response while others do not necessarily require high-speed response. This embodiment shows an example in which one of three interrupt inputs requires a high-speed response.

【0021】図3は本発明のマイクロプロセッサの第二
の実施例を示すブロック図である。
FIG. 3 is a block diagram showing a second embodiment of the microprocessor of the present invention.

【0022】本実施例の前述の第一の実施例に対する相
違点は、割込み入力が3入力となることに対応して割込
み制御部8の入力端子TIがTI1〜TI3となり、こ
のうち、高速応答を要する割込み入力を検出するための
高速割込み検出部9を備えたことである。
The difference between this embodiment and the first embodiment described above is that the input terminals TI of the interrupt control section 8 are TI1 to TI3 corresponding to the three interrupt inputs. The present invention is equipped with a high-speed interrupt detection section 9 for detecting an interrupt input that requires a high speed interrupt.

【0023】高速割込み検出部9は、3入力の割込み入
力端子TI1〜TI3のうちの一つを高速割込み入力と
してプログラマブルに設定し、その設定した端子からの
割込み入力を検出するためのものである。高速割込み検
出部9の構成の一例を図4に示す。高速割込み検出部9
は、図4に示すように、割込み入力端子数3と同一ビッ
ト長のレジスタ91と、レジスタ91の各ビットの出力
と端子TI1〜TI3のそれぞれの入力との論理積を取
るANDゲートA91〜A93と、ANDゲートA91
〜A93の出力の論理和を取るORゲートO91とを備
えて構成されている。
The high-speed interrupt detection section 9 is for programmably setting one of the three input interrupt input terminals TI1 to TI3 as a high-speed interrupt input, and detecting an interrupt input from the set terminal. . An example of the configuration of the high-speed interrupt detection section 9 is shown in FIG. High-speed interrupt detection section 9
As shown in FIG. 4, the register 91 has the same bit length as the number of interrupt input terminals (3), and the AND gates A91 to A93 that take the AND of the output of each bit of the register 91 and the respective inputs of the terminals TI1 to TI3. and AND gate A91
- OR gate O91 which takes the logical sum of the outputs of A93.

【0024】次に、本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

【0025】まず、高速割込み検出部9のレジスタ91
に予め高速割込み入力として割込み入力端子TI1を指
定するように’100’を設定しておく。いま、3入力
の割込み入力端子TI1〜TI3のうち、割込み入力端
子TI1がアクティブとなったとすると、割込み制御部
4はマイクロプロセッサ内部の処理実行の状態に合わせ
、タイミングをみてこの割込みを受け付ける。割込みを
受け付けると、命令キュー1の既にフエッチされていた
命令コードを退避レジスタ等に退避する。同時に割込み
処理サブルーチンへ分岐するため、アドレス生成部6に
よりアドレス計算を行なう。
First, register 91 of high-speed interrupt detection section 9
'100' is set in advance to designate the interrupt input terminal TI1 as a high-speed interrupt input. Now, if the interrupt input terminal TI1 of the three input interrupt input terminals TI1 to TI3 becomes active, the interrupt control unit 4 accepts this interrupt at a timing that matches the processing execution state inside the microprocessor. When an interrupt is accepted, the instruction code that has already been fetched from the instruction queue 1 is saved to a save register or the like. At the same time, the address generation section 6 performs address calculation in order to branch to the interrupt processing subroutine.

【0026】割込制御部4は割込みを受け付けると、3
入力の割込み入力端子TI1〜TI3の状態を高速割込
み検出部9に出力する。前述のように、高速割込み検出
部9のレジスタ91には、予め’100’が設定されて
いるので、割込み入力端子TI1に割込み入力がある場
合には、ANDゲートA91が1となり、入力された割
込みが高速割込み入力として検出される。この結果、こ
の検出出力は、ゲート7をオンとし、前述の第一の実施
例と同様に、予め命令バッフア3に格納されている割込
み処理サブルーチンの先頭を構成する3つの命令を命令
デコーダ2に出力する。同時にアドレス補正部5はアド
レス生成部6で生成されたアドレスに命令バッファ3か
ら出力した命令の数である3を加算してアドレス端子T
Aに出力し、フエッチを開始する。
When the interrupt control unit 4 receives an interrupt, the interrupt control unit 4
The states of the input interrupt input terminals TI1 to TI3 are output to the high speed interrupt detection section 9. As mentioned above, '100' is set in advance in the register 91 of the high-speed interrupt detection unit 9, so when there is an interrupt input to the interrupt input terminal TI1, the AND gate A91 becomes 1, and the input Interrupts are detected as fast interrupt inputs. As a result, this detection output turns on the gate 7, and similarly to the first embodiment described above, the three instructions constituting the beginning of the interrupt processing subroutine stored in the instruction buffer 3 in advance are sent to the instruction decoder 2. Output. At the same time, the address correction unit 5 adds 3, which is the number of instructions output from the instruction buffer 3, to the address generated by the address generation unit 6 and outputs the result to the address terminal T.
Output to A and start fetching.

【0027】以上述べたように本実施例では、最も緊急
性および高速応答性を要求する割込み入力に対して、選
択的に命令を命令バッファに格納して高速応答すること
が可能となり、少ないハードウェアで効果的に性能向上
をすることが期待できる。
As described above, in this embodiment, it is possible to selectively store instructions in the instruction buffer for a high-speed response to an interrupt input that requires the most urgency and high-speed response, and requires less hardware. It is expected that the performance will be effectively improved by using the software.

【0028】[0028]

【発明の効果】以上説明したように、本発明のマイクロ
プロセッサは、割込み処理のサブルーチンの先頭を構成
する予め定めた数の命令を格納しておく命令バッファを
備えることにより、割込み処理の受付け直後に処理の実
行が可能となるので割込み応答性を向上することができ
るという効果がある。
As explained above, the microprocessor of the present invention has an instruction buffer that stores a predetermined number of instructions that constitute the beginning of the interrupt processing subroutine. This has the effect of improving interrupt responsiveness since processing can be executed immediately.

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

【図1】本発明のマイクロプロセッサの第一の実施例を
示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of a microprocessor of the present invention.

【図2】本実施例のマイクロプロセッサにおける動作の
一例を示すフローチャートである。
FIG. 2 is a flowchart showing an example of the operation of the microprocessor of this embodiment.

【図3】本発明のマイクロプロセッサの第二の実施例を
示すブロック図である。
FIG. 3 is a block diagram showing a second embodiment of the microprocessor of the present invention.

【図4】本実施例の高速割込み検出部の構成の一例を示
す図である。
FIG. 4 is a diagram illustrating an example of the configuration of a high-speed interrupt detection section according to the present embodiment.

【図5】従来のマイクロプロセッサの一例を示すブロッ
ク図である。
FIG. 5 is a block diagram showing an example of a conventional microprocessor.

【図6】従来のマイクロプロセッサにおける動作の一例
を示すフローチャートである。
FIG. 6 is a flowchart showing an example of operations in a conventional microprocessor.

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

1    命令キュー 2    命令デコーダ 3    命令バッファ 4,8    割込み制御部 5    アドレス補正部 6    アドレス生成部 7    ゲート 9    高速割込み検出部 31〜33    バッファ 91    レジスタ A1〜A3    ANDゲート O1    ORゲート 1 Instruction queue 2 Instruction decoder 3. Instruction buffer 4, 8 Interrupt control section 5 Address correction section 6 Address generation section 7 Gate 9 High-speed interrupt detection section 31-33 Buffer 91 Register A1-A3 AND gate O1 OR gate

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  外部割込み処理の機能を有するマイク
ロプロセッサにおいて、前記外部割込み処理のサブルー
チンの先頭を構成する予め定めた数の命令を格納してお
く命令バッファを備えることを特徴とするマイクロプロ
セッサ。
1. A microprocessor having an external interrupt processing function, comprising an instruction buffer for storing a predetermined number of instructions forming the beginning of the external interrupt processing subroutine.
【請求項2】  前記外部割込み処理を要求するn個の
外部割込み入力のそれぞれに対応するビットを有するn
ビット長のレジスタを備え、このレジスタに高速応答を
要求する第一の外部割込み入力に対応する前記ビットを
予め設定することにより前記第一の外部割込み入力を検
出する高速割込み検出部を備えることを特徴とする請求
項1記載のマイクロプロセッサ。
2. n comprising a bit corresponding to each of the n external interrupt inputs requesting the external interrupt processing;
The present invention further includes a high-speed interrupt detection section that includes a bit length register and detects the first external interrupt input by setting in advance the bit corresponding to the first external interrupt input that requests a high-speed response in the register. A microprocessor as claimed in claim 1.
JP03144378A 1991-06-17 1991-06-17 Microprocessor Expired - Lifetime JP3074790B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03144378A JP3074790B2 (en) 1991-06-17 1991-06-17 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03144378A JP3074790B2 (en) 1991-06-17 1991-06-17 Microprocessor

Publications (2)

Publication Number Publication Date
JPH04367941A true JPH04367941A (en) 1992-12-21
JP3074790B2 JP3074790B2 (en) 2000-08-07

Family

ID=15360736

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03144378A Expired - Lifetime JP3074790B2 (en) 1991-06-17 1991-06-17 Microprocessor

Country Status (1)

Country Link
JP (1) JP3074790B2 (en)

Also Published As

Publication number Publication date
JP3074790B2 (en) 2000-08-07

Similar Documents

Publication Publication Date Title
FI90804C (en) Controller for a data processor comprising an interrupt service utilizing redirection of advance search of instructions
JP3105738B2 (en) Information processing device
JPH04367941A (en) Microprocessor
JP2694948B2 (en) Micro program processor
EP0573071A2 (en) A microprocessor
JPH0520010A (en) Register file
JP2721610B2 (en) Programmable controller
JPS60117335A (en) Information processor
JPS6242301B2 (en)
JPS62156738A (en) Program controller
JPH0573296A (en) Microcomputer
JPH0793151A (en) Instruction supplying device
JP2689894B2 (en) Micro program control type information processing device
JP2833259B2 (en) Program repeat control method and program repeat control device
JP2636192B2 (en) Information processing device
JPH04370832A (en) Processor circuit
JPH0353322A (en) Information processor
JP2597744B2 (en) Branch control method
JP2926975B2 (en) Program control unit
JPH0338726A (en) Branch instruction processor
JPH08161222A (en) Processor and program preparation method therefor
JPH06149570A (en) Instruction controller
JPH0855033A (en) Information processor
JPH0619705A (en) Pipeline control system
JPH03232019A (en) Information processor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000509