JPH01154253A - Data processor - Google Patents

Data processor

Info

Publication number
JPH01154253A
JPH01154253A JP62314616A JP31461687A JPH01154253A JP H01154253 A JPH01154253 A JP H01154253A JP 62314616 A JP62314616 A JP 62314616A JP 31461687 A JP31461687 A JP 31461687A JP H01154253 A JPH01154253 A JP H01154253A
Authority
JP
Japan
Prior art keywords
access
register
flags
flag
flag register
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
JP62314616A
Other languages
Japanese (ja)
Inventor
Koji Hirano
平野 浩爾
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP62314616A priority Critical patent/JPH01154253A/en
Publication of JPH01154253A publication Critical patent/JPH01154253A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To apply a break to access given to each register and to perform program debugging with high efficiency by setting an interruption permission flag in response to the access flag of an access flag register and carrying out comparison between both flags. CONSTITUTION:When the access is given to registers R1-Rn during execution of a program, access signals a1-an are supplied to an access flag register 1. Then the access flags b1-bn are set. While interruption permission flags C1-Cn set in an interruption permission flag register 2 are compared with corresponding flags b1-bn by a comparator 3 in each bus cycle. When the comparator 3 detects the coincidence among those flags, an interruption signal 4 is activated to interrupt the execution of the program. Then break point processing is carried out.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明は、ソフトウェア開発時のデバッグを容易にす
るデータ処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a data processing device that facilitates debugging during software development.

〔従来の技術〕[Conventional technology]

ソフトウェアの開発時には、プログラムのデバッグを行
う時のために、そのプログラムの途中にいくつかのブレ
イクポイントを設けておき、プログラムのデバッグを行
う際にそこでプログラムの実行を一時中断させる。そし
て、その時点でのデータ処置装置のアクセス状態を調べ
ることにより、プログラムのチエツクを行っている。
When developing software, several breakpoints are set in the middle of the program in order to debug the program, and execution of the program is temporarily suspended at these points when the program is debugged. Then, the program is checked by checking the access state of the data processing device at that time.

第2図はレジスタのアクセス状況を調べるための従来の
ハードウェアの一例を示す構成図である。
FIG. 2 is a block diagram showing an example of conventional hardware for checking the access status of registers.

この図において、11はデータ処理装置(以下CPUと
いう)、12はレジスタ群で、1つ以上のレジスタから
構成されている。R1〜R,は前記レジスタ群12を構
成する個々のレジスタ、1” l−1” nは前記レジ
スタR1−Rn内から転送されたデータを表す。ただし
、nは整数である。
In this figure, 11 is a data processing device (hereinafter referred to as CPU), and 12 is a register group, which is composed of one or more registers. R1 to R represent individual registers constituting the register group 12, and 1"l-1"n represents data transferred from within the registers R1 to Rn. However, n is an integer.

13は外部メモリで、プログラム実行前のレジスタR1
−Rn内のデータr1〜roを記憶する。
13 is external memory, register R1 before program execution
- Store data r1 to ro in Rn.

14はデータバスである。14 is a data bus.

また、第3図はブレイクポイントにおけるレジスタのア
クセス状況を調べる際の調査手順を説明するフローチャ
ートである。なお、(1)〜(6)は各ステップを示す
Further, FIG. 3 is a flowchart illustrating the investigation procedure for investigating the register access status at a breakpoint. Note that (1) to (6) indicate each step.

以下に第2図および第3図を参照してその手順を説明す
る。
The procedure will be explained below with reference to FIGS. 2 and 3.

まず、プログラム実行前にレジスタR1〜Rn内のデー
タr1〜r、を外部メモリ13に記憶しておき(ステッ
プ(1))、この後プログラムを実行する(ステップ(
2))。ついで、プログラム中に設けられたブレイクポ
イントまできて(ステップ(3))、プログラム実行が
中断された時点で、プログラム実行後のレジスタ群12
内のデータと、プログラム実行前に外部メモリ13に記
憶しておいたデータr1〜rnとが同じかどうかを個々
に比較しくステップ(4)) 、Noならば、そのレジ
スタはアクセスされたことがわかる(ステップ(5))
First, before executing the program, data r1 to r in registers R1 to Rn are stored in the external memory 13 (step (1)), and then the program is executed (step (1)).
2)). Next, when a breakpoint set in the program is reached (step (3)) and program execution is interrupted, the register group 12 after program execution is
Step (4)) compares the data stored in the external memory 13 with the data r1 to rn stored in the external memory 13 before executing the program. I understand (step (5))
.

一方、ステップ(4)の比較でYESならば、アクセス
されたかどうかがわからない(ステップ(6))。
On the other hand, if the comparison in step (4) is YES, it is unknown whether or not it has been accessed (step (6)).

〔発明が解決しようとする問題点) 以上のように、レジスタR1〜Rn内のデータをプログ
ラムで読み出して調べる場合、読み出した値が変化して
いなければ、それはレジスタがアクセスされなくて以前
のままなのか、それともアクセスされたけれども前と同
じ値が入ってきて値が変化していないのかがわからない
。また、実際にレジスタからデータが読み出されたかど
うかもわからないという問題点があった。
[Problems to be solved by the invention] As described above, when the data in registers R1 to Rn is read and examined by a program, if the read value has not changed, it means that the register has not been accessed and remains as before. I don't know if it is, or if it is accessed but the same value as before is entered and the value has not changed. Another problem is that it is not known whether data has actually been read from the register.

この発明は、かかる問題点を解決するためになされたも
ので、プログラムのデパックの際、レジスタがアクセス
されたかどうかが簡単にわかり、デバッグを効率的に行
えるデータ処理装置を得ることを目的とする。
The present invention was made to solve this problem, and an object of the present invention is to provide a data processing device that allows for efficient debugging by easily determining whether or not a register has been accessed when depacking a program. .

〔問題点を解決するための手段〕[Means for solving problems]

この発明に係るデータ処理装置は、各レジスタのアクセ
ス信号に対応するビットにアクセスフラグを立てるアク
セスフラグレジスタと、このアクセスフラグレジスタの
各アクセスフラグに対応して割り込み許可フラグを設定
する割り込み許可フラグレジスタと、この割り込み許可
フラグレジスタとアクセスフラグレジスタとのフラグを
比較して割り込み信号を出力する比較器とを具備したも
のである。
The data processing device according to the present invention includes an access flag register that sets an access flag in a bit corresponding to an access signal of each register, and an interrupt enable flag register that sets an interrupt enable flag corresponding to each access flag of the access flag register. and a comparator that compares the flags of the interrupt permission flag register and the access flag register and outputs an interrupt signal.

〔作用〕[Effect]

この発明においては、アクセスフラグレジスタが各レジ
スタのアクセス信号に対応するビットにアクセスフラグ
を立て、割り込み許可フラグレジスタにアクセスフラグ
レジスタの各アクセスフラグに対応して割り込み許可フ
ラグを設定し、比較器が割り込み許可フラグレジスタと
アクセスフラグレジスタとのフラグを比較して割り込み
信号を出力する。
In this invention, the access flag register sets an access flag in the bit corresponding to the access signal of each register, the interrupt enable flag register sets an interrupt enable flag corresponding to each access flag in the access flag register, and the comparator It compares the flags in the interrupt enable flag register and the access flag register and outputs an interrupt signal.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示すデータ処理装置の回
路構成図である。
FIG. 1 is a circuit diagram of a data processing device showing an embodiment of the present invention.

図において、第2図と同一符号は同一または相当部分を
示し、1はアクセスフラグレジスタで、各レジスタR1
〜Rnのアクセス信号a1〜anに対応するビットにア
クセスフラグb1〜bnを立てる。2は割り込み許可フ
ラグレジスタで、アクセスフラグレジスタ1の各アクセ
スフラグbl〜bnに対応するビットに割り込み許可フ
ラグcl”’−ac、を設定する。3は比較器で、割り
込み許可フラグレジスタ2とアクセスフラグレジスタ1
との対応するビットのフラグが一致すると割り込み信号
4を出力する。14aは内部データバスである。
In the figure, the same symbols as in FIG. 2 indicate the same or corresponding parts, 1 is an access flag register, and each register R1
Access flags b1-bn are set in bits corresponding to access signals a1-an of ~Rn. 2 is an interrupt permission flag register, which sets the interrupt permission flag cl"'-ac in the bit corresponding to each access flag bl to bn of access flag register 1. 3 is a comparator, which is used for accessing interrupt permission flag register 2. Flag register 1
When the flags of the corresponding bits match, an interrupt signal 4 is output. 14a is an internal data bus.

割り込み信号4が出力されると、データ処理装置11は
、プログラムの実行を中断して割り込み処理(ブレイク
ポイント処理)を行う。すなわち割り込み信号4発生時
点でのアクセスフラグレジスタ1のフラグ状態が外部に
出力される。
When the interrupt signal 4 is output, the data processing device 11 interrupts the execution of the program and performs interrupt processing (breakpoint processing). That is, the flag state of the access flag register 1 at the time when the interrupt signal 4 is generated is outputted to the outside.

次に動作の説明をする。Next, the operation will be explained.

まず、プログラム実行前にアクセスフラグレジスタ1内
の全アクセスフラグb1〜bnをリセットする。ついで
、アクセス状況を検知したいレジスタR8〜Rnに対応
する割り込み許可フラグレジスタ2内の割り込み許可フ
ラグC1〜C,をセットしておく。プログラム実行中、
各レジスタR1〜Rnがアクセスされた時には各々のア
クセス信号a1〜a、が、アクセスフラグレジスタ1に
人力される。そして、アクセス信号a1〜a。
First, all access flags b1 to bn in the access flag register 1 are reset before program execution. Next, the interrupt permission flags C1 to C in the interrupt permission flag register 2 corresponding to the registers R8 to Rn whose access status is to be detected are set. While the program is running,
When each register R1-Rn is accessed, each access signal a1-a is input to the access flag register 1. And access signals a1-a.

各侶に対応するアクセスフラグb1〜bnがセットされ
る。
Access flags b1 to bn corresponding to each partner are set.

一方、割り込み許可フラグレジスタ2内にセットされた
割り込み許可フラグC,”−10nは、比較器3により
全てのバスサイクルにおいて、対応する上記アクセスフ
ラグb1〜b、と比較される。
On the other hand, the interrupt permission flag C, ``-10n'' set in the interrupt permission flag register 2 is compared with the corresponding access flags b1 to b in every bus cycle by the comparator 3.

フラグの一致を検出すると割り込み信号4がアクティブ
になり、プログラム実行が中断される。つまり、ブレイ
クポイント処理が行われる。
When a match of the flags is detected, interrupt signal 4 becomes active and program execution is interrupted. In other words, breakpoint processing is performed.

たとえば、プログラム実行前に割り込み許可フラグC1
をセットしておけば、プログラム実行中にレジスタR1
がアクセスされた時にアクセスフラグb1がセットされ
、比較器3によって一致が検出されブレイクポイント処
理が起動される。
For example, interrupt enable flag C1 is set before program execution.
If you set register R1 during program execution,
When accessed, the access flag b1 is set, a match is detected by the comparator 3, and breakpoint processing is activated.

この時、データ処理装置11は、内部データバス14a
を介してアクセスフラグb、〜b、の内容を外部に出力
するので、このフラグ内容を参照すれば、ブレイクポイ
ントに至るまでに各レジスタR,−Rnのアクセス状況
が即座にわかり、プログラムのデパックが効率よく行え
る。
At this time, the data processing device 11 uses the internal data bus 14a.
Since the contents of access flags b, ~b, are output to the outside via can be done efficiently.

なお、割り込み許可フラグ01〜cnを複数個セットす
ることにより、フラグの論理和による割り込み信号4を
発生させてもかまわない。
Note that by setting a plurality of interrupt permission flags 01 to cn, the interrupt signal 4 may be generated by the logical sum of the flags.

また、フラグの論理積により割り込み信号4を発生する
ように比較器3を構成すれば、セットされた複数の割り
込み許可フラグc1〜C,が全て一致した時、つまりフ
ラグに対応する複数のレジスタR1〜Rnが全てアクセ
スされた時に、初めてブレイクポイント処理が起動され
る。
Furthermore, if the comparator 3 is configured to generate the interrupt signal 4 by the AND of the flags, when the plurality of set interrupt permission flags c1 to C all match, that is, the plurality of registers R1 corresponding to the flags Breakpoint processing is activated for the first time when ~Rn are all accessed.

〔発明の効果〕〔Effect of the invention〕

この発明は以上説明したとおり、各レジスタのアクセス
信号に対応するビットにアクセスフラグを立てるアクセ
スフラグレジスタと、このアクセスフラグレジスタの各
アクセスフラグに対応して割り込み許可フラグを設定す
る割り込み許可フラグレジスタと、この割り込み許可フ
ラグレジスタとアクセスフラグレジスタとのフラグを比
較して割り込み信号を出力する比較器とを設けたので、
各レジスタへのアクセスに対してブレイクをかけること
ができ、ブレイク発生時の各レジスタのアクセス状況を
アクセスフラグにより判断でき、プログラムのデパック
を効率よく行える効果がある。
As explained above, the present invention includes an access flag register that sets an access flag in a bit corresponding to an access signal of each register, and an interrupt enable flag register that sets an interrupt enable flag corresponding to each access flag of this access flag register. , a comparator is provided that compares the flags of this interrupt enable flag register and the access flag register and outputs an interrupt signal.
A break can be applied to access to each register, and the access status of each register when a break occurs can be determined from the access flag, which has the effect of efficiently depacking the program.

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

第1図はこの発明の一実施例を示すデータ処理装置の回
路構成図、第2図はレジスタのアクセス状況を調べるた
めの従来のハードウェアの一例を示す構成図、第3図は
レジスタのアクセス状況の調査を説明するフローチャー
トである。 図において、1はアクセスフラグレジスタ、2は割り込
み許可フラグレジスタ、3は比較器、4は割り込み信号
、R1−Rnはレジスタ、at〜anはアクセス信号、
b+〜bnはアクセスフラグ、clNcnは割り込み許
可フラグである。 なお、各図中の同一符号は同一または相当部分を示す。 代理人 大 岩 増 雄    (外2名)第1図 R1−Rn  レジスタ 81〜an   アクセス信号 b1〜bn   アクセスフラグ゛ c1〜Cn   害Uり込み言グ可フラグ第2図 第3図 手続補正書(自発) 1、事件の表示   特願昭62−314616号2、
発明の名称  データ処理装置 3、補正をする者 事件との関係 特許出願人 住 所    東京都千代田区丸の内二丁目2番3号名
 称  (601)三菱電機株式会社代表者志岐守哉 4、代理人 住 所    東京都千代田区丸の内二丁目2番3号三
菱電機株式会社内 氏名 (7375)弁理士大岩増雄 (連絡先03(213)3421持許部)7′5、補正
の対象 明細書の発明の詳細な説明の欄 6、補正の内容 (1)  明細書第8頁8行の「01〜Cイ」を、((
C8〜C1のうちの複数個)」と補正する(2)同じく
第8頁10行の「R1〜R・」をI(Rt〜R1のうち
の複数個)」と補正する以  上
FIG. 1 is a circuit configuration diagram of a data processing device showing an embodiment of the present invention, FIG. 2 is a configuration diagram showing an example of conventional hardware for checking register access status, and FIG. 3 is a diagram showing register access. It is a flowchart explaining investigation of a situation. In the figure, 1 is an access flag register, 2 is an interrupt enable flag register, 3 is a comparator, 4 is an interrupt signal, R1-Rn are registers, at to an are access signals,
b+ to bn are access flags, and clNcn is an interrupt permission flag. Note that the same reference numerals in each figure indicate the same or corresponding parts. Agent Masuo Oiwa (2 others) Figure 1 R1-Rn Registers 81-an Access signals b1-bn Access flags c1-Cn Harmful request permission flag Figure 2 Figure 3 Procedure amendment ( (Spontaneous) 1. Indication of the incident Patent Application No. 1983-314616 2.
Name of the invention Data processing device 3, relationship to the person making the amendment Patent applicant address 2-2-3 Marunouchi, Chiyoda-ku, Tokyo Name (601) Mitsubishi Electric Corporation Representative Moriya Shiki 4, Agent Address Mitsubishi Electric Corporation, 2-2-3 Marunouchi, Chiyoda-ku, Tokyo Name (7375) Masuo Oiwa, Patent Attorney (Contact address: 03 (213) 3421, Licensing Department) 7'5, Invention of the specification subject to amendment Detailed Explanation Column 6, Contents of Amendment (1) “01-Ci” on page 8, line 8 of the specification (((
(2) Correct "R1-R・" on page 8, line 10 to "I (more than one of Rt-R1)".

Claims (1)

【特許請求の範囲】[Claims] 1つ以上のレジスタを有し、これらのレジスタをアクセ
スするデータ処理装置において、前記各レジスタのアク
セス信号に対応するビットにアクセスフラグを立てるア
クセスフラグレジスタと、このアクセスフラグレジスタ
の各アクセスフラグに対応して割り込み許可フラグを設
定する割り込み許可フラグレジスタと、この割り込み許
可フラグレジスタと前記アクセスフラグレジスタとのフ
ラグを比較して割り込み信号を出力する比較器とを具備
したことを特徴とするデータ処理装置。
In a data processing device that has one or more registers and accesses these registers, an access flag register sets an access flag to a bit corresponding to an access signal of each register, and an access flag register corresponding to each access flag of this access flag register. A data processing device comprising: an interrupt enable flag register for setting an interrupt enable flag; and a comparator for comparing flags between the interrupt enable flag register and the access flag register and outputting an interrupt signal. .
JP62314616A 1987-12-10 1987-12-10 Data processor Pending JPH01154253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62314616A JPH01154253A (en) 1987-12-10 1987-12-10 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62314616A JPH01154253A (en) 1987-12-10 1987-12-10 Data processor

Publications (1)

Publication Number Publication Date
JPH01154253A true JPH01154253A (en) 1989-06-16

Family

ID=18055446

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62314616A Pending JPH01154253A (en) 1987-12-10 1987-12-10 Data processor

Country Status (1)

Country Link
JP (1) JPH01154253A (en)

Similar Documents

Publication Publication Date Title
JP2651916B2 (en) In-circuit emulator
US5717851A (en) Breakpoint detection circuit in a data processor and method therefor
JPH06100976B2 (en) Break point recognition device
EP0902367B1 (en) Data processing unit with debug capabilities
WO2022124720A1 (en) Method for detecting error of operating system kernel memory in real time
US6052801A (en) Method and apparatus for providing breakpoints on a selectable address range
JPS63116236A (en) Information processor
JPH01154253A (en) Data processor
JP2797760B2 (en) Parallel processing computer system
JPH02120940A (en) Debugging supporting circuit
JPH0581087A (en) Processor monitoring system
JPH11167500A (en) Event circuit and debug system for emulator device
JP2743889B2 (en) Method and apparatus for program evaluation
JPS63113743A (en) Debugging system for computer hardware
JPH117398A (en) Program debugging device
JPH02195450A (en) Data processor
JPH0736735A (en) Debugging device
JPS63208953A (en) Microcomputer
JPS6282439A (en) False trouble generating system
JPH0333939A (en) Microprocessor
JPH01161450A (en) Central processing unit
JPH0652333A (en) Single chip microcomputer
JPS6270947A (en) Control system for debug interruption
JPS59211149A (en) Comparison stopping system
JPS58175062A (en) Debugging processing method