JP2001184231A - Program development supporting device and method of controlling the same - Google Patents
Program development supporting device and method of controlling the sameInfo
- Publication number
- JP2001184231A JP2001184231A JP37130199A JP37130199A JP2001184231A JP 2001184231 A JP2001184231 A JP 2001184231A JP 37130199 A JP37130199 A JP 37130199A JP 37130199 A JP37130199 A JP 37130199A JP 2001184231 A JP2001184231 A JP 2001184231A
- Authority
- JP
- Japan
- Prior art keywords
- address
- jump
- output
- branch
- signal
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Advance Control (AREA)
- Executing Machine-Instructions (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、プログラム開発支
援装置とその制御方法に係わり、特に、プログラム開発
の際、デバッグ用のプログラム開発支援装置とその制御
方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program development support apparatus and a control method therefor, and more particularly to a program development support apparatus for debugging in program development and a control method therefor.
【0002】[0002]
【従来の技術】近年、コンピュータ装置に内蔵するプロ
グラムの複雑化、大規模化、リアルタイム性の増加、コ
ンパイラの多様化等で、プログラムの動作確認が多岐に
わたるため、プログラム開発支援装置の機能も多機能化
してきている。2. Description of the Related Art In recent years, the operation of a program development support device has been diversified due to the complexity, increase in scale, increase in real-time performance, diversification of compilers, etc., of a program incorporated in a computer device, and thus the function of a program development support device has been increased. It is becoming functional.
【0003】多機能なプログラム開発支援装置は、CP
U内部に、プログラム解析に必要な回路を付加すること
で実現しているが、CPU内部に付加回路を接続するこ
とは、内部回路に配線容量、ゲート容量が付くことにな
り、このため、CPUからの信号ディレイやプログラム
開発支援装置の制御回路自体のディレイのため、CPU
内部回路の信号を用いた付加回路を、更に追加すること
は困難になってきている。A multifunctional program development support device is a CP
This is realized by adding a circuit necessary for program analysis inside the U. Connecting an additional circuit inside the CPU means that the internal circuit has a wiring capacity and a gate capacity. CPU delay due to signal delay from the controller and the control circuit itself of the program development support device
It has become difficult to further add an additional circuit using the signal of the internal circuit.
【0004】プログラム開発支援装置の機能の一つであ
る、従来のアドレスブレーク機能は、図8に示すよう
に、CPU5のプログラムカウンタ1から出力されるア
ドレス信号13を、アドレスバス3を介してアドレス比
較器4に入力し、ブレークアドレス設定器11に設定し
たアドレスと一致したことを検出し、アドレス比較器4
が、CPU5にブレーク信号2を送出し、CPU5を停
止させている。A conventional address break function, which is one of the functions of the program development support apparatus, is to transfer an address signal 13 output from a program counter 1 of a CPU 5 through an address bus 3 as shown in FIG. The address is input to the comparator 4 to detect that the address matches the address set in the break address setting unit 11.
Sends the break signal 2 to the CPU 5 to stop the CPU 5.
【0005】プログラムカウンタ1は、図9のCPUク
ロックのT3サイクルで、図9のPCアドレス2を出力
し、アドレスバス3を介して、アドレス信号13がアド
レス比較器4に入力される。The program counter 1 outputs the PC address 2 shown in FIG. 9 in the cycle T 3 of the CPU clock shown in FIG. 9, and an address signal 13 is inputted to the address comparator 4 via the address bus 3.
【0006】アドレス比較器4には、図9の「アドレス
の遅延分」の時間後のT4サイクルで、アドレス信号1
3が入力され、図9の比較器アドレス2と、ブレークア
ドレス設定器11に設定されているブレークアドレス信
号9とを比較し、アドレスが一致したときは、T4サイ
クルで、ブレーク信号2を命令デコーダ制御部6に送
る。The address comparator 4 supplies the address signal 1 in the T4 cycle after the time “delay of address” in FIG.
3, the comparator address 2 in FIG. 9 is compared with the break address signal 9 set in the break address setting unit 11, and when the addresses match, the break signal 2 is supplied to the instruction decoder in cycle T4. Send to control unit 6.
【0007】命令デコーダ制御部6に、ブレーク信号2
が入力されると、命令デコーダ制御部6は、T5サイク
ルで、CPU停止信号15をプログラムカウンタ1に出
力し、プログラムカウンタ1を停止させる。The instruction decoder control unit 6 supplies a break signal 2
Is input, the instruction decoder control section 6 outputs the CPU stop signal 15 to the program counter 1 in the T5 cycle to stop the program counter 1.
【0008】しかし、CPU動作速度の向上により、プ
ログラム開発支援装置に要求される動作速度が向上した
ため、従来の方法によるCPU内部回路から必要な信号
を取り出し、取り出した信号をアドレス一致回路などで
制御する上記の方式では、対応出来ない例が発生してい
る。そこで、一例として、ブレークアドレス設定器で設
定したアドレスで停止することが出来ない場合につい
て、図10のタイミングチャートを用いて説明する。However, since the operation speed required for the program development support device has been improved due to the improvement of the CPU operation speed, necessary signals are extracted from the CPU internal circuit according to the conventional method, and the extracted signals are controlled by an address matching circuit or the like. However, there are cases where the above method cannot be used. Thus, as an example, a case where it is impossible to stop at the address set by the break address setting device will be described with reference to the timing chart of FIG.
【0009】プログラムカウンタ1は、図10のCPU
クロックのT3サイクルで、図10のPCアドレス2を
出力する。ここで、プログラムカウンタ1の出力である
アドレスバス3からアドレス比較器4までの配線容量
が、プログラム開発支援装置10を接続することにより
増加し、プログラムカウンタ1からアドレス比較器4の
間で、図10の「アドレスの遅延」分の遅延が発生し、
図10のT5サイクルで、比較器アドレス2が確定す
る。The program counter 1 is a CPU of FIG.
In the T3 cycle of the clock, the PC address 2 in FIG. 10 is output. Here, the wiring capacity from the address bus 3 to the address comparator 4, which is the output of the program counter 1, is increased by connecting the program development support device 10, and the wiring capacity between the program counter 1 and the address comparator 4 is increased. 10 "address delay" delays occur,
In the cycle T5 in FIG. 10, the comparator address 2 is determined.
【0010】アドレス比較器4は、図10の比較器アド
レス2が確定した時点T5サイクルで、ブレークアドレ
ス設定器11に設定されているブレークアドレスと比較
し、T5サイクルの時点で、アドレス比較器4に入力す
るアドレス信号13とブレークアドレス設定器11に設
定されているブレークアドレス信号9とが一致した時
は、ブレーク信号2を命令デコーダ制御部6に送る。The address comparator 4 compares the comparator address 2 with the break address set in the break address setting unit 11 at the time T5 when the comparator address 2 in FIG. 10 is determined, and at the time T5 cycle, the address comparator 4 When the address signal 13 inputted to the break address setting unit 11 matches the break address signal 9, the break signal 2 is sent to the instruction decoder control unit 6.
【0011】命令デコーダ制御部6は、ブレーク信号2
が入力されると、CPU停止信号15をプログラムカウ
ンタ1に出力し、プログラムカウンタ1は停止する。The instruction decoder control unit 6 controls the break signal 2
Is input, a CPU stop signal 15 is output to the program counter 1, and the program counter 1 stops.
【0012】しかし、命令デコーダ制御部6は、図10
のPCアドレス2の命令デコード実行時のT4サイクル
にブレーク信号2を受信しないと、PCアドレス2での
アドレスブレークは実現できない。However, the instruction decoder control unit 6
If the break signal 2 is not received in the T4 cycle when the instruction of the PC address 2 is executed, an address break at the PC address 2 cannot be realized.
【0013】このように、CPU動作速度の向上によ
り、図10のTn時間間隔が短くなってくると、図10
のアドレスの遅延、アドレス比較の遅延が相対的に長く
なってしまい、ブレーク信号2が、T5サイクルでしか
出力できなくなってしまい、このT5サイクルでは、既
に、次の命令サイクル(PCアドレス3)が始まってし
まい、CPUが停止するのは、T6サイクルになり、目
的とするT4サイクル(アドレス2の命令実行後)でC
PUを停止できない。As described above, when the time interval of Tn in FIG.
The address delay and the address comparison delay are relatively long, and the break signal 2 can be output only in the T5 cycle. In the T5 cycle, the next instruction cycle (PC address 3) has already been started. It starts and the CPU stops in the T6 cycle. In the target T4 cycle (after execution of the instruction at the address 2), the CPU stops.
Cannot stop PU.
【0014】[0014]
【発明が解決しようとする課題】本発明の目的は、上記
した従来技術の欠点を改良し、特に、CPU内部信号を
使うことなく、CPUを停止させることを可能にした新
規なプログラム開発支援装置とその制御方法を提供する
ものである。SUMMARY OF THE INVENTION It is an object of the present invention to improve the above-mentioned drawbacks of the prior art and, in particular, to provide a new program development supporting apparatus which can stop a CPU without using a signal inside the CPU. And a control method thereof.
【0015】[0015]
【課題を解決するための手段】本発明は上記した目的を
達成するため、基本的には、以下に記載されたような技
術構成を採用するものである。SUMMARY OF THE INVENTION The present invention basically employs the following technical configuration to achieve the above object.
【0016】即ち、本発明に係わるプログラム開発支援
装置の第1態様は、CPUの命令をデコードする命令デ
コーダ制御部と、この命令デコーダ制御部で制御される
プログラムカウンタとを備えたCPUを用いたプログラ
ム開発支援装置であって、前記プログラムカウンタが出
力するアドレスを予め予測して、前記プログラムカウン
タが分岐先のジャンプアドレスを出力する前に、分岐先
のジャンプアドレスを予測するアドレス予測器と、前記
アドレス予測器が予測して出力する分岐先のジャンプア
ドレスと予め設定した停止アドレスと比較するアドレス
比較器とを設け、前記命令デコーダ制御部は、前記プロ
グラムカウンタの出力するアドレスが変化したことを示
すアドレスカウント信号と、命令をデコードした結果得
られた分岐先のジャンプアドレス信号とを前記アドレス
予測器に対して出力するように構成したことを特徴とす
るものであり、叉、第2態様は、前記分岐先のジャンプ
アドレス信号は、割込先のアドレス信号を含むことを特
徴とするものであり、叉、第3態様は、前記アドレス予
測器には、分岐先のジャンプアドレスを予測する第1の
手段と、前記第1の手段が予測した分岐先のジャンプア
ドレスが、前記命令デコーダ制御部が出力する分岐先の
ジャンプアドレスと異なるとき、分岐先のジャンプアド
レスを、前記命令デコーダ制御部が出力する分岐先のジ
ャンプアドレスに修正する第2の手段とが設けられてい
ることを特徴とするものであり、叉、第4態様は、前記
アドレス予測器は、分岐先のジャンプアドレスを示す予
測アドレス信号を格納する予測アドレス設定器と、前記
アドレスカウント信号の出力タイミングで、前記予測ア
ドレス設定器内の予測アドレス信号をラッチするアドレ
スラッチと、前記アドレスラッチがラッチした信号を受
け、複数の分岐先のジャンプアドレスとその頻度とを出
力する分岐アドレステーブルと、前記分岐アドレステー
ブルが出力する予測アドレスの各々の頻度から分岐先の
ジャンプアドレスを予測する頻度選択器と、前記命令デ
コーダ制御部が出力するジャンプアドレス信号と前記頻
度選択器から出力される選択信号とを比較し、予測違い
を修正する分岐先・割込先比較器と、前記分岐先・割込
先比較器の出力する信号で、前記分岐アドレステーブル
から出力される複数の分岐先ジャンプアドレスから一つ
の予測アドレスを選択するセレクタとからなり、前記セ
レクタの出力する予測アドレスを前記予測アドレス設定
器に格納するように構成したこと特徴とするものであ
り、叉、第5態様は、前記分岐アドレステーブルは、前
記CPUが動作する環境に近い条件でシミュレーション
を行ない、前記分岐アドレステーブルに入力されるアド
レスと、このアドレスに対応する複数の分岐先ジャンプ
アドレスと、そのアドレスへ分岐する頻度とをテーブル
化したものであることを特徴とするものであり、叉、第
6態様は、前記分岐アドレステーブル内に、前記アドレ
スラッチが出力するアドレスに一致するアドレスがない
時、前記アドレス予測器は、前記アドレスラッチが出力
するアドレスに「1」を加えたアドレスを前記セレクタ
を介して前記予測アドレス設定器に出力することを特徴
とするものであり、叉、第7態様は、前記分岐先・割込
先比較器は、前記頻度選択器から出力される選択信号と
前記命令デコーダ制御部が出力する分岐先のジャンプア
ドレス信号とが一致した時、前記頻度選択器からの選択
信号を前記セレクタに対して出力し、一致しないとき前
記命令デコーダ制御部が出力する分岐先のジャンプアド
レスを前記セレクタに対して出力することを特徴とする
ものである。That is, the first aspect of the program development support apparatus according to the present invention uses a CPU provided with an instruction decoder control unit for decoding instructions of the CPU and a program counter controlled by the instruction decoder control unit. An address predictor for predicting an address output by the program counter in advance, and predicting a jump address of a branch destination before the program counter outputs a jump address of a branch destination. An address comparator for comparing a jump address of a branch destination predicted and output by the address predictor with a preset stop address is provided, and the instruction decoder control unit indicates that an address output from the program counter has changed. The address count signal and the branch destination result obtained by decoding the instruction And a jump address signal at the branch destination is obtained by converting the jump address signal at the branch destination into an address signal at the interrupt destination. According to a third aspect, the address predictor includes: a first unit for predicting a jump address of a branch destination; and a jump destination of a branch destination predicted by the first unit. When the address is different from the jump address of the branch destination output by the instruction decoder control unit, a second means for correcting the jump address of the branch destination to the jump address of the branch destination output by the instruction decoder control unit is provided. In a fourth aspect, the address predictor stores a predicted address signal indicating a predicted jump address of a branch destination. An address latch that latches a predicted address signal in the predicted address setter at the output timing of the address count signal, and receives a signal latched by the address latch, and a plurality of jump addresses of branch destinations. A branch address table that outputs a frequency, a frequency selector that predicts a jump address of a branch destination from each frequency of the predicted address output by the branch address table, a jump address signal output by the instruction decoder control unit, A branch destination / interrupt destination comparator for comparing a selection signal output from a frequency selector and correcting a prediction difference, and a signal output from the branch destination / interrupt destination comparator, which is output from the branch address table. And a selector for selecting one predicted address from a plurality of branch destination jump addresses to be executed. And the predicted address output from the selector is stored in the predicted address setting device. In a fifth aspect, the branch address table stores the predicted address under a condition close to an environment in which the CPU operates. A simulation is performed, and an address input to the branch address table, a plurality of branch destination jump addresses corresponding to the address, and a frequency of branching to the address are tabulated. In a sixth aspect, when there is no address in the branch address table that matches the address output by the address latch, the address predictor adds “1” to the address output by the address latch. Outputting an address to the predicted address setting device through the selector, In a seventh aspect, the branch destination / interrupt destination comparator is configured to output the frequency when the selection signal output from the frequency selector matches a jump destination signal output from the instruction decoder control unit. A selection signal from a selector is output to the selector, and when they do not match, a jump address of a branch destination output by the instruction decoder control unit is output to the selector.
【0017】叉、本発明に係わるプログラム開発支援装
置の制御方法の態様は、CPUの命令をデコードする命
令デコーダ制御部及びこの命令デコーダ制御部で制御さ
れるプログラムカウンタとを備えたCPUと、前記プロ
グラムカウンタが出力するアドレスを予め予測して、前
記プログラムカウンタが分岐先のジャンプアドレスを出
力する前に、分岐先のジャンプアドレスを予測するアド
レス予測器と、前記アドレス予測器が予測して出力する
分岐先のジャンプアドレスと予め設定した停止アドレス
と比較するアドレス比較器とを設け、前記命令デコーダ
制御部は、命令をデコードした結果得られた分岐先のジ
ャンプアドレス信号を前記アドレス予測器に対して出力
するように構成したプログラム開発支援装置の制御方法
であって、前記アドレス予測器が、分岐先のジャンプア
ドレスを予測する第1の工程と、前記第1の手段が予測
した分岐先のジャンプアドレスが、前記命令デコーダ制
御部が出力する分岐先のジャンプアドレスと異なると
き、分岐先のジャンプアドレスを、前記命令デコーダ制
御部が出力する分岐先のジャンプアドレスに修正する第
2の工程と、を少なくとも含むことを特徴とするもので
ある。According to another aspect of the present invention, there is provided a program development support apparatus that includes a CPU having an instruction decoder control unit for decoding an instruction of the CPU, and a program counter controlled by the instruction decoder control unit. An address predictor that predicts an address output by a program counter in advance, and predicts and outputs a jump address of a branch destination before the program counter outputs a jump address of a branch destination. An instruction comparator for comparing the jump address of the branch destination with a preset stop address is provided, and the instruction decoder control unit sends a jump address signal of the branch destination obtained as a result of decoding the instruction to the address predictor. A method for controlling a program development support device configured to output A first step of predicting a jump address of a branch destination by the addressless predictor, and when the jump address of the branch destination predicted by the first means is different from the jump address of the branch destination output by the instruction decoder control unit. And a second step of correcting the jump address of the branch destination to the jump address of the branch destination output by the instruction decoder control unit.
【0018】[0018]
【発明の実施の形態】本発明に係わるプログラム開発支
援装置は、CPUの命令をデコードする命令デコーダ制
御部と、この命令デコーダ制御部で制御されるプログラ
ムカウンタとを備えたCPUを用いたプログラム開発支
援装置であって、前記プログラムカウンタが出力するア
ドレスを予め予測して、前記プログラムカウンタが分岐
先のジャンプアドレスを出力する前に、分岐先のジャン
プアドレスを予測するアドレス予測器と、前記アドレス
予測器が予測して出力する分岐先のジャンプアドレスと
予め設定した停止アドレスと比較するアドレス比較器と
を設け、前記命令デコーダ制御部は、前記プログラムカ
ウンタの出力するアドレスが変化したことを示すアドレ
スカウント信号と、命令をデコードした結果得られた分
岐先のジャンプアドレス信号とを前記アドレス予測器に
対して出力するように構成したことを特徴とするもので
ある。DESCRIPTION OF THE PREFERRED EMBODIMENTS A program development support device according to the present invention is a program development using a CPU having an instruction decoder control unit for decoding instructions of a CPU and a program counter controlled by the instruction decoder control unit. An address predictor for predicting an address output from the program counter in advance, and predicting a jump address of a branch destination before the program counter outputs a jump address of the branch destination; An address comparator for comparing a jump address of a branch destination predicted and output by the unit with a preset stop address, wherein the instruction decoder control unit performs an address count indicating that an address output from the program counter has changed. Signal and the jump destination of the branch destination obtained as a result of decoding the instruction. It is characterized in that it has configured to output to the less signal the address predictor.
【0019】[0019]
【実施例】以下に、本発明に係わるプログラム開発支援
装置とその制御方法の具体例を図1乃至図7を参照して
詳細に説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A specific example of a program development support apparatus and a control method according to the present invention will be described below in detail with reference to FIGS.
【0020】図1は、本発明に係わるプログラム開発支
援装置の全体のブロック図、図2は、本発明のアドレス
予測器のブロック図、図3は、分岐アドレステーブルの
一例を示す図、図4〜6は、動作を説明するためのタイ
ミングチャートであって、これらの図には、CPUの命
令をデコードする命令デコーダ制御部16と、この命令
デコーダ制御部16で制御されるプログラムカウンタ1
とを備えたCPU5を用いたプログラム開発支援装置で
あって、前記プログラムカウンタ1が出力するアドレス
を予め予測して、前記プログラムカウンタ1が分岐先の
ジャンプアドレスを出力する前に、分岐先のジャンプア
ドレスを予測するアドレス予測器27と、前記アドレス
予測器27が予測して出力する分岐先のジャンプアドレ
ス21と予め設定した停止アドレス9と比較するアドレ
ス比較器4とを設け、前記命令デコーダ制御部16は、
前記プログラムカウンタ1の出力するアドレスが変化し
たことを示すアドレスカウント信号23と、命令をデコ
ードした結果得られた分岐先のジャンプアドレス信号2
4、25とを前記アドレス予測器27に対して出力する
ように構成したことを特徴とするプログラム開発支援装
置が示され、又、前記分岐先のジャンプアドレス信号
は、割込先のアドレス信号25を含むことを特徴とする
プログラム開発支援装置が示されている。FIG. 1 is an overall block diagram of a program development support device according to the present invention, FIG. 2 is a block diagram of an address predictor of the present invention, FIG. 3 is a diagram showing an example of a branch address table, and FIG. 6 to 6 are timing charts for explaining the operation. These figures show an instruction decoder control unit 16 for decoding an instruction of the CPU and a program counter 1 controlled by the instruction decoder control unit 16.
A program development support apparatus using a CPU 5 comprising: a CPU that predicts an address output by the program counter 1 in advance, and outputs a jump destination of the branch destination before the program counter 1 outputs a jump address of the branch destination. An address predictor for predicting an address; and an address comparator for comparing a jump address of a branch destination predicted and output by the address predictor with a preset stop address. 16 is
An address count signal 23 indicating that the address output from the program counter 1 has changed, and a jump address signal 2 of a branch destination obtained as a result of decoding the instruction.
4 and 25 are output to the address predictor 27. The program development support device is characterized in that the jump address signal of the branch destination is the address signal 25 of the interrupt destination. Is shown.
【0021】又、前記アドレス予測器27は、分岐先の
ジャンプアドレスを示す予測アドレス信号59を格納す
る予測アドレス設定器53と、前記アドレスカウント信
号23の出力タイミングで、前記予測アドレス設定器5
3内の予測アドレス信号59をラッチするアドレスラッ
チ40と、前記アドレスラッチ40がラッチした信号を
受け、複数の分岐先のジャンプアドレス43〜45とそ
の頻度46〜48とを出力する分岐アドレステーブル4
2と、前記分岐アドレステーブル42が出力する予測ア
ドレスの各々の頻度から分岐先のジャンプアドレスを予
測する頻度選択器52と、前記命令デコーダ制御部16
が出力するジャンプアドレス信号24、25と前記頻度
選択器52から出力される選択信号57とを比較し、予
測違いを修正する分岐先・割込先比較器54と、前記分
岐先・割込先比較器54の出力する信号58で、前記分
岐アドレステーブル42から出力される複数の分岐先ジ
ャンプアドレス43〜45から一つの予測アドレスを選
択するセレクタ51とからなり、前記セレクタ51の出
力する予測アドレス59を前記予測アドレス設定器53
に格納するように構成したこと特徴とするプログラム開
発支援装置が示され、又、前記分岐アドレステーブル4
2は、前記CPUが動作する環境に近い条件でシミュレ
ーションを行ない、前記分岐アドレステーブル42に入
力されるアドレス42Aと、このアドレス42Aに対応
する複数の分岐先ジャンプアドレス42Cと、そのアド
レスへ分岐する頻度42Dとをテーブル化したものであ
ることを特徴とするプログラム開発支援装置が示され、
又、前記分岐アドレステーブル42内に、前記アドレス
ラッチ40が出力するアドレス41に一致するアドレス
がない時、前記アドレス予測器27は、前記アドレスラ
ッチ40が出力するアドレス41に「1」を加えたアド
レス49を前記セレクタ51を介して前記予測アドレス
設定器53に出力することを特徴とするプログラム開発
支援装置が示され、又、前記分岐先・割込先比較器54
は、前記頻度選択器52から出力される選択信号57と
前記命令デコーダ制御部16が出力する分岐先のジャン
プアドレス信号24、25とが一致した時、前記頻度選
択器52からの選択信号57を前記セレクタ51に対し
て出力し、一致しないとき前記命令デコーダ制御部16
が出力する分岐先のジャンプアドレス24、25を前記
セレクタ51に対して出力することを特徴とするプログ
ラム開発支援装置が示されている。The address predicting unit 27 stores a predicted address signal 59 indicating a jump address of a branch destination and a predicted address setting unit 5 which outputs the predicted address signal 59 at the output timing of the address count signal 23.
3; a branch address table 4 for receiving a signal latched by the address latch 40 and outputting a plurality of jump destinations 43 to 45 and their frequencies 46 to 48 in response to the signal latched by the address latch 40;
2, a frequency selector 52 for predicting the jump address of the branch destination from each frequency of the predicted addresses output from the branch address table 42, and the instruction decoder controller 16
Compares the jump address signals 24 and 25 output from the frequency selector 52 with the selection signal 57 output from the frequency selector 52, and corrects a prediction difference. A selector 51 selects one predicted address from a plurality of branch destination jump addresses 43 to 45 output from the branch address table 42 in accordance with a signal 58 output from the comparator 54, and a predicted address output from the selector 51. 59 is the predicted address setting unit 53
And a program development support device characterized by being stored in the branch address table 4.
Numeral 2 performs a simulation under conditions close to the environment in which the CPU operates, an address 42A input to the branch address table 42, a plurality of branch destination jump addresses 42C corresponding to the address 42A, and branch to the address. A program development support device characterized in that a frequency 42D and a frequency are tabulated,
When there is no address in the branch address table 42 that matches the address 41 output from the address latch 40, the address predictor 27 adds “1” to the address 41 output from the address latch 40. A program development support device for outputting an address 49 to the predicted address setting device 53 via the selector 51 is shown. The branch destination / interrupt destination comparator 54
When the selection signal 57 output from the frequency selector 52 and the jump address signals 24 and 25 of the branch destination output by the instruction decoder control unit 16 match, the selection signal 57 from the frequency selector 52 is Output to the selector 51, and when they do not match, the instruction decoder controller 16
And outputs to the selector 51 the jump addresses 24 and 25 of the branch destinations output by the program development support apparatus.
【0022】以下に、本発明を更に詳細に説明する。Hereinafter, the present invention will be described in more detail.
【0023】図1は、プログラム開発支援装置の全体の
ブロック図である。図において、5は、CPUであり、
CPU5は、プログラムカウンタ1と、アドレスバス3
と、命令をデコードすると共に、アドレスが変化したこ
とを示すアドレスカウント信号23と、命令の解読の結
果得られた分岐先のアドレスを示す分岐信号24と、割
込先のアドレスを示す割込信号25とを出力する命令デ
コーダ制御部16と、データバス12と、内臓メモリ7
と、内臓ぺリフェラル回路8とで構成している。FIG. 1 is an overall block diagram of the program development support apparatus. In the figure, 5 is a CPU,
The CPU 5 includes a program counter 1 and an address bus 3
An address count signal 23 indicating that the address has changed while decoding the instruction; a branch signal 24 indicating the address of the branch destination obtained as a result of decoding the instruction; and an interrupt signal indicating the address of the interrupt destination. 25, the data bus 12, and the internal memory 7.
And a built-in referral circuit 8.
【0024】また、プログラム開発支援装置として、前
記したアドレスカウント信号23と、分岐信号24と割
込信号25とを受信して、次のアドレスを予測し、予測
アドレス値21を出力するアドレス予測器27と、アド
レス予測器27が出力する予測アドレス値21とブレー
クアドレス設定器11内のブレークアドレスとを比較
し、予測アドレス値21とブレークアドレスとが一致し
た場合、ブレーク信号2を、命令デコーダ制御部16に
出力するアドレス比較器4で構成している。As a program development support device, an address predictor that receives the address count signal 23, the branch signal 24, and the interrupt signal 25, predicts the next address, and outputs a predicted address value 21 27 is compared with the predicted address value 21 output from the address predictor 27 and the break address in the break address setting device 11, and when the predicted address value 21 matches the break address, the break signal 2 is controlled by the instruction decoder control. It comprises an address comparator 4 which outputs to the section 16.
【0025】そして、命令デコーダ制御部16がブレー
ク信号2を受信すると、命令デコーダ制御部16は、プ
ログラムカウンタ1に、CPU停止信号15を出力し、
プログラムカウンタ1のインクリメント動作を停止する
ように構成している。When the instruction decoder controller 16 receives the break signal 2, the instruction decoder controller 16 outputs a CPU stop signal 15 to the program counter 1,
The configuration is such that the increment operation of the program counter 1 is stopped.
【0026】次に、本発明のアドレス予測器の構成につ
いて説明する。Next, the configuration of the address predictor of the present invention will be described.
【0027】本発明のアドレス予測器27は、予測アド
レス値21を格納すると共に、この予測アドレス値21
をアドレス比較器4に出力する予測アドレス設定器53
と、予測アドレス設定器53の出力する予測アドレス値
21をアドレスカウント信号23に同期してアドレスを
ラッチするアドレスラッチ40と、アドレスラッチ40
がラッチしたアドレス値41に基づき、このアドレスに
対応する複数のジャンプ先アドレスを示すアドレス信号
43、44、45を出力すると共に、前記ジャンプ先ア
ドレスの夫々の発生頻度を示す頻度信号46、47、4
8を出力する分岐アドレステーブル42と、頻度信号4
6、47、48を受けて、現在時点で予測されるアドレ
ス信号を選択するための選択信号57を出力する頻度選
択器と、選択信号57と命令デコーダ制御部16から出
力された分岐信号24又は割込信号25とを比較し、選
択信号58を出力する分岐先・割込先比較器54と、選
択信号58を受けてアドレス信号43〜45の何れかを
選択し、選択したアドレス信号59を出力するセレクタ
51とで構成され、予測アドレス設定器53に格納され
たアドレス信号59は、再び、次のアドレス予測値にな
るように構成している。The address predictor 27 of the present invention stores the predicted address value 21 and
Address setting unit 53 which outputs the address to the address comparator 4
An address latch 40 for latching an address in synchronization with a predicted address value 21 output from a predicted address setting unit 53 in synchronization with an address count signal 23;
Outputs address signals 43, 44, 45 indicating a plurality of jump destination addresses corresponding to the addresses, and frequency signals 46, 47, indicating the frequency of occurrence of the jump destination addresses, based on the latched address value 41. 4
8 and a frequency signal 4
6, 47 and 48, a frequency selector for outputting a selection signal 57 for selecting an address signal predicted at the present time, a selection signal 57 and a branch signal 24 or a branch signal 24 output from the instruction decoder control unit 16. A branch destination / interrupt destination comparator 54 that compares the interrupt signal 25 and outputs a selection signal 58, and selects one of the address signals 43 to 45 in response to the selection signal 58, and outputs the selected address signal 59. The address signal 59, which is composed of the selector 51 for outputting and stored in the predicted address setting unit 53, is again configured to be the next predicted address value.
【0028】なお、分岐アドレステーブル42内に、対
応するアドレスが存在しない場合は、アドレス値41に
1を加算した(予測アドレス+1)信号49を出力する
から、このアドレスが、次のアドレス予測値になる。If there is no corresponding address in the branch address table 42, a signal 49 obtained by adding 1 to the address value 41 (predicted address + 1) is output. become.
【0029】分岐アドレステーブル42は、アドレス値
41に対応するアドレス42Aと、このアドレスに対応
する各命令42Bと、各命令42Bに対応して設けられ
た複数のジャンプ先アドレス42Cとそのジャンプ頻度
42Dとからなるテーブルであり、頻度選択器52が、
頻度選択器52内のカウンタ(図示せず)の値から、次
に出現するであろうアドレスを選択するようになってい
る。The branch address table 42 includes an address 42A corresponding to the address value 41, each instruction 42B corresponding to this address, a plurality of jump destination addresses 42C provided corresponding to each instruction 42B, and a jump frequency 42D. And a frequency selector 52,
From the value of a counter (not shown) in the frequency selector 52, an address that will appear next will be selected.
【0030】この分岐アドレステーブル42は、図7の
構成のシミュレータ70とソースリスト71によりシミ
ュレーションによって作成する。シミュレーション技術
は、既知の技術であり、シミュレータによりジャンプ頻
度を求めることも既知の技術であるが、CPUの実行環
境に近い条件でのシミュレーションを行なうことで、分
岐頻度、割込頻度が正確に求められ、予測間違いの発生
を防ぐことが可能になる。The branch address table 42 is created by simulation using the simulator 70 and the source list 71 having the configuration shown in FIG. The simulation technology is a known technology, and it is a known technology that a jump frequency is obtained by a simulator. However, by performing a simulation under conditions close to the CPU execution environment, the branch frequency and the interrupt frequency can be accurately obtained. As a result, it is possible to prevent a prediction error from occurring.
【0031】このように、本発明では、予め作成した図
3の分岐アドレステーブル42を参照し、次に実行され
るアドレスをアドレス予測器27により予測するように
なっている。As described above, in the present invention, the address to be executed next is predicted by the address predictor 27 with reference to the branch address table 42 of FIG.
【0032】次に、このように構成したアドレス予測器
の動作について説明する。Next, the operation of the thus configured address predictor will be described.
【0033】CPU5は、命令デコーダ制御部16で命
令デコードが完了し、次の命令実行のために、プログラ
ムカウンタ1を更新し、アドレスバス3にアドレスが出
力される。この時、同時に、アドレスカウント信号23
が、命令デコーダ制御部16から出力され、前の命令実
行時に予測した予測アドレス値21がアドレス値41と
してアドレスラッチ40にラッチされる。The instruction decoder controller 16 completes instruction decoding, updates the program counter 1 for the next instruction execution, and outputs an address to the address bus 3. At this time, the address count signal 23
Is output from the instruction decoder control unit 16, and the predicted address value 21 predicted at the time of execution of the previous instruction is latched as the address value 41 in the address latch 40.
【0034】この時、図3の分岐アドレステーブル42
中のアドレス欄に同一アドレスがある場合は、その内の
ジャンプアドレス1をアドレス信号43へ、ジャンプア
ドレス2をアドレス信号44へ、ジャンプアドレス3を
アドレス信号45へ、また、アドレス信号1の頻度を頻
度信号46へ、アドレス信号2の頻度を頻度信号47
へ、アドレス信号3の頻度を頻度信号48へ出力する、
この場合、分岐アドレステーブル内に、アドレス値41
と一致するアドレスがない場合には、アドレス値41に
1を加算した(予測アドレス+1)信号49を出力す
る。又、アドレス予測器27は、分岐命令以外のときは
(予測アドレス+1)信号49をセレクタ51を介して
予測アドレス設定器53に出力する。分岐命令の時は、
現在の時点で、頻度信号46、47、48の中で最も頻
度の高いものを頻度選択器52が選択し、分岐先・割込
先比較器54へ選択信号57を出力する。頻度選択器5
2は、図3のアドレス欄に示されたアドレスのジャンプ
回数をカウントし、図3のジャンプ頻度にしたがって選
択信号57を決める。一例として、ジャンプ頻度1が5
0%、ジャンプ頻度2が10%、ジャンプ頻度3が40
%である時の頻度選択器の動作は、10回中5回をジャ
ンプアドレス1に、1回をジャンプアドレス2に、4回
をジャンプアドレス3の選択信号57を出力する。At this time, the branch address table 42 shown in FIG.
If there is an identical address in the address column in the middle, jump address 1 to address signal 43, jump address 2 to address signal 44, jump address 3 to address signal 45, and the frequency of address signal 1 The frequency of the address signal 2 is added to the frequency signal 47 to the frequency signal 46.
To output the frequency of the address signal 3 to the frequency signal 48,
In this case, the address value 41 is stored in the branch address table.
If there is no address that matches the address, a signal 49 obtained by adding 1 to the address value 41 (predicted address + 1) is output. The address predictor 27 outputs a (predicted address + 1) signal 49 to the predicted address setter 53 via the selector 51 when the instruction is not a branch instruction. At the time of a branch instruction,
At the present time, the frequency selector 52 selects the most frequent one of the frequency signals 46, 47 and 48, and outputs a selection signal 57 to the branch destination / interrupt destination comparator 54. Frequency selector 5
2 counts the number of jumps of the address shown in the address column of FIG. 3, and determines the selection signal 57 according to the jump frequency of FIG. As an example, jump frequency 1 is 5
0%, jump frequency 2 is 10%, jump frequency 3 is 40
When the frequency selector is%, the operation of the frequency selector outputs the selection signal 57 of the jump address 1 for 5 times, the jump address 2 for 1 time, and the jump address 3 for 4 times.
【0035】分岐先・割込先比較器54は、分岐先信号
24と割込信号25と頻度選択器52からの選択信号5
7に基づき、選択信号58をセレクタ51に出力する。
選択信号58は、通常アドレス信号49を選択するよう
になっているが、頻度選択器52から選択信号57が出
力された時、アドレス信号43、44、45の何れかを
選択する。セレクタ51は、選択信号58にしたがっ
て、アドレス信号43、44、45の一つを選択し、予
測アドレス設定器53に予測アドレス値21を設定す
る。アドレス予測器27は、予測アドレス設定器53の
値である予測アドレス値21をアドレス比較器4に出力
し、アドレス比較器4は、予測アドレス値21とブレー
クアドレス信号9とを比較し、一致した時には、ブレー
ク信号2を命令デコーダ制御部16に出力する。命令デ
コーダ制御部16は、ブレーク信号2を受信すると、C
PU停止信号15をプログラムカウンタ1に出力し、プ
ログラムカウンタ1を停止させる。The branch destination / interrupt destination comparator 54 outputs the branch destination signal 24, the interrupt signal 25, and the selection signal 5 from the frequency selector 52.
7, a selection signal 58 is output to the selector 51.
The selection signal 58 normally selects the address signal 49. When the selection signal 57 is output from the frequency selector 52, one of the address signals 43, 44, and 45 is selected. The selector 51 selects one of the address signals 43, 44, and 45 according to the selection signal 58, and sets the predicted address value 21 in the predicted address setting unit 53. The address predictor 27 outputs the predicted address value 21 that is the value of the predicted address setter 53 to the address comparator 4, and the address comparator 4 compares the predicted address value 21 with the break address signal 9 and finds a match. At times, the break signal 2 is output to the instruction decoder control unit 16. When receiving the break signal 2, the instruction decoder control unit 16
A PU stop signal 15 is output to the program counter 1 to stop the program counter 1.
【0036】図4は、分岐信号又は割込信号が含まれな
い状態の動作を示したタイミングチャートである。FIG. 4 is a timing chart showing an operation in a state where a branch signal or an interrupt signal is not included.
【0037】T1サイクルでは、既に、アドレス1が予
測アドレス設定器53に設定されている。この状態で、
プログラムカウンタ1がインクリメントされてアドレス
1がアドレスバス3に出力され、同時に、アドレスカウ
ント信号23が出力される。アドレスカウント信号23
で、予測アドレス設定器53が出力しているアドレス1
がアドレスラッチ40にラッチされ、同時にアドレス値
41として、分岐アドレステーブル42に出力される。
そして、分岐アドレステーブル42は、(予測アドレス
+1)信号を出力し、このアドレスをセレクタ51を介
して予測アドレス設定器53に格納すると共に、アドレ
ス比較器4に出力する。In the T1 cycle, the address 1 has already been set in the predicted address setting unit 53. In this state,
The program counter 1 is incremented, the address 1 is output to the address bus 3, and at the same time, the address count signal 23 is output. Address count signal 23
Is the address 1 output from the predicted address setting unit 53.
Is latched by the address latch 40 and output to the branch address table 42 as an address value 41 at the same time.
Then, the branch address table 42 outputs a (prediction address + 1) signal, stores the address in the prediction address setting unit 53 via the selector 51, and outputs the address to the address comparator 4.
【0038】図5は、分岐信号又は割込信号が出力さ
れ、一致した結果、ブレーク信号2が出力される場合の
動作を示したタイミングチャートである。FIG. 5 is a timing chart showing an operation when a branch signal or an interrupt signal is output and a break signal 2 is output as a result of the coincidence.
【0039】T1サイクルでは、既に、アドレス1が予
測アドレス設定器53に設定されている。この状態で、
プログラムカウンタ1がインクリメントされてアドレス
1がアドレスバス3に出力され、同時に、アドレスカウ
ント信号23が出力される。アドレスカウント信号23
で、予測アドレス設定器53が出力しているアドレス1
がアドレスラッチ40にラッチされ、同時にアドレス値
41として、分岐アドレステーブル42に出力される。
そして、分岐アドレステーブル42は、分岐アドレスで
あるアドレス信号43〜45をセレクタ51に出力す
る。同時に、分岐アドレステーブル42は、頻度選択器
52に対して、夫々の頻度信号46〜48を出力する。In the T1 cycle, the address 1 has already been set in the predicted address setting unit 53. In this state,
The program counter 1 is incremented, the address 1 is output to the address bus 3, and at the same time, the address count signal 23 is output. Address count signal 23
Is the address 1 output from the predicted address setting unit 53.
Is latched by the address latch 40 and output to the branch address table 42 as an address value 41 at the same time.
Then, the branch address table 42 outputs address signals 43 to 45, which are branch addresses, to the selector 51. At the same time, the branch address table 42 outputs respective frequency signals 46 to 48 to the frequency selector 52.
【0040】頻度選択器52は、現在時点の命令の各ジ
ャンプアドレスの出現頻度から、次に現れるであろうア
ドレスを選択して、選択信号57を出力する。分岐先・
割込先比較器54では、選択信号57と分岐信号24又
は割込信号25と比較し、一致している場合、分岐先・
割込先比較器54は、選択信号58をセレクタに出力す
る。セレクタ51は、選択信号58に基づきアドレス信
号43〜45の何れかを選択し、選択したアドレス59
を予測アドレス設定器53に格納すると共に、アドレス
比較器4に出力する。そして、この場合、アドレス予測
器27の出力である予測アドレス値21とブレークアド
レスが一致しているから、アドレス比較器4は、T3サ
イクルでブレーク信号2を命令デコーダ制御部16に出
力し、T5サイクルで、CPU停止信号15が命令デコ
ーダ制御部16からプログラムカウンタ1に出力され、
ブレークアドレス設定器11に設定されたアドレスで停
止する。The frequency selector 52 selects an address that will appear next from the frequency of appearance of each jump address of the instruction at the current time point, and outputs a selection signal 57. Branch destination
The interrupt destination comparator 54 compares the selection signal 57 with the branch signal 24 or the interrupt signal 25.
The interrupt destination comparator 54 outputs a selection signal 58 to the selector. The selector 51 selects one of the address signals 43 to 45 based on the selection signal 58, and selects the selected address 59.
Is stored in the predicted address setting unit 53 and output to the address comparator 4. In this case, since the break address matches the predicted address value 21 output from the address predictor 27, the address comparator 4 outputs the break signal 2 to the instruction decoder control unit 16 in the T3 cycle, and In the cycle, the CPU stop signal 15 is output from the instruction decoder control unit 16 to the program counter 1,
It stops at the address set in the break address setting device 11.
【0041】図6は、初め一致せずに、分岐信号又は割
込信号を用いることで修正した結果、ブレーク信号2
が、出力される場合の動作を示したタイミングチャート
である。FIG. 6 shows that the break signal 2 does not match at first, but is corrected by using a branch signal or an interrupt signal.
Is a timing chart showing the operation in the case of output.
【0042】T1サイクルでは、既に、アドレス1が予
測アドレス設定器53に設定されている。この状態で、
プログラムカウンタ1がインクリメントされてアドレス
1がアドレスバス3に出力され、同時に、アドレスカウ
ント信号23が出力される。アドレスカウント信号23
で、予測アドレス設定器53が出力しているアドレス1
がアドレスラッチ40にラッチされ、同時にアドレス値
41として、分岐アドレステーブル42に出力される。
そして、分岐アドレステーブル42は、(予測アドレス
+1)信号49をセレクタ51に出力し、この信号は、
予測アドレス設定器53に格納され、更に、アドレス予
測器27から、アドレス比較器4に予測アドレス値21
として出力する。しかし、この時、アドレス2はブレー
クアドレス設定器10内のブレークアドレス5と異な
る。In the T1 cycle, the address 1 has already been set in the predicted address setting unit 53. In this state,
The program counter 1 is incremented, the address 1 is output to the address bus 3, and at the same time, the address count signal 23 is output. Address count signal 23
Is the address 1 output from the predicted address setting unit 53.
Is latched by the address latch 40 and output to the branch address table 42 as an address value 41 at the same time.
Then, the branch address table 42 outputs a (predicted address + 1) signal 49 to the selector 51, and this signal is
The predicted address value 21 is stored in the predicted address setting unit 53, and is further transmitted from the address predictor 27 to the address comparator 4.
Output as However, at this time, address 2 is different from break address 5 in break address setter 10.
【0043】さて、本発明では、T3サイクル期間に分
岐信号24又は割込信号25が、分岐先・割込先比較器
54に入力されるように構成されているから、この場
合、分岐先・割込先比較器54は、分岐先のジャンプア
ドレスを分岐信号24又は割込信号25に修正して出力
する。この結果、予測アドレス設定値53は、アドレス
5となり、同時に、アドレス5がアドレス比較器4に入
力される。そして、一致信号であるブレーク信号2をT
4サイクルで出力する。このため、T5サイクルでプロ
グラムカウンタ1が停止する。In the present invention, since the branch signal 24 or the interrupt signal 25 is input to the branch destination / interrupt destination comparator 54 during the T3 cycle period, in this case, The interrupt destination comparator 54 corrects the jump address of the branch destination into the branch signal 24 or the interrupt signal 25 and outputs the corrected signal. As a result, the predicted address setting value 53 becomes the address 5, and at the same time, the address 5 is input to the address comparator 4. Then, the break signal 2 which is a coincidence signal is set to T
Output in 4 cycles. Therefore, the program counter 1 stops in the T5 cycle.
【0044】なお、本発明では、予測アドレス設定器5
3には、初期値53Aを設定できるように構成されてい
るから、デバッグ開始時に、初期値としてスタートアド
レスをセットし、その他の必要なレジスタの値をセット
してデバッグをスタートさせる。In the present invention, the predicted address setting unit 5
3 is configured so that an initial value 53A can be set, so that at the start of debugging, a start address is set as an initial value, and the values of other necessary registers are set to start debugging.
【0045】[0045]
【発明の効果】本発明に係わるプログラム開発支援装置
とその制御方法は、上述のように構成したので、CPU
内部のアドレスバスを外部に引き出すことで生じる配線
遅延をなくし、高速なCPUクロック時でも目的とする
ブレークアドレスでCPUを停止させることができる優
れた効果を奏する。The program development support apparatus and the control method thereof according to the present invention are constructed as described above.
There is an excellent effect that the wiring delay caused by drawing out the internal address bus to the outside can be eliminated, and the CPU can be stopped at the target break address even at the time of the high-speed CPU clock.
【図1】本発明に係わるプログラム開発支援装置の全体
構成を示すブロック図である。FIG. 1 is a block diagram showing an overall configuration of a program development support device according to the present invention.
【図2】アドレス予測器の内部構成を示すブロック図で
ある。FIG. 2 is a block diagram showing an internal configuration of an address predictor.
【図3】分岐アドレステーブルの一例を示す図表であ
る。FIG. 3 is a table showing an example of a branch address table.
【図4】ブレークアドレスが設定されていない時の動作
を示すタイミングチャートである。FIG. 4 is a timing chart showing an operation when a break address is not set.
【図5】ブレークアドレスが設定されて、プログラムカ
ウンタが停止する時の動作を示すタイミングチャートで
ある。FIG. 5 is a timing chart showing an operation when a break address is set and a program counter stops.
【図6】ブレークアドレスが設定されて、プログラムカ
ウンタが停止する時の他の動作を示すタイミングチャー
トである。FIG. 6 is a timing chart showing another operation when a break address is set and the program counter stops.
【図7】分岐アドレステーブルの作成手順を示す図であ
る。FIG. 7 is a diagram showing a procedure for creating a branch address table.
【図8】従来のプログラム開発支援装置のブロック図で
ある。FIG. 8 is a block diagram of a conventional program development support device.
【図9】従来のプログラム開発支援装置の動作を示すタ
イミングチャートである。FIG. 9 is a timing chart showing the operation of a conventional program development support device.
【図10】従来のプログラム開発支援装置の不具合を示
すタイミングチャートである。FIG. 10 is a timing chart showing a problem of a conventional program development support device.
1 PC(プログラムカウンタ) 2 ブレーク信号 3 アドレスバス 4 アドレス比較器 5 CPU 6 命令デコーダ制御部 7 内臓メモリ 8 内臓ペリフェラル 9 ブレークアドレス信号 10 プログラム開発支援装置 11 ブレークアドレス設定器 12 データバス 13 PCが出力するアドレス信号 14 アドレス比較器4に入力するアドレス信号 15 CPU停止信号 16 命令デコーダ制御部 21 予測アドレス値 23 アドレスカウント信号 24 分岐信号 25 割込信号 27 アドレス予測器 40 アドレスラッチ 41 アドレス値 42 分岐アドレステーブル 43 アドレス信号(ジャンプアドレス1) 44 アドレス信号(ジャンプアドレス2) 45 アドレス信号(ジャンプアドレス3) 46 頻度信号(ジャンプ頻度1) 47 頻度信号(ジャンプ頻度2) 48 頻度信号(ジャンプ頻度3) 49 (予測アドレス+1)信号 51 セレクタ 52 頻度選択器 53 予測アドレス設定器 54 分岐先・割込先比較器 57 選択信号 58 選択信号 Reference Signs List 1 PC (program counter) 2 Break signal 3 Address bus 4 Address comparator 5 CPU 6 Instruction decoder control unit 7 Built-in memory 8 Built-in peripheral 9 Break address signal 10 Program development support device 11 Break address setting device 12 Data bus 13 PC output Address signal 14 to be input to the address comparator 4 15 address signal to be input to the address comparator 4 15 CPU stop signal 16 instruction decoder control unit 21 predicted address value 23 address count signal 24 branch signal 25 interrupt signal 27 address predictor 40 address latch 41 address value 42 branch address Table 43 Address signal (jump address 1) 44 Address signal (jump address 2) 45 Address signal (jump address 3) 46 Frequency signal (jump frequency 1) 47 Frequency signal ( Jump Frequency 2) 48 frequency signal (jump frequency 3) 49 (predicted address +1) signal 51 selector 52 frequency selector 53 predicted address setter 54 branch target-interrupt destination comparator 57 selects signal 58 select signal
Claims (8)
ダ制御部と、この命令デコーダ制御部で制御されるプロ
グラムカウンタとを備えたCPUを用いたプログラム開
発支援装置であって、 前記プログラムカウンタが出力するアドレスを予め予測
して、前記プログラムカウンタが分岐先のジャンプアド
レスを出力する前に、分岐先のジャンプアドレスを予測
するアドレス予測器と、前記アドレス予測器が予測して
出力する分岐先のジャンプアドレスと予め設定した停止
アドレスと比較するアドレス比較器とを設け、前記命令
デコーダ制御部は、前記プログラムカウンタの出力する
アドレスが変化したことを示すアドレスカウント信号
と、命令をデコードした結果得られた分岐先のジャンプ
アドレス信号とを前記アドレス予測器に対して出力する
ように構成したことを特徴とするプログラム開発支援装
置。1. A program development support device using a CPU comprising an instruction decoder control unit for decoding instructions of a CPU and a program counter controlled by the instruction decoder control unit, wherein the program counter outputs An address predictor that predicts an address in advance and predicts a branch destination jump address before the program counter outputs a branch destination jump address; and a branch destination jump address predicted and output by the address predictor. And an address comparator for comparing with a preset stop address. The instruction decoder control section includes an address count signal indicating that an address output from the program counter has changed, and a branch obtained as a result of decoding the instruction. Output the previous jump address signal to the address predictor. Program development support apparatus characterized by being configured so.
割込先のアドレス信号を含むことを特徴とする請求項1
記載のプログラム開発支援装置。2. The jump address signal of the branch destination is:
2. The method according to claim 1, further comprising an interrupt destination address signal.
The described program development support device.
ンプアドレスを予測する第1の手段と、前記第1の手段
が予測した分岐先のジャンプアドレスが、前記命令デコ
ーダ制御部が出力する分岐先のジャンプアドレスと異な
るとき、分岐先のジャンプアドレスを、前記命令デコー
ダ制御部が出力する分岐先のジャンプアドレスに修正す
る第2の手段とが設けられていることを特徴とする請求
項1又は2記載のプログラム開発支援装置。3. An address predictor comprising: a first means for predicting a jump address of a branch destination; and a jump address of the branch destination predicted by the first means, wherein the jump address is a branch address output by the instruction decoder control unit. 2. The apparatus according to claim 1, further comprising a second means for correcting the jump address of the branch destination to a jump address of the branch destination output from the instruction decoder control unit when the jump address differs from the jump address. 2. The program development support device according to 2.
プアドレスを示す予測アドレス信号を格納する予測アド
レス設定器と、前記アドレスカウント信号の出力タイミ
ングで、前記予測アドレス設定器内の予測アドレス信号
をラッチするアドレスラッチと、前記アドレスラッチが
ラッチした信号を受け、複数の分岐先のジャンプアドレ
スとその頻度とを出力する分岐アドレステーブルと、前
記分岐アドレステーブルが出力する予測アドレスの各々
の頻度から分岐先のジャンプアドレスを予測する頻度選
択器と、前記命令デコーダ制御部が出力するジャンプア
ドレス信号と前記頻度選択器から出力される選択信号と
を比較し、予測違いを修正する分岐先・割込先比較器
と、前記分岐先・割込先比較器の出力する信号で、前記
分岐アドレステーブルから出力される複数の分岐先ジャ
ンプアドレスから一つの予測アドレスを選択するセレク
タとからなり、前記セレクタの出力する予測アドレスを
前記予測アドレス設定器に格納するように構成したこと
特徴とする請求項1又は2記載のプログラム開発支援装
置。4. An address predictor, comprising: a predictive address setter for storing a predictive address signal indicating a jump address of a branch destination; and a predictive address signal in the predictive address setter at an output timing of the address count signal. An address latch to be latched, a branch address table receiving a signal latched by the address latch, and outputting a jump address of a plurality of branch destinations and the frequency thereof, and branching from each frequency of the predicted address output by the branch address table. A frequency selector for predicting a previous jump address, a branch destination / interrupt for comparing a jump address signal output from the instruction decoder control unit with a selection signal output from the frequency selector, and correcting a prediction difference. A comparator and a signal output from the branch destination / interrupt destination comparator. And a selector for selecting one predicted address from a plurality of branch destination jump addresses output from the selector, and storing the predicted address output from the selector in the predicted address setting device. Or the program development support device according to 2.
Uが動作する環境に近い条件でシミュレーションを行な
い、前記分岐アドレステーブルに入力されるアドレス
と、このアドレスに対応する複数の分岐先ジャンプアド
レスと、そのアドレスへ分岐する頻度とをテーブル化し
たものであることを特徴とする請求項1乃至4の何れか
に記載のプログラム開発支援装置。5. The branch address table according to claim 1, wherein
A simulation is performed under conditions close to the environment in which U operates, and a table is formed of addresses input to the branch address table, a plurality of branch destination jump addresses corresponding to the addresses, and the frequency of branching to the addresses. The program development support device according to any one of claims 1 to 4, wherein:
ドレスラッチが出力するアドレスに一致するアドレスが
ない時、前記アドレス予測器は、前記アドレスラッチが
出力するアドレスに「1」を加えたアドレスを前記セレ
クタを介して前記予測アドレス設定器に出力することを
特徴とする請求項1乃至5の何れかに記載のプログラム
開発支援装置。6. When there is no address in the branch address table that matches the address output by the address latch, the address predictor adds the address obtained by adding “1” to the address output by the address latch. The program development support device according to claim 1, wherein an output is provided to the predicted address setting device via a selector.
選択器から出力される選択信号と前記命令デコーダ制御
部が出力する分岐先のジャンプアドレス信号とが一致し
た時、前記頻度選択器からの選択信号を前記セレクタに
対して出力し、一致しないとき前記命令デコーダ制御部
が出力する分岐先のジャンプアドレスを前記セレクタに
対して出力することを特徴とする請求項1乃至6の何れ
かに記載のプログラム開発支援装置。7. The branch destination / interrupt destination comparator, when a selection signal output from the frequency selector matches a branch destination jump address signal output by the instruction decoder control unit, the frequency selection. 7. A selector according to claim 1, further comprising: outputting a selection signal from a selector to the selector; and outputting a jump address of a branch destination output by the instruction decoder control unit to the selector when they do not match. A program development support device according to any of the above.
ダ制御部及びこの命令デコーダ制御部で制御されるプロ
グラムカウンタとを備えたCPUと、前記プログラムカ
ウンタが出力するアドレスを予め予測して、前記プログ
ラムカウンタが分岐先のジャンプアドレスを出力する前
に、分岐先のジャンプアドレスを予測するアドレス予測
器と、前記アドレス予測器が予測して出力する分岐先の
ジャンプアドレスと予め設定した停止アドレスと比較す
るアドレス比較器とを設け、前記命令デコーダ制御部
は、命令をデコードした結果得られた分岐先のジャンプ
アドレス信号を前記アドレス予測器に対して出力するよ
うに構成したプログラム開発支援装置の制御方法であっ
て、 前記アドレス予測器が、分岐先のジャンプアドレスを予
測する第1の工程と、 前記第1の手段が予測した分岐先のジャンプアドレス
が、前記命令デコーダ制御部が出力する分岐先のジャン
プアドレスと異なるとき、分岐先のジャンプアドレス
を、前記命令デコーダ制御部が出力する分岐先のジャン
プアドレスに修正する第2の工程と、 を少なくとも含むことを特徴とするプログラム開発支援
装置の制御方法。8. A CPU comprising an instruction decoder control unit for decoding an instruction of the CPU, and a program counter controlled by the instruction decoder control unit; Before outputting the jump address of the branch destination, an address predictor for predicting the jump address of the branch destination, and an address for comparing the jump address of the branch destination predicted and output by the address predictor with a preset stop address A comparator, wherein the instruction decoder control unit is configured to output a jump address signal of a branch destination obtained as a result of decoding the instruction to the address predictor, the control method of the program development support device. A first step of predicting a jump address of a branch destination by the address predictor; When the jump address of the branch destination predicted by the first means is different from the jump address of the branch destination output by the instruction decoder control unit, the branch address of the branch destination output by the instruction decoder control unit is output. And a second step of correcting the jump address to a previous jump address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP37130199A JP2001184231A (en) | 1999-12-27 | 1999-12-27 | Program development supporting device and method of controlling the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP37130199A JP2001184231A (en) | 1999-12-27 | 1999-12-27 | Program development supporting device and method of controlling the same |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2001184231A true JP2001184231A (en) | 2001-07-06 |
Family
ID=18498477
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP37130199A Pending JP2001184231A (en) | 1999-12-27 | 1999-12-27 | Program development supporting device and method of controlling the same |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2001184231A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008033849A (en) * | 2006-08-01 | 2008-02-14 | Hitachi Ltd | Failure analysis system |
WO2012093489A1 (en) | 2011-01-07 | 2012-07-12 | 富士通株式会社 | Computation processing device and branch prediction method |
-
1999
- 1999-12-27 JP JP37130199A patent/JP2001184231A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008033849A (en) * | 2006-08-01 | 2008-02-14 | Hitachi Ltd | Failure analysis system |
WO2012093489A1 (en) | 2011-01-07 | 2012-07-12 | 富士通株式会社 | Computation processing device and branch prediction method |
US8751776B2 (en) | 2011-01-07 | 2014-06-10 | Fujitsu Limited | Method for predicting branch target address based on previous prediction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7523240B2 (en) | Interrupt controller and interrupt control method | |
JP2001184231A (en) | Program development supporting device and method of controlling the same | |
JPH0418635A (en) | Digital signal processor | |
JP2009075875A (en) | Counter circuit, dynamic reconfiguration circuit, and loop processing control method | |
JP2009505302A (en) | Waveform generation method and apparatus using a microcontroller | |
JP2979653B2 (en) | Information processing device | |
JP2870812B2 (en) | Parallel processor | |
JPH0573296A (en) | Microcomputer | |
JP2636192B2 (en) | Information processing device | |
JP2000222010A (en) | Microcontroller for sequence control | |
JPH10319096A (en) | Semiconductor testing device | |
JP3678656B2 (en) | Interface circuit, logic circuit verification method, logic device, information processing device | |
JP3085371B2 (en) | Associative memory search circuit | |
JP2010231635A (en) | Context creation program, compiler, and context creation method | |
JP2003131890A (en) | Interrupt control device | |
JPH09251382A (en) | Program controller | |
JPH1049398A (en) | Program counter reproduction circuit | |
JPH0736819A (en) | Dma data transfer device | |
JPH11120070A (en) | Data readout controller | |
JPH10214209A (en) | Data processor having debugging function | |
JP2001290638A (en) | Computer system and instruction exchanging method | |
JP2000353098A (en) | Interrupt control circuit | |
JPH04181334A (en) | Interruption generating circuit for debugging | |
JPH0545984B2 (en) | ||
JPH0520062A (en) | Data processor |