JPH0362233A - Address match timing tracing mechanism - Google Patents

Address match timing tracing mechanism

Info

Publication number
JPH0362233A
JPH0362233A JP1198332A JP19833289A JPH0362233A JP H0362233 A JPH0362233 A JP H0362233A JP 1198332 A JP1198332 A JP 1198332A JP 19833289 A JP19833289 A JP 19833289A JP H0362233 A JPH0362233 A JP H0362233A
Authority
JP
Japan
Prior art keywords
address
memory
address match
match
trace
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
JP1198332A
Other languages
Japanese (ja)
Inventor
Ikuo Uchibori
内堀 郁夫
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 JP1198332A priority Critical patent/JPH0362233A/en
Publication of JPH0362233A publication Critical patent/JPH0362233A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve the debugging efficiency by writing the various information into a trace memory at memory access and updating the address of the trace memory every time the address match is detected by an address match detecting mechanism at memory access. CONSTITUTION:When the address match is detected by an address match detection means 15 at memory access, the various pieces of information stored in a system are written into a trace memory 18. Then the address of a counter means 19 is updated and the next address is designated to the memory 18. Thus the various pieces of information are traced by the memory 18 at each time point of plural address match detecting actions. Thus, the various pieces of information can be traced by the memory 18 with plural address match detecting actions of the past. Then the debugging efficiency is improved with the use of the information on the memory 18.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は、計算機システムにおいてハードウェア/ソ
フトウェアのデバッグ或はトラブルシュート等を効率的
に行うのに好適なアドレスマツチ検出機能を有するアド
レスマツチタイミングトレース機構に関する。
[Detailed Description of the Invention] [Objective of the Invention] (Industrial Application Field) The present invention provides an address match detection function suitable for efficiently debugging or troubleshooting hardware/software in a computer system. The present invention relates to an address match timing trace mechanism having an address match timing trace mechanism.

(従来の技術) 計算機システムにおいては、ハードウェア/ソフトウェ
アのデバッグを容易に行うため、アドレスマツチ機構を
備えるのが一般的である。このアドレスマツチ機構は、
主記憶装置上の特定アドレスへのアクセスを捕え、即ち
アドレスマツチを検出し、プログラムの実行を停止する
か、或は割込みを発生するものである。実際には、対象
となるアドレスへのアクセスは1回に限られるわけでは
ないことから、アドレスマツチ機構をより有効に使用す
るためには、割込みを発生して、ソフトウェアのハンド
ラによって各種情報の取得を行うのが望ましい。但し、
割込みを伴う場合には、アドレスマツチ検出の前後で、
プログラムの継続性を保つことが要求される。
(Prior Art) Computer systems are generally equipped with an address matching mechanism to facilitate hardware/software debugging. This address matching mechanism is
It captures access to a specific address on the main memory, that is, detects an address match, and either stops program execution or generates an interrupt. In reality, access to the target address is not limited to one time, so in order to use the address matching mechanism more effectively, it is necessary to generate an interrupt and use the software handler to obtain various information. It is desirable to do so. however,
If an interrupt is involved, before and after address match detection,
It is required to maintain program continuity.

(発明が解決しようとする課題) 上記したように従来のアドレスマツチ機構では、アドレ
スマツチを検出した場合にプログラムの実行を停止する
方式、或は割込みを発生する方式が適用されていた。し
かし、アドレスマツチを検出した際に単に停止するだけ
では、使用範囲が限定されてしまい、実際には役に立た
ない場合が多い。また、割込みを発生する場合には、ア
ドレスマツチ検出の前後でプログラムの継続性を保つ必
要があるが、これはパイプライン方式を採用する計算機
や、複雑な動作を伴う命令セットを備える計算機では、
実現が極めて困難である。更に、取得した情報は即時性
に欠ける場合もあり、ハードウェア不具合の追及等には
役に立たないこともある。特に、割込みを発生して情報
を取得する際には、当然性能の悪化を伴う。これはシス
テムの用途によっては容認されないものであり、トラブ
ルシュートには不向きである。
(Problems to be Solved by the Invention) As described above, the conventional address match mechanism employs a method of stopping program execution or generating an interrupt when an address match is detected. However, simply stopping when an address match is detected limits the scope of use and is often not actually useful. In addition, when generating an interrupt, it is necessary to maintain program continuity before and after address match detection, but this is difficult for computers that use a pipeline system or have an instruction set with complex operations.
It is extremely difficult to realize this. Furthermore, the acquired information may lack immediacy and may not be useful for investigating hardware problems. In particular, when generating an interrupt to obtain information, performance naturally deteriorates. This is unacceptable for some uses of the system and is not suitable for troubleshooting.

この発明は上記事情に鑑みてなされたものでその目的は
、ハードウェア/ソフトウェアのデバッグ或はトラブル
シュートの際に、アドレスマツチ検出機構をより有効に
使用でき、性能の悪化を伴わず、またプログラムの継続
性を損わずに、即時的な情報の取得を可能としたアドレ
スマツチタイミングトレース機構を提供することにある
This invention was made in view of the above circumstances, and its purpose is to make it possible to use the address match detection mechanism more effectively when debugging or troubleshooting hardware/software, without deteriorating performance, and to improve program performance. An object of the present invention is to provide an address match timing trace mechanism that enables immediate acquisition of information without impairing continuity.

[発明の構成] (課題を解決するための手段) この発明は、アドレスマツチの検出対象アドレスを保持
するためのアドレスマツチレジスタ手段とメモリアクセ
スがあった場合に、その対象アドレス(メモリアクセス
先のメモリアドレス)とアドレスマツチレジスタ手段の
内容とを比較し、一致の何無(即ちアドレスマツチの有
無)を判別するアドレスマツチ検出手段と、メモリアク
セス時の各種情報を複数セット格納するためのトレース
メモリであって、メモリアクセス時に上記アドレスマツ
チ検出手段によってアドレスマツチが検出される毎に格
納動作が行われるトレースメモリと、このトレースメモ
リのアドレスを指定し、同メモリの格納動作が行われる
毎にアドレスが更新されるカウンタ手段とを設けたこと
を特徴とするものである。
[Structure of the Invention] (Means for Solving the Problems) The present invention provides an address match register means for holding an address to be detected for an address match, and an address match register means for holding an address to be detected for an address match. an address match detection means that compares the contents of the address match register means (memory address) and the contents of the address match register means and determines whether there is a match (that is, the presence or absence of an address match); and a trace memory for storing multiple sets of various information at the time of memory access. A trace memory in which a storage operation is performed every time an address match is detected by the address match detection means at the time of memory access, and an address of this trace memory are specified, and an address is specified each time a storage operation of the memory is performed. The present invention is characterized in that it is provided with a counter means that is updated.

(作用) 上記の構成によれば、メモリアクセス時にアドレスマツ
チ検出手段によってアドレスマツチが検出された場合に
は、その時点におけるシステム内の各種情報がトレース
メモリに書込まれる。上記各種情報としては、例えば対
応するメモリアクセス時のデータ、発行した命令を特定
する情報(プログラムステータスワード、プログラムカ
ウンタ、分岐トレースレジスタ、命令語等)である。
(Operation) According to the above configuration, when an address match is detected by the address match detecting means at the time of memory access, various information in the system at that time is written to the trace memory. The above-mentioned various information includes, for example, data at the time of corresponding memory access, information specifying the issued instruction (program status word, program counter, branch trace register, instruction word, etc.).

上記の情報書込みが行われるとカウンタ手段のアドレス
更新動作が行われ、トレースメモリに対する次のアドレ
スが指定される。このようにして、複数回にわたるアド
レスマツチ検出に関し、各検出時点における各種情報が
トレースメモリにトレースされる。
When the above information is written, the address of the counter means is updated, and the next address for the trace memory is specified. In this way, regarding address match detection performed multiple times, various information at each detection time is traced to the trace memory.

(実施例) 以下、この発明の一実施例を図面を参照して説明する。(Example) An embodiment of the present invention will be described below with reference to the drawings.

第1図は計算機システムに設けられたアドレスマツチタ
イミングトレース機構周辺のブロック構成を示す。同図
において、11はメモリアクセス先を指定するメモリア
ドレスを保持するためのメモリアドレスレジスタ(MA
R) 、12−1〜12−nは計算機システム内部の各
種レジスタ類(以下、内部レジスタと称する)、13は
アドレスマツチタイミングトレース機構である。アドレ
スマツチタイミングトレース機構13は、メモリアクセ
スの対象アドレスとの一致を検出すべきアドレス、即ち
アドレスマツチ検出対象メモリアドレスを保持するため
のアドレスマツチレジスタ(AMR)14と、このアド
レスマツチレジスタ14およびメモリアドレスレジスタ
11の両内容を比較して一致(アドレスマツチ)を検出
するための比較器15と、この比較器15の出力(アド
レスマツチ検出結果)およびメモリアドレスレジスタ1
1で指定されたアドレスへのアクセスがあることを示す
メモリアクセス信号16がいずれも真であることを検出
するためのアントゲ−) (AND)17とを有してい
る。アドレスマツチタイミングトレース機構13は更に
、アンドゲート17の出力信号の状態に応じて書込み可
状態となり、メモリアドレスレジスタ11および内部レ
ジスタ12−1−12−nの各保持情報の書込みが行わ
れるトレースメモリ18と、このトレースメモリ18の
アドレスを指定するためのカウンタ19とを有している
。このカウンタ19は、トレースメモリ18への1回の
情報書込み毎にアントゲ−)17の出力信号に応じてカ
ウントアツプするようになっている。
FIG. 1 shows a block configuration around an address match timing trace mechanism provided in a computer system. In the figure, 11 is a memory address register (MA) for holding a memory address that specifies a memory access destination.
R), 12-1 to 12-n are various registers inside the computer system (hereinafter referred to as internal registers), and 13 is an address match timing trace mechanism. The address match timing trace mechanism 13 includes an address match register (AMR) 14 for holding an address for which a match with a target address of memory access is to be detected, that is, a memory address subject to address match detection, and a memory A comparator 15 for comparing both contents of the address register 11 and detecting a match (address match), an output of this comparator 15 (address match detection result) and a memory address register 1
(AND) 17 for detecting that all memory access signals 16 indicating that there is an access to the address specified by 1 are true. The address match timing trace mechanism 13 further enters a writable state in accordance with the state of the output signal of the AND gate 17, and the trace memory into which information held in the memory address register 11 and internal registers 12-1-12-n is written. 18, and a counter 19 for specifying the address of this trace memory 18. This counter 19 is designed to count up in response to the output signal of the anti-game 17 every time information is written into the trace memory 18.

さて、計算機システムにおいては、例えばメモリ上の特
定アドレスのデータが破壊されるといった不具合が発生
することがある。ところが、データ破壊が直ちに異常動
作を招くことは一般に少なく、したがって、このような
不具合は原因追及が困難である。本発明はこのような場
合に有効なツールを堤供するものである。上記した第1
図の構成は、本発明の一実施例を示したもので、以下そ
の動作を説明する。
Now, in a computer system, a problem may occur in which, for example, data at a specific address on the memory is destroyed. However, data destruction generally does not immediately lead to abnormal operation, and therefore it is difficult to trace the cause of such malfunctions. The present invention provides an effective tool in such cases. The first above
The configuration shown in the figure shows one embodiment of the present invention, and its operation will be explained below.

まず、データ破壊の発生するメモリアドレスを、アドレ
スマツチタイミングトレース機構13内のアドレスマツ
チレジスタ14にセットしておく。
First, the memory address where data destruction occurs is set in the address match register 14 in the address match timing trace mechanism 13.

そして、この状態で調査対象とするプログラムを起動す
る。この起動されたプログラムの処理においてメモリア
クセスが行われる際には、メモリアクセス先を示すメモ
リアドレスがメモリアドレスレジスタ11に保持される
。このとき、アドレスマツチタイミングトレース機構1
3内の比較器15によって、メモリアドレスレジスタ1
1とアドレスマツチレジスタ14の両内容が比較され(
てアドレスマツチの有無が判別され)、両内容が一致し
ている場合だけ(したがってアドレスマツチが検出され
た場合だけ)比較器15の出力(であるアドレスマツチ
検出結果)が真となる。
Then, in this state, start the program to be investigated. When memory access is performed in the processing of this activated program, a memory address indicating the memory access destination is held in the memory address register 11. At this time, address match timing trace mechanism 1
Comparator 15 in memory address register 1
1 and the contents of the address match register 14 are compared (
The output of the comparator 15 (the address match detection result) becomes true only when the two contents match (therefore, only when an address match is detected).

比較器15の出力(アドレスマツチ検出結果)はメモリ
アクセス信号1Gと共にアンドゲート17に供給される
。メモリアクセス信号11mは、メモリアクセスが行わ
れる場合に真となる。したがって、メモリアクセス時に
比較器15の出力が真の場合、即ちアドレスマツチレジ
スタ14によって示されるメモリアドレスへのメモリア
クセスがjテわれる場合には、アンドゲート17の出力
が真となる。アンドゲートI7の出力が真となると、ト
レースメモリ18が書込み可状態となる。この結果、カ
ウンタ19の指定するトレースメモリ18のアドレスに
、その時点(即ちアドレスマツチ検出時点)においてメ
モリアドレスレジスタ11および内部レジスタ12−1
〜l 2−nに保持されている各情報が格納される(ト
レースされる)。上記各情報は、アドレスマツチが検出
されたメモリアクセス時のデータ、発行した命令を特定
する情報(プログラムステータスワード、プログラムカ
ウンタの内容、分岐トレースレジスタの内容、命令語等
)である。そして、上記各情報がトレースメモリ18に
格納されると、(メモリアクセス信号16の真から偽へ
の遷移に対応する)アンドゲート17の出力の真から偽
への遷移に応じてカウンタ19がカウントアツプし、ト
レースメモリ18に対する次の情報格納アドレスを指定
する。もし、カウンタ19がトレースメモリ18の最終
アドレスを指定していた場合には、カウンタI9は上記
のカウントアツプによりトレースメモリ18の先頭アド
レスを指定することになる。一方、調査対象プログラム
の実行はそのまま継続される。
The output of the comparator 15 (address match detection result) is supplied to the AND gate 17 together with the memory access signal 1G. The memory access signal 11m becomes true when memory access is performed. Therefore, when the output of the comparator 15 is true during memory access, that is, when the memory access to the memory address indicated by the address match register 14 is performed, the output of the AND gate 17 becomes true. When the output of AND gate I7 becomes true, trace memory 18 becomes writable. As a result, the address of the trace memory 18 specified by the counter 19 is set to the memory address register 11 and the internal register 12-1 at that point in time (that is, at the point in time when an address match is detected).
Each piece of information held in ~l 2-n is stored (traced). The above information includes data at the time of memory access in which an address match was detected, information specifying the issued instruction (program status word, contents of the program counter, contents of the branch trace register, instruction word, etc.). Then, when each of the above information is stored in the trace memory 18, the counter 19 starts counting in response to the transition from true to false in the output of the AND gate 17 (corresponding to the transition from true to false in the memory access signal 16). and specify the next information storage address for the trace memory 18. If the counter 19 specifies the final address of the trace memory 18, the counter I9 specifies the first address of the trace memory 18 by counting up as described above. On the other hand, execution of the program to be investigated continues as is.

以上の動作は、調査対象プログラムの実行期間中、繰返
し行われる。したがって、調査対象プログラムの実行が
データ破壊により異常終了した場合には、トレースメモ
リ18の内容を調査することにより、不具合箇所を容易
に特定することが可能となる。
The above operations are repeated during the execution period of the program to be investigated. Therefore, if execution of the program to be investigated ends abnormally due to data destruction, by investigating the contents of the trace memory 18, it becomes possible to easily identify the location of the problem.

[発明の効果] 以上詳述したようにこの発明によれば、ハードウェア/
ソフトウェアのデバッグ或はトラブルシュートのために
、メモリアクセス時にアドレスマツチ検出機構によりア
ドレスマツチが検出される毎に、そのメモリアクセス時
の各種情報をトレースメモリに書込む動作を行い、その
都度トレースメモリのアドレスを更新する構成とするこ
とにより、過去複数回にわたるアドレスマツチ検出につ
き、各種情報をトレースメモリにトレースできるように
なり、このトレースメモリの情報を利用することで、ハ
ードウェア/ソフトウェアの不具合によってメモリ上の
データ破壊が発生した場合等、デバッグを効率良く行う
ことができる。また、アドレスマツチ検出時の情報トレ
ースは簡単に実現でき、しかもアドレスマツチで割込み
を発生する方式と異なって複雑な制御を要することなく
プログラムの継続性を維持でき、性能悪化を伴わないこ
とから、トラブルシュートの際にも有効である。
[Effect of the invention] As detailed above, according to the present invention, the hardware/
For software debugging or troubleshooting, each time an address match is detected by the address match detection mechanism during memory access, various information at the time of the memory access is written to the trace memory, and each time the trace memory is By adopting a configuration that updates addresses, it becomes possible to trace various information to the trace memory regarding address match detections that have occurred multiple times in the past, and by using the information in this trace memory, it is possible to Debugging can be performed efficiently in cases such as when the above data corruption occurs. In addition, information tracing when an address match is detected can be easily realized, and unlike the method of generating an interrupt when an address match occurs, program continuity can be maintained without requiring complicated control, and there is no performance deterioration. It is also effective when troubleshooting.

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

第1図はこの発明の一実施例を示すブロック構成図であ
る。 11・・・メモリアドレスレジスタ(MAR) 、12
−1〜12−n・・・内部レジスタ、13・・・アドレ
スマツチタイミングトレース機構、14・・・アドレス
マツチレジスタ(AMR) 、15・・・比較器(アド
レスマツチ検出手段)、17・・・アンドゲート(AN
D) 、18・・・トレースメモリ、19・・・カウン
タ。
FIG. 1 is a block diagram showing an embodiment of the present invention. 11...Memory address register (MAR), 12
-1 to 12-n... Internal register, 13... Address match timing trace mechanism, 14... Address match register (AMR), 15... Comparator (address match detection means), 17... ANDGATE (AN
D), 18...Trace memory, 19...Counter.

Claims (1)

【特許請求の範囲】 メモリアクセス先を指定するメモリアドレスを保持する
ためのメモリアドレスレジスタ手段を備え、このメモリ
アドレスレジスタ手段に保持されているメモリアドレス
をもとにメモリアクセスが行われる計算機システムにお
いて、 メモリアクセスの対象アドレスとの一致を検出すべきア
ドレスマッチ検出対象メモリアドレスを保持するための
アドレスマッチレジスタ手段と、このアドレスマッチレ
ジスタ手段および上記メモリアドレスレジスタ手段の両
保持内容が一致するアドレスマッチを検出するためのア
ドレスマッチ検出手段と、 メモリアクセス時の各種情報を複数セット格納するため
のトレースメモリであって、メモリアクセス時に上記ア
ドレスマッチ検出手段によってアドレスマッチが検出さ
れる毎に格納動作が行われるトレースメモリと、 このトレースメモリのアドレスを指定し、同メモリの格
納動作が行われる毎にアドレスが更新されるカウンタ手
段と、 を具備することを特徴とするアドレスマッチタイミング
トレース機構。
[Claims] A computer system comprising memory address register means for holding a memory address specifying a memory access destination, and in which memory access is performed based on the memory address held in the memory address register means. , an address match in which a match with the target address of memory access is to be detected; an address match register means for holding a memory address to be detected; and an address match in which the contents held by both this address match register means and the memory address register means match. and a trace memory for storing multiple sets of various information at the time of memory access, the storage operation being performed every time an address match is detected by the address match detection means during memory access. 1. An address match timing tracing mechanism comprising: a trace memory in which data is stored; and counter means for specifying an address of the trace memory and updating the address each time a storage operation is performed in the memory.
JP1198332A 1989-07-31 1989-07-31 Address match timing tracing mechanism Pending JPH0362233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1198332A JPH0362233A (en) 1989-07-31 1989-07-31 Address match timing tracing mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1198332A JPH0362233A (en) 1989-07-31 1989-07-31 Address match timing tracing mechanism

Publications (1)

Publication Number Publication Date
JPH0362233A true JPH0362233A (en) 1991-03-18

Family

ID=16389352

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1198332A Pending JPH0362233A (en) 1989-07-31 1989-07-31 Address match timing tracing mechanism

Country Status (1)

Country Link
JP (1) JPH0362233A (en)

Similar Documents

Publication Publication Date Title
EP0702297B1 (en) A data processor with breakpoint circuit
US8291379B2 (en) Runtime analysis of a computer program to identify improper memory accesses that cause further problems
KR940003318B1 (en) Processor having cache memory
US7698690B2 (en) Identifying code that wastes time performing redundant computation
EP0638864B1 (en) Development support system for microcomputer with internal cache
JPH04229340A (en) Debug system of common-memory multiprocessor computer
US8010774B2 (en) Breakpointing on register access events or I/O port access events
JPH0362233A (en) Address match timing tracing mechanism
JPH03113648A (en) Program debug system
JP2636101B2 (en) Debug support device
JPS6270947A (en) Control system for debug interruption
JPH0581087A (en) Processor monitoring system
JPH11167500A (en) Event circuit and debug system for emulator device
JPS59183443A (en) Debug device
JPS626341A (en) Information processor
JPH0210441A (en) Trace circuit
JPH02249040A (en) Information history storage circuit
JPH0387937A (en) Trace controlling system
JPS63120336A (en) Switching system for memory access mode
JPH04361335A (en) Write control circuit for tracer
JPH02242444A (en) Debugging mechanism for information processor
JPS62120550A (en) Program debug system
JPS63228237A (en) Program debugging system
JPS6282438A (en) Control system for interruption of debug in information processor
JPS63196952A (en) Information processor