JPH0426735B2 - - Google Patents
Info
- Publication number
- JPH0426735B2 JPH0426735B2 JP61190472A JP19047286A JPH0426735B2 JP H0426735 B2 JPH0426735 B2 JP H0426735B2 JP 61190472 A JP61190472 A JP 61190472A JP 19047286 A JP19047286 A JP 19047286A JP H0426735 B2 JPH0426735 B2 JP H0426735B2
- Authority
- JP
- Japan
- Prior art keywords
- memory
- address
- circuit
- usage classification
- debugging
- 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.)
- Expired - Lifetime
Links
- 238000001514 detection method Methods 0.000 description 31
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
Landscapes
- Debugging And Monitoring (AREA)
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メモリを備えており、デ
バツグの対象となる装置内のメモリがROM等書
換え不能のメモリであつても、このROMの内容
を置換用メモリにコピーしてプログラムを走らせ
ることができるため、適宜書換えが可能になる。(Prior Art) Debugging devices are used for program development on microcomputers and the like. This debugging device has a special CPU for emulation and a function to detect program errors. Generally, this type of debugging device is equipped with a RAM memory for replacement for debugging, and even if the memory in the device to be debugged is non-rewritable memory such as ROM, the contents of this ROM can be used for replacement. Since the program can be copied to memory and run, it can be rewritten as needed.
プログラム上の代表的なエラーはメモリ空間の
使用区分に関するエラーである。これは例えばア
クセス禁止のメモリ空間をアクセスしてしまつた
ような場合や、書込み禁止のメモリ空間に対して
書込みを行なつてしまつたような場合に起こる。 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の構成要素である。装置20
0は、CPU210とメモリ220とを有し、両
者間はアドレスバスA、データバスD、およびコ
ントロールバスCで接続されている。ただ、デバ
ツグ時には、CPU210は取りはずされ、かわ
りにデバツグ装置100が接続される。第2図は
このデバツグ時の状態を示している。 An example of a conventional general debugging device is shown in FIG. Here, the components on the right side of the dash-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. device 20
0 has a CPU 210 and a memory 220, which are connected by an address bus A, a data bus D, 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は、エミユレーシヨン
CPU110と置換用メモリ120とを有し、両
者間はアドレスバスa、データバスd、およびコ
ントロールバスcで接続されている。また、アド
レスバスaはアドレスバスバツフア131を介し
てアドレスバスAと、データバスdはデータバス
バツフア132を介してデータバスDと、コント
ロールバスcはコントロールバスバツフア133
を介してコントロールバスCと、それぞれ接続さ
れているため、エミユレーシヨンCPU110は、
メモリ220と置換用メモリ120との両方をア
クセスすることができる。置換用メモリ120は
RAMで構成されているため、メモリ220が
ROMである場合でも、その内容は置換用メモリ
120にエミユレーシヨンCPU110を介して
コピーすることによつて書換えが可能になる。 This debugging device 100 is an emulation
It has a CPU 110 and a replacement memory 120, which are connected by an address bus a, a data bus d, and a control bus c. 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 133.
The emulation CPU 110 is connected to the control bus C via the
Both memory 220 and replacement memory 120 can be accessed. The replacement memory 120 is
Since it is composed of RAM, the memory 220
Even if it is a ROM, its contents can be rewritten by copying it to the replacement memory 120 via the emulation CPU 110.
このデバツグ装置100は、書込み禁止のメモ
リ空間に対して書込みを行なつた場合のエラー、
即ち、ライトエラーを検出するために、ライト検
出回路141、ライトエラー信号発生回路14
2、およびライト禁止領域設定回路143を備え
ている。また、このデバツグ装置100は、アク
セス禁止のメモリ空間に対してアクセスを行なつ
た場合のエラー、即ち、アクセスエラーを検出す
るために、アクセス検出回路151、アクセスエ
ラー信号発生回路152、およびアクセス禁止領
域設定回路153を備えている。更に、このデバ
ツグ装置100は、メモリ220と置換用メモリ
120との切換えを行なうために、メモリ選択検
出回路161、置換信号発生回路162、置換領
域設定回路163、およびインバータ164を備
えている。 This debugging device 100 handles errors when writing to a write-protected memory space.
That is, in order to detect a write error, the write detection circuit 141 and the write error signal generation circuit 14
2, and a write prohibited area setting circuit 143. The debugging device 100 also includes an access detection circuit 151, an access error signal generation circuit 152, and an access prohibition circuit 151 to detect an error when accessing a memory space that is prohibited to access, that is, an access error. A region setting circuit 153 is provided. Further, the debugging device 100 includes a memory selection detection circuit 161, a replacement signal generation circuit 162, a replacement area setting circuit 163, and an inverter 164 for switching between the memory 220 and the replacement memory 120.
このデバツグ装置100の動作は以下のとおり
である。まずオペレータはライト禁止領域設定回
路143に、ライト禁止領域とすべきアドレス値
を設定する。例えば、別なプログラムがワーク領
域として用いているアドレス等は、このライト禁
止領域として指定される。続いてオペレータはア
クセス禁止領域設定回路153に、アクセス禁止
領域とすべきアドレス値を設定する。例えば、実
際にメモリデバイスが用意されていないようなメ
モリ空間のアドレスは、このアクセス禁止領域と
して指定される。更にオペレータは置換領域設定
回路163に、置換用メモリ120をアクセスす
べきアドレス値を設定する。前述のようにメモリ
220から置換用メモリ120へコピーして用い
るアドレス領域は置換領域として指定される。 The operation of this debugging device 100 is as follows. First, the operator sets in the write prohibited area setting circuit 143 an address value to be set as 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, an address of a memory space in which no memory device is actually prepared is designated as this access-prohibited area. Furthermore, the operator sets in the replacement area setting circuit 163 an address value at which the replacement memory 120 should be accessed. As described above, the address area to be used by copying from the memory 220 to the replacement memory 120 is designated as a replacement area.
このようにして各アドレス設定が終了すると、
エミユレーシヨンCPU110によつてメモリ2
20あるいは置換用メモリ120内のプログラム
が実行される。このとき、エミユレーシヨン
CPU110からコントロールバスcを介してア
クセス命令が出力されると、メモリ選択検出回路
161はメモリ選択検出回路165を置換信号発
生回路162に与える。置換信号発生回路162
は、このメモリ選択検出信号165を受けると、
エミユレーシヨンCPU110からアドレスバス
aを介して与えられるアドレスと置換領域設定回
路163に設定されたアドレスとを照合し、現在
アクセス中のアドレスが置換領域か否かを判断す
る。そして置換領域であれば“0”、置換領域で
なければ“1”を示す置換信号166を発生す
る。置換領域であつた場合は、置換信号166は
インバータ164を通つて置換用メモリ120を
アクテイブとし、置換用メモリ120に対してア
クセスが行なわれる。置換領域でなかつた場合
は、置換信号166はデータバスバツフア132
をアクテイブとし、メモリ220に対してアクセ
スが行なわれる。このようにしてメモリの切換え
が設定どおりに行なわれる。 After completing each address setting in this way,
Memory 2 by emulation CPU 110
20 or the program in the replacement memory 120 is executed. At this time, emulation
When an access command is output from the CPU 110 via the control bus c, the memory selection detection circuit 161 supplies the memory selection detection circuit 165 to the replacement signal generation circuit 162. Replacement signal generation circuit 162
receives this memory selection detection signal 165,
The address given from the emulation CPU 110 via the address bus a is compared with the address set in the replacement area setting circuit 163 to determine whether the address currently being accessed is in the replacement area. Then, a replacement signal 166 is generated which indicates "0" if it is a replacement area and "1" if it is not a replacement area. If it is a replacement area, the replacement signal 166 activates the replacement memory 120 through the inverter 164, and the replacement memory 120 is accessed. If it is not a replacement area, the replacement signal 166 is transferred to the data bus buffer 132.
is made active, and the memory 220 is accessed. In this way, memory switching is performed as set.
また、エミユレーシヨンCPU110からコン
トロールバスcを介してアクセス命令が出力され
ると、アクセス検出回路151はアクセス検出信
号154をアクセスエラー信号発生回路152に
与える。アクセスエラー信号発生回路152は、
このアクセス検出信号154を受けると、エミユ
レーシヨンCPU110からアドレスバスaを介
して与えられるアドレスとアクセス禁止領域設定
回路153に設定されたアドレスとを照合し、現
在アクセス中のアドレスがアクセス禁止か否かを
判断し、その結果を示すアクセスエラー信号15
5を発生する。オペレータはこのアクセスエラー
信号155を検知してアクセスエラーが生じたこ
とを認識することができる。 Further, when an access command is output from the emulation CPU 110 via the control bus c, the access detection circuit 151 provides an access detection signal 154 to the access error signal generation circuit 152. The access error signal generation circuit 152 is
When this access detection signal 154 is received, the address given from the emulation CPU 110 via the address bus a is compared with the address set in the access prohibited area setting circuit 153, and it is determined whether or not the address currently being accessed is prohibited from accessing. Access error signal 15 that determines and indicates the result
Generates 5. The operator can detect this access error signal 155 and recognize that an access error has occurred.
一方、エミユレーシヨンCPU110からコン
トロールバスcを介してライト命令が出力される
と、ライト検出回路141はライト検出信号14
4をライトエラー信号発生回路142に与える。
ライトエラー信号発生回路142は、このライト
検出信号144を受けると、エミユレーシヨン
CPU110からアドレスバスaを介して与えら
れるアドレスとライト禁止領域設定回路143に
設定されたアドレスとを照合し、現在書込みを行
おうとしているアドレスがライト禁止か否かを判
断し、その結果を示すライトエラー信号145を
発生する。オペレータはこのライトエラー信号1
45を検知してライトエラーが生じたことを認識
することができる。また、このライトエラー信号
145はコントロールバスバツフア133にも与
えられ、ライト命令の実行を阻止する。従つてメ
モリのエラー書換えを未然に防ぐことができる。 On the other hand, when a write command is output from the emulation CPU 110 via the control bus c, the write detection circuit 141 outputs the write detection signal 14.
4 is given to the write error signal generation circuit 142.
When the write error signal generation circuit 142 receives this write detection signal 144, the write error signal generation circuit 142 performs an emulation
It compares the address given from the CPU 110 via the address bus a with the address set in the write prohibited area setting circuit 143, determines whether or not the address to which writing is currently being performed is write prohibited, and indicates the result. A write error signal 145 is generated. The operator can read this write error signal 1
45 can be detected to recognize that a write error has occurred. This write error signal 145 is also applied to the control bus buffer 133 to prevent execution of the write command. Therefore, erroneous rewriting of the memory can be prevented.
(発明が解決しようとする問題点)
しかしながら従来のデバツグ装置には回路構成
が複雑になり、オペレータの操作も煩雑であると
いう問題点がある。即ち、第2図に示すように、
ライトエラーを検出する手段、アクセスエラーを
検出する手段、およびメモリ選択を行なう手段が
それぞれ独立して設けられているため、オペレー
タはそれぞれの手段に対して別個に設定を行なわ
ねばならない。また、回路構成の点においても、
各信号発生回路142,152,162にそれぞ
れ独立した比較器を設けなければならないため、
非常に複雑になつていた。特に細かなアドレス設
定に対処するためには、比較器を莫大な数の論理
素子で構成しなければならない。しかもメモリ空
間の大きさが増す程、比較器を構成する論理素子
数も増加することになる。(Problems to be Solved by the Invention) However, the conventional debugging apparatus has the problem that the circuit configuration is complicated and the operation by the operator is complicated. That is, as shown in Figure 2,
Since the means for detecting a write error, the means for detecting an access error, and the means for performing memory selection are provided independently, the operator must make settings for each means separately. Also, in terms of circuit configuration,
Since each signal generation circuit 142, 152, 162 must be provided with an independent comparator,
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.
(問題点を解決するための手段)
本発明はデバツグ装置に、プログラムのデバツ
グを行なうためのエミユレーシヨン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 usage classification of memory space used by the program; An address setting circuit that generates an address for accessing the usage classification information storage circuit, and an emulation
An address switching circuit that selects either the address generated by the CPU or the address generated by the address setting circuit and gives it to the usage classification information storage circuit for access, and the usage classification information storage circuit is generated by the address setting circuit. a data setting circuit that generates data to be written to the accessed address when accessed by the accessed address;
Emulation CPU of usage classification information storage circuit
A processing circuit that performs the processing necessary for debugging based on the data read from the accessed address when accessed by the address generated by the address is provided, simplifying the circuit configuration and facilitating operation. It is something.
(作用)
本発明に係るデバツグ装置では、デバツグの対
象となるプログラムのメモリ空間についての使用
区分情報を一括して記憶回路に記憶させ、この記
憶回路をアクセスして使用区分情報を読出すこと
ができるため、従来装置のようにアドレスを照合
するための比較器をいくつも設ける必要がなくな
り、回路構成を単純化し、操作を容易化すること
ができる。(Function) In the debugging device according to the present invention, the usage classification information regarding the memory space of the program to be debugged can be stored all at once in the storage circuit, and the usage classification information can be read 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.
(実施例)
以下本発明を図示する実施例に基づいて説明す
る。第1図は本発明の一実施例に係るデバツグ装
置のブロツク図である。ここで一点鎖線より右側
がこのデバツグ装置300の構成要素であり、左
側がデバツグ装置の対象となる装置200の構成
要素である。装置200は、CPU210とメモ
リ220とを有し、両者間はアドレスバスA、デ
ータバスD、およびコントロールバスCで接続さ
れている。ただ、デバツグ時には、CPU210
は取りはずされ、かわりにデバツグ装置300が
接続される。第1図はこのデバツグ時の状態を示
している。(Example) The present invention will be described below based on an illustrated example. FIG. 1 is a block diagram of a debugging device according to an embodiment of the present invention. Here, the elements on the right side of the dash-dotted line are the components of this debugging device 300, and the ones on the left side are the components of the device 200 that is the object of the debugging device. The device 200 has a CPU 210 and a memory 220, which are connected by an address bus A, a data bus D, and a control bus C. However, when debugging, the CPU210
is removed, and a debugging device 300 is connected in its place. FIG. 1 shows the state during debugging.
このデバツグ装置300は、エミユレーシヨン
CPU310と置換用メモリ320とを有し、両
者間はアドレスバスa、データバスd、およひコ
ントロールバスcで接続されている。また、アド
レスバスaはアドレスバスバツフア331を介し
てアドレスバスAと、データバスdはデータバス
バツフア332を介してデータバスDと、コント
ロールバスcはコントロールバスバツフア333
を介してコントロールバスCと、それぞれ接続さ
れているため、エミユレーシヨンCPU310は、
メモリ220と置換用メモリ320との両方をア
クセスすることができる。置換用メモリ320は
RAMで構成されているため、メモリ220が
ROMである場合でも、その内容は置換用メモリ
320にエミユレーシヨンCPU310を介して
コピーすることによつて書換えが可能になる。 This debugging device 300 is an emulation
It has a CPU 310 and a replacement memory 320, which are connected by an address bus a, a data bus d, 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 333.
The emulation CPU 310 is connected to the control bus C via the
Both memory 220 and replacement memory 320 can be accessed. The replacement memory 320 is
Since it is composed of RAM, the memory 220
Even if it is a ROM, its contents can be rewritten by copying it to the replacement memory 320 via the emulation CPU 310.
このデバツグ装置300は、デバツグ対象とな
るプログラムが使用するメモリ空間の使用区分を
示す情報を記憶する使用区分情報記憶回路340
と、この使用区分情報記憶回路340をアクセス
するためのアドレスを発生するアドレス設定回路
341と、エミユレーシヨンCPU310で発生
されたアドレスまたはアドレス設定回路341で
発生されたアドレスのうちどちらか一方を選択し
て使用区分情報記憶回路340に与えてアクセス
するアドレス切換回路342と、使用区分情報記
憶回路340をアドレス設定回路341で発生さ
れたアドレスによつてアクセスしたときに、アク
セスしたアドレスに書込むべきデータを発生する
データ設定回路343と、を備えている。更にこ
のデバツグ装置300は、エミユレーシヨン
CPU310からコントロールバスcを介して出
力される命令を受けて所定の動作検出を行なう動
作検出回路351と、使用区分情報記憶回路34
0からの出力と動作検出回路351からの検出信
号とに基づいて所定のエラー信号を発生する動作
比較回路352と、を備えている。 This debugging device 300 includes a usage classification information storage circuit 340 that stores information indicating the usage classification of the memory space used by the program to be debugged.
and an address setting circuit 341 that generates an address for accessing this usage classification information storage circuit 340, and selecting either the address generated by the emulation CPU 310 or the address generated by the address setting circuit 341. An address switching circuit 342 that is applied to the usage classification information storage circuit 340 to access it, and an address switching circuit 342 that inputs data to be written to the accessed address when the usage classification information storage circuit 340 is accessed by an address generated by the address setting circuit 341. A data setting circuit 343 for generating data is provided. Furthermore, this debugging device 300
An operation detection circuit 351 receives a command output from the CPU 310 via the control bus c and performs predetermined operation detection, and a usage classification information storage circuit 34
0 and a detection signal from the motion detection circuit 351.
このデバツグ装置300の動作は以下のとおり
である。まずオペレータはアドレス切換信号34
4によつて、アドレス切換回路342がアドレス
設定回路341からのアドレスを選択して使用区
分情報記憶回路340に与えるように切換えを行
なう。このような切換えを行なえば、使用区分情
報記憶回路340はRAMで構成されているた
め、オペレータはアドレス設定回路341で指定
した使用区分情報記憶回路340内のアドレス
に、データ設定回路343で設定したデータを書
込むことができる。使用区分情報記憶回路340
のアドレス空間は、デバツグ対象となる装置20
0のアドレス空間と対応ずけられている。最も細
かなアドレスの対応づけを行なう場合には、1対
1に対応させておけばよい。即ち、メモリ220
と全く同じ記憶容量を使用区分情報記憶回路34
0内に確保するのである。使用区分情報記憶回路
340の記憶容量を低減させたいのであれば、1
対16、1対256等の対応関係とし、上位アドレス
のみが1対1対応するようにすればよい。いま、
ここでは説明の便宜上、両者は完全に1対1に対
応している場合を考える。従つてメモリ220中
の任意の1バイトアドレスは、使用区分情報記憶
回路340の1バイトアドレスに対応することに
なる。オペレータはメモリ220のアドレス空間
の使用区分を示す使用区分情報を使用区分情報記
憶回路340に記憶させることになる。本実施例
では、使用区分情報は、該アドレスが書込み禁
止か否かを示す情報、該アドレスがアクセス禁
止か否かを示す情報、および該アドレスがエミ
ユレーシヨン中に置換用メモリ320に割付けら
れたメモリ空間であるのか、またはメモリ220
に割付けられたメモリ空間であるのかを示す情
報、の3つの情報から成る。これらの各情報はそ
れぞれ1ビツトで表現できるため、合計3ビツト
のメモリがあれば十分であるが、一般にアクセス
は1バイト単位で行なわれるため、1つの番地に
ついての使用区分情報を記憶するのに1バイトの
メモリが使用される。このようにして、例えばメ
モリ220のx番地についての使用区分情報を得
るためには、使用区分情報記憶回路340のx番
地のデータを読出せばよいことになる。なお、こ
のような使用区分情報の設定を行なうのに、オペ
レータは1番地ごとに設定する必要はなく、例え
ば1000番地〜2000番地までは書込み禁止,ア
クセス可能,置換用メモリ320に割付けられ
ている領域である、というように3つの情報をあ
るメモリ領域にわたつて一括して設定することが
できる。従つてオペレータの労力は従来装置に比
べ軽減される。 The operation of this debugging device 300 is as follows. First, the operator uses the address switching signal 34.
4, the address switching circuit 342 selects the address from the address setting circuit 341 and performs switching so as to 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. Usage classification information storage circuit 340
The address space of the device 20 to be debugged is
It is mapped to address space 0. When making the most detailed correspondence between addresses, it is sufficient to make a one-to-one correspondence. That is, memory 220
The classification information storage circuit 34 uses exactly the same storage capacity as
It is secured within 0. If you want to reduce the storage capacity of the usage classification information storage circuit 340,
The correspondence relationship may be 16 to 1, 256 to 1, etc., and only the upper addresses may have a 1 to 1 correspondence. now,
Here, for convenience of explanation, we will 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 340. 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 memory allocated to the replacement memory 320 during emulation. Is it space or memory 220?
It consists of three pieces of information: information indicating whether the memory space is allocated to Each of these pieces of information can be expressed with 1 bit, so a total of 3 bits of memory is sufficient. However, since access is generally performed in 1-byte units, it takes more time to store usage classification information for one address. 1 byte of memory is used. In this way, for example, in order to obtain the usage classification information for address x in the memory 220, it is sufficient to read the data at address x in the usage classification information storage circuit 340. Note that in order to set such usage classification information, the operator does not need to set it for each address; for example, addresses 1000 to 2000 are allocated to write-protected, accessible, and replacement memory 320. Three pieces of information can be set all at once across a certain memory area, such as a memory area. Therefore, the operator's effort is reduced compared to conventional devices.
以上のようにして全アドレスについての使用区
分情報の設定が終了すると、エミユレーシヨン
CPU310によつてメモリ220あるいは置換
用メモリ320内のプログラムが実行される。こ
のときオペレータは、アドレス切換信号344に
よつて、アドレス切換回路342がエミユレーシ
ヨンCPU310からのアドレスを選択して使用
区分情報記憶回路340に与えるように切換えを
行なう。従つてエミユレーシヨンCPU310か
らアドレスバスaを介してアドレス出力がなされ
ると、このアドレスは常にアドレス切換回路34
2を経て使用区分情報記憶回路340に与えられ
ることになる。前述のように使用区分情報記憶回
路340はRAMで構成されているため、与えら
れたアドレスに記憶されている1バイトのデー
タ、即ち、使用区分情報が読出される。 After completing the setting of usage classification information for all addresses as described above, the emulation
A program in memory 220 or replacement memory 320 is executed by CPU 310. At this time, the operator uses the address switching signal 344 to switch the address switching circuit 342 so that it selects the address from the emulation CPU 310 and applies it to the usage classification information storage circuit 340. Therefore, when an address is output from the emulation CPU 310 via the address bus a, this address is always output to the address switching circuit 34.
2, and is applied to the usage classification information storage circuit 340. 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バイトの読出しデータのうち、有効なデ
ータは前述のとおり書込み禁止か否かを示すラ
イト禁止信号353、アクセス禁止か否かを示
すアクセス禁止信号354、メモリ置換の有無
を示すメモリ置換信号355の3ビツトのみであ
る。このうち、ライト禁止信号353およびアク
セス禁止信号354は動作比較回路352に与え
られる。また、メモリ置換信号355はデータバ
スバツフア332に与えられるとともに、インバ
ータ356を介して置換用メモリ320に与えら
れる。現在アクセス中のアドレスが置換領域であ
れば、置換信号355は“0”となり、この置換
信号355はインバータ356を通つて置換用メ
モリ320をアクテイブとし、置換用メモリ32
0に対してアクセスが行なわれる。置換領域でな
かつた場合は、置換信号355は“1”となり、
データバスバツフア332をアクテイブとし、メ
モリ220に対してアクセスが行なわれる。この
ようにしてメモリの切換えが設定どおりに行なわ
れる。 Of this 1-byte read data, valid data includes the write prohibition signal 353 indicating whether or not writing is prohibited, the access prohibition signal 354 indicating whether access is prohibited, and the memory replacement signal 355 indicating whether or not memory replacement is to be performed. There are only 3 bits. Of these, write prohibition signal 353 and access prohibition signal 354 are applied to operation comparison circuit 352 . 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 a replacement area, the replacement signal 355 becomes "0", this replacement signal 355 activates the replacement memory 320 through the inverter 356, and
0 is accessed. If it is not a replacement area, the replacement signal 355 becomes "1",
Data bus buffer 332 is activated and memory 220 is accessed. In this way, memory switching is performed as set.
一方、エミユレーシヨンCPU310からコン
トロールバスcを介してアクセス命令が出力され
ると、動作検出回路351はアクセス検出信号3
57を動作比較回路352に与える。また、この
アクセス命令がライト命令であつた場合には、動
作検出回路351はライト検出信号358を動作
比較回路352に与える。動作比較回路352
は、アクセス禁止信号354とアクセス検出信号
357とを同時に受けたとき、即ち、現在アクセ
ス中のアドレスがアクセス禁止である場合にはア
クセスエラー信号359を発生する。オペレータ
はこのアクセスエラー信号359を検知してアク
セスエラーが生じたことを認識することができ
る。また、動作比較回路352は、ライト禁止信
号353とライト検出信号358とを同時に受け
たとき、即ち、現在書込みを行なおうとしている
アドレスが書込み禁止である場合にはライトエラ
ー信号360を発生する。オペレータはこのライ
トエラー信号360を検知してライトエラーが生
じたことを認識することができる。また、このラ
イトエラー信号360はコントロールバスバツフ
ア333にも与えられ、ライト命令の実行を阻止
する。従つてメモリのエラー書換えを未然に防ぐ
ことができる。 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 outputs an access detection signal 3.
57 is applied to the operation comparison circuit 352. 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 352
generates an access error signal 359 when receiving the access prohibition signal 354 and the access detection signal 357 at the same time, that is, when the address currently being accessed is prohibited from access. The operator can detect this access error signal 359 and recognize that an access error has occurred. Further, the operation comparison circuit 352 generates a write error signal 360 when receiving 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 operator can detect the write error signal 360 and recognize that a write error has occurred. The 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, the debugging device 300 according to the present invention
It will be appreciated that the debugging device 100 has the same functionality 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 consisting of RAM, and this information is read by accessing this RAM, so it is not necessary to check addresses as in the conventional device. There is no need for a comparison circuit for this purpose. Although a comparator is used in the operation comparison circuit 352, it does not compare addresses but only compares data of a few bits, and can be realized by a very simple logic circuit.
以上のとおり本発明によれば、デバツグ装置に
おいて、デバツグの対象となるプログラムのメモ
リ空間についての使用区分情報を一括して記憶回
路に記憶させ、この記憶回路をアクセスして使用
区分情報を読出すようにしたため、回路構成を単
純化し、操作を容易化することができる。
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 all at once in the storage circuit, and the usage classification information is read out by accessing this storage circuit. As a result, the circuit configuration can be simplified and the operation can be facilitated.
第1図は本発明の一実施例に係るデバツグ装置
のブロツク図、第2図は従来のデバツグ装置の一
例を示すブロツク図である。
100……従来のデバツグ装置、110……エ
ミユレーシヨンCPU、120……置換用メモリ、
131……アドレスバスバツフア、132……デ
ータバスバツフア、133……コントロールバス
バツフア、141……ライト検出回路、142…
…ライトエラー信号発生回路、143……ライト
禁止領域設定回路、144……ライト検出信号、
145……ライトエラー信号、151……アクセ
ス検出回路、152……アクセスエラー信号発生
回路、153……アクセス禁止領域設定回路、1
54……アクセス検出信号、155……アクセス
エラー信号、161……メモリ選択検出回路、1
62……置換信号発生回路、163……置換領域
設定回路、164……インバータ、165……メ
モリ選択検出信号、166……置換信号、200
……デバツグの対象となる装置、210……
CPU、220……メモリ、300……本発明に
係るデバツグ装置、310……エミユレーシヨン
CPU、320……置換用メモリ、331……ア
ドレスバスバツフア、332……データバスバツ
フア、333……コントロールバスバツフア、3
40……使用区分情報記憶回路、341……アド
レス設定回路、342……アドレス切換回路、3
43……データ設定回路、344……アドレス切
換信号、351……動作検出回路、352……動
作比較回路、353……ライト禁止信号、354
……アクセス禁止信号、355……メモリ置換信
号、356……インバータ、357……アクセス
検出信号、358……ライト検出信号、359…
…アクセスエラー信号、360……ライトエラー
信号、A,a……アドレスバス、C,c……コン
トロールバス、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, 132...Data bus buffer, 133...Control bus buffer, 141...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, 1
54...Access detection signal, 155...Access error signal, 161...Memory selection detection circuit, 1
62...Replacement signal generation circuit, 163...Replacement area setting circuit, 164...Inverter, 165...Memory selection detection signal, 166...Replacement signal, 200
...The device to be debugged, 210...
CPU, 220...Memory, 300...Debug device according to the present invention, 310...Emulation
CPU, 320...Replacement memory, 331...Address bus buffer, 332...Data bus buffer, 333...Control bus buffer, 3
40...Use classification information storage circuit, 341...Address setting circuit, 342...Address switching circuit, 3
43...Data setting circuit, 344...Address switching signal, 351...Operation detection circuit, 352...Operation comparison circuit, 353...Write prohibition signal, 354
... 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, C, c...Control bus, D, d...Data bus.
Claims (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 for storing information indicating usage classification of memory space used by the program, and accessing the usage classification information storage circuit. an address setting circuit that generates an address for the purpose of the application, and an address that selects either the address generated by the emulation CPU or the address generated by the address setting circuit and supplies it to the usage classification information storage circuit for access. a 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 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 each memory space is write-protected. 3. When the processing circuit reads information indicating write prohibition 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 performing a write operation. 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.
Debugging device as described in section. 6. The debugging device according to claim 1, further comprising a replacement memory for debugging. 7 For each memory space, determine whether the information indicating the usage classification of memory space is the memory space allocated to the replacement memory or the memory space allocated to the memory in the device that is the target of debugging. 7. The debugging device according to claim 6, further comprising memory selection information indicating the debugging device. 8. The processing circuit performs an operation of switching the memory to be accessed by the emulation CPU to the replacement memory or the 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.
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 JPS6346549A (en) | 1988-02-27 |
| JPH0426735B2 true 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) |
Families Citing this family (1)
| 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 |
-
1986
- 1986-08-15 JP JP61190472A patent/JPS6346549A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6346549A (en) | 1988-02-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4488256A (en) | Memory management unit having means for detecting and preventing mapping conflicts | |
| US5023777A (en) | Information processing system using domain table address extension for address translation without software modification | |
| US5606662A (en) | Auto DRAM parity enable/disable mechanism | |
| JPH0680501B2 (en) | Memory addressing error detection circuit | |
| JPS6376034A (en) | Multiple address space control method | |
| US4477871A (en) | Global operation coordination method and circuit | |
| JPH0426735B2 (en) | ||
| JP3565987B2 (en) | Emulator device | |
| JPS6342294B2 (en) | ||
| JPS6220583B2 (en) | ||
| JPS6346466B2 (en) | ||
| JP2600376B2 (en) | Memory controller | |
| JPS58213349A (en) | Information processor | |
| JPS58137066A (en) | Memory access controlling method of computer system | |
| JPS59139199A (en) | Protecting method of storage | |
| JPS6035694B2 (en) | Main memory protection method | |
| JPS61139858A (en) | Access control system for dual port memory | |
| JPH039427A (en) | Microprogram controller | |
| JPH0652507B2 (en) | Microcomputer development equipment | |
| JPH0219933A (en) | Memory circuit controller | |
| JPS60258654A (en) | Semiconductor memory | |
| JPS60118952A (en) | Virtual address control system | |
| JPH04106647A (en) | Memory diagnostic system | |
| JPS6148049A (en) | Check device of mamory-access | |
| JPH01214948A (en) | Access controller for random access memory |