JP2001084149A - Interruption processing system for information processor - Google Patents

Interruption processing system for information processor

Info

Publication number
JP2001084149A
JP2001084149A JP26016299A JP26016299A JP2001084149A JP 2001084149 A JP2001084149 A JP 2001084149A JP 26016299 A JP26016299 A JP 26016299A JP 26016299 A JP26016299 A JP 26016299A JP 2001084149 A JP2001084149 A JP 2001084149A
Authority
JP
Japan
Prior art keywords
instruction
interrupt
delay
signal
immediately
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP26016299A
Other languages
Japanese (ja)
Inventor
Kazuhiko Hara
和彦 原
Shinichi Yamaura
慎一 山浦
Takao Katayama
貴雄 片山
Kazuhiko Iwanaga
和彦 岩永
Kosuke Takato
浩資 高藤
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP26016299A priority Critical patent/JP2001084149A/en
Publication of JP2001084149A publication Critical patent/JP2001084149A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an interruption processing system for preventing the generation of any problem in a simple method at the time of accepting interruption just after delay in a pipe line system CPU for processing an instruction having a delay slot. SOLUTION: This interruption processing system, is provided with an instruction decoder 1 for decoding an instruction in a CPU for pipe line-processing a delay instruction having a delay slot and a flag register 2 which can be set according to the instruction. Thus, interruption just after the delay instruction is switched to validity or invalidity according to the state of the flag register 2.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、遅延スロットを持つ
命令を処理するパイプライン方式の情報処理装置におけ
る割り込み処理の方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an interrupt processing method in a pipeline type information processing apparatus for processing an instruction having a delay slot.

【0002】[0002]

【従来の技術】計算機などの情報処理装置(以下、CP
Uという)では、デバッグ作業のために、命令のシング
ルステップ実行が行われる。
2. Description of the Related Art Information processing devices such as computers (hereinafter referred to as CPs)
U), single-step execution of instructions is performed for debugging.

【0003】シングルステップ実行を実現するため、C
PUがハードウエアでシングルステップ割り込みをサポ
ートする方法が一般的である。これは、CPUがシング
ルステップ実行を行う動作モードを用意し、このモード
では1命令を実行する毎に割り込みを発生させることで
実現している。
In order to realize single-step execution, C
It is common for the PU to support single-step interrupts in hardware. This is realized by preparing an operation mode in which the CPU performs single step execution, and in this mode, an interrupt is generated each time one instruction is executed.

【0004】しかしながら、遅延分岐命令など遅延スロ
ットを設けてパイプライン処理している場合など、1命
令毎の割り込みが不可能な場合が存在する。この場合に
ついては、2通りの解決策が考えられている。
However, there are cases where interrupts cannot be made for each instruction, such as when a pipeline is provided with a delay slot such as a delayed branch instruction. In this case, two solutions are considered.

【0005】第1の方法は、遅延命令と遅延スロットの
間に割り込みが入っても矛盾を起こさないように、また
完全な形で復帰できるようハードウエアによるサポート
を行う手段である。すなわち、復帰時に遅延スロット内
の命令から実行することができるようにすることであ
る。この方法は、プログラムされる命令になんら制限が
なく、シングルステップ実行によるデバッグとしては、
理想的であるが、この機能を実現するためのハードウエ
アコストの増大は不可避であり、場合によっては動作周
波数の低下、動作時消費電力の増大なども考えられる。
The first method is a means for providing hardware support so that even if an interrupt is inserted between a delay instruction and a delay slot, no inconsistency occurs and a complete return can be made. That is, it is possible to execute from the instruction in the delay slot when returning. This method has no restrictions on the instructions to be programmed, and for single-step debugging,
Although ideal, an increase in hardware cost for realizing this function is inevitable, and in some cases, a decrease in operating frequency, an increase in power consumption during operation, and the like may be considered.

【0006】第2の方法は、遅延命令の直後には割り込
みを受け付けないようにする方法である。この方法だ
と、ハードウエアコストもわずかであり、遅延命令のみ
がシングルステップとならないが、遅延命令の頻度が高
くないならば、ほとんどデバッグの障害にならない。
[0006] The second method is a method in which an interrupt is not accepted immediately after a delay instruction. With this method, the hardware cost is small, and only the delayed instruction is not single-stepped. However, if the frequency of the delayed instruction is not high, it hardly hinders debugging.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上記第
1の方法では、前述のようにハードウェアコストが問題
となる。コストが最重視されるシステムでは採用は困難
であるとともに、動作周波数の低下や消費電力の増大な
どのマイナス面も考えられる。
However, in the above-mentioned first method, hardware cost becomes a problem as described above. It is difficult to adopt such a system in which cost is of the utmost importance, and there may be disadvantages such as a decrease in operating frequency and an increase in power consumption.

【0008】上記第2の方法では、遅延命令の出現頻度
が高い場合は、デバッグ作業に支障がある。たとえば、
遅延命令がいくつか連続してしまうと、その命令群を処
理する間、割り込みが禁止され、シングルステップ実行
ができない。したがって、その間のデバッグしやすさが
著しく低下する。
In the second method, when the frequency of occurrence of the delayed instruction is high, there is a problem in the debugging operation. For example,
If several delayed instructions continue, interrupts are prohibited while processing the instruction group, and single-step execution cannot be performed. Therefore, the ease of debugging during that time is significantly reduced.

【0009】また、上記の第2の方法が、ハードウエア
コストの点から見ても有望であるが、問題となるのは、
遅延命令が連続して出現するとき、1命令毎であるべき
シングルステップ実行モードで、数命令実行の間の情報
が途絶えデバッグに支障をきたすという点である。
Although the above-mentioned second method is promising in terms of hardware cost, the problem is that
When delay instructions appear successively, in a single-step execution mode that should be one instruction at a time, information during the execution of several instructions is interrupted and debugging is hindered.

【0010】この発明は、上述した従来の問題点に鑑み
なされたものにして、遅延スロットを持つ命令を処理す
るパイプライン方式のCPUにおいて、遅延直後に割り
込みを受け付けた場合に、簡易な方法で問題発生をなく
す割り込み処理方式を提供する。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned conventional problems, and has been made in consideration of the above-described conventional problem. In a pipeline type CPU that processes an instruction having a delay slot, when an interrupt is received immediately after a delay, a simple method is used. Provide an interrupt handling method that eliminates problems.

【0011】[0011]

【課題を解決するための手段】この発明の割り込み処理
方式は、遅延スロットを持つ遅延命令をパイプライン処
理する情報処理装置において、命令によって設定の可能
な少なくとも一つのフラグレジスタを有し、フラグレジ
スタの状態により、遅延命令の直後の割り込みを有効ま
たは無効に切り替えることを特徴とする。
According to the present invention, there is provided an information processing apparatus for pipeline processing a delay instruction having a delay slot, comprising at least one flag register which can be set by the instruction. The interrupt immediately after the delay instruction is switched between enabled and disabled depending on the state.

【0012】上記した構成によれば、遅延命令直後の割
り込みを有効にするか無効にするかを、命令により選択
可能とすることで、プログラマに選択権を与えることが
できる。プログラマは都合に応じてどちらかの方法を選
択できるので、プログラマに有利な条件を常に用意でき
ることになる。
[0012] According to the above-described configuration, the right of interruption can be enabled or disabled immediately after the delay instruction by the instruction, thereby giving the programmer the right of selection. Since the programmer can select either method at his convenience, it is always possible to prepare favorable conditions for the programmer.

【0013】さらに、この発明は、前記フラグレジスタ
の状態によらず直後の割り込みを無効とする第1の遅延
命令と、前記フラグレジスタに格納されたフラグによっ
て直後の割り込みの有効または無効を切り替え可能な第
2の遅延命令と、を備えるように構成すると良い。
Further, according to the present invention, a first delay instruction for disabling a subsequent interrupt regardless of the state of the flag register, and enabling / disabling of a subsequent interrupt can be switched by a flag stored in the flag register. And a second delay instruction.

【0014】上記の構成によれば、フラグによって直後
の割り込みの有効・無効を切り替え可能な遅延命令と、
前述のフラグの状態によらず直後の割り込みを無効とす
る遅延命令の2通りの遅延命令に分類する。すなわち、
遅延直後の割り込みの実現にハードウエアの著しい負担
を強いるような遅延命令、たとえば遅延分岐命令のよう
に分岐先アドレスと復帰アドレスが異なるため特殊なレ
ジスタを設けるなど、特殊な処理になるような命令につ
いては、フラグ状態によらず直後の割り込み受付を禁止
する分類とし、ハードウエアコストがかからない遅延命
令は、フラグの状態によって直後の割り込みの有効・無
効を切り替えが可能とする分類とする。この結果、ハー
ドウエアの増大を招くことなく、従来シングルステップ
実行できなかった命令の一部においても、シングルステ
ップ実行できるようになり、デバッグのしやすさを向上
できる。
According to the above arrangement, the delay instruction capable of switching the validity / invalidity of the immediately following interrupt by the flag,
Regardless of the state of the above-mentioned flag, it is classified into two types of delay instructions, that is, delay instructions that invalidate the immediately following interrupt. That is,
A delayed instruction that places a significant burden on the hardware to realize an interrupt immediately after a delay, such as an instruction that requires special processing, such as providing a special register because the branch destination address and return address are different, such as a delayed branch instruction Is a category in which the acceptance of an interrupt immediately after is prohibited regardless of the flag state, and a delay instruction that does not require hardware cost can be switched between valid / invalid of the immediately following interrupt depending on the state of the flag. As a result, single-step execution can be performed even for a part of the instruction that could not be single-step-executed in the past without increasing the hardware, and the ease of debugging can be improved.

【0015】また、この発明の割り込み処理方式は、遅
延スロットを持つ遅延命令をパイプライン処理する情報
処理装置おいて、直後の割り込みを無条件で無効とする
第1の遅延命令と、遅延命令と遅延スロットに配置され
た命令の組み合わせによって直後の割り込みの有効また
は無効を切り替え可能な第2の遅延命令と、を備えるこ
とを特徴とする。
Further, in the information processing apparatus for pipeline processing a delay instruction having a delay slot, the interrupt processing method according to the present invention includes a first delay instruction for unconditionally invalidating an immediately following interrupt, a delay instruction, And a second delay instruction capable of switching the validity or invalidity of the interrupt immediately after by a combination of instructions arranged in the delay slot.

【0016】上記の構成によれば、割り込みを許可して
良いのか否かの判断を自動的に行えるため、プログラマ
に知識と手間を要求しない。また、ハザードが発生する
可能性のある場合と、ない場合が混在するようなプログ
ラムであっても、一律に割り込み禁止にしなくてもいい
ため、デバッグの精度が向上する。
According to the above configuration, it is possible to automatically determine whether or not the interrupt can be permitted, so that knowledge and effort are not required for the programmer. Further, even in a program in which a hazard may occur and a program in which a hazard does not exist, interrupts do not need to be uniformly disabled, thereby improving the accuracy of debugging.

【0017】さらに、この発明は、パイプラインステー
ジで連続する2命令のオペランドの一致を検査する比較
器を持ち、前記比較器の結果を反映して、前述の遅延命
令と遅延スロットに配置された命令の組み合わせによっ
て、直後の割り込みの有効または無効を切り替え可能に
構成すると良い。
Further, the present invention has a comparator for checking the coincidence of operands of two consecutive instructions in a pipeline stage, and is arranged in the delay instruction and the delay slot reflecting the result of the comparator. It is preferable to enable or disable the immediately following interrupt by a combination of instructions.

【0018】上記の構成によれば、ハザードが発生する
可能性をオペランドレベルで検査するため、ハザードが
発生する可能性のある遅延命令と後続命令の組み合わせ
においても、オペランドの不一致によりハザードが発生
せず、割り込みを禁止する必要がなくなる場合もあるた
め、よりデバッグの精度が向上する。
According to the above configuration, the possibility of occurrence of a hazard is checked at the operand level. Therefore, even in the case of a combination of a delayed instruction and a subsequent instruction that may cause a hazard, a hazard is generated due to mismatch of operands. In some cases, it is not necessary to prohibit interrupts, so that the accuracy of debugging is further improved.

【0019】[0019]

【実施の形態】以下、この発明の実施の形態につき図面
を参照して説明する。図5にこの発明の一実施形態に係
わる遅延命令のパイプライン処理の動作タイミング図を
示す。ここでは、説明を簡単にするため、単純なパイプ
ライン構造としている。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 5 is an operation timing chart of pipeline processing of a delayed instruction according to an embodiment of the present invention. Here, for simplicity of explanation, a simple pipeline structure is used.

【0020】このCPUでは、「フェッチ」「実行」
「メモリアクセス」の3段のパイプライン構造を持つ。
「フェッチ」では命令を格納しているメモリから順に命
令を読み込む工程である。「実行」は命令に従って演算
などの処理を行い、結果を所望のレジスタに格納する工
程である。「メモリアクセス」は、ロードやストアなど
のメモリにアクセスする命令のみに存在する工程で、ロ
ードの場合は所望のアドレスからデータを読み出し、所
望のレジスタへ格納することを実行する。
In this CPU, "fetch" and "execution"
It has a three-stage pipeline structure of “memory access”.
“Fetch” is a step of sequentially reading instructions from a memory storing the instructions. "Execution" is a step of performing a process such as an operation in accordance with an instruction and storing the result in a desired register. The “memory access” is a process that exists only in an instruction for accessing a memory such as load or store. In the case of a load, data is read from a desired address and stored in a desired register.

【0021】図5は、以下に示すプログラムを実行した
ときの各工程の動作を示している。ここで、「命令A」
は、「LD (mem),R1」のロード命令であり、
メモリ上の(mem)番地にあるデータを読み込み、レ
ジスタR1へ格納する。「命令B」は、「ADD R
1,R2」の加算命令であり、レジスタR1とレジスタ
R2の内容を加算し、結果をレジスタR2へ格納する。
「命令C」は、「ADDR1,R3」の加算命令であ
り、レジスタR1とレジスタR3の内容を加算し、結果
をレジスタR3へ格納する。
FIG. 5 shows the operation of each step when the following program is executed. Here, "instruction A"
Is a load instruction of “LD (mem), R1”,
The data at the address (mem) on the memory is read and stored in the register R1. "Instruction B" is "ADD R
1, R2 ", which adds the contents of the registers R1 and R2 and stores the result in the register R2.
“Instruction C” is an addition instruction of “ADDR1, R3”, adds the contents of the registers R1 and R3, and stores the result in the register R3.

【0022】ここでは、「命令B」の扱うレジスタR1
の内容と、「命令C」の扱うレジスタR1の内容が異な
る。それは図5に示す通り、「命令A」によるレジスタ
R1の更新が、「命令B」では反映されないが、「命令
C」では反映されるためである。すなわち、「命令B」
では「命令A」実行以前のレジスタR1の内容を使用す
るのに対し、「命令C」では「命令A」で読み出した内
容、すなわちメモリ上の(mem)番地に格納している
内容を使用することになる。
Here, the register R1 handling the "instruction B"
And the contents of the register R1 handled by the “instruction C” are different. This is because, as shown in FIG. 5, the update of the register R1 by the "instruction A" is not reflected in the "instruction B", but is reflected in the "instruction C". That is, "instruction B"
Uses the contents of the register R1 before the execution of the "instruction A", whereas the "instruction C" uses the contents read out by the "instruction A", that is, the contents stored at the address (mem) in the memory. Will be.

【0023】これはCPUのアーキテクチャ上の特徴で
あり、プログラマはそのことを理解した上でプログラム
することになる。
This is an architectural feature of the CPU, and the programmer understands the fact before programming.

【0024】これをシングルステップ実行によりデバッ
グする場合を図6に示す。シングルステップ実行では、
各命令ごとに単独で実行されるため、「命令A」と「命
令B」の間にも図6に示すように数サイクルの無関係な
サイクルが存在する。すると、「命令B」の実行時に
は、「命令A」でレジスタR1の内容が更新されてい
る。したがって、本来の実行時と異なる内容について演
算することになり、デバッグの意味がない。
FIG. 6 shows a case where this is debugged by single step execution. In single step execution,
Since each instruction is executed independently, several extraneous cycles exist between "instruction A" and "instruction B" as shown in FIG. Then, when the "instruction B" is executed, the contents of the register R1 are updated by the "instruction A". Therefore, the operation is performed on the contents different from the original execution time, and there is no meaning in debugging.

【0025】そこで、このような問題(一般的にハザー
ドと呼ぶ)が発生する可能性のある場合、シングルステ
ップ実行はできない。この例の場合だと、「命令A」が
遅延命令に相当するため、「命令A」と「命令B」の間
にはシングルステップなどの割り込みを受け付けてはい
けない。
Therefore, when such a problem (generally called a hazard) may occur, single-step execution cannot be performed. In the case of this example, since “instruction A” corresponds to a delayed instruction, an interrupt such as a single step must not be accepted between “instruction A” and “instruction B”.

【0026】受付可能とするならば、上記の問題が起き
ないように、特殊なハードウェアを用いた処理で命令処
理途中のレジスタの内容を保持・復帰するなどの工夫が
必要となる。これらはすでに従来の技術として確立して
いる。
If it can be accepted, it is necessary to take measures such as holding and restoring the contents of the register during instruction processing by processing using special hardware so that the above problem does not occur. These have already been established as conventional techniques.

【0027】ところが、遅延命令の直後に割り込みを受
け付けると、必ず問題(ハザード)が発生するわけでは
ない。図5の例の場合、「命令B」がレジスタR1を使
用しない命令であった場合、「命令A」と「命令B」に
は関連性がなく、「命令A」と「命令B」間に割り込み
が入ってもハザードは発生しない。割り込みが入って、
ハザードが起きるかどうかは命令で指定するオペランド
(一般的にはレジスタの場合が多い)によって決まるた
め、プログラマがプログラムする段階で把握できるもの
である。
However, if an interrupt is accepted immediately after a delay instruction, a problem (hazard) does not necessarily occur. In the example of FIG. 5, if “instruction B” is an instruction that does not use the register R1, “instruction A” and “instruction B” are not related, and “instruction A” and “instruction B” are not related. Hazard does not occur even if an interrupt occurs. Interrupted,
Whether or not a hazard occurs is determined by the operand (generally a register in many cases) specified by the instruction, and can be grasped at the stage of programming by the programmer.

【0028】この発明は、上記した点を考慮してなされ
たものであり、この発明では、遅延命令直後に割り込み
を受け付けた場合、発生し得る問題に応じて2通りの展
開を用意する。
The present invention has been made in consideration of the above points. In the present invention, when an interrupt is accepted immediately after a delay instruction, two types of development are prepared according to a problem that can occur.

【0029】上記2通りのうちの第1は、遅延命令直後
に割り込みを受け付けるとCPUのコントロール上障害
となる場合である。これは、遅延命令が分岐命令などの
命令であり、特殊なハードウエアを抜きにしては、遅延
スロットの直前(遅延命令の直後)に割り込みできない
場合である。この場合に相当する遅延命令の直後には割
り込みを受け付けないように制御する。
The first of the above two cases is a case where an interruption is accepted immediately after the delay instruction, which causes an obstacle in the control of the CPU. This is a case where the delay instruction is an instruction such as a branch instruction, and it is impossible to interrupt immediately before the delay slot (immediately after the delay instruction) without special hardware. Control is performed so as not to accept an interrupt immediately after the delay instruction corresponding to this case.

【0030】上記2通りのうちの第2は、CPUのコン
トロールに影響のない場合である。すなわち、これはデ
ータハザードを起こす可能性のある命令を意味してい
る。この種の遅延命令でデータハザードとなる場合は、
通常命令そのものによるのではなく、データの格納され
たオペランドを前後の命令で指定するために発生するハ
ザードである。したがって、この発明においては、この
第2の場合においては、遅延命令といって一律に直後の
割り込みの受付を禁止する必要がないことに注目し、こ
の種の遅延命令では、オペランドの前後関係が確保され
ているならば、割り込みを受付可能とするモードを設け
る。このことで遅延命令のオペランドさえ注意深く配置
するなら、シングルステップを行っても問題となるハザ
ードが発生しないでデバッグ作業を実行できる。
The second of the above two cases is a case where the control of the CPU is not affected. That is, this means an instruction that may cause a data hazard. If this type of delayed instruction causes a data hazard,
This is a hazard that is caused not by the instruction itself but by designating the operand in which the data is stored by the preceding and following instructions. Therefore, in the present invention, it is noted that, in the second case, it is not necessary to uniformly inhibit the acceptance of the immediately succeeding interrupt as a delayed instruction. If it is secured, a mode is set to enable interrupts to be accepted. With this, if even the operands of the delayed instruction are carefully arranged, the debugging operation can be performed without causing a problematic hazard even when the single step is performed.

【0031】次に、この発明の具体的な処理につき図面
を参照して説明する。図1は、この発明の割り込み処理
方式を適用するブロックの概略図である。図において、
1は、命令を解読する命令デコーダ(DEC)であり、
2は、命令によって操作可能なフラグレジスタ(FLA
G)である。命令デコーダ1から遅延命令が出されると
信号ライン10に、遅延命令が検出された場合を示す信
号(LOC)が出力される。また、フラグレジスタ2か
らは信号ライン20にフラグレジスタ2のBフラグの内
容が出力される。このBフラグは割り込みが入るとハザ
ードが生じるとき、すなわち割り込みを無効する場合
に、フラグレジスタ2にBフラグをセットする。
Next, specific processing of the present invention will be described with reference to the drawings. FIG. 1 is a schematic diagram of a block to which the interrupt processing method of the present invention is applied. In the figure,
1 is an instruction decoder (DEC) for decoding an instruction,
2 is a flag register (FLA) operable by an instruction.
G). When the delay instruction is issued from the instruction decoder 1, a signal (LOC) indicating that the delay instruction is detected is output to the signal line 10. The flag register 2 outputs the content of the B flag of the flag register 2 to the signal line 20. This B flag sets the B flag in the flag register 2 when a hazard occurs when an interrupt occurs, that is, when the interrupt is invalidated.

【0032】信号ライン10及び20は論理積ゲート5
に接続され、LOC信号、Bフラグ信号は論理積ゲート
5与えられる。この論理積ゲート5は両信号に応じて、
出力信号ライン30に出力信号を出力する。論理積ゲー
ト5にLOC信号、Bフラグ信号が与えられると、割り
込み禁止信号(NSS)を生成し、出力する。
Signal lines 10 and 20 are AND gate 5
And the LOC signal and the B flag signal are supplied to the AND gate 5. This AND gate 5 responds to both signals,
An output signal is output to the output signal line 30. When the LOC signal and the B flag signal are given to the AND gate 5, an interrupt disable signal (NSS) is generated and output.

【0033】上記したように、この発明の第1の処理方
式では、命令デコーダ1により遅延命令が検出されてL
OC信号が出力され、かつ、フラグレジスタ2のBフラ
グがセット状態のときには、論理積ゲート5から割り込
み禁止信号(NSS)が生成され、直後の割り込みを無
効とする。
As described above, in the first processing method of the present invention, the instruction decoder 1 detects the delayed instruction and
When the OC signal is output and the B flag of the flag register 2 is in the set state, an interrupt disable signal (NSS) is generated from the AND gate 5, and the immediately following interrupt is invalidated.

【0034】また、命令デコーダ1により遅延命令が検
出されてLOC信号が出力され、かつ、フラグレジスタ
2のBフラグがリセット状態のときには、論理積ゲート
5からは割り込み禁止信号(NSS)が生成されず、直
後の割り込みを有効とする。
When the instruction decoder 1 detects a delay instruction and outputs a LOC signal and the B flag of the flag register 2 is in a reset state, the AND gate 5 generates an interrupt disable signal (NSS). And immediately enable the interrupt immediately after.

【0035】さらに、命令デコーダ1により遅延命令が
検出されず、かつ、フラグレジスタのBフラグがセット
状態のときにも、論理積ゲート5からは割り込み禁止信
号(NSS)が生成されず、直後の割り込みを有効とす
る。
Further, even when no delay instruction is detected by the instruction decoder 1 and the B flag of the flag register is set, no interrupt disable signal (NSS) is generated from the AND gate 5, and Enable interrupts.

【0036】また、命令デコーダ1により遅延命令が検
出されず、かつ、フラグレジスタ2のBフラグがリセッ
ト状態のときには、論理積ゲート5からは割り込み禁止
信号(30NSS)が生成されず、直後の割り込みを有
効とする。
When no delayed instruction is detected by the instruction decoder 1 and the B flag of the flag register 2 is in a reset state, the AND gate 5 does not generate an interrupt disable signal (30NSS), and Is valid.

【0037】このように、この発明の第1の処理方式で
は、プログラマは、フラグレジスタ2のBフラグの内容
を操作することで、遅延命令直後の割り込みの有効・無
効の選択できる。
As described above, in the first processing method of the present invention, the programmer can select the validity / invalidity of the interrupt immediately after the delay instruction by operating the contents of the B flag of the flag register 2.

【0038】図2は、この発明の第2の割り込み処理方
式を適用するブロックの概略図である。 なお、図1と
同じ構成については同じ符号を付す。
FIG. 2 is a schematic diagram of a block to which the second interrupt processing method of the present invention is applied. The same components as those in FIG. 1 are denoted by the same reference numerals.

【0039】命令デコーダ1が第1のタイプの遅延命令
を検出すると、信号ライン11に、第1のタイプの遅延
命令が検出された場合を示す信号(LOCA)が出力さ
れる。また、命令デコーダ1が第2のタイプの遅延命令
を検出すると、信号ライン12に、第2のタイプの遅延
命令が検出された場合を示す信号(LOCB)が出力さ
れる。
When the instruction decoder 1 detects a delay instruction of the first type, a signal (LOCA) indicating that the delay instruction of the first type is detected is output to the signal line 11. When the instruction decoder 1 detects the second type of delayed instruction, a signal (LOCB) indicating that the second type of delayed instruction is detected is output to the signal line 12.

【0040】また、フラグレジスタ(FLAG)2から
は信号ライン20にフラグレジスタ2のBフラグの内容
が出力される。このBフラグは割り込みが入るとハザー
ドが生じるときにフラグレジスタ2にBフラグがセット
されている。
The flag register (FLAG) 2 outputs the contents of the B flag of the flag register 2 to the signal line 20. The B flag is set in the flag register 2 when a hazard occurs when an interrupt occurs.

【0041】信号ライン12及び20は論理ゲート6に
接続され、LOCB信号、Bフラグ信号は論理積ゲート
6与えられる。この論理積ゲート6から両信号に応じた
中間信号が生成される。
The signal lines 12 and 20 are connected to the logic gate 6, and the LOCB signal and the B flag signal are given to the AND gate 6. From the AND gate 6, an intermediate signal corresponding to both signals is generated.

【0042】論理積ゲート6は、LOCB信号とBフラ
グが与えられたときに、直後の割り込みを無効にするた
めの中間信号を出力する。この信号が信号ライン13か
ら論理和ゲート7に与えられる。
When the LOCB signal and the B flag are given, the AND gate 6 outputs an intermediate signal for invalidating the interrupt immediately thereafter. This signal is supplied from the signal line 13 to the OR gate 7.

【0043】論理和ゲート7は、論理積ゲート6からの
中間信号または命令デコーダ1から与えらる第1のタイ
プの遅延命令を検出したLOCA信号により、割り込み
禁止信号(NSS)を生成し、出力信号ライン30に出
力する。
The OR gate 7 generates an interrupt disable signal (NSS) based on the intermediate signal from the AND gate 6 or the LOCA signal that has detected the first type of delay instruction given from the instruction decoder 1, and outputs it. Output to the signal line 30.

【0044】ここで、命令デコーダ1が検出する第1の
タイプの遅延命令とは、Bフラグの状態にかかわらず、
直後の割り込みを無効にする命令である。また、命令デ
コーダ1が検出する第2のタイプの遅延命令とは、Bフ
ラグの状態によって、直後の割り込みを有効・無効を選
択する命令である。
Here, the first type of delayed instruction detected by the instruction decoder 1 is irrespective of the state of the B flag.
This instruction disables the immediately following interrupt. The second type of delay instruction detected by the instruction decoder 1 is an instruction for selecting whether the next interrupt is valid or invalid according to the state of the B flag.

【0045】この発明の第2の処理方式では、命令デコ
ーダ1により第1のタイプの遅延命令が検出され、LO
CA信号が出力された場合、フラグレジスタ2のBフラ
グの状態に無関係に論理和ゲート7より割り込み禁止信
号(NSS)が生成され、直後の割り込みを無効とす
る。
In the second processing method according to the present invention, the instruction decoder 1 detects the first type of delayed instruction,
When the CA signal is output, the OR gate 7 generates an interrupt disable signal (NSS) regardless of the state of the B flag in the flag register 2, and invalidates the immediately following interrupt.

【0046】また、命令デコーダ1により第1のタイプ
の遅延命令が検出されない場合で、命令デコーダ1によ
り第2のタイプの遅延命令が検出され、LOCBが信号
ライン12に与えられ、かつ、フラグレジスタ2のBフ
ラグがセット状態のときには、論理和ゲート7から割り
込み禁止信号(NSS)が生成され、直後の割り込みを
無効とする。
In the case where the first type of delayed instruction is not detected by the instruction decoder 1, the second type of delayed instruction is detected by the instruction decoder 1, LOCB is given to the signal line 12, and the flag register When the B flag of No. 2 is in the set state, an interrupt prohibition signal (NSS) is generated from the OR gate 7, and the immediately following interrupt is invalidated.

【0047】さらに、命令デコーダ1により第1のタイ
プの遅延命令が検出されない場合で、命令デコーダ1に
より第2のタイプの遅延命令が検出され、LOCBが信
号ライン12に与えられ、かつ、フラグレジスタ2のB
フラグがリセット状態のときには、論理和ゲート7から
割り込み禁止信号(NSS)が生成されず、直後の割り
込みを有効とする。
Further, when the first type of delayed instruction is not detected by the instruction decoder 1, the second type of delayed instruction is detected by the instruction decoder 1, LOCB is supplied to the signal line 12, and the flag register 2 B
When the flag is in the reset state, the interrupt disabling signal (NSS) is not generated from the OR gate 7, and the immediately following interrupt is made valid.

【0048】また、命令デコーダ1により第1のタイプ
の遅延命令が検出されない場合で、命令デコーダ1によ
り第2のタイプの遅延命令が検出されず、かつ、フラグ
レジスタ2のBフラグがセット状態のときには、論理和
ゲート7から割り込み禁止信号(NSS)が生成され
ず、直後の割り込みを有効とする。
In the case where the first type of delayed instruction is not detected by the instruction decoder 1, the second type of delayed instruction is not detected by the instruction decoder 1 and the B flag of the flag register 2 is set to the set state. In some cases, the interrupt prohibition signal (NSS) is not generated from the OR gate 7, and the immediately following interrupt is valid.

【0049】また、命令デコーダ1により第1のタイプ
の遅延命令が検出されない場合で、命令デコーダ1によ
り第2のタイプの遅延命令が検出されず、かつ、フラグ
レジスタ2のBフラグがリセット状態のときには、論理
和ゲート7から割り込み禁止信号(NSS)が生成され
ず、直後の割り込みを有効とする。
When the first type of delayed instruction is not detected by the instruction decoder 1, the second type of delayed instruction is not detected by the instruction decoder 1, and the B flag of the flag register 2 is reset. In some cases, the interrupt prohibition signal (NSS) is not generated from the OR gate 7, and the immediately following interrupt is valid.

【0050】上記した第1の処理方式では、遅延命令直
後の割り込みを有効にする場合と、無効にする場合の両
方の実現手段を備えなければならず、ハードウエアコス
トが問題となる。コストが最重視されるシステムでは採
用は困難であるし、動作周波数の低下や消費電力の増大
などのマイナス面も考えられる。しかし、この第2の処
理方式では、Bフラグの状態によらず直後の割り込みを
無効とする第1のタイプの遅延命令とBフラグによって
直後の割り込みの有効・無効を切り替え可能な第2のタ
イプの遅延命令の2通りの遅延命令を用意する。そし
て、遅延直後の割り込みの実現にハードウエアの著しい
負担を強いるような遅延命令、たとえば遅延分岐命令の
ように分岐先アドレスと復帰アドレスが異なるため特殊
なレジスタを設けるなど、特殊な処理になるような命令
については、フラグ状態によらず直後の割り込み受付を
禁止する分類とし、ハードウエアコストがかからない遅
延命令は、フラグの状態によって直後の割り込みの有効
・無効を切り替えが可能とする分類とする。このように
構成することで、ハードウエアの増大を招くことなく、
従来シングルステップ実行できなかった命令の一部にお
いても、シングルステップ実行できるようになり、デバ
ッグのし易さを向上できる。
In the above-described first processing method, it is necessary to provide both means for enabling the interrupt immediately after the delayed instruction and for disabling the interrupt immediately after the delay instruction. It is difficult to adopt the system in which cost is of the utmost importance, and there may be negative aspects such as a decrease in operating frequency and an increase in power consumption. However, in the second processing method, the first type of delay instruction that disables the immediately following interrupt regardless of the state of the B flag and the second type that can switch the enable / disable of the immediately following interrupt by the B flag are used. Are prepared. Then, special processing such as providing a special register such as a delayed instruction which imposes a significant burden on hardware for realizing an interrupt immediately after the delay, for example, providing a special register because a branch destination address and a return address are different like a delayed branch instruction. Such instructions are classified as prohibiting the acceptance of the immediately following interrupt regardless of the flag state, and the delayed instructions that do not require hardware cost are classified as being capable of switching between valid and invalid interrupts depending on the state of the flag. With this configuration, without increasing the hardware,
Even a part of the instruction which cannot be executed in the single step can be executed in the single step, and the ease of debugging can be improved.

【0051】図3は、この発明の第3の割り込み処理方
式を適用するブロックの概略図である。図において、1
は、命令を解読する命令デコーダ(DEC)であり、3
は、プリデコーダ(PDEC)である。プリデコーダ
(PDEC)3は、命令デコーダ1で扱っている直後の
命令を取り扱うものである。すなわち、次のステージで
命令デコーダ1へ送られる命令を取り扱うものとする。
FIG. 3 is a schematic diagram of a block to which the third interrupt processing method of the present invention is applied. In the figure, 1
Is an instruction decoder (DEC) for decoding instructions, and 3
Is a predecoder (PDEC). The predecoder (PDEC) 3 handles an instruction immediately after being handled by the instruction decoder 1. That is, the instruction sent to the instruction decoder 1 is handled in the next stage.

【0052】命令デコーダ1は、第1のタイプの遅延命
令を検出すると、信号ライン11にLOCA信号を出力
し、第2のタイプの遅延命令を検出すると、信号ライン
12にLOCB信号を出力する。
The instruction decoder 1 outputs the LOCA signal to the signal line 11 when detecting the first type of delay instruction, and outputs the LOCB signal to the signal line 12 when detecting the second type of delay instruction.

【0053】プリデコーダ3は、第2のタイプの遅延命
令の直後に実行するとハザードを起こす可能性がある命
令を検出した結果を信号ライン21にINST信号を出
力する。
The predecoder 3 outputs an INST signal to the signal line 21 on the result of detecting an instruction which may cause a hazard if executed immediately after the second type of delayed instruction.

【0054】信号ライン12及び21は論理積ゲート6
1に接続され、論理積ゲート61にLOCB信号、IN
ST信号が与えられ、論理積ゲート61により、中間信
号を生成する。この中間信号は信号ライン14から論理
和ゲート7へ与えられる。この論理和ゲート7には命令
デコーダ1からのLOCA信号が与えられる。
The signal lines 12 and 21 are connected to the AND gate 6.
1 and the AND gate 61 outputs the LOCB signal, IN
An ST signal is applied, and an AND signal is generated by an AND gate 61. This intermediate signal is supplied from the signal line 14 to the OR gate 7. The OR gate 7 is supplied with the LOCA signal from the instruction decoder 1.

【0055】上記した中間信号は、LOCA信号と論理
和ゲート7により、割り込み禁止信号(NSS)を生成
し、出力信号ライン30に出力する。LOCB信号、I
NST信号、および論理積ゲート61は、第2の命令の
種類だけ組み合わせが必要となるため、複数となること
がある。この図3の例では、2個の例を示している。
The above-mentioned intermediate signal generates an interrupt prohibition signal (NSS) by the OR gate 7 and the OR gate 7 and outputs it to the output signal line 30. LOCB signal, I
The combination of the NST signal and the AND gate 61 is required only for the type of the second instruction, so that the number may be plural. In the example of FIG. 3, two examples are shown.

【0056】ここで、命令デコーダ1が検出する第1の
タイプの遅延命令とは、後続命令にかかわらず、直後の
割り込みを無効にする命令であり、命令デコーダ1が検
出する第2のタイプの遅延命令とは、後続命令の種類に
よって、直後の割り込みを有効・無効を切り替える命令
である。
Here, the first type of delayed instruction detected by the instruction decoder 1 is an instruction for invalidating the immediately following interrupt regardless of the succeeding instruction, and the second type of delayed instruction detected by the instruction decoder 1 is The delay instruction is an instruction for switching the next interrupt between valid and invalid according to the type of the subsequent instruction.

【0057】この第3の処理方式では、命令デコーダ1
により第1のタイプの遅延命令が検出された場合、後続
命令の種類に無関係に論理和ゲート7より割り込み禁止
信号(NSS)が生成され、直後の割り込みを無効とす
る。
In the third processing method, the instruction decoder 1
When the first type of delayed instruction is detected, the OR gate 7 generates an interrupt disable signal (NSS) regardless of the type of the subsequent instruction, and invalidates the immediately following interrupt.

【0058】また、命令デコーダ1により第1のタイプ
の遅延命令が検出されない場合で、命令デコーダ1によ
り第2のタイプの遅延命令が検出され、かつ、命令デコ
ーダ1で検出された命令の直後に割り込みがあると、ハ
ザードになる可能性のある後続命令がプリデコーダ3検
出されたときには、論理和ゲート7より割り込み禁止信
号(NSS)が生成され、直後の割り込みを無効とす
る。
In the case where the first type of delayed instruction is not detected by the instruction decoder 1, the second type of delayed instruction is detected by the instruction decoder 1 and immediately after the instruction detected by the instruction decoder 1. When there is an interrupt, when a pre-decoder 3 detects a subsequent instruction that may become a hazard, the OR gate 7 generates an interrupt disable signal (NSS), and invalidates the immediately following interrupt.

【0059】さらに、命令デコーダ1により第1のタイ
プの遅延命令が検出されない場合で、命令デコーダ1に
より第2のタイプの遅延命令が検出されないとき、論理
和ゲート7より割り込み禁止信号(NSS)が生成され
ず、直後の割り込みを有効とする。
Further, when the first type of delayed instruction is not detected by the instruction decoder 1 and the second type of delayed instruction is not detected by the instruction decoder 1, the OR gate 7 generates an interrupt disable signal (NSS). It is not generated and the immediately following interrupt is valid.

【0060】また、命令デコーダ1により第1のタイプ
の遅延命令が検出されない場合で、命令デコーダ1によ
り第2のタイプの遅延命令が検出され、かつ、命令デコ
ーダ1で検出された命令の直後に割り込みがあると、ハ
ザードになる可能性のある後続命令がプリデコーダ3で
検出されたないときには、論理和ゲート7より割り込み
禁止信号(NSS)が生成されず、直後の割り込みを有
効とする。
In the case where the first type of delayed instruction is not detected by the instruction decoder 1, the second type of delayed instruction is detected by the instruction decoder 1 and immediately after the instruction detected by the instruction decoder 1. When there is an interrupt, if a pre-decoder 3 does not detect a subsequent instruction that may cause a hazard, the OR gate 7 does not generate an interrupt disable signal (NSS), and the immediately following interrupt is valid.

【0061】上記のように構成することで、割り込みを
許可して良いのか否かの判断を自動的に行えるため、プ
ログラマに知識と手間を要求しない。また、ハザードが
発生する可能性のある場合と、ない場合が混在するよう
なプログラムであっても、一律に割り込み禁止にしなく
てもいいため、デバッグの精度が向上する。
With the above-described configuration, it is possible to automatically determine whether or not to permit an interrupt, so that the programmer does not require knowledge and trouble. Further, even in a program in which a hazard may occur and a program in which a hazard does not exist, interrupts do not need to be uniformly disabled, thereby improving the accuracy of debugging.

【0062】図4は、この発明の第4の割り込み処理方
式を適用するブロックの概略図である。図において、1
は、命令を解読する命令デコーダ(DEC)であり、3
は、プリデコーダ(PDEC)である。プリデコーダ
(PDEC)3は、命令デコーダ1で扱っている直後の
命令を取り扱うものである。すなわち、次のステージで
命令デコーダ1へ送られる命令を取り扱うものとする。
FIG. 4 is a schematic diagram of a block to which the fourth interrupt processing method of the present invention is applied. In the figure, 1
Is an instruction decoder (DEC) for decoding instructions, and 3
Is a predecoder (PDEC). The predecoder (PDEC) 3 handles an instruction immediately after being handled by the instruction decoder 1. That is, the instruction sent to the instruction decoder 1 is handled in the next stage.

【0063】命令デコーダ1は、第1のタイプの遅延命
令を検出すると、信号ライン11にLOCA信号を出力
し、第2のタイプの遅延命令を検出すると、信号ライン
12にLOCB信号を出力する。
The instruction decoder 1 outputs the LOCA signal to the signal line 11 when detecting the first type of delay instruction, and outputs the LOCB signal to the signal line 12 when detecting the second type of delay instruction.

【0064】さらに、命令デコーダ1は、第2のタイプ
の遅延命令の中で指定されるハザードを起こす可能性の
あるオペランド情報を検出すると、信号ライン22にO
PA信号を出力する。プリデコーダ3は、検出される後
続命令の命令の中で指定されるハザードを起こす可能性
のあるオペランド情報を検出すると、信号ライン23に
OPB信号を出力する。OPA信号とOPB信号は比較
器8に与えられる。このOPA信号とOPB信号が一致
していると、図5で示した例と同様に、遅延命令直後の
割り込みによってハザードが発生することを知る。そこ
で、比較器8でOPA信号とOPB信号が一致している
かどうかを検査し、その結果を信号ライン14に中間信
号として出力し、論理積ゲート62与える。この論理積
ゲート62には命令デコーダ1からのLOCB信号が与
えられる。
Further, when the instruction decoder 1 detects operand information which may cause a hazard specified in the delayed instruction of the second type, it outputs an O signal to the signal line 22.
Outputs a PA signal. The predecoder 3 outputs an OPB signal to the signal line 23 upon detecting operand information which may cause a hazard specified in the detected subsequent instruction. The OPA signal and the OPB signal are provided to the comparator 8. If the OPA signal and the OPB signal match, it is known that a hazard is generated by an interrupt immediately after the delay instruction, as in the example shown in FIG. Therefore, the comparator 8 checks whether the OPA signal and the OPB signal match, and outputs the result as an intermediate signal to the signal line 14 to give the AND gate 62. The AND gate 62 is supplied with the LOCB signal from the instruction decoder 1.

【0065】この論理積ゲート62によりLOCB信号
と中間信号との論理積により、中間信号を生成し、信号
ライン15から論理和ゲート7へ与える。この中間信号
は、命令デコーダ1からのLOCAと論理和ゲート7に
より、論理和がとられ、割り込み禁止信号(NSS)を
生成し、信号ライン30に出力する。
An AND signal is generated by the AND gate 62 by ANDing the LOCB signal and the intermediate signal, and supplied to the OR gate 7 from the signal line 15. This intermediate signal is ORed by the LOCA from the instruction decoder 1 and the OR gate 7 to generate an interrupt disable signal (NSS) and output it to the signal line 30.

【0066】この発明の第4の処理方式では、命令デコ
ーダ1により第1のタイプの遅延命令が検出された場
合、後続命令のオペランドに無関係に割り込み禁止信号
(NSS)が生成され、直後の割り込みを無効とする。
According to the fourth processing method of the present invention, when the instruction decoder 1 detects the first type of delayed instruction, an interrupt disable signal (NSS) is generated irrespective of the operand of the subsequent instruction, and the immediately following interrupt is generated. Is invalidated.

【0067】また、命令デコーダ1により第1のタイプ
の遅延命令が検出されない場合で、命令デコーダ1によ
り第2のタイプの遅延命令が検出され、かつ、命令デコ
ーダ1で検出された遅延命令のオペランド(OPA)
と、プレデコーダ3で検出された後続命令のオペランド
(OPB)が一致していたときには、割り込み禁止信号
(NSS)が生成され、直後の割り込みを無効とする。
When the first type of delayed instruction is not detected by the instruction decoder 1, the second type of delayed instruction is detected by the instruction decoder 1, and the operand of the delayed instruction detected by the instruction decoder 1 is detected. (OPA)
When the operand (OPB) of the subsequent instruction detected by the predecoder 3 matches, an interrupt disable signal (NSS) is generated, and the immediately following interrupt is invalidated.

【0068】さらに、命令デコーダ1により第1のタイ
プの遅延命令が検出されない場合で、命令デコーダ1に
より第2のタイプの遅延命令が検出されないとき、割り
込み禁止信号(NSS)が生成されず、直後の割り込み
を有効とする。
Further, when the first type of delayed instruction is not detected by the instruction decoder 1, and when the second type of delayed instruction is not detected by the instruction decoder 1, the interrupt disable signal (NSS) is not generated, and Enable interrupts.

【0069】また、命令デコーダ1により第1のタイプ
の遅延命令が検出されない場合で、命令デコーダ1によ
り第2のタイプの遅延命令が検出され、かつ、命令デコ
ーダ1で検出された遅延命令のオペランド(OPA)
と、プレデコーダ3で検出された後続命令のオペランド
(OPB)が一致していないときには、割り込み禁止信
号(NSS)が生成されず、直後の割り込みを有効とす
る。
In the case where the first type of delayed instruction is not detected by the instruction decoder 1, the second type of delayed instruction is detected by the instruction decoder 1, and the operand of the delayed instruction detected by the instruction decoder 1 is detected. (OPA)
When the operand (OPB) of the subsequent instruction detected by the predecoder 3 does not match, the interrupt disable signal (NSS) is not generated, and the immediately following interrupt is made valid.

【0070】上記した方法によれば、ハザードが発生す
る可能性をオペランドレベルで検査するため、ハザード
が発生する可能性のある遅延命令と後続命令の組み合わ
せにおいても、オペランドの不一致によりハザードが発
生せず、割り込みを禁止する必要がなくなる場合もある
ため、よりデバッグの精度が向上する
According to the above-described method, the possibility of occurrence of a hazard is checked at the operand level. Therefore, even in the case of a combination of a delayed instruction and a subsequent instruction that may cause a hazard, the occurrence of the hazard due to mismatch of operands is possible. In some cases, it may not be necessary to disable interrupts, which improves debugging accuracy.

【0071】[0071]

【発明の効果】以上説明したように、請求項1に記載の
発明によれば、遅延命令直後の割り込みを有効にするか
無効にするかを、命令により選択可能とすることで、プ
ログラマに選択権を与えることができる。プログラマは
都合に応じてどちらかの方法を選択できるので、プログ
ラマに有利な条件を常に用意できることになる。
As described above, according to the first aspect of the present invention, it is possible for the programmer to select whether to enable or disable the interrupt immediately after the delay instruction by the instruction. Rights can be given. Since the programmer can select either method at his convenience, it is always possible to prepare favorable conditions for the programmer.

【0072】請求項2に記載の発明によれば、遅延直後
の割り込みの実現にハードウエアの著しい負担を強いる
ような遅延命令については、フラグ状態によらず直後の
割り込み受付を禁止する分類とし、ハードウエアコスト
がかからない遅延命令は、フラグの状態によって直後の
割り込みの有効・無効を切り替えが可能とする分類とす
ることにより、ハードウエアの増大を招くことなく、従
来シングルステップ実行できなかった命令の一部におい
ても、シングルステップ実行できるようになり、デバッ
グのしやすさを向上できる。
According to the second aspect of the present invention, a delayed instruction that imposes a significant burden on hardware for realizing an interrupt immediately after a delay is classified into a category in which acceptance of an interrupt immediately after is prohibited regardless of a flag state. Delayed instructions that do not require hardware cost are classified according to the state of the flag so that the next interrupt can be enabled or disabled immediately. In some cases, single-step execution can be performed, and the ease of debugging can be improved.

【0073】また、請求項3に記載の発明によれば、割
り込みを許可して良いのか否かの判断を自動的に行える
ため、プログラマに知識と手間を要求しない。また、ハ
ザードが発生する可能性のある場合と、ない場合が混在
するようなプログラムであっても、一律に割り込み禁止
にしなくてもいいため、デバッグの精度が向上する。
According to the third aspect of the present invention, it is possible to automatically determine whether or not to permit an interrupt, so that the programmer does not require knowledge and trouble. Further, even in a program in which a hazard may occur and a program in which a hazard does not exist, interrupts do not need to be uniformly disabled, thereby improving the accuracy of debugging.

【0074】請求項4に記載の発明によれば、 請求項
3の効果に加え、ハザードが発生する可能性をオペラン
ドレベルで検査するため、ハザードが発生する可能性の
ある遅延命令と後続命令の組み合わせにおいても、オペ
ランドの不一致によりハザードが発生せず、割り込みを
禁止する必要がなくなる場合もあるため、よりデバッグ
の精度が向上する。
According to the fourth aspect of the present invention, in addition to the effect of the third aspect, the possibility of occurrence of a hazard is checked at the operand level. Even in the case of a combination, a hazard does not occur due to mismatch of operands, and there is a case where it is not necessary to prohibit an interrupt, so that debugging accuracy is further improved.

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

【図1】この発明の第1の割り込み処理方式を適用する
ブロックの概略図である。
FIG. 1 is a schematic diagram of a block to which a first interrupt processing method according to the present invention is applied;

【図2】この発明の第2の割り込み処理方式を適用する
ブロックの概略図である。
FIG. 2 is a schematic diagram of a block to which a second interrupt processing method according to the present invention is applied;

【図3】この発明の第3の割り込み処理方式を適用する
ブロックの概略図である。
FIG. 3 is a schematic diagram of a block to which a third interrupt processing method according to the present invention is applied;

【図4】この発明の第4の割り込み処理方式を適用する
ブロックの概略図である。
FIG. 4 is a schematic diagram of a block to which a fourth interrupt processing method according to the present invention is applied;

【図5】この発明の一実施形態に係わる遅延命令のパイ
プライン処理の動作タイミング図である。
FIG. 5 is an operation timing chart of pipeline processing of a delayed instruction according to the embodiment of the present invention;

【図6】シングルステップ実行によりデバッグする場合
の動作タイミング図である。
FIG. 6 is an operation timing diagram when debugging is performed by single-step execution.

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

1 命令デコーダ 2 フラグレジスタ 3 プレデコーダ 5 論理積ゲート 7 論理和ゲート 8 比較器 61 論理積ゲート 62 論理積ゲート DESCRIPTION OF SYMBOLS 1 Instruction decoder 2 Flag register 3 Predecoder 5 AND gate 7 OR gate 8 Comparator 61 AND gate 62 AND gate

───────────────────────────────────────────────────── フロントページの続き (72)発明者 片山 貴雄 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 (72)発明者 岩永 和彦 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 (72)発明者 高藤 浩資 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 Fターム(参考) 5B013 AA11 5B098 AA02 BB08  ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Takao Katayama 1-3-6 Nakamagome, Ota-ku, Tokyo Inside Ricoh Company (72) Inventor Kazuhiko Iwanaga 1-3-6 Nakamagome, Ota-ku, Tokyo Stock In Ricoh Company (72) Inventor Hiroshi Takato 1-3-6 Nakamagome, Ota-ku, Tokyo F-term in Ricoh Company (reference) 5B013 AA11 5B098 AA02 BB08

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 遅延スロットを持つ遅延命令をパイプラ
イン処理する情報処理装置において、命令によって設定
の可能な少なくとも一つのフラグレジスタを有し、フラ
グレジスタの状態により、遅延命令の直後の割り込みを
有効または無効に切り替えることを特徴とする情報処理
装置における割り込み処理方式。
An information processing apparatus for performing pipeline processing of a delay instruction having a delay slot has at least one flag register that can be set by the instruction, and enables an interrupt immediately after the delay instruction depending on a state of the flag register. Alternatively, an interrupt processing method in an information processing apparatus characterized by being switched to invalid.
【請求項2】 前記フラグレジスタの状態によらず直後
の割り込みを無効とする第1の遅延命令と、前記フラグ
レジスタに格納されたフラグによって直後の割り込みの
有効または無効を切り替え可能な第2の遅延命令と、を
備えることを特徴とする請求項1に記載の情報処理装置
における割り込み処理方式。
2. A first delay instruction for invalidating an immediately following interrupt irrespective of the state of the flag register, and a second delay instruction for enabling or disabling the immediately following interrupt by a flag stored in the flag register. 2. The interrupt processing method according to claim 1, further comprising: a delay instruction.
【請求項3】 遅延スロットを持つ遅延命令をパイプラ
イン処理する情報処理装置おいて、直後の割り込みを無
条件で無効とする第1の遅延命令と、遅延命令と遅延ス
ロットに配置された命令の組み合わせによって直後の割
り込みの有効または無効を切り替え可能な第2の遅延命
令と、を備えることを特徴とする情報処理装置における
割り込み処理方式。
3. An information processing apparatus for pipeline processing a delay instruction having a delay slot, wherein a first delay instruction that unconditionally invalidates an immediately following interrupt, a delay instruction and an instruction arranged in the delay slot And a second delay instruction capable of switching the validity or invalidity of the interrupt immediately after the combination.
【請求項4】 パイプラインステージで連続する2命令
のオペランドの一致を検査する比較器を持ち、前記比較
器の結果を反映して、前述の遅延命令と遅延スロットに
配置された命令の組み合わせによって、直後の割り込み
の有効または無効を切り替え可能であることを特徴とす
る請求項3に記載の情報処理装置における割り込み処理
方式。
4. A pipeline stage comprising a comparator for checking the coincidence of operands of two consecutive instructions in a pipeline stage, and reflecting a result of the comparator, by combining the above-mentioned delay instruction and an instruction arranged in a delay slot. 4. An interrupt processing method in an information processing apparatus according to claim 3, wherein an interrupt immediately after the interrupt is enabled or disabled.
JP26016299A 1999-09-14 1999-09-14 Interruption processing system for information processor Pending JP2001084149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26016299A JP2001084149A (en) 1999-09-14 1999-09-14 Interruption processing system for information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26016299A JP2001084149A (en) 1999-09-14 1999-09-14 Interruption processing system for information processor

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2007070751A Division JP4564025B2 (en) 2007-03-19 2007-03-19 Interrupt processing method in information processing apparatus

Publications (1)

Publication Number Publication Date
JP2001084149A true JP2001084149A (en) 2001-03-30

Family

ID=17344190

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26016299A Pending JP2001084149A (en) 1999-09-14 1999-09-14 Interruption processing system for information processor

Country Status (1)

Country Link
JP (1) JP2001084149A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1365176A3 (en) * 2002-05-23 2003-12-03 Aisin Seiki Kabushiki Kaisha Motor driving device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1365176A3 (en) * 2002-05-23 2003-12-03 Aisin Seiki Kabushiki Kaisha Motor driving device

Similar Documents

Publication Publication Date Title
US5461722A (en) Parallel processing apparatus suitable for executing in parallel a plurality of instructions including at least two branch instructions
US5961633A (en) Execution of data processing instructions
US6959367B2 (en) System having read-modify-write unit
JPH04275628A (en) Arithmetic processor
US20010005882A1 (en) Circuit and method for initiating exception routines using implicit exception checking
US6189093B1 (en) System for initiating exception routine in response to memory access exception by storing exception information and exception bit within architectured register
EP1770507A2 (en) Pipeline processing based on RISC architecture
US4677549A (en) Pipelined data processor system having increased processing speed
US7111152B1 (en) Computer system that operates in VLIW and superscalar modes and has selectable dependency control
US5586336A (en) Microcomputer capable of monitoring internal resources from external
US6990569B2 (en) Handling problematic events in a data processing apparatus
KR100241970B1 (en) Data processing apparatus for performing pipeline processing
JP2001084149A (en) Interruption processing system for information processor
JP4564025B2 (en) Interrupt processing method in information processing apparatus
JP2581565B2 (en) Data processing device that executes guarded instructions
JP2894438B2 (en) Pipeline processing equipment
JPH05216721A (en) Electronic computer
JP3414579B2 (en) Programmable controller
JP2000347931A (en) Cache memory and method for controlling cache memory
JPH0247725A (en) Data processor
JPH10283182A (en) Pipeline information processor
JPH02206836A (en) Data processor
JPH05313895A (en) Pipeline processor
JPH05143362A (en) Interruption processing system
JPH05108542A (en) Data processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040322

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060413

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060425

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060626

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060829

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061030

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070319

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070326

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20070914

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20090731

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20090908

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091204