JPH04199331A - microcomputer - Google Patents
microcomputerInfo
- Publication number
- JPH04199331A JPH04199331A JP2332846A JP33284690A JPH04199331A JP H04199331 A JPH04199331 A JP H04199331A JP 2332846 A JP2332846 A JP 2332846A JP 33284690 A JP33284690 A JP 33284690A JP H04199331 A JPH04199331 A JP H04199331A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- emulation
- register
- instructions
- space
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はCl5C(コンプレックス・インストラクショ
ン・セット・コンピュータ)型マイクロコンピュータと
同様な高機能命令をサポートするマイクロコンピュータ
、ことにその中央処理装置のアーキテクチャに関する。[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a microcomputer that supports high-performance instructions similar to a Cl5C (complex instruction set computer) type microcomputer, and particularly to the architecture of its central processing unit. Regarding.
比較的簡単な命令セットを持ったRISC(リデュース
ト・インストラクション・セット・コンピュータ)型の
マイクロコンピュータに対してCl5C型マイクロコン
ピユータは、複雑な命令セントを持ち、アドレシングモ
ードも複数備えて高機能化が図られている。これ故、多
くの命令はマイクロ命令形式で実行されるようになって
いた。In contrast to RISC (Reduced Instruction Set Computer) microcomputers, which have relatively simple instruction sets, Cl5C microcomputers have complex instruction sets and multiple addressing modes, making them highly functional. It is planned. Therefore, many instructions were executed in the form of microinstructions.
1989年6月26日に発行の日経エレクトロニクス(
476号)第117頁から130頁記載のマイクロプロ
セッサ1486においては、1クロツクで実行可能な一
部の命令を、ワイヤード・ロジックも使って高速に実行
可能になっており、例えば、命令デコードユニットは、
1クロツク命令に対応するマイクロ命令のほとんどを生
成し、マイクロコードROMを使わず直接マイクロ命令
を生成して、これを制御ユニットに送ることができるよ
うになっている。Nikkei Electronics (published on June 26, 1989)
No. 476) The microprocessor 1486 described on pages 117 to 130 can execute some instructions that can be executed in one clock at high speed by also using wired logic. ,
Most of the microinstructions corresponding to one clock instruction are generated, and the microinstructions can be directly generated without using the microcode ROM and sent to the control unit.
本発明者は前記従来技術を検討したところ、■クロック
命令の為の[命令デコーダ→制御ユニツ1−→実行ユニ
ット」の制御パスと、その他の高機能命令のための「マ
イクロコートROM→制御ユニッ1へ→実行ユニット」
の制御パスが必要になる。After studying the above-mentioned prior art, the present inventor found that: (1) the control path of [instruction decoder → control unit 1 - → execution unit] for clock instructions, and the control path of [micro code ROM → control unit] for other high-function instructions; Go to 1 → Execution unit”
control path is required.
このため、ハードウェア構成並びに制御が複雑になると
共に、チップサイズも大型化するという問題点が明らか
にされた。As a result, it has become clear that the hardware configuration and control become complicated, and the chip size also increases.
本発明の目的は、比較的簡単な構成によって高機能命令
もサポートすることができるマイクロコンピュータを提
供することにある。An object of the present invention is to provide a microcomputer that can also support high-performance instructions with a relatively simple configuration.
本発明の前記並びにその他の目的と新規な特徴は本明細
書の記述並びに添付図面から明らかになるであろう。The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.
本願において開示される発明のうち代表的なものの概要
を簡単に説明すれば下記の通りである。A brief overview of typical inventions disclosed in this application is as follows.
すなわち、マクロ命令セットに含まれる所定命令として
のエミュレーション対象命令を、別のマクロ命令として
のエミュレーション命令列でエミニレ−ジョンするマイ
クロコンピュータを構成スるとき、前記エミュレーショ
ン命令の空間を、その他のマクロ命令(非エミュレーシ
ョン命令)空間とは別に設け、フェッチした命令がエミ
ュレーション対象命令か否かに応じてその命令空間を切
り替え制御するように構成するものである。That is, when configuring a microcomputer that emulates an instruction to be emulated as a predetermined instruction included in a macro instruction set with a sequence of emulation instructions as another macro instruction, the space for the emulation instruction is used as a space for other macro instructions. It is provided separately from the (non-emulation instruction) space, and is configured to switch and control the instruction space depending on whether or not the fetched instruction is an emulation target instruction.
命令空間を切り替えてノーマルモード(非エミュレーシ
ョン命令の空間でデータ処理を行う動作モード)からエ
ミュレーションモード(エミュレーション命令の空間で
データ処理を行う動作モード)に移行し、再びノーマル
モードに戻るときの処理を簡単にするには、命令空間を
元に戻すためのリターン命令をエミュレーション命令列
に含めるようにするとよい。The processing when switching the instruction space to transition from normal mode (operation mode in which data processing is performed in the space of non-emulation instructions) to emulation mode (operation mode in which data processing is performed in the space of emulation instructions) and returning to normal mode again. For simplicity, it is preferable to include a return instruction for restoring the instruction space in the emulation instruction sequence.
命令空間を切り替えてノーマルモードからエミュレーシ
ョンモードに移行した後で再びノーマルモードに戻った
ときの処理の継続性を保証するとき、プログラムカウン
タなどの状態保存に余計な時間を費やさないようにする
には、プログラムカウンタ及びコンデイションコートレ
ジスタなどを、エミュレーション命令用とその他のマク
ロ命令用とで、それぞれ別々に設け、前記命令空間の切
り替えに同期してそれらレジスタも切り替えるようにす
ればよい。To avoid wasting unnecessary time saving the state of the program counter, etc. when switching the instruction space to ensure continuity of processing when switching from normal mode to emulation mode and then returning to normal mode. , a program counter, a condition code register, etc. may be provided separately for emulation instructions and other macro instructions, and these registers may be switched in synchronization with the switching of the instruction space.
同しく、状態保存などに手間をかけずに処理の継続性を
保証し、さらにはエミュレーションによる高機能処理に
必要なレジスタや作業領域を大きくする必要がある場合
には、エミュレーション命令の実行にのみ利用可能なテ
ンポラリレジスタを、エミュレーション命令実行用のリ
ソースとして追加利用可能にしたり、データメモリ空間
もエミュレーション命令実行用とその他のマクロ命令実
行用とで夫々別々にすることが望ましい。Similarly, if it is necessary to guarantee the continuity of processing without taking the trouble of saving the state, and to increase the registers and work area required for high-performance processing by emulation, only the execution of emulation instructions can be performed. It is desirable to make available temporary registers available for additional use as resources for executing emulation instructions, and to separate data memory spaces for executing emulation instructions and for executing other macro instructions.
エミュレーション命令を実行するための演算処理に、こ
れに対応するエミュレーション対象命令のオペレーショ
ンコードやイミイディエイト値を利用可能にするには、
フェッチされたエミュレーション対象命令の転送を受け
てこれを保持すると共に、これが保持するエミュレーシ
ョン対象命令の全部または一部を演算部に転送可能なエ
ミュレーションインストラクションレジスタを設けてお
くとよい。To make the operation code and immediate value of the corresponding emulation target instruction available for calculation processing to execute the emulation instruction,
It is preferable to provide an emulation instruction register that can receive and hold the fetched emulation target instructions and transfer all or part of the emulation target instructions held thereby to the arithmetic unit.
エミュレーション対象命令に対応するエミュレーション
命令列の先頭番地を簡単に得るには、エミュレーション
対象命令におけるオペレーションコートの全部又は一部
を当該番地に反映させるとよい。In order to easily obtain the start address of the emulation instruction string corresponding to the emulation target instruction, it is preferable to reflect all or part of the operation code in the emulation target instruction at the address.
命令フェッチ、命令デコード、命令実行など複数段のパ
イプライン処理で命令を実行するとき、命令デコートサ
イクルでエミュレーション対象命令を検出したとき、こ
れに並行する命令フェッチサイクルで既にフェッチされ
た次命令を捨てなくても済むようにするには、当該次命
令を保存する為のインストラクション待避レジスタを設
けておくことが望ましい。When executing an instruction in multiple stages of pipeline processing such as instruction fetch, instruction decode, and instruction execution, when an instruction to be emulated is detected in an instruction decode cycle, the next instruction that has already been fetched is detected in a parallel instruction fetch cycle. In order to avoid the need to discard the next instruction, it is desirable to provide an instruction save register to save the next instruction.
上記した手段によれば、Cl5C型マイクロコンピユー
タなどの既存の命令セットにおける未定義命令コードを
流用して、これにエミュレーション対象命令のコードを
割当て、当該エミュレーション対象命令を前記既存の命
令セットなどに含まれる命令列でエミュレーション可能
なように、当該命令列をエミュレーション命令空間に配
置する。According to the above-mentioned means, an undefined instruction code in an existing instruction set such as a Cl5C type microcomputer is used, a code of an instruction to be emulated is assigned to it, and the instruction to be emulated is included in the existing instruction set. The instruction sequence is placed in the emulation instruction space so that it can be emulated with the instruction sequence.
したがって、ノーマルモートで実行される命令とエミュ
レーションモートで実行されるエミュレーション命令は
共通の命令デコーダで解読可能になり、エミュレーショ
ン対象命令のような高機能命令のためにそれ専用のマイ
クロ・コーF ROMを特別に設けなくても済む。Therefore, instructions executed in the normal mode and emulation instructions executed in the emulation mode can be decoded by a common instruction decoder, and a dedicated micro code F ROM is required for high-performance instructions such as the instructions to be emulated. No special provision is required.
(マイクロコンピュータ・チップ)
第1図には本発明の一実施例に係るマイクロコンピュー
タ1が示される。(Microcomputer Chip) FIG. 1 shows a microcomputer 1 according to an embodiment of the present invention.
この、マイクロコンピュータ1は、特に制限されないが
、命令フェッチ、命令デコートによる制御 ・信号生成
、並びにその他各種制御を行う制御部2、演算部3、動
作プログラムを保有するROM4、作業領域若しくはデ
ータの一時記憶領域とされるRAM5、周辺モジュール
6を含み、それらは、公知の半導体集積回路製造技術に
より リコンのような1個の半導体基板に形成されて
いる。このマイクロコンピュータ1は、命令用バスとオ
ペランド用バスが分離された所謂バーバードアーキテク
チャを有し1例えば命令データバスIMDINと、命令
アドレスバスIMAOUTが、制御部2、演算部3.及
びROM4に接続され、また、オペランドアドレス出力
バスDMA0UT、オペランドデータ入カバスDMDI
N、及びオペランドデータ出力バスDMDOUTが、演
算部3とRAM5に続される。尚、7はメモリアクセス
制御信号の外部出力回路、8はアドレス信号の外部出力
回路、9はデータの外部入出力回路、1oは周辺モジュ
ール6と接続される外部入出力回路である。This microcomputer 1 includes, but is not particularly limited to, a control unit 2 that performs control by fetching instructions, decoding instructions, generating signals, and various other controls, an arithmetic unit 3, a ROM 4 that stores operating programs, and a work area or temporary data storage area. It includes a RAM 5 serving as a storage area and a peripheral module 6, which are formed on one semiconductor substrate such as a silicone by known semiconductor integrated circuit manufacturing technology. This microcomputer 1 has a so-called Barbed architecture in which an instruction bus and an operand bus are separated. and ROM4, and is also connected to the operand address output bus DMA0UT and the operand data input bus DMDI.
N and an operand data output bus DMDOUT are connected to the arithmetic unit 3 and the RAM 5. Note that 7 is an external output circuit for memory access control signals, 8 is an external output circuit for address signals, 9 is an external input/output circuit for data, and 1o is an external input/output circuit connected to the peripheral module 6.
本実施例のマイクロコンピュータ1は、単純な命令をハ
ードワイヤード論理で実現すると共に、複雑な高機能命
令はこれら単純な命令を組み合わせてエミュレーション
で実現するものであり、当該マイクロコンピュータ1が
処理する命令は、エミュレーション弁封iとされるネイ
ティブ命令、エミュレーション対象命令、未定義命令、
そしてエミュレーション対象命令をエミュレーションで
実現するためのエミュレーション命令に区別される。例
えば、本実施例のマイクロコンピュータ1のアーキテク
チャと共通性のあるCl5C型マイクロコンピユータの
既存の命令セットと比較スルと、それにおけるネイティ
ブ命令は相互に共通され、当該命令セットにおける未定
義命令コードを流用してこれにエミュレーション対象命
令のコートが割当てられ、また、エミュレーション命令
には前記ネイティブ命令などが利用される。The microcomputer 1 of this embodiment realizes simple instructions using hard-wired logic, and complex high-function instructions by emulating a combination of these simple instructions. are native instructions, emulation target instructions, undefined instructions,
These instructions are classified into emulation instructions for emulating instructions to be emulated. For example, when comparing the existing instruction set of a Cl5C type microcomputer that has architecture common to the microcomputer 1 of this embodiment, the native instructions therein are mutually common, and undefined instruction codes in the instruction set are used. The code of the instruction to be emulated is then assigned to this, and the native instruction or the like is used as the emulation instruction.
前記ROM4はエミュレーションROM 4.0とユー
ザROM4 ]に空空間側され、エミュレーションRO
M40はエミュレーション命令によって構成された動作
プログラムの格納領域とされ、ユーザROM41はネイ
ティブ命令並びにエミュレーション対象命令によって構
成された動作プログラムの格納領域とされる。エミュレ
ーションROM4.0とユーザROM41の命令空間の
切り替えは制御部2から出力される制御信号φ■によっ
て制御され、制御部2がフェッチした命令のデコード動
作で当該命令がエミュレーション対象命令であることを
検出すると、所定のタイミングを以て命令空間をユーザ
ROM4.1からエミュレーションR,0M40に切り
替える。The ROM4 is an empty space between the emulation ROM 4.0 and the user ROM4, and the emulation ROM 4.0 and the user ROM4 are empty spaces.
The M40 is a storage area for an operating program made up of emulation instructions, and the user ROM 41 is used as a storage area for an operating program made up of native instructions and emulation target instructions. Switching between the instruction spaces of the emulation ROM 4.0 and the user ROM 41 is controlled by a control signal φ■ output from the control unit 2, and when the control unit 2 decodes the fetched instruction, it detects that the instruction is an emulation target instruction. Then, at a predetermined timing, the instruction space is switched from the user ROM4.1 to the emulation R.0M40.
前記RAM5はエミュレーションRAM50とユーザR
AM51に空間分割され、エミュレーションRAM50
はエミュレーション命令の実行に専用化される作業領域
などとされ、ユーザRAM51はネイティブ命令並びに
エミュレーション対象命令の実行に利用される作業領域
などとされる。The RAM 5 is an emulation RAM 50 and a user R
Space divided into AM51, emulation RAM50
is a work area dedicated to executing emulation instructions, and the user RAM 51 is a work area used for executing native instructions and emulation target instructions.
エミュレーションRAM50とユーザRAM51の空間
の切り替えは、制御部2から出力される制御信号φDに
よって制御され、制御部2がフェッチした命令のデコー
ド動作で当該命令がエミュレーション対象命令であるこ
とを検出すると、所定のタイミングを以てその空間をユ
ーザRAM51からエミュレーションRAM50に切り
替える。Switching between the emulation RAM 50 and the user RAM 51 is controlled by a control signal φD output from the control unit 2, and when the control unit 2 detects that the fetched instruction is an emulation target instruction in the decoding operation of the fetched instruction, a predetermined The space is switched from the user RAM 51 to the emulation RAM 50 at the timing of .
(中央処理装置)
第2図には前記制御部2及び演算部3の詳細な一例が示
される。(Central Processing Unit) FIG. 2 shows a detailed example of the control section 2 and calculation section 3.
同図においてIRQからIR5はインストラクションレ
ジスタであり、命令を多段パイプラインで実行するとき
、その動作サイクルに従って命令を順次後段にシフトし
て伝達していく。D E CF。In the figure, IRQ to IR5 are instruction registers, and when instructions are executed in a multistage pipeline, the instructions are sequentially shifted and transmitted to subsequent stages according to the operation cycle. D E CF.
DECA、DECD、DECMは、それぞれ対応するイ
ンストラクションレジスタなどから供給される命令など
を解読して制御信号を生成するための命令デコーダであ
り、命令デコーダDECFは命令の全フィールドをフル
デコードして、命令の種別を判定したり、判定された種
別に応じた基本的な操作のための制御信号を生成する。DECA, DECD, and DECM are instruction decoders for generating control signals by decoding instructions supplied from the corresponding instruction registers, etc., and the instruction decoder DECF fully decodes all fields of the instruction and outputs the instructions. and generates control signals for basic operations according to the determined type.
命令デコーダDECAは算術論理演算や算術演算などの
ための演算制御信号やデータ転送のための制御信号を生
成する。命令デコーダDECDはメモリ(RAM)アク
セスのための制御信号を生成する。命令デコーダDEC
Mは乗算のための制御信号を生成する。制御回路C0N
Tは、パイプライン制御、例外処理の制御、スコアボー
ド制御、並びにレジスタの選択制御等を行う。タグレジ
スタTAG 1からTAG5には命令デコーダDECF
でフルデコードされて得られた所定の情報が保持され、
命令デコーダDECA、DECD、DECMに供給され
る。例えばエミュレーション対象命令であるか否かとい
った命令の種別に関する情報やメモリアクセスが必要か
否か1乗算処理をするか否かといった情報を保持する。The instruction decoder DECA generates operation control signals for arithmetic logical operations, arithmetic operations, etc., and control signals for data transfer. The instruction decoder DECD generates control signals for memory (RAM) access. Instruction decoder DEC
M generates control signals for multiplication. Control circuit C0N
T performs pipeline control, exception handling control, scoreboard control, register selection control, and the like. Tag registers TAG1 to TAG5 have instruction decoders DECF.
Predetermined information obtained by full decoding is retained,
It is supplied to instruction decoders DECA, DECD, and DECM. For example, it holds information regarding the type of instruction, such as whether it is an emulation target instruction, and information such as whether memory access is required and whether multiplication by 1 is to be performed.
前記空間切り替えのための制御信号φ■は命令デコーダ
DECF及びラッチLATIを介して出力される。命令
デコーダDECFは、これに供給される命令のオペレー
ションコードがエミュレーション対象命令であることを
検出すると、制御信号φ■のレベルを反転して、ROM
4の命令空間をエミュレーションROM4.0に切り替
える。また、制御信号φDは命令デコーダDECD及び
ラッチLATDを介して出力される。命令デコーダDE
CDは、これに供給される命令のオペレーションコード
又はタグレジスタTAG2から供給される情報からエミ
ュレーション対象命令であることを検出すると、制御信
号φDのレベルを反転して、RAM5の空間をエミュレ
ーションRAM 50に切り替える。The control signal φ■ for the space switching is outputted via the instruction decoder DECF and the latch LATI. When the instruction decoder DECF detects that the operation code of the instruction supplied to it is an instruction to be emulated, it inverts the level of the control signal φ■ and decodes the ROM.
4 instruction space is switched to emulation ROM 4.0. Further, the control signal φD is outputted via the instruction decoder DECD and the latch LATD. Instruction decoder DE
When the CD detects that the instruction is an emulation target instruction from the operation code of the instruction supplied to it or the information supplied from the tag register TAG2, it inverts the level of the control signal φD and transfers the space of the RAM 5 to the emulation RAM 50. Switch.
ROM4やRAM5をエミュレーション空間からノーマ
ル空間に戻すのは、特に制限されないが、エミュレーシ
ョン命令列に含まれるRTE(リターン)命令を命令デ
コーダDECFが検出することにより制御信号φIを反
転させ、並びに、R,TE命令のデコード結果をタグレ
ジスタT A G 2を介してデコーダDECDが検出
することにより制御信号φDを反転させて、実現する。There are no particular restrictions on returning the ROM4 or RAM5 from the emulation space to the normal space, but the instruction decoder DECF detects an RTE (return) command included in the emulation command sequence, inverts the control signal φI, and returns R, This is realized by inverting the control signal φD by detecting the decoding result of the TE instruction by the decoder DECD via the tag register TAG2.
エミュレーション対象命令に対応するエミュレーション
命令列の先頭番地は、エミュレーション対象命令におけ
るオペレーションコートの全部又は一部を利用して命令
デコーダDECFなどで生成する。The start address of the emulation instruction string corresponding to the emulation target instruction is generated by an instruction decoder DECF or the like using all or part of the operation code in the emulation target instruction.
インストラクションレジスタIRQにフェッチされた命
令のイミディエイ1〜値は符号拡張並びにデコード論理
DEC8を通してイミデイエイ1〜レジスタIMMに供
給され、算術演算器ATJなどによる演算に供される。Immediate 1 to values of the instructions fetched into instruction register IRQ are supplied to immediacy 1 to register IMM through sign extension and decoding logic DEC8, and are subjected to calculations by arithmetic operation unit ATJ and the like.
EIRは、インストラクションレジスタIRQからエミ
ュレーション対象命令の転送を受けてこれを保持するエ
ミュレーションインストラクションレジスタであり、こ
れが保持するエミュレーション対象命令の全部または一
部を演算部に転送可能とする。The EIR is an emulation instruction register that receives and holds the emulation target instruction from the instruction register IRQ, and allows all or part of the emulation target instructions held by the EIR to be transferred to the arithmetic unit.
IRBはインストラクション待避レジスタであり、命令
フェッチ、命令デコード、命令実行など複数段のパイプ
ライン処理で命令を実行するとき、命令デコーダDEC
Fによる命令テコ−1〜サイクルでエミュレーション対
象命令を検出したとき、これに並行する命令フェッチサ
イクルで既にインス1ラグジョンレジスタIRQにフェ
ッチされた次命令を捨てなくても済むように保存するた
めのバックアップ用のインストラクションレジスタであ
る。このインストラクション待避レジスタIRBにバッ
クアップされた命令は、所定のエミュレーション命令列
の実行が終了した段階で再びインストラクションレジス
タIRQに転送される。IRB is an instruction save register, and when executing an instruction in multiple stages of pipeline processing such as instruction fetch, instruction decode, and instruction execution, the instruction decoder DEC
When an instruction to be emulated is detected in the instruction lever-1 cycle by F, this function is used to save the next instruction that has already been fetched into the instance 1 lag register IRQ in the parallel instruction fetch cycle so that it does not have to be discarded. This is a backup instruction register. The instructions backed up in the instruction save register IRB are transferred to the instruction register IRQ again when execution of a predetermined emulation instruction sequence is completed.
フェッチすべき次命令番地を保有するプログラムカウン
タは、特に制限されないが、4段構成にされ、且つエミ
ュレーションROM40が保有するエミュレーション命
令用のプログラムカウンタPCEMO,PCEMI、P
CEM2.PCEM3と、ユーザROM41が保有する
ネイティブ命令並びにエミュレーション対象命令用のプ
ログラムカウンタPCO,PCI、PC2,Pc3とに
、夫々個別化されている。プログラムカウンタが直列4
段構成にされるのは、パイプライン処理との関係で過去
にフェッチした命令のアI−レスを保持しておいて1例
外処理が発生した場合にそれを利用可能にするためであ
る。pcpcは、条件分岐のための分岐先アドレスを予
め保持して1分岐処理を速やかに行うことができるよう
にするためのものである。また、EXARは例外処理の
為の命令アドレスを保有するレジスタである。Although the program counter holding the next instruction address to be fetched is not particularly limited, it has a four-stage configuration, and includes program counters PCEMO, PCEMI, and PCEMO, PCEMI, and PCEMI for emulation instructions held in the emulation ROM 40.
CEM2. PCEM3 and program counters PCO, PCI, PC2, and Pc3 for native instructions and emulation target instructions held in user ROM 41 are each individualized. Program counter is serial 4
The reason for the staged configuration is to hold the address of instructions fetched in the past in relation to pipeline processing and make it available when one exception handling occurs. The pcpc is used to hold branch destination addresses for conditional branches in advance so that one branch processing can be performed quickly. Further, EXAR is a register that holds an instruction address for exception processing.
コンデイションニー1〜レジスタもエミュレーション命
令用のレジスタCCRE Mと、ネイティブ命令並びに
エミュレーション対象命令用のレジスタCCRに分離さ
れ、プログラムカウンタと同様に、ノーマルモートとエ
ミュレーションモードとで切り替え選択される。The condition knee 1 to registers are also separated into a register CCRE M for emulation instructions and a register CCR for native instructions and emulation target instructions, and are switched between normal mode and emulation mode, similar to the program counter.
汎用レジスタはROからR7とされるが、さらにエミュ
レーション命令専用に、エミユレーション用テンポラリ
レジスタT1からT3を有する。The general-purpose registers are RO to R7, and additionally, temporary emulation registers T1 to T3 are provided exclusively for emulation instructions.
尚、LATCHは算術演算器AUのラッチ回路、SPは
スタックポインタレジスタ、FPはプロシジャコールに
際して自動変数を取得したりするためのベースアドレス
を保持するフレームポインタ、Aは算術論理演算器AL
Uの一方の入力レジスタ、Bは算術論理演算器ALUの
他方の入力レジスタ、C1及びC2は算術論理演算器A
LUの出力値保有レジスタ、MARはバスエラー処理に
利用するためのアドレスレジスタ、MDRI Nは前記
オペランドデータ入力バスDMD I Nから供給され
るデータを一時的に保持するデータレジスタ、MDR,
OU Tはオペランドデータ出力バスDMDOUTに出
力すべきデータを一時的に保持するデータレジスタ、M
ULTは乗算器、MULI及びMUL2は乗算器MUL
Tの入力レジスタである。In addition, LATCH is the latch circuit of the arithmetic operation unit AU, SP is the stack pointer register, FP is the frame pointer that holds the base address for acquiring automatic variables during a procedure call, and A is the arithmetic logic operation unit AL.
One input register of U, B is the other input register of arithmetic logic unit ALU, C1 and C2 are arithmetic logic unit A
The LU output value holding register, MAR, is an address register used for bus error processing.MDRIN is a data register that temporarily holds data supplied from the operand data input bus DMDIN.
OUT is a data register that temporarily holds data to be output to the operand data output bus DMDOUT;
ULT is a multiplier, MULI and MUL2 are multipliers MUL
This is the input register of T.
(命令フォーマット)
第3図には命令フォーマットの基本形態が示される。同
図においてXは命令の種類に応じたオペレーションコー
トが記述される。Rsにはソースレジスタを指定するた
めのコードが記述され、Rdにはディスティネーション
レジスタを指定するためのコードが記述される。1.
m mはイミデイエイト値が記述され、ブランチフォー
マットのCCは分岐の条件とされるコンデイションコー
トを意味する。(Instruction Format) FIG. 3 shows the basic form of the instruction format. In the figure, X describes an operation code corresponding to the type of instruction. A code for specifying a source register is written in Rs, and a code for specifying a destination register is written in Rd. 1.
m m describes an immediate value, and CC in the branch format means a condition code that is a condition for branching.
第4図には[2レジスタフオーマツト」の命令セラ1〜
に含まれる命令の一例として、rMOV。Figure 4 shows instruction cells 1 to 2 of the [2 register format].
An example of instructions included in rMOV.
L」、rLOAD、LJ、rsTORE、LJ、rMO
,V、BJ、rBRA32J、rRTE」、rADDL
I ST、LJ が示される。これに示される命令の
内、ADDLIST、L命令はエミュレーション対象命
令の一つとされる。RTE命令はエミュレーションモー
ドからノーマルモードに戻るための命令である。L”, rLOAD, LJ, rsTORE, LJ, rMO
,V,BJ,rBRA32J,rRTE'',rADDL
I ST, LJ are shown. Among the instructions shown here, the ADDLIST and L instructions are considered to be one of the emulation target instructions. The RTE command is a command for returning from emulation mode to normal mode.
第5図には[ルジスタ及び4ピツトイミゾイエイトフオ
ーマツト」命令の一例としてr S HLA、LJ が
示される。In FIG. 5, r S HLA,LJ is shown as an example of the "Logistor and 4-pit horizontal format" command.
第6図には「ルジスタ及び8ピットイミゾイエイトフォ
ーマット」命令の一例としてrDc。FIG. 6 shows rDc as an example of the "Luzister and 8-pit imizoid format" command.
NVJが示される。この命令rDcONVJはエミュレ
ーション対象命令の一つとされる。NVJ is shown. This instruction rDcONVJ is one of the emulation target instructions.
くレジスタ指定)
前記各種命令フォーマットにおけるレジスタ指定フィー
ルドRs、Rdは夫々4ビツトとされ、ノーマルモード
時におけるソースレジスタ指定フィールドRsやデイ′
ステイネージョンレジスタ指定フィールドRdの値と、
それによって指定されるレジスタとの関係は以下に示さ
れる。The register specification fields Rs and Rd in the various instruction formats are each 4 bits, and the source register specification field Rs and data ' in the normal mode are 4 bits each.
The value of the staycation register specification field Rd,
The relationship with the registers specified thereby is shown below.
指定フィールド値 指定レジスタ0000 →
RO
0001→ R1
0010→ R2
0011→ R3
0100→ R4
0101→ R5
01,10−) R6
0111→ R7
1000〜1111 →不当
ノーマルモートにおいてレジスタ指定フィールFRs、
Rdに1000−11.11の値が記述されている場合
には不当命令例外処理が行われる。Specified field value Specified register 0000 →
RO 0001→ R1 0010→ R2 0011→ R3 0100→ R4 0101→ R5 01,10-) R6 0111→ R7 1000 to 1111 → Register specification field FRs in invalid normal mode,
If a value of 1000-11.11 is written in Rd, illegal instruction exception handling is performed.
マイクロコンピュータ1がエミュレーションモートにあ
るときはレジスタ指定フィールドRs。When the microcomputer 1 is in emulation mode, the register designation field Rs.
Rdの値は、oooo〜0111まではノーマルモート
と同様であるが、1000〜1111までに対しては次
に示す態様でレジスタを指定する新たな意義を有する。The values of Rd from oooo to 0111 are the same as those in normal mode, but values from 1000 to 1111 have a new meaning of specifying registers in the following manner.
下記指定態様は実質的にエミュレーション命令において
有効とされる。The following specification mode is substantially effective in emulation instructions.
指定フィールド値 指定レジスタ1000 →
T1
1001 → T2
1010 → T3
1011 → EIR
1100−+ R5
1101→ Rd
1110 → 未使用
1111 → 未使用
上記レジスタ指定態様において、1000〜1011の
値の指定は、テンポラリレジスタT1、テンポラリレジ
スタT2、テンポラリレジスタT3、又はエミュレーシ
ョンインストラクションレジスタEIRの指定とされる
。即ち、斯るレジスタTl、T2.T3.EIRは、エ
ミュレーション命令を実行するときの専用リソースとし
て追加利用可能にされる。Specified field value Specified register 1000 →
T1 1001 → T2 1010 → T3 1011 → EIR 1100-+ R5 1101 → Rd 1110 → Unused 1111 → Unused In the above register specification mode, the values 1000 to 1011 are specified as temporary register T1, temporary register T2, temporary register This is specified by T3 or emulation instruction register EIR. That is, such registers Tl, T2 . T3. The EIR is additionally made available as a dedicated resource when executing emulation instructions.
また、上記レジスタ指定態様において、1100−+
Rsは、エミュレーション命令のレジスタ指定フィール
ドRsの値が1100であるなら、当該命令に対応する
エミュレーション対象命令のレジスタ指定フィールドR
sに指定されているレジスタを指定するという意味を持
つ。同様に、1101→Rdは、エミュレーション命令
のレジスタ指定フィールドRdの値が1101であるな
ら、当該命令に対応するエミュレーション対象命令のレ
ジスタ指定フィールドRdに指定されているレジスタを
指定するという意味を持つ。このようなレジスタ指定方
式を採用することにより、エミュレーション対象命令が
指定したレジスタを、エミュレーション命令でアクセス
することが可能になる。In addition, in the above register specification mode, 1100-+
If the value of the register specification field Rs of the emulation instruction is 1100, Rs is the register specification field R of the emulation target instruction corresponding to the instruction.
It has the meaning of specifying the register specified by s. Similarly, 1101→Rd has the meaning that if the value of the register specification field Rd of the emulation instruction is 1101, the register specified in the register specification field Rd of the emulation target instruction corresponding to the instruction is specified. By adopting such a register specification method, it becomes possible for the emulation instruction to access the register specified by the emulation target instruction.
(ADDL I ST、L命令)
欣に、エミュレーション対象命令の一例としてADDL
IST、L命令について説明する。(ADDL I ST, L instruction) As an example of an emulation target instruction, ADDL
The IST and L commands will be explained.
このADDLIST、L命令は、第4図に示されるよう
なフォーマットを有し、第7図に示されるように、当該
命令のレジスタ指定フィールドIくdが指しているリス
ト構造に対して、レジスタ指定フィールドRsが指して
いるエン1へりを追加する処理を行う。This ADDLIST, L instruction has a format as shown in FIG. 4, and as shown in FIG. Processing is performed to add the En1 edge pointed to by the field Rs.
当該命令はエミュレーション対象命令であって、以下に
示すEO〜E4の5個のエミュレーション命令によって
実現される。This instruction is an emulation target instruction, and is realized by five emulation instructions EO to E4 shown below.
EO; LOAD、L @Rs、TIEl ; 5
TORE、L Rd、@RsE2 ;MOV、L
Rs、RdE3 ; LOAD、L Tl、
RsE4;RTE
第8図には、前記エミュレーションルーチンを構成する
エミュレーション命令フォーマットの具体例が示されて
いる。EO; LOAD, L @Rs, TIEl; 5
TORE, L Rd, @RsE2; MOV, L
Rs, RdE3; LOAD, L Tl,
RsE4; RTE FIG. 8 shows a specific example of the emulation command format constituting the emulation routine.
このエミュレーションルーチンは、ADDLIST、L
命令のレジスタ指定フィールドRsによって指・定され
ているレジスタが保有する番地のデータをテンポラリレ
ジスタT1にロードして保存しくEO)、ADDLIS
T、L命令のレジスタ指定フィールドRdによって指定
されているレジスタの値を当該ADDLIST、L命令
のレジスタ指定フィールドR,sによって指定されてい
るレジスタが保有する番地に格納しくEl)、ADDL
IST、L命令のレジスタ指定フィールドRsによって
指定されているレジスタが保有する番地のデータを、当
該ADDLIST、L命令のレジスタ指定フィールドR
dによって指定されているレジスタが保有する番地に転
送しくE2)、テンポラリレジスタT1の値を、ADD
LIST、L命令のレジスタ指定フィールドRsによっ
て指定されているレジスタに格納しくE3)、最後にノ
ーマルモードへのリターン処理を行う〔E4〕。This emulation routine is ADDLIST,L
Load the data at the address held by the register specified by the register specification field Rs of the instruction into the temporary register T1 and save it (EO), ADDLIS
Store the value of the register specified by the register specification field Rd of the T, L instruction in the address held by the register specified by the register specification field R, s of the ADDLIST, L instruction.
The data at the address held by the register specified by the register specification field Rs of the IST, L instruction is transferred to the register specification field R of the ADDLIST, L instruction.
To transfer the value of temporary register T1 to the address held by the register specified by d (E2), ADD
The data is stored in the register designated by the register designation field Rs of the LIST and L instructions (E3), and finally the process returns to the normal mode [E4].
前記エミュレーションルーチンを構成するエミュレーシ
ョン命令EO−E4は、エミュレーション命令空間即ち
エミュレーションROM40に格納され、エミュレーシ
ョン命令空間中のベクタテーブルのベースアドレス(エ
ミュレーション・ベクタ・ベース・アドレス)EVBA
に、ADDLIST、L命令のオペレーションコードに
対応して命令デコーダDECFから出力されるエントリ
番地を加算したアドレス、例えばEVBA+64(デシ
マル)番地を先頭に配置される。The emulation instruction EO-E4 constituting the emulation routine is stored in the emulation instruction space, that is, the emulation ROM 40, and is stored at the base address (emulation vector base address) EVBA of the vector table in the emulation instruction space.
The address obtained by adding the entry address output from the instruction decoder DECF corresponding to the operation code of the ADDLIST and L instructions, for example, EVBA+64 (decimal) address, is placed at the beginning.
第9図にはADDLIST、L命令とこれに対応するエ
ミュレーション命令の実行フローの一例が示される。ユ
ーザROM41の命令空間から命令をフェッチして処理
を行うノーマルモートの途中でADDLTST、L命令
が検出されると、エミュレーションROM40の命令空
間で命令をフェッチして処理を進めるエミュレーション
モードに切り替えられる。このモード切り替えにより、
ADDLIST、L命令は、そのオペレーションコード
のデコード結果とエミュレーション・ベクタ・ベース・
アドレスEVBAとによって決定される番地から始まる
エミュレーション命令EO〜E4によって実現され、再
び、ノーマルモードに戻されて、ADDLIST、L命
令に続く命令をユーザROM41の空間で実行していく
。FIG. 9 shows an example of the execution flow of the ADDLIST and L instructions and the corresponding emulation instructions. When the ADDLTST and L instructions are detected during the normal mode in which instructions are fetched from the instruction space of the user ROM 41 and processed, the emulation mode is switched to an emulation mode in which instructions are fetched from the instruction space of the emulation ROM 40 and processing is proceeded. By switching this mode,
The ADDLIST, L instruction decodes the operation code and the emulation vector base.
This is realized by the emulation instructions EO to E4 starting from the address determined by the address EVBA, and the mode is returned to the normal mode, and the instructions following the ADDLIST and L instructions are executed in the space of the user ROM 41.
第10図には前記ADDLIST、L命令をエミュレー
ションによって実現するときの5段パイプライン動作フ
ローの一例が示される。FIG. 10 shows an example of a five-stage pipeline operation flow when the ADDLIST and L instructions are implemented by emulation.
ここで先ず、5段パイプラインは、命令フェッチ(IF
)、命令デコート(ID)、命令実行(EX)、データ
メモリアクセス(MEM)、命令実行結果の書き込み(
WB)の各処理サイクルを、1命令毎に1サイクルづつ
ずらしながら行うものとする。例えば命令N2の処理内
容に代表されるように、ネイティブ命令において命令フ
ェッチサイクルでは、プログラムカウンタPCOの値に
従ってユーザROM41をアクセスして命令をフェッチ
する。命令デコードサイクルでは、フェッチした命令を
デコーダDECFで解読して制御信号を生成すると共に
、プログラムカウンタPCOの値をインクリメントする
。命令実行サイクルでは、算術論理演算器ALUなどの
オペレーションによって演算が行われる。データメモリ
アクセスサイクルではユーザRAM51のアクセスが行
われる。このネイティブ命令の実行に際してアクセスさ
れるRAM5やROM4の空間は制御信号φ■、φDに
よりノーマル空間(ユーザROM41、ユーザRAM5
1が配置された夫々の空間)が選択されている。命令実
行結果の書き込みサイクルでは、その結果が所定のレジ
スタなどに格納される。First, the 5-stage pipeline starts with instruction fetch (IF
), instruction decode (ID), instruction execution (EX), data memory access (MEM), instruction execution result write (
It is assumed that each processing cycle of WB) is performed while being shifted by one cycle for each instruction. For example, as represented by the processing content of instruction N2, in an instruction fetch cycle in a native instruction, the user ROM 41 is accessed according to the value of the program counter PCO to fetch an instruction. In the instruction decode cycle, the fetched instruction is decoded by the decoder DECF to generate a control signal, and the value of the program counter PCO is incremented. In the instruction execution cycle, calculations are performed by operations such as an arithmetic logic unit ALU. In the data memory access cycle, the user RAM 51 is accessed. The spaces of RAM5 and ROM4 that are accessed when executing this native instruction are controlled by control signals φ■ and φD.
1) are selected. In the write cycle of the instruction execution result, the result is stored in a predetermined register or the like.
ネイティブ命令N3の命令デコートサイクルT3でAD
DLIST、L命令が命令デコーダDECFで検出され
ると、当該命令デコードサイクルT3において、制御信
号φ■を反転して命令空間をユーザROM4.1からエ
ミュレーションROM40に切り替え制御すると共に、
インストラクションレジスタIRQにフェッチされてい
る当該命令のオペレーションコードにおける第0番ビッ
トから第3番ビットにて特定される値を16倍して得ら
れるような値に、エミュレーション・ベクタ・ベース・
アドレスEVBAを加算して、エミュレーション命令E
Oの番地を取得し、これをエミュレーションのためのプ
ログラムカウンタPCEMOに格納する。そして、プロ
グラムカウンタPCO〜PC3を、エミユレーション用
のプログラムカウンタP CE M O−P CE M
、 3に切り替え制御してそれを機能させる。更に、A
DDL I ST。AD at instruction decode cycle T3 of native instruction N3
When the DLIST, L instruction is detected by the instruction decoder DECF, in the instruction decoding cycle T3, the control signal φ■ is inverted to control switching of the instruction space from the user ROM 4.1 to the emulation ROM 40.
Emulation vector base
Add address EVBA and emulation instruction E
Obtain the address of O and store it in the program counter PCEMO for emulation. Then, program counters PCO to PC3 are replaced by program counters PCEMO to PC3 for emulation.
, switch control to 3 to make it work. Furthermore, A
DDL I ST.
L命令のデコードサイクルT3に並行してフェッチされ
る次命令N4に対してそのデコードサイクル以降をサプ
レス若しくはキャンセルする制御を行う。Control is performed to suppress or cancel the next instruction N4, which is fetched in parallel with the decode cycle T3 of the L instruction, from that decode cycle onwards.
ADDLIST、L命令のサイクルT4ではコンデイシ
ョンコートレジスタをCCRからエミュレーション専用
のCCREMに切り替える。さらにインストラクション
レジスタIRQが保有する命令N4をインストラクショ
ンレジスタIRBに保存して、エミュレーション終了直
後に利用可能にする。In cycle T4 of the ADDLIST and L instructions, the condition code register is switched from CCR to CCREM exclusively for emulation. Furthermore, the instruction N4 held by the instruction register IRQ is saved in the instruction register IRB, and is made available immediately after emulation ends.
ADDLIST、L命令のサイクルT5では。In cycle T5 of the ADDLIST, L instruction.
制御信号φDを反転しで、データメモリ空間をユーザR
AM51からエミュレーションRAM50に切り替える
。このデータ空間の切り替えタイミングは、パイプライ
ン処理におけるデータメモリアクセス(MEM)に割り
当てられたタイミングに同期して行われるから、ADD
LIST、L命令以前の命令におけるRAM5アクセス
は必ずノーマル空間で行われる。By inverting the control signal φD, the data memory space is
Switch from AM51 to emulation RAM50. This data space switching timing is performed in synchronization with the timing assigned to data memory access (MEM) in pipeline processing, so ADD
Access to the RAM 5 in instructions before the LIST and L instructions is always performed in normal space.
サイクルT4からT7においては、エミュレーション命
令EO−E3がプログラムカウンタP CEMOの値に
従って順次エミュレーションROM40からインストラ
クションレジスタIRQにフェッチされて、実行される
。このときのデータメモリアクセスは、既に空間切り替
えされたエミュレーションRAM50に対し、で行われ
る。In cycles T4 to T7, emulation instructions EO-E3 are sequentially fetched from the emulation ROM 40 to the instruction register IRQ according to the value of the program counter PCEM0 and executed. Data memory access at this time is performed with respect to the emulation RAM 50 whose space has already been switched.
サイクルT8でフェッチされたエミュレーション命令E
4がサイクルT9でデコードされて、RTE命令である
ことが判定されると、命令空間をエミュレーションRO
M4.0からユーザROM41に切り替えると共に、プ
ログラムカウンタをPCEMからPCに切り替える。、
更に、前記インストラクションレジスタIRBに待避さ
れていた命令N4をインストラクションレジスタIRQ
に転送する。したがって、同サイクルT9においてRO
M4からフェッチされた命令は実質的に無効とされ、前
記サイクルT4からT7でサプレスされた命令N4が、
その直後に実行可能にされる。Emulation instruction E fetched in cycle T8
4 is decoded in cycle T9 and determined to be an RTE instruction, the instruction space is transferred to the emulation RO
Switch from M4.0 to user ROM 41, and switch the program counter from PCEM to PC. ,
Furthermore, the instruction N4 saved in the instruction register IRB is transferred to the instruction register IRQ.
Transfer to. Therefore, in the same cycle T9, RO
The instruction fetched from M4 is substantially invalidated, and the instruction N4 suppressed from cycle T4 to T7 is
It is made executable immediately after that.
そして、それ以降ノーマル空間で命令フェッチが行われ
る。After that, instruction fetches are performed in normal space.
前記RTE命令のサイクルTllではRA M 5はエ
ミュレーションRAM、50からユーザRAM51に切
り替えられ、それ以降に続く命令のデータメモリアクセ
スはノーマル空間で行われる。In cycle Tll of the RTE instruction, the RAM 5 is switched from the emulation RAM 50 to the user RAM 51, and data memory access for subsequent instructions is performed in normal space.
(DCONV命令)
次に別のエミュレーション対象命令としてDCONV命
令を説明する。(DCONV Instruction) Next, the DCONV instruction will be explained as another emulation target instruction.
第11図には当該DCONV命令の詳細な命令フォーマ
ットが示される。この命令は、レジスタ指定フィールド
Rsで指定されるレジスタの内容を、コンバートタイプ
指定フィールドTB、TAの内容に応じて変換し、その
結果を再び元のレジスタに戻す処理を行うものである。FIG. 11 shows the detailed instruction format of the DCONV instruction. This instruction converts the contents of the register specified by the register specification field Rs in accordance with the contents of the conversion type specification fields TB and TA, and returns the result to the original register.
コンバートタイプ指定フィールドTB(1’ype
Before)は当該命令実行前のデータタイプを示し
、コンバートタイプ指定フィールドTA(TypeAf
ter)は当該命令実行後のデータタイプを示す。Conversion type specification field TB (1'ype
Before) indicates the data type before execution of the instruction, and the conversion type specification field TA (TypeAf
ter) indicates the data type after execution of the instruction.
前記コンバートタイプ指定フィールドの値とデータタイ
プとの関係は以下のようになっている。The relationship between the value of the conversion type designation field and the data type is as follows.
oooo ;符号付きバイト整数
(下8桁有効)
0001;符号付きワード整数
(下16桁有効)
0010;符号付きロングワード整数
(32桁全ビット有効)
0011;符号付きエクステント整数
(次しジスタ結合、64桁有効)
0100;符号無しバイト整数
(下8桁有効)
0101 ;符号無しワード整数
(下16桁有効)
0 ]、 10 ;符号無しロングワード整数(32桁
全ビット有効)
0111;符号付きエクステント整数
(次しジスタ結合、64桁有効)
1000;IEEE 単精度浮動小数点数(32桁有
効)
1001 ; IEEE 倍精度浮動小数点数(64
桁有効)
1010 ; IEEE 拡張倍精度浮動小数点数(
80桁有効)
1011;未定義
1100;BCD整数(10進数8桁)1101;BC
D整数(10進16桁)1110;未定義
1111 ;未定義
このDCONV命令でサポートするデータフォーマット
変換には複雑な処理を伴うため、当該命令を実現するた
めのエミュレーションには条件分岐が採用されている。oooo; Signed byte integer (lower 8 digits valid) 0001; Signed word integer (lower 16 digits valid) 0010; Signed longword integer (all 32 digits valid) 0011; Signed extent integer (next register join, 64 digits valid) 0100; Unsigned byte integer (lower 8 digits valid) 0101; Unsigned word integer (lower 16 digits valid) 0 ], 10; Unsigned longword integer (32 digits all bits valid) 0111; Signed extent Integer (next register combination, 64 digits valid) 1000; IEEE single precision floating point number (32 digits valid) 1001; IEEE double precision floating point number (64 digits valid)
1010; IEEE extended double-precision floating point number (
80 digits valid) 1011; undefined 1100; BCD integer (8 digits decimal) 1101; BC
D integer (16 decimal digits) 1110; undefined 1111; undefined Because the data format conversion supported by this DCONV instruction involves complex processing, conditional branching is used in the emulation to implement this instruction. There is.
この条件分岐では、DC○NV命令のコンバートタイプ
指定フィールドTB。In this conditional branch, the conversion type specification field TB of the DC○NV instruction.
TAを切り出し、これを分岐先番地のオフセットに反映
させる6次にその処理の概要を説明する。Next, an outline of the process of extracting a TA and reflecting it in the offset of the branch destination address will be explained.
例えば命令実行前のデータタイプを示すコンバートタイ
プ指定フィールドTBの値をrooo。For example, the value of the conversion type specification field TB indicating the data type before instruction execution is rooo.
(符号付きパイ1〜整数)」、当該命令実行後のデータ
タイプを示すコンバートタイプ指定フィールドTAの値
をrollo(符号無しロングワード整数)」とする。(signed pi 1 to integer)", and the value of the conversion type designation field TA indicating the data type after execution of the instruction is "rollo (unsigned longword integer)".
第12図に示されるようにユーザROM412G間にお
いてDCONV命令がフェッチされると、命令空間がエ
ミュレーションROM4.0に切り替えられ、そのDC
ONV命令の命令デコート結果が反映されて取得された
アドレスにより、エミュレーションROM40がアクセ
スされて、エミュレーション命令EOを先頭とするエミ
ュレーションルーチンが開始される。この例に従ったエ
ミュレーションルーチンは、エミュレ−ション命令EO
からE3を実行した後、コンバートの内容に従ってエミ
ュレーション命令E8を先頭とするルーチンに条件分岐
し、最後にエミュレーション命令EjでRT E命令を
実行して再びノーマル空間に戻るようにされる。As shown in FIG. 12, when the DCONV instruction is fetched between the user ROMs 412G, the instruction space is switched to the emulation ROM 4.0, and the DC
The emulation ROM 40 is accessed by the address obtained by reflecting the instruction decoding result of the ONV instruction, and an emulation routine starting with the emulation instruction EO is started. The emulation routine according to this example uses the emulation instruction EO
After executing E3 from , a conditional branch is made to a routine starting with emulation instruction E8 according to the contents of the conversion, and finally an RTE instruction is executed with emulation instruction Ej to return to normal space again.
即ち、
(EO;MOV、L ERI、T2)インストラクシ
ョンレジスタIRQを介してエミュレーションインスト
ラクションレジスタEIRに保持されているDCONV
命令がテンポラリレジスタT2に転送され、
(El ;MOV、B T2.T2)そのテンポラリ
レジスタ1゛2に格納されているDCONV命令のコン
バートタイプ指定フィールドTB、TAの全8ビツトの
値が同テンポラリレジスタT2に切り出され。That is, (EO; MOV, L ERI, T2) DCONV held in emulation instruction register EIR via instruction register IRQ
The instruction is transferred to the temporary register T2, and (El; MOV, BT2.T2) all 8-bit values of the conversion type specification fields TB and TA of the DCONV instruction stored in the temporary register 1-2 are transferred to the same temporary register. Cut out by T2.
(E2;5HLA、L T2.#3)テンポラリレジ
スタT2に切り出された値が3ビツトシフトされ、
(E3;BRA32 T2)
プログラムカウンタPCEMの値にテンポラリレジスタ
〕゛2の値を加算して得られたアドレスのエミュレーシ
ョン命令E8に分岐され、(E8〜Ei)
1) CON V命令のレジスタ指定フィールドRsで
指定されるレジスタの値を符号付きパイ1〜整数から符
号無しロングワード整数にコンパ−1・する処理が行わ
れ、
(Ej;RTE)
最後にRTEが実行されて、命令空間がユーザROM4
1空間に切り替えられる。(E2; 5HLA, L T2. #3) The value cut out to temporary register T2 is shifted by 3 bits, and (E3; BRA32 T2) The value of temporary register゛2 is added to the value of program counter PCEM. Branches to address emulation instruction E8, (E8 to Ei) 1) Compares the value of the register specified by the register specification field Rs of the CON V instruction from a signed pi 1 to integer to an unsigned longword integer. Processing is performed, (Ej; RTE) Finally, RTE is executed and the instruction space is transferred to user ROM4.
Can be switched to 1 space.
上記実施例によれば以下の作用効果がある。According to the above embodiment, there are the following effects.
(1)1動作サイクルでは実行することができないAD
DLIST、L命令やDCONV命令のような高機能命
令をエミュレーションで実現するとき、Cl5C型マイ
クロコンピユータの既存の命令セットにおける未定義命
令コードを流用して、これにエミュレーション対象命令
のコードを割当て、当該エミュレーション対象命令を前
記既存の命令セットなどに含まれる命令列でエミュレー
ション可能なように、当該命令列をエミュレーション命
令空間としてエミュレーションROM40に配置してお
く。同エミュレーション命令空間は、エミュレーション
を要しない命令空間としてのユーザROM、41とは別
空間に配置され、フェッチした命令がエミュレーション
対象命令か否かに応じてその命令空間が切り替え制御さ
れる。したがって、ノーマルモードで実行される命令と
エミュレーションモードで実行されるエミュレーション
命令はデコーダDECFなど共通の命令デコーダで解読
可能になり、エミュレーション対象命令のような高機能
命令のためにそれ専用のマイクロ・コードROMを特別
に設けなくても済む。これにより、ハードウェアの複雑
化やチップサイズの大型化を招くことなく、高機能命令
をサポートするマイクロコンピュータを得ることができ
る。(1) AD that cannot be executed in one operation cycle
When realizing high-performance instructions such as DLIST, L instructions, and DCONV instructions by emulation, undefined instruction codes in the existing instruction set of the Cl5C microcomputer are used, and the codes of the instructions to be emulated are assigned to them. In order to be able to emulate an instruction to be emulated with an instruction string included in the existing instruction set, the instruction string is arranged in the emulation ROM 40 as an emulation instruction space. The emulation instruction space is arranged in a separate space from the user ROM 41, which is an instruction space that does not require emulation, and the instruction space is switched depending on whether the fetched instruction is an instruction to be emulated. Therefore, instructions executed in normal mode and emulation instructions executed in emulation mode can be decoded by a common instruction decoder such as a decoder DECF, and a dedicated microcode is used for high-function instructions such as instructions to be emulated. There is no need to provide a special ROM. As a result, a microcomputer that supports high-performance instructions can be obtained without complicating the hardware or increasing the chip size.
(2)命令のエミュレーション用空間髪別に持つことに
より、命令セットを流用する既存のCl5C型マイクロ
コンピユータとの関係においてオペレーティングシステ
ムのベクトルハンドラを変更することなくエミュレーシ
ョンを行うことができ。(2) By having a separate space for instruction emulation, emulation can be performed without changing the vector handler of the operating system in relation to an existing Cl5C type microcomputer that utilizes the instruction set.
従来のソフトウェアとの互換性を確保しながら高機能命
令をサポートすることができる。It can support high-performance instructions while ensuring compatibility with conventional software.
(3)エミュレーション命令列に含まれるRTE命令を
実行して、ノーマルモートからエミュレーションモード
に移行した後に再びノーマルモードに戻るときの処理を
実現することにより、その処理を簡単にすることができ
る。(3) By executing the RTE command included in the emulation command sequence and realizing the process of transitioning from normal mode to emulation mode and then returning to normal mode, the process can be simplified.
(4)プログラムカウンタを、エミュレーション命令用
P CE M O〜PCEM3とその他のマクロ命令用
PCO〜P C3とで夫々別々に設け、同様にコンディ
ションコードレジスタを、エミュレーション命令用CC
RE Mとその他のマクロ命令用CCRとで夫々別々に
設け、前記命令空間の切り替えに同期してそれらレジス
タも切り替え制御することにより、命令空間を切り替え
てノーマルモートからエミュレーションモードに移行し
て再びノーマルモードに戻ったときの処理の継続性を保
証するときにプログラムカウンタなどの状態保存に余計
な時間を費やさなくても済むと共に、状態保存のための
処理も大部分省略することができる。(4) Program counters are provided separately for emulation instructions PCEMO to PCEM3 and other macro instructions PCO to PCEM3, and a condition code register is similarly provided for emulation instructions CC
By providing separate registers for RE M and CCR for other macro instructions, and controlling switching of these registers in synchronization with the switching of the instruction space, the instruction space can be switched from normal mode to emulation mode and back to normal mode. When ensuring continuity of processing when returning to the mode, there is no need to spend extra time saving the state of the program counter, etc., and most of the processing for saving the state can also be omitted.
、(5)エミュレーション命令の実行にのみ利用可能な
テンポラリレジスタT1〜T3を、エミュレーション命
令実行用のリソースとして追加利用可能にしたり、デー
タメモリ空間もエミュレーション命令実行用(エミュレ
ーションRAM50)とその他のマクロ命令実行用(ユ
ーザRAM51)とで夫々別々にすることにより、同じ
く、状態保存などに手間をかけずに処理の継続性を保証
する事ができると共に、エミュレーションによる高機能
処理に必要なレジスタや作業領域を大きくすることがで
きる。, (5) Temporary registers T1 to T3 that can only be used to execute emulation instructions can be additionally used as resources for executing emulation instructions, and data memory space can also be used for executing emulation instructions (emulation RAM 50) and other macro instructions. By having separate memory for execution (user RAM 51), continuity of processing can be guaranteed without the hassle of saving the state, and the registers and work area necessary for high-performance processing through emulation can also be secured. can be made larger.
(6)フェッチされたエミュレーション対象命令の転送
を受けてこれを保持すると共に、これが保持するエミュ
レーション対象命令の全部または一部を演算部3に転送
可能なエミュレーションインストラクションレジスタE
IRを設けておくことにより、エミュレーション命令を
実行するための演算処理に、これに対応するエミュレー
ション対象命令のオペレーションコードやイミイデイエ
イ1〜値を利用可能にすることができる。(6) Emulation instruction register E that receives and holds the fetched emulation target instructions and can transfer all or part of the emulation target instructions held thereby to the calculation unit 3
By providing the IR, it is possible to use the operation code and values of the corresponding emulation target instruction in the arithmetic processing for executing the emulation instruction.
(7)エミュレーション対象命令におけるオペレーショ
ンコートの全部又は一部をエミュレーション命令列の先
頭番地に反映させることにより、当該番地を命令デコー
トサイクルを利用して簡単な処理で短時間に得ることが
できるようになる。(7) By reflecting all or part of the operation code in the emulation target instruction to the first address of the emulation instruction sequence, the address can be obtained in a short time by simple processing using the instruction decode cycle. become.
(8)命令フェッチ、命令デコート、命令実行など複数
段のパイプライン処理で命令を実行するとき、命令テコ
−1〜サイクルでエミュレーション対象命令を検出した
とき、ごれに並行する命令フェノ9サイクルで既にイン
ストラクションレジスタI RQにフェッチされている
次命令を保存するためのインストラクション待避しジス
タIRBを設けておき、エミュレーション命令列のRT
’ E命令を実行したとき同レジスタIRBの値をイン
ストラクションレジスタI RQに戻すようにすること
により、命令実行動作効率を向トさせることができる。(8) When executing an instruction in multiple stages of pipeline processing such as instruction fetch, instruction decoding, and instruction execution, when an instruction to be emulated is detected in instruction lever-1 to cycle, instruction pheno-9 cycles parallel to the error are detected. An instruction save register IRB is provided to save the next instruction that has already been fetched into the instruction register IRQ.
By returning the value of the register IRB to the instruction register IRQ when the 'E instruction is executed, the efficiency of the instruction execution operation can be improved.
以」−本発明者によってなされた発明を実施例に基づい
て具体的に説明したが、本発明はそれに限定されるもの
ではなく、その要旨を逸脱しない範囲において種々変更
することができる。Although the invention made by the present inventor has been specifically explained based on examples, the present invention is not limited thereto and can be modified in various ways without departing from the gist thereof.
例えば、エミュレーション対象命令は上記実施例のAD
DLIST、L命令やDCONV命令に限定されず、比
較的処理ステップ数が多くなるその他の命令として設定
することができる。また、命令フォーマットや命令の種
別は上記実施例に限定されず適宜変更することができる
。For example, the emulation target instruction is the AD of the above embodiment.
The instruction is not limited to the DLIST, L instruction, or DCONV instruction, but can be set as any other instruction that requires a relatively large number of processing steps. Furthermore, the instruction format and instruction type are not limited to the above embodiments and can be changed as appropriate.
インストラクションレジスタの直列段数やプログラムカ
ウンタの直列段数はマイクロコンピュータの機能に応じ
て変更可能である。さらに、内蔵される演算器の種類や
内部バスの構成も上記実施例に限定されない。The number of serial stages of instruction registers and the number of serial stages of program counters can be changed depending on the functions of the microcomputer. Furthermore, the type of built-in arithmetic unit and the configuration of the internal bus are not limited to the above embodiments.
以上の説明では主として本発明者によってなされた発明
をその背景となった利用分野である、RA、、M、RO
M、、周辺ジュールを1チツプに内蔵したマイクロコン
ピュータに適用した場合について説明したが、本発明は
それに限定されるものではなく、RAM、ROM、周辺
ジュールをオン・チップ化していないマイクロコンピュ
ータにも広くて適用することができる。本発明は、少な
くとも、高機能命令をエミュレーションで実現する条件
のものに適用することができる。In the above explanation, the invention made by the present inventor will be mainly explained based on the field of application which is the background of the invention, such as RA, M, RO.
Although the case where the present invention is applied to a microcomputer with built-in peripheral modules on one chip has been described, the present invention is not limited thereto, and can also be applied to microcomputers in which RAM, ROM, and peripheral modules are not integrated on a chip. Widely applicable. The present invention can be applied at least to conditions where high-performance instructions are realized by emulation.
本願において開示される発明のうち代表的なものによっ
て得られる効果を簡単に説明すれば下記の通りである。A brief explanation of the effects obtained by typical inventions disclosed in this application is as follows.
すなわち、高機能命令をエミュレーションで実現すると
き、命令のエミユレーション用空間を別に設け、フェッ
チした命令がエミュレーション対象命令か否かに応じて
命令空間を切り替え制御して、ノーマルモードとエミュ
レーションモートを達成するから、双方の動作モードで
夫々実行される命令は共通の命令デコーダで解読可能に
なり、エミュレーション対象命令のような高機能命令の
ためにそれ専用のマイクロ−コードROMを特別に設け
なくても済み、これにより、ハードウェアの複雑化やチ
ップサイズの大型化を招くことなく、高機能命令をサポ
ートするマイクロコンピュータを得ることができるとい
う効果がある。In other words, when realizing high-performance instructions by emulation, a separate instruction emulation space is provided, and the instruction space is switched and controlled depending on whether the fetched instruction is an instruction to be emulated, and the normal mode and emulation mode are controlled. As a result, instructions executed in both operating modes can be decoded by a common instruction decoder, and there is no need to provide a special micro-code ROM for high-function instructions such as emulated instructions. This has the effect of making it possible to obtain a microcomputer that supports high-performance instructions without complicating the hardware or increasing the chip size.
しかも、命令のエミユレーション用空間を別に持つこと
により、命令セットを流用する既存のマイクロコンピュ
ータとの関係においてオペレーティングシステムのベク
トルハンドラを変更することなくエミュレーションを行
うことができ、従来のソフトウェアとの互換性を確保し
ながら高機能命令をサポートすることができる。Moreover, by having a separate space for instruction emulation, emulation can be performed without changing the vector handler of the operating system in relation to existing microcomputers that reuse the instruction set, and it is possible to perform emulation without changing the vector handler of the operating system. It is possible to support high-performance instructions while ensuring compatibility.
ノーマルモードからエミュレーションモードに移行した
後に再びノーマルモートに戻るときの処理を、エミュレ
ーション命令列に含まれるリターン命令を実行するこで
実現することにより、その処理を簡単にすることができ
る。The process of returning to normal mode after transitioning from normal mode to emulation mode can be simplified by executing a return instruction included in the emulation instruction sequence.
プログラムカウンタやコンディションコードレジスタな
どをエミュレーション命令用とその他のマクロ命令用と
でそれぞれ別々に設け、命令空間の切り替えに同期して
それらレジスタも切り替え制御することにより、命令空
間を切り替えてノーマルモードからエミュレーションモ
ードに移行して再びノーマルモードに戻ったときの処理
の継続性を保証するときにプログラムカウンタなどの状
態保存に余計な時間を費やさなくても済むという効果が
ある。By providing separate program counters, condition code registers, etc. for emulation instructions and other macro instructions, and controlling the switching of these registers in synchronization with switching the instruction space, you can switch the instruction space and emulate from normal mode. This has the advantage that there is no need to spend extra time saving the state of the program counter, etc. when ensuring continuity of processing when transitioning to normal mode and returning to normal mode.
エミュレーション命令の実行にのみ利用可能なテンポラ
リレジスタを、エミュレーション命令実行用のリソース
として追加利用可能にしたり、データメモリ空間もエミ
ュレーション命令実行用とその他のマクロ命令実行用と
で夫々別々にすることにより、同じく、状態保存などに
手間をかけずに処理の継続性を保証する事ができると共
に、エミュレーションによる高機能処理に必要なレジス
タや作業領域を大きくすることができる。By making temporary registers that can only be used to execute emulation instructions available as additional resources for executing emulation instructions, and by making data memory spaces separate for executing emulation instructions and for executing other macro instructions, Similarly, it is possible to guarantee the continuity of processing without taking the trouble of saving the state, and it is also possible to enlarge the registers and work area necessary for high-performance processing through emulation.
フェッチされたエミュレーション対象命令の転送を受け
てこれを保持し、保持したエミュレーション対象命令の
全部または一部を演算部に転送可能なエミュレーション
インストラクションレジスタを設けておくことにより、
エミュレーション命令を実行するための演算処理で、同
エミュレーション命令に対応するエミュレーション対象
命令のオペレーションコードやイミイディエイト値を容
易に利用することができる。By providing an emulation instruction register that can receive and hold fetched emulation target instructions and transfer all or part of the held emulation target instructions to the arithmetic unit,
In arithmetic processing for executing an emulation instruction, the operation code and immediate value of the emulation target instruction corresponding to the emulation instruction can be easily used.
エミュレーション対象命令におけるオペレーションコー
ドの全部又は一部をエミュレーション命令列の先頭番地
に反映させることにより、当該番地を命令デコードサイ
クルを利用して簡単な処理で短時間に得ることができる
ようになる。By reflecting all or part of the operation code in the emulation target instruction in the first address of the emulation instruction sequence, the address can be obtained in a short time by simple processing using the instruction decode cycle.
命令フェッチ、命令デコート、命令実行など複数段のパ
イプライン処理で命令を実行するとき、命令デコードサ
イクルでエミュレーション対象命令を検出したとき、こ
れに並行する命令フェッチサイクルで既にインストラク
ションレジスタにフェッチされた次命令を保存するため
のインストラクション待避レジスタを設けておき、エミ
ュレーション命令列のリターン命令を実行したとき同レ
ジスタの値をインストラクションレジスタに戻すように
することにより、命令実行動作効率を向上させることが
できる。When executing an instruction in multiple stages of pipeline processing such as instruction fetch, instruction decode, and instruction execution, when an instruction to be emulated is detected in an instruction decode cycle, the next instruction that has already been fetched into the instruction register in a parallel instruction fetch cycle is By providing an instruction save register for storing instructions and returning the value of the register to the instruction register when a return instruction of an emulation instruction sequence is executed, instruction execution efficiency can be improved.
第1図は本発明に係るマイクロコンピュータの一実施例
ブロック図、
第2図は本実施例のマイクロコンピュータにおける中央
処理装置の詳細な一例ブロック図、第3図は命令フォー
マットの基本形態説明図、第4図は2レジスタフオーマ
ツト命令の一例説明図、
第5図はルジスタ及び4ピットイミゾイエイトフォーマ
ット命令の一例説明図。
第6図はルジスタ及び8ピツトイミゾイエイトフオーマ
ツト
第7図はエミュレーション対象命令の一例であるA.D
DLIST.L命令をエミュレーションによって実現す
るための処理内容説明図、第8図はADDLrST.L
命令に対応するエミュレーション命令列の一例フオーマ
ット図第9図はADDLIST.L命令とこれに対応す
るエミュレーションルーチンの実行フローの一例説明図
。
第10図はADDLIST.L命令をエミュレーション
によって実現するときの5段パイプライン動作フローの
一例説明図、
第11図はエミュレーション対象命令の別の例であるD
CONV命令のフォーマット図、第12図はDCONV
命令とこれに対応するエミュレーションルーチンの実行
フローの一例説明図である。
1・・・マイクロコンピュータ、2・・・制御部、3・
・演算部、4・・・ROM、5・・・RAM、40・・
・エミュレーションROM、41・・ユーザROM、5
0・・・エミュレーションRAM、51・・・ユーザR
AM、IRO〜IR5・・インストラクションレジスタ
、IRB・・・インス1−ラクション待避レジスタ、E
IR・・・エミュレーションインストラクションレジス
タ、TAG1〜TAG5・・タグレジスタ、DECF、
DECA、DECD、DECM・・・命令デコーダ、φ
I、φD・・・空間切り替え用制御信号、pcO−PC
3・・・プログラムカウンタ、PCEMO〜PCEM3
・・・エミユレーション用のプログラムカウンタ、T1
〜T3・・・エミユレーション用のテンポラリレジスタ
、CCR・・・コンディションコードレジスタ、CCR
EM・・エミユレーション用のコンディションコードレ
ジスタ、C0NT・・・制御回路。
第 1 図
■
/
第 7 図
第 8 図
/4゜
第 9 図
第11図
第12図
平成4年2月19日
特 許 庁 長 官 殿
1、事件の表示
平成2年特許願第332846号
2、発明の名称
マイクロコンピュータ
3、補正をする者
事件との関係 特許出願人
名称 (5101株式会社日立製作所4、代理人
住所 東京都文京区湯島3丁目21番5号サンコート湯
島401号FIG. 1 is a block diagram of an embodiment of the microcomputer according to the present invention, FIG. 2 is a detailed block diagram of a central processing unit in the microcomputer of this embodiment, and FIG. 3 is a diagram illustrating the basic form of the instruction format. FIG. 4 is an explanatory diagram of an example of a 2-register format instruction, and FIG. 5 is an explanatory diagram of an example of a register and 4-pit equalize format instruction. FIG. 6 shows an example of an instruction to be emulated, and FIG. 7 shows an A.I. D
DLIST. FIG. 8 is an explanatory diagram of the processing contents for realizing the L instruction by emulation. L
FIG. 9 is a format diagram showing an example of an emulation instruction string corresponding to the instruction ADDLIST. FIG. 3 is an explanatory diagram of an example of an execution flow of an L instruction and an emulation routine corresponding thereto. Figure 10 shows ADDLIST. An explanatory diagram of an example of the 5-stage pipeline operation flow when realizing the L instruction by emulation, and FIG. 11 is another example of the instruction to be emulated.
CONV instruction format diagram, Figure 12 is DCONV
FIG. 2 is an explanatory diagram of an example of an execution flow of a command and a corresponding emulation routine. 1...Microcomputer, 2...Control unit, 3.
- Arithmetic unit, 4...ROM, 5...RAM, 40...
- Emulation ROM, 41... User ROM, 5
0... Emulation RAM, 51... User R
AM, IRO to IR5...Instruction register, IRB...Inst 1-action save register, E
IR...Emulation instruction register, TAG1 to TAG5...Tag register, DECF,
DECA, DECD, DECM...instruction decoder, φ
I, φD... Space switching control signal, pcO-PC
3...Program counter, PCEMO to PCEM3
...Program counter for emulation, T1
~T3...Temporary register for emulation, CCR...Condition code register, CCR
EM: Condition code register for emulation, C0NT: Control circuit. Figure 1 ■ / Figure 7 Figure 8 / Figure 4゜Figure 9 Figure 11 Figure 12 February 19, 1992 Director-General of the Patent Office 1, Indication of Case 1990 Patent Application No. 332846 2 , Name of the invention Microcomputer 3, Relationship with the person making the amendment Patent applicant name (5101 Hitachi Ltd. 4, Agent address 401 Suncourt Yushima, 3-21-5 Yushima, Bunkyo-ku, Tokyo)
Claims (1)
ュレーション対象命令を、別のマクロ命令としてのエミ
ュレーション命令列でエミュレーションするマイクロコ
ンピュータであって、前記エミュレーション命令の空間
をその他のマクロ命令空間とは別に持ち、 フェッチした命令がエミュレーション対象命令か否かを
判定し、エミュレーション対象命令を検出したとき、命
令空間をエミュレーション命令空間に切り替えるための
論理を持つ制御手段を含んで、 成るものであることを特徴とするマイクロコンピュータ
。 2、前記制御手段は、フェッチした命令がエミュレーシ
ョン命令としてのリターン命令か否かを判定し、リター
ン命令を検出したとき、エミュレーション命令空間をそ
の他のマクロ命令空間に切り替えるための論理を更に含
んで成るものであることを特徴とする請求項1記載のマ
イクロコンピュータ。 3、エミュレーション命令用とその他のマクロ命令用に
それぞれ専用化されたプログラムカウンタ及びコンディ
ションコードレジスタを有し、前記制御手段には、命令
空間の切り替えに応じて前記レジスタを切り替え選択す
るための論理を更に追加して、 成るものであることを特徴とする請求項1又は2記載の
マイクロコンピュータ。 4、エミュレーション命令の実行にのみ利用可能なテン
ポラリレジスタを設け、 前記制御手段には、エミュレーション対象命令め検出に
応じて、それらテンポラリレジスタを、エミュレーショ
ン命令実行用のリソースとして追加利用可能にする論理
を更に追加して、成るものであることを特徴とする請求
項1乃至3の何れか1項記載のマイクロコンピュータ。 5、インストラクションレジスタからエミュレーション
対象命令の転送を受けてこれを保持すると共に、これが
保持するエミュレーション対象命令の全部または一部を
演算部に転送可能なエミュレーションインストラクショ
ンレジスタを設けて成るものであることを特徴とする請
求項1乃至4の何れか1項記載のマイクロコンピュータ
。 6、前記制御手段に、エミュレーション対象命令におけ
るオペレーションコードの全部又は一部を用いて、対応
するエミュレーション命令の番地を演算するための論理
を更に追加して成るものであることを特徴とする請求項
1乃至5の何れか1項記載のマイクロコンピュータ。 7、エミュレーション命令空間における命令実行と、そ
の他のマクロ命令空間における命令実行とで、それぞれ
専用化されたデータメモリ空間を別々に持ち、 前記制御手段には、命令空間の切り替えに応じてデータ
メモリ空間を切り替え制御するための論理を更に追加し
て、 成るものであることを特徴とする請求項1乃至6の何れ
か1項記載のマイクロコンピュータ。 8、命令デコードサイクルで前記制御手段がエミュレー
ション対象命令を検出したとき、これに並行する命令フ
ェッチサイクルでフェッチされた次命令を保存する為の
インストラクション待避レジスタを設け、 前記制御手段には、前記リターン命令を検出したときに
、インストラクション待避レジスタの値をインストラク
ションレジスタに戻す為の論理を更に追加して、 成るものであることを特徴とする請求項2記載のマイク
ロコンピュータ。[Scope of Claims] 1. A microcomputer that emulates an emulation target instruction as a predetermined instruction included in a macro instruction set with an emulation instruction sequence as another macro instruction, wherein the space of the emulation instruction is used as an emulation instruction string as another macro instruction. A control means that is separate from the instruction space and has logic for determining whether a fetched instruction is an emulation target instruction and switching the instruction space to the emulation instruction space when an emulation target instruction is detected. A microcomputer characterized by: 2. The control means further includes logic for determining whether or not the fetched instruction is a return instruction as an emulation instruction, and for switching the emulation instruction space to another macro instruction space when a return instruction is detected. 2. The microcomputer according to claim 1, wherein the microcomputer is a microcomputer. 3. It has a program counter and a condition code register dedicated for emulation instructions and other macro instructions, and the control means includes logic for switching and selecting the registers in response to instruction space switching. The microcomputer according to claim 1 or 2, further comprising the following. 4. Temporary registers that can be used only for executing emulation instructions are provided, and the control means includes logic that makes these temporary registers available for additional use as resources for executing emulation instructions in response to detection of an instruction to be emulated. 4. The microcomputer according to claim 1, further comprising: a microcomputer according to claim 1; 5. An emulation instruction register is provided which receives and holds the emulation target instruction from the instruction register and can transfer all or part of the emulation target instruction held by the emulation instruction register to the arithmetic unit. A microcomputer according to any one of claims 1 to 4. 6. Claim characterized in that the control means further includes logic for calculating the address of the corresponding emulation instruction using all or part of the operation code in the emulation target instruction. 6. The microcomputer according to any one of items 1 to 5. 7. Separate dedicated data memory spaces are provided for instruction execution in the emulation instruction space and instruction execution in other macro instruction spaces; 7. The microcomputer according to claim 1, further comprising the following logic for switching and controlling the microcomputer. 8. When the control means detects an instruction to be emulated in an instruction decode cycle, an instruction save register is provided for storing the next instruction fetched in a parallel instruction fetch cycle; 3. The microcomputer according to claim 2, further comprising logic for returning the value of the instruction save register to the instruction register when an instruction is detected.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2332846A JPH04199331A (en) | 1990-11-29 | 1990-11-29 | microcomputer |
| KR1019910021030A KR920010422A (en) | 1990-11-29 | 1991-11-23 | Micro computer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2332846A JPH04199331A (en) | 1990-11-29 | 1990-11-29 | microcomputer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04199331A true JPH04199331A (en) | 1992-07-20 |
Family
ID=18259450
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2332846A Pending JPH04199331A (en) | 1990-11-29 | 1990-11-29 | microcomputer |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JPH04199331A (en) |
| KR (1) | KR920010422A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011508921A (en) * | 2007-12-29 | 2011-03-17 | 中国科学院▲計▼算技▲術▼研究所 | RISC processor and register flag bit processing method |
| CN104049948A (en) * | 2013-03-16 | 2014-09-17 | 英特尔公司 | Instruction Emulation Processors, Methods, And Systems |
| JP2014194770A (en) * | 2013-03-16 | 2014-10-09 | Intel Corp | Instruction emulation processors, methods, and systems |
| JP2020140290A (en) * | 2019-02-27 | 2020-09-03 | 株式会社ウーノラボ | Central processing unit |
-
1990
- 1990-11-29 JP JP2332846A patent/JPH04199331A/en active Pending
-
1991
- 1991-11-23 KR KR1019910021030A patent/KR920010422A/en not_active Withdrawn
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011508921A (en) * | 2007-12-29 | 2011-03-17 | 中国科学院▲計▼算技▲術▼研究所 | RISC processor and register flag bit processing method |
| CN104049948A (en) * | 2013-03-16 | 2014-09-17 | 英特尔公司 | Instruction Emulation Processors, Methods, And Systems |
| JP2014182813A (en) * | 2013-03-16 | 2014-09-29 | Intel Corp | Instruction emulation processors, methods, and systems |
| JP2014194770A (en) * | 2013-03-16 | 2014-10-09 | Intel Corp | Instruction emulation processors, methods, and systems |
| US9703562B2 (en) | 2013-03-16 | 2017-07-11 | Intel Corporation | Instruction emulation processors, methods, and systems |
| JP2020140290A (en) * | 2019-02-27 | 2020-09-03 | 株式会社ウーノラボ | Central processing unit |
| US12111788B2 (en) | 2019-02-27 | 2024-10-08 | Uno Laboratories, Ltd. | Central processing unit with asynchronous registers |
Also Published As
| Publication number | Publication date |
|---|---|
| KR920010422A (en) | 1992-06-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100323191B1 (en) | Data processing device with multiple instruction sets | |
| JP5199931B2 (en) | 8-bit microcontroller with RISC architecture | |
| US3646522A (en) | General purpose optimized microprogrammed miniprocessor | |
| US6327647B1 (en) | Method and apparatus for interfacing a processor to a coprocessor | |
| TWI541658B (en) | Data processing apparatus and semiconductor integrated circuit device | |
| US5426783A (en) | System for processing eight bytes or less by the move, pack and unpack instruction of the ESA/390 instruction set | |
| JPH09212358A (en) | Data processing device and microprocessor | |
| JPH09512652A (en) | Data processing with multiple instruction sets | |
| JP2581236B2 (en) | Data processing device | |
| JPH03218523A (en) | Data processor | |
| JPH1165839A (en) | Instruction control mechanism of processor | |
| JP2001142692A (en) | Microprocessor executing two different fixed-length instruction sets, microcomputer and instruction execution method | |
| JPH04233640A (en) | Microcontroller having pseudo-linear bank which switches memory expanding scheme | |
| JPS5811654B2 (en) | Data storage system | |
| US6012138A (en) | Dynamically variable length CPU pipeline for efficiently executing two instruction sets | |
| JPH0391029A (en) | Data processor | |
| JP2001142693A (en) | Microprocessor executing two different fixed-length instruction sets, microcomputer and instruction execution method | |
| JPH04199331A (en) | microcomputer | |
| US5590293A (en) | Dynamic microbranching with programmable hold on condition, to programmable dynamic microbranching delay minimization | |
| JPH0651981A (en) | Data processing device | |
| JP2511151B2 (en) | Data processing device | |
| US5187782A (en) | Data processing system | |
| JP2646855B2 (en) | Data processing device | |
| JP3422690B2 (en) | Execution program generator | |
| KR940002274B1 (en) | Data mask circuit of RCS processor |