JPS5944658B2 - Program check circuit - Google Patents
Program check circuitInfo
- Publication number
- JPS5944658B2 JPS5944658B2 JP53012266A JP1226678A JPS5944658B2 JP S5944658 B2 JPS5944658 B2 JP S5944658B2 JP 53012266 A JP53012266 A JP 53012266A JP 1226678 A JP1226678 A JP 1226678A JP S5944658 B2 JPS5944658 B2 JP S5944658B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- circuit
- output
- signal
- address
- 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
Links
- 238000000034 method Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 6
- 239000003990 capacitor Substances 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Description
【発明の詳細な説明】
本発明は、1チップIC素子を1パッケージとして構成
された極小コンピュータなどにおけるプログラムの点検
回路に関するものである。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a program check circuit for a very small computer or the like configured with one chip IC element as one package.
従来、本発明が係る1チップIC素子を1パッケージと
して構成された簡単な極小コンピュータにかかわらず、
予め組立てられたプログラムをそのコンピュータに入力
じて処理する場合、プログラム作成時に誤まつて、構成
しようとする所定の入力データとは異なつたプログラム
を作成してしまうことがある。Conventionally, regardless of the simple microcomputer configured with one chip IC device according to the present invention as one package,
When a pre-assembled program is input into a computer and processed, it is possible to make a mistake when creating the program and end up creating a program that is different from the predetermined input data to be constructed.
これを検査し、修正するためにコンピュータ(以下CP
Uと略す)を連結運転して構成プログラムを点検するこ
とが行なわれる。ところが、これまでのプログラム検査
方法によると、例えば、日立製作所製のHITAC−1
0のアセンブラ言語では第1図に示すようにプログラム
カウンタ「0000」で機械語命令の暗記用コードであ
るロードLにより「A」番地の内容をアキュムレータ(
演算レジスター)に書き込め、次にプログラムカウンタ
「0000で暗記用コードであるアツトAにより「B」
番地の内容をアキュムレータに加算せよさらにプログラ
ムカウンタ「0002」で指令信号ストアSTにより前
記アキュムレータの内容をC番地に書込めというような
プログラム処理中において、プログラムカウンタ「00
03」でプログラム実行を停止させ、メモリアドレスの
内容をチェックしたい場合(プログラムデイパツク制御
操作)、前記プログラムカウンタ「0003」に停止指
令信号Lにより停止命令(HALT)を書き込んでいる
。(この操作によりL命令は破壊される。)そのため、
この種のプログラム処理をするCPUは停止命令を実行
した結果停止するので、停止したときのそのCpUに内
蔵されたプログラムカウンタは、そのカウンタ機能上次
の番地表示である「0004」を表示してしまう。した
がつて、前述の方法によりメモリの内容チェックし、さ
らに処理を続行する場合には、プログラムカウンタを1
つ前の「0003」にセットしなおさなければならず、
また、停止命令を書き込んだプログラムカウンタ「00
03」の内容ももとのL命令に戻しておかなければなら
ず、停止命令後の操作が非常に面倒であつた。本発明の
目的は、前述プログラムデイバツク操作における作業能
率の向上を図ることにある。本発明の特徴は、予め組立
てられたプログラムをコンピユータで処理し、所定の箇
所でプログラム処理を中断して該プログラムを点検する
ようにしたプログラム点検回路において、中断したいプ
ログラム番地を任意に指定できるプログラム中断番地指
定レジスタ回路と、該プログラム中断番地指定レジスタ
回路の出力データとコンピユータ処理され出力されたプ
ログラムカウンタの出力データを比較し、一致した場合
のみ一致信号を出力するコンパレータ回路と、該コンパ
レータ回路の一致信号を入力とし、所定時間経過後に前
記プログラム中断番地指定レジスタ回路の指定番地を解
除するりセツト制御回路とから成り、プログラム中に異
常があればそれを止め、プログラム処理操作を停止させ
ると共に、その旨を表示できるようにした点である。以
下、その具体的な実施の一例を第2図および第3図に示
し説明する。In order to inspect and correct this, a computer (hereinafter referred to as CP)
(abbreviated as U) is operated in conjunction to check the configuration program. However, according to the conventional program inspection methods, for example, HITAC-1 manufactured by Hitachi, Ltd.
In the 0 assembler language, as shown in Figure 1, when the program counter is 0000, the contents of address ``A'' are transferred to the accumulator (
Then write the program counter ``0000'' and write ``B'' by the memorized code ``A''.
Add the contents of the address to the accumulator.Furthermore, during program processing such as writing the contents of the accumulator to address C using the command signal store ST at the program counter ``0002'', the program counter ``0002''
When it is desired to stop the program execution at "0003" and check the contents of the memory address (program backpack control operation), a stop command (HALT) is written to the program counter "0003" by the stop command signal L. (This operation destroys the L instruction.) Therefore,
A CPU that processes this type of program will stop as a result of executing a stop command, so when the CPU stops, the program counter built into the CPU will display "0004", which is the next address on the counter function. Put it away. Therefore, if you want to check the contents of the memory using the method described above and continue processing, set the program counter to 1.
I have to reset it to the previous "0003",
Also, the program counter “00” where the stop command was written is
The contents of "03" had to be returned to the original L command, making the operation after the stop command extremely troublesome. SUMMARY OF THE INVENTION An object of the present invention is to improve work efficiency in the aforementioned program debacking operation. A feature of the present invention is that in a program inspection circuit that processes a pre-assembled program on a computer and inspects the program by interrupting the program processing at a predetermined point, the program can arbitrarily specify the program address at which the program is to be interrupted. A comparator circuit that compares the output data of the program interrupt address designation register circuit with the output data of the program counter processed by the computer and output, and outputs a match signal only when they match; It is comprised of a control circuit which accepts a coincidence signal as input and releases or sets the designated address of the program interruption address designation register circuit after a predetermined period of time has elapsed, and if there is an abnormality in the program, it is stopped and the program processing operation is stopped. The point is that it can be displayed to that effect. A specific example of its implementation will be described below with reference to FIGS. 2 and 3.
第2図は本発明によるCPUの要部回路をプロツク図で
示したものであり、図中、1はCPUのカウンタ出力信
号が入力される16ビツトのプログラムカウンタ素子、
2はプログラムカウンタ素子1からの出力データ4と後
記説明のデータ設定スイツチ3からの出力データ5を比
較し、予めデータ設定スイツチ3により設定された入力
データ(例えば「1010」)に、前記プログラムカウ
ンタ素子1の出力データ5が(「1010」)と一致し
た場合に出力データ7として一信号「H」を出力するコ
ンパレータ、6はその各々コンパレータ2の出力デ゛一
タ7を入力とする多入力のAND素子で、全てのコンパ
レータ出力が「H」信号となつた場合にのみ[H」信号
を出力するものである。8はAND素子6の出力信号9
を一方の人力とし、CPUが駆動開始している場合常時
クロツク信号を発生しているクロックジェネレータ10
からの出力パルスの他方の入力とするAND素子で、し
かも出力信号9はインバータ11により反転入力してあ
る。FIG. 2 is a block diagram showing the main circuit of the CPU according to the present invention. In the figure, 1 is a 16-bit program counter element to which the CPU counter output signal is input;
2 compares the output data 4 from the program counter element 1 and the output data 5 from the data setting switch 3, which will be explained later, and sets the program counter to the input data (for example, "1010") set in advance by the data setting switch 3. A comparator that outputs one signal "H" as output data 7 when the output data 5 of the element 1 matches ("1010"), and 6 is a multi-input device whose input is the output data 7 of the comparator 2. This is an AND element that outputs an [H] signal only when all the comparator outputs become an "H" signal. 8 is the output signal 9 of the AND element 6
A clock generator 10 which uses human power on one side and constantly generates a clock signal when the CPU is starting to drive.
The output signal 9 is inverted by an inverter 11 and input to the AND element.
第2図に示す回路は、プログラムカウンタ素子1の4ビ
ツト分(×1)の出力データのみが予め設定されたデー
タ設定スイツチ3からの出力データと一致し、それに対
応するコンパレータ2のみが「H」信号となつており、
CPU停止までは至つていない場合の図である。In the circuit shown in FIG. 2, only the 4-bit (x1) output data of the program counter element 1 matches the preset output data from the data setting switch 3, and only the corresponding comparator 2 is "H". ” has become a signal,
This is a diagram showing a case where the CPU has not yet stopped.
また、第3図は第2図に示すプログラムカウンタ素子1
の下桁4ビツト分を抜き取り、それに対応する分のコン
パレータ2、データ設定スイツチ3を示し、これらの具
体的な動作機能を説明するための図である。In addition, FIG. 3 shows the program counter element 1 shown in FIG.
This is a diagram for explaining the specific operating functions of the comparator 2 and data setting switch 3 by extracting the lower 4 bits of the data and showing the corresponding comparator 2 and data setting switch 3.
第3図中、第2図と同一符号を付してあるものは同一の
ものを示す。第3図に示すように、プログラムカウンタ
素子1、データ設定スイツチ3は前記クロックジェネレ
ータ10からのクロツク信号により常時動作状態にあり
、かつデータ設定スイツチ3はC素子3aの各々の入力
端子1D〜4Dに電源+5V(「H」信号)を印加でき
るようにしたスイツチ3−1〜3−4が設けられ、通常
は抵抗1R〜4Rを介して「L]信号としてある。In FIG. 3, the same reference numerals as in FIG. 2 indicate the same components. As shown in FIG. 3, the program counter element 1 and the data setting switch 3 are constantly operated by the clock signal from the clock generator 10, and the data setting switch 3 is connected to each input terminal 1D to 4D of the C element 3a. Switches 3-1 to 3-4 are provided which can apply a power supply of +5V ("H" signal) to the switches 3-1 to 3-4, which are normally used as "L" signals via resistors 1R to 4R.
また、10はコンパレータ2の出力信号によりデータ設
定スイツチ3をりセツト制御するためのモノ・マルチバ
イブレータで、それに接続されたコンデンサCと低抗R
で決まる時間、いわゆるCPUの停止必要時間だけ遅ら
せてデータ設定スイツチ3の設定データをりセツトする
ものである。13はコンパレータ2とモノ・マルチバイ
ブレータ12とを接続する出力信号線77の間に挿入し
たCPUプログラム停止制御用のスイツチで、このスイ
ツチ13を開状態にしておくことによりCPUプログラ
ム実行は停止される。10 is a mono-multivibrator for resetting and controlling the data setting switch 3 by the output signal of the comparator 2, and a capacitor C and a low resistance R are connected to it.
The setting data of the data setting switch 3 is reset after a delay of the time determined by , the so-called necessary time for stopping the CPU. 13 is a switch for controlling the CPU program stop inserted between the output signal line 77 connecting the comparator 2 and the mono/multivibrator 12. By leaving this switch 13 open, the CPU program execution is stopped. .
第3図に示す回路に従つて具体的な動作説明すると、前
述第1図の如くプログラムを0003番地で停止させた
場合、データ設定スイツチ3のスイツチ3−1と3−2
を閉路とし、データ[0011」がC素子3aに入力さ
れると、図示していないタロツクジエネレータからのク
ロツク信号によりIC素子3aの出力端子1Q,2Qに
は「H」信号が出力され、コンパレータ2の入力端子B
O,Blを「H」とする。To explain the specific operation according to the circuit shown in FIG. 3, when the program is stopped at address 0003 as shown in FIG. 1, the data setting switch 3 switches 3-1 and 3-2
When the circuit is made a closed circuit and data [0011] is input to the C element 3a, an "H" signal is output to the output terminals 1Q and 2Q of the IC element 3a by a clock signal from a tally clock generator (not shown). Input terminal B of comparator 2
Let O and Bl be "H".
このように予めコンパレータ2にデータ「0011」を
入力しておいた状態で、プログラムを実行させると、「
0000」で実行のときはプログラムカウンタ素子1の
出力端子1Q〜4Qは全て「L」信号が出力され、「0
001]の時はプログラムカウンタ素子1の出力端子1
Qのみ「H]信号が出力される。そして「0003]で
実行の時には、プログラムカウンタ素子1の出力素子1
Qと2Qが「H」信号となり、それによつてコンパレー
タ2の入力端子AOとA1を「H]とする。すなわち、
コンパレータ2の入力端子AO,Al,BO,Blを「
」信号とし、そのコンパレータ2の出力端子A−Bには
「H」信号が出力され、出力データ7としてAND素子
6に入力される。図には省略してあるがAND素子6の
他の入力も「H」信号となつたところで、そのAND素
子6は「H」信号を出力し、インバータ11によつて反
転され、それまで「H」信号出力であつたAND素子8
を「L」信号出力とし、CPUの停止タロツクとなつて
CPUの動作を「0003」で停止させる。また、AN
D素子6の「H」信号出力は、通常は閉路されているス
イツチ13を介してモノ・マルチバイブレータ12に入
力され、コンデンサCと抵抗Rで決まる時間、すなわち
、CPUのプログラム実行を停止し、印字されたデータ
をチエツクするに必要な時間だけ遅らせた後、データ設
定スイツチ3のデータ(1Qと2Qは「H」)をりセツ
トする。If you run the program with the data "0011" input to comparator 2 in advance, you will see "
0000", output terminals 1Q to 4Q of program counter element 1 all output "L" signals, and "0000" is executed.
001], output terminal 1 of program counter element 1
Only Q outputs an “H” signal.When executing at “0003”, output element 1 of program counter element 1
Q and 2Q become "H" signals, thereby setting the input terminals AO and A1 of comparator 2 to "H". That is,
Input terminals AO, Al, BO, Bl of comparator 2 are
” signal, and an “H” signal is output to the output terminals A-B of the comparator 2, and is input to the AND element 6 as output data 7. Although not shown in the figure, when the other inputs of the AND element 6 also become the "H" signal, the AND element 6 outputs the "H" signal, which is inverted by the inverter 11 until the "H" signal. ” AND element 8 which was a signal output
is set as an "L" signal output, and serves as a CPU stop clock to stop the CPU operation at "0003". Also, AN
The "H" signal output from the D element 6 is input to the mono multivibrator 12 via the normally closed switch 13, and stops the CPU's program execution for a time determined by the capacitor C and the resistor R. After delaying the time necessary to check the printed data, the data of the data setting switch 3 (1Q and 2Q are "H") is reset.
その場合、スイツチ13を開状態にしておくことにより
、CPUのプログラム実行は停止状態を接続し、任意に
出力データのチエツク時間をとることができる。上述の
実施例からも明らかなように本発明においては、CPU
に、プログラム実行を中断したい番地を任意に指定でき
るレジスタ回路を設け、CPUのプログラムカウンタ出
力がこのレジスタ回路出力と一致した場合にCPUプロ
グラム実行を停止させるようにしたものである。In this case, by keeping the switch 13 in the open state, the program execution of the CPU is stopped and it is possible to take an arbitrary amount of time to check the output data. As is clear from the above embodiments, in the present invention, the CPU
A register circuit is provided at which the address at which the program execution is desired to be interrupted can be arbitrarily specified, and the CPU program execution is stopped when the output of the CPU program counter matches the output of the register circuit.
したがつて、メモリー内のプログラムに直接停止命令語
を書き込む必要がなくなり、メモリーの有効使用が図れ
、また、プログラムカウンタを中断番地を表示した状態
で停止させることができる等と、停止命令後の操作が極
めて簡単なものとなり、プログラム点検作業の能率向上
が図れるもので夢る。Therefore, it is no longer necessary to write a stop command directly into the program in memory, and the memory can be used effectively.Furthermore, the program counter can be stopped with the interrupt address displayed, etc. It would be extremely easy to operate, and it would be a dream come true to improve the efficiency of program inspection work.
第1図は従来のプログラム点検方法を説明するための図
、第2図は本発明の一実施例を示すプログラム点検制御
回路の要部回路図、第3図は第2図の一部を取り出し、
より具体的に示した回路図である。
1・・・・・・プログラムカウンタ素子、2・・・・・
・コンパレータ、3・・・・・・データ設定スイツチ、
6,8・・・・・・AND回路、10・・・・・・クロ
ックジェネレータ、11・・・・・・インバータ、12
・・・・・・モノ・マルチバイブレータ、13・・・・
・・スイツチ、C・・・・・・コンデンサ、R,Rl〜
R4・・・・・・抵抗、3−1〜3−4・・・・・・ス
イツチ。Fig. 1 is a diagram for explaining a conventional program inspection method, Fig. 2 is a circuit diagram of a main part of a program inspection control circuit showing an embodiment of the present invention, and Fig. 3 is a part of Fig. 2. ,
FIG. 2 is a more concrete circuit diagram. 1...Program counter element, 2...
・Comparator, 3...Data setting switch,
6, 8...AND circuit, 10...Clock generator, 11...Inverter, 12
...Mono/multi vibrator, 13...
...Switch, C...Capacitor, R, Rl~
R4...Resistance, 3-1 to 3-4...Switch.
Claims (1)
し、所定の箇所でプログラム処理を中断して該プログラ
ムを点検するようにしたプログラム点検回路において、
中断したいプログラム番地を任意に指定できるプログラ
ム中断番地指定レジスタ回路と、該プログラム中断番地
指定レジスタ回路の出力データとコンピュータ処理され
出力されたプログラムカウンタの出力データを比較し、
一致した場合のみ一致信号を出力するコンパレータ回路
と、該コンパレータ回路の一致信号を入力とし、所定時
間経過後に前記プログラム中断番地指定レジスタ回路の
指定番地を解除するリセット制御回路を備えて成ること
を特徴とするプログラム点検回路。1. In a program check circuit that processes a pre-assembled program on a computer and checks the program by interrupting the program processing at a predetermined point,
A program interrupt address designating register circuit that can arbitrarily specify a program address to be interrupted, and comparing the output data of the program interrupt address designating register circuit with the output data of a program counter processed and output by a computer,
It is characterized by comprising a comparator circuit that outputs a match signal only when there is a match, and a reset control circuit that receives the match signal of the comparator circuit as input and releases the designated address of the program interruption address designation register circuit after a predetermined period of time has elapsed. program check circuit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP53012266A JPS5944658B2 (en) | 1978-02-08 | 1978-02-08 | Program check circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP53012266A JPS5944658B2 (en) | 1978-02-08 | 1978-02-08 | Program check circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS54105938A JPS54105938A (en) | 1979-08-20 |
| JPS5944658B2 true JPS5944658B2 (en) | 1984-10-31 |
Family
ID=11800556
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP53012266A Expired JPS5944658B2 (en) | 1978-02-08 | 1978-02-08 | Program check circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5944658B2 (en) |
-
1978
- 1978-02-08 JP JP53012266A patent/JPS5944658B2/en not_active Expired
Also Published As
| Publication number | Publication date |
|---|---|
| JPS54105938A (en) | 1979-08-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS5933553U (en) | processor | |
| US4667285A (en) | Microcomputer unit | |
| JPS5944658B2 (en) | Program check circuit | |
| JPH082727Y2 (en) | Programmable sequencer | |
| JPS5854418A (en) | Interrupt processing method | |
| JPS61267858A (en) | Microcomputer | |
| JP2575025B2 (en) | In-circuit emulator | |
| JPS6167148A (en) | Microcomputer | |
| JPH04280334A (en) | One chip microcomputer | |
| JPH0229455Y2 (en) | ||
| JPH01136251A (en) | Self-diagnosing system | |
| JPH02157957A (en) | microprocessor | |
| JPH0426913Y2 (en) | ||
| JPS605982B2 (en) | Program counter setting method for 1-chip microprocessor | |
| JPS6128144A (en) | Executing device of tracing | |
| JP2768677B2 (en) | Test control circuit for single-chip microcomputer | |
| JP2696811B2 (en) | Electronic preset counter | |
| JPH0462093B2 (en) | ||
| Rajaraman | A Microprocessor-Based Time Sequence Controller for Process Control Applications | |
| JPS5856126A (en) | Data transfer device | |
| JPS59157753A (en) | Subprocessor control system | |
| JPS61286936A (en) | Step operation control system | |
| JPH07113900B2 (en) | Emulation chip | |
| JPS63120340A (en) | Data processor | |
| JPS61269705A (en) | Programmable controller |