JP2711159B2 - Processor operation state adjustment method - Google Patents

Processor operation state adjustment method

Info

Publication number
JP2711159B2
JP2711159B2 JP1297928A JP29792889A JP2711159B2 JP 2711159 B2 JP2711159 B2 JP 2711159B2 JP 1297928 A JP1297928 A JP 1297928A JP 29792889 A JP29792889 A JP 29792889A JP 2711159 B2 JP2711159 B2 JP 2711159B2
Authority
JP
Japan
Prior art keywords
processor
instruction
space
bits
bus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP1297928A
Other languages
Japanese (ja)
Other versions
JPH03157732A (en
Inventor
達也 鈴木
健一 青木
祐二 太田
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP1297928A priority Critical patent/JP2711159B2/en
Publication of JPH03157732A publication Critical patent/JPH03157732A/en
Application granted granted Critical
Publication of JP2711159B2 publication Critical patent/JP2711159B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はプロセッサの形態による動作状態の違いを調
整するプロセッサ動作状態調整方法に関し、例えばユー
ザ・プログラムのデバッグを可能とするエミュレータに
おいてエミュレーション動作制御用のシステム空間とエ
ミュレーション動作用のユーザ空間との空間切換え処理
に適用して有効な技術に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor operating state adjusting method for adjusting a difference in operating state depending on a type of a processor, for example, emulation operation control in an emulator capable of debugging a user program. The present invention relates to a technology effective when applied to a space switching process between a system space for emulation and a user space for emulation operation.

〔従来技術〕(Prior art)

マイクロプロセッサ応用機器の開発においてそのシス
テムデバッグやシステム評価を行うためのエミュレータ
は、システムに含まれるマイクロプロセッサと等価なマ
イクロプロセッサにてユーザ・プログラムを実行・停止
させることによりハードウェアおよびソフトウェアデバ
ッグを可能とするものである。
An emulator for system debugging and system evaluation in the development of microprocessor-applied equipment enables hardware and software debugging by executing and stopping user programs on a microprocessor equivalent to the microprocessor included in the system. It is assumed that.

このエミュレータにおけるマイクロプロセッサには、
ユーザシステムとインタフェースされて動作するための
ユーザ空間とユーザシステムと切離されて動作するため
のシステム空間が存在し、これらの空間状態を切換える
ことによりエミュレーション実行を制御している。
The microprocessor in this emulator includes:
There is a user space for operating by being interfaced with the user system, and a system space for operating while being separated from the user system. Emulation execution is controlled by switching these space states.

従来のエミュレータでは、ユーザ空間からシステム空
間への状態切換えはブレーク発生等による割込み入力に
て行われ、システム空間からユーザ空間状態への切換え
は、マイクロプロセッサにて特定命令を実行した場合の
所定連続バスサイクル数を検出することにより行われて
いた。
In the conventional emulator, the state switching from the user space to the system space is performed by an interrupt input due to a break or the like, and the switching from the system space to the user space state is performed in a predetermined sequence when the microprocessor executes a specific instruction. This is performed by detecting the number of bus cycles.

尚、このようなエミュレータについて記載された文献
の例としては、1985年5月10日にソフィアシステムズよ
り発行された「SA710Mハードウェア・ユーザーズ・マニ
ュアル」がある。
An example of a document describing such an emulator is “SA710M Hardware User's Manual” issued by Sophia Systems on May 10, 1985.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

近年、マイクロプロセッサの高機能化に伴い、命令キ
ャッシュメモリやRAM(ランダム・アクセス・メモリ),
ROM(リード・オンリ・メモリ)等を内蔵したり、一つ
のマイクロプロセッサにて種々の動作モードを有するも
のが開発されている。このようなマイクロプロセッサに
おいては、命令実行領域が内蔵メモリなのか外部メモリ
なのかによって、あるいは、動作モードの違いがバスサ
イクル制御に関係するものであればこの動作モードの違
いにより、同一命令を実行しても実行バスサイクルが異
なることがありうる。つまり、先に述べた特定命令を実
行することによる所定連続バスサイクル数が上記動作形
態により互いに異なることになり、この結果、正常な空
間切換え特にシステム空間からユーザ空間への切換えが
できなくなる虞れのあることが本発明者によって見出さ
れた。
Recently, instruction cache memory, RAM (random access memory),
A microprocessor having a built-in ROM (read only memory) or the like and having one microprocessor having various operation modes has been developed. In such a microprocessor, the same instruction is executed depending on whether the instruction execution area is an internal memory or an external memory, or if the operation mode is related to bus cycle control, the operation mode is different. Even so, the execution bus cycle may be different. In other words, the predetermined number of continuous bus cycles resulting from the execution of the above-described specific instruction will differ from each other depending on the operation mode. As a result, normal space switching, particularly switching from the system space to the user space, may not be possible. Have been found by the present inventors.

このような問題は、例えば全ての動作形態に対応すべ
く、動作形態毎にバスサイクル数調整のための専用ハー
ドウェアを設け、それを動作形態に応じて切換えること
で改善できるが、そうすると動作形態の種類だけハード
ウェアが必要となるため、ハードウェアの規模増大ひい
ては製造コスト上昇が避けられない。
Such a problem can be solved, for example, by providing dedicated hardware for adjusting the number of bus cycles for each operation mode and switching it according to the operation mode in order to cope with all the operation modes. , Hardware is required only for these types, and an increase in the scale of the hardware and an increase in manufacturing costs are inevitable.

本発明の目的は、ハードウェアの増大を伴うことな
く、高機能化プロセッサの動作状態を容易に調整できる
方法を提供することにある。
An object of the present invention is to provide a method capable of easily adjusting the operation state of a high-performance processor without increasing hardware.

本発明の前記ならびにそのほかの目的と新規な特徴
は、本明細書の記述及び添付図面から明らかになるであ
ろう。
The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

〔課題を解決するための手段〕[Means for solving the problem]

本願において開示される発明のうち代表的なものの概
要を簡単に説明すれば下記の通りである。
The outline of a representative invention among the inventions disclosed in the present application will be briefly described as follows.

すなわち、複数の動作形態を有するプロセッサの動作
形態による動作状態の違いを該プロセッサが実行すべき
命令によって調整するようにしたものである。
That is, the difference in operation state between the operation modes of the processor having a plurality of operation modes is adjusted by the instruction to be executed by the processor.

ここで、上記調整対象をプロセッサのバスサイクル数
とすることができ、またそのためには、上記プロセッサ
が実行すべき命令にNOP(ノンオペレーション)命令を
挿入することができる。更にエミュレーションにおいて
は上記プロセッサが実行すべき命令を、システム空間と
ユーザ空間との切換え処理のための一連の命令に含める
ことができる。
Here, the adjustment target can be the number of bus cycles of the processor, and for that purpose, a NOP (non-operation) instruction can be inserted into the instruction to be executed by the processor. Further, in the emulation, an instruction to be executed by the processor can be included in a series of instructions for processing for switching between the system space and the user space.

〔作 用〕(Operation)

上記した手段によれば、プロセッサの動作形態による
動作状態の違いが該プロセッサの実行命令によって調整
され、このことが、ハードウェアの増大を伴わずに高機
能プロセッサの動作状態調整を可能とするように作用す
る。
According to the above-described means, the difference in the operation state depending on the operation mode of the processor is adjusted by the execution instruction of the processor, and this enables the adjustment of the operation state of the high-performance processor without increasing the hardware. Act on.

〔実 施 例〕〔Example〕

第1図には、本発明の一実施例方法を適用したエミュ
レータが示される。
FIG. 1 shows an emulator to which an embodiment of the present invention is applied.

同図に示されるエミュレータは、得に制限されない
が、マイクロプロセッサ1,システムインタフェース2,シ
ステムメモリ及びI/O(インプット・アウトプット)3,
代行メモリ4,空間制御回路5,トレースメモリ部6,ブレー
ク検出回路7,ユーザインタフェース8を含む。
The emulator shown in the figure is not particularly limited, but includes a microprocessor 1, a system interface 2, a system memory and I / O (input / output) 3,
It includes a proxy memory 4, a space control circuit 5, a trace memory unit 6, a break detection circuit 7, and a user interface 8.

上記マイクロプロセッサ1には、エミュレーション対
象マイクロプロセッサと同等の機能を有するマイクロプ
ロセッサが適用される。エミュレータにおいてこのマイ
クロプロセッサ1は、特に制限されないが、命令実行前
に予め当該命令を取込むためのプリフェッチバッファや
汎用メモリとしてのRAM等を内蔵する。そしてこのマイ
クロプロセッサ1は16ビット構成のプロセッサバス10に
接続され、このプロセッサバス10を介してシステムイン
タフェース2及びユーザインタフェース8に結合され
る。
A microprocessor having a function equivalent to that of the microprocessor to be emulated is applied to the microprocessor 1. In the emulator, the microprocessor 1 includes, but is not limited to, a prefetch buffer for prefetching the instruction before executing the instruction, a RAM as a general-purpose memory, and the like. The microprocessor 1 is connected to a 16-bit processor bus 10 and is connected to the system interface 2 and the user interface 8 via the processor bus 10.

代行メモリ4は、ユーザシステム9の完成時にこのユ
ーザシステム9に含まれるべきメモリを代行するもの
で、デバッグ対象とされるユーザプログラムが格納され
る。この代行メモリ4内のプログラムがマイクロプロセ
ッサ1によって実行される場合、それはユーザ空間状態
であり、この状態においてはユーザインタフェース8が
活性化されることでユーザシステム9がプロセッサバス
10に結合され、マイクロプロセッサ1によってユーザシ
ステム9の動作制御すなわちエミュレーションが行われ
る。このエミュレーション動作期間中、プロセッサバス
10上のデータやアドレス更には制御情報はトレースメモ
リ部6に逐次書込まれることにより、トレースされる。
The substitute memory 4 substitutes a memory to be included in the user system 9 when the user system 9 is completed, and stores a user program to be debugged. When the program in the proxy memory 4 is executed by the microprocessor 1, it is in the user space state. In this state, the user interface 9 is activated and the user system 9 is connected to the processor bus.
The microprocessor 1 controls operation of the user system 9, that is, emulation. During this emulation operation, the processor bus
Data and addresses on 10 and control information are traced by being sequentially written into the trace memory unit 6.

ブレーク検出回路7には、ユーザプログラムを実行す
るマイクロプロセッサ1の制御動作状態が予め定められ
た状態に達した場合にマイクロプロセッサ1の動作を停
止させるためのブレーク条件をマイクロプロセッサ1に
より設定できるようになっており、ユーザの指定により
任意に変更可能となっている。ブレーク検出回路7はこ
のブレーク条件に基づいてブレーク検出を行い、その検
出結果を空間制御回路5に伝達する。尚、エミュレーシ
ョン動作期間中はシステムインタフェース2が非活性状
態とされ、システムメモリ及びI/O3がプロセッサバス10
より切離されている。
The break detection circuit 7 allows the microprocessor 1 to set a break condition for stopping the operation of the microprocessor 1 when the control operation state of the microprocessor 1 executing the user program reaches a predetermined state. , And can be arbitrarily changed by the user's specification. The break detection circuit 7 detects a break based on the break condition, and transmits the detection result to the space control circuit 5. During the emulation operation, the system interface 2 is inactive, and the system memory and the I / O 3 are connected to the processor bus 10.
More detached.

一方、上記のエミュレーション動作の停止中、それは
システム空間状態とされ、システムインタフェース2が
活性状態とされることでシステムメモリ及びI/O3がプロ
セッサバス10に接続される。この状態においてマイクロ
プロセッサ1は、システムメモリに格納されているシス
テムプログラムを実行することで所定のエミュレーョン
動作制御を行う。尚、この状態においてはユーザインタ
フェース8が非活性状態とされ、ユーザシステム9がプ
ロセッサバス10より切離されている。
On the other hand, while the emulation operation is stopped, the emulation operation is set to the system space state, and the system interface 2 is activated to connect the system memory and the I / O 3 to the processor bus 10. In this state, the microprocessor 1 executes a predetermined emulation operation control by executing a system program stored in the system memory. In this state, the user interface 8 is inactive and the user system 9 is disconnected from the processor bus 10.

上記システムインタフェース2及びユーザインタフェ
ース8の活性/非活性状態の切換えは空間制御回路5に
よって行われる。すなわち、この空間制御回路5は、エ
ミュレーション動作中に上記ブレーク検出回路7によっ
てブレーク検出が行われた場合にユーザインタフェース
8を非活性状態とするとともにシステムインタフェース
2を活性状態とすることでユーザ空間からシステム空間
への移行を可能とする。また、空間制御回路5は、エミ
ュレーション動作の停止中すなわちマイクロプロセッサ
1によるエミュレーション動作制御中においてプロセッ
サバス10の状態を監視することにより特定命令実行中に
おける所定事象の発生に基づいてバスサイクル数を計数
し所定のバスサイクル数に達した場合にユーザインタフ
ェース8を活性状態とするともにシステムインタフェー
ス2を非活性状態とすることでシステム空間からユーザ
空間への移行を可能とする。また、ブレーク検出回路7
によるブレーク検出結果は空間制御回路5に報告後、割
込みとしてマイクロプロセッサ1へ入力される。
Switching of the active / inactive state of the system interface 2 and the user interface 8 is performed by the space control circuit 5. That is, when a break is detected by the break detection circuit 7 during the emulation operation, the space control circuit 5 deactivates the user interface 8 and activates the system interface 2 so that the space interface 5 can be activated from the user space. Enables migration to system space. The space control circuit 5 monitors the state of the processor bus 10 while the emulation operation is stopped, that is, during the emulation operation control by the microprocessor 1, and counts the number of bus cycles based on the occurrence of a predetermined event during execution of the specific instruction. When the predetermined number of bus cycles has been reached, the user interface 8 is activated and the system interface 2 is deactivated, thereby enabling a transition from the system space to the user space. Also, the break detection circuit 7
Is reported to the space control circuit 5 and then input to the microprocessor 1 as an interrupt.

第2図には本エミュレータにおけるマイクロプロセッ
サ1のメモリマップの一例が示される。同図に示される
ように、16進数で示されるアドレス空間に、外部メモリ
空間、内蔵メモリ空間、内蔵I/O空間がアドレス割付け
されている。マイクロプロセッサ1は基本的に8ビット
構成であるが、16ビットのプロセッサス10に接続され、
内蔵メモリ、外部メモリ空間に対しワード(16ビット)
単位およびバイト(8ビット)単位のアクセスが可能と
され、また、外部メモリ空間に関しては内蔵I/O内のコ
ントロールレジスタ設定によるワード/バイトの領域切
換え機能を有し、バイト領域指定時はデータバスの下位
のみ使用することでバイト単位のアクセスが行われるよ
うになっている。
FIG. 2 shows an example of a memory map of the microprocessor 1 in the emulator. As shown in the figure, an external memory space, a built-in memory space, and a built-in I / O space are assigned addresses in an address space represented by a hexadecimal number. The microprocessor 1 basically has an 8-bit configuration, but is connected to a 16-bit processor 10,
Word (16 bits) for internal memory and external memory space
It can be accessed in units and bytes (8 bits), and has a word / byte area switching function by setting the control register in the built-in I / O for the external memory space. By using only the lower part of, access in byte units is performed.

上位のワード/バイトの領域の違いは、既述の如く、
マイクロプロセッサ1の命令実行バスサイクル数に影響
を及ぼすことになる。つまり、同一命令でもバイト領域
での実行においては、ワードアクセス1回がバイトアク
セス2回に相当することから、ワード領域での実行に比
べてバスサイクル数が増える。そこで本実施例ではシス
テム空間からユーザ空間への切換えに際して以下のよう
にしてこのバスサイクル数を調整している。
The difference between the upper word / byte area is, as described above,
This affects the number of instruction execution bus cycles of the microprocessor 1. In other words, even when the same instruction is executed in the byte area, one word access is equivalent to two byte accesses, so that the number of bus cycles increases as compared with the execution in the word area. Therefore, in this embodiment, when switching from the system space to the user space, the number of bus cycles is adjusted as follows.

第3図には、上記空間制御回路5において、システム
空間からユーザ空間への切換え制御を行う切換制御回路
が示される。この切換制御回路は、後述するCONT1W信号
を入力信号とするフリップフロップ回路51と、CONT1Wが
“1"となることによってこのフリップフロップ回路5に
“1"が設定された場合その後のバスサイクル数(▲
▼)を計数するカウンタ52とを含んで成る。そしてこ
のカウンタ52の計数出力(本実施例では出力QA〜QCのう
ちQBを使用)は、ユーザ空間への切換信号(これをUSER
信号と称する)とされる。
FIG. 3 shows a switching control circuit for controlling the switching from the system space to the user space in the space control circuit 5. The switching control circuit includes a flip-flop circuit 51 that uses a CONT1W signal, which will be described later, as an input signal. ▲
And a counter 52 for counting ▼). The count output of the counter 52 (in this embodiment, QB among the outputs QA to QC is used) is a switching signal to the user space (this is a USER signal).
Signal).

第4A図にはシステム空間からユーザ空間に移行される
場合にバイト領域で実行される命令が示され、第5A図に
はこの命令実行時のバスサイクル動作タイミングが示さ
れる。
FIG. 4A shows an instruction executed in the byte area when the system space is shifted to the user space, and FIG. 5A shows a bus cycle operation timing at the time of executing the instruction.

プロセッサバス10とマイクロプロセッサ1とのデータ
インタフェースがバイト単位で行われる動作モードが設
定されている場合、換言すれば命令の実行においてバイ
ト領域が用いられる場合、例えばマイクロプロセッサ1
の動作空間をシステム空間からユーザ空間に切換えるた
めの一連の命令にはMOVE(ムーブ)命令、RTE(リター
ンエクセプション)命令が含まれ、該命令がその順に実
行されることにより、マイクロプロセッサ1はユーザプ
ログラムに従って動作可能とされる。すなわち、MOVE命
令がマイクロプロセッサ1で実行されることで移動先の
所定アドレスCONT1がアクセスされ、空間制御回路5に
よりこのCONT1のアクセスが検知されると第3図におけ
るCONT1W信号が生成されフリップフロップ51に“1"が設
定され、その後のバスサイクル数がカウンタ52によって
計数される。所定のバスサイクル数が検知されたときUS
ER信号が出力され、RTE命令実行でのアンスタックサイ
クルからユーザ空間に切換えられる。そしてRTE命令実
行後にユーザプログラムの実行が開始される。
When an operation mode in which the data interface between the processor bus 10 and the microprocessor 1 is performed in byte units is set, in other words, when a byte area is used in executing an instruction, for example, the microprocessor 1
A series of instructions for switching the operation space from the system space to the user space include a MOVE (move) instruction and an RTE (return exception) instruction. By executing the instructions in that order, the microprocessor 1 Operable according to the program. That is, the MOVE instruction is executed by the microprocessor 1 to access the predetermined address CONT1 of the destination, and when the access of this CONT1 is detected by the space control circuit 5, the CONT1W signal in FIG. Is set to "1", and the number of bus cycles thereafter is counted by the counter 52. US when the specified number of bus cycles is detected
The ER signal is output, and switching from the unstack cycle in the execution of the RTE instruction to the user space is performed. Then, after the execution of the RTE instruction, the execution of the user program is started.

ここで、マイクロプロセッサ1によって実行される命
令のフォオーマットは例えば最大1ワードであり、命令
コードの指定フィールド及びオペランドの指定フィール
ドをそれぞれ1バイトとすると、バイト領域での命令実
行においてバイト単位で命令コード、その指令情報がマ
イクロプロセッサ1内のプリフェッチバッファに順次プ
リフェッチされ、それが先入れ先出し方式でワード単位
でデコードされ実行される。第5A図の例では、MOVE命令
実行期間においてバイト単位のプリフェッチサイクルが
2回、ソース側レジスタの内容を移動先レジスタへ書込
むためのライトサイクルが1回となる。
Here, the format of an instruction executed by the microprocessor 1 is, for example, a maximum of one word. Assuming that the designation field of the instruction code and the designation field of the operand are each one byte, the instruction execution in the byte area is performed in byte units. The instruction code and its instruction information are sequentially prefetched into a prefetch buffer in the microprocessor 1 and decoded and executed in word units on a first-in first-out basis. In the example of FIG. 5A, during the execution period of the MOVE instruction, there are two prefetch cycles in byte units and one write cycle for writing the contents of the source register to the destination register.

第4B図にはシステム空間からユーザ空間に移動される
場合にワード領域で実行される命令が示され、第5B図に
はこの命令実行時のバスサイクル動作タイミングが示さ
れる。
FIG. 4B shows an instruction executed in the word area when the instruction is moved from the system space to the user space, and FIG. 5B shows a bus cycle operation timing when the instruction is executed.

プロセッサバス10とマイクロプロセッサ1とのデータ
インタフェースがワード単位で行われる動作モードが設
定されているとき、そのワード領域において上記と同じ
MOVE命令を実行した場合、このMOVE命令実行期間では、
第5A図において12で示される最終プリフェッチサイクル
が存在しなくなるために、空間制御回路5内のカウンタ
52での所定バスサイクル数検知に支障を来すことにな
る。つまり、プリフェッチサイクル数が少ないにもかか
わらず、上記バイト領域での命令実行の場合と同じ数だ
けバスサイクルを計数したのでは円滑な空間制御が行え
ない。例えばシステムインタフェース2を非活性状態と
し、ユーザインタフェース8を活性状態とする切換えが
RTE命令の途中で行われてしまう。そこで本実施例で
は、MOVE命令とRTE命令との間に、命令フェッチは行わ
れるが実質的に意味を持たないNOP(ノンオペレーショ
ン)命令を挿入することにより、第5B図において13で示
されるプリフェッチサイクルを確保し、これにより見掛
け上のバスサイクル数が上記バイト領域での命令実行の
場合と等しくなるようにしている。このようにバイト領
域とワード領域とでバスサイクル数が等しくなれば、空
間制御回路5においてはバスサイクル数調整のための専
用ハードウェアを設けることなく、従来通りの計数動作
によってシステム空間からユーザ空間への切換え制御が
可能となる。尚、上記見掛け上のバスサイクル数を等し
くするためのNOP命令の数は、マイクロプロセッサ1に
よって実行される命令のフォーマット構成等によって適
宜に決定する。
When an operation mode in which the data interface between the processor bus 10 and the microprocessor 1 is performed in word units is set,
When the MOVE instruction is executed, during this MOVE instruction execution period,
Since the last prefetch cycle indicated by 12 in FIG.
This will interfere with the detection of the predetermined number of bus cycles in 52. That is, despite the small number of prefetch cycles, smooth space control cannot be performed if the same number of bus cycles as in the case of instruction execution in the byte area is counted. For example, switching the system interface 2 to the inactive state and the user interface 8 to the active state is performed.
It is performed in the middle of the RTE instruction. In this embodiment, therefore, an instruction fetch is performed between the MOVE instruction and the RTE instruction, but a NOP (non-operation) instruction having substantially no meaning is inserted, so that a prefetch instruction 13 shown in FIG. 5B is inserted. Cycles are ensured so that the apparent number of bus cycles is equal to that of the instruction execution in the byte area. If the number of bus cycles is equal between the byte area and the word area in this manner, the space control circuit 5 does not need to provide dedicated hardware for adjusting the number of bus cycles, and can perform the conventional counting operation from the system space to the user space. Switching control can be performed. The number of NOP instructions for equalizing the apparent number of bus cycles is appropriately determined according to the format configuration of the instructions executed by the microprocessor 1 and the like.

上記実施例によれば以下の作用効果を得ることができ
る。
According to the above embodiment, the following effects can be obtained.

(1)ワード領域で実行される命令にNOP命令を含める
ことにより、バイト領域での命令実行の場合とワード領
域での命令実行の場合とのバスサイクル数の違いを調整
でき、これにより空間制御回路5では、バイト領域,ワ
ード領域にかかわらず、従来通りのバスサイクル計数動
作によってシステム空間からユーザ空間への空間切換え
制御を円滑に行うことができる。
(1) By including the NOP instruction in the instruction executed in the word area, it is possible to adjust the difference in the number of bus cycles between the case of executing the instruction in the byte area and the case of executing the instruction in the word area. In the circuit 5, the space switching control from the system space to the user space can be smoothly performed by the conventional bus cycle counting operation regardless of the byte area and the word area.

(2)しかも上記バスサイクル数の調整がNOP命令挿入
によって容易に実現され、バスサイクル数調整のための
専用ハードウェアを必要としないから、ハードウェアの
規模増大や製造コスト上昇等を生じない。
(2) Moreover, the adjustment of the number of bus cycles is easily realized by inserting the NOP instruction, and does not require dedicated hardware for adjusting the number of bus cycles. Therefore, an increase in hardware scale and an increase in manufacturing cost do not occur.

以上本発明者によってなされた発明を実施例に基づい
て具体的に説明したが、本発明は上記実施例に限定され
ず、その要旨を逸脱しない範囲において種々変更可能で
ある。
Although the invention made by the inventor has been specifically described based on the embodiment, the invention is not limited to the above embodiment, and can be variously modified without departing from the gist thereof.

例えばバスサイクルをそれ自体をウェイトステート挿
入等によって調整するようにしてもよい。
For example, the bus cycle itself may be adjusted by inserting a wait state.

また、上記実施例では調整対象をバスサイクル数とし
て説明したが、マイクロプロセッサの動作状態を示すも
のであり、且つそれが命令実行によって変化するもので
あれば、バスサイクル数以外であってもそれを調整対象
とすることができる。また上記実施例では空間切換時の
アンスタック領域がユーザ空間に配置されている場合に
ついて説明しているが、スタック領域はシステム空間で
もかまわない。
Further, in the above embodiment, the adjustment target is described as the number of bus cycles. However, it indicates the operation state of the microprocessor, and if it is changed by the execution of an instruction, the adjustment is not limited to the number of bus cycles. Can be adjusted. In the above embodiment, the case where the unstack area at the time of space switching is arranged in the user space is described, but the stack area may be the system space.

更に、本発明が適用されるシステムによっては、NOP
命令等の所定の命令を挿入又は削除したり、その命令を
数を変えることでプロセッサの動作状態を調整するとよ
い。
Further, depending on the system to which the present invention is applied, NOP
The operation state of the processor may be adjusted by inserting or deleting a predetermined instruction such as an instruction, or by changing the number of the instructions.

以上の説明では主として本発明者によってなされた発
明をその背景となった利用分野であるエミュレータに適
用した場合について説明したが、本発明はそれに限定さ
れるものではなく、複数の動作形態を選択して実行可能
なプロセッサを備えたデータ処理システム等に広く適用
することができる。
In the above description, the case where the invention made by the inventor is mainly applied to the emulator which is the background of application has been described. However, the present invention is not limited to this, and a plurality of operation modes are selected. The present invention can be widely applied to a data processing system including a processor that can be executed by a computer.

〔発明の効果〕〔The invention's effect〕

本願において開示される発明のうち代表的なものによ
って得られる効果を簡単に説明すれば、下記の通りであ
る。
The effect obtained by the representative one of the inventions disclosed in the present application will be briefly described as follows.

すなわち、プロセッサの動作形態による動作状態の違
いが該プロセッサの実行命令によって調整されることに
より、ハードウェアの増大を伴うことなく、プロセッサ
の動作状態の調整を容易に行うことができる。
That is, since the difference in the operation state according to the operation mode of the processor is adjusted by the execution instruction of the processor, the operation state of the processor can be easily adjusted without increasing the hardware.

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

第1図は本発明の一実施例方法を適用したエミュレータ
のブロック図、 第2図は上記エミュレータにおけるマイクロプロセッサ
のメモリマップ説明図、 第3図は上記エミュレータにおける空間制御回路の主要
部構成ブロック図、 第4A図は上記エミュレータにおいてバイト領域で実行さ
れる命令の説明図、 第4B図は上記エミュレータにおいてワード領域で実行さ
れる命令の説明図、 第5A図は上記第4A図に示される命令実行時のバスサイク
ル動作タイミング図、 第5B図は上記第4B図に示される命令実行時のバスサイク
ル動作タイミング図である。 1……マイクロプロセッサ、2……システムインタフェ
ース、5……空間制御回路、6……トレースメモリ部、
7……ブレーク検出回路、8……ユーザインタフェー
ス。
FIG. 1 is a block diagram of an emulator to which the method of one embodiment of the present invention is applied, FIG. 2 is an explanatory diagram of a memory map of a microprocessor in the emulator, and FIG. 3 is a block diagram of a main part of a space control circuit in the emulator. FIG. 4A is an explanatory view of an instruction executed in the byte area in the emulator, FIG. 4B is an explanatory view of an instruction executed in the word area in the emulator, and FIG. 5A is an instruction execution shown in FIG. 4A. FIG. 5B is a timing diagram of the bus cycle operation at the time of executing the instruction shown in FIG. 4B. 1 ... microprocessor, 2 ... system interface, 5 ... space control circuit, 6 ... trace memory unit,
7: Break detection circuit, 8: User interface.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 太田 祐二 東京都小平市上水本町5丁目20番1号 株式会社日立製作所武蔵工場内 (56)参考文献 特開 昭63−192139(JP,A) 特開 昭63−255755(JP,A) ────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Yuji Ota 5-20-1, Kamizuhoncho, Kodaira-shi, Tokyo Inside Musashi Plant of Hitachi, Ltd. (56) References JP-A-63-192139 (JP, A) JP-A-63-255755 (JP, A)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】第1の複数ビット単位、及びそれよりもビ
ット数の少ない第2の複数ビット単位でのアクセスを可
能とするプロセッサの動作状態を調整するためのプロセ
ッサ動作状態調整方法において、 上記第1の複数ビット単位でのアクセス中に、実質的な
意味を持たない命令をプロセッサにフェッチさせること
により、上記第1の複数ビット単位でのアクセスにおけ
るバスサイクル数を、上記第2の複数のビット単位での
アクセスにおけるバスサイクル数に合わせて、上記プロ
セッサの動作状態を調整することを特徴とするプロセッ
サ動作状態調整方法。
1. A processor operating state adjusting method for adjusting an operating state of a processor which enables access in a first plurality of bit units and a second plurality of bit units having a smaller number of bits, the method comprising: By causing the processor to fetch an instruction having substantially no meaning during the access in the first plurality of bits, the number of bus cycles in the access in the first plurality of bits is reduced by the second plurality of bits. A processor operating state adjusting method, comprising adjusting the operating state of the processor according to the number of bus cycles in bit-wise access.
【請求項2】プロセッサによるエミュレーション動作中
にブレーク検出が行われた場合にユーザインタフェース
を非活性状態とするとともにシステムインタフェースを
活性状態とすることで、ユーザ空間からシステム空間へ
移行し、プロセッサのエミュレーション動作の停止中に
プロセッサバスの状態を監視して、特定命令実行中にお
ける所定事象の発生に基づいてバスサイクル数を計数
し、所定のバスサイクル数に達した場合にユーザインタ
フェースを活性化するとともにシステムインタフェース
を非活性状態とすることで、システム空間からユーザ空
間へ移行する空間切換え処理におけるプロセッサ動作状
態調整方法であって、 上記プロセッサバスと上記プロセッサとのデータインタ
フェースが第1の複数ビット単位で行われる動作モード
が設定されているとき、その動作モードでのアクセス中
に、実質的な意味を持たない命令をプロセッサにフェッ
チさせることにより、見掛け上のバスサイクル数を、上
記第1の複数ビット単位よりもビット数の少ない第2の
複数ビット単位でのアクセスにおけるバスサイクル数に
合わせて、上記プロセッサの動作状態を調整することを
特徴とするプロセッサ動作状態調整方法。
2. When a break is detected during an emulation operation by a processor, the user interface is deactivated and the system interface is activated, thereby shifting from the user space to the system space and emulating the processor. While the operation is stopped, the state of the processor bus is monitored, the number of bus cycles is counted based on the occurrence of a predetermined event during the execution of a specific instruction, and when the predetermined bus cycle number is reached, the user interface is activated. A processor operating state adjusting method in a space switching process for shifting from a system space to a user space by deactivating a system interface, wherein a data interface between the processor bus and the processor is provided in a first plurality of bits. Action mode to be performed When the instruction is set in the operation mode, by causing the processor to fetch an instruction having substantially no meaning during the access in the operation mode, the apparent number of bus cycles can be made smaller than that of the first plurality of bits. A processor operating state adjusting method, wherein the operating state of the processor is adjusted according to the number of bus cycles in a second access in units of a plurality of bits having a small number of bits.
JP1297928A 1989-11-16 1989-11-16 Processor operation state adjustment method Expired - Fee Related JP2711159B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1297928A JP2711159B2 (en) 1989-11-16 1989-11-16 Processor operation state adjustment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1297928A JP2711159B2 (en) 1989-11-16 1989-11-16 Processor operation state adjustment method

Publications (2)

Publication Number Publication Date
JPH03157732A JPH03157732A (en) 1991-07-05
JP2711159B2 true JP2711159B2 (en) 1998-02-10

Family

ID=17852908

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1297928A Expired - Fee Related JP2711159B2 (en) 1989-11-16 1989-11-16 Processor operation state adjustment method

Country Status (1)

Country Link
JP (1) JP2711159B2 (en)

Also Published As

Publication number Publication date
JPH03157732A (en) 1991-07-05

Similar Documents

Publication Publication Date Title
KR100403405B1 (en) Integrated circuit with multiple functions sharing multiple internal signal buses according to distributed bus access and control arbitration
US7590774B2 (en) Method and system for efficient context swapping
US4791557A (en) Apparatus and method for monitoring and controlling the prefetching of instructions by an information processing system
US4729094A (en) Method and apparatus for coordinating execution of an instruction by a coprocessor
US4715013A (en) Coprocessor instruction format
US5263153A (en) Monitoring control flow in a microprocessor
US4731736A (en) Method and apparatus for coordinating execution of an instruction by a selected coprocessor
GB2392998A (en) Handling interrupts during multiple access program instructions
US4750110A (en) Method and apparatus for executing an instruction contingent upon a condition present in another data processor
JP2734468B2 (en) Processor
JP3707581B2 (en) Data processing system having self-aligned stack pointer and method thereof
EP0523758B1 (en) A method and apparatus for coordinating execution of an instruction by a coprocessor
US4758950A (en) Method and apparatus for selectively delaying an interrupt of a coprocessor
US4821231A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
US4914578A (en) Method and apparatus for interrupting a coprocessor
EP1125199B1 (en) Method of debugging a program thread
JP3260083B2 (en) Debug system and debugging method
JP2711159B2 (en) Processor operation state adjustment method
JPH08255476A (en) Apparatus and method for memory extended stack in data-processing system
US4758978A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
JP2760228B2 (en) Microprocessor with built-in cache memory and its trace analyzer
JPH0795288B2 (en) Microcomputer
US4811274A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
JPH03252731A (en) Microprocessor
KR0155931B1 (en) On-chip cache memory system

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees