JPS6212540B2 - - Google Patents

Info

Publication number
JPS6212540B2
JPS6212540B2 JP54141877A JP14187779A JPS6212540B2 JP S6212540 B2 JPS6212540 B2 JP S6212540B2 JP 54141877 A JP54141877 A JP 54141877A JP 14187779 A JP14187779 A JP 14187779A JP S6212540 B2 JPS6212540 B2 JP S6212540B2
Authority
JP
Japan
Prior art keywords
debugging
data
debugged
output
cpu
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
Application number
JP54141877A
Other languages
Japanese (ja)
Other versions
JPS5665253A (en
Inventor
Kenji Shiga
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.)
Canon Machinery Inc
Original Assignee
Nichiden Machinery Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nichiden Machinery Ltd filed Critical Nichiden Machinery Ltd
Priority to JP14187779A priority Critical patent/JPS5665253A/en
Publication of JPS5665253A publication Critical patent/JPS5665253A/en
Publication of JPS6212540B2 publication Critical patent/JPS6212540B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Description

【発明の詳細な説明】 この発明はコンピユータのデバツグ装置に関
し、特に小型のコンピユータ装置を含む被デバツ
グ装置において、デバツグの必要が生じた場合
に、被デバツグ装置の制御動作を乱すことなく、
さらに、デバツグに必要な各種データの抽出を高
速に行ない、リアルタイムデバツグを可能にした
デバツグ装置である。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a computer debugging device, and in particular, to a debugging device including a small computer device, when the need for debugging arises, the debugging device can be debugged without disturbing the control operation of the debugged device.
Furthermore, it is a debugging device that can extract various data necessary for debugging at high speed, making real-time debugging possible.

一般に、自動制御装置においては、マイクロコ
ンピユータなどの、比較的小型のコンピユータを
組み込むことによつて、予め設定されたプログラ
ムに基いて自動制御動作を行つている。このよう
な自動制御装置においては、何らかの異常が生じ
た時やメンテナンスを行なうとき、コンピユータ
の各動作順序に基く処理途中のデータを読み出す
ことによつて異常の原因を追求する必要がある。
Generally, an automatic control device incorporates a relatively small computer such as a microcomputer to perform automatic control operations based on a preset program. In such an automatic control device, when an abnormality occurs or when maintenance is performed, it is necessary to investigate the cause of the abnormality by reading out data that is being processed based on the sequence of operations of the computer.

その一方法として、アドレス比較器を用いて、
被デバツグ装置のアドレスが設定したアドレスと
一致した時に、アドレス一致信号を発生し、これ
によつて被バツグ装置の動作に割り込みをかけ、
割り込みサービスプログラムを実行し、必要なデ
ータを出力装置に表示させる方法が提案されてい
る。
One method is to use an address comparator,
When the address of the debugged device matches the set address, an address match signal is generated, which interrupts the operation of the debugged device.
A method has been proposed in which an interrupt service program is executed and necessary data is displayed on an output device.

ところが、一般にコンピユータ内蔵の自動制御
装置等は、原価低減のため、デバツグに必要なア
ドレス比較器や入出力装置を備えておらず、また
割り込みサービスプログラムの準備もない必要最
小限の構成としている。また入出力装置の動作は
コンピユータ本体に比べてはるかるかに遅いの
で、上述のデバツクを行わせると、その間、自動
制御装置の本来の動作を中断しなければならない
という重大な欠点があつた。
However, in order to reduce costs, automatic control devices built into computers generally do not have address comparators or input/output devices necessary for debugging, nor do they have interrupt service programs. Furthermore, since the operation of the input/output device is much slower than that of the computer itself, when the above-mentioned debugging was carried out, there was a serious drawback in that the original operation of the automatic control device had to be interrupted during that time.

本発明は、上記問題点に鑑み提案されたもの
で、被デバツグ装置の動作に影響を与えることな
く、外部から所望するメモリのロケーシヨンやレ
ジスタの内容を取り出すことのできるデバツグ装
置を提供するものである。
The present invention has been proposed in view of the above-mentioned problems, and provides a debugging device that can retrieve desired memory locations and register contents from the outside without affecting the operation of the debugged device. be.

以下に本発明を図面より説明する。第1図はこ
の発明の一実施例を示すブロツク図で、Aはデバ
ツグされるコンピユータ装置(被デバツグ装置)
で、中央演算処理装置(CPU)1と、CPU1の
データバスDBに双方向性バスバツフア2を介し
て接続され、CPU1の処理手順等を予め設定し
たプログラムや入出力データを記憶するメモリ3
と、CPU1及びCPU1によつて制御される自動
制御装置Bを接続する入出力インタフエース4と
を含む。Cは本発明によるデバツグ装置で、5は
被デバツグ装置Aと同じ構成のコンピユータ装置
で、CPU6と、CPU6のデータバスDBに双方向
性バスバツフア7を介して接続され、アドレスデ
ータ入力プログラムや出力表示プログラム等のデ
バツグ用プログラムを記憶したメモリ8と、入力
装置9及び出力装置10とCPU6とを接続する
入出力インターフエース11とを含む。そして1
2は被デバツグ装置A及びデバツグ装置Cの各
CPU1,6のデータバスDBに双方向性バスバツ
フア13,14を介して接続され、CPU1のレ
ジスタ内のデータやメモリ3のデータを転送する
転送プログラム等のデバツグに必要なプログラム
を記憶し、また転送されたデータを収容する共通
メモリで、15は予め特定の命令を発生するよう
に設定された命令発生部で、例えば共通メモリ1
2のデバツグ用サブルーチンプログラムをコール
するコール命令を発生するものである。そして1
6は命令発生部15の信号をCPU1のデータバ
スDBに入力するバスバツフア、17はCPU6の
アドレスバスABに接続され、入力装置9によつ
て設定されたアドレスデータをラツチするラツチ
回路、18はラツチ回路17の出力及びCPU1
のアドレスバスABを入力として、アドレスデー
タの一致を検出する比較器、19はRSフリツプ
フロツプ回路で、比較器18の出力をS入力に、
被デバツグ装置4のCPU1の命令フエツチ完了
信号出力をR入力にそれぞれ接続している。各バ
スバツフア2,7,13,14,16はそれぞれ
トライステートのバスバツフアで端子CSをOレ
ベルに設定することにより、出力をフローテイン
グ状態にできるもので、バスバツフアを不能動状
態とした時に、その負荷に影響を及さないように
している。フリツプフロツプ回路19のQ出力を
バスバツフア16の端子CSに接続すると共に、
インバータ20を介して双方向性バスバツフア2
の端子CSに接続している。ここでフリツプフロ
ツプ回路19、インバータ20は比較器18の出
力に基いて、メモリ3と命令発生部15とを切換
える切換手段を形成している。またコンピユータ
装置5の入出力インターフエース11の出力をラ
ツチ回路17のラツチ端子Lに接続し、他の出力
を双方向性バスバツフア14の端子CSに接続す
ると共に、インバータ21を介して双方向性バス
バツフア13の端子CSに接続している。図示矢
印は信号の流れを、また(〓)は複数の信号線で
あることを示す。
The present invention will be explained below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention, and A is a computer device to be debugged (device to be debugged).
A memory 3 is connected to a central processing unit (CPU) 1 and a data bus DB of the CPU 1 via a bidirectional bus buffer 2, and stores programs in which processing procedures of the CPU 1 are set in advance and input/output data.
and an input/output interface 4 for connecting a CPU 1 and an automatic control device B controlled by the CPU 1. C is a debugging device according to the present invention, and 5 is a computer device having the same configuration as the device to be debugged A, which is connected to the CPU 6 and the data bus DB of the CPU 6 via a bidirectional bus buffer 7, and is used for inputting address data and displaying output. It includes a memory 8 that stores debug programs such as programs, and an input/output interface 11 that connects an input device 9 and an output device 10 to the CPU 6. and 1
2 is each of debugged device A and debugged device C.
It is connected to the data buses DB of CPUs 1 and 6 via bidirectional bus buffers 13 and 14, and stores and transfers programs necessary for debugging, such as transfer programs that transfer data in the registers of CPU 1 and data in memory 3. 15 is a command generation section that is set in advance to generate a specific command; for example, the common memory 1
This command generates a call instruction to call the debugging subroutine program No. 2. and 1
6 is a bus buffer that inputs the signal from the instruction generation unit 15 to the data bus DB of the CPU 1; 17 is a latch circuit that is connected to the address bus AB of the CPU 6 and latches the address data set by the input device 9; and 18 is a latch circuit. Output of circuit 17 and CPU1
19 is an RS flip-flop circuit, the output of comparator 18 is input to S input, and 19 is an RS flip-flop circuit.
The instruction fetch completion signal output of the CPU 1 of the device to be debugged 4 is connected to the R input. Each of the bus buffers 2, 7, 13, 14, and 16 is a tri-state bus buffer whose output can be put into a floating state by setting the terminal CS to the O level. I try not to affect it. While connecting the Q output of the flip-flop circuit 19 to the terminal CS of the bus buffer 16,
Bidirectional bus buffer 2 via inverter 20
is connected to terminal CS. Here, the flip-flop circuit 19 and the inverter 20 form a switching means for switching between the memory 3 and the instruction generating section 15 based on the output of the comparator 18. Further, the output of the input/output interface 11 of the computer device 5 is connected to the latch terminal L of the latch circuit 17, and the other output is connected to the terminal CS of the bidirectional bus buffer 14. It is connected to terminal CS of 13. The illustrated arrows indicate the flow of signals, and (ⓓ) indicates a plurality of signal lines.

また第2図は第1図のメモリ3,8及び共通メ
モリ12のメモリ領域の一例を示すもので、メモ
リ3には自動制御機器Bを制御するためのプログ
ラム3aが、メモリ8にはデバツグ装置Cを制御
するためのプログラム8aがそれぞれ収容され、
各プログラム3a,8aと重複しない共通のメモ
リ領域に、共通メモリ12のメモリ領域を配し、
被デバツグ装置AのCPU1の各レジスタ内のデ
ータやメモリ3内のデータを転送するプログラム
12aと、転送されたデータを記憶するデータ収
容領域12bが設定され、バスバツフア13,1
4により、メモリ3,8のいずれか一方に組み込
まれる。
FIG. 2 shows an example of the memory areas of the memories 3 and 8 and the common memory 12 in FIG. A program 8a for controlling C is accommodated, respectively,
The memory area of the common memory 12 is arranged in a common memory area that does not overlap with each program 3a, 8a,
A program 12a for transferring data in each register of the CPU 1 and data in the memory 3 of the debugged device A, and a data storage area 12b for storing the transferred data are set, and the bus buffers 13, 1
4, it is incorporated into either one of the memories 3 and 8.

以下に本発明の動作を説明する。 The operation of the present invention will be explained below.

初期状態として、フリツプフロツプ回路19の
Q出力が、Oレベルで、双方向性バスバツフア1
4の端子CSが1レベルであるとする。これによ
つて命令発生部15はCPU1から分離さ、イン
バータ20の出力は1レベルとなるから双方向性
バスバツフア2は能動状態となりCPU1とメモ
リ3とが接続される。また双方向性バスバツフア
14は能動状態となり、共通メモリ12はCPU
6と接続され、インバータ21の出力はOレベル
となるから双方向性バスバツフア13は不能状態
となり、共通メモリ12はCPU1から分離され
る。従つて被デバツグ装置Aはメモリ3のプログ
ラムに基いて動作し、自動制御装置Bを制御し、
デバツグ装置Cはメモリ8のプログラムに基い
て、入力装置9からの入力データ待ちの状態とな
る。ここで入力装置9によりチエツクしたいアド
レスを入力すると、アドレスデータはアドレスバ
スABからラツチ回路17の入力に与えられ、ア
ドレス設定によつて入出力インターフエース11
よりラツチ信号を発生して、アドレスデータをラ
ツチする。これと同時に入出力インターフエース
の出力信号により、双方向性バスバツフア14は
不能動化し、インバータ21により、双方向性バ
スバツフア13が能動化して共通メモリ12を
CPU1に接続する。この状態で、被デバツグ装
置Aが作動することにより、CPU1のアドレス
バスABのデータは順次変化するが、ラツチ回路
17にラツチされたアドレスデータと一致する
と、比較器18の出力に一致出力を発生する。こ
れによりフリツプフロツプ回路19のS入力が1
レベルとなり、Q出力を1レベルに保持する。こ
れにより、バスバツフア16が能動状態となると
同時に、インバータ20により双方向性バスバツ
フア2が不能動状態となつてメモリ3をCPU1
から分離し、命令発生部15からのコール命令を
CPU1のデータバスDBに入力する。CPU1は命
令フエツチサイクルで命令を取り入れるので、命
令発生部15がCPU1に接続され、命令フエツ
チサイクルの立ち下がりを検出してこの信号をフ
リツプフロツプ回路19のR入力に入力している
から、コール命令をフエツチ後フリツプフロツプ
回路19の出力は反転し、Q出力はOレベルとな
り、CPU1から命令発生部を分離し、再びメモ
リ3をCPI1に接続する。この時にはCPU1は共
通メモリ12のデバツグ用プログラム12aを実
行し、そのデータ収容領域12bに所定のデータ
を収容する。そしてプログラム12aの末尾のリ
ターン命令により、再びメモリ3のプログラムを
実行する。共通メモリ12の内容は入力装置で、
表示のための操作により、入出力インターフエー
ス11の出力は1レベルとなり、双方向性バスバ
ツフア13,14の状態を反転し、共通メモリ1
2をCPU1から分離し、CPU6に接続するため
任意時刻に、共通メモリ12のデータ収容領域1
2bの内容を出力装置10に表示させることがで
きる。
In the initial state, the Q output of the flip-flop circuit 19 is at O level, and the bidirectional bus buffer 1
Assume that terminal CS of No. 4 is at level 1. As a result, the instruction generating section 15 is separated from the CPU 1, and the output of the inverter 20 becomes 1 level, so the bidirectional bus buffer 2 becomes active and the CPU 1 and the memory 3 are connected. Also, the bidirectional bus buffer 14 becomes active, and the common memory 12 is connected to the CPU.
Since the output of the inverter 21 becomes O level, the bidirectional bus buffer 13 becomes disabled and the common memory 12 is separated from the CPU 1. Therefore, the debugged device A operates based on the program in the memory 3 and controls the automatic control device B.
Based on the program in the memory 8, the debugging device C enters a state of waiting for input data from the input device 9. Here, when the address to be checked is input using the input device 9, the address data is given from the address bus AB to the input of the latch circuit 17, and depending on the address setting, the address data is input to the input/output interface 11.
A latch signal is generated to latch the address data. At the same time, the bidirectional bus buffer 14 is disabled by the output signal of the input/output interface, and the bidirectional bus buffer 13 is enabled by the inverter 21 to read the common memory 12.
Connect to CPU1. In this state, as the debugged device A operates, the data on the address bus AB of the CPU 1 changes sequentially, but when it matches the address data latched in the latch circuit 17, a match output is generated at the output of the comparator 18. do. As a result, the S input of the flip-flop circuit 19 becomes 1.
level, and the Q output is held at 1 level. As a result, the bus buffer 16 becomes active, and at the same time, the bidirectional bus buffer 2 becomes disabled by the inverter 20, and the memory 3 is transferred to the CPU 1.
The call command from the command generation unit 15 is separated from
Input to data bus DB of CPU1. Since the CPU 1 takes in instructions in the instruction fetch cycle, the instruction generation section 15 is connected to the CPU 1, detects the falling edge of the instruction fetch cycle, and inputs this signal to the R input of the flip-flop circuit 19. After fetching the instruction, the output of the flip-flop circuit 19 is inverted, the Q output becomes O level, the instruction generating section is separated from the CPU 1, and the memory 3 is connected to the CPI 1 again. At this time, the CPU 1 executes the debugging program 12a in the common memory 12, and stores predetermined data in the data storage area 12b. Then, the program in the memory 3 is executed again by the return instruction at the end of the program 12a. The contents of the common memory 12 are input by an input device,
Due to the display operation, the output of the input/output interface 11 becomes 1 level, the states of the bidirectional bus buffers 13 and 14 are reversed, and the common memory 1
2 from the CPU 1 and connect it to the CPU 6 at any time, the data storage area 1 of the common memory 12
2b can be displayed on the output device 10.

このようにデバツグされる被デバツグ装置が必
要最小限の構成であつても、本発明にかかるデバ
ツグ装置を用いることにより、被デバツグ装置は
接続用の端子を設けておくだけで、デバツグする
ことができる。またデータの転送が自動制御装置
の動作速度に比して十分短かく、自動制御装置の
本来の動作を停止させることなく、実働状態のデ
ータが得られるためプログラムのチエツクだけで
なく、機械的なタイミングや外来ノイズ等の環境
条件まで含めたデバツグも可能であり、任意時刻
に所望するアドレスのデータを取り出し表示させ
ることができる。
Even if the device to be debugged has the minimum necessary configuration, by using the debugging device according to the present invention, the device to be debugged can be debugged by simply providing connection terminals. can. In addition, the data transfer is sufficiently short compared to the operating speed of the automatic control device, and data in the actual operating state can be obtained without stopping the original operation of the automatic control device, so it can be used not only for checking programs but also for mechanical It is also possible to debug environmental conditions such as timing and external noise, and it is possible to retrieve and display data at a desired address at any time.

尚、本発明は上記実施例に限定されることな
く、例えば複数のアドレスを予め設定しておい
て、順次デバツグし、一括して表示することもで
きる。
It should be noted that the present invention is not limited to the above-mentioned embodiment, and for example, a plurality of addresses can be set in advance, debugged sequentially, and displayed all at once.

以上のように、本発明によれば、コンピユータ
装置を含む被デバツグ装置の動作をデバツグする
必要が生じた場合に、デバツグすべきデータを被
デバツグ装置のプログラム順次の動作を連続的に
中断させることなく、瞬時的に読み出すことによ
つてリアルタイムにデバツグできるデバツグ装置
が得られる。
As described above, according to the present invention, when it becomes necessary to debug the operation of a device to be debugged including a computer device, data to be debugged can be continuously interrupted in the sequential operation of the program of the device to be debugged. A debugging device capable of debugging in real time can be obtained by instantaneously reading data.

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

第1図は本発明の実施例を示すブロツク図、第
2図は各メモリの領域の一例を示す図面である。 A……被デバツグ装置、C……デバツグ装置、
5……デバツグ用コンピユータ、9……入力装
置、10……出力装置、12……共通メモリ、1
2a……デバツグ用プログラム、12b……デー
タ収容領域、15……命令発生部、17……ラツ
チ回路、18……比較器、19,20……切換手
段。
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a drawing showing an example of each memory area. A...device to be debugged, C...device to be debugged,
5...Debugging computer, 9...Input device, 10...Output device, 12...Common memory, 1
2a...Debugging program, 12b...Data storage area, 15...Instruction generation unit, 17...Latch circuit, 18...Comparator, 19, 20...Switching means.

Claims (1)

【特許請求の範囲】[Claims] 1 デバツグのためのコンピユータと、デバツグ
用コンピユータ及びデバツグされるコンピユータ
を含む被デバツグ装置に択一的に接続され、かつ
デバツグ用プログラム並びにデバツグにより取り
出したデータを記憶するデータ収容領域を有する
共通メモリと、デバツグのためのデータを入力す
る入力装置と、取り出したデータの表示を行なう
出力装置と、デバツグを必要とする命令のアドレ
スデータをラツチするラツチ回路と、ラツチ回路
のアドレスデータ及び被デバツグ装置のアドレス
データを比較する比較器と、被デバツグ装置に共
通メモリのデバツグ用プログラムを実行させる命
令を発生する命令発生部と、比較器の出力に基い
て命令発生部を被デバツグ装置のコンピユータに
接続させる切換手段とを具備したことを特徴とす
るデバツグ装置。
1 A computer for debugging, and a common memory that is selectively connected to the debugging computer including the debugging computer and the computer to be debugged, and has a data storage area for storing the debugging program and data retrieved by the debugging. , an input device for inputting data for debugging, an output device for displaying retrieved data, a latch circuit for latching the address data of the instruction requiring debugging, and the address data of the latch circuit and the device to be debugged. A comparator that compares address data, an instruction generation unit that generates an instruction to cause the device to be debugged to execute a debugging program in a common memory, and a command generation unit that connects to the computer of the device to be debugged based on the output of the comparator. A debugging device characterized by comprising a switching means.
JP14187779A 1979-10-31 1979-10-31 Debug device Granted JPS5665253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14187779A JPS5665253A (en) 1979-10-31 1979-10-31 Debug device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14187779A JPS5665253A (en) 1979-10-31 1979-10-31 Debug device

Publications (2)

Publication Number Publication Date
JPS5665253A JPS5665253A (en) 1981-06-02
JPS6212540B2 true JPS6212540B2 (en) 1987-03-19

Family

ID=15302235

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14187779A Granted JPS5665253A (en) 1979-10-31 1979-10-31 Debug device

Country Status (1)

Country Link
JP (1) JPS5665253A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02103604A (en) * 1988-10-12 1990-04-16 Mitsubishi Electric Corp Programmable controller

Also Published As

Publication number Publication date
JPS5665253A (en) 1981-06-02

Similar Documents

Publication Publication Date Title
KR0168656B1 (en) Data processing system
US4716527A (en) Bus converter
US4112490A (en) Data transfer control apparatus and method
US5642489A (en) Bridge between two buses of a computer system with a direct memory access controller with accessible registers to support power management
US5047926A (en) Development and debug tool for microcomputers
US4807112A (en) Microcomputer with a bus accessible from an external apparatus
US4344130A (en) Apparatus to execute DMA transfer between computing devices using a block move instruction
US4592010A (en) Memory-programmable controller
US4764866A (en) Data processing system with pre-decoding of op codes
US5212775A (en) Method and apparatus for observing internal memory-mapped registers
JPS6212540B2 (en)
KR100223096B1 (en) Method and apparatus for observing internal memory-mapped registers
JPH08272770A (en) Microcontroller development system
JPS6313213B2 (en)
KR100194263B1 (en) High speed data processing system
JPH05224999A (en) Runaway processor
JPS63155254A (en) Information processor
JPH01292451A (en) Information processor
JPH0721767B2 (en) Emulation method
JPH03135640A (en) Processor containing cache memory
JPS62239242A (en) Debugging device
JPS6325758A (en) Slave processor
JPH0282323A (en) Debugging system for digital signal processor
JPS63129427A (en) Conversion circuit for interruption response logic
JPS62293365A (en) Data transfer system