JPH1124942A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH1124942A
JPH1124942A JP9184172A JP18417297A JPH1124942A JP H1124942 A JPH1124942 A JP H1124942A JP 9184172 A JP9184172 A JP 9184172A JP 18417297 A JP18417297 A JP 18417297A JP H1124942 A JPH1124942 A JP H1124942A
Authority
JP
Japan
Prior art keywords
interrupt
instruction
processing
instruction queue
signal line
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
JP9184172A
Other languages
Japanese (ja)
Other versions
JP3123946B2 (en
Inventor
Tomoo Ueno
智生 上野
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 Kyushu Ltd
Original Assignee
NEC Kyushu 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 NEC Kyushu Ltd filed Critical NEC Kyushu Ltd
Priority to JP09184172A priority Critical patent/JP3123946B2/en
Publication of JPH1124942A publication Critical patent/JPH1124942A/en
Application granted granted Critical
Publication of JP3123946B2 publication Critical patent/JP3123946B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To start execution of an instruction without waiting for the storage of an instruction code in an instruction queue with a prefetch operation and to improve the response speed of restoration to a main routine from an interruption sub-routine. SOLUTION: A first instruction queue 1 to become operable at the time of a main routine processing and a second instruction queue 2 to become operable at the time of an interruption sub-routine processing are provided. An interruption controller 10 is operated by switching the first instruction queue 1 or the second instruction queue 2 according to whether the present processing is the main routine processing or the interruption sub-routine processing.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明はマイクロコンピュ
ータに関し、特に、割り込み処理機能を有するマイクロ
コンピュータに関する。
The present invention relates to a microcomputer, and more particularly, to a microcomputer having an interrupt processing function.

【0002】[0002]

【従来の技術】従来のこの種のマイクロコンピュータ
は、図12で示されるように、プリフェッチ・ポインタ
4を含むバス・コントロール・ユニット7と、プログラ
ム格納用メモリ8と、命令キュー1と、命令デコーダ9
とを備えており、制御信号線14,アドレス信号線1
1,データ信号線12,13にて各ユニット間が接続さ
れている。プログラム格納用メモリ8はマイクロコンピ
ュータの内部メモリではなく、外部メモリに構成される
場合もあるが、その場合も、プログラム格納用メモリ8
が外部に設置されるだけで、全体の構成として前記同様
である。
2. Description of the Related Art As shown in FIG. 12, a conventional microcomputer of this kind includes a bus control unit 7 including a prefetch pointer 4, a program storage memory 8, an instruction queue 1, an instruction decoder 1, 9
And the control signal line 14, the address signal line 1
1, each unit is connected by data signal lines 12 and 13. The program storage memory 8 may be configured as an external memory instead of the internal memory of the microcomputer.
Is installed outside, and the overall configuration is the same as described above.

【0003】次に、動作について、図13のフロー図を
参照しながら説明する。メインルーチンでの処理は命令
キュー1に空きが発生すると(ステップS30)、バス
・コントロール・ユニット7のプリフェッチ制御が起動
し(ステップS31)、バス・コントロールユニット7
より制御信号線14を通して制御信号が出力され、プリ
フェッチ・ポインタ4よりアドレス信号線11を通して
アドレスが出力される。これらの制御信号およびアドレ
スがプログラム格納用メモリ8に入力されると、データ
信号線12を通してデータ(命令コード)が出力され
(ステップS32)、出力された命令コードは命令キュ
ー1に取込まれて格納される(ステップS33)。この
ステップS30からステップS33までの動作をプリフ
ェッチ動作といい、命令キュー1に空きがある場合に、
タイミングをみて起動され、プリフェッチ動作が1回終
了するごとに、プリフェッチ・ポインタ4の値が更新さ
れる。
Next, the operation will be described with reference to the flowchart of FIG. In the processing in the main routine, when a vacancy occurs in the instruction queue 1 (step S30), the prefetch control of the bus control unit 7 is activated (step S31), and the bus control unit 7
The control signal is output through the control signal line 14 and the address is output through the address signal line 11 from the prefetch pointer 4. When these control signals and addresses are input to the program storage memory 8, data (instruction code) is output through the data signal line 12 (step S32), and the output instruction code is taken into the instruction queue 1. It is stored (step S33). The operation from step S30 to step S33 is called a prefetch operation, and when there is a free space in the instruction queue 1,
The prefetch pointer 4 is updated each time the prefetch operation is completed and the prefetch operation is completed once.

【0004】ステップS33で命令キュー1に格納され
た命令コードは、必要に応じて、データ信号線13を通
して命令デコーダに転送され(ステップS34)、デコ
ードされた後(ステップS35)、命令が実行される
(ステップS36)。
[0004] The instruction code stored in the instruction queue 1 in step S33 is transferred to the instruction decoder through the data signal line 13 as necessary (step S34), and after being decoded (step S35), the instruction is executed. (Step S36).

【0005】次に、割り込みのサブルーチンの処理につ
いて説明する。図14のフローチャートに示すように、
割り込みが発生すると(ステップS40)、メインルー
チンでの処理の状態に合わせて、タイミングをみてこの
割り込みが受け付けられ、プログラム・カウンタ(以
下、PCという)およびプログラム・ステータス・ワー
ド(以下、PSWという)の値が退避されて(ステップ
S41)、割り込み分岐先のアドレスがPCにセットさ
れる(ステップS42)。このPCの値はバス・コント
ロール・ユニット7に備わるプリフェッチ・ポインタ4
にセットされて(ステップS43)、以前のメインルー
チン処理時に命令キュー1に格納されていた命令コード
は無効とされ、命令キュー1が空にされた後、メインル
ーチン処理と同様に、図13のステップS30からステ
ップS36までの処理が行われる(ステップS44)。
その後、復帰命令が実行されると(ステップS45)、
退避されていたPCおよびPSWの値が復帰され(ステ
ップS46)、メインルーチンでの処理へ移行される
(ステップS47)。メインルーチンに移行すると再度
ステップS30から処理が開始される。
Next, the processing of an interrupt subroutine will be described. As shown in the flowchart of FIG.
When an interrupt occurs (step S40), the interrupt is accepted at a suitable timing according to the state of processing in the main routine, and a program counter (hereinafter, referred to as PC) and a program status word (hereinafter, referred to as PSW). Is saved (step S41), and the address of the interrupt branch destination is set in the PC (step S42). This PC value is stored in the prefetch pointer 4 provided in the bus control unit 7.
(Step S43), the instruction code stored in the instruction queue 1 at the time of the previous main routine processing is invalidated, and after the instruction queue 1 is emptied, as in the main routine processing, the instruction code shown in FIG. The processing from step S30 to step S36 is performed (step S44).
Thereafter, when the return instruction is executed (step S45),
The saved PC and PSW values are restored (step S46), and the process proceeds to the main routine (step S47). When the process shifts to the main routine, the process is restarted from step S30.

【0006】また、優先レベルの低い割り込みの処理中
に、より優先レベルの高い割り込みを受け付けた場合
(割り込みのネスト発生)についても、メインルーチン
処理中に割り込みを受け付けたときと同様に、図14の
フローチャートに示す処理が行われる。その他、特開平
4−367941号公報に記載の技術には、上述の構成
の他に、割り込みサブルーチンの先頭を構成する予め定
められた数の命令コードを格納しておく命令バッファを
備えることにより、割り込み分岐時の応答速度を向上す
る技術が記載されている。
Also, when an interrupt with a higher priority level is accepted during the processing of an interrupt with a lower priority level (interruption nesting occurs), as in the case where an interrupt is accepted during the processing of the main routine, FIG. The processing shown in the flowchart of FIG. In addition, the technique described in Japanese Patent Application Laid-Open No. 4-367941 is provided with an instruction buffer for storing a predetermined number of instruction codes constituting the head of an interrupt subroutine in addition to the above-described configuration. A technique for improving the response speed at the time of interrupt branch is described.

【0007】[0007]

【発明が解決しようとする課題】従来のマイクロコンピ
ュータは前記のように構成されているので、メインルー
チン処理時においてプリフェッチ動作によって命令キュ
ーに格納されていた命令コードが、割り込みを受け付け
たときの割り込みサブルーチン処理において、無効とな
るため、割り込みサブルーチンからメインルーチンに復
帰する際、命令キュー1に命令コードを再プリフェッチ
しなければ命令実行を行うことができない。このため、
割り込みサブルーチン処理からメインルーチン処理への
復帰の際、命令の実行開始が遅くなるという課題があっ
た。
Since the conventional microcomputer is configured as described above, the instruction code stored in the instruction queue by the prefetch operation at the time of the main routine processing is interrupted when the interrupt is accepted. In the subroutine processing, the instruction is invalidated. Therefore, when returning from the interrupt subroutine to the main routine, the instruction cannot be executed unless the instruction code is re-prefetched into the instruction queue 1. For this reason,
At the time of returning from the interrupt subroutine processing to the main routine processing, there is a problem that the start of instruction execution is delayed.

【0008】また、割り込みのネスト処理の場合につい
ても、優先レベルの低い割り込み処理時においてプリフ
ェッチ動作によって命令キュー1に格納されていた命令
コードが、より優先レベルの高い割り込みを受け付けた
ときの割り込みサブルーチン処理において、無効とされ
るため、優先レベルの高い割り込み処理から優先レベル
の低い割り込み処理へ復帰する際、命令キュー1に命令
コードを再プリフェッチしなければ命令実行を行うこと
ができない。このため、ネストした割り込みサブルーチ
ン処理からの復帰の際、命令の実行開始が遅くなるとい
う課題があった。
[0008] Also, in the case of interrupt nesting, an interrupt subroutine when an instruction code stored in the instruction queue 1 by a prefetch operation at the time of interrupt processing with a low priority level receives an interrupt with a higher priority level. Since the processing is invalidated in the processing, when returning from the interrupt processing with the higher priority level to the interrupt processing with the lower priority level, the instruction cannot be executed unless the instruction code is re-prefetched into the instruction queue 1. For this reason, when returning from the nested interrupt subroutine process, there is a problem that the execution of the instruction is delayed.

【0009】さらに、特開平4−367941号公報記
載の技術のように、割り込みサブルーチンの先頭を構成
する命令コードを格納しておく命令バッファを備えてい
ない場合には、割り込みを受け付けたときの割り込み処
理への分岐の際、割り込み分岐先の命令コードをプリフ
ェッチしなければ命令実行を行うことができないため、
割り込みサブルーチンの命令の実行開始が遅くなるとい
う課題があった。また、特開平4−367941号公報
記載の技術では割り込み分岐時の応答速度を向上させて
いるが、予め命令バッファに命令コードを転送しておく
作業が必要となり、マイクロコンピュータの処理効率が
低下するという課題があった。
Further, when an instruction buffer for storing an instruction code forming the head of an interrupt subroutine is not provided as in the technique described in Japanese Patent Application Laid-Open No. 4-367941, an interrupt when an interrupt is accepted is provided. When branching to processing, instruction execution cannot be performed unless the instruction code of the interrupt branch destination is prefetched.
There is a problem that the execution of the instruction of the interrupt subroutine is delayed. Further, in the technique described in Japanese Patent Application Laid-Open No. 4-367941, the response speed at the time of interrupt branch is improved, but an operation of transferring an instruction code to an instruction buffer in advance is required, and the processing efficiency of the microcomputer is reduced. There was a problem that.

【0010】この発明は前記のような課題を解決するも
のであり、割り込みサブルーチンからメインルーチンへ
の復帰の応答速度を向上できるほか、割り込みネストか
らの復帰の応答速度を向上でき、加えて、割り込みの分
岐時の応答速度を改善できるマイクロコンピュータを得
ることを目的とする。
SUMMARY OF THE INVENTION The present invention solves the above-mentioned problem. In addition to improving the response speed of returning from an interrupt subroutine to a main routine, the response speed of returning from an interrupt nest can be improved. It is an object of the present invention to obtain a microcomputer capable of improving the response speed at the time of branching.

【0011】[0011]

【課題を解決するための手段】前記目的達成のために、
請求項1の発明にかかるマイクロコンピュータは、メイ
ンルーチン処理時に動作可能状態となる第1の命令キュ
ーと、割り込みのサブルーチン処理時に動作可能状態と
なる第2の命令キューとを有し、現在の処理がメインル
ーチン処理か割り込みのサブルーチン処理かに応じて、
割り込みコントローラに、前記第1の命令キューまたは
第2の命令キューのいずれかを切り替えて動作させるよ
うにしたものである。
To achieve the above object,
The microcomputer according to the first aspect of the present invention includes a first instruction queue that is operable during main routine processing and a second instruction queue that is operable during interrupt subroutine processing. Is the main routine processing or the interrupt subroutine processing,
The interrupt controller operates by switching either the first instruction queue or the second instruction queue.

【0012】また、請求項2の発明にかかるマイクロコ
ンピュータは、前記第2の命令キューを割り込みの優先
レベル数以内の複数個設け、現在のサブルーチン処理が
何重目の割り込みネストの処理かに応じて、前記割り込
みコントローラに、前記第2の命令キューのいずれかを
切り替えて動作させるようにしたものである。
In the microcomputer according to the second aspect of the present invention, a plurality of the second instruction queues are provided within the number of interrupt priority levels, and the second subroutine processing is performed according to the number of interrupt nest processings. Thus, the interrupt controller is operated by switching any one of the second instruction queues.

【0013】また、請求項3の発明にかかるマイクロコ
ンピュータは、割り込みサブルーチンプログラム上で割
り込み分岐先アドレスの直前に復帰命令がくるように
し、かつ割り込み受け付け数検出部にて、1回目の割り
込みサービスまでは、前記第2の命令キュー中の命令コ
ードを無効とし、2回目以降の割り込みサービスでは前
記第2の命令キューに格納されて割り込みの分岐先の命
令コードを保持させるようにしたものである。
According to a third aspect of the present invention, the microcomputer causes the return instruction to come immediately before the interrupt branch destination address on the interrupt subroutine program, and the interrupt acceptance number detecting unit detects the return instruction until the first interrupt service. The instruction code in the second instruction queue is invalidated, and in the second and subsequent interrupt services, the instruction code stored in the second instruction queue and held at the interrupt destination is held.

【0014】[0014]

【発明の実施の形態】以下に、この発明の実施の一形態
について図面を参照して説明する。図1はこの発明のマ
イクロコンピュータを示すブロック図である。このマイ
クロコンピュータは、第1の命令キューとしての命令キ
ュー1,第2の命令キューとしての命令キュー2,プリ
フェッチ・ポインタ4,5を含むバス・コントロール・
ユニット7,プログラム格納用メモリ8,命令デコーダ
9,割り込みコントローラ10,インバータ16とを備
えている。プログラム格納用メモリ8はマイクロコンピ
ュータの内部メモリではなく、外部メモリで構成される
場合もあるが、その場合もプログラム格納用メモリ8が
外部に設置されるだけで、全体の構成としては図1と同
様である。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a microcomputer according to the present invention. This microcomputer has a bus control unit including an instruction queue 1 as a first instruction queue, an instruction queue 2 as a second instruction queue, and prefetch pointers 4 and 5.
It comprises a unit 7, a program storage memory 8, an instruction decoder 9, an interrupt controller 10, and an inverter 16. The memory 8 for storing the program may be constituted by an external memory instead of the internal memory of the microcomputer. In that case, however, the memory 8 for storing the program is merely provided outside. The same is true.

【0015】また、15は割り込みサービス中である場
合に`1´、それ以外の場合に`0´となる信号線であ
り、一般に、この信号はフラグとして割り込みコントロ
ーラ10に保持されているので、割り込みコントローラ
10から取り出す。しかし、マイクロコンピュータによ
っては、この信号がフラグとしてPSWに保持されてい
る場合があるので、そのときはPSWから信号線15を
取り出す。信号線15をインバータ16に通した信号線
17は、割り込みサービス中の場合に`0´となり、そ
れ以外の場合は`1´となる。これらの信号線15およ
び17によって、命令キュー1,2およびプリフェッチ
・ポインタ4,5の動作・停止を切り替える。
Reference numeral 15 denotes a signal line which becomes "1" when an interrupt service is being performed and "0" otherwise. Since this signal is generally held as a flag in the interrupt controller 10, Take out from the interrupt controller 10. However, in some microcomputers, this signal is held in the PSW as a flag. In this case, the signal line 15 is extracted from the PSW. The signal line 17 which passes the signal line 15 to the inverter 16 becomes “0” when the interrupt service is being performed, and becomes “1” otherwise. The operation and stop of the instruction queues 1 and 2 and the prefetch pointers 4 and 5 are switched by these signal lines 15 and 17.

【0016】次に動作について、図2のフローチャート
を参照しながら説明する。メインルーチン処理時には、
割り込みサービス中ではないので信号線15は`0´、
信号線17は`1´となり、信号線15から`0´が入
力される命令キュー2およびプリフェッチ・ポインタ5
は停止状態、信号線17から`1´が入力される命令キ
ュー1およびプリフェッチ・ポインタ4は動作可能状態
となる。よって、メインルーチンの処理では、命令キュ
ー2およびプリフェッチ・ポインタ5が停止し、命令キ
ュー1およびプリフェッチ・ポインタ4が動作するだけ
で、動作内容については、従来例にて説明した図13の
フローチャートと全く同様となる。従って、その重複す
る説明を省略する。
Next, the operation will be described with reference to the flowchart of FIG. At the time of main routine processing,
Since the interrupt service is not being performed, the signal line 15 is "0",
The signal line 17 becomes “1”, and the instruction queue 2 and the prefetch pointer 5 to which “0” is input from the signal line 15
Is stopped, and the instruction queue 1 and the prefetch pointer 4 to which "1" is input from the signal line 17 are in an operable state. Therefore, in the processing of the main routine, the instruction queue 2 and the prefetch pointer 5 are stopped, and the instruction queue 1 and the prefetch pointer 4 are only operated. The operation contents are the same as those of the flowchart of FIG. It is exactly the same. Therefore, the duplicate description will be omitted.

【0017】次に割り込みサブルーチンでの処理につい
て、図3のフローチャートを参照しながら説明する。こ
こでは、まず、割り込みが発生すると(ステップS6
0)、メインルーチンでの処理に合わせて、タイミング
をみてこの割り込みが受け付けられ、割り込みサービス
中になると信号線15は`1´、信号線17は`0´と
なる。このため、信号線15から`1´が入力される命
令キュー2およびプリフェッチ・ポインタ5は動作可能
状態となり、信号線17から`0´が入力される命令キ
ュー1およびプリフェッチ・ポインタ4は停止状態とな
り、命令キュー1に格納されている命令コード、および
プリフェッチ・ポインタ4の現状値はそのまま保持され
る(ステップS61)。次に、PCおよびPSWの値が
退避され(ステップS62)、割り込み分岐先のアドレ
スがPCにセットされる(ステップS63)。このPC
の値はプリフェッチ・ポインタ5にセットされ(ステッ
プS64)、命令キュー2を使用して、メインルーチン
処理時と同様に図2のステップS50からステップS5
6までの処理が行われる(ステップS65)。
Next, the processing in the interrupt subroutine will be described with reference to the flowchart of FIG. Here, first, when an interrupt occurs (step S6).
0), this interrupt is received at a proper timing in accordance with the processing in the main routine, and when the interrupt service is being performed, the signal line 15 becomes "1" and the signal line 17 becomes "0". Therefore, the instruction queue 2 and the prefetch pointer 5 to which "1" is input from the signal line 15 are in an operable state, and the instruction queue 1 and the prefetch pointer 4 to which "0" is input from the signal line 17 are in a stopped state. The instruction code stored in the instruction queue 1 and the current value of the prefetch pointer 4 are held as they are (step S61). Next, the values of PC and PSW are saved (step S62), and the address of the interrupt branch destination is set in PC (step S63). This PC
Is set in the prefetch pointer 5 (step S64), and the instruction queue 2 is used to execute steps S50 to S5 in FIG.
6 are performed (step S65).

【0018】その後、復帰命令が実行されると(ステッ
プS66)、退避されていたPCおよびPSWの値が復
帰される(ステップS67)。割り込みサービス中でな
くなると信号線15は`0´、信号線17は`1´とな
るので、信号線15から`0´が入力される命令キュー
2およびプリフェッチ・ポインタ5は停止状態となり、
信号線17から`1´が入力される命令キュー1および
プリフェッチ・ポインタ4は動作可能状態となり(ステ
ップS68)、メインルーチン処理へ移行する(ステッ
プS69)。このとき、命令キュー1には、以前のメイ
ンルーチン処理時にプリフェッチしておいて命令コード
が格納されているので、再プリフェッチ動作により命令
キュー1に命令コードが取込まれるのを待つ必要はな
く、ステップS54から処理を行うことができる。ま
た、ステップS54からの処理に並行して、プリフェッ
チ・ポインタ4に保持されている値を利用して、ステッ
プS50からステップS53までのプリフェッチ動作が
行われる。
Thereafter, when a return instruction is executed (step S66), the PC and PSW values that have been saved are restored (step S67). When the interruption service is stopped, the signal line 15 becomes "0" and the signal line 17 becomes "1". Therefore, the instruction queue 2 and the prefetch pointer 5 to which "0" is input from the signal line 15 are stopped,
The instruction queue 1 and the prefetch pointer 4 to which "1" is input from the signal line 17 are in an operable state (step S68), and shift to the main routine processing (step S69). At this time, since the instruction code is prefetched during the previous main routine processing and the instruction code is stored in the instruction queue 1, there is no need to wait for the instruction code to be taken into the instruction queue 1 by the re-prefetch operation. Processing can be performed from step S54. In parallel with the processing from step S54, the prefetch operation from step S50 to step S53 is performed using the value held in the prefetch pointer 4.

【0019】次に、この発明の実施の他の形態について
説明する。図4は割り込み処理例を示すシーケンスチャ
ートである。前記実施の形態では、図4にみられるAの
部分で、割り込みサブルーチンからメインルーチンへの
復帰の応答が高速化されるが、ここでは、さらにBの部
分である、割り込みのネストからの復帰の応答について
も高速化を行う。図5はこのような割り込みのネストか
らの復帰応答が可能なマイクロコンピュータを示し、こ
れが命令キュー1,2,3と、プリフェッチ・ポインタ
4,5,6を含むバス・コントロール・ユニット7と、
プログラム格納用メモリ8と、命令デコーダ9と、割り
込みコントローラ10と、デコーダ19とを備えてい
る。プログラム格納用メモリ8はマイクロコンピュータ
の内部メモリではなく外部メモリで構成される場合もあ
るが、その場合もプログラム格納用メモリ8が外部に設
置されるだけで、全体の構成としては図5と同様であ
る。
Next, another embodiment of the present invention will be described. FIG. 4 is a sequence chart showing an example of interrupt processing. In the above embodiment, the response to the return from the interrupt subroutine to the main routine is speeded up at the part A shown in FIG. 4, but here, the part B is also used for the return from the interrupt nest. The response is also speeded up. FIG. 5 shows a microcomputer capable of returning a response from such a nest of interrupts. The microcomputer includes instruction queues 1, 2, 3 and a bus control unit 7 including prefetch pointers 4, 5, and 6.
It includes a program storage memory 8, an instruction decoder 9, an interrupt controller 10, and a decoder 19. The memory 8 for storing the program may be constituted by an external memory instead of the internal memory of the microcomputer. In this case, however, the memory 8 for storing the program is merely provided outside, and the overall configuration is the same as that of FIG. It is.

【0020】また、信号線18は、現在、どの優先レベ
ルの割り込みがサービス中であるかを知らせる信号線で
あり、一般に、信号線18の信号は、フラグとして割り
込みコントローラ10に保持されているので、割り込み
コントローラ10から取り出す。この信号線18はデコ
ーダ19によって、割り込みサービス中でない場合に`
1´となる信号線20と、メインルーチン処理中に受け
付けた第1の割り込みのサービス中のみ`1´となる信
号線21と、第1の割り込み処理中に受け付けた優先レ
ベルがより高い第2の割り込みのサービス中のみ`1´
となる信号線22とにデコードされる。
The signal line 18 is a signal line for notifying which priority level interrupt is currently being serviced. Generally, the signal of the signal line 18 is held in the interrupt controller 10 as a flag. From the interrupt controller 10. This signal line 18 is output by the decoder 19 when the interrupt service is not in progress.
1 ', the signal line 21 which becomes'1' only during the service of the first interrupt received during the main routine processing, and the second signal line 21 which has a higher priority level received during the first interrupt processing. ` 1 'only during service of interrupt
And the signal line 22 is decoded.

【0021】次に動作について説明する。まず、メイン
ルーチン処理時には、割り込みサービス中ではないの
で、信号線20が`1´,信号線21および信号線22
が`0´となり、信号線20から`1´が入力される命
令キュー1およびプリフェッチ・ポインタ4は、動作可
能状態となり、信号線21から`0´が入力される命令
キュー2およびプリフェッチ・ポインタ5と、信号線2
2から`0´が入力される命令キュー3およびプリフェ
ッチ・ポインタ6は停止状態となる。よって、命令キュ
ー1およびプリフェッチ・ポインタ4が使用されて、図
2について既に述べた動作と同様の動作が行われる。
Next, the operation will be described. First, at the time of the main routine processing, since the interrupt service is not being performed, the signal line 20 is set to {1 ′}, the signal line 21 and the signal line 22 are set.
Becomes "0", the instruction queue 1 and the prefetch pointer 4 to which "1" is input from the signal line 20 become operable, and the instruction queue 2 and the prefetch pointer to which "0" is input from the signal line 21 5 and signal line 2
The instruction queue 3 and the prefetch pointer 6 to which "0" is input from 2 are stopped. Therefore, the operation similar to the operation already described with reference to FIG. 2 is performed using the instruction queue 1 and the prefetch pointer 4.

【0022】次に、第1の割り込みを受け付けると、信
号線21が`1´、信号線20および信号線22が`0
´となり、信号線21から`1´が入力される命令キュ
ー2およびプリフェッチ・ポインタ5は動作可能状態と
なり、信号線20から`0´が入力される命令キュー1
およびプリフェッチ・ポインタ4と、信号線22から`
0´が入力される命令キュー3およびプリフェッチ・ポ
インタ6は停止状態となる。よって、命令キュー2およ
びプリフェッチ・ポインタ5が使用されて、図3につい
て既に述べた動作と同様の動作が行われる。
Next, when the first interrupt is accepted, the signal line 21 becomes "1" and the signal lines 20 and 22 become "0".
, The instruction queue 2 to which プ リ 1 ’is input from the signal line 21 and the prefetch pointer 5 are operable, and the instruction queue 1 to which ` 0’ is input from the signal line 20
From the prefetch pointer 4 and the signal line 22
The instruction queue 3 to which 0 'is input and the prefetch pointer 6 are stopped. Therefore, using the instruction queue 2 and the prefetch pointer 5, an operation similar to the operation already described with reference to FIG. 3 is performed.

【0023】この場合において、ステップS65におい
て、割り込みのネストを許可している状態で、より優先
レベルが高い第2の割り込みが発生すると、第1の割り
込み処理の状態に合わせて、タイミングをみてこの第2
の割り込みが受け付けられ、信号線22が`1´、信号
線20および信号線21が`0´となり、信号線22か
ら`1´が入力される命令キュー3およびプリフェッチ
・ポインタ6は動作可能状態となる。一方、信号線20
から`0´が入力される命令キュー1およびプリフェッ
チ・ポインタ4と、信号線21から`0´が入力される
命令キュー2およびプリフェッチ・ポインタ5は停止状
態となる。よって、命令キュー3およびプリフェッチ・
ポインタ6が使用されて、図3について述べた動作と同
様の動作が行われる。
In this case, in step S65, when a second interrupt having a higher priority level is generated while nesting of interrupts is permitted, the timing is checked in accordance with the state of the first interrupt processing. Second
Is received, the signal line 22 becomes "1", the signal lines 20 and 21 become "0", and the instruction queue 3 and the prefetch pointer 6 to which "1" is input from the signal line 22 are in an operable state. Becomes On the other hand, the signal line 20
The instruction queue 1 and the prefetch pointer 4 to which 0 'is input from, and the instruction queue 2 and the prefetch pointer 5 to which ` 0' are input from the signal line 21 are stopped. Therefore, the instruction queue 3 and the prefetch
Using the pointer 6, an operation similar to the operation described with reference to FIG. 3 is performed.

【0024】一方、この第2の割り込み処理において復
帰命令が実行されると、第1の割り込み処理へ移行する
が、このとき命令キュー2には、以前の第1の割り込み
処理時にプリフェッチしておいた命令コードが格納され
ているので、再プリフェッチ動作により命令キュー2に
命令が取込まれるのを待つ必要はなく、ステップS65
の中のステップS54から処理を行うことができる。ま
た、ステップS54からの処理に並行して、プリフェッ
チ・ポインタ5に保持されている値を利用して、ステッ
プS50からステップS53までのプリフェッチ動作が
行われる。
On the other hand, when the return instruction is executed in the second interrupt processing, the processing shifts to the first interrupt processing. At this time, the instruction queue 2 is prefetched in the previous first interrupt processing. Since the stored instruction code is stored, there is no need to wait for the instruction to be taken into the instruction queue 2 by the re-prefetch operation.
The processing can be performed from step S54 in. In parallel with the processing from step S54, the prefetch operation from step S50 to step S53 is performed using the value held in the prefetch pointer 5.

【0025】さらに、第1の割り込み処理において復帰
命令が実行されると、メインルーチンへ移行するが、こ
のとき命令キュー1には、以前のメインルーチン処理時
にプリフェッチしておいた命令コードが格納されている
ので、再プリフェッチ動作により命令キュー1に命令が
取り込まれるのを待つ必要はなく、ステップS54から
処理を行うことができる。また、ステップS54からの
処理に並行して、プリフェッチ・ポインタ4に保持され
ている値を利用して、ステップS50からステップS5
3までのプリフェッチ動作が行われる。
Further, when a return instruction is executed in the first interrupt processing, the processing shifts to the main routine. At this time, the instruction queue 1 stores the instruction code prefetched during the previous main routine processing. Therefore, there is no need to wait for the instruction to be taken into the instruction queue 1 by the re-prefetch operation, and the processing can be performed from step S54. Also, in parallel with the processing from step S54, the value held in the prefetch pointer 4 is used to execute the processing from step S50 to step S5.
Up to 3 prefetch operations are performed.

【0026】図6は前記デコーダ19の回路例を示す。
この図6は、割り込みコントローラ10がサポートする
割り込み優先レベルが2つである場合の回路例であり、
NORゲートA1,ExclusiveORゲートA
2,およびANDゲートA3には、入力として信号線3
01,302が接続され、各ゲートの出力はそれぞれ、
信号線20,信号線21および信号線22に接続されて
いる。従って、これによれば、割り込みが受け付けられ
ていないときには、優先レベル1および優先レベル0の
サービス情報を示す信号線301,302はそれぞれ`
0´となり、デコーダ19からの出力は、信号線20が
`1´になり、信号線21,22が`0´になる。
FIG. 6 shows a circuit example of the decoder 19.
FIG. 6 is a circuit example when the interrupt controller 10 supports two interrupt priority levels.
NOR gate A1, ExclusiveOR gate A
2, and AND gate A3 have signal line 3 as input.
01 and 302 are connected, and the output of each gate is
They are connected to a signal line 20, a signal line 21, and a signal line 22. Therefore, according to this, when the interrupt is not accepted, the signal lines 301 and 302 indicating the service information of the priority level 1 and the priority level 0 are respectively set to {}.
0 ', the output from the decoder 19 becomes ` 1' on the signal line 20 and ` 0 'on the signal lines 21 and 22.

【0027】また、優先レベル1か優先レベル0のどち
らか一方の割り込みが受け付けられたときは、信号線3
01,302のどちらか一方の信号線が`1´となり、
デコーダ19からの出力は、信号線21が`1´にな
り、信号線20,22が`0´になる。なお、優先レベ
ル1の割り込み処理中に優先レベル0の割り込みが受け
付けられたとき(割り込みのネスト発生時)には、信号
301,302はそれぞれ`1´となり、デコーダ19
からの出力は、信号線22が`1´になり、信号線2
0,21が`0´になる。
When either the priority level 1 or the priority level 0 interrupt is accepted, the signal line 3
01 or 302 becomes “1”,
As for the output from the decoder 19, the signal line 21 becomes "1" and the signal lines 20, 22 become "0". When the priority level 0 interrupt is accepted during the priority level 1 interrupt processing (when an interrupt nest occurs), the signals 301 and 302 each become "1" and the decoder 19
Is output from the signal line 22 to “1” and the signal line 2
0 and 21 become '0'.

【0028】図7は、割り込みコントローラ10がサポ
ートする割り込み優先レベルが3つである場合の、デコ
ーダ19の回路例であり、信号線401,402,40
3が入力されるNORゲートB1の出力には信号線20
が接続されており、信号線401,402が入力される
ExclusiveORゲートB2の出力と、信号線4
03とが入力されるExclusiveORゲートB3
の出力には、信号線21が接続されており、信号線40
1,402が入力されるNORゲートB4の出力と、信
号線401,403が入力されるNORゲートB5の出
力と、信号線402,403が入力されるNORゲート
B6の出力とが入力されるNORゲートB7には、信号
線22が接続されている。
FIG. 7 shows a circuit example of the decoder 19 when the interrupt controller 10 supports three interrupt priority levels, and shows signal lines 401, 402, and 40.
3 is input to the output of the NOR gate B1.
Are connected, the output of the Exclusive OR gate B2 to which the signal lines 401 and 402 are input, and the signal line 4
ExclusiveOR gate B3 to which 03 is input
Is connected to a signal line 21 and a signal line 40
1, NOR gate B4 to which signal lines 401 and 403 are input, output of NOR gate B5 to which signal lines 401 and 403 are input, and NOR to which an output of NOR gate B6 to which signal lines 402 and 403 are input. The signal line 22 is connected to the gate B7.

【0029】この図7に示すデコーダ19では、割り込
みが受け付けられていないときには、優先レベル2,優
先レベル1および優先レベル0のサービス情報を示す信
号線401,402,403はそれぞれ`0´となり、
デコーダ19からの出力は、信号線20が`1´にな
り、信号線21および信号線22が`0´になる。ま
た、優先レベル2,優先レベル1および優先レベル0の
いずれか1の割り込みが受け付けられたときには、信号
線401,402,403のいずれか1つの信号線が`
1´となり、デコーダ19からの出力は、信号線21が
`1´になり、信号線20および信号線22が`0´に
なる。
In the decoder 19 shown in FIG. 7, when an interrupt is not accepted, signal lines 401, 402, and 403 indicating service information of priority level 2, priority level 1 and priority level 0 are respectively "0",
In the output from the decoder 19, the signal line 20 becomes "1", and the signal lines 21 and 22 become "0". When an interrupt of any one of priority level 2, priority level 1 and priority level 0 is accepted, any one of signal lines 401, 402, and 403 becomes `
1 ′, the output from the decoder 19 becomes “1” on the signal line 21 and “0” on the signal lines 20 and 22.

【0030】一方、割り込みのネストが発生し、3つの
優先レベルのうちいづれか2つがサービス中となり、信
号線401,402,403のいずれか2つが`1´に
なった場合、あるいは、3つの優先レベルの内3つとも
サービス中となり、信号線401,402,403の3
つとも`1´になった場合には、デコーダ19からの出
力は、信号線21が`1´になり、信号線20および信
号線22が`0´になる。ここでは、割り込みのネスト
が1重からの復帰についてのみ高速復帰が可能となる構
成を示した。よって、割り込み優先レベルが3つ以上あ
り、ネストが2重以上になった場合の復帰については、
高速化されない。全ての割り込みネストからの高速復帰
を行いたい場合には、割り込みコントロール10がサポ
ートする割り込み優先レベルの数だけ命令キューを設置
し、デコーダ19により現在処理されている割り込み優
先レベルに対応して命令キューを切り換えて動作させる
構成にすればよい。
On the other hand, when an interrupt nest occurs and any two of the three priority levels are in service and any two of the signal lines 401, 402, and 403 become "1", or three priority levels Three of the levels are in service, and three of signal lines 401, 402, and 403
When both become "1", the output from the decoder 19 becomes "1" on the signal line 21 and "0" on the signal lines 20 and 22. Here, a configuration has been described in which high-speed return is possible only when the interrupt nest returns from a single state. Therefore, when there are three or more interrupt priority levels and the number of nests is two or more,
Does not speed up. In order to perform high-speed return from all interrupt nests, the instruction queues are set in the number of interrupt priority levels supported by the interrupt control 10 and the instruction queues corresponding to the interrupt priority levels currently processed by the decoder 19 are set. May be switched to operate.

【0031】次に、この発明の実施のさらに他の形態を
説明する。前記各実施の形態では、割り込みからの復帰
時の応答を高速化する場合について述べたが、ここでは
割り込みへの分岐時の応答についても高速化する場合を
示す。図8はこれを実施するマイクロコンピュータを示
す。このマイクロコンピュータは、図に示すように、命
令キュー1,2,プリフェッチ・ポインタ4,5を含む
バス・コントロール・ユニット7,プログラム格納用メ
モリ8,命令デコーダ9,割り込みコントローラ10,
インバータ16および割り込み受け付け数検出部23と
を備えている。なお、このうちプログラム格納用メモリ
8はマイクロコンピュータの内部メモリではなく外部メ
モリで構成される場合もあるが、その場合もプログラム
格納用メモリ8が外部に設置されるだけで、全体の構成
としては図8と同様である。なお、この図8は図1の回
路に割り込み受け付け数検出部23を追加して構成され
ている。
Next, still another embodiment of the present invention will be described. In each of the above embodiments, the case where the response at the time of returning from the interrupt is speeded up is described. Here, the case where the response at the time of branching to the interrupt is also speeded up will be described. FIG. 8 shows a microcomputer for implementing this. As shown in FIG. 1, the microcomputer includes a bus control unit 7 including instruction queues 1 and 2, prefetch pointers 4 and 5, a program storage memory 8, an instruction decoder 9, an interrupt controller 10,
An inverter 16 and an interrupt reception number detection unit 23 are provided. Of these, the program storage memory 8 may be constituted by an external memory instead of the internal memory of the microcomputer. In that case, however, the program storage memory 8 is simply provided outside, and the overall configuration is as follows. This is the same as FIG. FIG. 8 is configured by adding an interrupt reception number detection unit 23 to the circuit of FIG.

【0032】図9は割り込み受け付け数検出部23の一
例を示す回路図である。この割り込み受け付け数検出部
23は2つのフリップフロップD1,D2を有し、これ
らのリセット後、マイクロコンピュータの動作が開始さ
れると、割り込み受け付け数検出部23は、割り込みサ
ービス中に`1´となる信号線15をカウントし始め、
1回目の割り込みサービスまでは信号線24に`0´を
出力し、2回目以降の割り込みサービスについては`1
´を出力する。従って、命令キュー2に信号線24から
`0´が入力されると、命令キュー2に格納されている
命令コードは無効とされ、命令キュー2は空にされる。
一方、命令キュー2に信号線24から`1´が入力され
ると、命令キュー2に格納されている命令コードは無効
とされず、命令コードは格納されたままとなる。
FIG. 9 is a circuit diagram showing an example of the number-of-interrupts detecting unit 23. The interrupt reception number detection unit 23 has two flip-flops D1 and D2. When the operation of the microcomputer is started after these resets, the interruption reception number detection unit 23 outputs “1” during interrupt service. Start counting the signal line 15
Until the first interrupt service, “0” is output to the signal line 24, and for the second and subsequent interrupt services, $ 1 is output.
Is output. Therefore, when "0" is input from the signal line 24 to the instruction queue 2, the instruction code stored in the instruction queue 2 is invalidated, and the instruction queue 2 is emptied.
On the other hand, when "1" is input to the instruction queue 2 from the signal line 24, the instruction code stored in the instruction queue 2 is not invalidated, and the instruction code remains stored.

【0033】また、プリフェッチ・ポインタ5に信号線
24から`0´が入力されると、プリフェッチ・ポイン
タ5に保持されている値は無効とされる。プリフェッチ
・ポインタ5に信号線24から`1´が入力されると、
プリフェッチ・ポインタ5に保持されている値は無効と
されず、保持されたままとなる。この実施の形態におけ
る割り込み処理ルーチン例を示すプログラムを図10に
示す。この割り込み処理ルーチンのプログラムでは図1
0に見られるように、割り込み分岐先のアドレスの直前
に復帰命令がくるように配置する。このプログラムと割
り込み受け付け数検出部23により、1回目に受け付け
た割り込みの分岐処理は高速化できないが、2回目以降
受け付けた割り込みの分岐からは、命令キュー2に分岐
先の命令コードが保持されており、プリフェッチ動作が
終了するまで命令の実行が待たされることはなく、高速
化することが可能になる。
When "0" is input from the signal line 24 to the prefetch pointer 5, the value held in the prefetch pointer 5 is invalidated. When "1" is input to the prefetch pointer 5 from the signal line 24,
The value held in the prefetch pointer 5 is not invalidated and remains held. FIG. 10 shows a program showing an example of an interrupt processing routine in this embodiment. In this interrupt processing routine program, FIG.
As seen from 0, the return instruction is arranged immediately before the address of the interrupt branch destination. With this program and the number-of-interrupts-detection unit 23, the speed of branch processing of the first accepted interrupt cannot be increased, but the instruction code of the branch destination is held in the instruction queue 2 after the second accepted interrupt branch. Therefore, the execution of the instruction does not have to wait until the prefetch operation is completed, and the speed can be increased.

【0034】次に動作について説明する。この実施の形
態では、割り込みの分岐時以外の動作については第1の
実施例の動作と同様であるため、割り込み分岐時の動作
についてのみ説明する。この割り込み分岐時の動作は、
1回目の割り込みを受け付けた時と、2回目以降の割り
込みを受け付けた時で動作が異なる。1回目の割り込み
を受け付けた時は、割り込み受け付け数検出部23から
信号機24に`0´が出力される。命令キュー2および
プリフェッチ・ポインタ5に信号線24から`0´が入
力されると、命令キュー2およびプリフェッチ・ポイン
タ5は図1について説明した割り込み処理と同様の、図
3に示すような動作を行う。ここで、復帰命令の実行
(ステップS66)のとき、割り込みサブルーチンのプ
ログラムは図10に示すように割り込み分岐先の直前に
復帰命令が実行されるので、命令キュー2には割り込み
分岐先の最初の命令コードが格納され、プリフェッチ・
ポインタ5には現行値が保持された状態となる。
Next, the operation will be described. In this embodiment, the operation other than when the interrupt is branched is the same as the operation in the first embodiment, and therefore only the operation when the interrupt is branched will be described. The operation at the time of this interrupt branch is
The operation differs between when the first interrupt is received and when the second and subsequent interrupts are received. When the first interrupt is received, “0” is output from the interrupt reception number detection unit 23 to the traffic light 24. When "0" is input from the signal line 24 to the instruction queue 2 and the prefetch pointer 5, the instruction queue 2 and the prefetch pointer 5 perform the same operation as that shown in FIG. Do. Here, at the time of execution of the return instruction (step S66), the return instruction is executed immediately before the interrupt branch destination in the interrupt subroutine program as shown in FIG. Instruction code is stored in the prefetch
The current value is held in the pointer 5.

【0035】次に、2回目以降の割り込みを受け付けた
時の動作について説明する。図11は2回目以降の割り
込みを受け付けた時の動作を示すフローチャートであ
る。2回目以降の割り込みが発生し(ステップS7
0)、割り込みを受け付けて割り込みサービス中となる
と、第1の実施例で説明したように信号線15は`1
´、信号線17は`0´となるので、信号線15が入力
される命令キュー2およびプリフェッチ・ポインタ5は
動作可能状態、信号線17が入力される命令キュー1お
よびプリフェッチ・ポインタ4は停止状態となる(ステ
ップS71)。次に、PCおよびPSWの値が退避され
(ステップS72)、割り込み分岐先のアドレスがPC
にセットされる(ステップS73)。ここまでは図1に
ついて説明した動作と同様である。
Next, the operation when the second and subsequent interrupts are accepted will be described. FIG. 11 is a flowchart showing the operation when the second and subsequent interrupts are received. The second and subsequent interrupts occur (step S7).
0), when the interrupt is accepted and the interrupt service is being performed, the signal line 15 is set at $ 1 as described in the first embodiment.
Since the signal line 17 is set to "0", the instruction queue 2 to which the signal line 15 is input and the prefetch pointer 5 are operable, and the instruction queue 1 and the prefetch pointer 4 to which the signal line 17 is input are stopped. It will be in a state (step S71). Next, the values of PC and PSW are saved (step S72), and the address of the interrupt branch destination is set to PC.
Is set to (step S73). The operation so far is the same as the operation described with reference to FIG.

【0036】さらに、図1の動作では、この次に、PC
の値をプリフェッチ・ポインタにセットして、割り込み
分岐先の命令コードをプリフェッチしなければ命令実行
を開始できなかったが、ここでは、1回目の割り込みを
処理した際に、キュー2に割り込み分岐先の命令コード
が格納され、プリフェッチ・ポインタ5にはそのときの
現行値が保持されているので、これらの値を使用するこ
とが可能である。つまり、2回目以降の割り込み受け付
け時に割り込み受け付け数検出部23から信号線24に
`1´が出力され、命令キュー2およびプリフェッチ・
ポインタ5に入力されると、命令キュー2に格納されて
いる命令コード、および、プリフェッチ・ポインタ5の
現行値は無効とされず、命令キュー2に格納されている
命令コードを使用して、図2のステップS54から処理
が開始される(ステップS74)。さらに復帰命令が実
行されるまでの間、必要に応じて、プリフェッチ・ポイ
ンタ5に保持されている値を利用して、ステップS50
からステップS53までのプリフェッチ動作が、前述の
ステップS54からの処理に平行して行われる(ステッ
プS75)。その後、復帰命令が実行されて(ステップ
S76)からメインルーチンでの処理に移行するまでの
処理(ステップS79)は、図1について説明した場合
と同様の動作となる。
Further, in the operation shown in FIG.
Is set in the prefetch pointer and instruction execution cannot be started unless the instruction code of the interrupt branch destination is prefetched. However, when the first interrupt is processed, Are stored, and the prefetch pointer 5 holds the current value at that time, so that these values can be used. That is, when the second and subsequent interrupts are received, “1” is output from the interrupt reception number detection unit 23 to the signal line 24, and the instruction queue 2 and the prefetch
When the instruction code is input to the pointer 5, the instruction code stored in the instruction queue 2 and the current value of the prefetch pointer 5 are not invalidated, and the instruction code stored in the instruction queue 2 is used. The process is started from Step S54 of Step 2 (Step S74). Until the return instruction is executed, if necessary, the value held in the prefetch pointer 5 is used to execute step S50.
The prefetch operation from step S53 to step S53 is performed in parallel with the processing from step S54 described above (step S75). Thereafter, the processing (step S79) from the execution of the return instruction (step S76) to the shift to the processing in the main routine is the same as that described with reference to FIG.

【0037】この実施の形態では、割り込みの要因が1
つの場合についてのみ高速分岐が可能となる構成を示し
た。大部分のマイクロコンピュータは複数の割り込み要
因を備えており、そのそれぞれの分岐を高速化させたい
場合には、それぞれの割り込み要因ごとに、命令キュ
ー,プリフェッチ・ポインタおよび割り込み受け付け数
検出回路を備えた構成とし、現在処理されている割り込
み要因に対応して命令キューを切り換えて動作させる構
成にすればよい。
In this embodiment, when the cause of the interrupt is 1
The configuration that enables high-speed branching in only one case is shown. Most microcomputers have a plurality of interrupt sources. To speed up each branch, an instruction queue, a prefetch pointer, and an interrupt acceptance number detection circuit are provided for each interrupt source. The configuration may be such that the instruction queue is switched and operated according to the interrupt factor currently being processed.

【0038】[0038]

【発明の効果】以上のように、請求項1の発明によれ
ば、メインルーチン処理時に動作可能状態となる第1の
命令キューと、割り込みのサブルーチン処理時に動作可
能状態となる第2の命令キューとを有し、現在の処理が
メインルーチン処理か割り込みのサブルーチン処理かに
応じて、割り込みコントローラに、前記第1の命令キュ
ーまたは第2の命令キューのいずれかを切り替えて動作
させるように構成したので、プリフェッチ動作によって
命令キューに命令コードが格納されるのを待たずに命令
実行を開始でき、割り込みサブルーチンからメインルー
チンへの復帰の応答速度を向上することができるという
効果が得られる。
As described above, according to the first aspect of the present invention, the first instruction queue which becomes operable during the main routine processing and the second instruction queue which becomes operable during the interrupt subroutine processing. The interrupt controller switches between the first instruction queue and the second instruction queue to operate according to whether the current processing is the main routine processing or the interrupt subroutine processing. Therefore, the instruction execution can be started without waiting for the instruction code to be stored in the instruction queue by the prefetch operation, and the effect of improving the response speed of returning from the interrupt subroutine to the main routine can be obtained.

【0039】また、請求項2の発明によれば、前記第2
の命令キューを割り込みの優先レベル数以内の複数個設
け、現在のサブルーチン処理が何重目の割り込みネスト
の処理かに応じて、前記割り込みコントローラに、前記
第2の命令キューのいずれかを切り替えて動作させるよ
うに構成したので、プリフェッチ動作によって命令キュ
ーに命令コードが格納されるのを待たずに命令実行を開
始でき、割り込みのネストからの復帰の応答速度を向上
することができるという効果が得られる。
According to the second aspect of the present invention, the second
A plurality of instruction queues within the number of interrupt priority levels are provided, and the interrupt controller switches one of the second instruction queues to the interrupt controller in accordance with the order of the interrupt nest processing in the current subroutine processing. Since the configuration is made to operate, the instruction execution can be started without waiting for the instruction code to be stored in the instruction queue by the prefetch operation, and the response speed of returning from the interrupt nest can be improved. Can be

【0040】また、請求項3の発明によれば、割り込み
サブルーチンプログラム上で割り込み分岐先アドレスの
直前に復帰命令がくるようにし、かつ割り込み受け付け
数検出部にて、1回目の割り込みサービスまでは、前記
第2の命令キュー中の命令コードを無効とし、2回目以
降の割り込みサービスでは前記第2の命令キューに格納
されて割り込みの分岐先の命令コードを保持させるよう
に構成したので、プリフェッチ動作によって命令キュー
に命令コードが格納されるのを待たずに命令実行を開始
でき、割り込みの分岐時の応答速度を向上することがで
きるという効果が得られる。
According to the third aspect of the present invention, the return instruction comes immediately before the interrupt branch destination address on the interrupt subroutine program, and the interrupt acceptance number detection unit performs the following until the first interrupt service. Since the instruction code in the second instruction queue is invalidated, and the second and subsequent interrupt services are configured to store the instruction code stored in the second instruction queue and the branch destination of the interrupt, the prefetch operation is performed. Instruction execution can be started without waiting for the instruction code to be stored in the instruction queue, and the effect of improving the response speed at the time of interrupt branch can be obtained.

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

【図1】 この発明の実施の一形態によるマイクロコン
ピュータを示すブロック図である。
FIG. 1 is a block diagram showing a microcomputer according to an embodiment of the present invention.

【図2】 図1におけるマイクロコンピュータの動作を
示すフローチャートである。
FIG. 2 is a flowchart showing the operation of the microcomputer in FIG.

【図3】 図1におけるマイクロコンピュータの動作を
示すフローチャートである。
FIG. 3 is a flowchart showing an operation of the microcomputer in FIG. 1;

【図4】 この発明による割り込み処理方法を示すシー
ケンスチャートである。
FIG. 4 is a sequence chart showing an interrupt processing method according to the present invention.

【図5】 この発明の実施の他の形態によるマイクロコ
ンピュータを示すブロック図である。
FIG. 5 is a block diagram showing a microcomputer according to another embodiment of the present invention.

【図6】 図5におけるデコーダの内部構成を示す回路
図である。
FIG. 6 is a circuit diagram showing an internal configuration of a decoder in FIG.

【図7】 図5におけるデコーダの内部構成を示す回路
図である。
FIG. 7 is a circuit diagram showing an internal configuration of a decoder in FIG.

【図8】 この発明の実施の他の形態によるマイクロコ
ンピュータを示すブロック図である。
FIG. 8 is a block diagram showing a microcomputer according to another embodiment of the present invention.

【図9】 図8における割り込み受け付け数検出部の内
部構成を示す回路図である。
9 is a circuit diagram showing an internal configuration of an interrupt reception number detection unit in FIG.

【図10】 図8に示すマイクロコンピュータの割り込
み処理ルーチンのプログラムを示す説明図である。
FIG. 10 is an explanatory diagram showing a program of an interrupt processing routine of the microcomputer shown in FIG. 8;

【図11】 図8に示すマイクロコンピュータの動作を
示すフローチャートである。
11 is a flowchart showing an operation of the microcomputer shown in FIG.

【図12】 従来のマイクロコンピュータを示すブロッ
ク図である。
FIG. 12 is a block diagram showing a conventional microcomputer.

【図13】 図12におけるマイクロコンピュータの動
作を示すフローチャートである。
13 is a flowchart showing the operation of the microcomputer in FIG.

【図14】 図12におけるマイクロコンピュータの動
作を示すフローチャートである。
14 is a flowchart showing the operation of the microcomputer in FIG.

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

1 命令キュー(第1の命令キュー) 2 命令キュー(第2の命令キュー) 10 割り込みコントローラ 23 割り込み受け付け数検出部 Reference Signs List 1 instruction queue (first instruction queue) 2 instruction queue (second instruction queue) 10 interrupt controller 23 interrupt number detection unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 メインルーチン処理時に動作可能状態と
なる第1の命令キューと、 割り込みのサブルーチン処理時に動作可能状態となる第
2の命令キューと、 現在の処理がメインルーチン処理か割り込みのサブルー
チン処理かに応じて、前記第1の命令キューまたは第2
の命令キューのいずれかを切り替えて動作させる割り込
みコントローラとを備えたことを特徴とするマイクロコ
ンピュータ。
1. A first instruction queue which becomes operable at the time of main routine processing, a second instruction queue which becomes operable at the time of interrupt subroutine processing, and the current processing is a main routine processing or an interrupt subroutine processing. The first instruction queue or the second
And an interrupt controller that operates by switching any one of the instruction queues.
【請求項2】 前記第2の命令キューが割り込みの優先
レベル数以内の複数個設けられ、現在のサブルーチン処
理が何重目の割り込みネストの処理かに応じて、前記割
り込みコントローラが前記第2の命令キューのいずれか
を切り替えて動作させることを特徴とする請求項1に記
載のマイクロコンピュータ。
2. The interrupt controller according to claim 2, wherein a plurality of said second instruction queues are provided within the number of priority levels of the interrupts. 2. The microcomputer according to claim 1, wherein the microcomputer operates by switching one of the instruction queues.
【請求項3】 割り込みサブルーチンプログラム上で割
り込み分岐先アドレスの直前に復帰命令がくるように
し、かつ割り込み受け付け数検出部にて、1回目の割り
込みサービスまでは、前記第2の命令キュー中の命令コ
ードを無効とし、2回目以降の割り込みサービスでは前
記第2の命令キューに格納されて割り込みの分岐先の命
令コードを保持するようにしたことを特徴とする請求項
1に記載のマイクロコンピュータ。
3. An interrupt subroutine program in which a return instruction comes immediately before an interrupt branch destination address, and an interrupt reception number detecting unit detects an instruction in the second instruction queue until the first interrupt service. 2. The microcomputer according to claim 1, wherein the instruction code is invalidated and stored in the second instruction queue to hold the instruction code of the branch destination of the interrupt in the second and subsequent interrupt services.
JP09184172A 1997-07-09 1997-07-09 Microcomputer Expired - Fee Related JP3123946B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP09184172A JP3123946B2 (en) 1997-07-09 1997-07-09 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP09184172A JP3123946B2 (en) 1997-07-09 1997-07-09 Microcomputer

Publications (2)

Publication Number Publication Date
JPH1124942A true JPH1124942A (en) 1999-01-29
JP3123946B2 JP3123946B2 (en) 2001-01-15

Family

ID=16148633

Family Applications (1)

Application Number Title Priority Date Filing Date
JP09184172A Expired - Fee Related JP3123946B2 (en) 1997-07-09 1997-07-09 Microcomputer

Country Status (1)

Country Link
JP (1) JP3123946B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4690576B2 (en) * 2001-04-26 2011-06-01 パナソニックシステムネットワークス株式会社 Software modem and communication terminal device having the same
US10268576B2 (en) 2017-05-23 2019-04-23 Renesas Electronics Corporation Semiconductor device and control method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4690576B2 (en) * 2001-04-26 2011-06-01 パナソニックシステムネットワークス株式会社 Software modem and communication terminal device having the same
US10268576B2 (en) 2017-05-23 2019-04-23 Renesas Electronics Corporation Semiconductor device and control method thereof

Also Published As

Publication number Publication date
JP3123946B2 (en) 2001-01-15

Similar Documents

Publication Publication Date Title
US7526629B2 (en) Vector processing apparatus with overtaking function to change instruction execution order
JPS61107434A (en) Data processor
JP2560988B2 (en) Information processing apparatus and processing method
US5371857A (en) Input/output interruption control system for a virtual machine
JP3721780B2 (en) Data processing apparatus having a plurality of pipeline processing mechanisms
US4628449A (en) Vector interrupt system and method
EP0223150B1 (en) Information processing apparatus
JP2001005676A (en) Interruption processor
US5872962A (en) Program control system
JP3779012B2 (en) Pipelined microprocessor without interruption due to branching and its operating method
KR19990072432A (en) Information processing method and information processing apparatus having interrupt control function with priority orders
JP3123946B2 (en) Microcomputer
US7076641B2 (en) Programmable controller
JPH0895798A (en) Data processor
JP4631442B2 (en) Processor
JP2814683B2 (en) Instruction processing unit
JPH0342723A (en) Data processor
JPH1063574A (en) Processor with cache memory
JP3982077B2 (en) Multiprocessor system
JP3008890B2 (en) Processing control unit
JPS60105050A (en) Pipeline control system
JP2635863B2 (en) Central processing unit
JPH0760386B2 (en) Data processing device having branch prediction function
JPH09282190A (en) Inter-process communication scheduling system
JP2005078484A (en) Instruction fetching device and method

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20000509

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20001003

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081027

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091027

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees