JPH02242443A - Debugging mechanism for information processor - Google Patents

Debugging mechanism for information processor

Info

Publication number
JPH02242443A
JPH02242443A JP1064064A JP6406489A JPH02242443A JP H02242443 A JPH02242443 A JP H02242443A JP 1064064 A JP1064064 A JP 1064064A JP 6406489 A JP6406489 A JP 6406489A JP H02242443 A JPH02242443 A JP H02242443A
Authority
JP
Japan
Prior art keywords
address
debug
instruction
control circuit
control
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
JP1064064A
Other languages
Japanese (ja)
Inventor
Masahiko Yamamouri
山毛利 雅彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP1064064A priority Critical patent/JPH02242443A/en
Publication of JPH02242443A publication Critical patent/JPH02242443A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To reduce overhead in the migration of control to a debug routine by reading out and executing debug instructions set in advance from a main memory device by an address set in advance when a prescribed address is detected. CONSTITUTION:When coincidence between an instruction address stored in an instruction address register 6 and a debug address stored in a debug address register 7 is detected at a comparator 8, output from a control circuit 5 is selected at an address control circuit 3. In other words, a debug instruction word from the main memory device 11 from which only the present number of instruction words is read out from a start address set in advance by the control of the control circuit 5 is decoded and executed at an address generation circuit 3 and a decoder 4. Thereby, it is possible to reduce the overhead in the migration of the control to the debug routine, and to obtain a flexible debugging function.

Description

【発明の詳細な説明】 技術分野 本発明はデバッグ機構に関し、特に先取りされた命令を
格納する格納手段を含む情報処理装置のデバッグ機構に
関する。
TECHNICAL FIELD The present invention relates to a debugging mechanism, and more particularly to a debugging mechanism for an information processing apparatus including storage means for storing prefetched instructions.

従来技術 従来、この種のデバッグ機構においては、デバッグに必
要なポイントで特殊なデバッグ割込みなどを発生させて
デバッグ機能を実現させていた。
Prior Art Conventionally, in this type of debugging mechanism, the debugging function was realized by generating special debugging interrupts at points necessary for debugging.

たとえば、ある番地の命令が実行される前の汎用レジス
タあるいはメモリエリアの内容をタンプするようなデバ
ッグ機能の場合には、以下のようにして実現される。
For example, a debug function that tamps the contents of a general-purpose register or memory area before an instruction at a certain address is executed is implemented as follows.

すなわち、該番地の命令が取出されたことが割込み信号
によりファームウェアに通知され(以下デバッグ割込み
とする)、テバッグ割込みを受けたファームウェアでは
割込み処理が行われて、命令の実行制御がラフ1〜ウエ
アの割込み処理ルーチンに切替えられる。
In other words, the firmware is notified by an interrupt signal that the instruction at the address has been fetched (hereinafter referred to as a debug interrupt), and the firmware that received the debug interrupt performs interrupt processing, and the instruction execution control is changed from rough 1 to software. The interrupt handling routine is switched to.

ソフトウェアの割込み処理ルーチンにおいては割込みの
内容が解析されて所定の処理ルーチンに制御が渡され、
この処理ルーチンにより汎用レジスタあるいはメモリエ
リアの内容がタンプされる。
In the software interrupt processing routine, the contents of the interrupt are analyzed and control is passed to a predetermined processing routine.
This processing routine tamps the contents of a general-purpose register or memory area.

このような従来のデバッグ機構では、ハードウェアまた
はファームウェアによる割込み処理やソフ1〜ウェアに
よる割込み処理などによりデバッグルーチンに制御が渡
されることによりデバッグ機能が実現されているので、
これらの割込み処理のためのオーバヘッドがあるという
欠点がある。
In such conventional debugging mechanisms, the debugging function is realized by passing control to the debugging routine through interrupt processing by hardware or firmware, interrupt processing by software 1 to software, etc.
The disadvantage is that there is overhead for processing these interrupts.

発明の目的 本発明は上記のような従来のものの欠点を除去すべくな
されたものて、デバッグルーチンへの制御の移行におけ
るオーバヘッドを削減することができ、フレキシブルな
デバッグ機能を実現することができるデバッグ機構の提
供を目的とする。
OBJECTS OF THE INVENTION The present invention has been made in order to eliminate the above-mentioned drawbacks of the conventional methods. The purpose is to provide a mechanism.

発明の構成 本発明によるデバッグ機構は、主記憶装置と、先取りさ
れた命令を格納する格納手段とを含む情報処理装置のデ
バッグ機構であって、前記格納手段における読出しアド
レスと予め設定された所定アドレスとの一致を検出する
検出手段と、前記検出手段により一致が検出されたとき
、予め設定されたアドレスにより前記主記憶装置から予
め設定された個数のデバッグ命令を読出す読出し手段と
、前記読出し手段により読出された前記デバッグ命令を
実行する手段とを有することを特徴とする。
Composition of the Invention A debugging mechanism according to the present invention is a debugging mechanism for an information processing apparatus that includes a main memory and a storage means for storing pre-fetched instructions, and the debugging mechanism is a debugging mechanism for an information processing device that includes a main memory and a storage means for storing a prefetched instruction. a detecting means for detecting a match with the above, a reading means for reading a preset number of debug instructions from the main storage device at a preset address when a match is detected by the detecting means, and the reading means and means for executing the debug instruction read by.

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

第1図は本発明の一実施例の構成を示すブロック図であ
る。図において、命令バッファ(IB)■には先取りさ
れた命令語が格納され、必要に応じて選択器9を介して
命令レジスタ(IR)2に読出される。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. In the figure, a prefetched instruction word is stored in an instruction buffer (IB) 2, and read out to an instruction register (IR) 2 via a selector 9 as required.

通常の命令供給動作においては、命令レジスタ2に格納
された命令語がアドレス制御回路3および命令デコーダ
4に供給され、アドレス制御回路3ては該命令語からオ
ペランドアドレスが生成されて出力されるとともに、該
命令語か命令デコーダ4で解読されてメモリリクエスト
などが制御される。
In a normal instruction supply operation, the instruction word stored in the instruction register 2 is supplied to the address control circuit 3 and the instruction decoder 4, and the address control circuit 3 generates and outputs an operand address from the instruction word. , the command word is decoded by the command decoder 4, and memory requests and the like are controlled.

命令アドレスレジスタ(IAR)6は命令レジスタ2に
格納されている解読中の命令語のアドレスを保持し、新
たな命令語が命令バッファ1から命令レジスタ2に読出
されると、「1」が加算されて更新される。
The instruction address register (IAR) 6 holds the address of the instruction word being decoded stored in the instruction register 2, and when a new instruction word is read from the instruction buffer 1 to the instruction register 2, "1" is added. and updated.

デバッグ機能の動作においては、上述の如く命令の解読
処理が進み、比較器8において命令アドレスレジスタ6
の内容とデバッグアドレスレジスタ(DAR)7の内容
との一致が検出されると、すなわちこれから解読しよう
とする命令にブレークポイントが設定されていることが
検出されると、比較器8からアドレス制御回路3、制御
回路5、選択器9に夫々一致信号が出力される。
In the operation of the debug function, the instruction decoding process progresses as described above, and the comparator 8 reads the instruction address register 6.
When a match is detected between the contents of the debug address register (DAR) 7 and the contents of the debug address register (DAR) 7, that is, when it is detected that a breakpoint has been set for the instruction to be decoded, the address control circuit is 3. A coincidence signal is output to the control circuit 5 and selector 9, respectively.

アドレス制御回路3では比較器8からの一致信号により
制御回路5からの出力が選択され、制御回路5から供給
されるアドレスにしたがってデバッグ命令語を取出すべ
く、リフニス1−が生成されてメモリ制御部10に送出
される。
In the address control circuit 3, the output from the control circuit 5 is selected by the match signal from the comparator 8, and a refnis 1- is generated in order to extract the debug instruction word according to the address supplied from the control circuit 5. 10.

ここで、デバッグアドレスレジスタ7にはデバッグのた
めのブレークポイントを示す命令アドレスがソフトウェ
アによる設定、あるいは装置立上は時の初期値設定など
により格納されている。
Here, an instruction address indicating a break point for debugging is stored in the debug address register 7 by setting by software or by setting an initial value at the time of device start-up.

メモリ制御部10では該リクエストに応じて主記憶装置
11からデバッグ命令語を取出し、そのデバッグ命令語
を選択器9を介して命令レジスタ2に格納する。このと
き、選択器9では比較器8からの一致信号によりメモリ
制御部10からのデバッグ命令語を選択するように切換
えられている。
The memory control unit 10 takes out a debug instruction from the main memory 11 in response to the request, and stores the debug instruction in the instruction register 2 via the selector 9. At this time, the selector 9 is switched to select the debug command from the memory control section 10 based on the match signal from the comparator 8.

この後、命令レジスタ2に格納されたデバッグ命令語は
アドレス制御回路3および命令デコーダ4に供給され、
該命令の解読が行われる。このデバッグ命令語は制御回
路5の制御により予め設定された個数たけ実行される。
Thereafter, the debug instruction word stored in the instruction register 2 is supplied to the address control circuit 3 and instruction decoder 4,
The instruction is decoded. A preset number of debug command words are executed under the control of the control circuit 5.

一般に、デバッグ命令語群が実行された後に、デバッグ
ルーチンへと制御が移行される。
Generally, after the debug commands are executed, control is transferred to the debug routine.

第2図は第1図の制御回路5の動作を示すフローチャー
1〜である。これら第1図および第2図を用いて本発明
の一実施例の動作について説明する。
FIG. 2 is a flowchart 1 to 1 showing the operation of the control circuit 5 of FIG. 1. The operation of an embodiment of the present invention will be explained using FIG. 1 and FIG. 2.

デバッグ機能の動作において、比較器8で命令アドレス
レジスタ6の内容とデバッグアドレスレジスタ7の内容
との一致が検出されると、すなわぢこれから解読しよう
とする命令にブレークポイン1〜が設定されていること
か検出されると、比較器8からアドレス制御回路3、制
御回路5、選択器9に夫々一致信号が出力される。
In the operation of the debug function, when the comparator 8 detects a match between the contents of the instruction address register 6 and the contents of the debug address register 7, breakpoints 1 to 1 are set for the instruction to be decoded. When it is detected that there is a match signal, the comparator 8 outputs a match signal to the address control circuit 3, control circuit 5, and selector 9, respectively.

アドレス制御回路3では比較器8からの一致信号により
制御回路5からの出力が選択され、制御回路5から供給
されるアドレスにしたがってデバッグ命令語を取出ずべ
く、リフニス1〜が生成されてメモリ制御部10に送出
される。
In the address control circuit 3, the output from the control circuit 5 is selected by the match signal from the comparator 8, and in order to extract the debug command word according to the address supplied from the control circuit 5, refnis 1~ are generated to control the memory. The information is sent to section 10.

すなわち、制御部li+85では比較器8からの一致信
号によりデバッグ処理が起動され(第2図ステップ21
)、予め設定されたスタートアドレスがアドレス制御回
路3に送出されるので(第2図ステップ22)、アドレ
ス制御回路3では制御回路5から1共給されるスタート
アドレスにしたがってリクエストが生成されてメモリ制
御部10に送出される(第2図ステップ23)。
That is, in the control unit li+85, the debugging process is activated by the coincidence signal from the comparator 8 (step 21 in FIG. 2).
), the preset start address is sent to the address control circuit 3 (step 22 in Figure 2), so the address control circuit 3 generates a request in accordance with the start address supplied from the control circuit 5 and sends it to the memory. It is sent to the control unit 10 (step 23 in FIG. 2).

メモリ制御部10では該リクエストに応じて、スタート
アドレスに対応する主記憶装置11のアドレスからデバ
ッグ命令語を取出し、そのデバッグ命令語を選択器9を
介して命令レジスタ2に格納する。このとき、選択器9
では比較器8からの一致信号によりメモリ制御部10か
らのデバッグ命令語を選択するように切換えられている
In response to the request, the memory control unit 10 extracts a debug instruction word from the address of the main storage device 11 corresponding to the start address, and stores the debug instruction word in the instruction register 2 via the selector 9. At this time, selector 9
In this case, the match signal from the comparator 8 causes switching to select the debug command from the memory control unit 10.

この後、命令レジスタ2に格納されたデバッグ命令語は
アドレス制御回路3および命令デコーダ4に供給され、
該命令の解読が行われる。
Thereafter, the debug instruction word stored in the instruction register 2 is supplied to the address control circuit 3 and instruction decoder 4,
The instruction is decoded.

このデバッグ命令語の処理が完了すると(第2図ステッ
プ24)、制御回路5ではアドレス制御回路3へのアド
レス、ここではスタートアドレスに「1」を加算してア
ドレス制御回路3に送出する(第2図ステップ25)。
When the processing of this debug instruction word is completed (step 24 in FIG. 2), the control circuit 5 adds "1" to the address to the address control circuit 3, here the start address, and sends it to the address control circuit 3 (step 24 in FIG. 2). Figure 2 step 25).

このとき、アドレス制御回路3に送出したアドレスが、
スタートアドレスに予め設定された命令ワード数を加え
たものと一致すれば(第2図ステップ26)、制御回路
5はこの処理を終了する(第2図ステップ27)。
At this time, the address sent to the address control circuit 3 is
If it matches the start address plus the preset number of instruction words (step 26 in FIG. 2), the control circuit 5 ends this process (step 27 in FIG. 2).

また、それらのアドレスが一致しなければ(第2図ステ
ップ26)、制御回路5はそれらのアドレスが一致する
まで−F述の処理(第2図ステップ23〜26)を繰返
し行う。すなわち、デバッグ命令語は制御回路5の制御
により予め設定された個数たけ実行される。
If the addresses do not match (step 26 in FIG. 2), the control circuit 5 repeats the process described in -F (steps 23 to 26 in FIG. 2) until the addresses match. That is, a preset number of debug command words are executed under the control of the control circuit 5.

ここで、制御部!?85においてはスタートアドレスお
よび命令ワード数がソフトウェアによる設定、あるいは
装置立上げ時の初期値設定などにより格納されている。
Here, the control section! ? In 85, the start address and the number of instruction words are stored by software settings or initial value settings when starting up the device.

上述のようにして、制御回路5の制御により予め設定さ
れた個数たけデバッグ命令語群が実行されな後に、デバ
ッグルーチンへと制御が移行される。
As described above, after a preset number of debug command groups have been executed under the control of the control circuit 5, control is transferred to the debug routine.

よって、デバッグルーチンへの制御の移行をハードウェ
アまたはファームウェアによる割込み処理やソフトウェ
アによる割込み処理などを用いることなく行うことがで
きるので、デバッグルーチンへの制御の移行におけるオ
ーバヘッドを削減することができ、フレキシブルなデバ
ッグ機能を実現することができる。
Therefore, control can be transferred to the debug routine without using hardware or firmware interrupt processing or software interrupt processing, which reduces the overhead in transferring control to the debug routine, making it more flexible. It is possible to realize various debugging functions.

このように、命、令アドレスレジスタ6に格納されな命
令アドレスと、デバッグアドレスレジスタ7に格納され
ているデバッグアドレスとの一致が比較器8で検出され
たとき、ずなわちこれから解読しようとする命令にブレ
ークポイントが設定されていることが検出されたときに
、制御回路5の制御により予め設定されたスタートアド
レスから、予め設定された命令ワード数たけ読出された
主記憶装置11からのデバッグ命令語をアドレス生成口
!?4)3および命令デコーダ4で解読して実行するよ
うにすることによって、デバッグルーチンへの制御の移
行をハードウェアまたはファームウェアによる割込み処
理やソフトウェアによる割込み処理なとを用いることな
く行うことができる。
In this way, when the comparator 8 detects a match between the instruction address stored in the instruction address register 6 and the debug address stored in the debug address register 7, the instruction address that is to be decoded from now on is detected. When it is detected that a breakpoint has been set in an instruction, a debug instruction is read from the main memory 11 for a preset number of instruction words from a preset start address under the control of the control circuit 5. Word address generation mouth! ? 4) By decoding and executing the command in step 3 and instruction decoder 4, control can be transferred to the debug routine without using interrupt processing by hardware or firmware or interrupt processing by software.

よって、デバッグルーチンへの制御の移行におけるオー
バヘッドを削減することができ、フレキシブルなデバッ
グ機能を実現することができる。
Therefore, the overhead in transferring control to the debug routine can be reduced, and flexible debug functions can be realized.

発明の詳細 な説明したように本発明によれば、予め設定された所定
アドレスが検出されたときに、予め設定されたアドレス
により主記憶装置から予め設定された個数のデバッグ命
令を読出して実行するようにすることによって、デバッ
グルーチンへの制御の移行におけるオーバヘッドを削減
することができ、フレキシブルなデバッグ機能を実現す
ることができるという効果がある。
DETAILED DESCRIPTION OF THE INVENTION According to the present invention, when a predetermined address is detected, a predetermined number of debug instructions are read from the main memory at the predetermined address and executed. By doing so, the overhead in transferring control to the debug routine can be reduced, and a flexible debug function can be realized.

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

第1図は本発明の一実施例の構成を示ずブ1″7ツク図
、第2図は第1図の制御回路の動作を示すフローチャー
I・である。 主要部分の符号の説明 2・・・・・・命令レジスタ 3・・・・・・アドレス制御回路 4・・・・・・命令デコーダ 5・・・・・・制御回路 6・・・・・・命令アドレスレジスタ 7・・・・・・デバッグアドレスレジスタ8・・・・・
・比較器 9・・・・・・選択器 10・・・・・・メモリ制御部 11・・・・・・主記憶装置
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, and FIG. 2 is a flowchart I showing the operation of the control circuit shown in FIG. 1. Explanation of symbols of main parts 2 ...Instruction register 3 ...Address control circuit 4 ...Instruction decoder 5 ...Control circuit 6 ...Instruction address register 7 ... ...Debug address register 8...
・Comparator 9...Selector 10...Memory control unit 11...Main storage device

Claims (1)

【特許請求の範囲】[Claims] (1)主記憶装置と、先取りされた命令を格納する格納
手段とを含む情報処理装置のデバッグ機構であって、前
記格納手段における読出しアドレスと予め設定された所
定アドレスとの一致を検出する検出手段と、前記検出手
段により一致が検出されたとき、予め設定されたアドレ
スにより前記主記憶装置から予め設定された個数のデバ
ッグ命令を読出す読出し手段と、前記読出し手段により
読出された前記デバッグ命令を実行する手段とを有する
ことを特徴とするデバッグ機構。
(1) A debugging mechanism for an information processing device including a main memory device and storage means for storing pre-fetched instructions, the detection detecting a match between a read address in the storage means and a predetermined address set in advance. means, reading means for reading a preset number of debug instructions from the main storage device at a preset address when a match is detected by the detection means, and the debug instructions read by the reading means. A debugging mechanism characterized in that it has a means for executing.
JP1064064A 1989-03-16 1989-03-16 Debugging mechanism for information processor Pending JPH02242443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1064064A JPH02242443A (en) 1989-03-16 1989-03-16 Debugging mechanism for information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1064064A JPH02242443A (en) 1989-03-16 1989-03-16 Debugging mechanism for information processor

Publications (1)

Publication Number Publication Date
JPH02242443A true JPH02242443A (en) 1990-09-26

Family

ID=13247290

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1064064A Pending JPH02242443A (en) 1989-03-16 1989-03-16 Debugging mechanism for information processor

Country Status (1)

Country Link
JP (1) JPH02242443A (en)

Similar Documents

Publication Publication Date Title
JPS63111545A (en) Microprocessor for debug
JPH0713772A (en) Data processor
KR100267410B1 (en) Information processing device and generating method of interrupt signal thereof
JPH02242443A (en) Debugging mechanism for information processor
JP2653412B2 (en) How to set breakpoints
JPH02161538A (en) Debugging mechanisms for information processor
JP2808757B2 (en) Microprocessor for debugging
JPH0795288B2 (en) Microcomputer
JP3011166B2 (en) Debug circuit
KR910006841A (en) Data processing unit based on microprogram control
JPS5894041A (en) Debug backup device for high-class language
JPH0353348A (en) Debugging system for microprogram
JPH02242444A (en) Debugging mechanism for information processor
JPH02242445A (en) Debugging mechanism for information processor
JPH01240941A (en) Information processor
JPH07191879A (en) Microprocessor provided with executing function of instruction for debugging and debugging method
JPH02191046A (en) Tracing system for program
JPS59200356A (en) Program tracing system
JPH07152541A (en) Switching method for system non-interruption program
JPH04332045A (en) Arithmetic processor
JPH05204710A (en) Event tracer
JPS60247752A (en) Breakpoint setting system of symbolic debugger
JPS6349941A (en) Arithmetic processing unit
JPH04264624A (en) Processor
JPH0659931A (en) Debugging device