JPS6091458A - Program debug device of microprocessor - Google Patents

Program debug device of microprocessor

Info

Publication number
JPS6091458A
JPS6091458A JP58198639A JP19863983A JPS6091458A JP S6091458 A JPS6091458 A JP S6091458A JP 58198639 A JP58198639 A JP 58198639A JP 19863983 A JP19863983 A JP 19863983A JP S6091458 A JPS6091458 A JP S6091458A
Authority
JP
Japan
Prior art keywords
address
program
circuit
information
instruction
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
JP58198639A
Other languages
Japanese (ja)
Inventor
Haruhiko Okamura
岡村 治彦
Osamu Yoshida
美田 修
Masahiro Hata
昌弘 秦
Masakazu Yamaguchi
山口 政数
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP58198639A priority Critical patent/JPS6091458A/en
Publication of JPS6091458A publication Critical patent/JPS6091458A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Abstract

PURPOSE:To inspect easily the using state of a program at the actual working place of a debug device by comparing the address of information read out of a read-only fixed memory with a specific address. CONSTITUTION:A specific address with which the discontinuation of execution is desired is set to a register circuit 4 from a test console 6. Then an execution start command is applied from the console 6. In this case, the address of information is latched to an address latch circuit 2 every time said information is read out of an ROM by a CPU1. If the information is equal to an ''instruction'', the corresponding address is delivered to a comparator 5 by an instruction fetch detecting circuit 3. The comparator 5 outputs an instruction signal to the CPU1 when the coincidence is obtained between the address set at the circuit 4 and the address supplied from the circuit 3. Then the CPU1 discontinues its execution by said interruption signal and outputs an address, etc. to the console 6.

Description

【発明の詳細な説明】 (a)発明の技術分野 本発明は、続出専用固定記憶装置に書込まれているプロ
グラムのデバッグを行うマイクロプロセッサのプログラ
ムデバッグ装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (a) Technical Field of the Invention The present invention relates to a program debugging device for a microprocessor that debugs a program written in a reprint-only fixed storage device.

(b)技術の背景 最近は集積回路技術の発達により、マイクロプロセッサ
(以下MPUと略称する)を用いてソフトウェアにより
機器の制御を行う装置が多く出現するようになって来た
。これらに用いられるプログラムは処理スピードやプロ
グラムの記憶形式、即ち電源のオン・オフにより記憶さ
れているプログラムが消去されないことで続出専用固定
記憶装置(以下ROMと略称する)に書込まれる場合が
多い。
(b) Background of the Technology Recently, with the development of integrated circuit technology, many devices have appeared that use microprocessors (hereinafter abbreviated as MPUs) to control devices by software. The programs used in these applications are often written in fixed storage devices (hereinafter referred to as ROMs) due to the processing speed and storage format of the programs, i.e., the stored programs are not erased even when the power is turned on and off. .

しかし、使用されているプログラムは必ずしも完全なも
のではなく、実際に使用して特定の使用条件が合致した
時のみ問題を起こ讐場合もあり、このような場合は機器
の設置されている場所で使用されているプログラムの内
容を簡単に見て早急に原因を究明したい場合があるが、
書込゛みが出来ないROMの場合は、プログラムの実行
を特定個所で中止したり、再び実行したりして内容を見
ることは特定の機器がないと出来ない。
However, the programs used are not necessarily perfect, and problems may occur only when specific usage conditions are met during actual use. Sometimes you may want to quickly determine the cause by looking at the contents of the program being used.
In the case of a ROM that cannot be written to, it is not possible to stop the execution of a program at a specific point, or to re-execute it and view the contents without a specific device.

ROMを搭載しているMPUを用いた機器の保守業務を
容易にするためにも、又ROMに書き込んだプログラム
のデバッグ作業を容易にするためにも。
In order to facilitate the maintenance work of equipment using MPU equipped with ROM, and also to facilitate the debugging work of programs written in ROM.

特別の機器がなくとも簡単に特定個所でプログラムの中
止、再実行が出来るプログラムデバッグ装置の開発が望
まれる。
It is desired to develop a program debugging device that can easily stop and rerun a program at a specific point without special equipment.

(C)従来技術と問題点 MPIIのプログラムをデバッグする場合、特定の命令
番地でデバッグすべきプログラムの実行を中止し、記憶
装置の内容を参照したいことがある。
(C) Prior Art and Problems When debugging an MPII program, it may be desirable to stop execution of the program to be debugged at a specific instruction address and refer to the contents of the storage device.

プログラムがデータ書込み可能なランダム・アクセスメ
モリ(以下RAMと略称する)に書込みされている場合
は、停止したい番地の命令を割り込み命令に変えておき
、その割り込み命令を実行することにより、デバッグす
べきプログラムの実行を中止することが出来る。
If the program is written to data-writable random access memory (hereinafter referred to as RAM), you should debug it by changing the instruction at the address you want to stop to an interrupt instruction and executing that interrupt instruction. Program execution can be stopped.

しかし、電源の切断を自由にしたい個所で使用する場合
は記憶情報が永久に消失することのないROMを使用す
る必要があるが、 ROMに書き込まれた内容は書き換
えることが出来ないため、 ROM書込みのプログラム
をデバッグする場合、 RAMでプログラムデバッグを
して最終のプログラムにしてROMに書き込むか、持ち
運び不便な特定の装置(例えば専用MPtlを持ちキー
ボード付きのディスプレイにプログラム内容を表示する
インサーキットエミュレータ等)を接続してプログラム
デバッグをする等の方法をとる必要があった。
However, if you want to use it in a place where you want to be able to freely turn off the power, it is necessary to use a ROM whose stored information will not be lost forever, but since the contents written in the ROM cannot be rewritten, it is not possible to write to the ROM. When debugging a program, either debug the program in RAM and write the final program to ROM, or use a specific device that is inconvenient to carry (for example, an in-circuit emulator that has a dedicated MPTL and displays the program contents on a display with a keyboard). ) to debug the program.

しかし、実際の稼働状態で簡単にしかも早急にプログラ
ムの不良個所を見つけたい場合は即座に対応出来ないと
言う問題があった。
However, if you want to quickly and easily find a defective part of a program under actual operating conditions, there is a problem in that it cannot be done immediately.

(d)発明の目的 本発明は、上記問題点を解消した新規なMP[Iのプロ
グラムデバッグ装置を提供することを目的とし、特にR
OMに書き込まれたプログラムを特定の装置を接続する
ことなく、ROMを搭載している装置の既存のハードウ
ェアに組み込まれた機能により、装置の実際の稼働場所
でプログラムの使用状態を簡単に検証することが可能な
l’lPυのプログラムデバッグ装置を実現することに
ある。
(d) Purpose of the Invention The object of the present invention is to provide a new MP[I program debugging device that solves the above-mentioned problems.
The usage status of the program can be easily verified at the actual operating location of the device by using the function built into the existing hardware of the device equipped with ROM, without connecting the program written in the OM to a specific device. The object of the present invention is to realize a program debugging device capable of l'lPυ.

(8)発明の構成 本発明は、実行すべきプログラムが続出専用固定記憶装
置に書込まれており、前記続出専用固定記憶装置に書込
まれている実行すべきプログラムを読み取り制御するマ
イクロプロセッサを備えてなる装置において、前記続出
専用固定記憶装置に書込まれているプログラムをデバッ
グするために。
(8) Structure of the Invention The present invention provides a microprocessor in which a program to be executed is written in a fixed storage device for continuous use only, and a microprocessor is used to read and control the program to be executed written in the fixed storage device for continuous use only. In the apparatus comprising: debugging a program written in the reprintable fixed storage device;

前記プログラムの実行を中止したり、再実行したりする
特定番地をセットする手段と、前記マイクロプロセッサ
が前記続出専用固定記憶装置に書込まれている情報を読
出す度に、読出した情報の番地をラッチする手段と、前
記特定番地をセットする手段の出力情報と前記読出した
情報の番地をラッチする手段の出力情報とを比較する手
段とを備え、前記続出専用固定記憶装置に書き込まれた
プログラムを前記装置の既存のハードウェアに組み込ま
れた機能により実際の稼働場所でプログラムの使用状態
をi**に検証することが可能なることを特徴とするM
PIJのプログラムデバッグ方法により達成することが
出来る。
means for setting a specific address at which execution of the program is stopped or re-executed, and an address of the read information each time the microprocessor reads the information written in the reprint-only fixed storage device; and means for comparing the output information of the means for setting the specific address and the output information of the means for latching the address of the read information, and the program is written in the fixed storage device for continuous use. M characterized in that the usage state of the program can be verified i** at the actual operating location by a function built into the existing hardware of the device.
This can be achieved using the PIJ program debugging method.

(f)発明の実施例 以下本発明を図面を参照して説明する。(f) Examples of the invention The present invention will be explained below with reference to the drawings.

第1図は本発明に係る装置の一実施例、第2図は他の実
施例の動作順序をそれぞれ示す。
FIG. 1 shows one embodiment of the apparatus according to the present invention, and FIG. 2 shows the operating sequence of another embodiment.

図において、1は中央処理装置(以下CPIIと略称す
る)、2はアドレスラッチ回路、3は命令フェッチ検出
回路、4はレジスタ回路、5は比較器回路、6はテスト
用コンソールをそれぞれ示す。
In the figure, 1 is a central processing unit (hereinafter abbreviated as CPII), 2 is an address latch circuit, 3 is an instruction fetch detection circuit, 4 is a register circuit, 5 is a comparator circuit, and 6 is a test console.

本実施例はプログラムにより装置(図示してない)全体
の動作を制御するCPIII、 CPIIIがROM 
(図示してない)から取り出した情報のアドレスを次の
情報を取り出すまで記憶するアドレスラッチ回路2.ア
ドレスランチ回路2へ記憶しているアドレスからCPU
IがROM (図示してない)から「命令」を取り出し
たことを検出し、取り出した「命令」のアドレスを比較
器回路5に出力する命令フェッチ検出回路3.CPII
Iを停止したいアドレス(ブレイクアドレスと言う)を
設定しておくレジスタ回路4.命令フェッチ検出回路3
の出力して来たアドレスとレジスタ回路4に設定したブ
レイクアドレスを比較して一致した時信号を出力する比
較器回路5.装置(図示してない)に接続してCPUI
に各種の試験命令を投入して装置(図示してない)の機
能試験を行うテスト用コンソール6から構成されている
In this embodiment, the CPIII controls the operation of the entire device (not shown) by a program, and the CPIII is a ROM.
2. Address latch circuit (not shown) that stores the address of information retrieved from a source until the next information is retrieved. From the address stored in the address launch circuit 2 to the CPU
An instruction fetch detection circuit 3 that detects that I has fetched an "instruction" from a ROM (not shown) and outputs the address of the fetched "instruction" to the comparator circuit 5. C.P.II.
4. A register circuit that sets the address at which you want to stop I (referred to as a break address). Instruction fetch detection circuit 3
Comparator circuit 5 which compares the output address with the break address set in the register circuit 4 and outputs a signal when they match. Connect to a device (not shown) and use the CPU
The test console 6 is configured to input various test commands to perform a functional test of the device (not shown).

尚アドレスラッチ回路2.命令フ工ツチ検出回路3.レ
ジスタ回路4.比較器回路5は装置(図示してない)内
に初期から実装されるものとする。
Note that the address latch circuit 2. Instruction function detection circuit 3. Register circuit 4. It is assumed that the comparator circuit 5 is initially implemented in the device (not shown).

又テスト用コンソール6は通常は接続されてなく機能テ
スI・の時のみ接続する携帯用で簡単に持ち運び可能な
ものとする。
Further, the test console 6 is designed to be portable and easily portable, as it is not normally connected and is connected only during the function test I.

次に本実施例の動作を動作ステップに順じて説明する。Next, the operation of this embodiment will be explained in order of operation steps.

〔ステップ1〕 :レジスタ回路4に実行を中止したい
特定アドレスをテスト用コンソール6よりセットする。
[Step 1]: Set a specific address at which you want to stop execution in the register circuit 4 from the test console 6.

〔ステップ2〕 :テスト用コンソール6より実行開始
コマンドを投入する。この時、 CPUIがROMから
情報を読み出すたびに、そのアドレスがアドレスラッチ
回路2にラッチされる。もし、その情報が「命令」の時
は命令フェッチ検出回路3により。
[Step 2]: Input an execution start command from the test console 6. At this time, each time the CPUI reads information from the ROM, the address is latched into the address latch circuit 2. If the information is an "instruction", it is determined by the instruction fetch detection circuit 3.

そのアドレスが比較器回路5に出力される。The address is output to comparator circuit 5.

〔ステップ3〕 ;レジスタ回路4にセットされている
アドレスと命令フェッチ検出回路3から入力されたアド
レスが一致した時は、比較器回路5はCPUIに対して
割り込み信号を出力する。
[Step 3]; When the address set in the register circuit 4 and the address input from the instruction fetch detection circuit 3 match, the comparator circuit 5 outputs an interrupt signal to the CPUI.

(ステップ4) :CPU1は比較器回路5からの割り
込み信号により実行を中止したアドレス等をテスト用コ
ンソール6に出力する。
(Step 4): The CPU 1 outputs the address, etc. whose execution was stopped to the test console 6 in response to an interrupt signal from the comparator circuit 5.

〔ステップ5〕 二次の操作により〔ステップ1〕に戻
る。
[Step 5] Return to [Step 1] by secondary operation.

次にその他の実施例として、デバッグしたいROM (
図示してない)と同−MPII (図示してない)内の
他目的に使用しているRAM (図示してない)の一部
に上記実施例と同一内容の処理プログラムを書き込んで
行う実施例について説明する。
Next, as another example, consider the ROM (
Example of writing the same processing program as the above example into a part of the RAM (not shown) used for other purposes in the MPII (not shown) I will explain about it.

尚本実施例の動作は第2図で示す如<MPII (図示
してない)の持つシングルステップ動作(1命令実行毎
に割り込み発生)を利用したものである。
The operation of this embodiment utilizes the single step operation (an interrupt occurs every time one instruction is executed) of the MPII (not shown) as shown in FIG.

〔ステップ1〕 :テスI・用コンソール6を装W(図
示してない)に接続してテスト用コンソール6からRO
M (図示してない)用ストップコマンドを打ち込みR
OM (図示してない)テストモードに切り換える。
[Step 1]: Connect the test I console 6 to the equipment W (not shown) and connect the test console 6 to the RO.
Enter the stop command for M (not shown) and press R.
OM (not shown) Switch to test mode.

〔ステップ2〕 :テスト用コンソール6よりブレイク
アドレスをRAM (図示してない)に格納する。
[Step 2]: Store the break address in RAM (not shown) from the test console 6.

[ステップ3] :MPU (図示してない)をシング
ルステップ動作にする。
[Step 3]: Put the MPU (not shown) into single-step operation.

〔ステップ4〕 :デバッグすべきプログラムを一命令
実行させる。
[Step 4]: Execute one instruction of the program to be debugged.

〔ステップ5〕 :シングルステンプ割り込み処理。[Step 5]: Single step interrupt processing.

〔ステップ6〕 :割り込み処理した「命令」のアドレ
スをめる。
[Step 6]: Enter the address of the "instruction" that processed the interrupt.

〔ステップ7〕 :割り込み処理した「命令」のアドレ
スとRAM (図示してない)に格納したブレイクアド
レスをMPU (図示してない)内で比較し。
[Step 7]: The address of the "instruction" processed by the interrupt is compared with the break address stored in the RAM (not shown) in the MPU (not shown).

MPU (図示してない)内での比較結果が一致すれば
、その時の「命令」の記憶内容をテスト用コンソール6
の表示部分に表示させる。
If the comparison results in the MPU (not shown) match, the contents of the "instruction" stored at that time are transferred to the test console 6.
to be displayed in the display area.

〔ステップ8〕 : 〔ステップ7〕での比較結果が一
致しなければ、再度MP[I (図示してない)をシン
グルステップ動作にする。
[Step 8]: If the comparison result in [Step 7] does not match, MP[I (not shown) is made to operate in a single step again.

〔ステップ9〕 ; 〔ステップ4〕に戻り、一致する
まで繰り返す。
[Step 9]; Return to [Step 4] and repeat until they match.

以上のように本発明はハードウェアの追加がなくとも、
既存のハードウェアの一部にプログラムを追加すること
によっても実施することが可能である。
As described above, the present invention does not require any additional hardware.
It can also be implemented by adding a program to a part of existing hardware.

(g)発明の効果 以上の本発明によれば、 ROMに書込まれたプログラ
ムであっても通常使用している装置及び装置に付随する
ハードウェアを用いてデバッグが可能なMPLIのプロ
グラムデバッグ装置を提供出来ると言う効果がある。
(g) Effects of the Invention According to the present invention, there is provided an MPLI program debugging device that can debug even a program written in a ROM using normally used equipment and hardware attached to the equipment. It has the effect of being able to provide the following.

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

第1図は本発明に係る装置の一実施例、第2図は他の実
施例の動作順序をそれぞれ示す。 図において、1はCPU、2はアドレスラッチ回路、3
は命令フェッチ検出回路、4はレジスタ回路、5は比較
器回路、6はテスト用コンソールをそれぞれ示す。 1 郭1図
FIG. 1 shows one embodiment of the apparatus according to the present invention, and FIG. 2 shows the operating sequence of another embodiment. In the figure, 1 is a CPU, 2 is an address latch circuit, and 3 is a CPU.
Reference numeral 4 indicates an instruction fetch detection circuit, 4 a register circuit, 5 a comparator circuit, and 6 a test console. 1 Guo 1 diagram

Claims (1)

【特許請求の範囲】[Claims] 実行すべきプログラムが続出専用固定記憶装置に書込ま
れており9前記続出専用固定記憶装置に書込まれている
実行すべきプログラムを読み取り制御するマイクロプロ
セッサを備えてなる装置において、前記続出専用固定記
憶装置に書込まれているプログラムをデバッグするため
に、前記プログラムの実行を中止したり、再実行したり
する特定番地をセントする手段と、前記マイクロプロセ
ッサが前記続出専用固定記憶装置に書込まれている情報
を読出す度に、読出した情報の番地をラッチする手段と
、前記特定番地をセットする手段の出力情報と前記読出
した情報の番地をラッチする手段の出力情報とを比較す
る手段とを備えたことを特徴とするマイクロプロセッサ
のプログラムデバッグ装置。
A program to be executed is written in a continuous-only fixed storage device, and the apparatus comprises a microprocessor for reading and controlling the program to be executed written in the continuous-only fixed storage device, In order to debug a program written in a storage device, means for specifying a specific address at which execution of the program is stopped or re-executed; Each time the stored information is read, means for latching the address of the read information; and means for comparing the output information of the means for setting the specific address with the output information of the means for latching the address of the read information. A microprocessor program debugging device characterized by comprising:
JP58198639A 1983-10-24 1983-10-24 Program debug device of microprocessor Pending JPS6091458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58198639A JPS6091458A (en) 1983-10-24 1983-10-24 Program debug device of microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58198639A JPS6091458A (en) 1983-10-24 1983-10-24 Program debug device of microprocessor

Publications (1)

Publication Number Publication Date
JPS6091458A true JPS6091458A (en) 1985-05-22

Family

ID=16394551

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58198639A Pending JPS6091458A (en) 1983-10-24 1983-10-24 Program debug device of microprocessor

Country Status (1)

Country Link
JP (1) JPS6091458A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5453842A (en) * 1977-10-05 1979-04-27 Nec Corp Program run control circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5453842A (en) * 1977-10-05 1979-04-27 Nec Corp Program run control circuit

Similar Documents

Publication Publication Date Title
US5751942A (en) Trace event detection during trace enable transitions
US20100153786A1 (en) Processor, multiprocessor, and debugging method
US5129079A (en) Computer system having subinstruction surveillance capability
JPS6091458A (en) Program debug device of microprocessor
KR20210080398A (en) Read-only memory testing with built-in memory self-test controller
JPH0477833A (en) Integrated circuit provided with debugging environment
JPH1049401A (en) Method for debugging program
JP2875606B2 (en) Testing equipment
JPS59183443A (en) Debug device
JPH05173830A (en) Abnormal operation detecting method and emulator
JPH05151021A (en) Debugging system using debugger with built-in resident area
JP2684966B2 (en) I / O processor debug device
JP2686801B2 (en) Microcomputer program development tool
JPH01145740A (en) Emulator for multi-process
JPS5968034A (en) Input and output port simulator for microcomputer developing device
JPS59202546A (en) Debugging device
JPH0721767B2 (en) Emulation method
JPH01232446A (en) Program development assisting device for computer
JPH0635760A (en) Buffer device with tracing function
JPH01184551A (en) System for debugging program
JPH05189267A (en) Operation control system for microprocessor and emulator
JPS61134850A (en) Debugging method of subsequent processor
JPS62197834A (en) Microprogram controller
JPH04264932A (en) In-circuit emulator
JPS59202550A (en) Debugging device