JPH0398131A - 2-byte instruction injection circuit - Google Patents

2-byte instruction injection circuit

Info

Publication number
JPH0398131A
JPH0398131A JP1235288A JP23528889A JPH0398131A JP H0398131 A JPH0398131 A JP H0398131A JP 1235288 A JP1235288 A JP 1235288A JP 23528889 A JP23528889 A JP 23528889A JP H0398131 A JPH0398131 A JP H0398131A
Authority
JP
Japan
Prior art keywords
instruction
byte
address
injection
microprocessor
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.)
Granted
Application number
JP1235288A
Other languages
Japanese (ja)
Other versions
JP2772982B2 (en
Inventor
Kenichiro Kuno
久野 賢一郎
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP1235288A priority Critical patent/JP2772982B2/en
Publication of JPH0398131A publication Critical patent/JPH0398131A/en
Application granted granted Critical
Publication of JP2772982B2 publication Critical patent/JP2772982B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To inject an instruction code of optional 2-byte length via a designated address without affecting the operation of a microprocessor by using a specific instruction injecting mechanism. CONSTITUTION:An address coincidence detection circuit 3 detects a bus cycle and a byte position where the instruction code of a designated address are fetched by a microprocessor 1 and produces an instruction injection request signal. At the same time, a swap request latch 4 holding an instruction injection request produces an instruction injection request signal of the second byte at the byte position of the next address following the designated address. The L-byte and H-byte instruction injection means 6 and 8 transmit properly the instruction codes to the data buses 14L and 14H based on the output signals of the circuit 3 and the latch 4 respectively. A circuit consisting of an adder circuit 10, an address latch 11, and a converter 12 detects a case where the instruction code fetching cycles are not identical with continuous addresses and cancels the held instruction injection request signal of the second byte. As a result, a debugging proper instruction code of 2-byte length can be injected with no influence given to the action sequence of the microprocessor.

Description

【発明の詳細な説明】 く産業上の利用分野〉 本発明は、インサーキットエミュレータのデバッグ用命
令注入回路の機能向上に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to improving the functionality of an instruction injection circuit for debugging an in-circuit emulator.

く従来の技術〉 インサーキットエミュレータには、一般にブレーク機能
が備えられており、予め設定したアドレスの命令を中央
処理装置(CPU)がフェッチするバスサイクルで強制
的に固有バスサイクルを生じるような命令(多くの場合
、割り込み命令が用いられる)に置き換えることによっ
て、プレーク処理の起動を行なっている。命令を置き換
える方法としては、専用のハードウェアを用意して設定
アドレスと一致するバスサイクルを検出し、そのバスサ
イクルでデータバスを切り替え、ブレーク用の命令コー
ドを強制フェッチさせる方法と、ランダムアクセスメモ
リ(RAM)上の命令コードを直接書き換えてしまう方
法とがある。
(Prior art) In-circuit emulators are generally equipped with a break function, which allows the central processing unit (CPU) to forcibly generate a unique bus cycle in the bus cycle in which the central processing unit (CPU) fetches an instruction at a preset address. (In many cases, an interrupt instruction is used) to start the break process. There are two methods for replacing instructions: preparing dedicated hardware, detecting a bus cycle that matches the set address, switching the data bus in that bus cycle, and forcibly fetching the break instruction code; and one method using random access memory. There is a method of directly rewriting the instruction code on (RAM).

く発明がH決しようとする課題〉 しかしながら、前者の方法では、CPUによっては置き
換える命令コードが1バイト命令に限定されてしまうこ
と、後者の方法では命令バイト数の制限はないが、設定
アドレスの命令がRAM上に存花するという前提条件を
必要とするという問題があった。
Problems to be Solved by the Invention> However, with the former method, the instruction code to be replaced is limited to a 1-byte instruction depending on the CPU, and with the latter method, there is no limit to the number of instruction bytes, but the setting address There was a problem in that it required a precondition that the instructions existed in the RAM.

実際に、インテル社製の8086等のCPUの場合、2
バイト命令が2つのバスサイクルにまたがる場合がある
ため、通常ブレーク用命令としては1バイト命令しか用
いられない制約があった。
In fact, in the case of CPUs such as Intel's 8086, 2
Since a byte instruction may span two bus cycles, there is a restriction that only a 1-byte instruction can normally be used as a break instruction.

なお、最近ではブレーク機能に限らず、命令の置き換え
によって実行トリガ検出やタスクブレークを実現しよう
とする試みもあるが、置き換える命令コードが1バイト
に限定される場合、その機能が著しく制限されるなどの
難点がある。
Recently, there have been attempts to detect execution triggers and task breaks by replacing instructions in addition to the break function, but if the instruction code to be replaced is limited to 1 byte, the functionality is severely limited. There are some drawbacks.

本発明は、このような点に鑑みてなされたもので、その
目的は、専用ハードウェアで実現する命令注入機能にお
いて、2バイト命令の注入を可能とし、設定するアドレ
スによって命令フェッチバスサイクルが連続する2つの
バスサイクルにまたがるような場合でも、また2バイト
が同一ワードとして1バスサイクルでフェッチされる場
合でも、CPUの動作に影響を与えることのなく2バイ
ト命令を注入することのできる命令注入口路を提供する
ことにある。
The present invention has been made in view of the above points, and its purpose is to enable the injection of 2-byte instructions in the instruction injection function realized by dedicated hardware, and to enable continuous instruction fetch bus cycles depending on the address to be set. An instruction note that allows you to inject a 2-byte instruction without affecting CPU operation, even when the instruction spans two bus cycles, or when 2 bytes are fetched as the same word in one bus cycle. The purpose is to provide an entrance route.

く課題を解決するための手段〉 このような目的を達成するための本発明は、インサーキ
ットエミュレータにおいて、指定じたアドレスパターン
と対象とするマイクロプロセッサのアドレスバス上のア
ドレスとがー敢したときにマイクロプロセッサのデータ
バス幅をバイト単位に分割したときのバイト位置別に命
令注入要求信号を出力するアドレス一致検出回路と、 マイクロプロセッサのステータス信号を基にして命令コ
ードフェッチサイクルのリードタイミングを示す信号を
生或するステータスデコーダと、前記アドレス一致検出
回路の出力の内で次の命令コードフェッチサイクルに継
続して命令注入が必要となる場合に命令注入要求を保持
するラッチと、 アダー回路とラッチとコンパレー夕とで構成され、継続
する命令注入サイクルでマイクロプロセッサが分岐命令
を実行してフェッチアドレスが不連続となった場合に命
令注入を禁止する手段と、前記命令注入タイミングにマ
ルチプレクサで選択される2バイト命令の1バイト[1
あるいは2バイト目のいずれかの命令コードをデータバ
ス上に出力する命令注入手段と、 前記命令注入タイミングでデータバス上に出力された本
来の命令コードのフェッチを禁止するためのバッファ手
段とを具備したことを特徴とする。
Means for Solving the Problems> The present invention aims to achieve the above objects by using an in-circuit emulator that uses a specified address pattern and an address on the target microprocessor's address bus when An address match detection circuit that outputs an instruction injection request signal for each byte position when the microprocessor's data bus width is divided into bytes, and a signal that indicates the read timing of the instruction code fetch cycle based on the microprocessor's status signal. a status decoder that generates a status decoder; a latch that holds an instruction injection request when instruction injection is required in the next instruction code fetch cycle among the outputs of the address match detection circuit; an adder circuit and a latch; a comparator, means for inhibiting instruction injection when the microprocessor executes a branch instruction in a continuing instruction injection cycle and fetch addresses become discontinuous, and a means for inhibiting instruction injection when the instruction injection timing is selected by a multiplexer. 1 byte of a 2-byte instruction [1
Alternatively, it includes an instruction injection means for outputting any instruction code of the second byte onto the data bus, and a buffer means for inhibiting fetching of the original instruction code output on the data bus at the instruction injection timing. It is characterized by what it did.

く作用〉 アドレス一致検出回路は、予め指定したアドレスの命令
コードがマイクロプロセッサによりフエッチされるバス
サイクルとバイト位置を検出し命令注入要求信号を生成
する。
Function> The address coincidence detection circuit detects the bus cycle and byte position in which the instruction code at a pre-specified address is fetched by the microprocessor, and generates an instruction injection request signal.

また、命令注入要求を保持するラッチ(スワップ要求ラ
ッチ)により、指定アドレスに連続した次のアドレスの
バイト位置に2バイト目の命令注入要求信号を生成する
Furthermore, a latch (swap request latch) that holds an instruction injection request generates a second byte instruction injection request signal at the byte position of the next address following the specified address.

命令注入手段はアドレス一致検出回路およびスワップ要
求ラッチの出力信号に基づきデータバスに適宜命令コー
ドを送出する。
The instruction injection means sends an appropriate instruction code to the data bus based on the output signals of the address coincidence detection circuit and the swap request latch.

アダー回路,アドレスラッチ,コンバータから構成され
る回路では、分岐命令などにより命令コードフェッチサ
イクルが連続したアドレスとならなかった場合を検知し
て、保持している2バイト目の命令注入要求信号を解除
する。このようにして、本来フェッチされるべき命令コ
ードの代わりに固定の命令コードを命令注入手段を介し
て強制的にフェッチさせる。
A circuit consisting of an adder circuit, an address latch, and a converter detects when instruction code fetch cycles do not reach consecutive addresses due to branch instructions, etc., and releases the held second byte instruction injection request signal. do. In this way, the fixed instruction code is forced to be fetched via the instruction injection means instead of the instruction code that should originally be fetched.

これにより、マイクロプロセッサの動作シーケンスに影
響を与えることなく2バイト長のデバッグ用固有命令コ
ードの注入が可能となる。
This makes it possible to inject a 2-byte long debug specific instruction code without affecting the operation sequence of the microprocessor.

く実施例〉 以下図面を参照して本発明を詳細に説明する。Example The present invention will be described in detail below with reference to the drawings.

第1図は本発明に係る2バイト命令命令注入回路の一実
施例を示す構成図である。図において、1はマイクロプ
ロセッサで、ここでは16ビットのマイクロプロセッサ
を対象とする。2はステータスデコーダで、マイクロプ
ロセッサ1のステータス信号を基にして命令コードフェ
ッチサイクルのリードタイミングを示す信号FETCH
を生成する。
FIG. 1 is a block diagram showing an embodiment of a 2-byte instruction injection circuit according to the present invention. In the figure, 1 is a microprocessor, and here a 16-bit microprocessor is targeted. 2 is a status decoder which outputs a signal FETCH indicating the read timing of the instruction code fetch cycle based on the status signal of the microprocessor 1.
generate.

3はアドレス一致検出回路で、指定したアドレスパター
ンと対象とするマイクロプロセッサのアドレスバス上の
アドレスとが一致したときにマイクロプロセッサ1のデ
ータバス幅をバイト軍位に分割したときのバイト位置別
に命令注入要求信号を出力するもので、BHHITとB
LHI Tのバイト別の2種類のHIT信号を出力する
。これらのHIT信号は、それぞれ16ビット単位でア
クセスされる命令コードの上位アドレス側での一致の場
合にはBHBITを、下位アドレス側での一致の場合に
はBLHITが出力される。
3 is an address match detection circuit which, when the specified address pattern and the address on the target microprocessor's address bus match, sends instructions for each byte position when the data bus width of microprocessor 1 is divided into byte positions. It outputs the injection request signal, and BHHIT and B
Outputs two types of HIT signals for each byte of LHIT. For these HIT signals, BHBIT is output when there is a match on the upper address side of the instruction codes accessed in units of 16 bits, and BLHIT is output when there is a match on the lower address side.

4はスワップ(SWAP)要求ラッチで、フエッチ信号
FETCHによりアドレス一致検出回路3のBHHIT
をラッチする。これはアドレスー致検出回路3の出力の
内で次の命令コードフェッチサイクルに継続して命令注
入が必要となる場合に命令注入要求を保持するものであ
る。
4 is a swap (SWAP) request latch, and BHHIT of the address match detection circuit 3 is activated by the fetch signal FETCH.
Latch. This is used to hold an instruction injection request in the output of the address match detection circuit 3 when instruction injection is required to continue in the next instruction code fetch cycle.

10はアダー回路で、アドレスバス13上のアドレスを
インクリメントして出力するものである。
10 is an adder circuit that increments the address on the address bus 13 and outputs the incremented address.

11はアダー回路10の出力をフェッチFETCH信号
によりラッチするアドレスラッチ、12はアドレスラッ
チ11の出力とアドレスバス13上のアドレスとを比較
するコンバレータで、一致した場合には出力信号EQが
HIGHとなる。
11 is an address latch that latches the output of the adder circuit 10 using the fetch FETCH signal, and 12 is a comparator that compares the output of the address latch 11 with the address on the address bus 13. If they match, the output signal EQ becomes HIGH. .

なお、アダー回路10、アドレスラッチ11およびコン
パレータ12からなる部分は、継続する命令注入サイク
ルでマイクロプロセッサ1が分岐命令を実行してフェッ
チアドレスが不連続となった場合に命令注入を禁止する
手段である。
The portion consisting of the adder circuit 10, address latch 11, and comparator 12 is a means for prohibiting instruction injection when the microprocessor 1 executes a branch instruction and the fetch address becomes discontinuous in a continuing instruction injection cycle. be.

5はアンドゲートで、前記スワップ要求ラッチ4の出力
とコンバレータ12の出力のアンドをとる。
5 is an AND gate which ANDs the output of the swap request latch 4 and the output of the comparator 12.

6と8は命令注入手段で、6の方はLバイト命令注入回
路、8の方はHバイト命令注入同路であり、命令注入タ
イミングにマルチプレクサで選択される2バイト命令の
1バイト目あるいは2バイト目のいずれかの命令コード
をデータバス14H.14L上に適宜に出力することが
できるように構成されている。
6 and 8 are instruction injection means, 6 is an L-byte instruction injection circuit, and 8 is an H-byte instruction injection circuit. The instruction code of the byte is sent to the data bus 14H. 14L so that it can be output as appropriate.

特にLバイト命令注入回路6の構或について説明すれば
、オアゲート61でアドレス一致検出回路3のBLHI
T信号とアンドゲート5の出力のオアをとり、FETC
Hの期間にオアゲー161の出力がアクティブであった
場合にはスワップ信号SWAPをアクティブにする。マ
ルチプレクサ65はアンドゲート5の出力により制御さ
れ、命令コードレジスタ63.64のいずれか一方を選
択出力する。3ステートバッファ66は、スワップ信号
SWAPがアクティブのときイネーブルとなり、マルチ
ブレクサ65で選択された命令コードをデータバス14
L上に出力する。
In particular, to explain the structure of the L byte instruction injection circuit 6, the OR gate 61 inputs the BLHI of the address match detection circuit 3.
OR the T signal and the output of AND gate 5, FETC
If the output of the OR game 161 is active during the H period, the swap signal SWAP is activated. The multiplexer 65 is controlled by the output of the AND gate 5, and selectively outputs one of the instruction code registers 63 and 64. The 3-state buffer 66 is enabled when the swap signal SWAP is active, and transfers the instruction code selected by the multiplexer 65 to the data bus 14.
Output on L.

7および9はそれぞれデータバス14L.14Hに設け
られた双方向バッファで、双方向バッファ7はLバイト
命令注入回路6のSWAP信号により制御され、双方向
バッファ9はHバイト命令注入同路8のSWAP信号に
より制御される。
7 and 9 are data buses 14L. The bidirectional buffer 7 is controlled by the SWAP signal of the L-byte instruction injection circuit 6, and the bidirectional buffer 9 is controlled by the SWAP signal of the H-byte instruction injection circuit 8.

このような構戊における動作を第2図のタイムチャート
を参照して次に説明する。なお、タイムチャートは次の
3つのケースにおける各部の波形等を示している。
The operation in such a structure will be explained below with reference to the time chart of FIG. Note that the time chart shows waveforms of each part in the following three cases.

ケース■は、アドレス一致検出が16ビットデータの下
位側アドレスで検出された場合で、2バイト命令注入は
同じバスサイクル中で行なわれる。
Case (2) is a case where address coincidence is detected at the lower address of 16-bit data, and the 2-byte instruction injection is performed in the same bus cycle.

ケース■は、アドレス一致検出が上位側アドレスで検出
された場合で、2バイト目の命令注入は次の命令フェッ
チサイクルまで延期される。
Case (2) is a case where address matching is detected at the upper address, and instruction injection of the second byte is postponed until the next instruction fetch cycle.

ケース■は、ケース■で2バイト目の命令注入サイクル
にてプログラムの分岐のためのアドレス不一致が生じ、
命令注入を禁止した場合である。
In case ■, an address mismatch occurs for a program branch in the second byte instruction injection cycle.
This is a case where instruction injection is prohibited.

さて、マイクロプロセッサ1から出力される各種のステ
ータス信号はステータスデコーダ2に人力され、マイク
ロプロセッサ1が命令コードをフェッチするバスサイク
ルでリードタイミングを示すFETCH信号を生成する
。アドレス一致検出回路3は予め設定されたアドレスが
アドレスバス13上に現われたときにBIT信号を出力
する。
Now, various status signals outputted from the microprocessor 1 are input to the status decoder 2, which generates a FETCH signal indicating read timing in a bus cycle in which the microprocessor 1 fetches an instruction code. Address match detection circuit 3 outputs a BIT signal when a preset address appears on address bus 13.

下位アドレス側(偶数アドレス)の一致を示す信号BL
HITはLバイト命令注入回路6およびHバイト命令注
入回路8に命令注入要求信号として入力され、それぞれ
Lバイト側データバス14Lに1バイト目の命令コード
(CODE#1)注入を要求するSWPREQL#1と
、Hバイト側データバス14Hに2バイト目の命令コー
ド(CoDE#2)注入を要求するSWPREQH#2
信号となる。
Signal BL indicating a match on the lower address side (even address)
HIT is input as an instruction injection request signal to the L-byte instruction injection circuit 6 and the H-byte instruction injection circuit 8, and SWPREQL#1 requests injection of the first byte instruction code (CODE#1) to the L-byte side data bus 14L, respectively. and SWPREQH#2, which requests injection of the second byte instruction code (CoDE#2) to the H-byte side data bus 14H.
It becomes a signal.

命令注入回路6では、SWPREQ#1/#2いずれか
の要求信号が与えられたときに、前記FETCH信号の
期間、命令コード注入ボートである3ステートバッファ
66をイネーブルとし、マルチプレクサ65で選択され
る1バイト目あるいは2バイト目のいずれかの命令コー
ドをデータバス14Lに出力する。命令注入回路8につ
いても同様であり、命令コードはデータバス14Hに出
力する。
In the instruction injection circuit 6, when either the SWPREQ #1/#2 request signal is applied, the 3-state buffer 66, which is an instruction code injection port, is enabled during the period of the FETCH signal, and the command code selected by the multiplexer 65 is enabled. Either the first byte or the second byte of the instruction code is output to the data bus 14L. The same applies to the instruction injection circuit 8, and the instruction code is output to the data bus 14H.

このとき、命令注入回路から命令注入を行なっている期
間にはSWAP信号が出力されているが、この信号はバ
イト別に設けられる双方向バッファ7.9を制御して命
令注入中データバスに現われる他のデバイスからのリー
ドデータを禁止する。
At this time, the SWAP signal is output while the instruction injection circuit is injecting the instruction, and this signal controls the bidirectional buffer 7.9 provided for each byte and appears on the data bus during instruction injection. Prohibit read data from devices.

一方、アドレス一致検出回路3から出力される上位アド
レス(奇数アドレス)での一致検出信号BHHITはH
バイト命令注入回路8に1バイト口の命令コード注入を
要求するSWPREQH#1として人力されると共に、
スワップ要求ラッチ4のデータ人力に与えられ前記FE
TCH信号の立ち上がりでラッチされた信号がアンドゲ
ート5を介してLバイト命令注入回路6に2バイト目の
命令コード注入を要求するSWPREQL#2として与
えられる。
On the other hand, the match detection signal BHHIT at the upper address (odd address) output from the address match detection circuit 3 is high.
It is input manually as SWPREQH#1, which requests the byte instruction injection circuit 8 to inject a 1-byte instruction code, and
The data of swap request latch 4 is given to the FE
A signal latched at the rising edge of the TCH signal is applied via the AND gate 5 to the L-byte instruction injection circuit 6 as SWPREQL#2 requesting injection of the second byte instruction code.

これにより、BHHITが検出されたときは、2バイト
目の命令注入がアドレス一致を検出したバスサイクルの
次の命令フェッチバスサイクルで行なわれるようになる
As a result, when BHHIT is detected, the instruction injection for the second byte is performed in the next instruction fetch bus cycle of the bus cycle in which the address match was detected.

ここでマイクロプロセッサ1が1バイト11の注入命令
をフェッチした後、マイクロプロセッサ内の実行ユニッ
トが分岐命令を実行した場合、分岐先のアドレスの命令
コードフェッチサイクルで2バイト目の命令注入が行な
われるとマイクロプロセッサ1が暴走状態に陥る可能性
がある。この不具合を回避するため、アドレスバス13
に接続されたアダー回路10が1バイト目の命令注入ア
ドレスをインクリメントしアドレスラッチ11に与え、
続いてラッチ11の出力は2バイト1]の命令注入アド
レスの期待値としてコンパレータ12の一方の人力とな
る。コンパレータ12の他方の人力には直接アドレスバ
ス13に接続されているため、前述のような不具合状況
では2バイト目の命令注入サイクルで、出力EQがネガ
ティブ(ここではLOW)となり、この信号によりアン
ドゲー15が制御されて2バイト目の命令注入動作が直
ちに禁止される。
Here, if the execution unit in the microprocessor executes a branch instruction after microprocessor 1 fetches the injection instruction of 1 byte 11, the instruction injection of the 2nd byte is performed in the instruction code fetch cycle of the branch destination address. There is a possibility that the microprocessor 1 may go into a runaway state. To avoid this problem, address bus 13
The adder circuit 10 connected to the address increments the first byte instruction injection address and provides it to the address latch 11.
Subsequently, the output of the latch 11 becomes one input of the comparator 12 as the expected value of the instruction injection address of 2 bytes 1]. Since the other input of the comparator 12 is directly connected to the address bus 13, in the above-mentioned malfunction situation, the output EQ becomes negative (LOW in this case) in the second byte instruction injection cycle, and this signal causes the AND gate to 15 is controlled, and the instruction injection operation for the second byte is immediately prohibited.

なお、上記実施例は16ビットマイクロプロセッサを対
象としたが、32ビットマイクロプロセッサの場合でも
同様の回路構戊で実現できる。ただし、その場合は、ア
ドレス一致検出回路3の検出出力がバイト別に4本の信
号となる他、命令注入回路も同様に4回路必要となる。
Note that although the above embodiment is directed to a 16-bit microprocessor, the same circuit structure can be used for a 32-bit microprocessor as well. However, in that case, the detection output of the address match detection circuit 3 becomes four signals for each byte, and four instruction injection circuits are also required.

また、スワップ要求ラッチのデータ入力は最上位側の検
出信号の出力が接続され、このラッチ出力はアンドゲー
ト5を介して最下位アドレスに相当する命令注入同路の
2バイト目の命令注入要求信号として接続されるように
する。
In addition, the data input of the swap request latch is connected to the output of the detection signal on the most significant side, and this latch output is sent via the AND gate 5 to the instruction injection request signal for the second byte of the instruction injection same path corresponding to the lowest address. so that it is connected as .

く発明の効果〉 以上詳細に説明したように、本発明によれば、マイクロ
プロセッサの動作に影響を与えることなく仔意の2バイ
ト長の命令コードを指定したアドレスにて注入できるよ
うにしたため、デバッグ用の命令として割り込み命令に
限らず広範囲の命令が使用できるようになり、プログラ
ムカウンタ相対分岐命令を用いて実行検出機能やタスク
プレーク機能を実現できるようになるなどの効果がある
Effects of the Invention> As explained in detail above, according to the present invention, a desired 2-byte instruction code can be injected at a specified address without affecting the operation of the microprocessor. A wide range of instructions can now be used as debugging instructions, not just interrupt instructions, and the program counter relative branch instruction can be used to implement an execution detection function and a task break function.

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

第1図は本発明に係る2バイト命令注入回路の一実施例
を示す構成図、第2図は動作説明用のタイムチャートで
ある。 1・・・マイクロプロセッサ 2・・・ステータスデコーダ 3・・・アドレス一致検出回路 4・・・スワップ要求ラッチ  5・・・アンドゲート
6・・・Lバイト命令注入回路 7.9・・・双方向バッファ 8・・・Hバイト命令注入回路 10・・・アダー回路   11・・・アドレスラッチ
12・・・コンバレータ  13・・・アドレスバス1
4H,14L・・・データバス
FIG. 1 is a block diagram showing an embodiment of a 2-byte instruction injection circuit according to the present invention, and FIG. 2 is a time chart for explaining the operation. 1...Microprocessor 2...Status decoder 3...Address match detection circuit 4...Swap request latch 5...And gate 6...L byte instruction injection circuit 7.9...Bidirectional Buffer 8... H byte instruction injection circuit 10... Adder circuit 11... Address latch 12... Converter 13... Address bus 1
4H, 14L...data bus

Claims (1)

【特許請求の範囲】 インサーキットエミュレータにおいて、 指定したアドレスパターンと対象とするマイクロプロセ
ッサのアドレスバス上のアドレスとが一致したときにマ
イクロプロセッサのデータバス幅をバイト単位に分割し
たときのバイト位置別に命令注入要求信号を出力するア
ドレス一致検出回路と、 マイクロプロセッサのステータス信号を基にして命令コ
ードフェッチサイクルのリードタイミングを示す信号を
生成するステータスデコーダと、前記アドレス一致検出
回路の出力の内で次の命令コードフェッチサイクルに継
続して命令注入が必要となる場合に命令注入要求を保持
するラッチと、 アダー回路とラッチとコンパレータとで構成され、継続
する命令注入サイクルでマイクロプロセッサが分岐命令
を実行してフェッチアドレスが不連続となった場合に命
令注入を禁止する手段と、前記命令注入タイミングにマ
ルチプレクサで選択される2バイト命令の1バイト目あ
るいは2バイト目のいずれかの命令コードをデータバス
上に出力する命令注入手段と、 前記命令注入タイミングでデータバス上に出力された本
来の命令コードのフェッチを禁止するためのバッファ手
段とを具備し、 前記アドレス一致検出回路により指定したアドレスの命
令コードがマイクロプロセッサによってフェッチされる
バスサイクルとバイト位置を検出して命令注入要求信号
を生成し、同時に指定アドレスに連続した次のアドレス
のバイト位置にも2バイト目の命令注入要求信号を生成
し、2バイト目の命令注入バイト位置が次の命令コード
フェッチサイクルに生じる場合はその命令注入要求信号
を保持しておき、また次の命令コードフェッチサイクル
が分岐命令の実行等により連続したアドレスとならなか
った場合は前記保持した2バイト目の命令注入要求信号
を禁止して不正な命令注入を回避し、これらの命令注入
要求信号により、前記ステータスデコーダが出力する命
令フェッチサイクルのリードタイミングで本来フェッチ
されるべき命令コードの代わりに固定の命令コードを前
記命令注入手段を介して強制的にフェッチさせるように
して、マイクロプロセッサの動作シーケンスに影響を与
えることなく2バイト長のデバッグ用固有命令コードの
注入ができるようにしたことを特徴とする2バイト命令
注入回路。
[Claims] In an in-circuit emulator, when a specified address pattern matches an address on the target microprocessor's address bus, the data bus width of the microprocessor is divided into bytes, and the byte position is an address match detection circuit that outputs an instruction injection request signal; a status decoder that generates a signal indicating read timing of an instruction code fetch cycle based on a microprocessor status signal; and an address match detection circuit that outputs an instruction injection request signal; It consists of a latch that holds an instruction injection request when instruction injection is required following an instruction code fetch cycle, an adder circuit, a latch, and a comparator, and the microprocessor executes a branch instruction during the instruction injection cycle that continues. means for inhibiting instruction injection when the fetch address becomes discontinuous, and a means for disabling the instruction code of either the 1st or 2nd byte of the 2-byte instruction selected by the multiplexer at the instruction injection timing to the data bus. and a buffer means for inhibiting the fetching of the original instruction code outputted onto the data bus at the instruction injection timing, and the instruction at the address specified by the address matching detection circuit. The code detects the bus cycle and byte position fetched by the microprocessor and generates an instruction injection request signal, and at the same time generates a second byte instruction injection request signal at the byte position of the next address following the specified address. , if the instruction injection byte position of the second byte occurs in the next instruction code fetch cycle, hold that instruction injection request signal, and if the next instruction code fetch cycle is a continuous address due to execution of a branch instruction, etc. If there is no instruction injection request signal for the second byte held above, the instruction injection request signal for the second byte is inhibited to avoid illegal instruction injection, and these instruction injection request signals cause the original fetch to be performed at the read timing of the instruction fetch cycle output by the status decoder. A fixed instruction code is forcibly fetched through the instruction injection means instead of an instruction code that should be executed, and a 2-byte long debug-specific instruction code can be fetched without affecting the operation sequence of the microprocessor. A 2-byte instruction injection circuit characterized by being capable of injection.
JP1235288A 1989-09-11 1989-09-11 2-byte instruction injection circuit Expired - Fee Related JP2772982B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1235288A JP2772982B2 (en) 1989-09-11 1989-09-11 2-byte instruction injection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1235288A JP2772982B2 (en) 1989-09-11 1989-09-11 2-byte instruction injection circuit

Publications (2)

Publication Number Publication Date
JPH0398131A true JPH0398131A (en) 1991-04-23
JP2772982B2 JP2772982B2 (en) 1998-07-09

Family

ID=16983891

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1235288A Expired - Fee Related JP2772982B2 (en) 1989-09-11 1989-09-11 2-byte instruction injection circuit

Country Status (1)

Country Link
JP (1) JP2772982B2 (en)

Also Published As

Publication number Publication date
JP2772982B2 (en) 1998-07-09

Similar Documents

Publication Publication Date Title
US5557762A (en) Digital signal processor evaluation chip and debug method
US7752427B2 (en) Stack underflow debug with sticky base
EP0702297B1 (en) A data processor with breakpoint circuit
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
JPH0398131A (en) 2-byte instruction injection circuit
KR860001933B1 (en) Timing control method in data processing unit
JPS63284644A (en) Instruction address output circuit
JPS62197831A (en) Data processor
JPH11282671A (en) Computer system
JP2859048B2 (en) Microcomputer
JPH06103109A (en) Data processor and debugging device using the same
JP2001265651A (en) Data processor
JP2575025B2 (en) In-circuit emulator
JP3404354B2 (en) In-circuit emulator and unauthorized access detection method
JPH06202907A (en) Debug support device
JPH0411895B2 (en)
JPH02135547A (en) Task breaking circuit
JPH05342038A (en) Memory emulator
JPH0877037A (en) Jamming device
JP2903601B2 (en) Microcomputer with built-in ROM
JPH0750446B2 (en) Data processing device
JPH04306743A (en) Debug support system for integrated circuit microprocessor
JPH08241225A (en) Evaluating device
JPS59202548A (en) Debugging device
JPH01258045A (en) In-circuit emulator

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees