JPH03201135A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH03201135A
JPH03201135A JP1340759A JP34075989A JPH03201135A JP H03201135 A JPH03201135 A JP H03201135A JP 1340759 A JP1340759 A JP 1340759A JP 34075989 A JP34075989 A JP 34075989A JP H03201135 A JPH03201135 A JP H03201135A
Authority
JP
Japan
Prior art keywords
circuit
operand
instruction
address
execution
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
JP1340759A
Other languages
Japanese (ja)
Inventor
Takahiro Watabe
隆弘 渡部
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP1340759A priority Critical patent/JPH03201135A/en
Publication of JPH03201135A publication Critical patent/JPH03201135A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To attain debugging in a state close to a real time operation by forming a circuit capable of generating an interruption based upon a brake point to an optional instruction on the outside of a processor. CONSTITUTION:When addresses in a prescribed range are outputted from an operand address calculating circuit 4, a decision circuit 7 outputs a coincidence signal to a control circuit 1, which stops the operation of an instruction execut ing circuit 5 at the time of completing the operation of the circuit 5. The circuit 1 monitors an operand signal outputted from an address circuit 6 from the external, and in the case of generating an interruption based upon the brake point, the circuit 6 is interrupted at the time of ending the access. When the generation of an interruption is unnecessary, the circuit 5 automatically starts the execution of the succeeding instruction at the time of ending the access of the circuit 6. Consequently, the debugging can be attained in the state close to the real time operation.

Description

【発明の詳細な説明】 産皇上生机里公立 本発明は、パイプライン制御を行なうマイクロプロセッ
サに関し、特にそのようなマイクロプロセッサにおける
プログラムのデバッグに有効な改良に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a microprocessor that performs pipeline control, and particularly to improvements that are effective in debugging programs in such a microprocessor.

従」凶1直 開発直後のプログラムは多数の誤りを内蔵するのが普通
であり、これを取り除く必要がある。この作業をデバッ
グという、プログラムをデバッグする技術として従来は
特開昭62−179033号公報に開示されたものがあ
る。
Programs that have just been directly developed usually contain many errors, which must be removed. This work is called debugging, and a technique for debugging a program is disclosed in Japanese Patent Application Laid-Open No. 179033/1983.

これはプログラムのデバッグを行なうために、プロセッ
サ内部にオペランドアクセスに関するブレークポイント
による割込みを生じるアドレスを格納するレジスタを設
け、ブレークポイントによる割込みをプロセッサ内部に
おいて発生させる手法である。
This is a method in which, in order to debug a program, a register is provided inside the processor to store an address that causes an interrupt due to a breakpoint related to operand access, and the interrupt due to the breakpoint is generated within the processor.

(°5 ところで開発されるプログラムが複雑化するとそれに伴
ってデバッグのためのブレークポイントの数も増やす必
要が生じるが、多くのブレークポイントを設定すると実
時間における動作と大きく異なった動作を行う可能性が
あり、有効なデバッグが行えないこともあるし、また、
近年のようにプロセッサに実装する機能が増大してくる
と、プロセッサ内部にブレークポイントによる割込みを
生じさせるためのレジスタを多く設けることが困難にな
るという課題がある。
(°5 By the way, as the program being developed becomes more complex, it becomes necessary to increase the number of breakpoints for debugging, but if you set many breakpoints, there is a possibility that the behavior will differ greatly from the behavior in real time.) , which may prevent effective debugging, and
As the number of functions implemented in processors increases in recent years, a problem arises in that it becomes difficult to provide a large number of registers for generating interrupts due to breakpoints inside the processor.

このような課題に対してプロセッサ外部にオペランドア
クセスに対するブレークポイントによる割込みを生じさ
せる回路を付加することが考えられるが、データ処理能
力を高めるためにパイプライン制御を行なっているマイ
クロプロセッサにおいては、オペランドの読出し又は書
き込みが命令の実行とは独立して行われているため、外
部回路から任意の命令に対してブレークポイントによる
割込みを生じさせることができないといった問題がある
To solve this problem, it may be possible to add a circuit outside the processor that generates an interrupt due to a breakpoint for operand access, but in a microprocessor that uses pipeline control to increase data processing capacity, operand Since reading or writing is performed independently of instruction execution, there is a problem in that it is not possible to cause an interrupt by a breakpoint to any instruction from an external circuit.

本発明は上記点に鑑み、パイプライン制御を行うマイク
ロプロセッサにおいて、任意の命令に対してブレークポ
イントによる割込みを発生させることのできる回路をプ
ロセッサ外部に構築することを可能とし、しかも実時間
動作に近い状況においてデパックを可能とすることを目
的としている。
In view of the above points, the present invention enables a microprocessor that performs pipeline control to construct a circuit outside the processor that can generate an interrupt using a breakpoint in response to an arbitrary instruction, and also enables real-time operation. The purpose is to enable depacking in similar situations.

!   ”るための 上記目的を達成するため、本発明はパイプライン制御を
行なうマイクロプロセッサであって、アクセスするオペ
ランドのアドレス計算を行なうアドレス演算手段と、オ
ペランドに対応する命令を実行する命令実行手段と、ア
ドレス演算手段から出力されたオペランドアドレスが所
定範囲のアドレスであるかどうか判定する判定手段と、
この判定結果によりオペランドアドレスが所定範囲のア
ドレスであった場合、そのオペランドをアクセスする命
令の実行が終了した時点で命令実行手段の動作を停止さ
せる停止手段と、前記命令によるオペランドアクセスが
終了したとき、前記命令実行手段の動作を再開させ次命
令の実行を開始する開始手段とを備えてなることを特徴
としている。
! In order to achieve the above-mentioned object, the present invention provides a microprocessor that performs pipeline control, which comprises address calculation means for calculating the address of an operand to be accessed, and instruction execution means for executing an instruction corresponding to the operand. , determination means for determining whether the operand address output from the address calculation means is an address within a predetermined range;
If the operand address is within a predetermined range as a result of this determination, stopping means stops the operation of the instruction execution means at the time when the execution of the instruction that accesses the operand is completed; and when the operand access by the instruction is completed. and starting means for restarting the operation of the instruction execution means and starting execution of the next instruction.

生−一一且 上記構成によれば、オペランドアドレスが所定範囲のア
ドレスであった場合、そのオペランドアドレスに対応す
る命令の実行が終了した時点で命令実行手段の動作を停
止させ、次の命令の処理を行わないで待機する。このと
き既に処理した命令に関するオペランドアクセスが続行
されているので、外部においてそれを監視し、ブレーク
ポイントによる割込みを生じさせるオペランドに対して
アクセスが行われた際には外部割込要求を行なうことに
よりオペランドをアクセスする命令の終了時点での割込
の発生を可能とする。一方、ブレークポイントによる割
込みを生じさせる必要のないオペランドに対するアクセ
スの場合には、外部割込みを行わないことにより、オペ
ランドアクセスが終了した時点で自動的に命令実行手段
が動作を再開し、次命令の処理を実行する。
According to the above configuration, when the operand address is within a predetermined range, the operation of the instruction execution means is stopped when the execution of the instruction corresponding to the operand address is completed, and the operation of the next instruction is stopped. Wait without processing. At this time, operand accesses related to instructions that have already been processed are continuing, so this can be monitored externally and an external interrupt request can be made when an access is made to an operand that causes an interrupt due to a breakpoint. It is possible to generate an interrupt at the end of an instruction that accesses an operand. On the other hand, in the case of an access to an operand that does not require an interrupt due to a breakpoint, by not issuing an external interrupt, the instruction execution means automatically resumes operation when the operand access is completed, and the next instruction is executed. Execute processing.

裏−一胤−−班 第1図は本発明の一実施例におけるマイクロプロセッサ
の構成を示すものである。第1図において、lはパイプ
ラインの制御を行なうパイプライン制御回路、2はイン
ストラクション(オペレーションコ;ドとオペランドか
ら戒っている。〉のフェッチを行なうインストラクショ
ンフェッチ回路、3は前記インストラクションフェッチ
回路2においてフェッチされたインストラクションのデ
コードを行なうデコード回路、4はデコード回路4にお
いてインストラクションをデコードした結果に基づいて
アクセスするオペランドのアト、レスを計算するオペラ
ンドアドレス計算回路、5はデコード回路4においてイ
ンストラクションをデコードした結果に基づいて命令を
実行する命令実行回路、6は命令実行回路5の実行結果
を図外のメモリに格納するオペランドライト回路、7は
前記アドレス計算回路4から出力されるオペランドアド
レスがブレークポイントを設定することを希望する範囲
(所定範囲)のアドレスであるかどうか判定する判定手
段、101103.105.107.109は前記各回
路での処理が終了し各回路が空いている事をパイプライ
ン制御回路1に通知するステージ状態信号、102.1
04.106.108.110はパイプライン制御回路
1が前記各回路に対して次命令の実行を停止させるため
のホールド信号、200はストア要求信号である。
Figure 1 shows the configuration of a microprocessor in an embodiment of the present invention. In FIG. 1, 1 is a pipeline control circuit that controls the pipeline, 2 is an instruction fetch circuit that fetches instructions (from operation codes and operands), and 3 is an instruction fetch circuit 2. 4 is a decoding circuit that decodes the instruction fetched in the decoding circuit 4; 4 is an operand address calculation circuit that calculates the address and address of the operand to be accessed based on the result of decoding the instruction in the decoding circuit 4; 5 is an operand address calculation circuit that decodes the instruction in the decoding circuit 4; 6, an operand write circuit that stores the execution result of the instruction execution circuit 5 in a memory (not shown); 7, the operand address output from the address calculation circuit 4 is a break point. 101103.105.107.109 is a pipeline that determines whether the address is within the desired range (predetermined range) to be set. Stage status signal to notify control circuit 1, 102.1
04.106.108.110 is a hold signal used by the pipeline control circuit 1 to stop each circuit from executing the next instruction, and 200 is a store request signal.

前記判定手段7は基準アドレスを格納したレジスタ(以
下、ARという)11と、マスク情報を格納したレジス
タ(以下、MRという)12と、マスク回路13と、比
較回路14とからなる。ARllはブレークポイントを
設定することを希望する範囲の基準となるアドレスを格
納する。例えば、オペランドアドレスが5ビツトで表わ
され、ブレークポイントを設定することを希望する範囲
がオペランドアドレスのr10000J〜「10111
」の範囲であったとすると、ARに格納する基準アドレ
スはrlooooJとされる。
The determination means 7 includes a register (hereinafter referred to as AR) 11 that stores a reference address, a register (hereinafter referred to as MR) 12 that stores mask information, a mask circuit 13, and a comparison circuit 14. ARll stores the reference address of the range in which it is desired to set a breakpoint. For example, if the operand address is represented by 5 bits, the range in which you want to set a breakpoint is from r10000J to "10111" of the operand address.
”, the reference address to be stored in the AR is rlooooJ.

一方、MR12に格納されるマスク情報はオペランドア
ドレスの下位3ビツトをマスクするための情報としてr
llooOJが用いられる。マスク回路13は、オペラ
ンドアドレス計算回路4から出力されるオペランドアド
レスと前記MR12から出力されるマスク情報とを各ビ
ット毎に論理積をとる回路であり、マスク情報が上記の
ように上位2ビツトのみrlJの場合は、マスク回路1
3からはオペランドアドレスの上位2ビツトのみそのま
ま出力される。比較回路14はARIIの格納する基準
アドレスとマスク回路13の出力データとを比較し、両
者が一致すれば一致信号を発する。上記例の場合、基準
アドレスがrloo。
On the other hand, the mask information stored in MR12 is r as information for masking the lower 3 bits of the operand address.
llooOJ is used. The mask circuit 13 is a circuit that performs a logical product for each bit of the operand address output from the operand address calculation circuit 4 and the mask information output from the MR 12, and the mask information consists of only the upper two bits as described above. In the case of rlJ, mask circuit 1
From 3 onwards, only the upper 2 bits of the operand address are output as they are. The comparison circuit 14 compares the reference address stored in the ARII with the output data of the mask circuit 13, and if the two match, generates a match signal. In the above example, the reference address is rloo.

O」であるので、マスク回路13から同じデータが出力
されたとき、比較回路14が一致信号を発する。ここで
、マスク回路13がrl 0000Jの出力を発するの
はオペランドアドレスが「10000」〜r10111
Jの間であり、その間は一致信号が発されることになる
Therefore, when the same data is output from the mask circuit 13, the comparison circuit 14 issues a match signal. Here, the mask circuit 13 outputs rl 0000J because the operand address is "10000" to r10111.
J, during which a match signal will be issued.

15は前記−敗信号を有効にすることを指示するイネー
ブルピント(以下、Eビットという)を保持するレジス
タ(以下、CRという)である。
Reference numeral 15 denotes a register (hereinafter referred to as CR) that holds an enable pin (hereinafter referred to as E bit) that instructs to enable the -defeat signal.

第2図は上記マイクロプロセッサにおいてCR15のイ
ネーブルビットをOにした場合の動作、或いはイネーブ
ルビットが1であってもオペランドアドレスが所定範囲
外のアドレスで判定手段から一致信号が出力されない場
合の動作を示しており、これは判定手段7をもたない一
般的なマイクロプロセッサのパイプライン制御動作に等
しい。
Figure 2 shows the operation when the enable bit of CR15 is set to O in the above microprocessor, or the operation when the operand address is outside the predetermined range and no match signal is output from the determining means even if the enable bit is 1. This is equivalent to the pipeline control operation of a general microprocessor without the determining means 7.

第2図においてIFはインストラクションフェッチステ
ージを、DECはデコードステージを、OAはオペラン
ドアドレス計算ステージを、EXloFは命令実行ステ
ージとオペランドのフェッチステージを、OWはオペラ
ンドのライトステージを、N−N+3は処理される各イ
ンストラクション(命令)をあられす。IF、DEC,
OA、EXloF、OWの各ステージは、第1図におい
てそれぞれインストラクションフェッチ回路2、デコー
ド回路3、オペランドアドレス計算回路4、命令実行回
路5、オペランドライト回路6が行う処理に対応する。
In Figure 2, IF is the instruction fetch stage, DEC is the decode stage, OA is the operand address calculation stage, EXloF is the instruction execution stage and operand fetch stage, OW is the operand write stage, and N-N+3 is the processing stage. Hail each instruction that is given. IF, DEC,
The OA, EXloF, and OW stages correspond to the processing performed by the instruction fetch circuit 2, decode circuit 3, operand address calculation circuit 4, instruction execution circuit 5, and operand write circuit 6, respectively, in FIG.

尚、本実施例においてはオペランドのフェッチと命令の
実行はEX10Fステージにおいて排他的に行われてい
る。
In this embodiment, fetching of operands and execution of instructions are carried out exclusively in the EX10F stage.

第2図に基づいてパイプライン制御動作を説明する。先
ず、インストラフシタフェッチステージIFにおいてイ
ンストラクションがフェッチされると、そのインストラ
クションはデコードステージDECに送られデコードさ
れる。デコードステージDECはデコード結果に基づき
オペランドアドレス計算回路4、命令実行回路5、オペ
ランドライト回路6を制御する。即ち、オペランドアド
レス計算ステージOAにおいてオペランドアドレスが計
算され、そのアドレスによりオペランドのフェッチがな
され、フェッチされたオペランドは命令実行ステージE
Xにて処理される。実行結果をメモリに書き込む場合は
、実行結果がオペランドライトステージOWに送られ図
外メモリへの書き込みが実行される。
The pipeline control operation will be explained based on FIG. First, when an instruction is fetched at the instruction fetch stage IF, the instruction is sent to the decode stage DEC and decoded. The decode stage DEC controls the operand address calculation circuit 4, instruction execution circuit 5, and operand write circuit 6 based on the decode result. That is, the operand address is calculated in the operand address calculation stage OA, the operand is fetched based on the address, and the fetched operand is sent to the instruction execution stage E.
Processed in X. When writing the execution result to the memory, the execution result is sent to the operand write stage OW, and writing to the non-illustrated memory is executed.

上記各ステージがインストラクションNに基づく処理を
終えて、次ステージへ送出すると、すぐ次のインストラ
クションN+1に基づく処理を開始する。こうして、各
サイクルにおいてステージ毎に夫々別のインストラクシ
ョンに基づく処理を行うこととなり、高速でデータ処理
が可能となる。
When each stage finishes processing based on instruction N and sends it to the next stage, it immediately starts processing based on the next instruction N+1. In this way, processing based on different instructions is performed for each stage in each cycle, making it possible to process data at high speed.

ところで、上記説明はパイプライン制御の一般的な動作
であるが、ここでCR15のイネーブルビットが1にな
っており、しかもオペランドアドレス計算回路4から所
定範囲のオペランドアドレスが出力された場合には、上
記と異なり判定手段7から一致信号114がパイプライ
ン制御回路1へ与えられるので、オペランドアクセスが
終了するまでオペランドアクセスを行なった命令の次命
令の実行を待たせることになる。
By the way, the above explanation is a general operation of pipeline control, but if the enable bit of CR15 is set to 1 and an operand address within a predetermined range is output from the operand address calculation circuit 4, Unlike the above, since the match signal 114 is applied from the determining means 7 to the pipeline control circuit 1, execution of the next instruction after the instruction that has accessed the operand is made to wait until the operand access is completed.

次にこの動作を詳述する。先ず、パイプライン制御回路
1はデコード回路3より命令実行回路5において処理さ
れる命令の処理結果のストアがあることをインストラフ
シランデコード時にストア要求信号200により受は取
っており、その情報を前記命令が命令実行回路5に到達
するまで保持している。そして、この情報と共に、CR
15のイネーブルビットと判定手段7からの一致信号1
14とを受は取ると、パイプライン制御回路はホールド
信号108を有効にする。命令実行回路5はこのホール
ド信号108によって次の命令の実行を停止する。この
停止はオペランドライト回路6が図外メモリにオペラン
ドの書き込みを終了し、オペランドライト回路6がエン
プティになってステージ状態信号109が無効から有効
に転じるまで続く。このとき、オペランドライト回路6
から出力されるオペランド信号をマイクロプロセッサ外
部から監視し、ブレークポイントによる割込みを生じさ
せる場合は、マイクロプロセッサに外部割込要求を行う
ことによって、マイクロプロセッサの処理をオペランド
ライト回路6のオペランドアクセスが完了した時点で中
断させる。
Next, this operation will be explained in detail. First, the pipeline control circuit 1 receives information from the decode circuit 3 through the store request signal 200 at the time of intra-frame decoding that there is a store of the processing result of the instruction processed in the instruction execution circuit 5, and the pipeline control circuit 1 receives this information from the store request signal 200. The instruction is held until it reaches the instruction execution circuit 5. And with this information, CR
15 enable bit and match signal 1 from determination means 7
14, the pipeline control circuit enables the hold signal 108. The instruction execution circuit 5 stops executing the next instruction in response to this hold signal 108. This stop continues until the operand write circuit 6 finishes writing the operand to the memory not shown, the operand write circuit 6 becomes empty, and the stage state signal 109 changes from invalid to valid. At this time, the operand write circuit 6
If the operand signal output from the microprocessor is monitored from outside the microprocessor and an interrupt is generated by a breakpoint, an external interrupt request is made to the microprocessor, and the operand access of the operand write circuit 6 is completed. Interrupt at that point.

一方、ブレークポイントによる割込みを生じさせない場
合は、オペランドライト回路6が前記オペランドの書き
込みを完了しステージ状態信号109が有効となること
によって、命令実行回路5が次命令の実行を開始する。
On the other hand, if no interrupt is caused by a breakpoint, the operand write circuit 6 completes writing the operand and the stage state signal 109 becomes valid, so that the instruction execution circuit 5 starts executing the next instruction.

第3図に上記動作例のタイミングチャートを示す。FIG. 3 shows a timing chart of the above operation example.

第3図においてt1〜t7はマシンサイクルを、N−N
+4は処理される各インストラクションをあられす、イ
ンストラクションNにおけるOAXステージおいて計算
されたオペランドアドレスがサイクルt3において出力
され、そのアドレスがMR12の内容に従ってマスクさ
れ、このマスク結果とARIIの内容と比較され、一致
結果114がサイクルt4において出力される。CR1
5のイネーブルビットがセントされているため、サイク
ルt5においてEXステージのホールド信号10Bが出
力され、t4においてインストラクションNに基づく命
令の処理を実行したEXステージの処理はOWステージ
が終了するまでインストラクションN+1に基づく命令
(以下、N+1命令という)の実行を停止され、N+1
命令はOAXステージおいてホールドされる。サイクル
t6においてOWステージが空になったことを示すステ
ージ状Li信号109が有効となることによって、EX
ステージのホールド信号10Bが無効となるサイクルt
7よりN+1命令に対する処理がEXステージにおいて
開始する。サイクルt5〜t6においてN+1命令の実
行が待たされいる間に、オペランドライトが行われる。
In FIG. 3, t1 to t7 are machine cycles, N-N
The operand address calculated in the OAX stage in instruction N is output in cycle t3, the address is masked according to the contents of MR12, and this mask result is compared with the contents of ARII. , a matching result 114 is output in cycle t4. CR1
5 is set, the EX stage hold signal 10B is output in cycle t5, and the EX stage processing that executed the instruction based on instruction N in t4 continues to instruction N+1 until the OW stage ends. The execution of the instruction based on the instruction (hereinafter referred to as the N+1 instruction) is stopped, and the N+1
Instructions are held at the OAX stage. In cycle t6, the staged Li signal 109 indicating that the OW stage is empty becomes valid, so that EX
Cycle t when the stage hold signal 10B becomes invalid
7, processing for the N+1 instruction starts at the EX stage. Operand write is performed while the execution of the N+1 instruction is awaited in cycles t5 to t6.

この時、マイクロプロセッサの外部においてブレークポ
イントによる割込みを生じさせるかどうかを判断し、ブ
レークポイントによる割込みを生じさせる場合はサイク
ルt6までにマイクロプロセッサに対し外部割込み要求
を行なうことによって、マイクロプロセッサは該オペラ
ンドライトが完了した時点において命令の処理を中断す
る。
At this time, it is determined whether or not to cause an interrupt due to the breakpoint external to the microprocessor, and if an interrupt due to the breakpoint is generated, an external interrupt request is made to the microprocessor by cycle t6, so that the microprocessor Instruction processing is interrupted when the operand write is completed.

以上のように本構成のマイクロプロセッサによれば、所
定のアドレスの範囲内に対するオペランドアクセスが終
了するまで次命令の実行を待たせることが可能となり、
所定のオペランドに対してアクセスを行った命令の実行
が終了するまでに外部割込み要求を行なう事ができる。
As described above, according to the microprocessor with this configuration, it is possible to make the execution of the next instruction wait until operand access within a predetermined address range is completed.
An external interrupt request can be made until the execution of the instruction that accesses a predetermined operand is completed.

従って、プロセッサ外部にブレークポイントによる割込
みを発生する回路を構築することが可能であり、また、
マイクロプロセンサ内部と異なりサイズの制限を受ける
ことなく多くのブレークポイントによる割込みを発生す
る回路を実現できる。
Therefore, it is possible to construct a circuit that generates interrupts due to breakpoints outside the processor, and
Unlike inside a microprocessor sensor, it is possible to realize a circuit that generates interrupts due to many breakpoints without being limited by size.

又、常時オペランドアクセスが終了するまでオペランド
アクセスを行った命令の次命令の実行が開始出来なけれ
ば、実時間における動作と大きく異なった動作を行なう
可7能性があり、有効なデバッグを行えない可能性があ
るが、本実施例では指定範囲外のオペランドアクセスを
行った場合には、オペランドアクセスの終了を待つこと
なく次命令を開始することができ、実時間動作に近い状
況においてデバッグが可能となる。
Furthermore, if the execution of the instruction following the instruction that accessed the operand cannot be started until the operand access is finished, there is a possibility that the operation will be very different from the operation in real time, and effective debugging will not be possible. However, in this example, if an operand access outside the specified range is performed, the next instruction can be started without waiting for the end of the operand access, and debugging can be performed in a situation close to real-time operation. becomes.

なお、実施例において命令実行回路が停止する条件をオ
ペランドライト時だけに限定したが、オペランドライト
を行なう命令の次命令、或いはオペランドライトまたは
、オペランドフェッチの何れかを行なう命令の次命令の
実行を停止するようにしてもよい。
Note that in the embodiment, the conditions for the instruction execution circuit to stop are limited to only when an operand is written, but it is also possible to execute the instruction following the instruction that performs an operand write, or the instruction that follows the instruction that performs either an operand write or an operand fetch. It may be stopped.

発咀生並来 以上説明したように、本発明によれば、判定手段により
所定範囲内のオペランドアクセスである 4゜ことを検
出し、オペランドをアクセスする命令の次の命令の実行
をオペランドアクセスが終了するまで待たせるものであ
るから、プロセッサ外部においてオペランドアクセスを
監視して、ブレークポイントによる割込みを生じさせる
オペランドに対するアクセスが行われた際に外部割込要
求を行ってオペランドをアクセスする命令の終了時点で
処理を中断することができる。このため、マイクロプロ
セッサ内部にブレークポイントによる割込みを発生させ
るレジスタを設けるという従来手段に比べてより多くの
オペランドアクセスに対してブレークポイントによる割
込みを外部回路において発生できるという効果がある。
As described above, according to the present invention, the determination means detects that the operand access is within a predetermined range, and the operand access is executed after the instruction that accesses the operand. Since the instruction must wait until the instruction completes, the operand access is monitored outside the processor, and when the operand that causes an interrupt by a breakpoint is accessed, an external interrupt request is made and the instruction that accesses the operand is completed. Processing can be interrupted at any point. Therefore, compared to conventional means in which a register for generating breakpoint interrupts is provided inside a microprocessor, breakpoint interrupts can be generated in an external circuit for more operand accesses.

加えて、命令の実行を停止させる範囲を所定の範囲に制
限しているので、パイプライン制御の流れを大きく乱す
ことなく、実時間動作に近い状態でのプログラムのデバ
ッグを行なうことができ、プログラム開発における効率
の向上に貢献し、その実用的効果は頗る大である。
In addition, since the range in which instruction execution is stopped is limited to a predetermined range, programs can be debugged in conditions close to real-time operation without significantly disrupting the pipeline control flow. It contributes to improving efficiency in development, and its practical effects are significant.

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

第1図は本発明における一実施例のマイクロプロセッサ
の構成国、第2図は同実施例の基本パイプライン動作を
示すタイミング図、第3図は同実施例においてブレーク
ポイントによる割込みが発生した場合の動作例を示すタ
イミング図である。 第1図 1・・・パイプライン制御回路、2・・・インストラク
ションフェッチ回路、3・・・デコード回路、4・・・
オペランドアドレス計算回路、5・・・命令実行回路、
6・・・オペランドアドレス回路、7・・・判定手段、
ll・・・AR,12・・・MR,13・・・マスク回
路、14・・・比較回路、15・・・CR
Fig. 1 shows the constituent countries of a microprocessor according to an embodiment of the present invention, Fig. 2 is a timing diagram showing the basic pipeline operation of the embodiment, and Fig. 3 shows a case where an interrupt occurs due to a breakpoint in the embodiment. FIG. 3 is a timing diagram showing an example of the operation of FIG. Fig. 1 1... Pipeline control circuit, 2... Instruction fetch circuit, 3... Decoding circuit, 4...
Operand address calculation circuit, 5... instruction execution circuit,
6... Operand address circuit, 7... Judgment means,
ll...AR, 12...MR, 13...mask circuit, 14...comparison circuit, 15...CR

Claims (1)

【特許請求の範囲】[Claims] (1)パイプライン制御を行なうマイクロプロセッサで
あって、 アクセスするオペランドのアドレス計算を行なうアドレ
ス演算手段と、 オペランドに対応する命令を実行する命令実行手段と、 アドレス演算手段から出力されたオペランドアドレスが
所定範囲のアドレスであるかどうか判定する判定手段と
、 この判定結果によりオペランドアドレスが所定範囲のア
ドレスであった場合、そのオペランドをアクセスする命
令の実行が終了した時点で命令実行手段の動作を停止さ
せる停止手段と、 前記命令によるオペランドアクセスが終了したとき、前
記命令実行手段の動作を再開させ次命令の実行を開始す
る開始手段と、 を備えてなるマイクロプロセッサ。
(1) A microprocessor that performs pipeline control, which includes address calculation means for calculating the address of an operand to be accessed, instruction execution means for executing an instruction corresponding to the operand, and operand address output from the address calculation means. determination means for determining whether the address is within a predetermined range; and if the result of this determination indicates that the operand address is within the predetermined range, the operation of the instruction execution means is stopped upon completion of execution of the instruction that accesses the operand; and starting means for restarting the operation of the instruction execution means and starting execution of the next instruction when operand access by the instruction is completed.
JP1340759A 1989-12-28 1989-12-28 Microprocessor Pending JPH03201135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1340759A JPH03201135A (en) 1989-12-28 1989-12-28 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1340759A JPH03201135A (en) 1989-12-28 1989-12-28 Microprocessor

Publications (1)

Publication Number Publication Date
JPH03201135A true JPH03201135A (en) 1991-09-03

Family

ID=18340039

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1340759A Pending JPH03201135A (en) 1989-12-28 1989-12-28 Microprocessor

Country Status (1)

Country Link
JP (1) JPH03201135A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05204709A (en) * 1992-01-24 1993-08-13 Mitsubishi Electric Corp Processor
US8297120B2 (en) 2007-08-31 2012-10-30 Rohm Co., Ltd. Angular velocity signal detection circuit and angular velocity signal detection method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05204709A (en) * 1992-01-24 1993-08-13 Mitsubishi Electric Corp Processor
US8297120B2 (en) 2007-08-31 2012-10-30 Rohm Co., Ltd. Angular velocity signal detection circuit and angular velocity signal detection method

Similar Documents

Publication Publication Date Title
US5537559A (en) Exception handling circuit and method
JPH0215369A (en) Method and apparatus for executing instruction of vector processing system
US4731736A (en) Method and apparatus for coordinating execution of an instruction by a selected coprocessor
US4750110A (en) Method and apparatus for executing an instruction contingent upon a condition present in another data processor
JP2734468B2 (en) Processor
JPH1021074A (en) Interrupt control system, processor and computer system
US4758950A (en) Method and apparatus for selectively delaying an interrupt of a coprocessor
US4914578A (en) Method and apparatus for interrupting a coprocessor
US4821231A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
JPH0728670A (en) Information processor
JPH0810437B2 (en) Guest execution control method for virtual machine system
CN120705018A (en) A debugging method for eBPF processor
JPH03201135A (en) Microprocessor
JPH04350732A (en) Microprocessor
JP2710994B2 (en) Data processing device
US4758978A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
US5787276A (en) Microprocessor including circuit for generating signal used for tracing executed instruction stream
JP2808757B2 (en) Microprocessor for debugging
JP3762608B2 (en) Computer and its control method
JPH0250259A (en) Method and apparatus for handling exception of non-synchronous memory control with vector processor
JP5012562B2 (en) Microcomputer
JPS60124746A (en) data processing equipment
JP2572821B2 (en) Operation processing method by instruction re-execution
US4811274A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
JPH0248739A (en) Micro processor for debugging