JPH04304532A - Computer provided with debugging function for rom program - Google Patents
Computer provided with debugging function for rom programInfo
- Publication number
- JPH04304532A JPH04304532A JP3069658A JP6965891A JPH04304532A JP H04304532 A JPH04304532 A JP H04304532A JP 3069658 A JP3069658 A JP 3069658A JP 6965891 A JP6965891 A JP 6965891A JP H04304532 A JPH04304532 A JP H04304532A
- Authority
- JP
- Japan
- Prior art keywords
- address
- rom
- ram
- program
- 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.)
- Pending
Links
- 230000006870 function Effects 0.000 claims description 3
- 230000006866 deterioration Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 4
- 238000000034 method Methods 0.000 description 3
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
【0001】0001
【産業上の利用分野】本発明は、ROM化プログラムの
デバッグ機能付コンピュータに関し、特にROM化する
プログラムをRAM上でデバッグするコンピュータに関
する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer with a function for debugging a program stored in a ROM, and more particularly to a computer that debugs a program stored in a ROM on a RAM.
【0002】0002
【従来の技術】従来のコンピュータでは、ROMのアド
レスとは異なるアドレスのRAMにプログラムを書き込
んでデバッグを行うか、あるいは同一アドレスにROM
とRAMの両方を実装し、デバッグ動作時にはRAMに
書き込んだプログラムを実行し、通常動作時にはROM
に書き込まれたプログラムを実行するか、または、RO
Mを取り外し、代りにRAMを実装してデバッグを行う
かしていた。[Prior Art] In a conventional computer, a program is written to a RAM at a different address from the ROM address for debugging, or a ROM is written at the same address.
and RAM, and executes the program written in RAM during debugging and ROM during normal operation.
Execute the program written in the RO
I removed M and installed RAM in its place for debugging.
【0003】0003
【発明が解決しようとする課題】この従来のコンピュー
タでは、ROMのアドレスとは異なるアドレスのRAM
にプログラムを書き込んでデバッグを行った場合は、実
際に使用するアドレスとは異なるために、プログラム中
で絶対アドレスを使用した命令があれば、アドレスの変
更が必要となり、完全なデバッグができないという問題
点があった。[Problem to be Solved by the Invention] In this conventional computer, the RAM has an address different from that of the ROM.
If you write a program and debug it, the address will be different from the address actually used, so if there is an instruction in the program that uses an absolute address, the address will need to be changed, making complete debugging impossible. There was a point.
【0004】また、ROMアドレスと同一アドレスに実
装したRAMを使用する場合は、プログラム中のアドレ
ス変更の問題は回避できるが、通常動作時には、RAM
が不要となってしまう。また、不要となったRAMをデ
ータ領域として利用しようとすると、RAMにアクセス
する回路構成が複雑となるうえに、アクセスプログラム
が必要となり、処理速度が低下するという問題点があっ
た。Furthermore, when using RAM mounted at the same address as the ROM address, the problem of address changes during programming can be avoided, but during normal operation, the RAM
becomes unnecessary. Furthermore, if an attempt is made to use RAM that is no longer needed as a data area, there is a problem in that the circuit configuration for accessing the RAM becomes complicated, and an access program is required, resulting in a reduction in processing speed.
【0005】また、ROMをRAMに置き換える方法で
は、ワンチップマイクロコンピュータのように、プログ
ラムでの初期設定が必要なコンピュータでは、電源投入
時の初期設定ができないのでこの方法が利用できるコン
ピュータが限定されるという問題点があった。[0005] Furthermore, in the method of replacing ROM with RAM, computers that require initial settings using a program, such as one-chip microcomputers, cannot be initialized when the power is turned on, so this method is limited to computers that can be used. There was a problem that
【0006】[0006]
【課題を解決するための手段】本発明のROM化プログ
ラムのデバッグ機能付コンピュータは、デバッグ動作を
行うか通常動作を行うかを選択する動作選択スイッチと
、リセットスイッチにより発生させたリセットパルスに
より前記動作選択スイッチの値をラッチし動作選択信号
として送出するラッチ回路と、前記ラッチ回路からの前
記動作選択信号によりROMとRAMとのメモリマップ
を変更するアドレスデコード回路とを備えている。[Means for Solving the Problems] A computer with a debugging function for a ROMized program of the present invention has an operation selection switch for selecting whether to perform debugging operation or normal operation, and a reset pulse generated by a reset switch. The device includes a latch circuit that latches the value of the operation selection switch and sends it out as an operation selection signal, and an address decode circuit that changes the memory map of ROM and RAM based on the operation selection signal from the latch circuit.
【0007】[0007]
【実施例】次に本発明について図面を参照して説明する
。DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be explained with reference to the drawings.
【0008】図1は、本発明の一実施例の機能ブロック
図である。デバッグ動作を行うか、通常動作を行うかを
動作選択スイッチ1により選択し、リセットスイッチ2
で発生したリセットパルスにより動作選択スイッチ1の
値をラッチ回路3によってラッチすることにより、リセ
ット時にどちらの動作を行うかを決定した動作選択信号
S1 を作成する。プログラムにより動作するCPU4
は、デバッグ動作時にはコンピュータの初期設定を行う
プログラムが書き込まれ、通常動作時にはデバッグが完
了したプログラムが書き込まれたROM6と、デバッグ
動作時にはデバッグ中のプログラムとデータを記憶し、
通常動作時にはデータを記憶するRAM7とがCPUバ
ス10を介して接続されている。また、CPU4の動作
を介さずに直接ROM6またはRAM7を入出力装置9
がアクセスするためのDMA回路8もCPUバス10に
接続されている。CPUバス10からの信号により、R
OM選択信号S2 、またはRAM選択信号S3を出力
するアドレスデコード回路5は、ラッチ回路3からの動
作選択信号S1 の値によりデバッグ動作時と通常動作
時でメモリマップの切り替えを行う。FIG. 1 is a functional block diagram of an embodiment of the present invention. Select whether to perform debug operation or normal operation with operation selection switch 1, and reset switch 2.
By latching the value of the operation selection switch 1 with the reset pulse generated by the latch circuit 3, an operation selection signal S1 is created which determines which operation is to be performed at the time of reset. CPU4 operated by program
The ROM 6 stores a program for initializing the computer during debug operation, stores a program that has been debugged during normal operation, and stores the program and data being debugged during debug operation.
During normal operation, a RAM 7 for storing data is connected via a CPU bus 10. In addition, the ROM 6 or RAM 7 can be directly connected to the input/output device 9 without going through the operation of the CPU 4.
A DMA circuit 8 for access is also connected to the CPU bus 10. A signal from the CPU bus 10 causes R
The address decode circuit 5 which outputs the OM selection signal S2 or the RAM selection signal S3 switches the memory map between debug operation and normal operation depending on the value of the operation selection signal S1 from the latch circuit 3.
【0009】次に動作を説明する。Next, the operation will be explained.
【0010】図2は、デバッグ動作時のメモリマップ、
図3は通常動作時のメモリマップである。初めに、DM
A回路8が動作可能となり、入出力装置9によりROM
6またはRAM7がアクセスできるようになるまでの初
期設定プログラムをROM6に書き込み、動作選択スイ
ッチ1を通常動作にしてリセットをかける。CPU4は
、リセット後開始アドレスのアドレスA1 を出力し、
アドレスデコード回路5は、ROM選択信号S2 を出
力し、ROM6のプログラムを実行してDMA回路8を
動作可能とする。次に、デバッグを行うプログラムを入
出力装置9からRAM7cに転送する。この時、転送開
始アドレスは、アドレスA3 となるがデバッグを行う
プログラムのアドレスを変更する必要はない。FIG. 2 shows a memory map during debug operation.
FIG. 3 is a memory map during normal operation. First, DM
The A circuit 8 becomes operational, and the ROM is
6 or RAM 7 can be accessed, and the operation selection switch 1 is set to normal operation and reset. The CPU 4 outputs address A1, which is the start address after reset,
The address decode circuit 5 outputs a ROM selection signal S2, executes the program in the ROM 6, and enables the DMA circuit 8. Next, the program to be debugged is transferred from the input/output device 9 to the RAM 7c. At this time, the transfer start address becomes address A3, but there is no need to change the address of the program to be debugged.
【0011】次に、動作選択スイッチ1をデバッグ動作
にしリセットをかけると、アドレスデコード回路5は、
RAM7cをRAM7aとしてアクセスするRAM選択
信号S3 を出力し、通常動作でアドレスA3 から書
き込んだデバッグ中のプログラムを、CPU4のリセッ
ト後開始アドレスであるアドレスA1 より実行する。Next, when the operation selection switch 1 is set to debug operation and reset is applied, the address decode circuit 5
A RAM selection signal S3 for accessing RAM 7c as RAM 7a is output, and the program being debugged written from address A3 in normal operation is executed from address A1, which is the start address after CPU 4 is reset.
【0012】この時、ROM6はアクセス禁止となる。
アドレスA2 以上アドレスA3 未満のRAM7bは
、デバッグ動作,通常動作ともアドレスに変更はない。
また、アドレスA3 以上のRAM7cはデバッグ完了
後はデータ領域として使用可能である。At this time, access to the ROM 6 is prohibited. The addresses of the RAM 7b at addresses greater than or equal to address A2 and less than address A3 remain unchanged in both debug and normal operations. Further, the RAM 7c at address A3 or above can be used as a data area after debugging is completed.
【0013】なお、上記実施例では、コンピュータの初
期設定プログラムをROM6に書き込んだが、初期設定
が不要なコンピュータを使用する場合は、デバッグ動作
中のROM6は無くても良い。また、上記実施例では、
DMA回路8を用いたが、デバッグ中のプログラムをR
AM7cに書き込む方法は、これに限定されない。In the above embodiment, the initial setting program for the computer is written in the ROM 6, but if a computer that does not require initial settings is used, the ROM 6 may not be present during debugging. Furthermore, in the above embodiment,
Although DMA circuit 8 was used, the program being debugged was
The method of writing to AM7c is not limited to this.
【0014】[0014]
【発明の効果】以上説明したように本発明は、デバッグ
動作時と通常動作時のメモリマップをリセット時に切替
えることにより、ROMアドレスと異なるRAMアドレ
スにプログラムを書き込んでデバッグを行うためにプロ
グラム中の絶対アドレスを使用した命令を変更する必要
がなくなり、また、ROMとRAMを常に同一アドレス
に取り付けて両方をアクセスするための複雑な回路や、
アクセスプログラムが不要となり、処理速度も低下しな
くなる。また、プログラムによる初期設定が必要なコン
ピュータでも使用できるという効果を有する。As explained above, the present invention switches the memory map during debugging operation and normal operation at reset, so that the program can be written to a RAM address different from the ROM address for debugging. It eliminates the need to change instructions that use absolute addresses, and also eliminates the need for complex circuits to always attach ROM and RAM to the same address and access them.
No access program is required, and processing speed does not decrease. It also has the advantage that it can be used on computers that require initial settings using a program.
【図1】本発明の一実施例の機能ブロック図である。FIG. 1 is a functional block diagram of an embodiment of the present invention.
【図2】デバッグ動作時のメモリマップを示す図である
。FIG. 2 is a diagram showing a memory map during debugging operation.
【図3】通常動作時のメモリマップを示す図である。FIG. 3 is a diagram showing a memory map during normal operation.
1 動作選択スイッチ 2 リセットスイッチ 3 ラッチ回路 4 CPU 5 アドレスデコード回路 6 ROM 7 RAM 8 DMA回路 9 入出力装置 10 CPUバス 1 Operation selection switch 2 Reset switch 3 Latch circuit 4 CPU 5 Address decoding circuit 6 ROM 7 RAM 8 DMA circuit 9 Input/output device 10 CPU bus
Claims (1)
かを選択する動作選択スイッチと、リセットスイッチに
より発生させたリセットパルスにより前記動作選択スイ
ッチの値をラッチし動作選択信号として送出するラッチ
回路と、前記ラッチ回路からの前記動作選択信号により
ROMとRAMとのメモリマップを変更するアドレスデ
コード回路とを備えることを特徴とするROM化プログ
ラムのデバッグ機能付コンピュータ。1. An operation selection switch that selects whether to perform a debug operation or a normal operation, and a latch circuit that latches the value of the operation selection switch using a reset pulse generated by a reset switch and sends it as an operation selection signal. A computer with a debugging function for a ROMized program, comprising: an address decoding circuit that changes a memory map between a ROM and a RAM based on the operation selection signal from the latch circuit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3069658A JPH04304532A (en) | 1991-04-02 | 1991-04-02 | Computer provided with debugging function for rom program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3069658A JPH04304532A (en) | 1991-04-02 | 1991-04-02 | Computer provided with debugging function for rom program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04304532A true JPH04304532A (en) | 1992-10-27 |
Family
ID=13409156
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3069658A Pending JPH04304532A (en) | 1991-04-02 | 1991-04-02 | Computer provided with debugging function for rom program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH04304532A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5983367A (en) * | 1996-10-29 | 1999-11-09 | Mitsubishi Denki Kabushiki Kaisha | Microprocessor having a CPU and at least two memory cell arrays on the same semiconductor chip, including a shared sense amplifier |
-
1991
- 1991-04-02 JP JP3069658A patent/JPH04304532A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5983367A (en) * | 1996-10-29 | 1999-11-09 | Mitsubishi Denki Kabushiki Kaisha | Microprocessor having a CPU and at least two memory cell arrays on the same semiconductor chip, including a shared sense amplifier |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2731692B2 (en) | Debug device | |
| KR970012145A (en) | How to work with the data processor, how to run its debugging operations, and how to modify its breakpoint values | |
| JPH08202563A (en) | Computer system | |
| JPH04304532A (en) | Computer provided with debugging function for rom program | |
| JPH1083367A (en) | Peripheral device controller | |
| JPH0337897A (en) | Microcomputer | |
| JPS62248043A (en) | Memory switching circuit for fetching microcomputer instruction | |
| JPH01239485A (en) | Large-scale integrated circuit | |
| JP3283505B2 (en) | Microcomputer | |
| JPH1083384A (en) | Microcomputer | |
| KR100277901B1 (en) | One chip micro computer | |
| JPH06222814A (en) | Input/output device for programmable controller | |
| JPS63311447A (en) | Microprocessor for debug | |
| JPS6061841A (en) | Control system of program evaluating device | |
| JPS59163653A (en) | Debug device | |
| JP2000231512A (en) | High speed memory copy method and copy circuit | |
| JPH0612252A (en) | Microcomputer | |
| JPS59167766A (en) | Memory access system | |
| JPH0782463B2 (en) | Communication control device | |
| JPS6227423B2 (en) | ||
| JPH09325935A (en) | Bus switching circuit | |
| JPS6273339A (en) | Microprocessor development aided device | |
| JPH05274172A (en) | Microcomputer | |
| JP2004185356A (en) | Debug device | |
| JPH09138758A (en) | Intelli adapter device |