JPH06202904A - Development support device - Google Patents

Development support device

Info

Publication number
JPH06202904A
JPH06202904A JP5000444A JP44493A JPH06202904A JP H06202904 A JPH06202904 A JP H06202904A JP 5000444 A JP5000444 A JP 5000444A JP 44493 A JP44493 A JP 44493A JP H06202904 A JPH06202904 A JP H06202904A
Authority
JP
Japan
Prior art keywords
register
address
output
access
data
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.)
Withdrawn
Application number
JP5000444A
Other languages
Japanese (ja)
Inventor
展弘 ▲高▼田
Nobuhiro Takada
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.)
NEC IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems Co 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 NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP5000444A priority Critical patent/JPH06202904A/en
Publication of JPH06202904A publication Critical patent/JPH06202904A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To detect in real time the local variable access action of a program produced in a C language. CONSTITUTION:An execution range detector 102 inputs each value of the memory address received in a memory access start, and the status, and the strobe showing the timing and decides whether the memory address under execution is kept or not in the range of a designated memory address. A memory access detector 103 inputs each value of the memory address, the status and the memory access data and the strobe and detects a memory access corresponding to the designated address. Then a register access detector 104 inputs the value of the memory address and each value of the register address, the status and the register access data which are received in a register access state and the strobe and holds the register access data to detect the coincidence with the memory address value when a writing action is carried out to a relevant general-purpose register.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は開発支援装置に関し、特
に特定の命令における基底レジスタとオフセット値の演
算式により表現されるデータ領域のアドレスに対してメ
モリアクセス検出を行う開発支援装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a development support device, and more particularly to a development support device for detecting a memory access to an address of a data area represented by an arithmetic expression of a base register and an offset value in a specific instruction.

【0002】[0002]

【従来の技術】従来、開発支援装置におけるメモリアク
セス検出器においては、プログラム実行前に、検出すべ
きメモリ上のアドレス(以下、比較メモリアドレスと云
う)と、データ(以下、比較メモリデータと云う)とリ
ードまたはライトステータス(以下、比較ステータスと
云い、前記三つを総称して比較パラメータと云う)をメ
モリアクセス検出器に書込んでおき、当該メモリアクセ
ス検出器においては、E−CPUからアドレス、データ
およびステータスが出力される度ごとに、先に書込まれ
た比較パラメータとの一致検出が行われている。このメ
モリアクセス検出器により、プログラム実行前に分かっ
ているデータ領域のアドレス(以下、静的データアドレ
スと云う)に対するメモリアクセス検出が可能となる。
C言語により書かれたプログラムのグローバル変数は、
静的データアドレスにより表わされており、C言語によ
り書かれたプログラムをアセンブリ言語のレベルでディ
バッグする際に用いられている。
2. Description of the Related Art Conventionally, in a memory access detector in a development support apparatus, an address on a memory to be detected (hereinafter referred to as a comparison memory address) and data (hereinafter referred to as a comparison memory data) before executing a program. ) And a read or write status (hereinafter referred to as a comparison status, the above three are collectively referred to as a comparison parameter) are written in a memory access detector, and in the memory access detector, an address is sent from the E-CPU. Each time the data and status are output, a match with the previously written comparison parameter is detected. With this memory access detector, it is possible to detect a memory access to an address (hereinafter referred to as a static data address) of a data area known before the program is executed.
Global variables of programs written in C are
It is represented by a static data address and is used when debugging a program written in C language at the assembly language level.

【0003】図6は、プログラムの特定範囲を実行中に
生起する、静的データアドレスに対するメモリアクセス
を検出するための、従来の開発支援装置のイベント検出
器のプロック図である。図6において、E−CPU30
1は、MA(15:0) 、MSTS(n:0)、MDSTB(0:0)およびMD
(7:0) を持つ従来のエミュレーションCPUであり、ま
た、上記のMA(15:0)、MSTS(ni0) 、MDSTB(0:0)およびMD
(7:0) は、それぞれメモリアクセス時のアドレスを出力
するアドレスバス、メモリアクセス時のステータス、メ
モリデータのアクセスタイミングを示すストローブ、お
よびメモリアクセス時のデータを出力するデータバスで
ある。
FIG. 6 is a block diagram of an event detector of a conventional development support device for detecting a memory access to a static data address that occurs during execution of a specific range of a program. In FIG. 6, the E-CPU 30
1 is MA (15: 0), MSTS (n: 0), MDSTB (0: 0) and MD
It is a conventional emulation CPU with (7: 0) and also MA (15: 0), MSTS (ni0), MDSTB (0: 0) and MD above.
(7: 0) is an address bus for outputting an address at the time of memory access, a strobe for indicating a status at the time of memory access, a memory data access timing, and a data bus for outputting data at the time of memory access.

【0004】実行範囲検出器102においては、E−C
PU301からのMA(15:0)、MSTS(n:0) およびMDSTB(0:
0)の値を入力とし、現在実行しているアドレスが指定さ
れたアドレス範囲内にあるか否かが検出されて、検出信
号DTC1(0:0) が出力される。ここで、検出信号DTC1(0:
0) は、指定範囲内実行検出時においては“H”レベ
ル、非検出時においては“L”レベルとなる。また、メ
モリアクセス検出器103においては、E−CPU30
1からのMA(15:0)、MSTS(n:0) およびMD(7:0) を入力と
し、指定されたアドレスに対するメモリアクセスが検出
されて、検出信号DTC2(0:0) が出力される。この検出信
号DTC2(0:0) は、メモリアクセス検出時においては
“H”レベル、非検出時においては“L”レベルとな
る。また、AND演算器305においては、上記の実行
範囲検出器102とメモリアクセス検出器103の出力
の論理積がとられ、両出力が同時に“H”レベルとなっ
たか否かが検出される。AND演算器305の出力EVEN
T OUT(0:0)は、ディバッグ対象となるE−CPU301
のプログラム実行停止(以下、ブレークと云う)および
実行履歴の取得(以下、トレースと云う)のトリガとし
て用いられる。 図7は、前記実行範囲検出器102の
内部構成を示すブロック図である。図7において、比較
上限アドレスレジスタ401は、検出したい実行範囲の
上限アドレスを保持するためのレジスタであり、その値
はC-MA1(15:0) に出力されて、上限アドレス比較器40
2に入力される。上限アドレス比較器402において
は、このC-MA1(15:0) の値と、E−CPU301より出
力されるMA(15:0)の値とが比較されて、MA(15:0)≦C-MA
1(15:0) である場合には、出力されるLEMA(0:0) は
“H”レベルとなる。比較下限アドレスレジスタ403
は、検出したい実行範囲の下限アドレスを保持するため
のレジスタであり、その値はC-MA2(15:0) に出力され
て、下限アドレス比較器404に入力される。下限アド
レス比較器404においては、このC-MA2(15:0) の値
と、E−CPU301より出力されるMA(15:0)の値とが
比較されて、MA(15:0)≧C-MA2(15:0) である場合には、
出力されるGEMA(0:0) は“H”レベルとなる。AND演
算器405においては、前記LEMA(0:0) およびGEMA(0:
0)の論理積がとられて、これらのLEMA(0:0) とGEMA(0:
0) が同時に“H”レベルとなったか否か(指定範囲内
実行中であるか否か)が検出され、論理積演算結果がLD
(0:0) として出力される。比較ステータスレジスタ40
6は、MSTS(n:0) の比較対象となるステータスを記憶し
ておくためのレジスタであり、この場合には、実行して
いることを検出するために、フェッチステータスFetch
に相当するステータス値が書込まれている。また、その
値はC-MSTS1(n:0)に出力されている。ステータス比較器
407は、C-MSTS1(n:0)とM-STS(n:0)の一致検出を行う
ための比較器であり、ステータス比較器407において
一致が検出された場合には、出力されるEQSTS1(0:0) は
“H”レベルとなる。AND演算器408においては、
このEQSTS1(0:0) と、E−CPU301より出力される
MDSTB(0:0)との論理積がとられて、フェッチ動作が行わ
れたか否かが検出される。そしてEQSTS1(0:0) が“H”
レベルの間において、MDSTB(0:0)がE−CPU301よ
り出力された場合においてのみ、AND演算器406よ
り出力されるLSTB1(0:0)が“H”レベルとなる。実行範
囲比較結果保持器409は、LSTB1(0:0)が“L”レベル
から“H”レベルに遷移する時のエッジをラッチストロ
ーブとして、AND演算器405より出力されるLD(0:
0) の値を保持し、LSTB1(0:0)を介してDTC1(0:0) とし
て出力する回路である。
In the execution range detector 102, E-C
MA (15: 0), MSTS (n: 0) and MDSTB (0: from PU301
The value of (0) is input, and it is detected whether or not the currently executed address is within the specified address range, and the detection signal DTC1 (0: 0) is output. Here, the detection signal DTC1 (0:
0) becomes "H" level when the execution within the designated range is detected, and becomes "L" level when the execution is not detected. In the memory access detector 103, the E-CPU 30
Input MA (15: 0), MSTS (n: 0) and MD (7: 0) from 1 to detect memory access to the specified address and output detection signal DTC2 (0: 0). It The detection signal DTC2 (0: 0) becomes "H" level when the memory access is detected and becomes "L" level when the memory access is not detected. Further, in the AND operator 305, the logical product of the outputs of the execution range detector 102 and the memory access detector 103 is taken, and it is detected whether or not both outputs become "H" level at the same time. Output EVEN of AND operator 305
T OUT (0: 0) is the E-CPU 301 to be debugged
It is used as a trigger for stopping the execution of the program (hereinafter, referred to as a break) and acquiring an execution history (hereinafter, referred to as a trace). FIG. 7 is a block diagram showing an internal configuration of the execution range detector 102. In FIG. 7, a comparison upper limit address register 401 is a register for holding the upper limit address of the execution range to be detected, and its value is output to C-MA1 (15: 0) and the upper limit address comparator 40
Entered in 2. In the upper limit address comparator 402, the value of C-MA1 (15: 0) is compared with the value of MA (15: 0) output from the E-CPU 301, and MA (15: 0) ≤C. -MA
When it is 1 (15: 0), the output LEMA (0: 0) is at "H" level. Comparison lower limit address register 403
Is a register for holding the lower limit address of the execution range to be detected, and its value is output to C-MA2 (15: 0) and input to the lower limit address comparator 404. In the lower limit address comparator 404, the value of C-MA2 (15: 0) is compared with the value of MA (15: 0) output from the E-CPU 301, and MA (15: 0) ≧ C -If it is MA2 (15: 0),
The output GEMA (0: 0) becomes "H" level. In the AND operator 405, the LEMA (0: 0) and GEMA (0:
0) is ANDed with these LEMA (0: 0) and GEMA (0:
It is detected whether (0) has become "H" level at the same time (whether execution is within the specified range), and the logical product operation result is LD
It is output as (0: 0). Comparison status register 40
Reference numeral 6 is a register for storing the status to be compared with MSTS (n: 0). In this case, the fetch status Fetch is used to detect execution.
The status value corresponding to is written. The value is output to C-MSTS1 (n: 0). The status comparator 407 is a comparator for detecting a match between C-MSTS1 (n: 0) and M-STS (n: 0). When the status comparator 407 detects a match, it outputs an output. EQSTS1 (0: 0) is set to "H" level. In the AND operator 408,
This EQTSS1 (0: 0) is output from the E-CPU 301.
The logical product is obtained with MDSTB (0: 0) to detect whether or not the fetch operation is performed. And EQTSS1 (0: 0) is “H”
During the level, only when MDSTB (0: 0) is output from the E-CPU 301, LSTB1 (0: 0) output from the AND operator 406 becomes the “H” level. The execution range comparison result holder 409 uses the edge when the LSTB1 (0: 0) transitions from the “L” level to the “H” level as a latch strobe, and outputs LD (0:
This circuit holds the value of (0) and outputs it as DTC1 (0: 0) via LSTB1 (0: 0).

【0005】次に、実行範囲検出器102の動作のタイ
ミング図を図9(a)、(b)、(c)、(d)、
(e)、(f)、(g)、(h)、(i)、(j)、
(k)、(l)および(m)に示す。本タイミング図
は、4000番地から4FFFh番地の範囲のメモリフ
ェッチを検出する際の1例の動作を示すタイミング図で
ある。図9においては、C-MA1(15:0) 、C -MA2(15:0)お
よびC-MSTS(n:0) は、それぞれ比較すべき値であるため
に全区間において変化しない。T1 〜T2 の区間におい
ては、MA(15:0)からアドレス31F0h が出力され、またMS
TS(n:0) からは Fetchが出力されている。このT1 〜T
2 の区間においては、MA(15:0)<C-MA1(15:0) であり、
またMA(15:0)<C-MA2(15:0) であるため、LEMA(0:0) は
“H”レベル、GEMA(0:0) は“L”レベルとなる。ま
た、MSTS(n:0) はFetch であるため、EQMSTS1(0:0)は
“H”レベルである。MDSTB(0:0)はT2 において“H”
レベルとなっているため、LSTB(0:0) はT2 において
“H”レベルとなる。また、その時点においてLD(0:0)
は“L”レベルであるため、DTC1(0:0) は“L”レベル
の状態に保持されている。T3 〜T4 の区間において
は、MA(15:0)からアドレス4020h が出力され、またMSTS
(n:0) からはFetch が出力されている。このT3 〜T4
の区間においては、MA(15:0)<C-MA1(15:0) であり、ま
たMA(15:0)>C-MA2(15:0) であるため、LEMA(0:0) およ
びGEMA(0:0) は共に“H”レベルとなり、LD(0:0)0も
“H”レベルとなる。またMSTS(n:0) はFetch であるた
めに、EQMSTS1(0:0)は“H”レベルである。MDSTB(0:0)
は、T4 において“H”レベルとなっているため、LSTB
(0:0) はT4 において“H”レベルとなる。また、その
時点においてLD(0:0) は“H”レベルであるため、DTC1
(0:0) は“H”レベルの状態に保持されている。
Next, a timing chart of the operation of the execution range detector 102 is shown in FIGS. 9 (a), (b), (c), (d), and FIG.
(E), (f), (g), (h), (i), (j),
Shown in (k), (l) and (m). This timing chart is a timing chart showing an example of the operation when detecting a memory fetch in the range of addresses 4000 to 4FFFh. In FIG. 9, C-MA1 (15: 0), C-MA2 (15: 0) and C-MSTS (n: 0) are values to be compared, and therefore do not change in the entire section. In the interval from T 1 to T 2 , MA (15: 0) outputs address 31F0h and MS
Fetch is output from TS (n: 0). This T 1 ~ T
In section 2 , MA (15: 0) <C-MA1 (15: 0),
Since MA (15: 0) <C-MA2 (15: 0), LEMA (0: 0) is at "H" level and GEMA (0: 0) is at "L" level. Since MSTS (n: 0) is Fetch, EQMSTS1 (0: 0) is at "H" level. MDSTB (0: 0) is “H” at T 2
Since it is at the level, LSTB (0: 0) becomes the “H” level at T 2 . At that point, LD (0: 0)
Is at "L" level, DTC1 (0: 0) is held at "L" level. In the section from T 3 to T 4 , MA (15: 0) outputs address 4020h and MSTS.
Fetch is output from (n: 0). This T 3 ~ T 4
In the section of, MA (15: 0) <C-MA1 (15: 0) and MA (15: 0)> C-MA2 (15: 0), so LEMA (0: 0) and Both GEMA (0: 0) become "H" level, and LD (0: 0) 0 also becomes "H" level. Further, since MSTS (n: 0) is Fetch, EQMSTS1 (0: 0) is at "H" level. MDSTB (0: 0)
Is at "H" level at T 4 , so LSTB
(0: 0) becomes "H" level at T 4. At that time, LD (0: 0) is at "H" level, so DTC1
(0: 0) is held in the "H" level state.

【0006】T5 〜T6 の区間においては、MA(15:0)か
らアドレス5030h が出力され、またMSTS(n:0) からはFe
tch が出力されている。このT5 〜T6 の区間において
は、MA(15:0)>C-MA1(15:0) であり、またMA(15:0)>C-
MA2(15:0) であるため、LEMA(0:0) は“L”レベル、GE
MA(0:0) は“H”レベル、そしてLD(0:0)0は“L”レベ
ルとなる。またMSTS(n:0) はFetch であるために、EQMS
TS1(0:0)は“H”レベルである。MDSTB(0:0)は、T4
おいて“H”レベルとなっているため、LSTB(0:0) はT
4 において“H”レベルとなる。また、その時点におい
てLD(0:0) は“L”レベルであるため、DTC1(0:0) は、
それまで保持されていた“H”レベルから、新たに
“L”レベルが保持される。
In the section of T 5 to T 6 , address 5030h is output from MA (15: 0), and Fe from MSTS (n: 0).
tch is output. In the section from T 5 to T 6 , MA (15: 0)> C-MA1 (15: 0) and MA (15: 0)> C-
Since it is MA2 (15: 0), LEMA (0: 0) is “L” level, GE
MA (0: 0) becomes "H" level, and LD (0: 0) 0 becomes "L" level. Also, since MSTS (n: 0) is Fetch, EQMS
TS1 (0: 0) is at "H" level. MDSTB (0: 0) is at “H” level at T 4 , so LSTB (0: 0) is T
It becomes "H" level at 4 . At that time, LD (0: 0) is at “L” level, so DTC1 (0: 0) is
The "L" level is newly retained from the "H" level retained until then.

【0007】図8は、図6に示されるメモリアクセス検
出器103の内部構成を示すブロック図である。図8に
おいて、比較データレジスタ501は、検出したいメモ
リアクセスデータを保持するためのレジスタであり、そ
の値はC-MD(7:0) に出力されている。データ比較器50
2は、MD(7:0) とC-MD(7:0) の一致検出を行うための比
較器であり、MD(7:0) とC-MD(7:0) の一致が検出された
場合には、出力されるEQMD(0:0) は“H”レベルとな
る。また、比較ステータスレジスタ503は、検出した
いメモリアクセスステータスを保持するためのレジスタ
であり、リードまたはライトに相当するステータス値が
書込まれる。また、その値はC-MSTS2(n:0)に出力されて
いる。ステータス比較器504は、MSTS(n:0) とC-MSTS
2(n:0)の一致検出を行うための比較器であり、一致が検
出された場合には、出力されるEQMSTS2(0:0)は“H”レ
ベルとなる。比較アドレスレジスタ505は、検出した
いメモリアクセスアドレスを保持するためのレジスタで
あり、その値はC-MA3(15:0)に出力されている。アドレ
ス比較器506は、MA(15:0)とC-MA3(15:0) の一致検出
を行うための比較器であり、MA(15:0)とC-MA3(15:0) の
一致が検出された場合には、出力されるEQMA(0:0) は
“H”レベルとなる。マスクデータレジスタ507は、
アドレス比較器506において比較されたビットの比較
結果を、ビット単位にマスクするためのデータを記憶し
ておくためのレジスタであり、その値はMSKD(15:0)に出
力されている。マスクデータレジスタ507のビットを
セットすることにより、対応するビットの比較結果は、
常に一致しているものとすることができる。AND演算
器508においては、データ比較器502、ステータス
比較器504およびアドレス比較器506よりそれぞれ
出力されるEDMD(0:0) 、EQMSTS2(0:0)、EQMA(0:0) およ
びMDSTB(0:0)の論理積がとられ、これらの値が全て
“H”レベルの場合においてのみ、DTC2(0:0) として
“H”レベルが出力される。
FIG. 8 is a block diagram showing an internal structure of the memory access detector 103 shown in FIG. In FIG. 8, the comparison data register 501 is a register for holding the memory access data to be detected, and its value is output to C-MD (7: 0). Data comparator 50
Reference numeral 2 is a comparator for detecting a match between MD (7: 0) and C-MD (7: 0). A match between MD (7: 0) and C-MD (7: 0) is detected. In this case, the output EQMD (0: 0) becomes "H" level. The comparison status register 503 is a register for holding a memory access status to be detected, and a status value corresponding to read or write is written. The value is output to C-MSTS2 (n: 0). The status comparator 504 uses MSTS (n: 0) and C-MSTS.
This is a comparator for detecting a match of 2 (n: 0). When a match is detected, EQMSTS2 (0: 0) that is output becomes the “H” level. The comparison address register 505 is a register for holding a memory access address to be detected, and its value is output to C-MA3 (15: 0). The address comparator 506 is a comparator for detecting a match between MA (15: 0) and C-MA3 (15: 0), and a match between MA (15: 0) and C-MA3 (15: 0). When is detected, the output EQMA (0: 0) becomes the “H” level. The mask data register 507 is
This is a register for storing data for masking the comparison result of the bits compared by the address comparator 506 in bit units, and the value is output to MSKD (15: 0). By setting the bit of the mask data register 507, the comparison result of the corresponding bit is
It can always be a match. In the AND operator 508, EDMD (0: 0), EQMSTS2 (0: 0), EQMA (0: 0) and MDSTB (0 are output from the data comparator 502, the status comparator 504 and the address comparator 506, respectively. : 0) is ANDed and the "H" level is output as DTC2 (0: 0) only when all of these values are "H" level.

【0008】図10(a)、(b)、(c)、(d)、
(e)、(f)、(g)、(h)、(i)、(j)、
(k)、(l)および(m)に示すのは、MSKD(15:0)が
000h(マスク無し)の時の従来のメモリアクセス検
出器103における動作を示すタイミング図である。こ
こにおいては、アドレス8040hにFFhというデー
タが書込まれた際における検出例が示されている。図9
において、C-MD(7:0) 、C-MSTS2(n:0)およびC-MAS3(n:
0) は、それぞれ比較すべき値であり、全区間において
変化しない。またMSKD(15:0)も固定値であるため全区間
において変化しない。T1 〜T2 の区間においては、MA
(15:0)からアドレス8040hが出力され、またMSTS
(n:0) からは Writeが出力される。T2 区間において
は、MD(7:0) からデータFFhが出力されている。この
2 区間においてのみ比較結果が全て一致しているため
に、EQMD(0:0) 、EQMSTS2(0:0)、EQMA(0:0) は全て
“H”レベルとなり、同時にメモリアクセス検出器10
3より出力されるDTC2(0:0) も“H”レベルとなる。T
3 〜T4 の区間においては、MA(15:0)からアドレス91
00hが出力され、またMSTS(n:0) からはWrite が出力
されている。T4 区間においては、MD(7:0)からデータ
FFhが出力されている。このT4 区間においては、EQ
MD(0:0) 、EQMSTS2(0:0)、EQMA(0:0) およびEQMSTS2(0:
0)は“H”レベルであるが、EQMA(0:0) が“L”レベル
であるため、メモリアクセス検出器103より出力され
るDTC2(0:0) は“L”レベルのままである。
10 (a), (b), (c), (d),
(E), (f), (g), (h), (i), (j),
(K), (l) and (m) are timing charts showing the operation of the conventional memory access detector 103 when MSKD (15: 0) is 000h (no mask). Here, an example of detection when data FFh is written at address 8040h is shown. Figure 9
, C-MD (7: 0), C-MSTS2 (n: 0) and C-MAS3 (n:
0) is a value to be compared with each other and does not change in all sections. Since MSKD (15: 0) is also a fixed value, it does not change in all sections. MA in the section from T 1 to T 2
Address 8040h is output from (15: 0), and MSTS
Write is output from (n: 0). In the T 2 section, the data FFh is output from MD (7: 0). Since all the comparison results match only in this T 2 section, EQMD (0: 0), EQMSTS2 (0: 0), EQMA (0: 0) are all at “H” level, and at the same time, the memory access detector 10
DTC2 (0: 0) output from 3 also becomes "H" level. T
In the section from 3 to T 4 , address 91 from MA (15: 0)
00h is output, and Write is output from MSTS (n: 0). In the T 4 section, the data FFh is output from MD (7: 0). EQ in this T 4 section
MD (0: 0), EQMSTS2 (0: 0), EQMA (0: 0) and EQMSTS2 (0:
0) is at "H" level, but EQMA (0: 0) is at "L" level, so DTC2 (0: 0) output from the memory access detector 103 remains at "L" level. .

【0009】図11(a)、(b)、(c)、(d)、
(e)、(f)、(g)、(h)、(i)、(j)、
(k)、(l)および(m)は、MSKD(15:0)がFFFh
(全ビットマスク)の時における、従来のメモリアクセ
ス検出器103の動作を示すタイミング図である。前述
の図10に示されるMSKD(15:0)が000hの場合と異な
る点は、T4 区間において、C-MA3(15:0) とMA(15:0)の
値が異なっているにもかかわらず、DTC2(0:0) が“H”
レベルにて出力されている点である。これは、マスクレ
ジスタをFFFhとして設定しているためで、C-MA3(1
5:0) の値にかかわらず、EQMA(0:0) が常に“H”レベ
ルになっているからである。
11 (a), (b), (c), (d),
(E), (f), (g), (h), (i), (j),
In (k), (l) and (m), MSKD (15: 0) is FFFh.
FIG. 11 is a timing diagram showing an operation of the conventional memory access detector 103 at the time of (all bit mask). The difference from the case where MSKD (15: 0) shown in FIG. 10 is 000h is that the values of C-MA3 (15: 0) and MA (15: 0) are different in the T 4 section. Regardless, DTC2 (0: 0) is “H”
This is the point that is output at the level. This is because the mask register is set as FFFh, so C-MA3 (1
This is because EQMA (0: 0) is always at "H" level regardless of the value of 5: 0).

【0010】次に、図6に示される実行範囲検出器10
2とメモリアクセス検出器103を組合わせて、プログ
ラムの特定範囲を実行中に生起する静的データアドレス
に対するメモリアクセスの検出例を、図12のプログラ
ム例と図13(a)、(b)、(c)、(d)、
(e)、(f)、(g)、(h)、(i)、(j)、
(k)、(l)、(m)および(n)のタイミング図を
参照して説明する。図12は、インテル8086アセン
ブリ言語によるプログラム例であり、二つのサブルーチ
ンsub1およびsub2と、一つのデータ領域data1 から成っ
ている。また、ここにおいては、簡単のために、命令は
全て1バイト命令としている。
Next, the execution range detector 10 shown in FIG.
2 and the memory access detector 103 are combined to detect a memory access to a static data address that occurs during execution of a specific range of the program, as shown in the program example of FIG. 12 and FIGS. 13 (a) and 13 (b). (C), (d),
(E), (f), (g), (h), (i), (j),
This will be described with reference to the timing diagrams of (k), (l), (m) and (n). FIG. 12 shows an example of a program in the Intel 8086 assembly language, which consists of two subroutines sub1 and sub2 and one data area data1. For simplicity, all instructions are 1-byte instructions here.

【0011】図12において、1000は1000h番
地を表わしており、2000h番地(data1)に11hを
書込む命令である。1001は1001h番地を表わし
ており、1500h番地(sub2) を呼出す命令である。
1002は1002h番地を表わしており、2000h
番地(data1)にFFhを書込む命令である。1003は
1003h番地を表わしており、サブルーチンsub1の呼
出し元に復帰するリターン命令である。1500は15
00h番地を表わしており、1002h番地の命令と同
じである。1501は1501h番地を表わしており、
サブルーチンsub2の呼出し元に復帰するリターン命令で
ある。2000は2000h番地を表わしており、デー
タ領域を確保する疑似命令である。そして、検出条件
は、1000h番地から1003h番地の範囲を実行中
に、2000h番地に対するFFhの書込みを検出する
ものとする。上記の条件が各レジスタに設定されると、
それぞれC-MA1(15:0) は1003h、C-MA2(15:0) は1
000h、C-MSTS2(n:0)はFetch 、C-MA3(15:0) は20
00h、C-MD(7:0) はFFh、C-MSTS2(n:0)はWiteとな
り、図13のタイミング図に示されるように、これらの
値は全て固定値となり、その値は変動しない。
In FIG. 12, 1000 represents the address 1000h, which is an instruction to write 11h in the address 2000h (data1). Reference numeral 1001 represents address 1001h, which is an instruction to call address 1500h (sub2).
1002 represents address 1002h, and 2000h
This is an instruction to write FFh to the address (data1). Reference numeral 1003 represents address 1003h, which is a return instruction for returning to the calling source of the subroutine sub1. 1500 is 15
It represents address 00h and is the same as the instruction at address 1002h. 1501 represents the address 1501h,
This is a return instruction that returns to the calling source of the subroutine sub2. Reference numeral 2000 represents an address 2000h, which is a pseudo instruction for securing a data area. The detection condition is that FFh writing to address 2000h is detected during execution of the range from address 1000h to address 1003h. When the above conditions are set in each register,
C-MA1 (15: 0) is 1003h and C-MA2 (15: 0) is 1
000h, C-MSTS2 (n: 0) is Fetch, C-MA3 (15: 0) is 20
00h, C-MD (7: 0) becomes FFh, C-MSTS2 (n: 0) becomes Wite, and as shown in the timing chart of FIG. 13, all of these values are fixed values and their values do not change. .

【0012】図13において、T1 〜T2 の区間におい
ては、1000h番地の命令がフェッチされている。こ
こにおいて、実行範囲検出器102の条件が満たされて
いるために、メモリアクセス検出器103より出力され
るDTC1(0:0) は、MDTSB(0:0)が“H”レベルになるT2
区間以降においては“H”レベルに保持される。T3
4 の区間においては、2000h番地に対する書込み
が行われているが、データが条件となるために、メモリ
アクセス検出器103の出力DTC2(0:0) は“L”レベル
のままの状態である。T5 〜T6 の区間においては、1
001h番地の命令がフェッチされており、この区間に
おいても実行範囲検出器102の条件が満たされている
ために、メモリアクセス検出器103の出力DTC1(0:0)
は“H”レベルとなる。T7 〜T8 の区間においては、
1001h番地の命令がcall命令であるために、150
0番地の命令がフェッチされており、T8 の区間におい
てメモリアクセス検出器103の出力DTC1(0:0) の値は
“L”レベルに保持されている。T9 〜T10の区間にお
いては、2000h番地に対する書込みが行われてお
り、データもメモリアクセス検出器103の条件と一致
しているために、メモリアクセス検出器103の出力DT
C2(0:0) は、T10区間において“H”レベルとなる。T
11〜T12の区間においては、1501h番地の命令がフ
ェッチされており、この区間においても、メモリアクセ
ス検出器103の出力DTC1(0:0) の値は“L”レベルの
ままである。T13〜T14の区間においては、1002h
番地の命令のフェッチが行われており、ここにおいて
は、実行範囲検出器102の条件が満たされているため
に、メモリアクセス検出器103の出力DTC1(0:0) は
“H”レベルの状態に保持される。更に、T15〜T16
区間においては、2000h番地に対する書込みが行わ
れており、データもメモリアクセス検出器103の条件
と一致しているために、メモリアクセス検出器103の
出力DTC2(0:0) は、T14区間において“H”レベルとな
り、またここにおいて、1501h番地の命令がフェッ
チされており、この区間においても、メモリアクセス検
出器103の出力DTC1(0:0) の値が“H”レベルとなる
ために、AND演算器305より出力されるEVET OUT
(0:0) のレベルが“H”レベルとなって検出終了とな
る。
In FIG. 13, the instruction at address 1000h is fetched in the section from T 1 to T 2 . Here, since the condition of the execution range detector 102 is satisfied, the DTC1 (0: 0) output from the memory access detector 103 becomes T 2 when MDTSB (0: 0) becomes “H” level.
After the section, it is held at "H" level. T 3 ~
In the section of T 4 , writing is performed to the address 2000h, but since the data becomes a condition, the output DTC2 (0: 0) of the memory access detector 103 remains in the “L” level. . In T 5 through T 6 intervals, 1
Since the instruction at address 001h has been fetched and the condition of the execution range detector 102 is satisfied also in this section, the output DTC1 (0: 0) of the memory access detector 103
Becomes "H" level. In the section of the T 7 ~T 8,
150 because the instruction at address 1001h is a call instruction
0 address instructions are fetched, the output DTC1 memory access detector 103 in the section of the T 8: The value of (0 0) is held at "L" level. In the section from T 9 to T 10 , writing is performed to the address 2000h and the data matches the condition of the memory access detector 103. Therefore, the output DT of the memory access detector 103 is
C2 (0: 0) becomes “H” level in the T 10 section. T
In 11 through T 12 interval, instructions 1501h address are fetched, even in this period, the output of the memory access detector 103 DTC1 (0: 0) The value of the remains at "L" level. In the section of the T 13 ~T 14, 1002h
Since the instruction of the address is being fetched and the condition of the execution range detector 102 is satisfied here, the output DTC1 (0: 0) of the memory access detector 103 is in the "H" level state. Held in. Further, in the section of the T 15 through T 16, which is performed write to 2000h address, because the data is also consistent with the conditions for memory access detector 103, the output of the memory access detector 103 DTC2 (0: 0) becomes the “H” level in the T 14 section, and the instruction at the address 1501h is fetched here, and the value of the output DTC1 (0: 0) of the memory access detector 103 is also “1” in this section. EVET OUT output from the AND operator 305 to reach the H "level
The level of (0: 0) becomes "H" level and the detection is completed.

【0013】[0013]

【発明が解決しようとする課題】上述した従来の開発支
援装置においては、静的データアドレスに対するメモリ
アクセス検出は可能であるが、比較アドレスレジスタが
静的であるために、基底レジスタの内容がプログラム実
行中に変化し、動的データアドレスに対するメモリアク
セス検出の設定ができないという欠点がある。
In the above-mentioned conventional development support device, although it is possible to detect a memory access to a static data address, since the comparison address register is static, the contents of the base register are programmed. It has a drawback that it changes during execution, and memory access detection cannot be set for dynamic data addresses.

【0014】[0014]

【課題を解決するための手段】本発明の開発支援装置
は、プログラム開発用として、メモリアクセス検出機能
を有する開発支援装置において、プログラム開発支援用
として機能するエミュレーションCPUと、前記エミュ
レーションCPUより、メモリアクセス時に出力される
メモリアドレスおよびステータスの各値と、当該メモリ
アクセスのタイミングを示すストローブとを入力して、
現在実行中のメモリアドレスが指定されたメモリアドレ
スの範囲内にあるか否かの検出を行う実行範囲検出器
と、前記エミュレーションCPUより、メモリアクセス
時に出力されるメモリアドレス、ステータスおよびメモ
リアクセスデータの各値と、当該メモリアクセスのタイ
ミングを示すストローブとを入力して、指定されたメモ
リアドレスに対応するメモリアクセスの検出を行うメモ
リアクセス検出器と、前記エミュレーションCPUよ
り、メモリアクセス時に出力されるメモリアドレスの値
と、レジスタアクセス時に出力されるレジスタアドレ
ス、ステータスおよびレジスタアクセスデータの各値
と、当該レジスタアクセスのタイミングを示すストロー
ブとを入力して、対象とする汎用レジスタに対する書込
みが行われた場合に、当該レジスタアクセスデータを保
持して前記メモリアドレスの値との一致検出を行うレジ
スタアクセス検出器と、を少くともイベント検出手段と
して備えて構成される。
A development support apparatus of the present invention is a development support apparatus having a memory access detection function for program development, and an emulation CPU functioning as program development support and a memory from the emulation CPU. Input each value of the memory address and status output at the time of access, and the strobe indicating the timing of the memory access,
An execution range detector that detects whether or not the memory address that is currently being executed is within a specified memory address range, and a memory address, status, and memory access data output from the emulation CPU during memory access. A memory access detector that inputs each value and a strobe indicating the timing of the memory access to detect a memory access corresponding to a specified memory address, and a memory output from the emulation CPU at the time of memory access. When the address value, the register address output during register access, the status and register access data values, and the strobe indicating the timing of the register access are input and the target general-purpose register is written. To A register access detector holds the register access data detects a coincidence between the value of the memory address, configured with a least an event detecting means.

【0015】なお、前記レジスタアクセス検出器は、ア
クセスの検出を行いたい汎用レジスタのアドレスを保持
する比較レジスタアドレスレジスタと、前記比較レジス
タアドレスレジスタに保持されるレジスタアドレスと前
記エミュレーションCPUより出力されるレジスタアド
レスとを比較して一致検出を行うレジスタアドレス比較
器と、比較対象とするレジスタステータスを保持する比
較レジスタステータスレジスタと、前記比較レジスタス
テータスレジスタに保持されている比較レジスタステー
タスと前記エミュレーションCPUより出力されるレジ
スタステータスとを比較して一致検出を行うレジスタス
テータス比較器と、前記レジスタアドレス比較器の出力
と、前記レジスタステータス比較器の出力と、前記エミ
ュレーションCPUより出力されるレジスタアクセスの
タイミングを示すストローブとを含む3出力の論理積を
とるAND演算器と、前記AND演算器の出力をラッチ
ストローブとして、前記エミュレーションCPUより出
力されるレジスタデータを保持するレジスタデータ保持
器と、所定のオフセットデータを保持するためのオフセ
ットデータレジスタと、前記レジスタデータ保持器のレ
ジスタ保持用ラッチの値と前記オフセットレジスタの値
を加算するオフセットデータ・レジスタデータ加算器
と、前記オフセットデータ・レジスタデータ加算器の加
算演算結果と、前記エミュレーションCPUより出力さ
れるメモリアドレスとを比較して一致検出を行うアドレ
ス比較器と、を備えて構成してもよい。
The register access detector outputs a comparison register address register for holding an address of a general-purpose register for which access detection is desired, a register address held in the comparison register address register, and the emulation CPU. From the emulation CPU, the register address comparator that compares the register address to detect a match, the comparison register status register that holds the register status to be compared, the comparison register status that is held in the comparison register status register, and the emulation CPU A register status comparator that compares the output register status with each other to detect a match, an output of the register address comparator, an output of the register status comparator, and the emulation CP An AND operator that takes a logical product of three outputs including a strobe indicating the timing of register access that is output from the emulation CPU, and a register that holds the register data output from the emulation CPU using the output of the AND operator as a latch strobe. A data holder, an offset data register for holding predetermined offset data, an offset data / register data adder for adding the value of the register holding latch of the register data holder and the value of the offset register, and An address comparator that compares the addition operation result of the offset data / register data adder with the memory address output from the emulation CPU to detect a match may be provided.

【0016】[0016]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.

【0017】図1は本発明の一実施例を示すブロック図
である。図1に示されるように、E−CPU101から
は、図6に示されるE−CPU301からレジスタアク
セス時に出力されるレジスタのアドレスを示すRA(15:
0)、レジスタアクセスデータを示すRD(15:0)、リードま
たはライトの状態を示すRSTS(n:0) 、レジスタアクセス
のタイミングのストローブを出力するRDSTB(0:0)が引き
出されている。上記以外の信号線については、図6のE
−CPU301の場合と同様である。
FIG. 1 is a block diagram showing an embodiment of the present invention. As shown in FIG. 1, RA (15: indicating the address of the register output from the E-CPU 101 at the time of register access from the E-CPU 301 shown in FIG.
0), RD (15: 0) indicating the register access data, RSTS (n: 0) indicating the read or write status, and RDSTB (0: 0) outputting the strobe of the register access timing are extracted. For signal lines other than the above, refer to E in FIG.
-Similar to the case of the CPU 301.

【0018】実行範囲検出器102およびメモリアクセ
ス検出器103についても、図6の従来例の場合と全く
同様である。AND演算器105に対する入力は3入力
となっているが、この入力数以外については、図6のA
ND演算器305の機能と全く同様である。レジスタア
クセス検出器104においては、対象となる汎用レジス
タに対する書込みがあった場合には、そのレジスタアク
セスデータが保持されて、MA(15:0)から出力されるアド
レスとの比較が行われて一致検出される。その一致検出
信号はDTC3(0:0) に出力される。
The execution range detector 102 and the memory access detector 103 are exactly the same as in the conventional example of FIG. The number of inputs to the AND operator 105 is three.
The function of the ND calculator 305 is exactly the same. In the register access detector 104, when the target general-purpose register is written, the register access data is held and compared with the address output from MA (15: 0) to match. To be detected. The match detection signal is output to DTC3 (0: 0).

【0019】図2は、図1に示されるレジスタアクセス
検出器104の内部構成を示すブロック図である。図2
において、比較レジスタアドレスレジスタ201は、検
出したいレジスタのレジスタアドレスを保持するレジス
タであり、そのレジスタアドレスの値はC-RA(15:0)に出
力される。レジスタアドレス比較器202においては、
C-RA(15:0)とRA(15:0)の値が比較されて一致検出が行わ
れて、その検出信号はEQRA(0:0) に出力されるが、レジ
スタアドレス一致の検出時においては“H”レベルが出
力され、非検出時においては“L”レベルが出力され
る。また、比較レジスタステータスレジスタ203にお
いては、検出したい汎用レジスタに対するアクセスステ
ータスが保持されている。本実施例においては、汎用レ
ジスタの値の変化(値の書込み)によりレジスタアクセ
スデータが保持されるために、常にWrite(書込み)に
相当するステータス値が保持されている。そして、この
ステータス値はC-RSTS(n:0) に出力される。
FIG. 2 is a block diagram showing an internal configuration of the register access detector 104 shown in FIG. Figure 2
In, the comparison register address register 201 is a register that holds the register address of the register to be detected, and the value of the register address is output to C-RA (15: 0). In the register address comparator 202,
When C-RA (15: 0) and RA (15: 0) values are compared, a match is detected and the detection signal is output to EQRA (0: 0). In, the "H" level is output, and in the non-detection state, the "L" level is output. The comparison register status register 203 holds the access status for the general-purpose register to be detected. In this embodiment, since register access data is held by a change in the value of a general-purpose register (writing of a value), a status value corresponding to Write is always held. Then, this status value is output to C-RSTS (n: 0).

【0020】レジスタステータス比較器204において
は、C-RSTS(n:0) とRSTS(n:0) の値が比較されて、一致
検出が行われる。その検出信号はEQRSTS(0:0) に出力さ
れるが、レジスタステータスの一致検出時には“H”レ
ベルが出力され、非検出時には“L”レベルが出力され
る。AND演算器205においては、EQRA(0:0) とEQRS
TS(0:0) とRDSTB(0:0)の論理積がとられて、比較レジス
タアドレスレジスタ201に設定されているレジスタに
対して、比較レジスタステータスレジスタ203に設定
されたステータスでアクセスされたタイミング(RDSTB
(0:0))が検出される。これにより、上記の三つの信号
が同時に“H”レベルになった時においてのみ、LSTB
(0:0) に“H”レベルが出力される。またレジスタデー
タ保持器206においては、RD(15:0)からのレジスタア
クセスデータが保持されており、LSTB(0:0) が“L”レ
ベルから“H”レベルに遷移する時のエッジをラッチス
トロープとしている。そしてレジスタデータ保持器20
6に保持されている値はLRD(15:0) に出力される。
In the register status comparator 204, the values of C-RSTS (n: 0) and RSTS (n: 0) are compared and the coincidence detection is performed. The detection signal is output to EQRSTS (0: 0). When the register status coincidence is detected, "H" level is output, and when it is not detected, "L" level is output. In the AND operator 205, EQRA (0: 0) and EQRS
The logical product of TS (0: 0) and RDSTB (0: 0) is calculated, and the register set in the comparison register address register 201 is accessed with the status set in the comparison register status register 203. Timing (RDSTB
(0: 0)) is detected. As a result, only when the above three signals become "H" level at the same time, LSTB
"H" level is output to (0: 0). Further, the register data holder 206 holds the register access data from RD (15: 0), and latches the edge when LSTB (0: 0) transits from the “L” level to the “H” level. It is a stroop. And the register data holder 20
The value held in 6 is output to LRD (15: 0).

【0021】オフセットデータレジスタ207において
は、オフセットデータが保持されており、その値はOFSD
(15:0)に出力される。オフセットデータ・レジスタデー
タ加算器208においては、LRD(15:0) とOFSD(15:0)の
値が入力されて加算され、その演算結果はADD(15:0) に
出力される。アドレス比較器209においては、ADD(1
5:0) とMA(15:0)の値が比較されて、その検出信号はDTC
3(0:0) に出力される。このDTC3(0:0) は、一致検出時
においては“H”レベルで出力され、非検出時には
“L”レベルで出力される。
Offset data is held in the offset data register 207, and its value is OFSD.
It is output at (15: 0). In the offset data / register data adder 208, the values of LRD (15: 0) and OFSD (15: 0) are input and added, and the operation result is output to ADD (15: 0). In the address comparator 209, ADD (1
5: 0) and MA (15: 0) are compared and the detection signal is DTC.
It is output at 3 (0: 0). This DTC3 (0: 0) is output at "H" level when a match is detected, and is output at "L" level when no match is detected.

【0022】図3(a)、(b)、(c)、(d)、
(e)、(f)、(g)、(h)、(i)、(j)、
(k)、(l)、(m)、(n)および(o)は、レジ
スタアクセス検出器104の動作を示すタイミング図で
ある。図3において、T1 〜T2の区間においては、RA
(15:0)に0000hが出力され、RSTS(n:0) にWrite が
出力されている。この時点においては、EQRA(0:0) とEQ
RSTS(0:0) は共に比較条件が満たされているために
“H”レベルとなる。T2 の区間においてはRD(15:0)に
8000hが出力され、同時にRDSTB(0:0)が“H”レベ
ルとなる。ここにおいてLSTB(0:0) も“H”レベルとな
り、その時のRD(15:0)がレジスタデータ保持器206に
保持され、また、LRD(15:0) に出力される。そして、こ
の時点において、オフセットデータとの加算結果がADD
(15:0) に出力される。T3 区間においては、MA(15:0)
に8040hが出力され、ここにおいて、比較結果が一
致するためにDTC3(0:0) は“H”レベルとなり、検出終
了となる。
3 (a), (b), (c), (d),
(E), (f), (g), (h), (i), (j),
(K), (l), (m), (n) and (o) are timing charts showing the operation of the register access detector 104. In FIG. 3, in the section from T 1 to T 2 , RA
0000h is output to (15: 0) and Write is output to RSTS (n: 0). At this point, EQRA (0: 0) and EQ
Both RSTS (0: 0) are at “H” level because the comparison conditions are satisfied. In the period of T 2 , 8000h is output to RD (15: 0), and RDSTB (0: 0) becomes "H" level at the same time. Here, LSTB (0: 0) also becomes "H" level, RD (15: 0) at that time is held in the register data holder 206, and is also output to LRD (15: 0). At this point, the result of addition with the offset data is ADD.
It is output at (15: 0). MA (15: 0) in section T 3
8040h is output to the DTC3 (0: 0), the DTC3 (0: 0) becomes the "H" level and the detection is completed.

【0023】次に、指定範囲内実行中における基底レジ
スタ+オフセットで表わされたアドレスに対するメモリ
アクアセス検出について、図5に示されるプログラム例
と、図6(a)、(b)、(c)、(d)、(e)、
(f)、(g)、(h)、(i)、(j)、(k)、
(l)、(m)、(n)、(o)、(p)、(q)、
(r)、(s)、(t)、(u)、(v)、(w)およ
び(x)の動作を示すタイミング図とを参照して説明す
る。
Next, regarding the memory access detection for the address represented by the base register + offset during execution within the specified range, the program example shown in FIG. 5 and FIGS. 6 (a), 6 (b), and 6 (c) are shown. ), (D), (e),
(F), (g), (h), (i), (j), (k),
(L), (m), (n), (o), (p), (q),
It will be described with reference to the timing charts showing the operations of (r), (s), (t), (u), (v), (w) and (x).

【0024】図4において、1000は、1000h番
地を表わしており、sp(スタックポインタ)レジスタの
値をbpレジスタに書込むための命令である。1001は
1001h番地を表わしており、bpレジスタの値とオフ
セット値10h により表わされるアドレスにデータFFh
を書込むための命令である。1002は、100h番地
を表わしており、F010h番地にデータFFhを書込
むための命令である。1003は、1003h番地を表
わしており、サブルーチンsub3の呼出し元に復帰するリ
ターン命令である。検出条件は、1000h番地から1
100h番地の範囲を実行中に、bp+10hにて表わされる
アドレスに対するFFhの書込みを検出するものとす
る。
In FIG. 4, 1000 represents the address 1000h, which is an instruction for writing the value of the sp (stack pointer) register into the bp register. 1001 represents the address 1001h, and data FFh is stored in the address represented by the value of the bp register and the offset value 10h.
Is a command to write. Reference numeral 1002 represents address 100h, which is an instruction for writing data FFh at address F010h. Reference numeral 1003 represents the address 1003h, which is a return instruction for returning to the calling source of the subroutine sub3. The detection condition is 1 from 1000h
It is assumed that FFh writing to the address represented by bp + 10h is detected during execution of the range of 100h.

【0025】上記の条件が各レジスタに設定されると、
それぞれC-MA1(15:0) は1100h、C-MA2(15:0) は1
000h、C-MSTS1(n:0)はFetch 、C-MD(7:0) はFF
h、C-MSTS2(n:0)はWrite 、C-RA(15:0)はbpレジスタの
レジスタアドレス、C-RSTS(h:0) はWrite 、OFSD(15:0)
は0010h、MSKD(15:0)はFFFFhとなる。ここに
おいて、C-MA3(15:0) は全てのビットがマスクされるた
めに、どのような値でもよく、ここにおいてはFFFF
hとしておくものとする。図5のタイミング図において
は、上記の値は全て固定値となるために、全区間におい
てその値が変動することはない。
When the above conditions are set in each register,
C-MA1 (15: 0) is 1100h and C-MA2 (15: 0) is 1 respectively.
000h, C-MSTS1 (n: 0) is Fetch, C-MD (7: 0) is FF
h, C-MSTS2 (n: 0) is Write, C-RA (15: 0) is the register address of bp register, C-RSTS (h: 0) is Write, OFSD (15: 0)
Is 0010h and MSKD (15: 0) is FFFFh. Here, C-MA3 (15: 0) may have any value because all bits are masked. In this case, FFFF
It is assumed to be h. In the timing chart of FIG. 5, since all the above values are fixed values, the values do not change in all sections.

【0026】T1 〜T2 の区間においては、図4の10
00番地の命令がフェッチされる。T2 の区間において
MDSTB(0:0)が“H”レベルとなるために、ここにおいて
は、実行範囲検出器102の条件が成立してDTC1(0:0)
は“H”レベルとなり、その値が保持される。T3 〜T
4 の区間においては、sp(スタックポインタ)レジスタ
の値が読出されている。RDSTB(0:0)が“H”レベルにな
るT4 区間においては、実際の読出しが行われている。
5 〜T6 の区間においては、先に読出されたspレジス
タの値が、bpレジスタに書込まれている。RDSTB(0:0)が
“H”レベルとなるT6 区間においては、実際の書込み
が行われる。ここにおいて、レジスタアクセス検出器1
04のレジスタデータ保持器206に書込まれたデータ
RD(15:0)は、レジスタデータ保持器206に保持される
と同時に、LRD(14:0) として出力され、オフセットデー
タ・レジスタデータ加算器208において、オフセット
データレジスタ207より出力されるオフセットデータ
OFSD(15:0)と加算されて、加算結果としてADD(15:0) が
出力される。
In the section from T 1 to T 2 , 10 in FIG.
The instruction at address 00 is fetched. In the section of T 2
Since MDSTB (0: 0) becomes “H” level, the condition of the execution range detector 102 is satisfied here, and DTC1 (0: 0)
Becomes "H" level and its value is held. T 3 ~ T
In the section of 4 , the value of the sp (stack pointer) register is read. In the T 4 section where RDSTB (0: 0) becomes “H” level, actual reading is performed.
In T 5 through T 6 section, the value of the sp register read out earlier, is written to the bp register. Actual writing is performed in the T 6 section where RDSTB (0: 0) is at “H” level. Here, the register access detector 1
Data written in register data holder 206 of 04
RD (15: 0) is held in the register data holder 206, and at the same time, is output as LRD (14: 0), and the offset data output from the offset data register 207 in the offset data / register data adder 208.
This is added to OFSD (15: 0) and ADD (15: 0) is output as the addition result.

【0027】T7 〜T8 の区間においては、100h番
地の命令がフェッチされている。この場合、DTC1(0:0)
の状態は“H”レベルのままである。T9 〜T10の区間
においては、1001番地の命令のbp+10hの演算におい
て用いられるbpレジスタの値が読出されている。T11
12の区間においては、1001h番地の命令の実際の
動作(メモリへの書込み)が行われている。この時、bp
レジスタの値はF000hであり、プログラム中のオフ
セットデータは10h である。従って、この時点において
は、F010h番地に対するデータ書込みが行われてい
る。また、この時のE−CPU101より出力されるMA
(15:0)の値は、レジスタアドレス検出器104の比較器
209の条件に一致するため、アドレス比較器209よ
り出力されるDTC3(0:0) は“H”レベルとなる。
In the section from T 7 to T 8 , the instruction at address 100h is fetched. In this case, DTC1 (0: 0)
State remains at the "H" level. In the section from T 9 to T 10 , the value of the bp register used in the calculation of bp + 10h of the instruction at address 1001 is read. T 11 ~
In the section of T 12 , the actual operation (writing to the memory) of the instruction at address 1001h is performed. At this time, bp
The register value is F000h, and the offset data in the program is 10h. Therefore, at this time point, data writing to the address F010h is being performed. Also, the MA output from the E-CPU 101 at this time
Since the value of (15: 0) matches the condition of the comparator 209 of the register address detector 104, the DTC3 (0: 0) output from the address comparator 209 becomes "H" level.

【0028】T12の区間においては、MDSTB(0:0)が
“H”レベルとなるために、メモリアクセス検出器10
3の出力DTC2(0:0) は“H”レベルとなり、この時に
は、DTC1(0:0) 、DTC2(0:0) およびDTC3(0:0) が全て
“H”レベルとなるため、図1のAND演算器105よ
り出力されるEVOUT(0:0)は“H”レベルとして出力さ
れ、検出条件が満たされていることが示される。T13
14の区間においては、1002h番地の命令がフェッ
チされている。この区間においては、DTC1(0:0) の状態
は“H”レベルのままである。T15〜T16の区間におい
ては、1002h番地の命令の実際の動作(メモリへの
書込み)が行われる。この場合、メモリアクセスを行う
アドレスはプログラム中に直接記述されているが、bp+1
0hで表わされるアドレスと等しいために、1001h番
地の命令実行時(T11〜T12)と同じように、EVCUT(0:
0)が“H”レベルとなり、検出条件が満たされているこ
とが示される。
In the period of T 12 , MDSTB (0: 0) becomes “H” level, so the memory access detector 10
3 output DTC2 (0: 0) becomes "H" level. At this time, DTC1 (0: 0), DTC2 (0: 0) and DTC3 (0: 0) are all "H" level. EVOUT (0: 0) output from the AND calculator 105 of 1 is output as “H” level, which indicates that the detection condition is satisfied. T 13 ~
In the section of T 14 , the instruction at address 1002h is fetched. In this section, the state of DTC1 (0: 0) remains at "H" level. In the section of the T 15 through T 16, the actual operation of the instruction of 1002h address (writing to the memory) is carried out. In this case, the memory access address is written directly in the program, but bp + 1
Since it is equal to the address represented by 0h, the EVCUT (0: is similar to that at the time of executing the instruction at address 1001h (T 11 to T 12 ).
0) becomes “H” level, which indicates that the detection condition is satisfied.

【0029】[0029]

【発明の効果】以上説明したように、本発明は、C言語
により記述されているプログラムのローカル変数のよう
な基底レジスタとオフセット値の演算式により表現され
た動的データアドレスに対するリアルタイムのメモリア
クセス検出が可能になるという効果がある。
As described above, according to the present invention, a real-time memory access to a dynamic data address represented by an arithmetic expression of a base register and an offset value such as a local variable of a program written in C language is performed. This has the effect of enabling detection.

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

【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】前記実施例のレジスタアクセス検出器を示すブ
ロック図である。
FIG. 2 is a block diagram showing a register access detector of the embodiment.

【図3】前記レジスタアクセス検出器の動作を示すタイ
ミング図である。
FIG. 3 is a timing diagram showing an operation of the register access detector.

【図4】動的データアドレスに対するメモリアクセス命
令を含むプログラム例を示す図である。
FIG. 4 is a diagram showing an example of a program including a memory access instruction for a dynamic data address.

【図5】前記レジスタアクセス検出器と従来の実行範囲
検出器およびメモリアクセス検出器を組合わせた場合の
動作を示すタイミング図である。
FIG. 5 is a timing diagram showing an operation when the register access detector is combined with the conventional execution range detector and memory access detector.

【図6】従来例を示すブロック図である。FIG. 6 is a block diagram showing a conventional example.

【図7】前記従来例の実行範囲検出器を示すブロック図
である。
FIG. 7 is a block diagram showing an execution range detector of the conventional example.

【図8】前記従来例のメモリアクセス検出器を示すブロ
ック図である。
FIG. 8 is a block diagram showing a memory access detector of the conventional example.

【図9】前記従来例の実行範囲検出器の動作を示すタイ
ミング図である。
FIG. 9 is a timing chart showing an operation of the execution range detector of the conventional example.

【図10】前記従来例のメモリアクセス検出器の動作を
示すタイミング図である。
FIG. 10 is a timing chart showing an operation of the conventional memory access detector.

【図11】前記従来例のメモリアクセス検出器の動作を
示すタイミング図である。
FIG. 11 is a timing diagram showing an operation of the conventional memory access detector.

【図12】静的データアドレスに対するメモリアクセス
命令を含むプログラム例を示す図である。
FIG. 12 is a diagram showing a program example including a memory access instruction for a static data address.

【図13】前記従来例の実行範囲検出器とメモリアクセ
ス検出器を組合わせた場合の動作を示すタイミング図で
ある。
FIG. 13 is a timing chart showing an operation when the execution range detector and the memory access detector of the conventional example are combined.

【符号の説明】[Explanation of symbols]

101、301 E−CPU 102 実行範囲検出器 103 メモリアクセス検出器 104 レジスタアクセス検出器 105、205、305、405、408、508
AND演算器 201 比較レジスタアドレスレジスタ 202 レジスタアドレス比較器 203 比較レジスタステータスレジスタ 204 レジスタステータス比較器 206 レジスタデータ保持器 207 オフセットデータレジスタ 208 オフセットデータ・レジスタデータ加算器 209、506 アドレス比較器 401 比較上限アドレスレジスタ 402 上限アドレス比較器 403 比較下限アドレスレジスタ 404 下限アドレス比較器 406 比較ステータスレジスタ 407、504 ステータス比較器 409 実行範囲比較結果保持器 501 比較データレジスタ 502 データ比較器 503 比較ステータスレジスタ 505 比較アドレスレジスタ 507 マスクデータレジスタ
101, 301 E-CPU 102 execution range detector 103 memory access detector 104 register access detector 105, 205, 305, 405, 408, 508
AND operator 201 Comparison register address register 202 Register address comparator 203 Comparison register status register 204 Register status comparator 206 Register data holder 207 Offset data register 208 Offset data register data adder 209, 506 Address comparator 401 Comparison upper limit address Register 402 Upper limit address comparator 403 Comparison lower limit address register 404 Lower limit address comparator 406 Comparison status register 407, 504 Status comparator 409 Execution range comparison result holder 501 Comparison data register 502 Data comparator 503 Comparison status register 505 Comparison address register 507 Mask data register

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 プログラム開発用として、メモリアクセ
ス検出機能を有する開発支援装置において、 プログラム開発支援用として機能するエミュレーション
CPUと、 前記エミュレーションCPUより、メモリアクセス時に
出力されるメモリアドレスおよびステータスの各値と、
当該メモリアクセスのタイミングを示すストローブとを
入力して、現在実行中のメモリアドレスが指定されたメ
モリアドレスの範囲内にあるか否かの検出を行う実行範
囲検出器と、 前記エミュレーションCPUより、メモリアクセス時に
出力されるメモリアドレス、ステータスおよびメモリア
クセスデータの各値と、当該メモリアクセスのタイミン
グを示すストローブとを入力して、指定されたメモリア
ドレスに対応するメモリアクセスの検出を行うメモリア
クセス検出器と、 前記エミュレーションCPUより、メモリアクセス時に
出力されるメモリアドレスの値と、レジスタアクセス時
に出力されるレジスタアドレス、ステータスおよびレジ
スタアクセスデータの各値と、当該レジスタアクセスの
タイミングを示すストローブとを入力して、対象とする
汎用レジスタに対する書込みが行われた場合に、当該レ
ジスタアクセスデータを保持して前記メモリアドレスの
値との一致検出を行うレジスタアクセス検出器と、 を少くともイベント検出手段として備えることを特徴と
する開発支援装置。
1. In a development support device having a memory access detection function for program development, an emulation CPU that functions as program development support, and memory address and status values output from the emulation CPU during memory access. When,
An execution range detector for inputting a strobe indicating the timing of the memory access and detecting whether or not the memory address currently being executed is within a specified memory address range; A memory access detector that detects the memory access corresponding to the specified memory address by inputting each value of the memory address, status, and memory access data output at the time of access and a strobe indicating the timing of the memory access. From the emulation CPU, a memory address value output at memory access, register address, status and register access data values output at register access, and a strobe indicating the timing of the register access are input. A register access detector that holds the register access data and detects a match with the value of the memory address when writing is performed to the target general-purpose register, and at least as a event detecting means. Characteristic development support device.
【請求項2】 前記レジスタアクセス検出器が、 アクセスの検出を行いたい汎用レジスタのアドレスを保
持する比較レジスタアドレスレジスタと、 前記比較レジスタアドレスレジスタに保持されるレジス
タアドレスと前記エミュレーションCPUより出力され
るレジスタアドレスとを比較して一致検出を行うレジス
タアドレス比較器と、 比較対象とするレジスタステータスを保持する比較レジ
スタステータスレジスタと、 前記比較レジスタステータスレジスタに保持されている
比較レジスタステータスと前記エミュレーションCPU
より出力されるレジスタステータスとを比較して一致検
出を行うレジスタステータス比較器と、 前記レジスタアドレス比較器の出力と、前記レジスタス
テータス比較器の出力と、前記エミュレーションCPU
より出力されるレジスタアクセスのタイミングを示すス
トローブとを含む3出力の論理積をとるAND演算器
と、 前記AND演算器の出力をラッチストローブとして、前
記エミュレーションCPUより出力されるレジスタデー
タを保持するレジスタデータ保持器と、 所定のオフセットデータを保持するためのオフセットデ
ータレジスタと、 前記レジスタデータ保持器のレジスタ保持用ラッチの値
と前記オフセットレジスタの値を加算するオフセットデ
ータ・レジスタデータ加算器と、 前記オフセットデータ・レジスタデータ加算器の加算演
算結果と、前記エミュレーションCPUより出力される
メモリアドレスとを比較して一致検出を行うアドレス比
較器と、 を備えて構成される請求項1記載の開発支援装置。
2. The register access detector, a comparison register address register holding an address of a general-purpose register for which access detection is desired, a register address held in the comparison register address register, and output from the emulation CPU. A register address comparator that compares a register address to detect a match, a comparison register status register that holds a register status to be compared, a comparison register status that is held in the comparison register status register, and the emulation CPU
Output from the register address comparator, output from the register status comparator, and the emulation CPU
AND operation unit for taking a logical product of three outputs including a strobe indicating the timing of register access outputted by the AND unit, and a register for holding the register data output from the emulation CPU using the output of the AND operation unit as a latch strobe. A data holder, an offset data register for holding predetermined offset data, an offset data / register data adder for adding the value of the register holding latch of the register data holder and the value of the offset register, 2. The development support apparatus according to claim 1, further comprising: an address comparator that compares the addition operation result of the offset data / register data adder with a memory address output from the emulation CPU to detect a match. .
JP5000444A 1993-01-06 1993-01-06 Development support device Withdrawn JPH06202904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5000444A JPH06202904A (en) 1993-01-06 1993-01-06 Development support device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5000444A JPH06202904A (en) 1993-01-06 1993-01-06 Development support device

Publications (1)

Publication Number Publication Date
JPH06202904A true JPH06202904A (en) 1994-07-22

Family

ID=11473973

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5000444A Withdrawn JPH06202904A (en) 1993-01-06 1993-01-06 Development support device

Country Status (1)

Country Link
JP (1) JPH06202904A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11203166A (en) * 1998-01-19 1999-07-30 Nec Corp Stack pointer tracing device and its method, and recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11203166A (en) * 1998-01-19 1999-07-30 Nec Corp Stack pointer tracing device and its method, and recording medium

Similar Documents

Publication Publication Date Title
US5359608A (en) Apparatus for activation and deactivation of instruction tracing through use of conditional trace field in branch instructions
US4794522A (en) Method for detecting modified object code in an emulator
US7010672B2 (en) Digital processor with programmable breakpoint/watchpoint trigger generation circuit
NO843895L (en) LOGIC CIRCUIT FOR AA PAUSED INTERRUPTION POINTS IN THE DATA PROCESSING UNIT
CN100444127C (en) System and method for testing software
KR960705271A (en) Execution of data processing instructions (EXECUTION OF DATA PROCESSING INSTRUCTIONS)
US9176821B2 (en) Watchpoint support system for functional simulator
US6052801A (en) Method and apparatus for providing breakpoints on a selectable address range
CN111796578A (en) Vehicle controller testing method, device and system and storage medium
EP0455946A2 (en) System for debugging shared memory multiprocessor computers
EP0638864A1 (en) Development support system for microcomputer with internal cache
US4748556A (en) Variable tracking word recognizer for detecting the occurrence of a dynamic-variable address
JPH06202904A (en) Development support device
CN111581101A (en) Software model testing method, device, equipment and medium
US5185882A (en) Bit-slice microprocessor test system
US5390323A (en) Microstore reference logging
KR940007675A (en) Data Processor and Debug Device Using It
CN110701948B (en) Method for improving real-time debugging efficiency of follow-up system
JPH02220145A (en) Program tracing system
JP3118802B2 (en) Debug circuit using branch history table
JPH0748183B2 (en) Trace circuit
JPH02148339A (en) Tracer control circuit
EP0376255A2 (en) Method and apparatus for controlling branching
JPH05224989A (en) Microprocessor containing cache memory and its trace analyzer
KR20000045665A (en) Interrupt generation circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000307