JPS62102340A - Coincidence detection circuit - Google Patents

Coincidence detection circuit

Info

Publication number
JPS62102340A
JPS62102340A JP60242212A JP24221285A JPS62102340A JP S62102340 A JPS62102340 A JP S62102340A JP 60242212 A JP60242212 A JP 60242212A JP 24221285 A JP24221285 A JP 24221285A JP S62102340 A JPS62102340 A JP S62102340A
Authority
JP
Japan
Prior art keywords
address
signal
match
comparator
signal line
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
Application number
JP60242212A
Other languages
Japanese (ja)
Inventor
Tei Ishikawa
石川 禎
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 JP60242212A priority Critical patent/JPS62102340A/en
Publication of JPS62102340A publication Critical patent/JPS62102340A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To debug a program efficiently even in a program loop by outputting a coincidence detection signal when a desired program address to be detected appears by as many times as specified. CONSTITUTION:An external specified value (n) (=m-1) is set in a counter 21 and a detection address on a signal line 12 is set in a register 11 so as to detect a program address which coincides with the desired detected address appearing by (m) times (m>0). A comparator 16 compares the held contents (detected address) of the register 11 with a program address led to an input B. When the number of times of appearance of coincidence reaches (n), the counted value of a subtracting counter 21 becomes 0. A NOR gate 26 makes a signal line 27 true and opens an AND gate and a matching signal MATCH2 coincides with the state of a matching signal MATCH1 outputted by the comparator 16. Namely, the signal MATCH2 becomes true for the first time after the comparator 16 detects the [n+1(=m)]th coincidence.

Description

【発明の詳細な説明】 [発明の技術分野] この発明は、指定アドレスのマイクロ命令が実行される
瞬間を検出するアドレス・マツチ検出回路等の一致検出
回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a match detection circuit such as an address match detection circuit that detects the moment when a microinstruction at a designated address is executed.

[発明の技術的背J51] データ処理機器等を扱う場合、マイクロプログラムや、
それと同期して動くハルドウエア等をデバッグするとき
に、指定したアドレスのマイクロ命令が実行される瞬間
を検出し、そこでマシーン(CPU)を停止させてレジ
スタ等の内容を調べたいことがある。この瞬間の検出に
は、アドレス・マツチ検出回路と呼ばれる一致検出回路
が用いられる。
[Technical Background of the Invention J51] When dealing with data processing equipment, microprograms,
When debugging hardware or the like that runs in synchronization with hardware, you may want to detect the moment when a microinstruction at a specified address is executed, stop the machine (CPU) at that moment, and examine the contents of registers, etc. A match detection circuit called an address match detection circuit is used to detect this instant.

さて従来のアドレス・マツチ検出回路は、一致を検出し
たいアドレス(検出アドレス)が設定されるレジスタ(
アドレス・マツチ・レジスタ)と、同レジスタの内容と
マイクロプログラム・アドレスバス上のアドレス(プロ
グラムアドレス)とを比較する比較器とで構成されるの
が一般的である。
Now, the conventional address match detection circuit uses a register (
It generally consists of an address match register) and a comparator that compares the contents of the register with the address on the microprogram address bus (program address).

この種アドレス・マツチ検出回路では比較器の一致検出
信号がアドレス・マツチ信号して用いられており、プロ
グラムアドレスが検出アドレスに一致したときにマシー
ン停止(或はロジックアナライザ等のトリガ〉が可能と
なる。
In this type of address match detection circuit, the match detection signal of the comparator is used as the address match signal, and it is possible to stop the machine (or trigger a logic analyzer, etc.) when the program address matches the detected address. Become.

[背景技術の問題点] しかし、従来のアドレス・マツチ検出回路では、例えば
検出アドレスがプログラムループ中に存在するような場
合には、ループを1回まわる毎にアドレス・マツチ信号
が出力されてしまう。このためループのn回目の実行時
にマツチをかけることができず、効率的なデバッグを行
なうことが困難であった。
[Problems with the Background Art] However, in conventional address match detection circuits, if the detected address exists in a program loop, for example, an address match signal is output every time the program goes around the loop. . For this reason, it was not possible to perform a match during the nth execution of the loop, making it difficult to perform efficient debugging.

[発明の目的] この発明は上記事情に鑑みてなされたものでその目的は
、特に所望の検出アドレスに一致するプログラムアドレ
スが指定回数だけ出現した場合に一致検出信号(マツチ
信号)が真となるようにでき、もってマイクロプログラ
ムやこれに同期して動くハードウェアのデバッグの効率
向上が図れる一致検出回路を提供することにある。
[Purpose of the Invention] This invention was made in view of the above circumstances, and its purpose is to make a match detection signal (match signal) true when a program address that matches a desired detection address appears a specified number of times. It is an object of the present invention to provide a coincidence detection circuit which can improve the efficiency of debugging microprograms and hardware running in synchronization with the microprograms.

[発明の概要] この発明によれば、一致をとるアドレスなどのデータを
記憶するレジスタと、このレジスタの内容とマイクロプ
ログラム・アドレスバスなどの一致検出回路データライ
ン上のデータとを比較して一致を検出する比較器とを備
えた一致検出回路が提供される。上記−数構出回路には
、比較器の一致検出に応じてカウント動作を行なうカウ
ンタと、ゲート回路とが更に設けられる。このゲート回
路は、カウンタにより外部指定回数分のカウント動作が
行なわれた場合に、比較器の一致検出結果に応じてデー
タ一致信号(マツチ信号)を出力する。
[Summary of the Invention] According to the present invention, there is a register that stores data such as an address for matching, and the contents of this register are compared with data on a match detection circuit data line such as a microprogram address bus to find a match. A match detection circuit is provided, comprising: a comparator for detecting. The minus number calculation circuit is further provided with a counter that performs a counting operation in response to coincidence detection by the comparator, and a gate circuit. This gate circuit outputs a data coincidence signal (match signal) in accordance with the match detection result of the comparator when the counter has performed a count operation an externally specified number of times.

[発明の実施例] 第1図はこの発明の一実施例に係るアドレス・マツチ検
出回路の構成を示すもので、11は信号線12より供給
される検出アドレス(一致を検出したいアドレス)を保
持するレジスタ(アドレス・マツチ・レジスタ:AMR
>である。レジスタ11のクロック端子には、2人カア
ンドゲート13の出力が接続されている。アンドゲート
13の一方の入力は検出対象回路のクロック信号を導く
信号線14に、他方の入力はアンドゲート13を制御す
る信号線15に、それぞれ接続されている。一方、レジ
スタ11の出力は比較器16のへ入力に接続されている
。比較器16のB入力は検出対象回路のマイクロプログ
ラム・アドレスバス上のアドレスを導く信号線17に接
続されている。比較器16の一致結果出力端はマツチ信
号MATCHIを導出する信号線18に接続されている
[Embodiment of the Invention] FIG. 1 shows the configuration of an address match detection circuit according to an embodiment of the present invention, in which 11 holds a detection address (address for which a match is to be detected) supplied from a signal line 12. register (address match register: AMR
> is. The output of the two-man AND gate 13 is connected to the clock terminal of the register 11. One input of the AND gate 13 is connected to a signal line 14 that guides a clock signal of the circuit to be detected, and the other input is connected to a signal line 15 that controls the AND gate 13. On the other hand, the output of register 11 is connected to the input of comparator 16. The B input of the comparator 16 is connected to a signal line 17 leading to the address on the microprogram address bus of the circuit to be detected. A match result output terminal of the comparator 16 is connected to a signal line 18 from which a match signal MATCHI is derived.

以上の構成(第1図の破線で囲まれている部分)は従来
のアドレス・マツチ検出回路部分であり、この実施例で
は以下に述べる回路部分が新たに付加されている。
The above configuration (the part surrounded by the broken line in FIG. 1) is a conventional address match detection circuit part, and in this embodiment, the following circuit part is newly added.

21は信号線22により供給される外部指定値が初期設
定されるカウンタ、゛例えば減算カウンタである。減算
カウンタ21のクロック端子は信号線14に、ロードイ
ネーブル端子LEは信号線23に、カウントイネーブル
端子CTEは信号線24に、そして出力(カウンタ出力
)は信号線25に、それぞれ接続されている。
Reference numeral 21 denotes a counter, for example, a subtraction counter, to which an externally designated value supplied via a signal line 22 is initially set. The clock terminal of the subtraction counter 21 is connected to the signal line 14, the load enable terminal LE is connected to the signal line 23, the count enable terminal CTE is connected to the signal line 24, and the output (counter output) is connected to the signal line 25.

信号線25には同信号線25上のデータ(減算カウンタ
21のカウント値)がゼロであることを検出するノアゲ
ート26の入力が接続され、ノアゲート26の出力は信
号線27に接続されている。信号線27にはインバータ
28の入力および2人カアンドゲート29の一方の入力
が接続されている。アンドゲート29の他方の入力は信
号線18に接続され、アンドゲート29の出力はアドレ
ス一致を示すマツチ信号MATCH2を導出する信号線
30に接続されている。またインバータ28の出力は2
人カアンドゲート31の一方の入力に接続され、アンド
ゲート31の他方の入力は信号線18に接続されている
。アンドゲート31の出力は信号線24に接続されてい
る。
The input of a NOR gate 26 that detects that the data on the signal line 25 (the count value of the subtraction counter 21) is zero is connected to the signal line 25, and the output of the NOR gate 26 is connected to the signal line 27. An input of an inverter 28 and one input of a two-person gate 29 are connected to the signal line 27 . The other input of the AND gate 29 is connected to the signal line 18, and the output of the AND gate 29 is connected to the signal line 30 from which a match signal MATCH2 indicating address matching is derived. Also, the output of the inverter 28 is 2
The driver is connected to one input of the AND gate 31, and the other input of the AND gate 31 is connected to the signal line 18. The output of the AND gate 31 is connected to the signal line 24.

次に第1図の構成の動作を説明する。Next, the operation of the configuration shown in FIG. 1 will be explained.

所望の検出アドレスに一致するプログラムアドレスがm
回(mはm>Oを満足する整数)だけ出現したことを検
出したい場合、n <=m−1)を示す外部指定値を信
号線22経出で減算カウンタ21に供給し、信号線23
を真にする。これにより滅痒カウンタ21に指定値nが
セットされる。同様に、検出アドレスを信号線12経由
でレジスタ11に供給し、信号線15を真にする。信号
線15が真になるとアンドゲート13が開き、信号g1
14上のクロック信号がアンドゲート13経由でレジス
タ11のクロック端子に供給される。これにより信号線
12上の検出アドレスがレジスタ11にセットされる。
The program address matching the desired detection address is m
If it is desired to detect that the number of times (m is an integer satisfying m>O) has appeared, an external specified value indicating n <= m-1) is supplied to the subtraction counter 21 via the signal line 22, and
Make true. As a result, the designated value n is set in the anti-itch counter 21. Similarly, the detected address is supplied to the register 11 via the signal line 12, and the signal line 15 is made true. When the signal line 15 becomes true, the AND gate 13 opens and the signal g1
The clock signal on 14 is supplied to the clock terminal of register 11 via AND gate 13. As a result, the detected address on the signal line 12 is set in the register 11.

比較器16は、その六入力に供給されるレジスタ11の
保持内容(検出アドレス)とB入力に(信号線14上の
クロック信号に同期して)信号線17経出で導かれるプ
ログラムアドレスとを比較し、一致を検出する毎にプロ
グラムアドレスが検出アドレスに一致することを示す高
レベルのマツチ信号MATCH1を信号線18に出力す
る。
The comparator 16 inputs the contents held in the register 11 (detected address) supplied to its six inputs and the program address led via the signal line 17 to its B input (in synchronization with the clock signal on the signal line 14). Each time a match is detected, a high-level match signal MATCH1 indicating that the program address matches the detected address is output to the signal line 18.

さて、減算カウンタ21のカウント値は、信号線25経
出でノアゲート26に供給される。ノアゲート26は、
減算カウンタ21のカウント値がO(オールゼロ)の場
合にのみ信号線27を真(高レベル)にする。したがっ
て信号線27は、減算カウンタ21のカウント値がOに
なるまでの間は偽となる。
Now, the count value of the subtraction counter 21 is supplied to the NOR gate 26 via the signal line 25. Noah Gate 26 is
The signal line 27 is made true (high level) only when the count value of the subtraction counter 21 is O (all zeros). Therefore, the signal line 27 becomes false until the count value of the subtraction counter 21 reaches O.

信号線27が偽の場合、アンドゲート29が閉じ、比較
器16から出力されるマツチ信号MATCH1の状態、
即ち比較器1Gの一致検出結果に無関係に信号30上の
マツチ信号MATCH2は偽となる。
When the signal line 27 is false, the AND gate 29 closes and the state of the match signal MATCH1 output from the comparator 16;
That is, the match signal MATCH2 on the signal 30 becomes false regardless of the match detection result of the comparator 1G.

この実施例では、比較器16の一致検出・信号であるマ
ツチ信号MATCHIに代えて、アンドゲート29の出
力信号であるマツチ信号MATCH2が真のアドレス・
マツチ信号、即ちCPUを停止させてそのステータスを
読出すための信号、或はロジックアナライザ等の1〜リ
ガ信号として用いられる。
In this embodiment, instead of the match signal MATCHI, which is the match detection signal of the comparator 16, the match signal MATCH2, which is the output signal of the AND gate 29, is used as the true address signal.
It is used as a match signal, that is, a signal for stopping the CPU and reading out its status, or as a 1 to trigger signal for a logic analyzer, etc.

したがって、信号線27が偽の場合には、即ち減算カウ
ンタ21のカウント値がOでない場合には、比較器16
でアドレス一致が検出されても、アドレス・マツチとは
見なされない。
Therefore, when the signal line 27 is false, that is, when the count value of the subtraction counter 21 is not O, the comparator 16
Even if an address match is detected in , it is not considered an address match.

信号線27が偽の場合、インバータ28の出力は真とな
る。インバータ28の出力が真となると、アンドゲート
31が開き、比較器16から出力されるマツチ信号MA
TCH1がアンドゲート31および信号線24を経由し
て減算カウンタ21のカウントイネーブル端子CTEに
供給される。減算カウンタ21は、信号線24が真の場
合、即ち減算カウンタ21のカウント値がOでない期間
中に比較器16が一致を検出した場合、信号線14経出
で供給されるクロック信号に応じて減算動作(−1)を
行なう。
If signal line 27 is false, the output of inverter 28 will be true. When the output of the inverter 28 becomes true, the AND gate 31 opens and the match signal MA output from the comparator 16
TCH1 is supplied to the count enable terminal CTE of the subtraction counter 21 via the AND gate 31 and the signal line 24. When the signal line 24 is true, that is, when the comparator 16 detects a match while the count value of the subtraction counter 21 is not O, the subtraction counter 21 operates according to the clock signal supplied through the signal line 14. Perform a subtraction operation (-1).

やがて、レジスタ11にセットされている検出アドレス
に一致するプログラムアドレスの出現回数がn (−m
−1)回となり、したがって比較器16のアドレス−数
構出回数がn回となると、即ち減算カウンタ21がn回
の減算動作を行なうと、減算カウンタ21のカウント値
は0となる。減算カウンタ21のカウント値が0になる
と、ノアゲート26は信号線27を真にする。信号線2
7が真になるとアンドゲート29が開き、マツチ信号M
ATCH2は、比較器16から出力されるマツチ信号M
ATCH1の状態に一致するようになる。したがってマ
ツチ信号MATCH2は、比較器1Gがn+1 (=m
)回目の一致検出を行なってマツチ信号 M A T CH1を真にした場合に、初めて真になる
Eventually, the number of occurrences of the program address that matches the detection address set in the register 11 becomes n (-m
-1) times, and therefore, when the number of address-number outputs of the comparator 16 reaches n times, that is, when the subtraction counter 21 performs n subtraction operations, the count value of the subtraction counter 21 becomes 0. When the count value of the subtraction counter 21 becomes 0, the NOR gate 26 makes the signal line 27 true. Signal line 2
7 becomes true, the AND gate 29 opens and the match signal M
ATCH2 is the match signal M output from the comparator 16.
It comes to match the state of ATCH1. Therefore, for the match signal MATCH2, the comparator 1G has n+1 (=m
) It becomes true for the first time when the match signal M AT CH1 is made true after the second match detection is performed.

即ちマツチ信号MATCH2により、任意のm回目のア
ドレス一致を示すことができる。なお、信号線27が真
になると、アンドゲート31が閉じて信号線24が偽に
なる。これにより、減算カウンタ21の減算動作は禁止
される。
That is, the match signal MATCH2 can indicate an arbitrary m-th address match. Note that when the signal line 27 becomes true, the AND gate 31 closes and the signal line 24 becomes false. As a result, the subtraction operation of the subtraction counter 21 is prohibited.

明らかなように、減算カウンタ21にOをセットすると
、アンドゲート29が初めから開状態となり、且つ減算
カウンタ21の減算動作が初めから禁止されるので、マ
ツチ信号MATCH2は、マツチ信号MATCH1が真
となる毎に真となる。
As is clear, when the subtraction counter 21 is set to O, the AND gate 29 becomes open from the beginning and the subtraction operation of the subtraction counter 21 is prohibited from the beginning. It becomes true each time.

なお、前記実施例は、マイクロプログラムのアドレスの
一致(マツチ)を検出するアドレス・マツチ検出回路に
適用した場合について説明したが、これに限るものでは
ない。即ちこの発明は、例えばマクロ命令のアドレスの
一致を検出するアドレス・マツチ検出回路は勿論、通常
のデータ、例えばデータライン上のデータの成る特定値
の出現回数をカウントし、指定回数だけ出現した瞬間を
検出するデータ一致検出回路にも適用できる。
Although the embodiment described above has been described in the case where the present invention is applied to an address match detection circuit that detects a match between addresses of microprograms, the present invention is not limited to this. That is, the present invention not only uses an address match detection circuit that detects a match between addresses of macro instructions, but also counts the number of occurrences of a specific value consisting of normal data, for example, data on a data line, and detects the moment when a specific value has appeared a specified number of times. It can also be applied to a data match detection circuit that detects.

[発明の効果] 以上詳述したようにこの発明によれば、特に所望の検出
アドレスに一致するプログラムアドレスが指定回数だけ
出現した場合に一致検出信号(マツチ信号)が真となる
ようにできるので、検出したいアドレスがプログラムル
ープ中に存在する場合において、マイクロプログラムや
これに同期して動くハードウェアのデバッグの効率向上
が図れる。
[Effects of the Invention] As detailed above, according to the present invention, the match detection signal (match signal) can be set to true especially when a program address that matches a desired detection address appears a specified number of times. When the address to be detected exists in a program loop, it is possible to improve the efficiency of debugging a microprogram and hardware running in synchronization with the microprogram.

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

第1図はこの発明の一実施例を示すブロック構成図であ
る。 11・・・レジスタ(A〜IF’、 ) 、13.29
.31・・・アンドゲート、16・・・比較器、21・
・・減障カウンタ、26・・・ノアゲート。 出願人代理人 弁理士 鈴 江 武 彦第1 図
FIG. 1 is a block diagram showing an embodiment of the present invention. 11...Register (A~IF', ), 13.29
.. 31...AND gate, 16...Comparator, 21.
...Reduction counter, 26...Noah Gate. Applicant's representative Patent attorney Takehiko Suzue Figure 1

Claims (1)

【特許請求の範囲】[Claims] 一致をとるデータを記憶するレジスタと、このレジスタ
の内容と一致検出対象データライン上のデータとを比較
して一致を検出する比較器と、この比較器の一致検出に
応じてカウント動作を行なうカウンタと、このカウンタ
により外部指定回数分のカウント動作が行なわれた場合
に上記比較器の一致検出結果に応じてデータ一致信号を
出力するゲート回路とを具備することを特徴とする一致
検出回路。
A register that stores matching data, a comparator that detects a match by comparing the contents of this register with the data on the data line to be matched, and a counter that performs a counting operation in response to the match detected by this comparator. and a gate circuit that outputs a data coincidence signal in accordance with the coincidence detection result of the comparator when the counter has performed a count operation an externally designated number of times.
JP60242212A 1985-10-29 1985-10-29 Coincidence detection circuit Pending JPS62102340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60242212A JPS62102340A (en) 1985-10-29 1985-10-29 Coincidence detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60242212A JPS62102340A (en) 1985-10-29 1985-10-29 Coincidence detection circuit

Publications (1)

Publication Number Publication Date
JPS62102340A true JPS62102340A (en) 1987-05-12

Family

ID=17085913

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60242212A Pending JPS62102340A (en) 1985-10-29 1985-10-29 Coincidence detection circuit

Country Status (1)

Country Link
JP (1) JPS62102340A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05113903A (en) * 1991-10-24 1993-05-07 Nec Ibaraki Ltd Address coincidence detecting circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05113903A (en) * 1991-10-24 1993-05-07 Nec Ibaraki Ltd Address coincidence detecting circuit

Similar Documents

Publication Publication Date Title
EP0702297B1 (en) A data processor with breakpoint circuit
EP0136174A2 (en) Enhanced alu test hardware
JPH10333939A (en) Microprocessor
JPS63155336A (en) Data processor
JPS62102340A (en) Coincidence detection circuit
US5313606A (en) System for detecting boundary cross-over of instruction memory space using reduced number of address bits
US7467178B2 (en) Dual mode arithmetic saturation processing
JPS60128541A (en) Microprocessor
KR0145893B1 (en) The apparatus of preventing overflow
SU1387000A1 (en) Device for generating instruction flag
JP2558152B2 (en) Counter error detector
JPH06202907A (en) Debug support device
JPH0258135A (en) Information processor
JPH06230150A (en) Timer
JPH0343842A (en) Tracer memory
JPH04106637A (en) Stall detection circuit
JPS5880743A (en) Fetch forecaster for microprocessor
JPH04286036A (en) Watch dog timer device
JPS63241622A (en) Data processor
JPH0436420B2 (en)
JPS6385831A (en) Control circuit for microprocessor
JPH03119437A (en) Information processor
JPH01177647A (en) Information processor
JPH03157739A (en) Performance measuring system for epu
JPS62232043A (en) Error detecting circuit