JP3105110B2 - Arithmetic unit - Google Patents

Arithmetic unit

Info

Publication number
JP3105110B2
JP3105110B2 JP05118235A JP11823593A JP3105110B2 JP 3105110 B2 JP3105110 B2 JP 3105110B2 JP 05118235 A JP05118235 A JP 05118235A JP 11823593 A JP11823593 A JP 11823593A JP 3105110 B2 JP3105110 B2 JP 3105110B2
Authority
JP
Japan
Prior art keywords
firmware
mode
instruction
instructions
program
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
JP05118235A
Other languages
Japanese (ja)
Other versions
JPH06332692A (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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP05118235A priority Critical patent/JP3105110B2/en
Priority to KR1019940010986A priority patent/KR0127254B1/en
Publication of JPH06332692A publication Critical patent/JPH06332692A/en
Application granted granted Critical
Publication of JP3105110B2 publication Critical patent/JP3105110B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、高性能な電子計算機
の演算処理を実現すると共に、CISC型プログラムを
移植するのに好適なRISC型の演算装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a RISC type arithmetic unit which realizes arithmetic processing of a high-performance electronic computer and is suitable for porting a CISC type program.

【0002】[0002]

【従来の技術】従来のCISC(Complicated Instruc
tion Set Computer)型プロセッサでは、マイクロプ
ログラム制御によって機械語命令を実現していた。ここ
で、機械語命令とは、プロセッサの命令語セットとして
オペレーテングシステム(OS)を含むユーザに提供さ
れたプリミティブな命令語のことである。マイクロプロ
グラム制御のプロセッサでは、図19に示すように、1
つの機械語命令は1ステップないしはそれ以上のマイク
ロプログラムによって実現される。
2. Description of the Related Art Conventional CISC (Complicated Instruc)
In the Option Set Computer type processor, machine language instructions were realized by microprogram control. Here, the machine language instruction is a primitive instruction word provided to a user including an operating system (OS) as an instruction word set of a processor. In a microprogram-controlled processor, as shown in FIG.
One machine language instruction is realized by one or more microprograms.

【0003】高性能なプロセッサでは、性能向上のため
機械語命令はパイプライン処理される。パイプライン処
理とは、例えば、命令フェッチ、命令デコード、オペラ
ンドアドレス計算、オペランドフェッチリクエスト、マ
イクロプログラムフェッチ、マイクロプログラムデコー
ド、オペランドフェッチ、演算処理、結果格納等、機械
語命令を処理する動作をいくつかのステージに分け、先
行する命令がすべてのステージを完了するのを待たずし
て、後続の命令の処理を時間的にオーバーラップして行
うもので、性能向上を目的としたものである。
[0003] In a high-performance processor, machine instructions are pipelined to improve performance. Pipelining refers to several operations for processing machine language instructions, such as instruction fetch, instruction decode, operand address calculation, operand fetch request, microprogram fetch, microprogram decode, operand fetch, arithmetic processing, and result storage. The processing of subsequent instructions is performed in a time-overlapping manner without waiting for the preceding instruction to complete all stages, and is intended to improve performance.

【0004】ここで、1つの機械語命令に対するマイク
ロプログラムが1ステップであれば、パイプラインはと
どこうりなく流れる。しかし、主記憶中のデータの移動
等、処理が複雑で1ステップのマイクロプログラムで処
理を完了できない機器語命令に対しては、2ステップ以
上のマイクロプログラムが必要となる。この場合、パイ
プラインを停止して機械語命令の流れを中断させて複数
のマイクロプログラムを処理する必要があり、ハードウ
エアの動作タイミングに即したコーデングが必要であ
る。
Here, if the microprogram for one machine language instruction is one step, the pipeline flows indefinitely. However, for a machine language instruction whose processing is complicated and processing cannot be completed by a one-step microprogram such as movement of data in the main memory, a microprogram of two or more steps is required. In this case, it is necessary to process a plurality of microprograms by stopping the pipeline to interrupt the flow of machine language instructions, and it is necessary to perform coding in accordance with the operation timing of hardware.

【0005】例えば、主記憶からデータを読み出そうと
すると、オペランドフェッチリクエスト発行、ノップ実
行、オペランドフェッチという具合に機械語命令を記述
することになる。このように、マイクロプログラム処理
は、非常に効率が悪くなることがある。
For example, to read data from the main memory, a machine language instruction is described in such a manner as to issue an operand fetch request, execute a nop, and fetch an operand. Thus, microprogram processing can be very inefficient.

【0006】このような問題を考慮して、いわゆるRI
SC(Reduced Instruction Set Computer)と呼ばれる
コンピュータが開発されている。RISC型コンピュー
タにおいては、基本的には、ハードウエアは機械語命令
を処理する単純なパイプラインとし、マイクロプログラ
ム制御ではなく、すべて機械語命令をハードワイアード
で処理する。そのため、機械語命令の機能はほどんど1
サイクルで実行できるプリミティブなもののみとなる。
In consideration of such a problem, a so-called RI
A computer called a reduced instruction set computer (SC) has been developed. In a RISC-type computer, basically, the hardware is a simple pipeline for processing machine language instructions, and all machine language instructions are hardwired rather than microprogram controlled. Therefore, the function of the machine language instruction is almost 1
Only primitives that can be executed in a cycle.

【0007】[0007]

【発明が解決しようとする課題】従来のCISC型コン
ピュータ用のプログラムをRISC型のコンピュータに
移植する場合、CISC型命令をRISC型の命令で書
き替える必要がある。しかし、前述のように、CISC
型命令は1サイクルで実行できないものも多く、多数の
RISC型命令でCISC型命令を表現した場合には、
RISC型命令の実行中に割り込みが発生したりし、適
切にCISC型命令と同等の機能を実現できない場合が
あった。このように、従来のRISC型コンピュータは
CISC型コンピュータ用プログラムの移植性が高くな
かった。
When a conventional program for a CISC-type computer is ported to a RISC-type computer, it is necessary to rewrite the CISC-type instruction with a RISC-type instruction. However, as mentioned above, CISC
Many types of instructions cannot be executed in one cycle. If a large number of RISC-type instructions express a CISC-type instruction,
In some cases, an interrupt occurs during the execution of a RISC-type instruction, and a function equivalent to a CISC-type instruction cannot be appropriately realized. As described above, the conventional RISC type computer does not have high portability of the program for the CISC type computer.

【0008】また、ハードウエアを操作する命令は、そ
の使用方法が特殊であり、使用方法に制約が多く、か
つ、ハードウエアの構成に依存する。こういった命令を
一般ユーザに解放されたオペレーティングシステム(O
S)に含めると、OSの移植性が悪化し、コードの自動
生成(コンパイラでのコード生成)が困難となり、ま
た、一般ユーザの誤った使用により誤動作が発生する
等、好ましくない。
[0008] Instructions for operating the hardware are special in their use, have many restrictions on their use, and depend on the hardware configuration. These instructions are released to the general user by the operating system (O
When included in S), the portability of the OS deteriorates, automatic generation of code (code generation by a compiler) becomes difficult, and a malfunction occurs due to erroneous use by a general user.

【0009】この発明は上記実情に鑑みてなされたもの
で、CISC型コンピュータ用のプログラムの移植性に
すぐれたRISC型の演算装置を提供することを目的と
する。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and has as its object to provide a RISC-type arithmetic unit having excellent portability of a program for a CISC-type computer.

【0010】また、この発明は、ハードウエアを操作す
る命令等を通常モードの機械語命令セットから除外し、
特殊モードでのみこの種の命令を使用することのできる
信頼性の高い演算装置を提供することを他の目的とす
る。
Further, the present invention excludes instructions for operating hardware from a machine instruction set in a normal mode.
Another object of the present invention is to provide a highly reliable arithmetic unit that can use such instructions only in the special mode.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に、この発明に係わる演算装置は、通常モードと非同期
割り込みが禁止されるファームウエアモードの2つの動
作モードを有するシステムであって、通常モードで実行
されるべきRISC型機械語命令からなる通常モード用
のプログラムを記憶する第1の記憶手段と、ファームウ
エアモードで実行されるべきRISC型機械語命令から
なるファームウエアモード用プログラムを記憶する第2
の記憶手段と、前記第1と第2の記憶手段の機械語命令
を読み出す読み出し手段と、ファームウエアモード専用
の専用レジスタと、ファームウエアモード及び通常モー
ドに共用の共用レジスタセットと、前記読み出し手段に
より読み出された前記ファームウエア用プログラムの命
令を前記専用レジスタセットと前記共用レジスタセット
を用いて実行し、前記通常モード用プログラムの命令を
前記共用レジスタセットを用いて実行する実行手段とを
備えた構成である。 また、本発明に係わる演算装置は、
通常モードで実行されるべきRISC型機械語命令から
なる通常モード用のプログラムおよび前記ファームウエ
アモードへの切り替えを指示する命令とファームウエア
モードで実行されるべきRISC型機械語命令からなる
ファームウエアモード用のプログラおよび通常モードへ
のリターンを指示する命令とを記憶する記憶手段と、通
常状態において、前記記憶手段に記憶された通常モード
用のプログラムの命令を順次読み出し、前記ファームウ
エアモードへの切り替えを指示する命令に応答してファ
ームウエアモード用のプログラムの命令を順次読み出
し、通常モードへのリターンを指示する命令に応答して
通常モード用のプログラムの命令を順次読み出す読み出
し手段と、この読み出し手段により読み出された命令を
実行すると共に、前記ファームウエアモードへの切り替
えを指示する命令に応答して、非同期割り込みを禁止
し、通常モードへのリターンを指示する命令に応答し
て、非同期割り込みを可能とする手段とを備えた構成で
ある。
In order to achieve the above object, an arithmetic unit according to the present invention has an asynchronous mode and an asynchronous mode.
Two operations in firmware mode where interrupts are disabled
System with operation mode, run in normal mode
For normal mode consisting of RISC-type machine instructions to be executed
Storage means for storing the program of
From RISC-type machine instructions to be executed in air mode
Second storing the firmware mode program
Storage means, and machine language instructions of the first and second storage means
Readout means for reading and firmware mode only
Dedicated registers, firmware mode and normal mode
Shared register set shared by
Of the firmware program read from the
Instruction and the dedicated register set and the shared register set
And execute the instructions of the normal mode program.
Execution means for executing using the shared register set.
It is a configuration provided. Further, the arithmetic device according to the present invention includes:
From RISC-type machine language instructions to be executed in normal mode
A normal mode program and the firmware
Instructions and firmware for instructing switching to A mode
Consists of RISC-type machine instructions to be executed in mode
Go to program and normal mode for firmware mode
Storage means for storing a command for instructing return of the
In the normal state, the normal mode stored in the storage means
Instructions of the program for
In response to a command to switch to air mode,
Read the instructions of the program for the firmware mode sequentially
And in response to an instruction to return to normal mode
Reads out the instructions of the normal mode program sequentially
And the instruction read by the reading means.
Execute and switch to the firmware mode
Disables asynchronous interrupts in response to instructions
And responds to the instruction to return to the normal mode.
And means for enabling asynchronous interrupts.
is there.

【0012】また、本発明は、CISI型プログラムを
構成する命令のうち、複数のマイクロプログラムにより
制御され、一体不可分に実行されるべき所定の命令につ
いては、非同期割り込み禁止されるファームウエアモー
ドを設定し、このファームウエアモード内で、前記所定
の命令と同一機能を実現する複数のRISC型命令を実
行することにより、CISC型プログラムをRISC型
プロセッサに移植する方法である。
The present invention also provides a CISI type program.
Among the constituent instructions, multiple microprograms
Controlled, predetermined instructions to be executed
Firmware mode in which asynchronous interrupts are disabled.
Set the firmware and within the firmware mode,
Multiple RISC-type instructions that implement the same function as
By executing the CISC type program,
It is a method of porting to a processor.

【0013】[0013]

【作用】上記構成のRISC型の演算装置によれば、
ァームウエアモードなる超特権モードにおいては、
(1)非同期割り込みが禁止され、(2)同期割り込み
も必要に応じて禁止可能であり、(3)ファームウエア
モード専用のレジスタファイルが配置される。
According to the RISC type arithmetic unit having the above-mentioned structure, the flow is
In the super-privileged mode called the firmware mode ,
(1) Asynchronous interrupts are prohibited, (2) synchronous interrupts can be prohibited if necessary, and (3) a register file dedicated to the firmware mode is arranged.

【0014】(1)、(2)の特徴により、従来の1つ
のCISC型機械語命令で行っていた不可分な処理(実
行中に割り込みが入ることが許されない処理)の実行が
複数のRISC型命令の組み合わせにより実現可能とな
る。
Due to the features of (1) and (2), the execution of inseparable processing (processing in which an interrupt is not allowed during execution) which has been performed by one conventional CISC-type machine language instruction is performed by a plurality of RISC-type machine instructions. It can be realized by a combination of instructions.

【0015】(2)の特徴により、通常モードでは、プ
ログラムエラーとして実行できない命令の組み合わせの
実行や、ハードウエア異常トラップを無視しながらの強
制ログアウト処理等が超特権モードで実現できる。
According to the feature (2), in the normal mode, execution of a combination of instructions that cannot be executed as a program error, forced logout processing while ignoring a hardware error trap, and the like can be realized in the super-privileged mode.

【0016】(3)の特徴により、ファームウエアが動
く際のコンテキストスイッチングが不要になる。従っ
て、超特権モードで実行されるプログラムは通常モード
(通常モードのソフトウエア)からは1つの機械語命令
という位置付けにできる。
The feature (3) eliminates the need for context switching when the firmware operates. Therefore, a program executed in the super-privileged mode can be positioned as one machine language instruction from the normal mode (software in the normal mode).

【0017】また、超特権モードを導入することによ
り、超特権モードという特殊なモードを使って、特定の
ユーザのみにまとまった機能として、ハードウエアを操
作する命令を提供できる。
Further, by introducing the super-privileged mode, it is possible to provide a command for operating hardware as a function for only a specific user using a special mode called the super-privileged mode.

【0018】また、上記構成のCISC型プログラムを
RISC型プロセッサに移植する方法においては、CI
SCプログラムのうち、複数ステップのマイクロプログ
ラムにより制御され、一体部不可分に実行されれるべき
所定の命令についてには、ファームウエアモード内で、
前記所定の命令と同一の機能を実現する複数のRISC
型命令を実行する。このような構成によれば、RISC
型命令の途中で、割り込みが発生し、処理が中断される
ような事態が防止できる。
Further, in the method of porting a CISC-type program having the above configuration to a RISC-type processor,
In the SC program, for a predetermined instruction which is controlled by a multi-step microprogram and is to be executed inseparably as an integral part, in the firmware mode,
A plurality of RISCs realizing the same function as the predetermined instruction
Execute the type instruction. According to such a configuration, the RISC
It is possible to prevent a situation in which an interrupt occurs in the middle of the type instruction and the processing is interrupted.

【0019】[0019]

【実施例】以下、図面を参照し、この発明の実施例を説
明する。まず、この実施例にかかる演算装置の概要を説
明する。この実施例の演算装置においては、ハードウエ
アは機械語命令を処理する単純なパイプライン構成と
し、機械語命令はほとんど1サイクルで実行できるプリ
ミティブなもののみとする。
Embodiments of the present invention will be described below with reference to the drawings. First, an outline of the arithmetic device according to this embodiment will be described. In the arithmetic unit of this embodiment, the hardware has a simple pipeline configuration for processing machine language instructions, and the machine language instructions are almost only primitives that can be executed in one cycle.

【0020】さらに、本実施例では、ファームウエアモ
ードなる超特権モードを導入する。ファームウエアモー
ドは本実施例において新たに導入されたファームウエア
コール命令により、設定される。ファームウエアモード
は通常のオペレーティングシステムやユーザプログラム
の機械語命令が実行される通常モードに比較し、以下の
特徴を有する。 (1) 命令の実行と非同期に起こる割り込み、例え
ば、入出力(I/O)割り込み等は禁止される。 (2) 通常モードでは禁止できない割り込み、例え
ば、プログラムエラー割り込み、TLBミスヒット割り
込み等の同期割り込みも禁止可能である。 (3) 通常モード用のレジスタファイル(レジスタセ
ット)の他にファームウエアモード専用のレジスタファ
イルを有する。さらに、必要に応じて、ファームウエア
モード専用のワークメモリを有する。 (4) キャッシュメモリやTLBの内容を直接操作す
る等ハードウエア依存性の高いハードウエアを制御する
ための機械語命令セットが使用可能である。
Further, in this embodiment, a super-privileged mode which is a firmware mode is introduced. The firmware mode is set by a firmware call instruction newly introduced in the present embodiment. The firmware mode has the following features as compared with the normal mode in which a machine language instruction of a normal operating system or a user program is executed. (1) Interrupts that occur asynchronously with the execution of instructions, such as input / output (I / O) interrupts, are prohibited. (2) Interrupts that cannot be prohibited in the normal mode, for example, synchronous interrupts such as a program error interrupt and a TLB miss hit interrupt can also be prohibited. (3) In addition to a register file for normal mode (register set), a register file dedicated to firmware mode is provided. Further, if necessary, a work memory dedicated to the firmware mode is provided. (4) A machine language instruction set for controlling hardware highly dependent on hardware, such as directly operating the contents of a cache memory or TLB, can be used.

【0021】(1)、(2)の特徴により、従来の1つ
のCISC型機械語命令で行っていた不可分な処理(実
行中に割り込みが入ることが許されない処理)の実行が
複数のRISC型命令の組み合わせにより実現可能とな
る。
Due to the features of (1) and (2), the execution of inseparable processing (processing in which an interrupt is not allowed during execution), which has been performed by one conventional CISC-type machine language instruction, is performed by a plurality of RISC-type instructions. It can be realized by a combination of instructions.

【0022】(2)の特徴により、通常モードでは、プ
ログラムエラーとして実行できない命令の組み合わせの
実行や、ハードウエア異常トラップを無視しながらの強
制ログアウト処理等が実現できる。
According to the feature (2), in the normal mode, execution of a combination of instructions that cannot be executed as a program error, forced logout processing while ignoring a hardware error trap, and the like can be realized.

【0023】(3)の特徴により、ファームウエアが動
作する際のコンテキストスイッチングを不要にしてい
る。従って、ファームウエアはあくまで通常モード(通
常モードのソフトウエア)からは1つの機械語命令とい
う位置付けにできる。これに対し、通常モード内のサブ
ルーチンでは、ルーチンのスイッチングの際に、コンテ
キストのセーブ/リストアが必要である。
The feature (3) eliminates the need for context switching when the firmware operates. Therefore, the firmware can be regarded as one machine language instruction from the normal mode (software in the normal mode). On the other hand, in the subroutine in the normal mode, the context needs to be saved / restored when the routine is switched.

【0024】ハードウエアを操作する命令は、その使用
方法が特殊であり、使用方法に制約が多く、かつ、ハー
ドウエアの構成に依存する。こういった命令を一般ユー
ザに解放されたオペレーティングシステム(OS)に含
めると、OSの移植性が悪化し、コードの自動生成(コ
ンパイラでのコード生成)が困難となり、また、一般ユ
ーザの誤った使用により誤動作が発生する等、好ましく
ない。このため、この種の命令は一般ユーザに提供され
る通常モードの機械語命令セットからは除外すべきであ
る。(4)の特徴によりファームウエアモードという特
殊なモードを使って、特定のユーザ(ファームウエアモ
ードを使用できるレベルのユーザ)にまとまった機能と
して、ハードウエアを操作する命令を提供できる。
Instructions for operating the hardware are special in their use, have many restrictions on their use, and depend on the hardware configuration. If such instructions are included in an operating system (OS) released to general users, portability of the OS will deteriorate, and automatic generation of code (code generation by a compiler) will be difficult. It is not preferable, for example, that a malfunction occurs due to use. For this reason, such instructions should be excluded from the normal mode machine instruction set provided to the general user. According to the feature (4), using a special mode called a firmware mode, an instruction to operate hardware can be provided as a function for a specific user (a user of a level capable of using the firmware mode).

【0025】ファームウエアモードを実現する方法とし
ては、例えば、モード切り替えレジスタを用意し、ファ
ームウエアモードの設定を指示する命令を検出すると、
モードレジスタにファームウエアモードをセットし、非
同期割り込みを禁止し、同期割り込みを禁止するか否か
設定し、さらに、ファームウエアモード専用のレジスタ
ファイルの使用を可能とし、ハードウエアを操作する命
令の使用を可能とするようにすればよい。
As a method of realizing the firmware mode, for example, a mode switching register is prepared, and when an instruction for setting the firmware mode is detected,
Set the firmware mode in the mode register, disable asynchronous interrupts, set whether to disable synchronous interrupts, and enable the use of a register file exclusively for firmware mode, and use instructions to operate hardware May be made possible.

【0026】モード切り替えの手法としては、図1に示
すように、1つのモードレジスタによりパイプライン全
体のモードを制御する方法と、図2に示すように、パイ
プラインのステージ毎にモードレジスタを用意し、ステ
ージ毎にモードを制御する方法等が考えられる。
As a mode switching method, a mode register is controlled by one mode register as shown in FIG. 1 and a mode register is prepared for each stage of the pipeline as shown in FIG. Then, a method of controlling the mode for each stage or the like can be considered.

【0027】なお、図1の方法では、モードを切り替え
る場合にパイプラインを一度フラッシュする必要があ
る。また、図2の方法では、ファームウエアモードを設
定する命令がデコードされた段階で、命令フェッチージ
と命令デコードステージのモードレジスタにファームウ
エアモードを設定し、次のサイクルで、命令実行ステー
ジのモードレジスタにファームウエアモードを設定し、
さらに次のサイクルで、結果格納ステージのモードレジ
スタにファームウエアモードを設定する。
In the method shown in FIG. 1, it is necessary to flush the pipeline once when switching modes. In the method of FIG. 2, when the instruction for setting the firmware mode is decoded, the firmware mode is set in the mode register of the instruction fetch page and the instruction decode stage, and in the next cycle, the mode register of the instruction execution stage is set. Set the firmware mode to
In the next cycle, the firmware mode is set in the mode register of the result storage stage.

【0028】通常モードへの復帰を指示する命令がデコ
ードされた段階で、命令フェッチステージと命令デコー
ドステージのモードレジスタに通常モードを設定し、次
のサイクルで、命令実行ステージのモードレジスタに通
常モードを設定し、さらに次のサイクルで、結果格納ス
テージのモードレジスタに通常モードを設定する。
When the instruction for returning to the normal mode is decoded, the normal mode is set in the mode register of the instruction fetch stage and the instruction decode stage, and the normal mode is set in the mode register of the instruction execution stage in the next cycle. Is set, and in the next cycle, the normal mode is set in the mode register of the result storage stage.

【0029】通常モードとファームウエアモードの切り
替えは、図3に示すように、モードの切り替えを伴った
分岐命令で行う。例えば、通常モードからファームウエ
アモードへの切り替えはファームウエアコール命令によ
り行い、ファームウエアモードから通常モードへのリタ
ーンは、通常モードへの分岐命令により行う。
Switching between the normal mode and the firmware mode is performed by a branch instruction accompanied by mode switching as shown in FIG. For example, switching from the normal mode to the firmware mode is performed by a firmware call instruction, and return from the firmware mode to the normal mode is performed by a branch instruction to the normal mode.

【0030】このような構成において、CISC型コン
ピュータ用のプログラムをRISC型に移植する場合、
通常のCISC型命令については、対応する1または複
数のRISC型命令に置き換える。一方、複数のマイク
ロプログラムにより実行されるCISC型命令であっ
て、一体不可分に実行されるべきものについては、ファ
ームウエアコール命令をおいてから、対応する複数のR
ISC型命令をコーデングし、最後に、通常モードへの
リターン命令をコーデングする。
In such a configuration, when a program for a CISC type computer is ported to a RISC type,
A normal CISC-type instruction is replaced with one or more corresponding RISC-type instructions. On the other hand, for a CISC type instruction executed by a plurality of microprograms and which is to be executed inseparably, a firmware call instruction is provided before a corresponding plurality of R instructions are executed.
The ISC type instruction is coded, and finally, the return instruction to the normal mode is coded.

【0031】このようにコーデングを行えば、複数のマ
イクロプログラムにより一体不可分に実行されていたC
ISC型命令を非同期割り込みが禁止された状態(必要
ならば、同期割り込みも禁止した状態)で複数のRIS
C型命令の組み合わせで実行できる。従って、CISC
型命令により実現されていた機能がRISC型命令によ
り実現できる。しかも、移植は比較的簡単になる。
If coding is performed in this manner, C which has been executed inseparably by a plurality of microprograms
A plurality of RISs with ISC-type instructions with asynchronous interrupts disabled (if necessary, with synchronous interrupts disabled)
It can be executed by a combination of C-type instructions. Therefore, CISC
The function realized by the type instruction can be realized by the RISC type instruction. Moreover, transplantation becomes relatively simple.

【0032】次に、この発明の第1実施例にかかる演算
制御装置の構成を図4と図5を参照して具体的に説明す
る。図4と図5は組み合わされて本発明の第1実施例に
かかるRISC型演算制御装置の構成を示す。
Next, the configuration of the arithmetic and control unit according to the first embodiment of the present invention will be specifically described with reference to FIGS. FIGS. 4 and 5 show the configuration of the RISC-type arithmetic and control unit according to the first embodiment of the present invention in combination.

【0033】図4、5において、符号11は主記憶を示
し、符号12はプロセッサを示す。主記憶11は、通常
モード用のプログラムを格納した通常モード格納領域と
ファームウエアモード用のプログラムを格納したファー
ムウエアモード格納領域を有する。
4 and 5, reference numeral 11 denotes a main memory, and reference numeral 12 denotes a processor. The main memory 11 has a normal mode storage area for storing a normal mode program and a firmware mode storage area for storing a firmware mode program.

【0034】プロセッサ12はパイプライン構造を有
し、命令フェッチステージF、命令デコードステージ
D,命令実行ステージE,結果格納ステージWの4ステ
ージを備える。
The processor 12 has a pipeline structure and includes four stages of an instruction fetch stage F, an instruction decode stage D, an instruction execution stage E, and a result storage stage W.

【0035】命令フェッチステージFは主記憶11から
読み出された命令、オペランドをラッチする命令レジス
タ101を有する。命令デコードステージDは命令レジ
スタ101に保持された命令をデコードする命令デコー
ダ103と、レジスタファイル105(通常モードとフ
ァームウエアモードで使用可能)、ファームウエアモー
ド専用レジスタファイル107、デコード結果を保持す
る制御レジスタ109、命令がファームウエアコール命
令であった場合に命令デコーダ103によりセットされ
るFWM(ファームウエアモード)レジスタ111、レ
ジスタファイル105とファームウエアモード専用レジ
スタファイル107の出力データの一方を選択するマル
チプレクサ113と115、マルチプレクサ113と1
15を制御するアンドゲート117,マルチプレクサ1
13と115の出力をラッチするデータレジスタ11
9,オペランドアドレス生成回路125、アドレスレジ
スタ127、命令デコーダ103の出力と後述する割り
込み制御回路167の出力するセット信号Sの一方を、
割り込み制御回路167の出力する選択制御信号C1に
応答して選択し、FWMレジスタ111に供給するマル
チプレクサMPX1、を有する。
The instruction fetch stage F has an instruction register 101 for latching instructions and operands read from the main memory 11. The instruction decode stage D is an instruction decoder 103 for decoding the instruction held in the instruction register 101, a register file 105 (available in the normal mode and the firmware mode), a firmware mode dedicated register file 107, and a control for holding a decode result. A register 109, a FWM (firmware mode) register 111 set by the instruction decoder 103 when the instruction is a firmware call instruction, and a multiplexer for selecting one of output data of the register file 105 and the firmware mode dedicated register file 107. 113 and 115, multiplexers 113 and 1
AND gate 117 and multiplexer 1 for controlling the control circuit 15
Data register 11 for latching outputs of 13 and 115
9, one of the output of the operand address generation circuit 125, the address register 127, the instruction decoder 103 and the set signal S output from the interrupt control circuit 167, which will be described later,
The multiplexer MPX <b> 1 selects in response to the selection control signal C <b> 1 output from the interrupt control circuit 167 and supplies the selected signal to the FWM register 111.

【0036】命令実行ステージEは、データレジスタ1
19に保持されたデータに数値演算、論理演算等を施す
演算器121と、制御レジスタ109の内容に従って演
算器121を制御する演算器制御回路123を有する。
命令実行ステージEは、さらに、論理アドレスを物理ア
ドレスに高速に変換するためのTLB(TranslationLoo
kaside Buffer)129,TLB129から読み出され
た下位アドレスとアドレスレジスタ127から供給され
たアドレスの下位ビットを比較する比較器131、比較
器131の比較結果をセットするTLBヒットレジスタ
133、オペランドを記憶したキャッシュメモリ13
5、ファームウエアモード専用のワークメモリ137、
キャッシュメモリ135又はワークメモリ137の読み
だしデータを保持するリードデータレジスタ139、制
御レジスタ109の内容をラッチし、命令がロード命令
の際に“1”レベルの選択制御信号C2を出力するレジ
スタ141、演算器121による演算の結果をラッチす
る演算結果レジスタ143、を有する。
The instruction execution stage E includes the data register 1
The arithmetic unit 121 performs a numerical operation, a logical operation, and the like on the data held in the arithmetic unit 19 and an arithmetic unit control circuit 123 that controls the arithmetic unit 121 according to the contents of the control register 109.
The instruction execution stage E further includes a TLB (TranslationLoo) for converting a logical address into a physical address at a high speed.
The comparator 131 compares the lower address read from the TLB 129 with the lower bit of the address supplied from the address register 127, the TLB hit register 133 sets the comparison result of the comparator 131, and stores the operand. Cache memory 13
5. Work memory 137 dedicated to firmware mode
A register 141 for latching contents of a read data register 139 for holding read data of the cache memory 135 or the work memory 137 and a control register 109 and outputting a selection control signal C2 of "1" level when the instruction is a load instruction; An operation result register 143 for latching the result of the operation by the operation unit 121;

【0037】結果格納ステージWは、演算結果レジスタ
143に保持された演算結果またはロード命令が実行さ
れた際にリードデータレジスタ139の出力データDを
レジスタファイル等に格納する格納制御回路145、を
備える。
The result storage stage W is provided with a storage control circuit 145 for storing the operation result held in the operation result register 143 or the output data D of the read data register 139 in a register file when the load instruction is executed. .

【0038】さらに、プロセッサ12は、主メモリ11
におかれた命令アドレスを指定するロケーションカウン
タ151、ロケーションカウンタ151の保持値を+1
更新する更新回路153、サブルーチンコール、ファー
ムウエアコール、通常モードへのリターン等が発生した
場合に分岐先アドレス(物理アドレス)を生成する分岐
先アドレス生成回路155、更新回路153の出力アド
レスと分岐先アドレス生成回路155の出力アドレスの
一方を選択するマルチプレクサ157、マルチプレクサ
157の出力アドレスと後述する割り込み制御回路16
7の出力アドレス(割り込みベクタ)の一方を選択する
マルチプレクサ159を備える。
Further, the processor 12 includes the main memory 11
The location counter 151 for specifying the instruction address set in the location counter is incremented by +1.
Update circuit 153 for updating, subroutine call, firmware call, branch destination address generation circuit 155 for generating a branch destination address (physical address) when a return to the normal mode occurs, output address of update circuit 153 and branch destination A multiplexer 157 for selecting one of the output addresses of the address generation circuit 155, an output address of the multiplexer 157, and an interrupt control circuit 16 described later.
7 is provided with a multiplexer 159 for selecting one of the 7 output addresses (interrupt vector).

【0039】なお、図面上は、キャッシュメモリを使用
せずに、直接主記憶より命令を直接取り出すように記載
しているが、オペランドと同様に、キャッシュメモリを
使用してもよい。
Although the drawing shows that instructions are directly fetched from the main memory without using a cache memory, a cache memory may be used like an operand.

【0040】さらに、プロセッサ12は、割り込み制御
のために、FWMレジスタ111の保持データを反転す
るインバータ161、インバータ161の出力に応じて
非同期割り込み信号をマスクするアンドゲート163、
165と、割り込み制御回路167、命令デコーダ10
3によりセットされるイネーブルレジスタ171、イネ
ーブルレジスタ171の出力とインバータ161の出力
のオアを取るオアゲート173、オアゲート173の出
力と同期割り込み信号のアンドを取るアンドゲート17
5、を備える。
Further, the processor 12 includes an inverter 161 for inverting the data held in the FWM register 111 for interrupt control, an AND gate 163 for masking an asynchronous interrupt signal according to the output of the inverter 161,
165, the interrupt control circuit 167, the instruction decoder 10
3, an OR gate 173 for ORing the output of the enable register 171 with the output of the inverter 161 and an AND gate 17 for ANDing the output of the OR gate 173 and the synchronous interrupt signal.
5 is provided.

【0041】次に、図4、5に示す演算制御装置の動作
を場合を分けて説明する。 1. 通常モードでの動作 1.1 通常状態では、マルチプレクサ157は更新回
路153の出力を選択し、マルチプレクサ159はマル
チプレクサ157の出力を選択する。従って、ロケーシ
ョンカウンタ151のカウント値は順次カウントアップ
し、ロケーションカウンタ151によりアドレスされた
通常モード格納領域内の機械語命令が順次読み出され、
命令レジスタ101に順次セットされる。
Next, the operation of the arithmetic and control unit shown in FIGS. 1. Operation in Normal Mode 1.1 In a normal state, the multiplexer 157 selects the output of the update circuit 153, and the multiplexer 159 selects the output of the multiplexer 157. Therefore, the count value of the location counter 151 sequentially counts up, and the machine language instructions in the normal mode storage area addressed by the location counter 151 are sequentially read,
They are sequentially set in the instruction register 101.

【0042】命令デコーダ103は命令レジスタ101
に保持された命令をデコードし、レジスタファイル10
5の中からデコード結果に対応するものを選択し、その
レジスタが保持している2つのデータを読み出す。通常
状態では、FWMレジスタ111にはデータ“0”が保
持されており、アンドゲート117の出力も“0”であ
り、マルチプレクサ113と115はレジスタファイル
105の出力データを選択する。マルチプレクサ113
と115の出力データはデータレジスタ119にラッチ
される。
The instruction decoder 103 includes an instruction register 101
Decodes the instruction held in the register file 10
5, one corresponding to the decoding result is selected, and the two data held in the register are read out. In the normal state, data "0" is held in the FWM register 111, the output of the AND gate 117 is also "0", and the multiplexers 113 and 115 select the output data of the register file 105. Multiplexer 113
And 115 are latched in the data register 119.

【0043】命令デコーダ103のデコード結果は制御
レジスタ109にラッチされる。演算器制御回路123
は、制御レジスタ109の内容に基づいて、演算器12
1を制御し、データレジスタ119に保持された2つの
データを加算したり、論理積を取る等の演算を施す。
The decoding result of the instruction decoder 103 is latched in the control register 109. Arithmetic unit control circuit 123
Is calculated based on the contents of the control register 109.
1 and performs operations such as adding two data held in the data register 119 and taking a logical product.

【0044】命令デコーダ103のデコード結果は制御
レジスタ109を介してレジスタ141にも保持され
る。レジスタ141の内容に基づいて結果格納制御部1
45は演算結果レジスタ143に保持されている演算結
果をレジスタファイル105に書き込む。なお、ロード
命令の場合には、レジスタ141は“1”レベルの選択
制御信号C2をマルチプレクサMPX2に供給し、マル
チプレクサMPX2はリードデータレジスタ139にセ
ットされたリードデータ(キャッシュメモリ135又は
ワークメモリ137から読み出されたデータ)Dを選択
する。結果格納制御部145はマルチプレクサMPX2
の出力をレジスタファイル105に書き込む。
The decoding result of the instruction decoder 103 is also stored in the register 141 via the control register 109. Result storage control unit 1 based on the contents of register 141
Numeral 45 writes the operation result held in the operation result register 143 to the register file 105. In the case of a load instruction, the register 141 supplies the selection control signal C2 of “1” level to the multiplexer MPX2, and the multiplexer MPX2 reads the read data (from the cache memory 135 or the work memory 137) set in the read data register 139. (Read data) D is selected. The result storage control unit 145 includes the multiplexer MPX2
Is written to the register file 105.

【0045】以上で、1命令に対する命令フェッチ、命
令デコード、命令実行、結果格納のステージでの処理が
終了する。そして、上述の4つのステージでの処理が並
列的に実行され、パイプライン処理が実現される。
Thus, the processing of the instruction fetch, instruction decode, instruction execution, and result storage stages for one instruction is completed. Then, the processing in the above-described four stages is executed in parallel, and pipeline processing is realized.

【0046】1.2 通常モードにおいて、サブルーチ
ンコール命令等がフェッチされ、デコードされた場合、
命令デコーダ103からの指示、命令レジスタ101の
内容、レジスタセット105から読み出されたデータ等
に基づいて分岐先アドレス生成回路155は分岐先アド
レスを生成する。マルチプレクサ157は、命令デコー
ダ103からの指示に従って、このアドレスを選択し、
さらに、マルチプレクサ159は、割り込み制御回路1
67からの指示に従って、このアドレスを選択し、ロケ
ーションカウンタ151にセットする。したがって、以
後は、コール先のアドレス以降に記憶された機械語命令
が順次フェッチされ,実行される。
1.2 In the normal mode, when a subroutine call instruction or the like is fetched and decoded,
The branch destination address generation circuit 155 generates a branch destination address based on an instruction from the instruction decoder 103, the contents of the instruction register 101, data read from the register set 105, and the like. The multiplexer 157 selects this address according to the instruction from the instruction decoder 103,
Further, the multiplexer 159 includes the interrupt control circuit 1
According to the instruction from 67, this address is selected and set in the location counter 151. Therefore, thereafter, the machine language instructions stored after the address of the call destination are sequentially fetched and executed.

【0047】1.3 デコードされた命令がオペランド
アドレスを生成する必要がある命令の場合、オペランド
アドレス生成回路125は、命令デコーダ103の指示
と通常モード用レジスタ群105の指示に基づいて、オ
ペランドアドレスを生成する。このオペランドアドレス
はレジスタ127を介してTLB129に供給され、物
理アドレスに変換される。
1.3 In the case where the decoded instruction is an instruction that needs to generate an operand address, the operand address generation circuit 125 outputs the operand address based on the instruction from the instruction decoder 103 and the instruction from the normal mode register group 105. Generate This operand address is supplied to the TLB 129 via the register 127, and is converted into a physical address.

【0048】1.4 通常モードでの使用が禁止されて
いる命令等がデコードされると、命令デコーダ103は
プログラムエラー信号(同期割り込み信号の1つ)を出
力する。通常モードでは、FWMレジスタ111の保持
値は“0”であり、インバータ161の出力は“1”レ
ベルであり、オアゲート173の出力は“1”レベルで
あり、アンドゲート175が開き、プログラムエラー信
号は割り込み制御回路167に供給される。割り込み制
御回路167は割り込み内容を特定し、プログラムエラ
ー処理の記憶エリアの先頭アドレス(割り込みベクタ)
を生成し、マルチプレクサ159に供給し、制御信号を
“1”とする。マルチプレクサ159は、制御信号に応
答し、このアドレスを選択し、ロケーションカウンタ1
51にセットする。以後、割り込み処理のプログラムが
順次実行される。
1.4 When an instruction or the like whose use in the normal mode is prohibited is decoded, the instruction decoder 103 outputs a program error signal (one of synchronous interrupt signals). In the normal mode, the value held in the FWM register 111 is “0”, the output of the inverter 161 is at “1” level, the output of the OR gate 173 is at “1” level, the AND gate 175 is opened, and the program error signal is output. Is supplied to the interrupt control circuit 167. The interrupt control circuit 167 specifies the contents of the interrupt, and the start address (interrupt vector) of the storage area for the program error processing
Is generated and supplied to the multiplexer 159 to set the control signal to “1”. The multiplexer 159 selects this address in response to the control signal, and
Set to 51. Thereafter, the interrupt processing program is sequentially executed.

【0049】割り込みの種類に応じて、後述するファー
ムウエアモードを設定し、ファームウエアモードで割り
込み処理を実行するようにしてもよい。例えば、割り込
み制御部167は、特定の割り込みを検出すると、セッ
ト信号Sと選択制御信号C1を“1”とする。これによ
り、マルチプレクサMPX1が1を出力し、FWMレジ
スタ111に“1”がセットされ、ファームウエアモー
ドが設定され、以後の処理が実行される。なお、全ての
割り込み処理をファームウエアモードで実行するように
してもよい。
A firmware mode, which will be described later, may be set according to the type of interrupt, and interrupt processing may be executed in the firmware mode. For example, upon detecting a specific interrupt, the interrupt control unit 167 sets the set signal S and the selection control signal C1 to “1”. As a result, the multiplexer MPX1 outputs 1 and "1" is set in the FWM register 111, the firmware mode is set, and the subsequent processing is executed. Note that all the interrupt processes may be executed in the firmware mode.

【0050】他の非同期割り込み、同期割り込みについ
ても、同様に、割り込み信号が受け付けられ、割り込み
処理が実行される。 2. ファームウエアモードでの動作 2.1 命令デコーダ103は、ファームウエアコール
命令をデコードすると、FWMレジスタ111に“1”
をセットすると共に、分岐先アドレス生成回路155に
指令を送る。分岐先アドレス生成回路155は、分岐先
のアドレスを生成し、このアドレスはマルチプレクサ1
57、159を介してロケーションカウンタ151にセ
ットされる。以後、ファームウエアモードの機械語命令
が順次フェッチされ、実行される。ファームウエアモー
ドにおいても、命令自体は通常モードの命令と同一であ
り、そのパイプライン処理は通常のモードと同一とな
る。
Similarly, for other asynchronous interrupts and synchronous interrupts, an interrupt signal is accepted and interrupt processing is executed. 2. Operation in Firmware Mode 2.1 When the instruction decoder 103 decodes the firmware call instruction, it stores "1" in the FWM register 111.
And sends a command to the branch destination address generation circuit 155. The branch destination address generation circuit 155 generates a branch destination address.
It is set in the location counter 151 via 57 and 159. Thereafter, the machine language instructions in the firmware mode are sequentially fetched and executed. Also in the firmware mode, the instructions themselves are the same as the instructions in the normal mode, and the pipeline processing is the same as in the normal mode.

【0051】ファームウエアモードでは、命令デコーダ
103は、レジスタファイル105及びファームウエア
モード専用レジスタファイル107の中のレジスタを1
つ選択し、その記憶データを読み出す。FWMレジスタ
111に“1”がセットされたため、アンドゲート11
7が開き、マルチプレクサ113と115は、命令デコ
ーダ103の制御に従って、選択されたレジスタセット
105又は107の出力データを選択する。
In the firmware mode, the instruction decoder 103 sets the registers in the register file 105 and the firmware mode register file 107 to 1
And reads the stored data. Since “1” is set in the FWM register 111, the AND gate 11
7 is opened, and the multiplexers 113 and 115 select the output data of the selected register set 105 or 107 under the control of the instruction decoder 103.

【0052】インバータ161の出力は“0”となり、
アンドゲート163と165が閉じ、非同期割り込み信
号はマスクされ、禁止される。また、イネーブルレジス
タ171に“1”をセットする命令が実行されるまで、
オアゲート172の出力が“0”となり、アンドゲート
175が閉じ、同期割り込み信号もマスクされ、禁止さ
れる。
The output of the inverter 161 becomes "0",
AND gates 163 and 165 are closed, and the asynchronous interrupt signal is masked and inhibited. Further, until an instruction to set “1” in the enable register 171 is executed,
The output of the OR gate 172 becomes "0", the AND gate 175 closes, and the synchronous interrupt signal is also masked and inhibited.

【0053】2.2 命令デコーダ103はイネーブル
レジスタ171をセットする命令をデコードすると、イ
ネーブルレジスタ171に“1”をセットする。する
と、オアゲート172の出力が“1”となり、アンドゲ
ート175が開き、同期割り込み信号が受け付けられ
る。
2.2 The instruction decoder 103 sets "1" in the enable register 171 when decoding the instruction for setting the enable register 171. Then, the output of the OR gate 172 becomes "1", the AND gate 175 opens, and the synchronous interrupt signal is accepted.

【0054】2.3 命令デコーダ103は通常モード
へのリターン命令をデコードすると、FWMレジスタ1
11に“0”をセットし、分岐先アドレス生成回路15
5に指令を送る。分岐先アドレス生成回路155は分岐
先のアドレスを生成し、マルチプレクサ157,159
を介してロケーションカウンタ151にセットする。従
って、以後、リターン先以降の機械語命令が順次フェッ
チされ、実行される。
2.3 The instruction decoder 103 decodes the return instruction to the normal mode, and
11 is set to “0”, and the branch destination address generation circuit 15 is set.
Send a command to 5. The branch destination address generation circuit 155 generates a branch destination address, and outputs the multiplexers 157 and 159.
To the location counter 151 via Therefore, thereafter, the machine instructions following the return destination are sequentially fetched and executed.

【0055】3. 次に、TLB129の内容を書き替
える場合とファームウエアモード専用のワークメモリ1
37にデータを保存する場合、通常モードにおいて使用
が禁止されている命令を実行する場合を例にファームウ
エアモードでの動作を具体的に説明する。
3. Next, the case of rewriting the contents of the TLB 129 and the work memory 1 dedicated to the firmware mode
When data is stored in the memory 37, the operation in the firmware mode will be specifically described by taking as an example the case of executing an instruction whose use is prohibited in the normal mode.

【0056】3.1 TLBの書き替えはハードウエア
を直接操作する処理であり、小さなミスが重大な故障の
原因となる可能性がある。そこで、本実施例では、この
種の命令をファームウエアモード内に隠蔽し、ファーム
ウエアモードを駆使できるレベルのユーザのみにこの機
能を提供する。このため、本実施例では、例えば、図6
に示すようにTLB書き替え用のプログラムを主記憶1
1に保存する。
3.1 Rewriting the TLB is a process of directly operating hardware, and a small mistake may cause a serious failure. Therefore, in the present embodiment, this type of instruction is hidden in the firmware mode, and this function is provided only to a user who can use the firmware mode. For this reason, in the present embodiment, for example, FIG.
The program for rewriting the TLB is stored in the main memory 1 as shown in FIG.
Save to 1.

【0057】通常モードにおいて、ファームウエアコー
ル命令がフェッチされ、デコードされると、マルチプレ
クサMPX1を介してFWMレジスタ111に“1”が
セットされる。分岐先アドレス生成回路155は、分岐
先のアドレス、即ち、TLB書き替え用のプログラムの
先頭アドレスを生成する。このアドレスはマルチプレク
サ157、159を介してロケーションカウンタ151
にセットされる。以後、TLB書き替え用のプログラム
の機械語命令が順次フェッチされる。
In the normal mode, when the firmware call instruction is fetched and decoded, "1" is set in the FWM register 111 via the multiplexer MPX1. The branch destination address generation circuit 155 generates a branch destination address, that is, a head address of a TLB rewriting program. This address is supplied to the location counter 151 via multiplexers 157 and 159.
Is set to Thereafter, the machine language instructions of the TLB rewriting program are sequentially fetched.

【0058】FWMレジスタ111に“1”がセットさ
れたため、アンドゲート117が開き、ファームウエア
モード用レジスタセット107の選択が可能となる。こ
の状態において、TLB書き替え命令がフェッチされ、
デコードされると、命令デコーダ103は、通常モード
用レジスタセット105とファームウエアモード用レジ
スタセット107中から適当なレジスタを選択し、切り
替え信号を制御して、選択したレジスタの出力データを
マルチプレクサ113と115に選択させる。
Since "1" is set in the FWM register 111, the AND gate 117 is opened, and the register set 107 for the firmware mode can be selected. In this state, the TLB rewrite instruction is fetched,
When decoded, the instruction decoder 103 selects an appropriate register from the normal mode register set 105 and the firmware mode register set 107, controls the switching signal, and outputs the output data of the selected register to the multiplexer 113. 115 is selected.

【0059】演算器制御回路123は、デコード結果に
基づいて、演算器121を制御し、データレジスタ11
9にセットされた2つのデータを演算し、新たなデー
タ、即ち、書き替え用のアドレスデータを求める。
The arithmetic unit control circuit 123 controls the arithmetic unit 121 based on the decoding result, and
The new data, that is, the address data for rewriting, is calculated by operating the two data set to 9.

【0060】結果格納制御回路145は、新たなアドレ
スデータをレジスタセットに書き込むと共にTLB12
9の書き替え対象エントリに書き込む。これにより、T
LB129の内容が書き替えられる。
The result storage control circuit 145 writes new address data to the register set and
9 is written to the entry to be rewritten. This gives T
The contents of LB 129 are rewritten.

【0061】最後に、通常モードへのリターン命令がデ
コードされると、マルチプレクサMPX1を介してFW
Mレジスタ111に“0”がセットされ、分岐先アドレ
ス生成回路155は、分岐先のアドレスを生成し、マル
チプレクサ157,159を介してロケーションカウン
タ151にセットする。以後、通常モードの機械語命令
が順次フェッチされ、実行される。
Finally, when the return instruction to the normal mode is decoded, the FW is transmitted via the multiplexer MPX1.
“0” is set in the M register 111, and the branch destination address generation circuit 155 generates a branch destination address, and sets it in the location counter 151 via the multiplexers 157 and 159. Thereafter, the machine instructions in the normal mode are sequentially fetched and executed.

【0062】3.2 ストア命令やロード命令等を実
行する場合、アドレス変換の段階でTLBミスヒットが
生じ、同期割り込みが生ずる場合がある。このような場
合、同期割り込みが禁止されていると、誤ったアドレス
に対し処理が行われる。
3.2 When executing a store instruction, a load instruction, or the like, a TLB mishit may occur at the stage of address conversion, and a synchronous interrupt may occur. In such a case, if the synchronous interrupt is prohibited, the process is performed on the wrong address.

【0063】そこで、ファームウエアモードでストア命
令、ロード命令等のアドレス変換が必要な命令を実行す
る場合には、例えば、図7に示すように、イネーブルレ
ジスタ171に“1”をセットする命令を予めコーデン
グしておく。
Therefore, when executing an instruction requiring address conversion such as a store instruction or a load instruction in the firmware mode, for example, as shown in FIG. 7, an instruction for setting "1" in the enable register 171 is issued. Code in advance.

【0064】イネーブルレジスタ171に“1”がセッ
トされた状態で、ストア命令がデコードされると、命令
デコーダ103はオペランドアドレス生成回路125に
指令を送り、オペランドアドレスを生成させる。このオ
ペランドアドレスはアドレスレジスタ127を介してT
LB129に供給される。例えば、生成されたオペラン
ドアドレスの上位ビットmビットで、TLBのエントリ
をアドレッシングし、そのエントリから読み出されたn
ビットデータとオペランドアドレスの下位nビットが比
較器131により比較され、一致した場合に、TLBヒ
ットとなる。TLBヒットの場合、その物理アドレス、
例えば、ファームウエアモード専用のワークメモリ13
7にデータがストアされる。
When the store instruction is decoded with "1" set in the enable register 171, the instruction decoder 103 sends an instruction to the operand address generation circuit 125 to generate an operand address. This operand address is set to T via the address register 127.
It is supplied to the LB 129. For example, the address of the TLB entry is addressed by the upper m bits of the generated operand address, and n is read from the entry.
The bit data and the lower n bits of the operand address are compared by the comparator 131, and if they match, a TLB hit occurs. In the case of a TLB hit, its physical address,
For example, the work memory 13 dedicated to the firmware mode
7 is stored.

【0065】一方、比較器131の比較結果が不一致の
場合、TLBミスヒットとなり、同期割り込み信号が発
生する。前述のように、イネーブルレジスタ171に
“1”が設定されているため、オアゲート173の出力
が“1”となり、アンドゲート175が開き、この同期
割り込み信号は割り込み制御回路167に受け付けられ
る。
On the other hand, if the comparison results from the comparator 131 do not match, a TLB miss occurs, and a synchronous interrupt signal is generated. As described above, since “1” is set in the enable register 171, the output of the OR gate 173 becomes “1”, the AND gate 175 opens, and the synchronous interrupt signal is accepted by the interrupt control circuit 167.

【0066】割り込み制御回路167により、ジャンプ
先アドレス(TLBミスヒット割り込み処理の先頭アド
レス)が生成され、マルチプレクサ159を介してロケ
ーションカウンタ151にセットされる。以後、TLB
ミスヒット割り込み処理の命令が順次実行され、物理ア
ドレスキャッシュメモリ135の記憶データに基づいて
TLB129の内容がリプレースされる。その後、TL
B129が再アクセスされ、論理アドレスが物理アドレ
スに変換され、そのアドレス位置にデータが保存され
る。
The interrupt control circuit 167 generates a jump destination address (the head address of the TLB miss hit interrupt processing) and sets the jump destination address in the location counter 151 via the multiplexer 159. After that, TLB
The instructions of the mishit interrupt processing are sequentially executed, and the contents of the TLB 129 are replaced based on the data stored in the physical address cache memory 135. Then TL
B129 is re-accessed, the logical address is converted to a physical address, and the data is stored at that address location.

【0067】3.3 通常モードにおいて、使用が禁止
されている命令がデコードされると、命令デコーダ10
3が同期割り込み(プログラムエラー)を発生し、この
命令を実行することはできない。しかし、ファームウエ
アモードで、且つ、同期割り込みを禁止した状態(イネ
ーブルレジスタ171がリセット状態)で、この種の命
令を実行すると、プログラムエラー信号自体は生成され
るが、アンドゲート175により割り込み信号がブロッ
クされ、実行ステージE及び結果格納ステージWでの処
理も実行される。従って、通常モードでは実行できない
機械語命令や機械語命令の組み合わせ等も、ファームウ
エアモードにおいて強制的に実行でき、ハードウエアの
チェック等が可能となる。
3.3 In the normal mode, when an instruction whose use is prohibited is decoded, the instruction decoder 10
3 generates a synchronous interrupt (program error) and cannot execute this instruction. However, if this type of instruction is executed in the firmware mode and in a state in which the synchronous interrupt is disabled (the enable register 171 is reset), the program error signal itself is generated, but the interrupt signal is generated by the AND gate 175. Blocking is also performed in the execution stage E and the result storage stage W. Therefore, even a machine language instruction or a combination of machine language instructions that cannot be executed in the normal mode can be forcibly executed in the firmware mode, and the hardware can be checked.

【0068】以上説明したように、本実施例によれば、
ファームウエアモードという超特権モードを導入するこ
とにより、CISCコンピュータ用のプログラムの移植
が容易となり、また、ハードウエアを直接制御する命令
等をファームウエアモードに隠蔽して一定レベル以上の
ユーザのみに解放し、さらに、通常モードでは許可され
ない命令や命令の組み合わせをハードウエア異常トラッ
プ等を無視して強制的に実行する等の処理ができる。
As described above, according to this embodiment,
By introducing a super-privileged mode called firmware mode, it is easy to port programs for CISC computers, and instructions for directly controlling hardware are hidden in firmware mode and released only to users of a certain level or higher. Furthermore, it is possible to forcibly execute an instruction or a combination of instructions that is not permitted in the normal mode, ignoring a hardware error trap or the like.

【0069】(第2実施例)次に、図8を参照して、こ
の発明の第2実施例にかかる演算制御システムを説明す
る。この実施例の演算制御システムはLSIとSRAM
等のディスククリート部品で構成される。
(Second Embodiment) Next, an arithmetic and control system according to a second embodiment of the present invention will be described with reference to FIG. The arithmetic and control system according to this embodiment includes an LSI and an SRAM.
And other disk cleat parts.

【0070】図8の演算制御システムは、主記憶211
とプロセッサ212をコントロールバス213、アドレ
スバス214、データバス215を介して接続して構成
されている。
The arithmetic and control system shown in FIG.
And a processor 212 are connected via a control bus 213, an address bus 214, and a data bus 215.

【0071】プロセッサ212は、基本演算制御回路2
21、アドレス変換制御回路222、第1と第2のTL
B223、224、キャッシュ制御回路225、ユーザ
命令バス226、オペランドデータバス227、ファー
ムウエアROM229、ワークメモリ230、オペラン
ドキャッシュメモリ231、命令キャッシュメモリ23
2、を備える。
The processor 212 has a basic operation control circuit 2
21, address conversion control circuit 222, first and second TL
B223, 224, cache control circuit 225, user instruction bus 226, operand data bus 227, firmware ROM 229, work memory 230, operand cache memory 231, instruction cache memory 23
2 is provided.

【0072】基本演算制御回路221は、内部にパイプ
ラインを備え、命令のフェッチ、解読、実行、結果格納
等のパイプライン処理を行うもので、例えば、1チップ
LSIで実現される。キャッシュメモリ231と232
は、オペランド用と命令用で独立した構成とし、ディス
クリートのSRAMで構成している。オペランドキャッ
シュメモリ231はオペランドを記憶し、命令キャッシ
ュメモリ232は命令を記憶する。オペランドキャッシ
ュメモリ231と命令キャッシュメモリ232は、それ
ぞれ、主記憶211の状態をそのままキャッシングする
物理アドレスキヤッシュである。キャッシュメモリ23
1と232の制御は、キャッシュ制御回路225で行
う。
The basic operation control circuit 221 has a pipeline therein and performs a pipeline process such as fetching, decoding, executing, and storing a result of an instruction, and is realized by, for example, a one-chip LSI. Cache memory 231 and 232
Have independent configurations for operands and instructions, and are composed of discrete SRAMs. Operand cache memory 231 stores operands, and instruction cache memory 232 stores instructions. Each of the operand cache memory 231 and the instruction cache memory 232 is a physical address cache that caches the state of the main storage 211 as it is. Cache memory 23
The control of 1 and 232 is performed by the cache control circuit 225.

【0073】論理アドレスから物理アドレスへの変換処
理を行うアドレス変換部は、アドレス変換制御回路22
2と第1と第2のTLB223と224から構成され
る。アドレス変換回路222は1チップLSIから構成
され、第1と第2のTLB223と224はディスクリ
ートのSRAMで構成される。第1と第2のTLB22
3と224は大規模な変換テーブルを2組搭載し、2つ
までのアドレス変換(例えば、ロード命令とストア命令
を並列実行する時あるいはロード命令と分岐命令を並列
実行する時のためのアドレス変換)をアドレス変換制御
回路222の制御下に同時に処理できる。
An address conversion unit for performing a conversion process from a logical address to a physical address is provided by an address conversion control circuit 22.
2 and the first and second TLBs 223 and 224. The address conversion circuit 222 is formed of a one-chip LSI, and the first and second TLBs 223 and 224 are formed of discrete SRAMs. First and second TLB 22
Nos. 3 and 224 are provided with two sets of large-scale translation tables, and up to two address translations (for example, address translation for parallel execution of load and store instructions or parallel execution of load and branch instructions). ) Can be processed simultaneously under the control of the address conversion control circuit 222.

【0074】この実施例の演算システムも、第1実施例
同様に、超特権モード、即ち、ファームウェアモードを
サポートしている。ワークメモリ230は、ハードウエ
アの診断情報やシステム情報を格納するためのファーム
ウエアモード専用のメモリである。また、例えば、電源
投入時やシステムバスとのインタフェースの障害等で主
記憶211がアクセスできない時でも診断情報を収集
し、プロセッサ212を停止状態に設定できるよう、重
要なファームエアはプロセッサ212上のファームウ
ェアROM229に格納し、ファームウェアの残りの部
分を主記憶211に保存している。
The arithmetic system of this embodiment also supports the super-privileged mode, that is, the firmware mode, as in the first embodiment. The work memory 230 is a dedicated memory for the firmware mode for storing hardware diagnostic information and system information. Further, for example, even collect diagnostic information when the main memory 211 can not be accessed by a failure or the like of the interface with the power-on or system bus, so that it can set the processor 212 in a stopped state, important farm c Air on processor 212 And the remaining part of the firmware is stored in the main memory 211.

【0075】次に、図8に示す演算制御システムの動作
を説明する。まず、通常状態において、キャッシュ制御
回路225が主記憶211をアドレスバス214を介し
てアドレッシングする。主記憶211はアドレス位置の
機械語命令をデータバス215を介して基本演算制御回
路221に供給する。基本演算制御回路221は供給さ
れた機械語命令をユーザ命令バス226を介して命令キ
ャッシュメモリ232に保存する。
Next, the operation of the arithmetic and control system shown in FIG. 8 will be described. First, in the normal state, the cache control circuit 225 addresses the main memory 211 via the address bus 214. The main memory 211 supplies the machine language instruction at the address position to the basic operation control circuit 221 via the data bus 215. The basic operation control circuit 221 stores the supplied machine language instruction in the instruction cache memory 232 via the user instruction bus 226.

【0076】基本演算制御回路221は、データバス2
15を介して供給された命令、或いは、命令キャッシュ
メモリ232に保存された命令を順次読みだし、解読
し、実行する。
The basic operation control circuit 221 is connected to the data bus 2
15, or instructions stored in the instruction cache memory 232 are sequentially read, decoded, and executed.

【0077】例えば、命令が単純な演算命令の場合は、
基本演算制御回路221は演算を行い、内部のレジスタ
セットに演算結果を保持する。また、解読した命令がス
トア命令の場合、基本演算制御回路221はアドレス変
換制御回路222に命令、論理アドレス、制御信号等を
含むリクエストアドレス(論理)1又は2を出力する。
アドレス変換制御回路222は、TLB223又は22
4を制御して、物理アドレスを生成する。キャッシュ制
御回路225は、生成された論理アドレスを受け、書き
込み位置を指示する。例えば、書き込み対象が主記憶2
11の場合、キャッシュ制御回路225は書き込みアド
レスとライトイネーブル信号等の制御信号を主記憶21
1に供給する。書き込みデータは基本演算制御回路22
1からデータバス215を介して主記憶211に供給さ
れる。書き込み対象がオペランドキャッシュメモリ23
1の場合、キャッシュ制御回路225は書き込みアドレ
スとライトイネーブル信号等の制御信号をオペランドキ
ャッシュメモリ231に供給する。書き込みデータは基
本演算制御回路221からオペランドデータバス227
を介してオペランドキャッシュメモリ231に供給され
る。また、書き込み対象がワークメモリ230の場合
(ファームウエアモードでのみ発生する)、キャッシュ
制御回路225は書き込みアドレスとライトイネーブル
信号等の制御信号をワークメモリ230に供給する。書
き込みデータは基本演算制御回路221からオペランド
データバス227を介してワークメモリ230に供給さ
れる。
For example, if the instruction is a simple operation instruction,
The basic operation control circuit 221 performs the operation, and holds the operation result in an internal register set. When the decoded instruction is a store instruction, the basic operation control circuit 221 outputs a request address (logical) 1 or 2 including an instruction, a logical address, a control signal, and the like to the address conversion control circuit 222.
The address conversion control circuit 222 is provided with the TLB 223 or 22
4 to generate a physical address. The cache control circuit 225 receives the generated logical address and specifies a write position. For example, the write target is the main memory 2
In the case of 11, the cache control circuit 225 stores a control signal such as a write address and a write enable signal in the main memory 21.
Feed to 1. The write data is stored in the basic operation control circuit 22.
1 to the main memory 211 via the data bus 215. The write target is the operand cache memory 23
In the case of 1, the cache control circuit 225 supplies a control signal such as a write address and a write enable signal to the operand cache memory 231. The write data is transferred from the basic operation control circuit 221 to the operand data bus 227.
Is supplied to the operand cache memory 231. When the write target is the work memory 230 (occurs only in the firmware mode), the cache control circuit 225 supplies a control signal such as a write address and a write enable signal to the work memory 230. The write data is supplied from the basic operation control circuit 221 to the work memory 230 via the operand data bus 227.

【0078】解読された命令がロード命令の場合、キャ
ッシュ制御回路225によりアドレスされた位置からデ
ータが読み出される。一方、解読された命令がファーム
ウエアコール命令の場合、基本演算制御回路221は、
ファームウエアモードを設定し、非同期割り込みと同期
割り込みを禁止する。基本演算制御回路221は、アド
レス変換制御回路222に、命令,論理アドレス、制御
信号等を含むリクエストアドレス1又は2を出力する。
アドレス変換制御回路222は、分岐先アドレス、即
ち、アクセス対象のファームウエアプログラムが記憶さ
れた領域の先頭物理アドレスを生成する。キャッシュ制
御回路225は生成された物理アドレスに基づいて、ア
クセス対象のメモリ(主記憶211又はファームウエア
ROM229)をアドレッシングすると共に読みだし制
御信号を供給する。キャッシュ制御回路225は、以
後、アドレスを更新し、順次ファームウエアモードの機
械語命令を読み出す。
If the decoded instruction is a load instruction, data is read from the location addressed by the cache control circuit 225. On the other hand, if the decoded instruction is a firmware call instruction, the basic operation control circuit 221
Set firmware mode and disable asynchronous and synchronous interrupts. The basic operation control circuit 221 outputs a request address 1 or 2 including an instruction, a logical address, a control signal, and the like to the address conversion control circuit 222.
The address conversion control circuit 222 generates a branch destination address, that is, a top physical address of an area in which a firmware program to be accessed is stored. The cache control circuit 225 addresses the memory to be accessed (the main memory 211 or the firmware ROM 229) and supplies a read control signal based on the generated physical address. Thereafter, the cache control circuit 225 updates the address and sequentially reads out the machine language instructions in the firmware mode.

【0079】例えば、読みだし対象のファームウエアが
主記憶211に記憶されている場合、キャッシュ制御回
路225は読みだしアドレスとリードイネーブル信号、
RAS,CAS等の制御信号を主記憶211に供給す
る。ファームウエアモードの命令はデータバス215を
介して基本演算制御回路221に供給される。また、読
みだし対象のファームウエアがファームウエアROM2
29に記憶されている場合、キャッシュ制御回路225
は読みだしアドレスとリードイネーブル信号等の制御信
号をファームウエアROM229に供給する。ファーム
ウエアモードの命令はユーザ命令バス226を介して基
本演算制御回路221に供給される。
For example, when the firmware to be read is stored in the main memory 211, the cache control circuit 225 reads the read address and the read enable signal,
Control signals such as RAS and CAS are supplied to the main memory 211. The instruction in the firmware mode is supplied to the basic operation control circuit 221 via the data bus 215. Also, the firmware to be read is firmware ROM2.
29, the cache control circuit 225
Supplies control signals such as a read address and a read enable signal to the firmware ROM 229. The instruction in the firmware mode is supplied to the basic operation control circuit 221 via the user instruction bus 226.

【0080】この状態で、基本演算制御回路221は、
ファームウエアモードの命令を実行する。デコードした
命令がノーマルモードへのリターン命令の場合、基本演
算制御回路221は、通常モードを設定し、非同期割り
込みと同期割り込みを可能とする。さらに、基本演算制
御回路221は、アドレス変換制御回路222にリクエ
ストアドレス1又は2を出力し、アドレス変換制御回路
222は分岐先の物理アドレスを生成する。キャッシュ
制御回路225は生成された物理アドレスに基づいて、
アクセス対象のメモリをアドレッシングすると共に読み
だし制御信号等を供給する。以後、ノーマルモードの命
令が順次読み出され、基本演算制御回路221の制御下
に実行される。
In this state, the basic operation control circuit 221
Execute the firmware mode instruction. When the decoded instruction is a return instruction to the normal mode, the basic operation control circuit 221 sets the normal mode and enables the asynchronous interrupt and the synchronous interrupt. Further, the basic operation control circuit 221 outputs the request address 1 or 2 to the address conversion control circuit 222, and the address conversion control circuit 222 generates a branch destination physical address. The cache control circuit 225 determines, based on the generated physical address,
Addressing a memory to be accessed and supplying a read control signal and the like. Thereafter, the instructions in the normal mode are sequentially read out and executed under the control of the basic operation control circuit 221.

【0081】(ファームウエア空間について)第2実施
例においては、ファームウエア(ファームウエアモード
用プログラム)を主記憶211とファームウエアROM
229の両方に格納している。このため、プロセッサス
テータス又はファームウエア中の命令のアドレスに応じ
てどちらかのプログラムを選択的に読み出すことにな
る。実行するプログラムを読み出す位置を切り替えると
いうことはアドレス空間を切り替えることとしてとらえ
ることができる。ファームウエアのためのアドレス空間
をファームエア空間と呼ぶことにし、以下に、その構成
例を説明する。
(Regarding the Firmware Space) In the second embodiment, the firmware (the program for the firmware mode) is stored in the main memory 211 and the firmware ROM.
229. Therefore, one of the programs is selectively read according to the processor status or the address of the instruction in the firmware. Switching the read position of the program to be executed can be regarded as switching the address space. The address space for the firmware is referred to as a firmware space, and an example of the configuration will be described below.

【0082】1.ファームウエア空間を構成する領域フ
ァームウエア空間を構成する領域を図9に示す。図9の
各領域を以下に説明する。
1. FIG. 9 shows the areas constituting the firmware space. Each area in FIG. 9 will be described below.

【0083】1.1 ファームウエアROM領域(命令
ROM領域) ファームウエア空間の先頭0番地から始まる領域で、プ
ロセッサの初期化等のコードが記憶されている領域であ
る。この領域はROMで構成される。ROMは図8のフ
ァームウエアROM229のように、プロセッサ上にお
かれる方が望ましい。マルチプロセッサシステムにおい
ては、個々のプロセッサの独立性を高める上からも各プ
ロセッサ上にROMを持つのが効果的である。
1.1 Firmware ROM Area (Instruction ROM Area) An area starting from the first address 0 in the firmware space, and is an area in which codes such as initialization of a processor are stored. This area is constituted by a ROM. The ROM is desirably provided on a processor like the firmware ROM 229 in FIG. In a multiprocessor system, it is effective to have a ROM on each processor in order to increase the independence of each processor.

【0084】1.2 ファームウェア通信領域 主にプロセッサ間の通信に使用される領域で、ファーム
エアによってのみ書き込みが許可されている。マルチ
プロセッサシステムの場合は、複数のプロセッサによる
書き込みが許可される。この例では、ファームウェア通
信領域はファームウエアROM領域に後続して配置され
ている。
1.2 Firmware Communication Area This is an area mainly used for communication between processors.
C writing only are permitted by air. In the case of a multiprocessor system, writing by a plurality of processors is permitted. In this example, firmware communication region is placed so as to follow the firmware ROM area.

【0085】1.3 ファームウエアプログラム領域 各プロセッサのファームウエアのコードを格納する領域
である。各プロセッサのファームウエアのローカルなデ
ータ格納用領域として使用することもできる。ファーム
ウエアのコードが複数のプロセッサで共通な場合は、こ
の領域を複数のプロセッサの共有領域としてもよい。た
だしその場合は、ローカルなデータ格納領域は共通部分
と分離し、各プロセッサが個別に持つ必要がある。
1.3 Firmware Program Area This is an area for storing firmware code of each processor. It can also be used as a local data storage area for firmware of each processor. If the firmware code is common to a plurality of processors, this area may be used as a shared area for a plurality of processors. However, in this case, the local data storage area must be separated from the common part, and each processor must have its own.

【0086】この例では、ファームウエアプログラム領
域は、ファームウエア空間のアドレス4M以降に定義し
ている。 2. 論理空間と物理空間のマッピングの関係 2.1 プロセッサの数がn+1個のマルチプロセッサ
システムの論理空間と物理空間のマッピングの関係を図
10に示す。
In this example, the firmware program area is defined after address 4M in the firmware space. 2. 2.1 Relationship between Mapping of Logical Space and Physical Space 2.1 FIG. 10 shows the relationship of mapping between the logical space and the physical space in a multiprocessor system having n + 1 processors.

【0087】ファームウエア空間上でリニアにマッピン
グされているファームウエアROM領域とファームウエ
ア通信領域は、物理空間上では同一領域(アドレス)に
マッピングされている。即ち、ファームウエアROM領
域とファームウエア通信領域は物理空間上で同一のアド
レスを使用する。命令のアドレスとして当該領域をアク
セスするとファームウエアROM領域をアクセスし、オ
ペランドアドレスとして当該領域をアクセスするとファ
ームウエア通信領域をアクセスすることように、例え
ば、各プロセッサのアドレス変換機構及びキャッシュ制
御回路225が制御を行う。
The firmware ROM area and the firmware communication area linearly mapped in the firmware space are mapped to the same area (address) in the physical space. That is, the firmware ROM area and the firmware communication area use the same address in the physical space. For example, the address translation mechanism and the cache control circuit 225 of each processor access the firmware ROM area when accessing the area as an instruction address, and access the firmware communication area when accessing the area as an operand address. Perform control.

【0088】2.2 ファームウエアプログラム領域
は、論理空間での領域と物理空間での領域がプロセッサ
毎に1対1の関係となるよう配置されている。このマッ
ピングは各プロセッサ内のアドレス変換制御回路222
及びTLB223、224からなるアドレス変換機構に
よって行う。物理空間での領域の定義を可変にしてお
き、1つの領域を複数のプロセッサで共有したり、主記
憶の障害のある領域を避けるようにマッピングすること
も可能である。
2.2 The firmware program areas are arranged such that an area in the logical space and an area in the physical space have a one-to-one relationship for each processor. This mapping is performed by the address conversion control circuit 222 in each processor.
And TLB 223, 224. It is also possible to make the definition of the area in the physical space variable, to share one area by a plurality of processors, or to map so as to avoid a faulty area of the main memory.

【0089】3. ファームウエア空間におけるアドレ
ス変換 3.1 使用されるレジスタ アドレス変換処理はアドレス変換制御回路222の制御
により行われる。ファームウエア空間で、論理アドレス
を物理アドレスに変換するための対応情報はアドレス変
換制御回路222内のレジスタに格納される。各レジス
タの名称、有意なビット幅、意味等を図11に示す。
3. Address conversion in firmware space 3.1 Registers used Address conversion processing is performed under the control of the address conversion control circuit 222. In the firmware space, correspondence information for converting a logical address into a physical address is stored in a register in the address conversion control circuit 222. FIG. 11 shows the names, significant bit widths, meanings, and the like of each register.

【0090】3.2 ファームウエアROM領域、ファ
ームウエア通信領域のサイズ設定 ファームウエアROM領域とファームウエア通信領域の
サイズは、レジスタFCSZの設定値により決定され
る。各領域は領域サイズの整数倍の境界(サイズが12
8Kバイトなら128Kバイトの整数倍のアドレス)に
配置される。アドレス変換処理の簡単化のためである。
ファームウエアROM領域及びファームウエア通信領域
のサイズは128Kバイトか256Kバイトの2者択一
とする。レジスタFCSZの設定値とファームウエアR
OM領域及びファームウエア通信領域の先頭アドレス
(論理)、終了アドレス(論理)、サイズの関係を図1
2に示す。
3.2 Setting of Size of Firmware ROM Area and Firmware Communication Area The sizes of the firmware ROM area and the firmware communication area are determined by the set value of the register FCSZ. Each region has a boundary of an integral multiple of the region size (the size is 12
If it is 8 Kbytes, it is located at an address which is an integral multiple of 128 Kbytes. This is for simplifying the address translation process.
The sizes of the firmware ROM area and the firmware communication area are either 128 Kbytes or 256 Kbytes. Set value of register FCSZ and firmware R
FIG. 1 shows the relationship between the start address (logical), end address (logical), and size of the OM area and the firmware communication area.
It is shown in FIG.

【0091】3.3 ファームウエアプログラム領域の
サイズ設定 ファームウエアプログラム領域は、図13に示されるよ
うに、レジスタFRSZの設定値(連続値ではない)に
応じて、その先頭アドレス、終了アドレス、領域サイズ
が決定され、6種類の値をとることができる。各ファー
ムウエアプログラム領域は領域サイズの整数倍の境界
(サイズが128Kバイトなら128Kバイトの整数倍
のアドレス)に配置される。アドレス変換処理の簡単化
のためである。
3.3 Setting of Size of Firmware Program Area As shown in FIG. 13, the firmware program area has its start address, end address, and area according to the set value (not a continuous value) of the register FRSZ. The size is determined and can take six values. Each firmware program area is arranged at a boundary of an integral multiple of the area size (if the size is 128 Kbytes, the address is an integral multiple of 128 Kbytes). This is for simplifying the address translation process.

【0092】3.4 ファームウエアROM領域及びフ
ァームウエア通信領域のアドレス変換方法 図14にファームウエアROM領域とファームウエア通
信領域のアドレス変換論理を示す。図14に示すよう
に、レジスタFCSZの保持値が“0”の場合、レジス
タFCTPの第1乃至第14ビットをファームウエア空
間での論理アドレスの第1ないし第14ビットと置き換
えることにより、物理アドレスが得られる。また、レジ
スタFCSZの保持値が“1”の場合は、レジスタFC
TPの第1ないし第13ビットをファームウエア空間で
の論理アドレスの第1ないし第13ビットと置き換える
ことにより、物理アドレスが得られる。
3.4 Address Conversion Method for Firmware ROM Area and Firmware Communication Area FIG. 14 shows address conversion logic for the firmware ROM area and the firmware communication area. As shown in FIG. 14, when the value held in the register FCSZ is “0”, the first to fourteenth bits of the register FCTP are replaced with the first to fourteenth bits of the logical address in the firmware space, thereby obtaining the physical address. Is obtained. When the value held in the register FCSZ is “1”,
By replacing the first to thirteenth bits of the TP with the first to thirteenth bits of the logical address in the firmware space, a physical address is obtained.

【0093】3.5 ファームウエアプログラム領域の
アドレス変換方法 ファームウエアプログラム領域の論理アドレスから物理
アドレスへの変換論理を図15に示す。図15に示すよ
うに、ファームウエア論理アドレスの第1ないし第9ビ
ットとレジスタFRSZの第10ないし第14ビットの
うち値が“0”のビットをレジスタFRTPの保持値で
置き換えることにより、物理アドレスが得られる。
3.5 Address Conversion Method for Firmware Program Area FIG. 15 shows a logic for converting a logical address to a physical address in the firmware program area. As shown in FIG. 15, the physical address is replaced by replacing the bit whose value is “0” among the first to ninth bits of the firmware logical address and the tenth to fourteenth bits of the register FRSZ with the value held in the register FRTP. Is obtained.

【0094】4. 主記憶211中のファームウエア領
域の保護 システムの信頼性を向上するには主記憶211に格納さ
れたファームウエアをプログラムの暴走や誤った処理に
よって破壊されないように保護することが望まれる。こ
の保護機構は、主記憶211への書き込み処理時のター
ゲットアドレスがファームウエアの格納された領域か否
かをチェックし、それがファームウエアの格納された領
域である場合に、トラップを発生させる(書き込み処理
を禁止する)ことで実現できる。
4. Protection of Firmware Area in Main Storage 211 To improve the reliability of the system, it is desirable to protect the firmware stored in the main storage 211 from being destroyed by a program runaway or erroneous processing. This protection mechanism checks whether the target address at the time of the writing process to the main memory 211 is an area where firmware is stored, and if it is an area where firmware is stored, generates a trap ( Writing process is prohibited).

【0095】ファームウエア領域に対するアクセスのチ
ェックとしては、例えば、以下のような項目が考えられ
る。 4.1 ファームウエア空間(論理アドレス)へのアク
セスのチェック ファームウエア空間の中の未実装領域(通信領域とプロ
グラム領域の間)へのアクセスと、プログラム領域の最
終アドレスを越えたアクセスを検出する。これはプロセ
ッサ内部、例えば、基本演算制御回路221が論理アド
レスに基づいて実行する。
For checking access to the firmware area, for example, the following items can be considered. 4.1 Checking Access to Firmware Space (Logical Address) Access to an unmounted area (between the communication area and the program area) in the firmware space and access beyond the last address of the program area are detected. . This is executed by the basic operation control circuit 221 inside the processor based on the logical address.

【0096】4.2 ファームウエア通信領域とファー
ムウエアプログラム領域へのアクセスのチェック ファームウエア通信領域は複数のプロセッサで共通であ
るが、ファームウエアプログラム領域は個別に定義可能
である。このため、これらの領域へのアクセスのチェッ
クをプロセッサ内部で行う場合、各プロセッサは他のプ
ロセッサのファームウエアプログラム領域の範囲を知っ
ている必要がある。
4.2 Checking Access to Firmware Communication Area and Firmware Program Area The firmware communication area is common to a plurality of processors, but the firmware program area can be individually defined. Therefore, when checking access to these areas inside the processor, each processor needs to know the range of the firmware program area of another processor.

【0097】図16に例示するように、複数のプロセッ
サPと主記憶MEMがシステム制御ユニットを介して接
続されている構成の場合、システム制御ユニットがファ
ームウエア通信領域とファームウエアプログラム領域へ
のアクセスをまとめてチェックできる。ただし、各プロ
セッサからシステム制御ユニットへアクセスの種類を伝
える必要がある。また、検出のタイミングが遅れるた
め、不正検出時の対応(アクセスをトラップする処理)
を早く起こすためには、プロセッサ内部でこの種のアク
セスを迅速に検出する必要がある。
As shown in FIG. 16, when the plurality of processors P and the main memory MEM are connected via the system control unit, the system control unit accesses the firmware communication area and the firmware program area. Can be checked together. However, it is necessary to notify the type of access from each processor to the system control unit. In addition, because the detection timing is delayed, countermeasures for illegal detection (access trap processing)
It is necessary to detect this kind of access quickly within the processor in order to cause the error to occur quickly.

【0098】4.3 主記憶上のファームウエア領域へ
のアクセスのチェック 主記憶を参照するリクエストに関しては、アクセスの対
象領域に応じてアクセスを許可するか否かを判別する。
例えば、図17に示す分類が考えられる。
4.3 Checking Access to Firmware Area on Main Memory For a request that refers to the main memory, it is determined whether or not access is permitted according to the area to be accessed.
For example, the classification shown in FIG. 17 can be considered.

【0099】図17(a)に示すように、例えば、命令
取り出しのために主記憶へアクセスするリクエストの場
合、飛び先が通常領域の場合は、アドレス変換後の分岐
先の物理アドレスがファームウエア領域であるか否かを
判別し、いずれかのプロセッサのファームウエア領域の
場合にはアクセスが禁止される。また、飛び先がファー
ムウエア領域の場合、アドレス変換後の分岐先の物理ア
ドレスが自プロセッサのファームウエア領域であるか否
かを判別し、自プロセッサのファームウエア領域の場合
のみ、アクセスが許可される。
As shown in FIG. 17A, for example, in the case of a request to access the main memory for fetching an instruction, and when the jump destination is a normal area, the physical address of the branch destination after address conversion is the firmware. It is determined whether or not the area is an area. If the area is a firmware area of any of the processors, access is prohibited. Further, when the jump destination is a firmware area, it is determined whether or not the physical address of the branch destination after address conversion is the firmware area of the own processor, and access is permitted only in the case of the firmware area of the own processor. You.

【0100】図17(b)に示すように、オペランドの
アクセスのために主記憶へアクセスするリクエストの場
合、アクセスの対象領域が通常領域の場合は、アドレス
変換後の実際の物理アドレスがファームウエア領域であ
るか否かを判別し、いずれかのプロセッサのファームウ
エア領域の場合にはアクセスが禁止される。また、アク
セスの対象領域がファームウエア領域の場合は、アドレ
ス変換後の実際の物理アドレスが自プロセッサのファー
ムウエア領域であるか否かを判別し、自プロセッサのフ
ァームウエア領域であった場合のみアクセスが許可され
る。また、アクセスの対象領域が全領域の場合は、チェ
ックを行わず、すべての領域のアクセスが許可される。
As shown in FIG. 17B, in the case of a request to access the main memory for accessing an operand, if the access target area is a normal area, the actual physical address after address conversion is the firmware. It is determined whether or not the area is an area. If the area is a firmware area of any of the processors, access is prohibited. If the access target area is a firmware area, it is determined whether or not the actual physical address after the address conversion is the firmware area of the own processor. Is allowed. If the access target area is the entire area, no check is performed, and access to all areas is permitted.

【0101】アクセスのチェックは、リクエストの種類
とターゲットアドレスをファームウエア領域の設定情報
と比較することで行う。なお、図17はファームウエア
モードにおける、リクエストの種類と領域チェックの関
係を示すものであり、通常モードにおけるファームウエ
ア領域の参照はすべて不正(エラー)として、禁止され
る。
The access is checked by comparing the type of the request and the target address with the setting information of the firmware area. FIG. 17 shows the relationship between the type of request and the area check in the firmware mode, and all references to the firmware area in the normal mode are prohibited as illegal (error).

【0102】4.4 DMAバスから主記憶へのアクセ
スのチェック 図16の構成であれば、DMAバスから主記憶MEMへ
のアクセスのチェックをシステム制御ユニットで行うこ
とも可能である。DMAを行う装置でこのチェックを実
施してもよい。
4.4 Check of Access from DMA Bus to Main Memory With the configuration shown in FIG. 16, it is also possible for the system control unit to check access from the DMA bus to main memory MEM. This check may be performed by a device that performs DMA.

【0103】システム制御ユニットでアクセスのチェッ
クを行う場合は、全プロセッサPのファームウエア領域
設定情報をシステム制御ユニット内に持ち、DMAバス
からのアクセス要求の対象となったアドレスとファーム
ウエア領域設定情報を比較し、領域チェックを行う。
When the access check is performed by the system control unit, the firmware area setting information of all the processors P is held in the system control unit, and the address requested by the access request from the DMA bus and the firmware area setting information are stored. Are compared, and an area check is performed.

【0104】信頼性の面からは、DMAバスから主メモ
リMEMのファームウエア領域へのアクセスは一切禁止
するのが望ましい。そこで、例えば、システム立ち上げ
時に主記憶MEM上に置かれるファームウエアをディス
クなどの外部記憶装置からローディングするような場合
には、まず、主記憶MEMの通常領域にファームウエア
をDMA転送し、次に、ファームウエアROM中のファ
ームウエアが主記憶MEM上の通常領域に転送されたフ
ァームウエアをファームウエア領域に転送するようにす
ればよい。
From the viewpoint of reliability, it is desirable to prohibit any access from the DMA bus to the firmware area of the main memory MEM. Therefore, for example, when loading the firmware placed on the main memory MEM at system startup from an external storage device such as a disk, first, the firmware is DMA-transferred to the normal area of the main memory MEM, and then Then, the firmware in the firmware ROM may transfer the firmware transferred to the normal area on the main memory MEM to the firmware area.

【0105】以上がファームウエア空間の構成例であ
る。 (非同期割り込みの禁止のみを実現した割り込み禁止モ
ード)ファームウエアモードとは別に非同期割り込みの
禁止のみを実現した割り込み禁止モードも考えられる。
これはユーザに解放されたモードであり、通常モードで
使用できる命令列を外部割り込み禁止の状態で実行す
る。CISC型プロセッサでマイクロプログラムによっ
て実現されている中断の許されない処理、例えば、キュ
ー操作命令等の不可分処理はこのモードを使って実現で
きる。
The above is an example of the configuration of the firmware space. (Interrupt disabled mode in which only asynchronous interrupts are disabled) In addition to the firmware mode, an interrupt disabled mode in which only asynchronous interrupts are disabled may be considered.
This is a mode released to the user, and executes an instruction sequence usable in the normal mode in a state where external interrupts are disabled. Non-interruptible processing realized by the microprogram in the CISC type processor, for example, inseparable processing such as a queue operation instruction, can be realized using this mode.

【0106】例えば、図18に示すように、不可分処理
実行前(通常モード)に、非同期割り込みを禁止する命
令を実行し、割り込み禁止モードを設定する。割り込み
禁止モードにおいて、CISC型の高機能命令と同等の
機能を実現する複数のRISC型命令を実行し、実行終
了後、外部割り込み許可命令を実行し、外部割り込みを
許可する。
For example, as shown in FIG. 18, before executing the indivisible processing (normal mode), an instruction for prohibiting the asynchronous interrupt is executed to set the interrupt prohibition mode. In the interrupt prohibition mode, a plurality of RISC-type instructions for realizing the same function as the CISC-type high-performance instruction are executed, and after the execution is completed, an external interrupt enable instruction is executed to enable the external interrupt.

【0107】単に不可分というだけでなく、オペレーテ
ングシステムからはあくまでハードウエアで実現するよ
うに要求される割り込み処理やハードウエアに直接関係
した処理、例えば、マルチプロセッサ制御命令、入出力
命令、初期化、割り込み処理等はファームウエアモード
で処理すればよい。これら両モードを具備し、処理の内
容によって実現モードを選択するということも可能であ
る。この場合、例えば、デコードユニットがファームウ
エアコール命令又は外部割り込み禁止命令を解読した段
階で、所定のレジスタにモードデータを設定し、モード
を切り替えることにより対応する。なお、この発明は上
記実施例に限定されず、種々の変更が可能である。
Not only inseparable, but also interrupt processing required from the operating system to be realized by hardware and processing directly related to hardware, for example, multiprocessor control instructions, input / output instructions, initialization , Interrupt processing, etc. may be processed in the firmware mode. It is also possible to provide both of these modes and select the realization mode according to the content of the processing. In this case, for example, when the decoding unit decodes the firmware call instruction or the external interrupt prohibition instruction, mode data is set in a predetermined register and the mode is switched. Note that the present invention is not limited to the above embodiment, and various modifications are possible.

【0108】[0108]

【発明の効果】以上説明したように、本発明において
は、RISC型ハードウエアに、ファームウエアモード
なる超特権モードを導入し、従来マイクロプログラムで
構成されていた処理を通常の機械語命令として実現可能
としている。これにより、CISC型プロセッサ用に開
発されたオペレーテングシステムのRISC型プロセッ
サへの移植を容易にし、かつ、ハードウエアに直接関係
した機械語命令はファームウエアモードに隠蔽すること
により、システムの信頼性が向上し、かつ、オペレーテ
ィングシステムなどのソフトウエアの移植性が向上す
る。
As described above, in the present invention, a super-privileged mode, which is a firmware mode, is introduced into RISC type hardware, and processing conventionally constituted by a microprogram is realized as a normal machine language instruction. It is possible. This makes it easy to port the operating system developed for the CISC type processor to the RISC type processor, and hides the machine language instructions directly related to the hardware in the firmware mode, thereby improving the reliability of the system. And the portability of software such as an operating system is improved.

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

【図1】この発明にかかるパイプライン制御方法の第1
例を示す図。
FIG. 1 shows a first embodiment of a pipeline control method according to the present invention.
The figure which shows an example.

【図2】この発明にかかるパイプライン制御方法の第2
例を示す図。
FIG. 2 shows a second embodiment of the pipeline control method according to the present invention.
The figure which shows an example.

【図3】通常モードとファームウエアモードの切り替え
手順を示すフローチャート。
FIG. 3 is a flowchart showing a procedure for switching between a normal mode and a firmware mode.

【図4】図5と組み合わされてこの発明の第1実施例に
かかる演算制御装置の構成を示す図。
FIG. 4 is a diagram showing a configuration of an arithmetic and control unit according to the first embodiment of the present invention in combination with FIG. 5;

【図5】図4と組み合わされてこの発明の第1実施例に
かかる演算制御装置の構成を示す図。
FIG. 5 is a diagram showing a configuration of an arithmetic and control unit according to the first embodiment of the present invention in combination with FIG. 4;

【図6】TLB書き替え用のプログラムをファームウエ
ア格納領域に保存した場合のプログラム格納状態を示す
図。
FIG. 6 is a view showing a program storage state when a TLB rewriting program is stored in a firmware storage area.

【図7】ストア命令をファームウエア格納領域に保存し
た場合のプログラム格納状態を示す図。
FIG. 7 is a view showing a program storage state when a store instruction is stored in a firmware storage area.

【図8】この発明の第2実施例にかかる演算制御システ
ムの構成を示す図。
FIG. 8 is a diagram showing a configuration of an arithmetic and control system according to a second embodiment of the present invention.

【図9】ファームウエア空間を構成する領域を示す図。FIG. 9 is a diagram showing an area constituting a firmware space.

【図10】ファームウエア空間と物理空間のマッピング
の関係を示す図。
FIG. 10 is a diagram showing a relationship between mapping between a firmware space and a physical space.

【図11】ファームウエア空間で、論理アドレスを物理
アドレスに変換するために使用されるレジスタの名称、
ビット幅、意味を説明するための図。
FIG. 11 shows names of registers used to convert a logical address to a physical address in a firmware space;
The figure for demonstrating bit width and the meaning.

【図12】レジスタFCSZの設定値とファームウエア
ROM領域及びファームウエア通信領域の先頭アドレ
ス、終了アドレス、サイズの関係を示す図。
FIG. 12 is a diagram showing a relationship between a set value of a register FCSZ and a start address, an end address, and a size of a firmware ROM area and a firmware communication area.

【図13】レジスタFRSZの設定値とファームウエア
プログラム領域の先頭アドレス、終了アドレス、領域サ
イズの関係を示す図。
FIG. 13 is a view showing a relationship between a set value of a register FRSZ, a start address, an end address, and an area size of a firmware program area.

【図14】ファームウエアROM領域とファームウエア
通信領域のアドレス変換論理を示す図。
FIG. 14 is a diagram showing address conversion logic of a firmware ROM area and a firmware communication area.

【図15】ファームウエアプログラム領域の論理アドレ
スから物理アドレスへの変換論理を示す図。
FIG. 15 is a diagram showing a logic for converting a logical address of a firmware program area into a physical address.

【図16】複数のプロセッサPと複数の主記憶MEMが
システム制御ユニットを介して接続された構成を示すブ
ロック図。
FIG. 16 is a block diagram showing a configuration in which a plurality of processors P and a plurality of main memories MEM are connected via a system control unit.

【図17】主記憶を参照するリクエストに関しては、リ
クエストと領域チェックの関係を示す図。
FIG. 17 is a diagram showing a relationship between a request and an area check for a request that refers to main storage.

【図18】外部割り込み禁止モードを説明するためのフ
ローチャート。
FIG. 18 is a flowchart for explaining an external interrupt inhibition mode.

【図19】機械語命令とマイクロプログラムの関係を示
す図。
FIG. 19 is a diagram showing a relationship between a machine language instruction and a microprogram.

【符号の説明】 11…主記憶、12…プロセッサ、101…命令レジス
タ、103…命令デコーダ、105…レジスタファイ
ル、107…ファームウエアモード専用レジスタファイ
ル、109…制御レジスタ、111…FWMレジスタ、
113、115…マルチプレクサ、117…アンドゲー
ト、119…データレジスタ、121…演算器、123
…演算器制御回路、125…オペランドアドレス生成回
路、127…アドレスレジスタ、129…TLB(Tran
slation Lookaside Buffer)、131…比較器、133
…TLBヒットレジスタ、135…物理キャッシュメモ
リ、137…ファームウエアモード専用のワークメモ
リ、139…リードデータレジスタ、141…レジス
タ、143…演算結果レジスタ、145…結果格納制御
回路、151…ロケーションカウンタ、153…更新回
路、155…分岐先アドレス生成回路、157、159
…マルチプレクサ、161…インバータ、163、16
5…アンドゲート、167…割り込み制御回路、171
…イネーブルレジスタ、173…オアゲート、175…
アンドゲート、211…主記憶、212…プロセッサ、
213…コントロールバス、214…アドレスバス、2
15…データバス、221…基本演算制御回路、222
…アドレス変換制御回路、223、224…TLB、2
25…キャッシュ制御回路、226…ユーザ命令バス、
227…オペランドデータバス、229…ファームウエ
アROM、230…ワークメモリ、230…オペランド
キャッシュメモリ、232…命令キャッシュメモリ。
[Description of Signs] 11: Main memory, 12: Processor, 101: Instruction register, 103: Instruction decoder, 105: Register file, 107: Register file dedicated to firmware mode, 109: Control register, 111: FWM register,
113, 115: multiplexer, 117: AND gate, 119: data register, 121: arithmetic unit, 123
.. .Operation unit control circuit, 125 .operand address generation circuit, 127 .address register, 129 .TLB (Tran)
slation Lookaside Buffer), 131 ... Comparator, 133
... TLB hit register, 135 ... Physical cache memory, 137 ... Work memory dedicated to firmware mode, 139 ... Read data register, 141 ... Register, 143 ... Operation result register, 145 ... Result storage control circuit, 151 ... Location counter, 153 ... Update circuit, 155 ... Branch destination address generation circuit, 157, 159
... Mux, 161 ... Inverter, 163, 16
5 AND gate, 167 interrupt control circuit, 171
... Enable register, 173 ... OR gate, 175 ...
AND gate, 211: main memory, 212: processor,
213: control bus, 214: address bus, 2
15 Data bus, 221 Basic operation control circuit, 222
... Address conversion control circuits, 223, 224 ... TLB, 2
25: cache control circuit, 226: user instruction bus,
227: Operand data bus, 229: Firmware ROM, 230: Work memory, 230: Operand cache memory, 232: Instruction cache memory.

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 通常モードと非同期割り込みが禁止され
るファームウエアモードの2つの動作モードを有するシ
ステムであって、 通常モードで実行されるべきRISC型機械語命令から
なる通常モード用のプログラムを記憶する第1の記憶手
段と、 ファームウエアモードで実行されるべきRISC型機械
語命令からなるファームウエアモード用プログラムを記
憶する第2の記憶手段と、 前記第1と第2の記憶手段の機械命令を読み出す読み
出し手段と、 ファームウエアモード専用の専用レジスタセットと、 ファームウエアモード及び通常モードに共用の共用レジ
スタセットと、 前記読み出し手段により読み出された前記ファームウエ
ア用プログラムの命令を前記専用レジスタセットと前記
共用レジスタセットを用いて実行し、前記通常モード用
プログラムの命令を前記共用レジスタセットを用いて実
行する実行手段と、 を備えることを特徴とするシステム。
1. A system having two operation modes, a normal mode and a firmware mode in which asynchronous interrupts are prohibited, wherein a program for a normal mode including a RISC type machine language instruction to be executed in the normal mode is stored. first storage means and, machine language of the second storage means and said first and second storage means for storing the firmware mode program consisting of a RISC machine instructions to be executed by the firmware mode Reading means for reading instructions; a dedicated register set dedicated to firmware mode; a shared register set shared for firmware mode and normal mode; and the dedicated register for reading the instructions of the firmware program read by the reading means. And the common register set, and execute the normal mode. Execution means for executing instructions of a load program using the shared register set.
【請求項2】 通常モードと非同期割り込みが禁止され
るファームウエアモードの2つの動作モードを有するシ
ステムであって、 通常モードで実行されるべきRISC型機械語命令から
なる通常モード用のプログラムと前記ファームウエアモ
ードへの切り替えを指示する命令と、ファームウエアモ
ードで実行されるべきRISC型機械語命令からなるフ
ァームウエアモード用のプログラムと、通常モードへの
リターンを指示する命令を記憶する記憶手段と、 通常状態において、前記記憶手段に記憶された通常モー
ド用のプログラムの命令を順次読み出し、前記ファーム
ウエアモードへの切り替えを指示する命令に応答してフ
ァームウエアモード用のプログラムの命令を順次読み出
し、通常モードへのリターンを指示する命令に応答して
通常モード用のプログラムの命令を順次読み出す読み出
し手段と、 前記読み出し手段により読み出された命令を実行すると
共に、前記ファームウエアモードへの切り替えを指示す
る命令に応答して、非同期割り込みを禁止し、通常モー
ドへのリターンを指示する命令に応答して、非同期割り
込みを可能とする手段と、 備えることを特徴とするシステム。
2. A system having two operation modes, a normal mode and a firmware mode in which asynchronous interrupts are prohibited, comprising: a program for a normal mode including a RISC-type machine language instruction to be executed in the normal mode; Storage means for storing a command for switching to the firmware mode, a program for the firmware mode including a RISC-type machine language instruction to be executed in the firmware mode, and a command for returning to the normal mode; In the normal state, the instructions of the program for the normal mode stored in the storage means are sequentially read, and the instructions of the program for the firmware mode are sequentially read in response to the instruction to switch to the firmware mode, In response to the instruction to return to normal mode, Reading means for sequentially reading the instructions of the program for the firmware, executing the instructions read by the reading means, and prohibiting the asynchronous interrupt in response to the instruction to switch to the firmware mode. Means for enabling an asynchronous interrupt in response to an instruction to return to the mode.
【請求項3】 CISC型プログラムをRISC型プロ
セッサに移植する方法であって、CISI型プログラム
を構成する命令のうち、複数のマイクロプログラムによ
り制御され、一体不可分に実行されるべき所定の命令に
ついては、非同期割り込みを禁止されるファームウエア
モードを設定し、このファームウエアモード内で、前記
所定の命令と同一機能を実現する複数のRISC型命令
を実行することを特徴とするCISC型プログラムをR
ISC型プロセッサに移植する方法。
3. A method for porting a CISC-type program to a RISC-type processor, wherein, among instructions constituting the CISI-type program, predetermined instructions which are controlled by a plurality of microprograms and which are to be integrally executed are described. A firmware mode in which asynchronous interrupts are prohibited, and a plurality of RISC-type instructions for realizing the same function as the predetermined instruction are executed in the firmware mode.
How to port to ISC type processor.
JP05118235A 1993-05-20 1993-05-20 Arithmetic unit Expired - Fee Related JP3105110B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP05118235A JP3105110B2 (en) 1993-05-20 1993-05-20 Arithmetic unit
KR1019940010986A KR0127254B1 (en) 1993-05-20 1994-05-20 Arithmetic controller having special operation mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05118235A JP3105110B2 (en) 1993-05-20 1993-05-20 Arithmetic unit

Publications (2)

Publication Number Publication Date
JPH06332692A JPH06332692A (en) 1994-12-02
JP3105110B2 true JP3105110B2 (en) 2000-10-30

Family

ID=14731580

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05118235A Expired - Fee Related JP3105110B2 (en) 1993-05-20 1993-05-20 Arithmetic unit

Country Status (2)

Country Link
JP (1) JP3105110B2 (en)
KR (1) KR0127254B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10585702B2 (en) 2007-12-31 2020-03-10 Intel Corporation System and method for supporting metered clients with manycore

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7802252B2 (en) * 2007-01-09 2010-09-21 International Business Machines Corporation Method and apparatus for selecting the architecture level to which a processor appears to conform
US9361109B2 (en) * 2010-05-24 2016-06-07 Qualcomm Incorporated System and method to evaluate a data value as an instruction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10585702B2 (en) 2007-12-31 2020-03-10 Intel Corporation System and method for supporting metered clients with manycore

Also Published As

Publication number Publication date
KR0127254B1 (en) 1998-04-02
JPH06332692A (en) 1994-12-02

Similar Documents

Publication Publication Date Title
US5249286A (en) Selectively locking memory locations within a microprocessor&#39;s on-chip cache
TWI407366B (en) Microprocessor with private microcode ram,method for efficiently storing data within a microprocessor ,and computer program product for use with a computing device
US5119483A (en) Application of state silos for recovery from memory management exceptions
US5854913A (en) Microprocessor with an architecture mode control capable of supporting extensions of two distinct instruction-set architectures
US4985825A (en) System for delaying processing of memory access exceptions until the execution stage of an instruction pipeline of a virtual memory system based digital computer
US5944841A (en) Microprocessor with built-in instruction tracing capability
US6044478A (en) Cache with finely granular locked-down regions
US8099541B2 (en) Minivisor entry point in virtual machine monitor address space
US6549985B1 (en) Method and apparatus for resolving additional load misses and page table walks under orthogonal stalls in a single pipeline processor
US4701844A (en) Dual cache for independent prefetch and execution units
US5438670A (en) Method of prechecking the validity of a write access request
US6266755B1 (en) Translation lookaside buffer with virtual address conflict prevention
US5940858A (en) Cache circuit with programmable sizing and method of operation
US5974440A (en) Microprocessor with circuits, systems, and methods for interrupt handling during virtual task operation
US5768574A (en) Microprocessor using an instruction field to expand the condition flags and a computer system employing the microprocessor
JPH10198563A (en) Dynamically loadable pattern history chart in microprocessor
US5263153A (en) Monitoring control flow in a microprocessor
JPH0695969A (en) Granurality hint for conversion buffer of high-performance processor
US5596735A (en) Circuit and method for addressing segment descriptor tables
US5835949A (en) Method of identifying and self-modifying code
JP2000231549A (en) Microprocessor
US6351797B1 (en) Translation look-aside buffer for storing region configuration bits and method of operation
US6065091A (en) Translation look-aside buffer slice circuit and method of operation
US5946718A (en) Shadow translation look-aside buffer and method of operation
JP2021512400A (en) Controlling protected tag checking in memory access

Legal Events

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