[go: up one dir, main page]

JPS6346549A - Debug device - Google Patents

Debug device

Info

Publication number
JPS6346549A
JPS6346549A JP61190472A JP19047286A JPS6346549A JP S6346549 A JPS6346549 A JP S6346549A JP 61190472 A JP61190472 A JP 61190472A JP 19047286 A JP19047286 A JP 19047286A JP S6346549 A JPS6346549 A JP S6346549A
Authority
JP
Japan
Prior art keywords
memory
address
circuit
usage classification
access
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.)
Granted
Application number
JP61190472A
Other languages
Japanese (ja)
Other versions
JPH0426735B2 (en
Inventor
Hiroshi Yoshikawa
博 吉川
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP61190472A priority Critical patent/JPS6346549A/en
Publication of JPS6346549A publication Critical patent/JPS6346549A/en
Publication of JPH0426735B2 publication Critical patent/JPH0426735B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To simplify the circuit constitution together with its easy operation by storing en bloc the using section information on a memory space of a program to be debugged into a memory circuit and giving an access to this memory circuit to read out the using section information. CONSTITUTION:When the using section information is set to all addresses, the programs in a memory 220 and a substitution memory 32 are executed by an emulation CPU 310. In this case, an operator switches an address switching circuit 342 by an address switch signal so that the circuit 342 selects the address given from a CPU 310 and gives it to a using section information memory circuit 340. As a result, an address if outputted from the CPU 310 via an address bus (a) is always applied to the circuit 340 via the circuit 342. The circuit 340 consists of a RAM and therefore the data on a single byte stored in a given address, that is, the using section information is read out of the circuit 340.

Description

【発明の詳細な説明】 〔発明の目的〕 (産業上の利用分野) 本発明はデバッグ装置、特にマイクロコンピュータにお
けるプログラム開発に適したデバッグ装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a debugging device, and particularly to a debugging device suitable for program development in a microcomputer.

(従来の技術) マイクロコンピュータ等におけるプログラム開発には、
デバッグ装置が用いられる。このデバッグ装置は、エミ
ユレーション用の特別なCPUをもち、プログラム上の
エラーを検出する機能を有する。一般にこの種のデバッ
グ装置は、デバッグのための置換用のRAMメモリを備
えており、デバッグの対象となる装置内のメモリがRO
M等書換え不能のメモリであっても、このROMの内容
を置換用メモリにコピーしてプログラムを走らせること
ができるため、適宜書換えが可能になる。
(Conventional technology) For program development on microcomputers, etc.,
Debug equipment is used. This debug device has a special CPU for emulation and has a function of detecting errors in the program. Generally, this type of debugging device is equipped with replacement RAM memory for debugging, and the memory in the device to be debugged is RO.
Even if the memory is non-rewritable, such as M memory, the contents of this ROM can be copied to the replacement memory and a program can be run, so it can be rewritten as appropriate.

プログラム上の代表的なエラーはメモリ空間の使用区分
に関するエラーである。これは例えばアクセス禁止のメ
モリ空間をアクセスしてしまったような場合や、書込み
禁止のメモリ空間に対して書込みを行なってしまったよ
うな場合に起こる。
A typical error in a program is an error related to the usage division of memory space. This occurs, for example, when accessing a prohibited memory space or writing into a write-protected memory space.

従来の一般的なデバッグ装置の一例を第2図に示す。こ
こで一点鎖線より右側がこのデバッグ装置100の構成
要素であり、左側がデバッグの対象となる装置200の
構成要素である。装置200は、CPU 2 i oと
メモリ220とを有し、両者間はアドレスバスA1デー
タバスD1およびコントロールバスCで接続されている
。ただ、デバッグ時には、CPU 210は取りはずさ
れ、かわりにデバッグ装置100が接続される。第2図
はこのデバッグ時の状態を示している。
An example of a conventional general debugging device is shown in FIG. Here, the components on the right side of the dashed-dotted line are the components of this debugging device 100, and the components on the left side are the components of the device 200 to be debugged. The device 200 has a CPU 2 i o and a memory 220, which are connected by an address bus A1, a data bus D1, and a control bus C. However, during debugging, the CPU 210 is removed and the debugging device 100 is connected instead. FIG. 2 shows the state during debugging.

このデバッグ装置100は、エミュレーションCPU1
10と置換用メモリ120とを有し、両者間はアドレス
バスA1データバスd1およびコン1へロールバスCで
接続されている。また、アドレスバスaはアドレスバス
バッファ131を介してアドレスバスAと、データバス
dはデータバスバッファ132を介してデータバスDと
、コントロールバスCはコントロールバスバッファ13
3を介してコントロールバスCと、それぞれ接続されて
いるため、エミュレーションCPU110は、メモリ2
20と置換用メモリ120との両方をアクセスすること
ができる。置換用メモリ120はRAMで構成されてい
るため、メモリ220がROMである場合でも、その内
容は置換用メモリ120にエミュレーションCPU11
0を介してコピーすることによって書換えが可能になる
This debug device 100 includes an emulation CPU 1
10 and a replacement memory 120, which are connected to an address bus A1, a data bus d1, and a roll bus C to a controller 1. Further, the address bus a is connected to the address bus A via the address bus buffer 131, the data bus d is connected to the data bus D via the data bus buffer 132, and the control bus C is connected to the control bus buffer 13.
3, the emulation CPU 110 is connected to the control bus C via the memory 2.
20 and replacement memory 120 can be accessed. Since the replacement memory 120 is composed of a RAM, even if the memory 220 is a ROM, its contents are stored in the replacement memory 120 by the emulation CPU 11.
Rewriting is possible by copying through 0.

このデバッグ装置100は、書込み禁止のメモリ空間に
対して書込みを行なった場合のエラー、即ら、ライトエ
ラーを検出するために、ライト検出回路141、ライト
エラー信号発生回路142、およびライト禁止領域設定
回路143を僅えている。また、このデバッグ装置10
0は、アクセス禁止のメモリ空間に対してアクセスを行
なった場合のエラー、即ち、アクセスエラーを検出する
ために、アクセス検出回路151、アクセスエラー信号
発生回路152、およびアクセス禁止領域設定回路15
3を備えている。更に、このデバッグ装置100は、メ
モリ220と置換用メモリ120との切換えを行なうた
めに、メモリ選択検出回路161、置換信号発生回路1
62、置換領域設定回路163、およびインバータ16
4を備えている。
This debugging device 100 includes a write detection circuit 141, a write error signal generation circuit 142, and a write prohibited area setting in order to detect an error when writing to a write prohibited memory space, that is, a write error. The circuit 143 is reduced. In addition, this debug device 10
0 is an access detection circuit 151, an access error signal generation circuit 152, and an access prohibited area setting circuit 15 in order to detect an error when accessing a prohibited memory space, that is, an access error.
It has 3. Further, this debugging device 100 includes a memory selection detection circuit 161 and a replacement signal generation circuit 1 in order to switch between the memory 220 and the replacement memory 120.
62, replacement area setting circuit 163, and inverter 16
It is equipped with 4.

このデバッグ装置100の動作は以下のどおりである。The operation of this debugging device 100 is as follows.

まずオペレータはライ1−禁止領域設定回路143に、
ライト禁止領域とすべきアドレス値を設定する。例えば
、別なプログラムがワーク領域として用いているアドレ
ス等は、このライト禁止領域として指定される。続いて
オペレータはアクセス禁止領域設定回路153に、アク
セス禁止領域どすべきアドレス値を設定する。例えば、
実際にメモリデバイスが用意されていないようなメモリ
空間のアドレスは、このアクセス禁止領域として指定さ
れる。更にオペレータは置換領域設定回路163に、置
換用メモリ120をアクセスすべきアドレス値を設定す
る。前述のようIEメモリ220から置換用メモリ12
0ヘコピーして用いるアドレス領域は置換領域として指
定される。
First, the operator inputs the lie 1-prohibited area setting circuit 143.
Set the address value that should be a write-prohibited area. For example, an address used as a work area by another program is designated as this write-prohibited area. Subsequently, the operator sets an address value to be set as an access-prohibited area in the access-prohibited area setting circuit 153. for example,
Addresses of memory spaces for which no memory devices are actually prepared are designated as access-prohibited areas. Furthermore, the operator sets in the replacement area setting circuit 163 an address value at which the replacement memory 120 should be accessed. As mentioned above, from the IE memory 220 to the replacement memory 12
The address area to be copied to 0 and used is designated as a replacement area.

このようにして各アドレス設定が終了すると、エミュレ
ーションcpuiioによってメモリ220あるいは@
換用メモリ120内のプログラムが実行される。このと
き、■ミュレーションCPU110からコントロールバ
スCを介してアクセス命令が出力されると、メモリ選択
検出回路161はメモリ選択検出信号165を置換信号
発生回路162に与える。置換信号発生回路162は、
このメモリ選択検出信号165を受けると、エミュレー
シヨンcpui1oからアドレスバスaを介して与えら
れるアドレスと置換領域設定回路163に設定されたア
ドレスとを照合し、現在アクセス中のアドレスが置換領
域か否かを判断する。そして置換領域であれば′0”、
置換領域でなければ“1nを示す置換信号166を発生
する。
When each address setting is completed in this way, the emulation cpuiio is used to store the memory 220 or @
The program in replacement memory 120 is executed. At this time, (2) When an access command is output from the simulation CPU 110 via the control bus C, the memory selection detection circuit 161 supplies a memory selection detection signal 165 to the replacement signal generation circuit 162. The replacement signal generation circuit 162 is
When this memory selection detection signal 165 is received, the address given from the emulation cpui1o via the address bus a is compared with the address set in the replacement area setting circuit 163, and it is determined whether the address currently being accessed is a replacement area or not. to judge. And if it is a replacement area, '0'',
If it is not a replacement area, a replacement signal 166 indicating "1n" is generated.

置換領域であった場合は、置換信号166はインバータ
164を通って置換用メモリ120をアクデイプとし、
置換用メモリ120に対してアクセスが行なわれる。置
換領域でなかった場合は、置換信号166はデータバス
バッフ?132をアクティブとし、メモリ220に対し
ノてアクセスが行なわれる。このようにしてメモリの切
換えが設定どおりに行なわれる。
If it is a replacement area, the replacement signal 166 passes through the inverter 164 to activate the replacement memory 120, and
The replacement memory 120 is accessed. If it is not a replacement area, the replacement signal 166 indicates the data bus buffer? 132 is made active, and the memory 220 is accessed. In this way, memory switching is performed as set.

また、エミュレーションcpuiioからコントロール
バスCを介してアクセス命令が出力されると、アクセス
検出回路151はアクセス検出信号154をアクセスエ
ラー信号発生回路152に与える。アクセスエラー信号
発生回路152は、このアクセス検出信号154を受け
ると、1ミユレーシヨンcpuiioからアドレスバス
aを介して与λられるアドレスとアクセス禁止領111
1設定回路153に設定されたアドレスとを照合し、現
在アクセス中のアドレスがアクセス禁止か否かを判断し
、その結果を示すアクセスエラー信号155を発生づる
。オペレータはこのアクセスエラー信号155を検知し
てアクセスエラーが生じたことを認識することができる
Further, when an access command is output from the emulation cpuiio via the control bus C, the access detection circuit 151 provides an access detection signal 154 to the access error signal generation circuit 152. When the access error signal generating circuit 152 receives this access detection signal 154, the access error signal generating circuit 152 generates the address and the access prohibited area 111 which are given from the CPUIIO via the address bus a.
1 setting circuit 153, determines whether access to the address currently being accessed is prohibited, and generates an access error signal 155 indicating the result. The operator can detect this access error signal 155 and recognize that an access error has occurred.

一方、エミコレーションCPlフ110からコントロー
ルバスCを介してライ]・命令が出力されると、ライト
検出回路141はライト検出信号144をライトエラー
C号発生回路142に与える。ライトエラー信号発生回
路′142は、このライト検出信号144を受けると、
エミュレーションCPU110からアドレスバスaを介
して与えられるアドレスとライl−禁止領il!!設定
回路143に設定されたアドレスとを照合し、現在書込
みを行おうとしているアドレスがう、イト禁止が否かを
判断し、その結果を示1ライトエラー信号145を発生
する。オペレータはこのライトエラー信号145を検知
してライ1−エラーが生じたことを認識することができ
る。また、このライ1〜]シ一信号145はコン1−ロ
ールバスバッノj71ζ33にも与えられ、ライト命令
の実行をMヰする。従ってメモリのエラー書換えを未然
に防ぐことかで・きる。
On the other hand, when the emulation CPL 110 outputs a write command via the control bus C, the write detection circuit 141 supplies a write detection signal 144 to the write error C generation circuit 142. When the write error signal generation circuit '142 receives this write detection signal 144,
The address given from the emulation CPU 110 via the address bus a and the line l-inhibited area il! ! It compares it with the address set in the setting circuit 143, and determines whether the address to which writing is currently being attempted is prohibited or not, and generates a write error signal 145 indicating the result. The operator can detect this write error signal 145 and recognize that a write 1 error has occurred. The write 1~] signal 145 is also applied to the controller 1-roll bus control j71ζ33 to execute the write command. Therefore, it is possible to prevent error rewriting of memory.

(発明が解決しようとする問題点) しかしながら従来のデバッグ装置には回路構成が裡雑に
なり、オペレータの操作も煩雑であるという問題点があ
る。即ち、第2図に示すA、、うに、ライトエラーを検
出づる1段、アクセスエラーを検出1−る手段、および
メモリ選択を行なう手段がそれぞ4]独立して設6プら
れ′τいるため、Aペレー夕はそれぞれの手段に対して
別個に設定を行なわねばならない。また、回路構成の点
においても、各信号発生回路142,152,162に
それぞれ独立した比較器を設けなければならないため、
非常に複雑になっていた。特に細かなアドレス設定に対
処するためには、比較器を莫大な数の論理素子で構成し
なければならない。しかもメモリ空間の大きさが増す程
、比較器を構成する論理素子数も増加することになる。
(Problems to be Solved by the Invention) However, the conventional debugging device has a problem that the circuit configuration is complicated and the operation by the operator is complicated. That is, as shown in FIG. 2, one stage for detecting write errors, means for detecting access errors, and means for memory selection are each independently provided. Therefore, the A operator must make settings for each means separately. Also, in terms of circuit configuration, each signal generation circuit 142, 152, 162 must be provided with an independent comparator, so
It was getting very complicated. In order to deal with particularly detailed address settings, the comparator must be constructed from a huge number of logic elements. Furthermore, as the size of the memory space increases, the number of logic elements forming the comparator also increases.

そこで本発明は回路構成が単純で、しかもオペレータの
操作も容易なデバッグ装置を提供することを目的とする
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a debugging device that has a simple circuit configuration and is easy to operate by an operator.

〔発明の構成〕[Structure of the invention]

(問題点を解決するための手段) 本発明はデバッグ装置に、プログラムのデバッグを行な
うためのエミュレーションCPUと、プログラムが使用
するメモリ空間の使用区分を示す情報を記憶する使用区
分情報記憶回路と、使用区分情報記憶回路をアクレスす
るためのアドレスを発生するアドレス設定回路と、エミ
ュレーションCPUで発生されたアドレスまたはアドレ
ス設定回路で発生されたアドレスのうちどちらか一方を
選択して使用区分情報記憶回路に与えてアクセスするア
ドレス切換回路と、使用区分情報記憶回路をアドレス設
定回路で発生されたアドレスによってアクセスしたとき
に、アクセスしたアドレスに書込むべきデータを発生す
るデータ設定回路と、使用区分情報記憶回路をエミュレ
ーションCPUで発生されたアドレスによってアクセス
したときに、アクセスしたアドレスから読出されるデー
タに基づいてデバッグに必要な処理を行なう処理回路と
、を設け、回路構成を単純化し、かつ操作を容易化した
ものである。
(Means for Solving the Problems) The present invention provides a debugging device including: an emulation CPU for debugging a program; a usage classification information storage circuit that stores information indicating the usage classification of memory space used by the program; An address setting circuit generates an address for accessing the usage classification information storage circuit, and either an address generated by the emulation CPU or an address generated by the address setting circuit is selected and sent to the usage classification information storage circuit. an address switching circuit that accesses by giving an address, a data setting circuit that generates data to be written to the accessed address when the usage classification information storage circuit is accessed by an address generated by the address setting circuit, and a usage classification information storage circuit. and a processing circuit that performs the processing necessary for debugging based on the data read from the accessed address when accessed by an address generated by the emulation CPU, simplifying the circuit configuration and facilitating operation. This is what I did.

(作 用) 本発明に係るデバッグ装置では、デバッグの対象となる
プログラムのメモリ空間についての使用区分情報を一括
して記憶回路に記憶させ、この記憶回路をアクセスして
使用区分情報を読出づことができるため、従来装置のよ
うにアドレスを照合するための比較器をいくつも設りる
必要がなくなり、回路構成を単純化し、操作を容易化す
ることができる。
(Function) In the debugging device according to the present invention, usage classification information regarding the memory space of a program to be debugged is stored all at once in a storage circuit, and the usage classification information is read out by accessing this storage circuit. Therefore, there is no need to provide a number of comparators for verifying addresses as in conventional devices, and the circuit configuration can be simplified and operation can be facilitated.

(実施例) 以下本発明を図示プる実MPAk:基づいて説明する。(Example) The present invention will be explained below based on an actual MPAk shown in the drawings.

第1図は本発明の一実施例に係るデバッグ装置のブロッ
ク図である。ここで一点!4線より右側がこのデバッグ
装置300の構成要素であり、左側がデバッグの対象と
なる装置200の構成要素である。装置200は、CP
LI 210とメモリ220とを有し、両者間はアドレ
スバスA1データバスD1およびコントロールバスCで
接続されている。ただ、デバッグ時には、CPU210
は取りはずされ、かわりにデバッグ装置300が接続さ
れる。第1図はこのデバッグ時の状態を示している。
FIG. 1 is a block diagram of a debugging device according to an embodiment of the present invention. One point here! The components on the right side of the 4th line are the components of this debugging device 300, and the components on the left side are the components of the device 200 to be debugged. The device 200 is a CP
It has an LI 210 and a memory 220, which are connected by an address bus A1, a data bus D1, and a control bus C. However, when debugging, the CPU210
is removed, and a debug device 300 is connected in its place. FIG. 1 shows the state during debugging.

このデバッグ装fW300は、エミュレーションCPU
310と置換用メモリ320とを有し、両者間はアドレ
スバスA1データバスd1およびコントロールバスCで
接続されている。また、アドレスバスaはアドレスバス
バッファ331を介してアドレスバスAと、データバス
dはデータバスバッファ332を介してデータバスDと
、コントロールバスCはコントロールバスバッファ33
3を介してコントロールバスCと、それぞれ接続されて
いるため、エミュレーションCPU310は、メモリ2
20と置換用メモリ320との両方をアクセスすること
ができる。置換用メモリ320はRAMで構成されてい
るため、メモリ220がROMである場合でも、その内
容は置換用メモリ320にエミュレーションCPU31
0を介しでコピーすることによって書換えが可能になる
This debugging device fW300 is an emulation CPU
310 and a replacement memory 320, which are connected by an address bus A1, a data bus d1, and a control bus C. Further, the address bus a is connected to the address bus A via the address bus buffer 331, the data bus d is connected to the data bus D via the data bus buffer 332, and the control bus C is connected to the control bus buffer 33.
3, the emulation CPU 310 is connected to the control bus C via the memory 2.
20 and replacement memory 320 can be accessed. Since the replacement memory 320 is composed of a RAM, even if the memory 220 is a ROM, its contents are stored in the replacement memory 320 by the emulation CPU 31.
Rewriting is possible by copying through 0.

このデバッグ装置300は、デバッグ対象となるプログ
ラムが使用するメモリ空間の使用区分を示す情報を記憶
する使用区分情報記憶回路340と、この使用区分情報
記憶回路340をアクセスするためのアドレスを発生す
るアドレス設定回路341と、エミュレーションCPU
310で発生されたアドレスまたはアドレス設定回路3
41で発生されたアドレスのうちどちらか一方を選択し
て使用区分情報記憶回路340に与えてアクセスするア
ドレス切換回路342と、使用区分情報記憶回路340
をアドレス設定回路341で発生されたアドレスによっ
てアクセスしたときに、アクセスしたアドレスに書込む
べきデータを発生するデータ設定回路343と、を備え
ている。更にこのデバッグ装置300は、エミュレーシ
ョンCPU310からコントロールバスCを介して出力
される命令を受けて所定の動作検出を行なう動作検出回
路351と、使用区分情報記憶回路340からの出力と
動作検出回路351からの検出信号とに基づいて所定の
エラー信号を発生する動作比較回路352と、を備えて
いる。
This debugging device 300 includes a usage classification information storage circuit 340 that stores information indicating the usage classification of memory space used by a program to be debugged, and an address that generates an address for accessing this usage classification information storage circuit 340. Setting circuit 341 and emulation CPU
Address generated at 310 or address setting circuit 3
an address switching circuit 342 that selects one of the addresses generated in step 41 and supplies it to the usage classification information storage circuit 340 for access; and a usage classification information storage circuit 340.
The data setting circuit 343 generates data to be written to the accessed address when accessed by the address generated by the address setting circuit 341. Furthermore, this debugging device 300 includes an operation detection circuit 351 that detects a predetermined operation in response to a command output from the emulation CPU 310 via the control bus C, and an output from the usage classification information storage circuit 340 and an operation detection circuit 351. and an operation comparison circuit 352 that generates a predetermined error signal based on the detection signal.

このデバッグ装置300の動作は以下のとおりである。The operation of this debugging device 300 is as follows.

まずオペレータはアドレス切換信号344によって、ア
ドレス切換回路342がアドレス設定回路341からの
アドレスを選択して使用区分情報記憶回路340に与え
るように切換えを行なう。このような切換えを行なえば
、使用区分情報記憶回路340はRAMで構成されてい
るため、オペレータはアドレス設定回路341で指定し
た使用区分情報記憶回路340内のアドレスに、データ
設定回路343で設定したデータを書込むことができる
。使用区分情報記憶回路340のアドレス空間は、デバ
ッグ対象となる装置200のアドレス空間と対応ずけら
れている。最も細かなアドレスの対応づけを行なう場合
には、1対1に対応させておけばよい。即ち、メモリ2
20と全く同じ記憶容量を使用区分情報記憶回路340
内に確保するのである。使用区分情報記憶回路340の
記憶容量を低減させたいのであれば、1対16.1対2
56等の対応関係とし、上位アドレスのみが1対1対応
するようにすればよい。いま、ここでは説明の便宜上、
両者は完全に1対1に対応している場合を考える。従っ
てメモリ220中の任意の1バイトアドレスは、使用区
分情報記憶回路340の1バイトアドレスに対応するこ
とになる。オペレータはメモリ220のアドレス空間の
使用区分を示す使用区分情報を使用区分情報記憶回路3
40に記憶させることになる。
First, the operator uses the address switching signal 344 to switch the address switching circuit 342 to select the address from the address setting circuit 341 and apply it to the usage classification information storage circuit 340. If such switching is performed, since the usage classification information storage circuit 340 is composed of RAM, the operator can set the address in the usage classification information storage circuit 340 specified by the address setting circuit 341 using the data setting circuit 343. Data can be written. The address space of the usage classification information storage circuit 340 is mapped to the address space of the device 200 to be debugged. When making the most detailed correspondence between addresses, it is sufficient to make a one-to-one correspondence. That is, memory 2
Classification information storage circuit 340 uses exactly the same storage capacity as 20.
It is secured within. If you want to reduce the storage capacity of the usage classification information storage circuit 340, 1:16.1:2
56, etc., so that only the upper addresses have a one-to-one correspondence. Now, for the sake of explanation,
Let us consider a case where the two have a complete one-to-one correspondence. Therefore, any 1-byte address in memory 220 corresponds to a 1-byte address in usage classification information storage circuit 340. The operator stores usage classification information indicating the usage classification of the address space of the memory 220 in the usage classification information storage circuit 3.
40 will be stored.

本実施例では、使用区分情報は、■該アドレスが書込み
禁止か否かを示す情報、■該アドレスがアクセス禁止か
否かを示す情報、および■該アドレスがエミュレーショ
ン中に置換用メモリ320に割付けられたメモリ空間で
あるのか、またはメモリ220に割付けられたメモリ空
間であるのかを示す情報、の3つの情報から成る。これ
らの各情報はそれぞれ1ビツトで表現できるため、合計
3ビツトのメモリがあれば十分であるが、一般にアクセ
スは1バイト単位で行なわれるため、1つの番地につい
ての使用区分情報を記1するのに1バイトのメモリが使
用される。このようにして、例えばメモリ220のX番
地についての使用区分情報を得るためには、使用区分情
報記憶回路340のX番地のデータを読出せばよいこと
になる。なお、このような使用区分情報の設定を行なう
のに、オペレータは1番地ごとに設定する必要はなく、
例えば1000番地〜2000番地までは■書込み禁止
、■アクセス可能、■置換用メモリ320に割付けられ
ている領域である、というように3つの情報をあるメモ
リ領域にわたって一括して設定することができる。従っ
てオペレータの労力は従来装置に比べ軽減される。
In this embodiment, the usage classification information includes: ■ Information indicating whether the address is write-prohibited, ■ Information indicating whether the address is access-prohibited, and ■ Information indicating whether the address is allocated to the replacement memory 320 during emulation. It consists of three pieces of information: information indicating whether it is a memory space allocated to the memory 220 or a memory space allocated to the memory 220. Each of these pieces of information can be expressed with 1 bit, so a total of 3 bits of memory is sufficient, but since access is generally performed in 1-byte units, it is not necessary to record the usage classification information for one address. 1 byte of memory is used. In this way, for example, in order to obtain usage classification information for address X of memory 220, it is sufficient to read data at address X of usage classification information storage circuit 340. In addition, in order to set such usage classification information, the operator does not need to set it for each address.
For example, three pieces of information can be set all at once over a certain memory area, such as: 1000 to 2000 are (1) write-prohibited, (2) accessible, and (2) an area allocated to the replacement memory 320. Therefore, the operator's effort is reduced compared to conventional devices.

以上のようにして全アドレスについての使用区分情報の
設定が終了すると、エミュレーションCPU310によ
ってメモリ220あるいは置換用メモリ320内のプロ
グラムが実行される。このときオペレータは、アドレス
切換信号344によって、アドレス切換回路342がエ
ミュレーションCPU310からのアドレスを選択して
使用区分情報記憶回路340に与えるように切換えを行
なう。従ってエミュレーションCPU3107)1らア
ドレスバスaを介してアドレス出力がなされると、この
アドレスは常にアドレス切換回路342を経て使用区分
情報記憶回路340に与えられることになる。前述のよ
うに使用区分情報記憶回路340はRAMで構成されて
いるため、与えられたアドレスに記憶されている1バイ
トのデータ、即ち、使用区分情報が読出される。
When the setting of usage classification information for all addresses is completed as described above, the program in the memory 220 or the replacement memory 320 is executed by the emulation CPU 310. At this time, the operator switches the address switching circuit 342 to select the address from the emulation CPU 310 and apply it to the usage classification information storage circuit 340 using the address switching signal 344. Therefore, when an address is output from the emulation CPU 3107) 1 via the address bus a, this address is always given to the usage classification information storage circuit 340 via the address switching circuit 342. As mentioned above, since the usage classification information storage circuit 340 is constituted by a RAM, 1 byte of data stored at a given address, ie, usage classification information, is read out.

この1バイトの読出しデータのうち、有効なデータは前
述のとおり■書込み禁止か否かを承り°うイl−禁止信
号353、■アクセス禁止か否かを示すアクセス禁止信
号354、■メモリ置換の有無を示すメモリ置換信号3
55の3ビツトのみである。このうち、ライト禁止信号
353およびアクセス禁止信@354は動作比較回路3
52に与えられる。また、メモリ置換信号355はデー
タバスバッファ332に与えられるとともに、インバー
タ356を介して置換用メモリ320に与えられる。現
在アクセス中のアドレスが置換gIMであれば、置換信
号355は′O”となり、この置換信号355はインバ
ータ356を通って置換用メモリ320をアクティブと
し、置換用メモリ320に対してアクセスが行なわれる
。置換領域でなかった場合は、置換信号355は“1n
となり、データバスバッファ332をアクティブとし、
メモリ220に対してアクセスが行なわれる。このよう
にしてメモリの切換えが設定どおりに行なわれる。
Of this 1-byte read data, valid data is as described above: ■ Inhibit signal 353 indicating whether writing is prohibited, ■ Access prohibition signal 354 indicating whether access is prohibited, ■ Memory replacement signal 353 Memory replacement signal 3 indicating presence/absence
There are only 55 3 bits. Of these, the write prohibition signal 353 and the access prohibition signal @354 are sent to the operation comparison circuit 3.
52. Further, the memory replacement signal 355 is applied to the data bus buffer 332 and is also applied to the replacement memory 320 via an inverter 356. If the address currently being accessed is replacement gIM, the replacement signal 355 becomes 'O', this replacement signal 355 passes through the inverter 356, activates the replacement memory 320, and the replacement memory 320 is accessed. .If it is not a replacement area, the replacement signal 355 is “1n
, the data bus buffer 332 is activated,
Memory 220 is accessed. In this way, memory switching is performed as set.

一方、エミュレーションCPU310からコントロール
バスCを介してアクセス命令が出力されると、動作検出
回路351はアクセス検出信号357を動作比較回路3
52に与える。また、このアクセス命令がライト命令で
あった場合には、動作検出回路351はライト検出信号
358を動作比較回路352に与える。動作比較回路3
52は、アクセス禁止信号354とアクセス検出信号3
57とを同時に受けたとき、即ち、現在アクセス中のア
ドレスがアクセス禁止である場合にはアクセスエラー信
号359を発生する。オペレータはこのアクセスエラー
信号359を検知してアクセスエラーが生じたことを雪
識することができる。
On the other hand, when an access command is output from the emulation CPU 310 via the control bus C, the operation detection circuit 351 transfers the access detection signal 357 to the operation comparison circuit 3.
Give to 52. Further, if this access command is a write command, the operation detection circuit 351 provides a write detection signal 358 to the operation comparison circuit 352. Operation comparison circuit 3
52 is an access prohibition signal 354 and an access detection signal 3
57 at the same time, that is, when the address currently being accessed is prohibited from access, an access error signal 359 is generated. The operator can detect the access error signal 359 and know that an access error has occurred.

また、動作比較回路352は、ライト禁止信号353と
ライト検出信号358とを同時に受けたとき、即ち、現
在書込みを行なおうとしているアドレスが書込み禁止で
ある場合にはフィトエラー信号360を発生する。オペ
レータはこのライトエラー信号360を検知してライト
エラーが生じたことを認識することができる。また、こ
のライトエラー信号360はコントロールバスバッファ
333にも与えられ、ライト命令の実行を阻止する。従
ってメモリのエラー書換えを未然に防ぐことができる。
Further, when the operation comparison circuit 352 receives the write prohibition signal 353 and the write detection signal 358 at the same time, that is, when the address to which writing is currently being performed is write prohibited, the operation comparison circuit 352 generates a fit error signal 360. . The operator can detect the write error signal 360 and recognize that a write error has occurred. Further, this write error signal 360 is also applied to the control bus buffer 333 to prevent execution of the write command. Therefore, erroneous rewriting of the memory can be prevented.

以上のように本発明に係るデバッグ装置300は従来の
デバッグ装置100と同等の機能を有することがわかる
であろう。しかしその回路構成は非常に単純となってい
る。即ち、種々の使用区分情報は、すべてRAMから成
る使用区分情報記憶回路340に一括して記憶され、こ
のRAMをアクセスすることによりこの情報を読出すよ
うにしたため、従来装置のようにアドレスを照合するた
めの比較器は全く必要なくなる。動作比較回路352に
は比較器が用いられるが、ここではアドレスの照合が行
なわれるのではなく、たかが数ビットのデータの比較が
行なわれるだけであり、非常に単純な論理回路で実現で
きる。
As described above, it will be understood that the debugging device 300 according to the present invention has the same functions as the conventional debugging device 100. However, its circuit configuration is extremely simple. That is, all of the various usage classification information is collectively stored in the usage classification information storage circuit 340 made up of RAM, and this information is read by accessing this RAM, so that address verification is not required as in conventional devices. There is no need for a comparator to do this. Although a comparator is used in the operation comparison circuit 352, the comparison of addresses is not performed here, but only a few bits of data are compared, and this can be realized with a very simple logic circuit.

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

以上のとおり本発明によれば、デバッグ装置において、
デバッグの対象となるプログラムのメモリ空間について
の使用区分情報を一括して記憶回路に記憶させ、この記
憶回路をアクセスして使用区分情報を読出すようにした
ため、回路構成を単純化し、操作を容易化することがで
きる。
As described above, according to the present invention, in the debugging device,
The usage classification information regarding the memory space of the program to be debugged is stored in a memory circuit all at once, and this storage circuit is accessed to read the usage classification information, which simplifies the circuit configuration and facilitates operation. can be converted into

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

第1図は本発明の一実施例に係るデバッグ装置のブロッ
ク図、第2図は従来のデバッグ装置の一例を示すブロッ
ク図である。 100・・・従来のデバッグ装置、110・・・エミュ
レーションCPU、120・・・置換用メモリ、131
・・・アドレスバスバッフF、132・・・データバス
バッファ、133・・・コントロールバスバッファ、1
41・・・ライト検出回路、142・・・ライトエラー
信号発生回路、143・・・ライト禁止領域設定回路、
144・・・ライト検出信号、145・・・ライトエラ
ー信号、151・・・アクセス検出回路、152・・・
アクセスエラー信号発生回路、153・・・アクセス禁
止領域設定回路、154・・・アクセス検出信号、15
5・・・アクセスエラー信号、161・・・メモリ選択
検出回路、162・・・置換信号発生回路、163・・
・置換fr4域設定回路、164・・・インバータ、1
65・・・メモリ選択検出信号、166・・・置換信号
、200・・・デバッグの対象となる装置、210・・
・CPU、220・・・メモリ、300・・・本発明に
係るデバッグ装置、310・・・J、ミュレーシ〕ンC
PU。 320・・・置換用メモリ、331・・・アドレスバス
バッファ、332・・・データバスバッファ、333・
・・コントロールバスバッファ、340・・・使用区分
情報記憶回路、341・・・アドレス設定回路、342
・・・アドレス切換回路、343・・・データ設定回路
、344・・−アドレス切換信号、351・・・動作検
出回路、352・・・動作比較回路、353・・・ライ
ト禁止信号、354・・・アクセス禁止信号、355・
・・メモリ置換信号、356・・・インバータ、357
・・・アクセス検出信号、358・・・ライト検出信号
、359・・・アクセスエラー信号、360・・・ライ
トエラー信号、A、a・・・アドレスバス、C1C・・
・コントロールバス、D、d・・・データバス。
FIG. 1 is a block diagram of a debugging device according to an embodiment of the present invention, and FIG. 2 is a block diagram showing an example of a conventional debugging device. 100... Conventional debugging device, 110... Emulation CPU, 120... Replacement memory, 131
...Address bus buffer F, 132...Data bus buffer, 133...Control bus buffer, 1
41... Write detection circuit, 142... Write error signal generation circuit, 143... Write prohibited area setting circuit,
144...Write detection signal, 145...Write error signal, 151...Access detection circuit, 152...
Access error signal generation circuit, 153... Access prohibited area setting circuit, 154... Access detection signal, 15
5... Access error signal, 161... Memory selection detection circuit, 162... Replacement signal generation circuit, 163...
・Replacement fr4 area setting circuit, 164...Inverter, 1
65... Memory selection detection signal, 166... Replacement signal, 200... Device to be debugged, 210...
・CPU, 220...Memory, 300...Debug device according to the present invention, 310...J, simulation C
P.U. 320... Replacement memory, 331... Address bus buffer, 332... Data bus buffer, 333...
. . . Control bus buffer, 340 . . . Use classification information storage circuit, 341 . . . Address setting circuit, 342
. . . address switching circuit, 343 . . . data setting circuit, 344 . . .-address switching signal, 351 . . . operation detection circuit, 352 .・Access prohibition signal, 355・
...Memory replacement signal, 356...Inverter, 357
...Access detection signal, 358...Write detection signal, 359...Access error signal, 360...Write error signal, A, a...Address bus, C1C...
・Control bus, D, d...Data bus.

Claims (1)

【特許請求の範囲】 1、プログラムのデバッグを行なうためのエミュレーシ
ョンCPUと、前記プログラムが使用するメモリ空間の
使用区分を示す情報を記憶する使用区分情報記憶回路と
、前記使用区分情報記憶回路をアクセスするためのアド
レスを発生するアドレス設定回路と、前記エミュレーシ
ョンCPUで発生されたアドレスまたは前記アドレス設
定回路で発生されたアドレスのうちどちらか一方を選択
して前記使用区分情報記憶回路に与えてアクセスするア
ドレス切換回路と、前記使用区分情報記憶回路を前記ア
ドレス設定回路で発生されたアドレスによってアクセス
したときに、アクセスしたアドレスに書込むべきデータ
を発生するデータ設定回路と、前記使用区分情報記憶回
路を前記エミュレーションCPUで発生されたアドレス
によってアクセスしたときに、アクセスしたアドレスか
ら読出されるデータに基づいてデバッグに必要な処理を
行なう処理回路と、を備えることを特徴とするデバッグ
装置。 2、メモリ空間の使用区分を示す情報が、各メモリ空間
についての書込み禁止の有無を示す情報を含むことを特
徴とする特許請求の範囲第1項記載のデバッグ装置。 3、処理回路が、使用区分情報記憶回路から書込み禁止
を示す情報を読出したときに、書込みエラーを表示する
ためのエラー信号を発生するとともにエミュレーション
CPUの書込み操作を阻止する動作を行なうことを特徴
とする特許請求の範囲第2項記載のデバッグ装置。 4、メモリ空間の使用区分を示す情報が、各メモリ空間
についてのアクセス禁止の有無を示す情報を含むことを
特徴とする特許請求の範囲第1項記載のデバッグ装置。 5、処理回路が、使用区分情報記憶回路からアクセス禁
止を示す情報を読出したときに、アクセスエラーを表示
するためのエラー信号を発生する動作を行なうことを特
徴とする特許請求の範囲第4項記載のデバッグ装置。 6、デバッグのための置換用メモリを更に備えることを
特徴とする特許請求の範囲第1項記載のデバッグ装置。 7、メモリ空間の使用区分を示す情報が、各メモリ空間
について、置換用メモリに割付けられたメモリ空間であ
るのか、またはデバッグの対象となる装置内のメモリに
割付けられたメモリ空間であるのか、を示すメモリ選択
情報を含むことを特徴とする特許請求の範囲第6項記載
のデバッグ装置。 8、処理回路が、使用区分情報記憶回路から読出したメ
モリ選択情報に基づいて、エミュレーションCPUのア
クセスすべきメモリを置換用メモリまたはデバッグの対
象となる装置内のメモリに切換える動作を行なうことを
特徴とする特許請求の範囲第7項記載のデバッグ装置。
[Claims] 1. An emulation CPU for debugging a program, a usage classification information storage circuit that stores information indicating usage classification of memory space used by the program, and access to the usage classification information storage circuit. an address setting circuit that generates an address for the purpose of the above, and selecting one of the addresses generated by the emulation CPU or the address generated by the address setting circuit and supplying the selected address to the usage classification information storage circuit for access. an address switching circuit, a data setting circuit that generates data to be written to the accessed address when the usage classification information storage circuit is accessed by the address generated by the address setting circuit, and the usage classification information storage circuit. A debugging device comprising: a processing circuit that performs processing necessary for debugging based on data read from the accessed address when accessed by the address generated by the emulation CPU. 2. The debugging device according to claim 1, wherein the information indicating the usage classification of the memory spaces includes information indicating whether or not writing is prohibited for each memory space. 3. When the processing circuit reads information indicating write inhibition from the usage classification information storage circuit, it generates an error signal to indicate a write error and also performs an operation to prevent the emulation CPU from writing. A debugging device according to claim 2. 4. The debugging device according to claim 1, wherein the information indicating the usage classification of memory spaces includes information indicating whether access to each memory space is prohibited. 5. Claim 4, characterized in that the processing circuit performs an operation of generating an error signal for displaying an access error when the processing circuit reads information indicating access prohibition from the usage classification information storage circuit. Debug equipment as described. 6. The debugging device according to claim 1, further comprising a replacement memory for debugging. 7. For each memory space, whether the information indicating the usage classification of the memory space is the memory space allocated to the replacement memory or the memory space allocated to the memory within the device to be debugged; The debugging device according to claim 6, characterized in that the debugging device includes memory selection information indicating. 8. The processing circuit performs an operation of switching the memory to be accessed by the emulation CPU to a replacement memory or a memory in the device to be debugged, based on the memory selection information read from the usage classification information storage circuit. A debugging device according to claim 7.
JP61190472A 1986-08-15 1986-08-15 Debug device Granted JPS6346549A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61190472A JPS6346549A (en) 1986-08-15 1986-08-15 Debug device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61190472A JPS6346549A (en) 1986-08-15 1986-08-15 Debug device

Publications (2)

Publication Number Publication Date
JPS6346549A true JPS6346549A (en) 1988-02-27
JPH0426735B2 JPH0426735B2 (en) 1992-05-08

Family

ID=16258681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61190472A Granted JPS6346549A (en) 1986-08-15 1986-08-15 Debug device

Country Status (1)

Country Link
JP (1) JPS6346549A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013145298A1 (en) * 2012-03-30 2013-10-03 富士通株式会社 Information processing device and method for collecting program analysis information

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013145298A1 (en) * 2012-03-30 2013-10-03 富士通株式会社 Information processing device and method for collecting program analysis information

Also Published As

Publication number Publication date
JPH0426735B2 (en) 1992-05-08

Similar Documents

Publication Publication Date Title
US4473878A (en) Memory management unit
US4488256A (en) Memory management unit having means for detecting and preventing mapping conflicts
US5606662A (en) Auto DRAM parity enable/disable mechanism
KR960705274A (en) Virtual Addressing Buffer Circuit and Address Translation Method, System BIOS Shadowing Method, Real Memory Optimization Method, Real Memory Usage Method, Emulation Method in CPU Control System and Redirecting CPU Request (Virtual Addressing Buffer Circuit)
JPH04213131A (en) System and method for performing shadowing and remapping for reserved memory of microcomputer
JPS6376034A (en) Multiple address space control system
JPH0680501B2 (en) Memory addressing error detection circuit
JPH0341859B2 (en)
JP3565987B2 (en) Emulator device
JPS6346549A (en) Debug device
US4477871A (en) Global operation coordination method and circuit
JPS6342294B2 (en)
JPS6035694B2 (en) Main memory protection method
JP2600376B2 (en) Memory controller
JPS63305444A (en) Storage device
JP2962247B2 (en) In-circuit emulator
JPH01155599A (en) Memory device
JPS59139199A (en) Protecting method of storage
KR0176186B1 (en) PC chip set address mapping circuit
JP2637146B2 (en) Debug system
JPS6238746B2 (en)
JPS60258654A (en) Semiconductor memory
JPS61139858A (en) Access control system for dual port memory
JPH01213733A (en) Memory write control circuit
JPS6148049A (en) Check device of mamory-access