JP2696578B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JP2696578B2
JP2696578B2 JP1326253A JP32625389A JP2696578B2 JP 2696578 B2 JP2696578 B2 JP 2696578B2 JP 1326253 A JP1326253 A JP 1326253A JP 32625389 A JP32625389 A JP 32625389A JP 2696578 B2 JP2696578 B2 JP 2696578B2
Authority
JP
Japan
Prior art keywords
instruction
address
data
memory
unit
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 - Lifetime
Application number
JP1326253A
Other languages
Japanese (ja)
Other versions
JPH03186935A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1326253A priority Critical patent/JP2696578B2/en
Publication of JPH03186935A publication Critical patent/JPH03186935A/en
Application granted granted Critical
Publication of JP2696578B2 publication Critical patent/JP2696578B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はデータ処理装置に関し、更に詳述すれば、タ
スクスイッチング用のメモリに内蔵することにより、タ
スクスイッチングに要する時間を短縮し得るデータ処理
装置に関する。
Description: BACKGROUND OF THE INVENTION The present invention relates to a data processing device, and more particularly, to a data processing device which can reduce the time required for task switching by being incorporated in a task switching memory. Related to the device.

[従来の技術] 近年のデータ処理装置の動作速度の高速化に伴って主
メモリの高速化が要求され、このためメモリシステムの
実現コストが増大するという問題が生じている。この問
題を解決するための一手法として、データ処理装置と主
メモリとの間に高速メモリであるキャッシュメモリを介
在させることによりデータ処理装置と主メモリとの速度
差を埋め合わせる技術が用いられている。
[Prior Art] With the recent increase in the operation speed of data processing devices, the speed of the main memory has been required to increase, and this has caused a problem that the realization cost of the memory system increases. As a technique for solving this problem, a technique is used in which a cache memory that is a high-speed memory is interposed between the data processing device and the main memory to make up the speed difference between the data processing device and the main memory. .

また、キャッシュメモリをデータ処理装置と同一の集
積回路内に実現することにより高速なキャッシュメモリ
を実現する提案も、たとえば特開昭63-193230号公報に
詳細に開示されている。
A proposal for realizing a high-speed cache memory by realizing the cache memory in the same integrated circuit as the data processing device is also disclosed in detail in, for example, Japanese Patent Application Laid-Open No. 63-193230.

しかし、キャッシュメモリを用いて平均的にメモリア
クセス時間を短くするのみにては、複数のデータ処理プ
ロセスを時分割で実行している場合のタスクスイッチン
グ等のような特に高速動作が必要とされる際にキャッシ
ュミスが発生する可能性もあり、結果的にタスクスイッ
チングに要する時間の最大値を小さくすることはできな
い。
However, simply shortening the memory access time on average by using a cache memory requires particularly high-speed operation such as task switching when a plurality of data processing processes are executed in a time-division manner. In such a case, a cache miss may occur, and as a result, the maximum value of the time required for task switching cannot be reduced.

この問題を解決するために、タスクスイッチング時の
コンテキスト退避用のメモリを通常のメモリ空間とは別
に定義しておき、このコンテキスト退避用メモリ空間と
して使用されるメモリを高速メモリで構成したり、ある
いはデータ処理装置と同じ集積回路内に実現したりする
ことにより、タスクスイッチングに要する時間を短縮す
る提案もなされている。このような技術は例えば、特開
昭64-91253号公報に詳細に開示されている。
In order to solve this problem, the memory for context saving at the time of task switching is defined separately from the normal memory space, and the memory used as the memory space for context saving is constituted by a high-speed memory, or Proposals have also been made to shorten the time required for task switching, for example, by realizing it in the same integrated circuit as the data processing device. Such a technique is disclosed in detail, for example, in JP-A-64-91253.

[発明が解決しようとする課題] しかし、キャッシュメモリとして高速メモリを用いて
も、キャッシュミスが発生した場合には高速なメモリア
クセスが実現できない。また、コンテキスト退避用に通
常のメモリ空間とは別のメモリ空間を定義しても、その
メモリ空間を構成するメモリが他のメモリよりも高速動
作可能でなければタスクスイッチングに要する時間を短
縮することは出来ない。
[Problems to be Solved by the Invention] However, even if a high-speed memory is used as a cache memory, high-speed memory access cannot be realized when a cache miss occurs. Also, even if a memory space different from the normal memory space is defined for context saving, the time required for task switching should be reduced unless the memory that configures the memory space can operate at higher speed than other memories. Can not.

このような問題は、キャッシュメモリは全メモリアク
セスに対して平均してアクセス時間を短縮するためのも
のであって、コンテキスト退避時などの特に高速のメモ
リアクセスが必要な場合に高速なメモリアクセスを確実
に保証することは出来ないという理由に起因している。
The problem is that the cache memory is used to reduce the access time on average for all memory accesses. This is because it cannot be guaranteed reliably.

ところで、キャッシュメモリは高速なメモリ装置では
あるが、高価であるため単一の機能のみではそのコスト
に見合う有効な利用ができない。特に、キャッシュメモ
リをデータ処理装置と同一の集積回路に内蔵する場合に
は、高価なキャッシュメモリの有効利用が望まれる。
By the way, although a cache memory is a high-speed memory device, it is expensive, so that a single function alone cannot be used effectively for its cost. In particular, when the cache memory is built in the same integrated circuit as the data processing device, effective use of the expensive cache memory is desired.

[課題を解決するための手段] 本発明のデータ処理装置は以上のような事情に鑑みて
なされたものであり、命令をデコードする該命令デコー
ド部の出力に従って命令を実行する命令実行部と、アド
レスデコーダ、タグアドレスを格納するタグアドレスメ
モリ及びデータ又は命令コードを格納するデータメモリ
を備え、第1のモード又は第2のモードで動作するメモ
リと、該メモリの動作モードを規定する第1の値又は第
2の値を保持するメモリ制御情報保持手段と、前記命令
実行部及びメモリ間に接続され、データ又は命令コード
を転送するバスと、前記命令実行部からの支持を受けて
アドレスを生成して前記メモリへ出力するアドレス生成
部と、前記メモリ制御情報保持手段が第1の値を保持し
ている場合に、前記アドレス生成部が出力したアドレス
を前記タグアドレスメモリに格納されているタグアドレ
スと比較し、そのいずれかと一致したときに前記データ
メモリから対応するデータ又は命令コードを前記バスへ
出力させる手段と、前記メモリ制御情報保持手段が第2
の値を保持している場合に、前記アドレス生成部が出力
したアドレスを、命令によってアクセス可能なメモリ空
間の一部として前記メモリに割り付けたアドレスと比較
し、該アドレスの範囲内であるときに、前記データメモ
リから対応するデータ又は命令コードを前記バスへ出力
させる手段とを備える。
Means for Solving the Problems A data processing apparatus according to the present invention has been made in view of the above circumstances, and has an instruction execution unit that executes an instruction in accordance with an output of the instruction decoding unit that decodes the instruction. An address decoder, a tag address memory for storing a tag address, and a data memory for storing data or an instruction code, a memory operating in the first mode or the second mode, and a first memory defining an operation mode of the memory A memory control information holding unit for holding a value or a second value; a bus connected between the instruction execution unit and the memory for transferring data or an instruction code; and an address generated by support from the instruction execution unit An address generation unit for outputting to the memory, and when the memory control information holding unit holds the first value, the address generation unit outputs the first value. Means for comparing the received address with a tag address stored in the tag address memory, and outputting a corresponding data or instruction code from the data memory to the bus when the address matches one of the addresses, and the memory control information holding means Is the second
Is held, the address output by the address generator is compared with the address allocated to the memory as a part of the memory space accessible by the instruction, and when the address is within the range of the address. Means for outputting the corresponding data or instruction code from the data memory to the bus.

そして前記メモリ空間はシステムプログラムが使用す
るメモリ空間である。またコンテキストを退避させる命
令で使用するメモリ空間でもある。
The memory space is a memory space used by a system program. It is also a memory space used for instructions to save context.

〔作用〕[Action]

本発明のデータ処理装置では、メモリ制御情報保持手
段が第1の値を保持している場合、前記メモリは命令デ
コード部がデコードすべき命令コード又は命令実行部が
実行すべき命令のオペランドの少なくとも一方となるデ
ータを保持するキャッシュメモリとして動作し、アドレ
ス生成部が出力したアドレスを前記タグアドレスメモリ
に格納されているタグアドレスと比較し、そのいずれか
と一致したとき(キャッシュヒット時)に前記データメ
モリから対応するデータ又は命令コードを前記バスへ出
力させる。データの場合は命令実行部へ、命令コードの
場合は命令フェッチ部へ与えられる。
In the data processing device of the present invention, when the memory control information holding unit holds the first value, the memory stores at least an instruction code to be decoded by the instruction decoding unit or an operand of an instruction to be executed by the instruction execution unit. It operates as a cache memory that holds one of the data, compares the address output by the address generation unit with the tag address stored in the tag address memory, and, when the address matches one of them (at the time of a cache hit), The corresponding data or instruction code is output from the memory to the bus. In the case of data, it is supplied to the instruction execution unit, and in the case of the instruction code, it is supplied to the instruction fetch unit.

これに対して、メモリ制御情報保持手段が第2の値を
保持している場合、前記メモリは命令デコード部がデコ
ードすべき命令コード又は命令実行部が実行すべき命令
のオペランドの少なくとも一方となるデータを保持す
る、命令によってアクセス可能なメモリ空間の一部とし
てアドレスが割付けられたランダムアクセスメモリとし
て動作し、アドレス生成部が出力したアドレスをメモリ
に割付けたアドレスと比較し、該アドレスの範囲内であ
るときに、データメモリから対応するデータ又は命令コ
ードを前記バスへ出力させる。
On the other hand, when the memory control information holding unit holds the second value, the memory becomes at least one of the instruction code to be decoded by the instruction decoding unit or the operand of the instruction to be executed by the instruction execution unit. It operates as a random access memory in which an address is allocated as a part of a memory space that holds data and is accessible by an instruction, compares an address output from an address generation unit with an address allocated to the memory, , The corresponding data or instruction code is output from the data memory to the bus.

[発明の実施例] 以下、本発明をその実施例を示す図面を参照して詳述
する。
Hereinafter, the present invention will be described in detail with reference to the drawings showing the embodiments.

(1) 「本発明のデータ処理装置を用いたシステムの
構成」 第6図に本発明のデータ処理装置を用いたシステムの
構成例を示す。
(1) “Configuration of system using data processing device of the present invention” FIG. 6 shows a configuration example of a system using the data processing device of the present invention.

この構成例では、本発明のデータ処理装置100,命令キ
ャッシュ106,データキャッシュ107及び108,主メモリ109
がアドレスバス101,データバス102,命令バス103,メモリ
アドレスバス104,メモリデータバス105で結合されてい
る。
In this configuration example, the data processing device 100, the instruction cache 106, the data caches 107 and 108, the main memory 109 of the present invention
Are connected by an address bus 101, a data bus 102, an instruction bus 103, a memory address bus 104, and a memory data bus 105.

アドレスバス101は本発明のデータ処理装置100から出
力されるアドレスを命令キャッシュ106とデータキャッ
シュ107,108とに入力する。命令バス103は命令キャッシ
ュ106から出力される命令コードを本発明のデータ処理
装置100に転送する。データバス102は本発明のデータ処
理装置100から出力されるデータをデータキャッシュ10
7,108に転送したり、データキャッシュ107,108から出力
されるデータを本発明のデータ処理装置100に転送した
りする。メモリアドレスバス104は命令キャッシュ106ま
たはデータキャッシュ107,108から出力されるアドレス
を主メモリ109に転送する。メモリデータバス105は主メ
モリ109と命令キャッシュ106またはデータキャッシュ10
7,108間での命令またはデータを転送する。
The address bus 101 inputs an address output from the data processing device 100 of the present invention to the instruction cache 106 and the data caches 107 and 108. The instruction bus 103 transfers the instruction code output from the instruction cache 106 to the data processing device 100 of the present invention. The data bus 102 stores data output from the data processing device 100 of the present invention in the data cache 10.
7, and the data output from the data caches 107 and 108 is transferred to the data processing device 100 of the present invention. The memory address bus 104 transfers an address output from the instruction cache 106 or the data caches 107 and 108 to the main memory 109. The memory data bus 105 includes the main memory 109 and the instruction cache 106 or the data cache 10
Transfer instructions or data between 7,108.

命令キャッシュ106及びデータキャッシュ107,108がミ
スした場合はそれぞれのキャッシュ106または107がメモ
リアドレスバス104とメモリデータバス105とのバス権を
調停して主メモリ109をアクセスする。
When the instruction cache 106 and the data caches 107, 108 miss, the respective caches 106 or 107 arbitrate the bus right between the memory address bus 104 and the memory data bus 105 to access the main memory 109.

データキャッシュ107,108は本発明のデータ処理装置1
00の側では64ビットのバスに結合するために2つのチッ
プが協調して動作する。各データの64ビットそれぞれの
内の上位32ビットのデータをデータキャッシュ107が、
下位32ビットのデータをデータキャッシュ108が分担し
て受持つ。
The data caches 107 and 108 are the data processing device 1 of the present invention.
On the 00 side, the two chips work together to couple to a 64-bit bus. The data cache 107 stores the upper 32 bits of the 64 bits of each data,
The data cache 108 shares the lower 32 bits of data.

以下、本発明のデータ処理装置100の命令体系及び処
理機構について最初に記述し、次に内蔵制御空間メモリ
を使用したタスクスイッチ処理の手法について説明す
る。
Hereinafter, an instruction system and a processing mechanism of the data processing device 100 of the present invention will be described first, and then a task switch processing method using the built-in control space memory will be described.

(2) 「本発明のデータ処理装置の命令フォーマッ
ト」 本発明のデータ処理装置の命令は16ビット単位で可変
長となっており、奇数バイト長の命令はない。
(2) "Instruction format of data processing device of the present invention" The instruction of the data processing device of the present invention has a variable length in 16-bit units, and there is no odd byte length instruction.

本発明のデータ処理装置では高頻度に使用される命令
を短いフォーマットとするため、特に工夫された命令フ
ォーマット体系を有する。例えば、2オペランド命令に
対して、基本的に“4バイト+拡張部”の構成を有して
総てのアドレッシングモードが利用可能な一般形フォー
マットと、高頻度の命令及びアドレッシングモードのみ
を使用可能な短縮形フォーマットとの2つのフォーマッ
トを有する。
The data processing apparatus of the present invention has a specially designed instruction format system in order to convert frequently used instructions into a short format. For example, for a two-operand instruction, only a general format having a configuration of "4 bytes + extension part" and all addressing modes can be used, and only a high-frequency instruction and an addressing mode can be used. And two short formats.

第9図から第13図に示す本発明のデータ処理装置の命
令フォーマット中に現われる記号の意味は以下の通りで
ある。
The meanings of the symbols appearing in the instruction format of the data processor of the present invention shown in FIGS. 9 to 13 are as follows.

−:オペレーションコードが入る部分 Ea:8ビットの一般形のアドレッシングモードでオペラン
ドが指定される部分 Sh:6ビットの短縮形のアドレッシングモードでオペラン
ドが指定される部分 Rn:レジスタファイル上のオペランドがレジスタ番号で
指定される部分 フォーマットは、第9図に示す如く、右側がLSB側で
且つ高いアドレスになっている。
−: Part where the operation code is entered Ea: Part where the operand is specified in the general addressing mode of 8 bits Sh: Part where the operand is specified in the short addressing mode of 6 bits Rn: The operand in the register file is a register As shown in FIG. 9, the partial format specified by the number has the LSB side on the right side and a high address.

アドレスNとアドレスN+1との2バイトを見ないと
命令フォーマットが判別できないようになっているが、
これは、命令が必ず16ビット(ハーフワード)単位でフ
ェッチ及びデコードされることを前提としているからで
ある。
The instruction format cannot be determined without looking at the two bytes of address N and address N + 1.
This is because it is assumed that instructions are always fetched and decoded in 16-bit (halfword) units.

本発明のデータ処理装置の命令ではいずれのフォーマ
ットの場合も、各オペランドのEaまたはShの拡張部は必
ずそのEaまたはShの基本部を含む16ビット(ハーフワー
ド)の直後に置かれる。これは、命令により暗黙に指定
される即値データ及び命令の拡張部に優先する。従っ
て、4バイト以上の命令では、Eaの拡張部により命令の
オペレーションコードが分断される場合がある。
Regardless of the format of the instruction of the data processing apparatus of the present invention, the extension of Ea or Sh of each operand is always placed immediately after 16 bits (half word) including the basic part of Ea or Sh. This overrides immediate data implicitly specified by the instruction and the extension of the instruction. Therefore, in the case of an instruction of 4 bytes or more, the operation code of the instruction may be divided by the extension of Ea.

また、後述する如く、多段間接モードによりEaの拡張
部に更に拡張部が付加される場合にも、次の命令オペコ
ードよりもそちらの方が優先される。
Further, as described later, even when an extension is further added to the extension of Ea in the multistage indirect mode, that extension has priority over the next instruction opcode.

例えば、第1ハーフワードにEa1を含み、第2ハーフ
ワードにEa2を含み、第3ハーフワードまである6バイ
ト命令の場合を考える。Ea1に多段間接モードを使用し
たために通常の拡張部の他に多段間接モードの拡張部も
付加されるものとする。この際、実際の命令ビットパタ
ーンは、命令の第1ハーフワード(Ea1の基本部を含
む)、Ea1の拡張部、Ea1の多段間接モード拡張部、命令
の第2ハーフワード(Ea2の基本部を含む)、Ea2の拡張
部、命令の第3ハーフワードの順となる。
For example, consider the case of a 6-byte instruction that includes Ea1 in the first halfword, Ea2 in the second halfword, and extends to the third halfword. Since the multi-stage indirect mode is used for Ea1, an extension in the multi-stage indirect mode is added in addition to the normal extension. At this time, the actual instruction bit pattern includes the first halfword of the instruction (including the basic part of Ea1), the extended part of Ea1, the multistage indirect mode extended part of Ea1, and the second halfword of the instruction (the basic part of Ea2). ), The extension of Ea2, and the third halfword of the instruction.

(2.1) 「短縮形2オペランド命令」 第10図は2オペランド命令の短縮形フォーマットを示
す模式図である。
(2.1) “Short-form two-operand instruction” FIG. 10 is a schematic diagram showing a short-form format of a two-operand instruction.

このフォーマットには、ソースオペランド側がメモリ
となるL−formatとデスティネーションオペランド側が
メモリとなるS−formatとがある。
This format includes an L-format in which the source operand is a memory and an S-format in which the destination operand is a memory.

L−formatでは、Shはソースオペランドの指定フィー
ルド、Rnはデスティネーションオペランドのレジスタの
指定フィールド、RRはShのオペランドサイズの指定をそ
れぞれ表す。
In the L-format, Sh indicates a source operand specification field, Rn indicates a destination operand register specification field, and RR indicates a Sh operand size specification.

レジスタ上に置かれたデスティネーションオペランド
のサイズは32ビットに固定されている。レジスタ側とメ
モリ側とのサイズが異なり、ソース側のサイズが小さい
場合に符号拡張が行なわれる。
The size of the destination operand placed in the register is fixed at 32 bits. Sign extension is performed when the size of the register side is different from that of the memory side and the size of the source side is small.

S−formatではShはデスティネーションオペランドの
指定フィールド、Rnはソースオペランドのレジスタ指定
フィールド、RRはShのオペランドサイズの指定をそれぞ
れ表す。
In the S-format, Sh indicates a destination operand specification field, Rn indicates a source operand register specification field, and RR indicates a Sh operand size specification.

レジスタ上に置かれたソースオペランドのサイズは32
ビットに固定されている。レジスタ側とメモリ側とのサ
イズが異なり、ソース側のサイズが大きい場合に、溢れ
た部分の切捨てとオーバーフローチェックとが行われ
る。
The size of the source operand placed in the register is 32
Bits have been fixed. If the size of the register side is different from the size of the memory side and the size of the source side is large, the overflow portion is truncated and an overflow check is performed.

(2.2) 「一般形1オペランド命令」 第11図は1オペランド命令の一般形フォーマット(G1
-format)を示す模式図である。
(2.2) "General form one-operand instruction" Figure 11 shows the general form of a one-operand instruction (G1
-format).

MMはオペランドサイズの指定フィールドである。一部
のG1-format命令では、Eaの拡張部以外にも拡張部を有
する。また、MMを使用しない場合もある。
MM is an operand size specification field. Some G1-format instructions have an extension in addition to the extension of Ea. In some cases, MM is not used.

(2.3) 「一般形2オペランドの場合」 第12図は2オペランド命令の一般形フォーマットを示
す模式図である。
(2.3) "In the case of general-type two-operand" FIG. 12 is a schematic diagram showing a general-type format of a two-operand instruction.

このフォーマットに含まれるのは、8ビットで指定さ
れる一般形アドレッシングモードのオペランドが最大2
つ存在する命令である。オペランドの総数自体は3つ以
上になる場合がある。
This format includes a maximum of 2 operands in the general addressing mode specified by 8 bits.
There are two existing instructions. The total number of operands itself may be three or more.

EaMはデスティネーションオペランドの指定フィール
ド、MMはデスティネーションオペランドサイズの指定フ
ィールド、EaRはソースオペランド指定フィールド、RR
はソースオペランドサイズの指定フィールドをそれぞれ
示している。
EaM is the destination operand specification field, MM is the destination operand size specification field, EaR is the source operand specification field, RR
Indicates a source operand size specification field.

一部のG−format命令では、EaM及びEaRの拡張部以外
にも拡張部を有する。
Some G-format instructions have an extension in addition to the EaM and EaR extensions.

第13図はショートブランチ命令のフォーマットを示す
模式図である。
FIG. 13 is a schematic diagram showing the format of a short branch instruction.

ccccは分岐条件指定フィールド、disp:8はジャンプ先
との変位指定フィールドをそれぞれ示している。
cccc indicates a branch condition specification field, and disp: 8 indicates a displacement specification field with respect to a jump destination.

本発明のデータ処理装置では8ビットで変位を指定す
る場合には、ビットパターンでの指定値を2倍して変位
値とする。
In the data processing apparatus of the present invention, when a displacement is designated by 8 bits, the designated value in the bit pattern is doubled to obtain a displacement value.

(2.4) 「アドレッシングモード」 本発明のデータ処理装置の命令のアドレッシングモー
ド指定方法には、レジスタを含めて6ビットで指定する
短縮形と、8ビットで指定する一般形とがある。
(2.4) "Addressing mode" The addressing mode of the instruction of the data processing device of the present invention is classified into a short form in which the instruction is specified by 6 bits including a register, and a general form in which the instruction is specified by 8 bits.

未定義のアドレッシングモードを指定した場合、ある
いは意味的に考えて明らかに不合理なアドレッシングモ
ードの組合わせが指定された場合には、未定義命令を実
行した場合と同じく予約命令例外が発生され、例外処理
が起動される。
If an undefined addressing mode is specified, or if a semantically apparently unreasonable combination of addressing modes is specified, a reserved instruction exception is generated as in the case of executing an undefined instruction, Exception processing is started.

これに該当するのは、デスティネーションが即値モー
ドである場合、アドレス計算を伴うべきアドレシングモ
ード指定フィールドで即値モードが使用された場合等で
ある。
This corresponds to a case where the destination is the immediate mode, a case where the immediate mode is used in the addressing mode designation field to be accompanied by the address calculation, and the like.

第14図から第24図に示すフォーマットの模式図中で使
用されている記号の意味は以下の通りである。
The meanings of the symbols used in the schematic diagrams of the formats shown in FIGS. 14 to 24 are as follows.

Rn:レジスタ指定 (Sh):6ビットの短縮形アドレッシングモードでの指定
方法 (Ea):8ビットの一般形アドレッシングモードでの指定
方法 フォーマットを示す模式図中で点線で囲まれた部分は
拡張部を示す。
Rn: Register specification (Sh): Specification method in 6-bit compact addressing mode (Ea): Specification method in 8-bit general addressing mode In the schematic diagram showing the format, the part enclosed by a dotted line is the extension part. Is shown.

(2.4.1) 「基本アドレッシングモード」 本発明のデータ処理装置の命令では種々のアドレッシ
ングモードをサポートする。その内の本発明のデータ処
理装置でサポートする基本アドレッシングモードには、
レジスタ直接モード、レジスタ間接モード、レジスタ相
対間接モード、即値モード、絶対モード、PC相対間接モ
ード、スタックポップモード及びスタックプッシュモー
ドである。
(2.4.1) “Basic Addressing Mode” The instructions of the data processing device of the present invention support various addressing modes. Among them, the basic addressing modes supported by the data processing device of the present invention include:
Register direct mode, register indirect mode, register relative indirect mode, immediate mode, absolute mode, PC relative indirect mode, stack pop mode, and stack push mode.

レジスタ直接モードは、レジスタの内容をそのままオ
ペランドとする。フォーマットの模式図を第14図に示
す。図中、Rnは汎用レジスタまたはFPUレジスタの番号
を示す。
In the register direct mode, the contents of the register are used as operands as they are. FIG. 14 shows a schematic diagram of the format. In the figure, Rn indicates the number of a general-purpose register or an FPU register.

レジスタ間接モードは、汎用レジスタの内容をアドレ
スとするメモリの内容をオペランドとする。フォーマッ
トの模式図を第15図に示す。図中、Rnは汎用レジスタの
番号を示す。
In the register indirect mode, the contents of a memory having the contents of a general-purpose register as an address are used as operands. A schematic diagram of the format is shown in FIG. In the figure, Rn indicates the number of a general-purpose register.

レジスタ相対間接モードは、ディスプレースメント値
が16ビットであるか32ビットであるかにより2種類に分
かれる。それぞれ、汎用レジスタの内容に16ビットまた
は32ビットのディスプレースメント値を加えた値をアド
レスとするメモリの内容をオペランドとする。フォーマ
ットの模式図を第16図に示す。図中、Rnは汎用レジスタ
の番号を示す。disp:16とdisp:32とは、それぞれ、16ビ
ットのディスプレースメント値、32ビットのディスプレ
ースメント値を示す。ディスプレースメント値は符号付
きとして扱われる。
The register relative indirect mode is classified into two types depending on whether the displacement value is 16 bits or 32 bits. Each operand is the contents of a memory whose address is a value obtained by adding a 16-bit or 32-bit displacement value to the contents of a general-purpose register. A schematic diagram of the format is shown in FIG. In the figure, Rn indicates the number of a general-purpose register. disp: 16 and disp: 32 indicate a 16-bit displacement value and a 32-bit displacement value, respectively. Displacement values are treated as signed.

即値モードは、命令コード中で指定されるビットパタ
ンをそのまま2進数と見なしてオペランドとする。フォ
ーマットの模式図を第17図に示す。図中、imm_dataは即
値を示し、そのサイズはオペランドサイズとして命令中
で指定される。
In the immediate mode, the bit pattern specified in the instruction code is regarded as a binary number and used as an operand. A schematic diagram of the format is shown in FIG. In the figure, imm_data indicates an immediate value, and its size is specified in the instruction as an operand size.

絶対モードは、アドレス値が16ビットで示されるか32
ビットで示されるかにより2種類に分かれる。それぞれ
命令コード中で指定される16ビットまたは32ビットのビ
ットパタンをアドレスとしたメモリの内容をオペランド
とする。フォーマットの模式図を第18図に示す。図中、
abs:16とabs:32とはそれぞれ16ビット,32ビットのアド
レス値を示す。abs:16でアドレスが示される場合は指定
されたアドレス値を32ビットに符号拡張する。
Absolute mode indicates whether the address value is represented by 16 bits or 32 bits.
It is divided into two types depending on whether it is indicated by a bit. The contents of the memory whose address is a 16-bit or 32-bit bit pattern specified in the instruction code are used as operands. A schematic diagram of the format is shown in FIG. In the figure,
abs: 16 and abs: 32 indicate 16-bit and 32-bit address values, respectively. If the address is indicated by abs: 16, the specified address value is sign-extended to 32 bits.

PC相対間接モードは、ディスプレースメント値が16ビ
ットか32ビットかにより2種類に分かれる。それぞれプ
ログラムカウンタの内容に16ビットまたは32ビットのデ
ィスプレースメント値を加えた値をアドレスとするメモ
リの内容をオペランドとする。フォーマットの模式図を
第19図に示す。図中、disp:16とdisp:32とはそれぞれ16
ビットのディスプレースメント値,32ビットのディスプ
レースメント値を示す。ディスプレースメント値は符号
付きとして扱われる。PC相対間接モードにおいて参照さ
れるプログラムカウンタの値は、そのオペランドを含む
命令の先頭アドレスである。多段間接アドレッシングモ
ードにおいてプログラムカウンタの値が参照される場合
にも、同様に命令先頭のアドレスがPC相対の基準値とし
て使用される。
The PC relative indirect mode is divided into two types depending on whether the displacement value is 16 bits or 32 bits. Operands are the contents of a memory whose address is a value obtained by adding a 16-bit or 32-bit displacement value to the contents of the program counter. A schematic diagram of the format is shown in FIG. In the figure, disp: 16 and disp: 32 are each 16
The bit displacement value and the 32-bit displacement value are shown. Displacement values are treated as signed. The value of the program counter referred to in the PC relative indirect mode is the start address of the instruction including the operand. Also when the value of the program counter is referred to in the multi-stage indirect addressing mode, the head address of the instruction is similarly used as the reference value relative to the PC.

スタックポップモードは、SP(スタックポインタ)の
内容をアドレスとするメモリの内容をオペランドとす
る。オペランドアクセス後、SPをオペランドサイズだけ
インクリメントする。例えば、32ビットデータを扱う場
合、オペランドアクセス後にSPが+4だけ更新される。
8,16,64ビットのサイズのオペランドに対するスタック
ポップモードの指定も可能であり、それぞれSPが+1,+
2,+8だけ更新される。フォーマットの模式図を第20図
に示す。オペランドに対しスタックポップモードが意味
を持たないものについては、予約命令例外が発生され
る。予約命令例外となるのは具体的には、writeオペラ
ンド及びread-modify-writeオペランドに対するスタッ
クポップモード指定である。
In the stack pop mode, the contents of a memory having the contents of the SP (stack pointer) as an address are used as operands. After the operand access, the SP is incremented by the operand size. For example, when handling 32-bit data, SP is updated by +4 after operand access.
It is also possible to specify the stack pop mode for operands of 8, 16, and 64 bits, and the SP is +1 and +
Updated by 2, + 8. A schematic diagram of the format is shown in FIG. If the stack pop mode has no meaning for the operand, a reserved instruction exception is generated. The reserved instruction exception is specifically the stack pop mode specification for the write operand and the read-modify-write operand.

スタックプッシュモードは、SPの内容をオペランドサ
イズだけデクリメントした内容をアドレスとするメモリ
の内容をオペランドとする。スタックプッシュモードで
はオペランドアクセス前にSPがデクリメントされる。例
えば、32ビットデータを扱う場合は、オペランドアクセ
ス前にSPが−4だけ更新される。8,16,64ビットのサイ
ズのオペランドに対するスタックプッシュモードの指定
も可能であり、それぞれSPが−1,−2,−8だけ更新され
る。フォーマットの模式図を第21図に示す。オペランド
に対してスタックプッシュモードが意味を持たないもの
に対しては、予約命令例外が発生される予約命令例外と
なるのは具体的には、readオペランド及びread-modify-
writeオペランドに対するスタックプッシュモード指定
である。
In the stack push mode, the contents of the memory whose address is the contents of the contents of the SP decremented by the operand size are used as the operands. In the stack push mode, SP is decremented before operand access. For example, when handling 32-bit data, SP is updated by -4 before operand access. It is also possible to specify the stack push mode for operands of 8, 16 and 64 bits, and the SP is updated by -1, -2 and -8, respectively. FIG. 21 shows a schematic diagram of the format. For those in which the stack push mode has no meaning for the operand, the reserved instruction exception in which the reserved instruction exception occurs is specifically the read operand and the read-modify-
This is the stack push mode specification for the write operand.

(2.4.2) 「多段間接アドレッシングモード」 複雑なアドレッシングも、基本的には加算と間接参照
の組み合わせに分解することができる。従って、加算と
間接参照のオペレーションとをアドレッシングのプリミ
ティブとして与えておき、それを任意に組合わせること
が出来れば、いかに複雑なアドレッシングモードをも実
現することが出来る。本発明のデータ処理装置の命令の
多段間接アドレッシングモードはこのような考え方に立
脚したアドレッシングモードである。複雑なアドレッシ
ングモードは、モジュール間のデータ参照及びAI言語の
処理系に特に有用である。
(2.4.2) "Multi-stage indirect addressing mode" Complex addressing can be basically decomposed into a combination of addition and indirect reference. Therefore, if the addition and indirect reference operations are given as addressing primitives and can be arbitrarily combined, any complicated addressing mode can be realized. The multi-stage indirect addressing mode of the instruction of the data processing device of the present invention is an addressing mode based on such a concept. The complex addressing mode is particularly useful for data reference between modules and an AI language processor.

多段間接アドレッシングモードを指定する際、基本ア
ドレッシングモード指定フィールドでは、レジスタベー
ス多段間接モード,PCベース多段間接モード及び絶対ベ
ース多段間接モードの3種類の指定方法の内のいずれか
1つを指定する。
When the multi-stage indirect addressing mode is specified, the basic addressing mode specification field specifies one of three types of specifying methods: a register-based multi-stage indirect mode, a PC-based multi-stage indirect mode, and an absolute-based multi-stage indirect mode.

レジスタベース多段間接モードは、汎用レジスタの値
を拡張する多段間接アドレッシングのベース値とするア
ドレッシングモードである。フォーマットの模式図を第
22図に示す。図中、Rnは汎用レジスタの番号を示す。
The register-based multistage indirect mode is an addressing mode in which the base value of multistage indirect addressing for expanding the value of a general-purpose register is used. The schematic diagram of the format
See Figure 22. In the figure, Rn indicates the number of a general-purpose register.

PCベース多段間接モードは、プログラムカウンタの値
を拡張する多段間接アドレッシングのベース値とするア
ドレッシングモードである。フォーマットの模式図を第
23図に示す。
The PC-based multi-stage indirect mode is an addressing mode in which the base value of the multi-stage indirect addressing that extends the value of the program counter is used. The schematic diagram of the format
See Figure 23.

絶対ベース多段間接モードは、ゼロを拡張する多段間
接アドレッシングのベース値とするアドレッシングモー
ドである。フォーマットの模式図を第24図に示す。
The absolute-based multistage indirect mode is an addressing mode in which the base value of the multistage indirect addressing that extends zero is used. FIG. 24 shows a schematic diagram of the format.

拡張された多段間接モード指定フィールドは、16ビッ
トを単位としており、これが任意回反復される。1段の
多段間接モードにより、ディスプレースメントの加算,
インデクスレジスタのスケーリング(×1,×2,×4,×
8)と加算,メモリの間接参照が行われる。多段間接モ
ードのフォーマットの模式図を第25図に示す。図中の各
フィールドは以下に示す意味を有する。
The extended multistage indirect mode designation field has a unit of 16 bits, and this is repeated arbitrarily. Addition of displacement,
Index register scaling (× 1, × 2, × 4, ×
8) is added, and the memory is indirectly referenced. FIG. 25 shows a schematic diagram of the format of the multistage indirect mode. Each field in the figure has the following meaning.

E=0:多段間接モード継続 E=1:アドレス計算終了 tmp==>address of operand I=0:メモリ間接参照なし tmp+disp+Rx*Scale==>tmp I=1:メモリ間接参照あり mem[tmp+disp+Rx*Scale]==>tmp M=0:<Rx>をインデスクとして使用 M=1:特殊なインデスク <Rx>=0 インデスク値を加算しない (Rx=0) <Rx>=1 プログラムカウンタをインデクス値とし
て使用 (Rx=PC) <Rx>=2〜 reserved D=0:多段間接モード中の4ビットのフィールドd4の値
を4倍してディスプレースメント値とし、これを加算す
る。d4は符号付きとして扱い、オペランドのサイズとは
関係なく必ず4倍して使用する D=1:多段間接モードの拡張部で指定さたdispx(16/32
ビット)をディスプレースメント値とし、これを加算す
る。拡張部のサイズはd4フィールドで指定する d4=0001 dispxは16ビット d4=0010 dispx32ビット XX :インデスクのスケール(scal=1/2/4/8) プログラムカウンタに対して×2,×4,×8のスケーリ
ングを行なった場合には、その段の処理終了後の中間値
(tmp)として不定値が入る。
E = 0: Continue multi-stage indirect mode E = 1: End address calculation tmp ==> address of operand I = 0: No memory indirect reference tmp + disp + Rx * Scale ==> tmp I = 1: With memory indirect reference mem [tmp + disp + Rx * Scale ] ==> tmp M = 0: <Rx> is used as the in-desk M = 1: Special in-desk <Rx> = 0 Do not add the in-desk value (Rx = 0) <Rx> = 1 Index the program counter Used as a value (Rx = PC) <Rx> = 2 to reserved D = 0: The value of the 4-bit field d4 in the multistage indirect mode is multiplied by 4 to obtain a displacement value, which is added. d4 is treated as signed and always used by 4 regardless of the size of the operand. D = 1: dispx (16/32) specified in the extension of the multistage indirect mode
Bit) as a displacement value and add it. The size of the extension is specified in the d4 field. D4 = 0001 dispx is 16 bits d4 = 0010 dispx32 bits XX: Scale of in-desk (scal = 1/2/4/8) x2, x4, When the scaling of × 8 is performed, an undefined value is entered as an intermediate value (tmp) after the processing of the stage is completed.

この多段間接モードによって得られる実効アドレスは
予測できない値となるが、例外は発生しない。プログラ
ムカウンタに対するスケーリングの指定は行なってはい
けない。
The effective address obtained by the multistage indirect mode has an unpredictable value, but no exception occurs. Do not specify scaling for the program counter.

多段間接モードによる命令フォーマットのバリエーシ
ョンは第26図及び第27図の模式図に示す。
Variations of the instruction format in the multistage indirect mode are shown in the schematic diagrams of FIGS. 26 and 27.

第26図は多段間接モードが継続するか終了するかのバ
リエーションを示す。第27図はディスプレースメントの
サイズのバリエーションを示す。
FIG. 26 shows a variation of whether the multi-stage indirect mode continues or ends. FIG. 27 shows variations in displacement size.

任意段数の多段間接モードが利用できれば、コンパイ
ラの中で段数による場合分けが不要になるので、コンパ
イラの負担が軽減されるというメリットがある。多段の
間接参照の頻度が非常に少ないとしても、コンパイラと
しては必ず正しいコードを発生できなければならないか
らである。このため、フォーマット上では任意の段数を
可能としている。
If a multi-stage indirect mode with an arbitrary number of stages can be used, it is not necessary to divide the number of stages in the compiler, so that there is an advantage that the load on the compiler is reduced. This is because even if the frequency of multi-stage indirect references is extremely low, the compiler must always be able to generate correct code. For this reason, any number of stages is possible on the format.

(3) 「メモリ空間とコンテキストスイッチ」 本発明のデータ処理装置100は、プログラム及びデー
タを格納するメモリ空間である論理空間と各種のレジス
タ及び一部の命令により操作されるデータを格納するメ
モリ空間である制御空間との2つのメモリ空間をサポー
トする。
(3) “Memory space and context switch” The data processing device 100 of the present invention includes a logical space, which is a memory space for storing programs and data, and a memory space for storing various registers and data operated by some instructions. , And two memory spaces.

本発明のデータ処理装置100の論理空間は、従来のデ
ータ処理装置においてプログラム,データを格納するメ
モリ空間と同じである。
The logical space of the data processing device 100 of the present invention is the same as the memory space for storing programs and data in a conventional data processing device.

本発明のデータ処理装置100の制御空間は、制御空間
操作命令によりデータを書込むこと及び読出すことが可
能であり、各種のレジスタがバイトアドレスでマップさ
れているレジスタ領域とデータを格納するためのデータ
領域とがある。なお、制御空間のデータ領域はコンテキ
スト操作命令でもアクセス可能である。
The control space of the data processing device 100 of the present invention can write and read data by a control space operation instruction, and stores data in a register area where various registers are mapped by byte addresses. Data area. Note that the data area of the control space can be accessed by a context operation instruction.

本発明のデータ処理装置と類似した手法で論理区間と
制御空間とをサポートして制御空間にコンテキストを保
持する技術としては、たとえば特開昭64-91253号公報に
詳細に開示されている。
A technique for supporting a logical section and a control space in a manner similar to that of the data processing apparatus of the present invention to hold a context in the control space is disclosed in detail, for example, in Japanese Patent Application Laid-Open No. 64-91253.

(3.1) 「コンテキストブロックフォーマット」 第30図は本発明のデータ処理装置のコンテキストスイ
ッチング命令であるLDCTX命令とSTCTX命令とで操作され
るコンテキストブロックのフォーマットを示す模式図で
ある。
(3.1) “Context block format” FIG. 30 is a schematic diagram showing a format of a context block operated by an LDCTX instruction and an STCTX instruction which are context switching instructions of the data processing device of the present invention.

コンテキストブロックは、浮動小数点レジスタ12,汎
用レジスタ10,11等にて構成されており、先頭アドレス
は第34図の模式図にその構成を示すCTXBBレジスタに保
持される。
The context block is composed of a floating-point register 12, general-purpose registers 10, 11 and the like, and the start address is held in a CTXBB register whose configuration is shown in the schematic diagram of FIG.

LDCTX命令とSTCTX命令とで操作されるコンテキストブ
ロックのフォーマットは第31図の模式図にその構成を示
すCSWレジスタで指定される。
The format of the context block operated by the LDCTX instruction and the STCTX instruction is specified by the CSW register whose configuration is shown in the schematic diagram of FIG.

CSWレジスタのFRビット13とRGビット15とが共に“1"
である場合は、コンテキストブロックは第30図に示すフ
ォーマットになる。
FR bit 13 and RG bit 15 of CSW register are both "1"
, The context block has the format shown in FIG.

FRビット13が“0"でRGビット14が“1"である場合は、
第30図に示されている浮動小数点レジスタ12はLDCTX命
令とSTCTX命令とによる操作対象とはならない。
If FR bit 13 is “0” and RG bit 14 is “1”,
The floating point register 12 shown in FIG. 30 is not operated by the LDCTX instruction and the STCTX instruction.

FRビット13とRGビット14とが共に“0"である場合は、
第30図に示されている浮動小数点レジスタ12,汎用レジ
スタ10,11がLDCTX命令とSTCTX命令とによる操作対象と
ならない。この場合は、CSWレジスタと4つのスタック
ポインタSPI(SP0,SP1,SP2,SP3)及びアドレス変換テー
ブルベースを示すUATBレジスタが操作対象となる。
If both FR bit 13 and RG bit 14 are “0”,
The floating-point register 12 and the general-purpose registers 10 and 11 shown in FIG. 30 are not operated by the LDCTX instruction and the STCTX instruction. In this case, the CSW register, the four stack pointers SPI (SP0, SP1, SP2, SP3), and the UATB register indicating the address conversion table base are to be operated.

UATBレジスタの構成は第35図の模式図に示されてい
る。
The structure of the UATB register is shown in the schematic diagram of FIG.

(3.2) 「コンテキスト操作命令」 LDCTX命令のビットパタンを第32図の模式図に示す。(3.2) “Context operation instruction” The bit pattern of the LDCTX instruction is shown in the schematic diagram of FIG.

LDCTX命令のCTXBADRフィールド16はロードすべきコン
テキストブロックの先頭アドレスを8ビットの一般形ア
ドレッシングモードで指定するフィールドである。
The CTXBADR field 16 of the LDCTX instruction is a field for designating the start address of the context block to be loaded in the 8-bit general addressing mode.

Xビット15はロードすべきコンテキストブロックが論
理空間又は制御空間のいずれにあるのかを示すビットで
ある。Xビット15が“0"である場合はコンテキストブロ
ックは論理空間にあり、Xビット15が“1"である場合は
コンテキストブロックは制御空間にあることをそれぞれ
示す。
The X bit 15 is a bit indicating whether the context block to be loaded is in the logical space or the control space. When the X bit 15 is "0", the context block is in the logical space, and when the X bit 15 is "1", the context block is in the control space.

LDCTX命令が実行された場合、CTXBADRフィールド16に
て指定されるアドレスがCTXBBレジスタにロードされ、
Xビット15で指定される空間内のCTXBADR16フィールド
で指定されるアドレスにあり且つ先頭のCSW値で指定さ
れるフォーマットの操作対象コンテキストブロックが対
応するレジスタにロードされる。
When the LDCTX instruction is executed, the address specified in the CTXBADR field 16 is loaded into the CTXBB register,
The operation target context block at the address specified by the CTXBADR16 field in the space specified by the X bit 15 and having the format specified by the leading CSW value is loaded into the corresponding register.

STCTX命令のビットパタンを第33図の模式図に示す。 The bit pattern of the STCTX instruction is shown in the schematic diagram of FIG.

STCTX命令のXビット17はコンテキストブロックをス
トアすべき空間を指定する。このSTCTX命令のXビット1
7が“0"であればコンテキストブロックを論理空間にス
トアすることが指定され、Xビット17が“1"であればコ
ンテキストブロックを制御空間にストアすることが指定
される。ストアすべきメモリアドレスはCTXBBレジスタ
で指定される。
X bit 17 of the STCTX instruction specifies the space in which to store the context block. X bit 1 of this STCTX instruction
If 7 is "0", it is designated to store the context block in the logical space, and if X bit 17 is "1", it is designated to store the context block in the control space. The memory address to be stored is specified by the CTXBB register.

STCTX命令が実行されると、Xビット17で指定される
空間内のCTXBBレジスタで指定されるアドレスにCSWレジ
スタで指定されるフォーマットのコンテキストブロック
に含まれるレジスタの内容が退避される。
When the STCTX instruction is executed, the contents of the register included in the context block in the format specified by the CSW register are saved at the address specified by the CTXBB register in the space specified by the X bit 17.

(4) 「本発明のデータ処理装置の機能ブロックの構
成」 第4図は本発明のデータ処理装置の一構成例を示すブ
ロック図である。
(4) “Configuration of Functional Block of Data Processing Device of the Present Invention” FIG. 4 is a block diagram showing a configuration example of the data processing device of the present invention.

本発明のデータ処理装置の内部を機能的に大きく分け
ると、命令入力部110,命令フェッチ部111,命令デコード
部112,第1マイクロROM部113,第2マイクロROM部114,オ
ペランドアドレス計算部115,PC計算部116,整数演算部11
7,浮動小数点演算部118,アドレス入出力部119,オペラン
ドアクセス部120,データ入出力部121に分かれる。
Functionally dividing the inside of the data processing apparatus of the present invention roughly, an instruction input unit 110, an instruction fetch unit 111, an instruction decode unit 112, a first micro ROM unit 113, a second micro ROM unit 114, an operand address calculation unit 115 , PC calculation unit 116, integer operation unit 11
7, a floating point operation unit 118, an address input / output unit 119, an operand access unit 120, and a data input / output unit 121.

アドレス入出力部119をアドレスバス101に結合し、デ
ータ入出力部121をデータバス102に結合し、命令入力部
110を命令バス103に結合することにより前述の第6図に
示すシステム構成をとることができる。
The address input / output unit 119 is connected to the address bus 101, the data input / output unit 121 is connected to the data bus 102, and the instruction input unit is connected.
By connecting 110 to the instruction bus 103, the system configuration shown in FIG. 6 can be obtained.

(4.1) 「命令入力部」 命令入力部110は外部の命令バス103から32ビットごと
に命令コードを本発明にデータ処理装置へ入力する。
(4.1) “Instruction Input Unit” The instruction input unit 110 inputs an instruction code to the data processing device from the external instruction bus 103 every 32 bits.

命令キャッシュ106のアクセス方法には、1つのアド
レスに対して32ビットの命令コードをアクセスする標準
アクセスモードと1つのアドレスに対して4回連続で32
ビットの命令コードをアクセスするクワッドアクセスモ
ードとがあり、いずれの場合も命令入力部110に入力し
た命令コードを命令フェッチ部111へ出力する。
The access method of the instruction cache 106 includes a standard access mode in which a 32-bit instruction code is accessed for one address, and 32 consecutive accesses for one address.
There is a quad access mode for accessing a bit instruction code. In each case, the instruction code input to the instruction input unit 110 is output to the instruction fetch unit 111.

(4.2) 「命令フェッチ部」 命令フェッチ部111には命令アドレスのアドレス変換
機構,内蔵命令キャッシュ,命令用TLB,命令キューとそ
れらの制御部がある。
(4.2) "Instruction Fetch Unit" The instruction fetch unit 111 includes an address conversion mechanism for instruction addresses, a built-in instruction cache, a TLB for instructions, an instruction queue, and a control unit for them.

命令フェッチ部111は、次にフェッチすべき命令のPC
値を物理アドレスに変換し、内蔵命令キャッシュから命
令コードをフェッチし、命令デコード部112へ出力す
る。内蔵命令キャッシュがミスした場合には、アドレス
入出力部119へ物理アドレスを出力して外部への命令ア
クセスを要求し、命令入力部110を通じて入力された命
令コードを内蔵命令キャッシュに登録する。
The instruction fetch unit 111 stores the PC of the instruction to be fetched next.
The value is converted to a physical address, an instruction code is fetched from the internal instruction cache, and output to the instruction decode unit 112. If the built-in instruction cache misses, it outputs a physical address to the address input / output unit 119, requests external instruction access, and registers the instruction code input through the instruction input unit 110 in the built-in instruction cache.

次にフェッチすべき命令のPC値は命令キューに入力す
べき命令のPC値として専用のカウンタで計算される。ジ
ャンプが生じた場合には、新たな命令のPC値がオペラン
ドアドレス計算部115,PC計算部116あるいは整数演算部1
17から転送されてくる。
The PC value of the next instruction to be fetched is calculated by a dedicated counter as the PC value of the instruction to be input to the instruction queue. When a jump occurs, the PC value of the new instruction is stored in the operand address calculation unit 115, the PC calculation unit 116, or the integer operation unit 1
Transferred from 17.

命令用TLBがミスした場合のペーシングによるアドレ
ス変換及び命令用TLB更新も命令フェッチ部111の内部の
制御回路により行われる。
The control circuit inside the instruction fetch unit 111 also performs address conversion by pacing and updating of the instruction TLB when the instruction TLB misses.

また、本発明のデータ処理装置がバスウォッチモード
である場合は、アドレス入出力部119を通じて入力され
た物理アドレスがヒットする内蔵命令キャッシュのエン
トリを無効化する。
When the data processing device of the present invention is in the bus watch mode, the entry of the internal instruction cache in which the physical address input through the address input / output unit 119 hits is invalidated.

(4.3) 「命令デコード部」 命令デコード部112では基本的に16ビット(ハーフワ
ード)単位に命令コードをデコードする。
(4.3) “Instruction Decoding Unit” The instruction decoding unit 112 basically decodes an instruction code in units of 16 bits (half word).

このブロックには第1ハーフワードに含まれるオペレ
ーションコードをデコードするFHWデコーダ,第2及び
第3ハーフワードに含まれるオペレーションコードをデ
コードするNFHWデコーダ,アドレッシングモードをデコ
ードするアドレッシングモードデコーダが含まれる。
This block includes an FHW decoder for decoding the operation code included in the first halfword, an NFHW decoder for decoding the operation code included in the second and third halfwords, and an addressing mode decoder for decoding the addressing mode.

更に、FHWデコーダ及びNFHWデコーダの出力を更にデ
コードしてマイクロROMのエントリアドレスを計算する
第2デコーダ,条件分岐命令の分岐予測を行う分岐予測
機構,オペランドアドレス計算の際のパイプラインコン
フリクトをチェックするアドレス計算コンフリクトチェ
ック機構も含まれる。
Furthermore, a second decoder for further calculating the entry address of the micro ROM by further decoding the outputs of the FHW decoder and the NFHW decoder, a branch prediction mechanism for predicting a branch of a conditional branch instruction, and checking for a pipeline conflict in calculating an operand address. An address calculation conflict check mechanism is also included.

命令デコード部112は命令フェッチ部111から出力され
た命令コードを1クロックにつき0〜6バイトデコード
する。デコード結果の内の、整数演算部117での演算に
関する情報が第1マイクロROM部113へ、浮動小数点演算
部118での演算に関する情報が第2マイクロROM部114
へ、オペランドアドレス計算に関係する情報がオペラン
ドアドレス計算部115へ、PC計算に関係する情報がPC計
算部116へそれぞれ出力される。
The instruction decode unit 112 decodes the instruction code output from the instruction fetch unit 111 from 0 to 6 bytes per clock. Of the decoding result, information about the operation in the integer operation unit 117 is sent to the first micro ROM unit 113, and information about the operation in the floating point operation unit 118 is sent to the second micro ROM unit 114.
The information related to the operand address calculation is output to the operand address calculation unit 115, and the information related to the PC calculation is output to the PC calculation unit 116.

(4.4) 「第1マイクロROM部」 第1マイクロROM部113には整数演算部117の制御を行
う種々のマイクロプログラムルーチンが格納されている
マイクロROM,マイクロシーケンサ,マイクロ命令デコー
ダ等どが含まれる。
(4.4) "First Micro ROM Unit" The first micro ROM unit 113 includes a micro ROM, a micro sequencer, a micro instruction decoder, etc. in which various micro program routines for controlling the integer operation unit 117 are stored. .

マイクロ命令はマイクロROMから1クロックに1度読
出される。マイクロシーケンサは命令実行に関するマイ
クロプログラム実行のためのシーケンス処理の他に、例
外,割込,トラップ(この3つ併せてEITと総称する)
の受付けと各EITに対応するマイクロプログラムのシー
ケンス処理も行う。
The micro instruction is read from the micro ROM once per clock. The micro-sequencer is not only the sequence processing for micro program execution related to instruction execution, but also exceptions, interrupts, and traps (these three are collectively referred to as EIT)
And performs microprogram sequence processing corresponding to each EIT.

第1マイクロROM部113へは命令コードに依存しない外
部割込みや整数演算実行結果によるマイクロプログラム
の分岐条件も入力される。
The first micro ROM unit 113 also receives an external interrupt that does not depend on the instruction code and a branch condition of the micro program based on the result of executing the integer operation.

マイクロデコーダの出力は主に整数演算部117に対し
て出力されるが、ジャンプ命令の実行時及び例外受付時
には一部の情報を他の機能ブロックへも出力する。
The output of the microdecoder is mainly output to the integer operation unit 117, but also outputs some information to other functional blocks when a jump instruction is executed and when an exception is accepted.

(4.5) 「第2マイクロROM部」 第2マイクロROM部114には浮動小数点演算部118の制
御を行う種々のマイクロプログラムルーチンが格納され
ているマイクロROM,マイクロシーケンサ,マイクロ命令
デコーダ等が含まれる。
(4.5) "Second Micro ROM Unit" The second micro ROM unit 114 includes a micro ROM, a micro sequencer, a micro instruction decoder, and the like in which various micro program routines for controlling the floating point arithmetic unit 118 are stored. .

マイクロ命令はマイクロROMから1クロックに1度読
出される。マイクロシーケンサはマイクロプログラムで
示されるシーケンス処理の他に、浮動小数点演算に関係
する例外の処理も行い、マスクされていない浮動小数点
例外が検出された場合には第1マイクロROM部113へ例外
処理を要求する。第2マイクロROM部114のマイクロシー
ケンサは第1マイクロROM部113のマイクロシーケンサと
並列に動作し、整数演算部117と並列に浮動小数点演算
部118を制御する。
The micro instruction is read from the micro ROM once per clock. The micro-sequencer also performs exception processing related to floating-point operations in addition to the sequence processing indicated by the micro-program. If an unmasked floating-point exception is detected, the micro-sequencer sends the exception processing to the first micro-ROM unit 113. Request. The micro-sequencer of the second micro-ROM unit 114 operates in parallel with the micro-sequencer of the first micro-ROM unit 113, and controls the floating-point operation unit 118 in parallel with the integer operation unit 117.

第2マイクロROM部113には浮動小数点演算実行結果に
よるフラッグ情報も入力される。
The flag information based on the result of the execution of the floating point operation is also input to the second micro ROM unit 113.

マイクロデコーダの出力は主に浮動小数点演算部118
に対して出力されるが、浮動小数点演算に関係する例外
の検出等の一部の情報は他の機能ブロックへも出力され
る。
The output of the microdecoder is mainly the floating point
However, some information such as detection of an exception related to the floating-point operation is also output to other functional blocks.

(4.6) 「オペランドアドレス計算部」 オペランドアドレス計算部115は、命令デコード部112
のアドレッシングモードデコーダ等から出力されたオペ
ランドアドレス計算に関係する情報によりハードワイヤ
ード制御される。このブロックではメモリ間接アドレッ
シングのためのメモリアクセス以外のオペランドのアド
レス計算とジャンプ命令のジャンプ先アドレスの計算と
が行われる。
(4.6) “Operand address calculation unit” The operand address calculation unit 115 includes the instruction decoding unit 112
Is hard-wired by information related to operand address calculation output from an addressing mode decoder or the like. In this block, address calculation of operands other than memory access for memory indirect addressing and calculation of a jump destination address of a jump instruction are performed.

オペランドアドレスの計算結果は整数演算部117へ出
力される。オペランドアドレス計算終了段階での先行ジ
ャンプ処理では、ジャンプ先アドレスの計算結果が命令
フェッチ部111とPC計算部とへ出力される。
The calculation result of the operand address is output to integer operation section 117. In the preceding jump process at the end of the operand address calculation, the calculation result of the jump destination address is output to the instruction fetch unit 111 and the PC calculation unit.

即値オペランドは整数演算部117及び浮動小数点演算
部118へ出力される。アドレス計算に必要な汎用レジス
タ及びプログラムカウンタの値は整数演算部117又はPC
計算部116から入力される。
The immediate operand is output to the integer operation unit 117 and the floating point operation unit 118. The values of general-purpose registers and the program counter required for address calculation are stored in the integer operation unit 117 or PC.
Input from the calculation unit 116.

(4.7) 「PC計算部」 PC計算部116は命令デコード部112から出力されるPC計
算に関係する情報でハードワイヤードに制御され、命令
のPC値を計算する。
(4.7) “PC Calculation Unit” The PC calculation unit 116 is hard-wiredly controlled by information related to PC calculation output from the instruction decoding unit 112, and calculates a PC value of an instruction.

本発明のデータ処理装置の命令は前述の如く、可変長
命令であり、命令をデコードしてみないとその命令の長
さが判らない。PC計算部116は、命令デコード部112から
出力される命令長をデコード中の命令のPC値に加算する
ことにより次の命令のPC値を計算する。
As described above, the instruction of the data processing device of the present invention is a variable length instruction, and the length of the instruction cannot be known unless the instruction is decoded. The PC calculation unit 116 calculates the PC value of the next instruction by adding the instruction length output from the instruction decoding unit 112 to the PC value of the instruction being decoded.

また、PC計算部116では命令アドレスのブレイクポイ
ントレジスタあるいはトリガポインタレジスタの値と実
行された命令のPC値との比較も行われる。
The PC calculation unit 116 also compares the value of the breakpoint register or trigger pointer register of the instruction address with the PC value of the executed instruction.

PC計算部116の計算結果は各命令のPC値として命令の
デコード結果とともに出力される。
The calculation result of the PC calculation unit 116 is output as a PC value of each instruction together with the decoding result of the instruction.

命令デコードステージでの先行ブランチ処理では、命
令デコード部11から出力されるブランチ幅をPC値に加算
することによりブランチ先命令のアドレスが計算され
る。
In the preceding branch processing in the instruction decode stage, the address of the branch destination instruction is calculated by adding the branch width output from the instruction decode unit 11 to the PC value.

また、PC計算部116にはサブルーチンへのジャンプ命
令の実行時にスタックにプッシュしておいたサブルーチ
ンからの戻り先PC値のコピーを保持するPCスタックが用
意されている。PC計算部116は、サブルーチンからのリ
ターン命令に対してはPCスタックから戻先PCを読出すこ
とにより、プリリターン先命令のアドレスを生成する処
理も行う。
Further, the PC calculation unit 116 is provided with a PC stack that holds a copy of the return PC value from the subroutine that has been pushed onto the stack when the jump instruction to the subroutine is executed. For the return instruction from the subroutine, the PC calculation unit 116 also performs a process of generating the address of the pre-return destination instruction by reading the return destination PC from the PC stack.

(4.8) 「整数演算部」 整数演算部117は第1マイクロROM部113のマイクロROM
に格納されたマイクロプログラムにより制御され、各整
数演算命令の機能を実現するために必要な演算を整数演
算部117の内部にあるレジスタファイルと演算部とを使
用して実行する。
(4.8) “Integer operation unit” The integer operation unit 117 is a micro ROM of the first micro ROM unit 113.
Is executed by using a register file and an operation unit inside the integer operation unit 117, which are controlled by a microprogram stored in the integer operation unit 117 and required to realize the function of each integer operation instruction.

レジスタファイルには汎用レジスタ及び作業用レジス
タが含まれる。また、整数演算部117には整数演算の結
果により変化するフラッグ及び外部割込みのマスクレベ
ルを定めるビット等を含むプロセッサ状態語(PSW),CS
Wレジスタ,UATBレジスタ,CTXBBレジスタ,バッファメモ
リ制御レジスタ等も含まれる。
The register file includes general-purpose registers and work registers. In addition, the integer operation unit 117 includes a processor status word (PSW), CS, including a flag that changes according to the result of the integer operation and a bit that determines a mask level of an external interrupt.
It also includes the W register, UATB register, CTXBB register, buffer memory control register, etc.

命令の演算対象となるオペランドがアドレスあるいは
即値である場合は、オペランドアドレス計算部115から
即値あるいは計算されたアドレスが入力される。また、
命令の演算対象となるオペランドがメモリ上のデータで
ある場合は、アドレス計算部115で計算されたアドレス
がオペランドアクセス部120へ出力され、データバッフ
ァあるいは外部からフェッチされたオペランドが整数演
算部117へ入力される。
When the operand to be operated on by the instruction is an address or an immediate, the operand or the calculated address is input from the operand address calculating unit 115. Also,
If the operand to be operated on by the instruction is data on the memory, the address calculated by the address calculation unit 115 is output to the operand access unit 120, and the operand fetched from the data buffer or externally is transferred to the integer operation unit 117. Is entered.

演算に際して、データバッファ,外部のデータキャッ
シュ107,108あるいは主メモリ109をリードする必要があ
る場合は、整数演算部117はマイクロプログラムの指示
によりオペランドアクセス部120へアドレスを出力して
目的のデータをフェッチする。
If it is necessary to read the data buffer, external data caches 107 and 108 or the main memory 109 during the operation, the integer operation unit 117 outputs an address to the operand access unit 120 in accordance with the instruction of the microprogram and fetches the target data. .

演算結果をデータバッファ,外部のデータキャッシュ
107,108あるいは主メモリ109へストアする必要がある場
合は、整数演算部117はマイクロプログラムの指示によ
りオペランドアクセス部120へアドレスとデータとを出
力する。この際、P計算部116からはそのストア動作を
行った命令のPC値がオペランドアクセス部120出力され
る。
Data buffer for operation results, external data cache
When it is necessary to store the data in the memory 107 or 108 or the main memory 109, the integer operation unit 117 outputs an address and data to the operand access unit 120 according to the instruction of the microprogram. At this time, the PC value of the instruction that performed the store operation is output from the P calculation unit 116 to the operand access unit 120.

外部割込み,例外の処理等が行われて新たな命令アド
レスを整数演算部117が得た場合は、整数演算部117はこ
れを命令フェッチ部111とPC計算部116とへ出力する。
When the integer operation unit 117 obtains a new instruction address by performing an external interrupt, exception processing, or the like, the integer operation unit 117 outputs this to the instruction fetch unit 111 and the PC calculation unit 116.

(4.9) 「浮動小数点演算部」 浮動小数点演算部118は第2マイクロROM部114のマイ
クロROMに格納されたマイクロプログラムにより制御さ
れ、各浮動小数点演算命令の機能を実現するために必要
な演算を浮動小数点演算部118の内部にあるレジスタフ
ァイルと演算部とを使用して実行する。
(4.9) “Floating-point operation unit” The floating-point operation unit 118 is controlled by a microprogram stored in the micro-ROM of the second micro-ROM unit 114, and performs operations necessary for realizing the function of each floating-point operation instruction. The execution is performed using the register file and the operation unit inside the floating point operation unit 118.

また浮動小数点演算部118には浮動小数点演算の丸め
処理方法及び浮動小数点演算例外の検出許可をモード設
定する浮動小数点演算モード制御レジスタFMCと、浮動
小数点演算結果に対するフラグ及び浮動小数点演算例外
の発生状態に示すステータスビットからなる浮動小数点
演算状態語FSWとが備えられている。
The floating-point arithmetic unit 118 includes a floating-point arithmetic mode control register FMC for setting a rounding method for floating-point arithmetic and a mode for permitting detection of a floating-point arithmetic exception, a flag for the floating-point arithmetic result, and a state of occurrence of the floating-point arithmetic exception. And a floating-point operation status word FSW comprising the status bits shown in FIG.

命令の演算対象となるオペランドが即値である場合
は、オペランドアドレス計算部115から浮動小数点演算
部118へ即値が入力される。また、命令の演算対象とな
るオペランドがメモリ上のデータである場合は、アドレ
ス計算部115で計算されたアドレスがオペランドアクセ
ス部120へ出力され、データバッファまたは外部からフ
ェッチされたオペランドが浮動小数点演算部118へ入力
される。
When the operand to be operated on by the instruction is an immediate value, the immediate value is input from the operand address calculation unit 115 to the floating point operation unit 118. If the operand to be operated on by the instruction is data on a memory, the address calculated by the address calculation unit 115 is output to the operand access unit 120, and the operand fetched from the data buffer or from the outside is converted to a floating-point operation. The data is input to the unit 118.

オペランドを内蔵データキャッシュ,外部のデータキ
ャッシュ107,108あるいは主メモリ109へストアする必要
がある場合は、浮動小数点演算部118はマイクロプログ
ラムの指示によりオペランドアクセス部120へデータを
出力する。ストア動作では浮動小数点演算部118と整数
演算部117とが協調して動作し、オペランドアクセス部1
20に対して整数演算部117からオペランドのアドレスが
出力され、浮動小数点演算部118からオペランドが出力
される。この際、PC計算部116からはそのストア動作を
行った命令のPC値がオペランドアクセス部120へ出力さ
れる。
When the operands need to be stored in the built-in data cache, external data caches 107 and 108 or the main memory 109, the floating-point operation unit 118 outputs data to the operand access unit 120 according to the instruction of the microprogram. In the store operation, the floating-point operation unit 118 and the integer operation unit 117 operate in cooperation, and the operand access unit 1
For 20, the address of the operand is output from the integer operation unit 117, and the operand is output from the floating-point operation unit 118. At this time, the PC value of the instruction that performed the store operation is output from the PC calculation unit 116 to the operand access unit 120.

(4.10) 「オペランドアクセス部」 オペランドアクセス部120にはオペランドアドレスの
アドレス変換機構,データバッファ,データ用TLB,スト
アバッファ,オペランドブレイクポイントレジスタとそ
れらの制御部とがある。
(4.10) “Operand access unit” The operand access unit 120 includes an address conversion mechanism for an operand address, a data buffer, a data TLB, a store buffer, an operand breakpoint register, and a control unit therefor.

なお、データバッファはモード切換えにより内蔵デー
タキャッシュまたはPC値のトレースメモリとして動作す
る。
The data buffer operates as a built-in data cache or a PC value trace memory by mode switching.

データバッファを内蔵データキャッシュとして動作さ
せる場合、データのロード動作に際しては、オペランド
アクセス部120はオペランドアドレス計算部115または整
数演算部117から出力されたロードすべきデータの論理
アドレスを物理アドレスに変換し、データバッファから
データをフェッチし、整数演算部117または浮動小数点
演算部118へ出力する。
When the data buffer is operated as a built-in data cache, the operand access unit 120 converts the logical address of the data to be loaded output from the operand address calculation unit 115 or the integer operation unit 117 into a physical address during the data loading operation. , Fetches data from the data buffer and outputs the fetched data to the integer operation unit 117 or the floating point operation unit 118.

データバッファがミスした場合には、オペランドアク
セス部120はアドレス入出力部119へ物理アドレスを出力
し、外部へのデータアクセスを要求し、データ入出力部
122を通じて入力されたデータをデータバッファに登録
する。
If the data buffer misses, the operand access unit 120 outputs a physical address to the address input / output unit 119, requests data access to the outside, and
The data input through 122 is registered in the data buffer.

データのストア動作に際しては、オペランドアクセス
部120は整数演算部117から出力さたストアすべきデータ
の論理アドレスを物理アドレスに変換し、整数演算部11
7あるいは浮動小数点演算部118から出力されたデータを
データバッファにストアすると共に、ストアバッファを
通じてアドレス入出力部119へ物理アドレスを出力し、
データ入出力部122を通じて出たを外部へ出力する。ス
トア動作でミスが発生した場合には、データの更新は行
われない。
In the data storing operation, the operand access unit 120 converts the logical address of the data to be stored output from the integer operation unit 117 into a physical address, and
7 or store the data output from the floating point arithmetic unit 118 in the data buffer, and output the physical address to the address input / output unit 119 through the store buffer,
The output from the data input / output unit 122 is output to the outside. If a mistake occurs in the store operation, the data is not updated.

ストアバッファではストアすべきデータとそのアドレ
ス,更にそのストア動作を行た命令のPC値とが1組にし
て管理される。ストアバッファでのストア動作は先入れ
先出し制御方式で管理される。
In the store buffer, data to be stored, its address, and the PC value of the instruction that performed the store operation are managed as a set. The store operation in the store buffer is managed by a first-in first-out control method.

データバッファをコンテキスト退避用メモリとして動
作させる場合、データバッファはアドレスがH'FFFFE000
〜H'FFFFFFFF(H'は16進数を表す)の制御空間となる
(ランダムアクセスメモリ)RAMとして動作し、コンテ
キストスイッチング命令又は制御空間操作命令でアクセ
スすることが可能である。
When operating the data buffer as context save memory, the data buffer has an address of H'FFFFE000
It operates as a (random access memory) RAM serving as a control space of ~ H'FFFFFFFF (H 'represents a hexadecimal number), and can be accessed by a context switching instruction or a control space operation instruction.

データ用TLBがミスした場合のページングによるアド
レス変換及びデータ用TLBの更新もオペランドアクセス
部120の内部の制御回路により行われる。また、メモリ
アクセスアドレスがメモリにマップされたI/O領域に入
るか否かのチェックも行われる。
Address conversion by paging and updating of the data TLB when the data TLB is missed are also performed by the control circuit inside the operand access unit 120. Also, a check is made to determine whether the memory access address falls into an I / O area mapped to the memory.

また、データバッファを内蔵データキャッシュとして
動作させる際に、本発明のデータ処理装置のバスウォッ
チモードである場合には、オペランドアクセス部120は
アドレス入出力部119を通じて入力された物理アドレス
がヒットするデータバッファのエントリを無効化する。
When the data buffer is operated as the built-in data cache, if the data processing apparatus of the present invention is in the bus watch mode, the operand access unit 120 outputs the data to which the physical address input through the address input / output unit 119 hits. Invalidates a buffer entry.

(4.11) 「アドレス入出力部」 アドレス入出力部119は命令フェッチ部111とオペラン
ドアクセス部120とか出力されたアドレスを本発明のデ
ータ処理装置100の外部へ出力する。
(4.11) “Address input / output unit” The address input / output unit 119 outputs addresses output from the instruction fetch unit 111 and the operand access unit 120 to the outside of the data processing device 100 of the present invention.

アドレスの出力は本発明のデータ処理装置100で定め
られたバスプロトコルに従って実行される。
The output of the address is executed according to a bus protocol defined by the data processing device 100 of the present invention.

バスプロトコルの制御はアドレス入出力部119内にあ
る外部バス制御回路で行われる。外部バス制御回路では
ページ不在例外及びバスアクセス例外,外部割込みの受
付けも行う。
The control of the bus protocol is performed by an external bus control circuit in the address input / output unit 119. The external bus control circuit also receives page absence exceptions, bus access exceptions, and external interrupts.

また、本発明のデータ処理装置100以外の外部デバイ
スがバスマスタになっており、本発明のデータ処理装置
100がバスウォッチモードである場合には、アドレス入
出力部119は外部デバイスがデータライトサイクルを実
行した際にアドレスバス101上へ出力されたアドレスを
取込んで命令フェッチ部111とオペランドアクセス部120
とへ転送する。
Also, an external device other than the data processing device 100 of the present invention is a bus master, and the data processing device of the present invention is
When the bus 100 is in the bus watch mode, the address input / output unit 119 takes in the address output on the address bus 101 when the external device executes the data write cycle, and fetches the instruction fetch unit 111 and the operand access unit 120.
And forward to.

(4.12) 「データ入出力部」 データ入出力部121はオペランドのロード動作に際し
ては、データバス102からデータを取込みオペランドア
クセス部120へ転送する。オペランドのストア動作に際
しては、オペランドアクセス部120から出力されたオペ
ランドをデータバス102へ出力する。
(4.12) “Data Input / Output Unit” The data input / output unit 121 takes in data from the data bus 102 and transfers it to the operand access unit 120 at the time of an operand loading operation. At the time of the operand storing operation, the operand output from the operand access unit 120 is output to the data bus 102.

データキャッシュ107,108のアクセス方法には、1つ
のアドレスに対して64ビットのデータをアクセスする標
準アクセスモードと1つのアドレスに対して4回連続で
64ビットのデータをアクセスするクワッドアクセスモー
ドとがあり、いずれの場合もデータ入出力部121はオペ
ランドアクセス部120と外部のメモリとの間でやり取り
するデータを入出力する。
The access method of the data caches 107 and 108 includes a standard access mode in which 64-bit data is accessed for one address and four consecutive accesses for one address.
There is a quad access mode for accessing 64-bit data. In any case, the data input / output unit 121 inputs and outputs data exchanged between the operand access unit 120 and an external memory.

(5) 「パイプライン処理」 本発明のデータ処理装置100は各種のバッファ記憶
と、命令バス103,データバス102を使用したメモリの効
率的アクセスにより命令をパイプライン処理して高性能
に動作する。
(5) “Pipeline processing” The data processing apparatus 100 of the present invention performs high-performance operations by performing pipeline processing of instructions by means of various buffer storages and efficient access of memories using the instruction bus 103 and the data bus 102. .

ここでは、本発明のデータ処理装置100のパイプライ
ン処理方法について説明する。
Here, the pipeline processing method of the data processing device 100 of the present invention will be described.

(5.1) 「パイプライン機構」 本発明のデータ処理装置100のパイプライン処理機構
は第5図に模式図に示すように構成されている。
(5.1) “Pipeline Mechanism” The pipeline processing mechanism of the data processing device 100 of the present invention is configured as shown in the schematic diagram of FIG.

命令のプリフェッチを行う命令フェッチステージ(IF
ステージ)31,命令のデコードを行うデコードステージ
(Dステージ)32,オペランドのアドレス計算を行うオ
ペランドアドレス計算ステージ(Aステージ)33,マイ
クロROMアクセス(特にRステージ37と称す)とオペラ
ンドのプリフェッチ(特にOFステージ38と称す)を行う
オペランドフェッチステージ(Fステージ)34,命令の
実行を行う実行ステージ(Eステージ)35,メモリオペ
ランドのストアを行うストアステージ(Sステージ)36
の6段構成でパイプライン処理を実行する。
Instruction fetch stage (IF
Stage) 31, a decode stage (D stage) 32 for decoding an instruction, an operand address calculation stage (A stage) 33 for calculating the address of an operand, a micro ROM access (particularly referred to as an R stage 37), and a prefetch of an operand (particularly, OF stage 38), an execution stage (E stage) 35 for executing instructions, and a store stage (S stage) 36 for storing memory operands.
The pipeline processing is executed in a six-stage configuration.

Sステージ36には3段のストアバッファがある。 The S stage 36 has a three-stage store buffer.

各ステージは他のステージとは独立に動作し、理論上
は6つのステージが完全に独立動作する。
Each stage operates independently of the other stages, and theoretically six stages operate completely independently.

Sステージ36以外の各ステージは1回の処理を最小1
クロックで行うことができる。Sステージ36は1回のオ
ペランドストア処理を最小2クロックで行うことができ
る。従ってメモリオペランドのストア処理がない場合、
理想的には1クロックごとに次々にパイプライン処理が
進行する。
Each stage other than S stage 36 requires one processing at least
Can be done with a clock. The S stage 36 can perform one operand store process with a minimum of two clocks. Therefore, if there is no store processing of the memory operand,
Ideally, pipeline processing proceeds one after another for each clock.

本発明のデータ処理装置にはメモリ−メモリ間演算あ
るいはメモリ間接アドレッシング等のような1回の基本
パイプライン処理のみでは処理出来ない命令があるが、
これらの処理に対してもなるべく均衡したパイプライン
処理が行えるように構成されている。
Although the data processing device of the present invention has an instruction that cannot be processed by only one basic pipeline processing such as a memory-memory operation or a memory indirect addressing,
The processing is configured so that pipeline processing as balanced as possible can be performed for these processings.

複数のメモリオペランドを有する命令に対しては、メ
モリオペランドの数に基づいてデコード段階で複数のパ
イプライン処理単位(ステップコード)に分解してパイ
プライン処理が行われる。
For an instruction having a plurality of memory operands, pipeline processing is performed by decomposing the instruction into a plurality of pipeline processing units (step codes) at a decoding stage based on the number of memory operands.

IFステージ31からDステージ32へ渡される情報は命令
コードそのものである。
The information passed from the IF stage 31 to the D stage 32 is the instruction code itself.

Dステージ32からAステージ33へ渡される情報は、命
令で指定された演算に関するコード(Dコード41と称
す)と、オペランドのアドレス計算に関係するコード
(Aコード42と称す)と処理中命令のプログラムカウン
タ値(PC)との3つである。
The information passed from the D stage 32 to the A stage 33 includes a code relating to the operation specified by the instruction (referred to as D code 41), a code relating to the address calculation of the operand (referred to as A code 42), and the instruction being processed. And a program counter value (PC).

Aステージ33からFステージ34に渡される情報は、マ
イクロプログラムルーチンのエントリ番地及びマイクロ
プログラムへのパラメータ等を含むRコード43と、オペ
ランドのアドレスとアクセス方法指示情報等を含むFコ
ード44と、処理中命令のプログラムカウンタ値(PC)と
の3つである。
Information passed from the A stage 33 to the F stage 34 includes an R code 43 including an entry address of a microprogram routine and parameters to the microprogram, an F code 44 including an operand address and access method instruction information, and the like. And the program counter value (PC) of the middle instruction.

Fステージ34からEステージ35へ渡される情報は、演
算制御情報とリテラル等を含むEコード45と、オペラン
ド及びオペランドアドレス等を含むSコード(46a,46
b)と、処理中命令のプログラムカウンタ値(PC)との
3つである。
Information passed from the F stage 34 to the E stage 35 includes an E code 45 including operation control information and literals, and an S code (46a, 46a) including operands and operand addresses.
b) and the program counter value (PC) of the instruction being processed.

Sコード46a,46bはアドレス46aとデーダ46bとからな
る。
The S codes 46a and 46b include an address 46a and data 46b.

Eステージ35からSステージ36へ渡される情報は、ス
トアすべき演算結果であるWワード47a,47bと、その演
算結果を出力した命令のプログラムカウンタ値(PC)と
の2つである。
The information passed from the E stage 35 to the S stage 36 is two words: W words 47a and 47b, which are the operation results to be stored, and the program counter value (PC) of the instruction that outputs the operation result.

Wコード47a,47bはアドレス47aとデータ47bとからな
る。
The W codes 47a and 47b include an address 47a and data 47b.

Eステージ35以前のステージで検出されたEITはその
コードがEステージ35に到達するまでEIT処理を起動し
ない。Eステージ35で処理されている命令のみが実行段
階の命令であり、IFステージ31〜Fステージ34で処理さ
れている命令は未だ実行段階に至っていないからであ
る。従ってEステージ35以前で検出されたEITは検出さ
れたことがステップコード中に記録されて次のステージ
に伝えられるのみである。
The EIT detected in the stage before the E stage 35 does not start the EIT process until the code reaches the E stage 35. This is because only the instruction processed in the E stage 35 is the instruction in the execution stage, and the instruction processed in the IF stage 31 to the F stage 34 has not yet reached the execution stage. Therefore, EITs detected before the E stage 35 are recorded in the step code and only transmitted to the next stage.

Sステージ36で検出されたEITはEステージ35で処理
中命令の実行が完了した時点またはその命令の処理がキ
ャンセルされた時点で受付けられ、Eステージ35に戻っ
て処理される。
The EIT detected in the S stage 36 is accepted when the execution of the instruction being processed in the E stage 35 is completed or when the processing of the instruction is canceled, and returns to the E stage 35 for processing.

(5.2) 「各パイプラインステージの処理」 各パイプラインステージへの入出力ステップコードに
は第5図に示したように便宜上名称が付与されている。
またステップコードには、オペレーションコードに関す
る処理を行っているマイクロROMのエントリ番地やEス
テージ35に対するパラメータ等になる系列と、Eステー
ジ35の処理対象のオペランドになる系列との2系列があ
る。
(5.2) “Processing of Each Pipeline Stage” As shown in FIG. 5, names are given to input / output step codes for each pipeline stage for convenience.
Also, there are two types of step codes: a sequence serving as an entry address of the micro ROM performing processing relating to the operation code and a parameter for the E stage 35, and a sequence serving as an operand to be processed by the E stage 35.

また、Dステージ32からSステージ36までの間では処
理中命令のプログラムカウンタ値が受渡される。
Further, between the D stage 32 and the S stage 36, the program counter value of the processing instruction is transferred.

(5.2.1) 「命令フェッチステージ」 命令フェッチステージ(IFステージ)31で命令フェッ
チ部111が動作する。
(5.2.1) “Instruction Fetch Stage” The instruction fetch unit 111 operates in the instruction fetch stage (IF stage) 31.

命令フェッチ部111は内蔵命令キャッシュあるいは外
部から命令をフェッチして命令キューに入力し、Dステ
ージ32に対して2〜6バイト単位に命令コードを出力す
る。命令キューの入力は整置された4バイト単位で行わ
れる。
The instruction fetch unit 111 fetches an instruction from a built-in instruction cache or an external device, inputs the instruction to an instruction queue, and outputs an instruction code to the D stage 32 in units of 2 to 6 bytes. The input of the instruction queue is performed in aligned 4-byte units.

命令フェッチ部111が標準アクセスモードで外部から
命令をフェッチする場合は整置された4バイトにつき最
小2クロックを要する。
When the instruction fetch unit 111 fetches an instruction from the outside in the standard access mode, a minimum of two clocks are required for the aligned four bytes.

クワッドアクセスモードでは16バイトにつき最小5ク
ロックを要する。
In the quad access mode, a minimum of 5 clocks is required for 16 bytes.

内蔵命令キャッシュがヒットした場合は整置された8
バイトにつき1クロックでフェッチ可能である。
Aligned 8 if internal instruction cache hits
Fetching is possible in one clock per byte.

命令キューの出力単位は2バイトごとに可変であり、
1クロックの間に最大6バイトまで出力できる。またジ
ャンプの直後には命令キューをバイパスして命令基本部
2バイトを直接命令デコーダに転送することもできる。
The output unit of the instruction queue is variable every 2 bytes,
Up to 6 bytes can be output during one clock. Immediately after the jump, the instruction queue can be bypassed and the instruction basic part 2 bytes can be directly transferred to the instruction decoder.

命令の論理アドレスの物理アドレスへの変換,内蔵命
令キャッシュや命令用TLBの制御,プリフェッチ先命令
アドレスの管理あるいは命令キューの制御もIFステージ
31で行われる。
The IF stage also converts the logical address of an instruction to a physical address, controls the internal instruction cache and TLB for instructions, manages prefetch destination instruction addresses, and controls the instruction queue.
Done at 31.

(5.2.2) 「命令デコードステージ」 命令デコードステージ(Dステージ)32はIFステージ
31から入力された命令コードをデコードする。
(5.2.2) "Instruction decode stage" Instruction decode stage (D stage) 32 is IF stage
Decode the instruction code input from 31.

命令コードのデコードは、命令デコード部112のFHWデ
コーダ,NFHWデコーダ,アドレッシングモードデコーダ
を使用して1クロックに1度行なわれ、1回のデコード
処理で0〜6バイトの命令コードが消費される(リター
ンサブルーチン命令の復帰先アドレスを含むステップコ
ードの出力処理等では命令コードは消費されない)。
The instruction code is decoded once per clock using the FHW decoder, NFHW decoder, and addressing mode decoder of the instruction decoding unit 112, and 0 to 6 bytes of instruction code are consumed in one decoding process ( The instruction code is not consumed in the output processing of the step code including the return address of the return subroutine instruction, etc.).

1回のデコードでAステージ33に対してアドレス計算
情報であるAコード42とオペコードの中間デコード結果
であるDコード41とが出力される。
In one decoding, an A code 42 as address calculation information and a D code 41 as an intermediate decoding result of the operation code are output to the A stage 33.

Dステージ32ではPC計算部116の制御,命令キューか
らの命令コード出力処理も行われる。
In the D stage 32, control of the PC calculation unit 116 and processing of outputting an instruction code from the instruction queue are also performed.

Dステージ32ではブランチ命令あるいはサブルーチン
からのリターン命令に対して先行ジャンプ処理が行われ
る。先行ジャンプを行った無条件ブランチ命令に対して
はDコード41及びAコード42は出力されず、Dステージ
32において命令の処理を終了する。
In the D stage 32, a preceding jump process is performed for a branch instruction or a return instruction from a subroutine. The D code 41 and the A code 42 are not output for the unconditional branch instruction that performed the preceding jump, and the D stage
At 32, processing of the instruction is terminated.

(5.2.3) 「オペランどアドレス計算ステージ」 オペランドアドレス計算ステージ(Aステージ)33の
処理は大きく2つに分かれる。
(5.2.3) Operand address calculation stage The processing of the operand address calculation stage (A stage) 33 is roughly divided into two.

1つは命令デコード部112の第2デコーダを使用して
オペレーションコードの後段デコードを行う処理で、他
方はオペランドアドレス計算部54でオペランドアドレス
の計算を行う処理である。
One is a process of performing the second-stage decoding of the operation code using the second decoder of the instruction decoding unit 112, and the other is a process of calculating the operand address in the operand address calculation unit 54.

オペレーションコードの後段デコード処理はDコード
41を入力とし、レジスタ,メモリの書込み予約及びマイ
クロプログラムルーチンのエントリ番地とマイクロプロ
グラムに対するパラメータ等を含むRコード43を出力す
る。
D code is used for the decoding process after the operation code
An R code 43 including a register, memory write reservation, an entry address of a microprogram routine, parameters for the microprogram, and the like is output.

なお、レジスタあるいはメモリの書込み予約は、アド
レス計算で参照したレジスタあるいはメモリの内容がパ
イプライン上を先行する命令で書換えられていた場合
に、誤ったアドレス計算が行われることを防ぐためのも
のである。
Note that the register or memory write reservation is for preventing incorrect address calculation when the contents of the register or memory referred to in the address calculation have been rewritten by the preceding instruction on the pipeline. is there.

オペランドアドレス計算処理はAコード42を入力と
し、Aコード42に従ってオペランドアドレス計算部54で
オペランドのアドレス計算を行い、その計算結果がFコ
ード44として出力される。
In the operand address calculation process, the A code 42 is input, the operand address calculation unit 54 calculates the address of the operand according to the A code 42, and the calculation result is output as the F code 44.

またジャンプ命令に対してはジャンプ先アドレスの計
算が行われて先行ジャンプ処理が実行される。この際、
アドレス計算に伴うレジスタの読出し時に書込み予約の
チェックも行われ、先行命令がレジスタあるいはメモリ
に対する書込み処理を終了していないために予約がある
ことが指示されていれば、先行命令がEステージ35で書
込み処理を終了するまで待機状態になる。
For a jump instruction, a jump destination address is calculated and a preceding jump process is executed. On this occasion,
At the time of reading the register accompanying the address calculation, a write reservation check is also performed. If the preceding instruction indicates that there is a reservation because the preceding instruction has not completed the write processing to the register or the memory, the preceding instruction is sent to the E stage 35. It enters a standby state until the writing process is completed.

Aステージ33ではDステージ32で先行ジャンプを行わ
なかったジャンプ命令に対して先行ジャンプ処理が行わ
れる。
In the A stage 33, the preceding jump processing is performed for the jump instruction for which the preceding jump was not performed in the D stage 32.

絶対値アドレスへのジャンプあるいはレジスタ間接ア
ドレッシングのジャンプ等に対してはAステージ33で先
行ジャンプが行われる。先行ジャンプを行った無条件ジ
ャンプ命令に対してはRコード43及びFコード44は出力
されず、Aステージ33において命令の処理を終了する。
For a jump to an absolute value address or a jump in register indirect addressing, a preceding jump is performed in the A stage 33. The R code 43 and the F code 44 are not output for the unconditional jump instruction that has performed the preceding jump, and the processing of the instruction is terminated in the A stage 33.

(5.2.4) 「マイクロROMアクセスステージ」 オペランドフェッチステージ(Fステージ)34の処理
も大きく2つに分かれる。
(5.2.4) "Micro ROM access stage" The processing of the operand fetch stage (F stage) 34 is largely divided into two.

1つはマイクロROMのアクセス処理であり、特にRス
テージ37と称す。他方はオペランドプリフェッチ処理で
あり、特にOFステージ38と称す。
One is access processing of a micro ROM, which is particularly called an R stage 37. The other is an operand prefetch process, particularly referred to as an OF stage 38.

Rステージ37とOFステージ38とは必ずしも同時に動作
するわけではなく、データキャッシュのミス及びヒッ
ト,データTLBのミス及びヒット等に依存して動作タイ
ミングが異なる。
The R stage 37 and the OF stage 38 do not always operate at the same time, and the operation timing differs depending on the miss and hit of the data cache and the miss and hit of the data TLB.

Rステージ37の処理であるマイクロROMアクセス処理
は、Rコード43に対して次のEステージ35での実行に使
用する実行制御コードであるEコード45を作り出すため
のマイクロROMアクセスとマイクロ命令デコード処理で
ある。
The micro ROM access processing as the processing of the R stage 37 includes a micro ROM access and a micro instruction decoding processing for creating an E code 45 which is an execution control code used for execution in the next E stage 35 with respect to the R code 43. It is.

1つのRコードに対する処理が2つ以上のマイクロプ
ログラムステップに分解される場合、第1マイクロROM
部113及び第2マイクロROM部114がEステージ35で使用
され、次のRコード43がマイクロROMアクセス待ちにな
る場合がある。
If the processing for one R code is divided into two or more microprogram steps, the first micro ROM
The unit 113 and the second micro ROM unit 114 may be used in the E stage 35, and the next R code 43 may wait for micro ROM access.

Rコード43に対するマイクロROMアクセスが行われる
のはEステージ35でのマイクロROMアクセスが行われな
い場合である。
The micro ROM access to the R code 43 is performed when the micro ROM access in the E stage 35 is not performed.

本発明のデータ処理装置100では多くの整数演算命令
が1マイクロプログラムステップで行われ、多くの浮動
小数点演算命令が2マイクロプログラムステップで行わ
れるため、実際にはRコード43に対するマイクロROMア
クセスが次々と行われる頻度が高い。
In the data processing device 100 of the present invention, since many integer operation instructions are performed in one microprogram step and many floating point operation instructions are performed in two microprogram steps, the micro ROM access to the R code 43 is actually performed one after another. And the frequency is high.

(5.2.5) 「オペランドフェッチステージ」 オペランドフェッチステージ(OFステージ)38はFス
テージ34で行う上記の2つの処理の内のオペランドプリ
フェッチ処理を行う。
(5.2.5) “Operand fetch stage” The operand fetch stage (OF stage) 38 performs an operand prefetch process of the above two processes performed in the F stage 34.

オペランドフェッチステージ38ではFコード44の論理
アドレスをデータTLBで物理アドレスに変換し、その物
理アドレスで内蔵データキャッシュをアクセスしてオペ
ランドをフェッチし、そのオペランドとFコード44とし
て転送されてきたその論理アドレスとを組合わせてSコ
ード46a,46bとして出力する。
In the operand fetch stage 38, the logical address of the F code 44 is converted into a physical address by the data TLB, the built-in data cache is accessed at the physical address to fetch the operand, and the operand and the logical address transferred as the F code 44 are transferred. The addresses are combined and output as S codes 46a and 46b.

1つのFコード44では8バイト境界をクロスしてもよ
いが、8バイト以下のオペランドフェッチを指定する。
One F code 44 may cross an 8-byte boundary, but specifies an operand fetch of 8 bytes or less.

Fコード44にはオペランドのアクセスを行うか否かの
指定も含まれており、Aステージ33で計算されたオペラ
ンドアドレス自体あるいは即値をEステージ35へ転送す
る場合にはオペランドプリフェッチは行わず、Fコード
44の内容をSコード46a,46bとして転送する。
The F code 44 also includes designation of whether or not to access the operand. When the operand address itself or the immediate value calculated in the A stage 33 is transferred to the E stage 35, the operand prefetch is not performed. code
The contents of 44 are transferred as S codes 46a and 46b.

プリフェッチしようとするオペランドとEステージ35
が書込み処理を行おうとするオペランドとが一致する場
合は、オペランドプリフェッチは内蔵データキャッシュ
からは行われず、バイパスして行なわれる。
Operands to be prefetched and E stage 35
If the operands to be written match, the operand prefetch is not performed from the built-in data cache, but is performed by bypass.

(5.2.6) 「実行ステージ」 実行ステージ(Eステージ)35はEコード45及びSコ
ード46a,46bを入力として動作する。
(5.2.6) "Execution Stage" The execution stage (E stage) 35 operates with the E code 45 and the S codes 46a and 46b as inputs.

このEステージ35が命令を実行するステージであり、
Eステージ34以前のステージで行われた処理は総てEス
テージ35のための前処理である。
This E stage 35 is a stage for executing an instruction,
All processes performed in stages before the E stage 34 are pre-processes for the E stage 35.

Eステージ35でジャンプが実行されたりあるいはEIT
処理が起動されたりした場合は、IFステージ31〜Fステ
ージ34まででの処理はすべて無効化される。
Jump is executed in E stage 35 or EIT
When the processing is started, all the processing in the IF stage 31 to the F stage 34 is invalidated.

Eステージ35はマイクロプログラムにより制御され、
Eコード45に示されたマイクロプログラムルーチンのエ
ントリ番地からの一連のマイクロ命令を実行することに
より命令を実行する。
The E stage 35 is controlled by a microprogram,
The instruction is executed by executing a series of microinstructions from the entry address of the microprogram routine indicated by the E code 45.

Eコード45には整数演算部117を制御するコード(特
にEIコードと称す)と浮動小数点演算部118を制御する
コード(特にEFコードと称す)とがある。EIコードとEF
コードとは独立に出力可能であり、この際Eステージ35
では整数演算部117と浮動小数点演算部118とが並列に動
作する。
The E code 45 includes a code for controlling the integer operation unit 117 (particularly, an EI code) and a code for controlling the floating point operation unit 118 (particularly, an EF code). EI code and EF
It can be output independently of the code.
In this case, the integer operation unit 117 and the floating-point operation unit 118 operate in parallel.

例えば浮動小数点演算部118でメモリオペランドを有
さない浮動小数点命令を実行する場合はこの動作は整数
演算部117の動作と並行して実行される。
For example, when the floating-point operation unit 118 executes a floating-point instruction having no memory operand, this operation is executed in parallel with the operation of the integer operation unit 117.

整数演算でも浮動小数点演算でもマイクロROMの読出
しとマイクロ命令の実行とはパイプライン化されて行わ
れる。従って、マイクロプログラムで分岐が発生した場
合は1マイクロステップの空きができる。
In both the integer operation and the floating-point operation, reading of the micro ROM and execution of the micro instruction are performed in a pipelined manner. Therefore, when a branch occurs in the microprogram, a space of one microstep is created.

Eステージ35ではAステージ33で行ったレジスタある
いはメモリに対する書込み予約をオペランドの書込みの
後に解除する。
In the E stage 35, the write reservation to the register or the memory made in the A stage 33 is released after the writing of the operand.

各種の割込は命令の切目でEステージ35に直接受付け
られ、マイクロプログラムにより必要な処理が実行され
る。その他の各種EITの処理もEステージ35でマイクロ
プログラムにより行われる。
The various interrupts are directly received by the E stage 35 at the breaks of the instructions, and the necessary processing is executed by the microprogram. Other various EIT processes are also performed by a microprogram in the E stage 35.

演算の結果をメモリにストアする必要がある場合は、
Eステージ35はSステージ36へWコード47a,47bとスト
ア処理を行う命令のプログラムカウンタ値とを出力す
る。
If you need to store the result of the operation in memory,
The E stage 35 outputs the W codes 47a and 47b and the program counter value of the instruction for performing the store process to the S stage 36.

(5.2.7) 「オペランドストアステージ」 オペランドストアステージ(Sステージ)36はWコー
ドの論理アドレス47aをデータTLBで物理アドレスに変換
し、そのアドレスでWコードのデータ47bをデータバッ
ファにストアする。同時にオペランドストアステージ36
はWコード47a,47bとプログラムカウンタ値とをストア
バッファに入力し、データTLBから出力された物理アド
レスを用いて外部のメモリへWコードのデータ47bをス
トアする処理を行う。
(5.2.7) "Operand Store Stage" The operand store stage (S stage) 36 converts the logical address 47a of the W code into a physical address using the data TLB, and stores the data 47b of the W code in the data buffer at that address. Operand store stage 36 at the same time
Performs a process of inputting the W codes 47a and 47b and the program counter value to the store buffer, and using the physical address output from the data TLB to store the W code data 47b in an external memory.

オペランドストアステージ36の動作はオペランドアク
セス部120で行われ、データTLBあるいはデータバッファ
がミスした際のアドレス変換処理及びデータバッファの
入換え処理も行う。
The operation of the operand store stage 36 is performed by the operand access unit 120, and also performs an address conversion process and a data buffer exchange process when the data TLB or the data buffer misses.

オペランドストアステージ36がオペランドのストア処
理でEITで検出した場合はストアバッファにWコード47
a,47bとプログラムカウンタ値とを保持したままでEス
テージ35にEITを通知する。
When the operand store stage 36 detects by the EIT in the operand store processing, the W code 47 is stored in the store buffer.
The EIT is notified to the E stage 35 while holding the a and 47b and the program counter value.

(5.3) 「各パイプラインステージの状態制御」 パイプラインの各ステージは入力ラッチと出力ラッチ
を有し、他のステージとは独立に動作することを基本と
する。
(5.3) “State control of each pipeline stage” Each stage of the pipeline has an input latch and an output latch, and basically operates independently of the other stages.

各ステージは1つ前に行った処理が終了し、その処理
結果を出力ラッチから次のステージの入力ラッチへ転送
し、自分のステージの入力ラッチに次の処理に必要な入
力信号の総てがそろえば次の処理を開始する。
Each stage completes the previous processing, transfers the processing result from the output latch to the input latch of the next stage, and stores all the input signals necessary for the next processing in the input latch of its own stage. Then, the next process is started.

つまり、各ステージは1つ前段のステージから出力さ
れてくる次の処理に対する入力信号の総てが有効にな
り、その時点の処理結果を後段のステージの入力ラッチ
へ転送し、出力ラッチが空になると次の処理を開始す
る。
That is, in each stage, all the input signals for the next process output from the previous stage become valid, and the processing result at that time is transferred to the input latch of the subsequent stage, and the output latch becomes empty. Then, the next process is started.

各ステージが動作を開始する直前のタイミングで入力
信号が総てそろっている必要がある。入力信号がそろっ
ていなければ、そのステージは待機状態(入力待ち)に
なる。
It is necessary that all input signals be complete at the timing immediately before each stage starts operation. If the input signals are not ready, the stage enters a waiting state (input waiting).

出力ラッチから次のステージの入力ラッチへの転送を
行われる際は次のステージの入力ラッチが空き状態にな
っている必要があり、次のステージの入力ラッチが空き
でない場合もパイプラインステージは待機状態(出力待
ち)になる。
When transferring from the output latch to the input latch of the next stage, the input latch of the next stage must be empty, and the pipeline stage waits even if the input latch of the next stage is not empty Status (waiting for output).

また、キャッシュあるいはTLBがミスしたり、パイプ
ラインで処理中の命令間にデータ干渉が生じると、1つ
のステージの処理に複数クロック必要となってパイプラ
イン処理が遅延する。
Further, if a cache or TLB misses or data interference occurs between instructions being processed in the pipeline, a plurality of clocks are required for processing in one stage, and the pipeline processing is delayed.

(6) 「オペランドアクセス部の詳細動作」 (6.1) 「オペランドアクセス部の構成」 第1図はオペランドアクセス部120の一構成例を示す
詳細なブロック図である。
(6) “Detailed Operation of Operand Access Unit” (6.1) “Configuration of Operand Access Unit” FIG. 1 is a detailed block diagram showing a configuration example of the operand access unit 120.

オペランドアクセス部120は、データの論理アドレス
と物理アドレスとをペアにしてバッファリングするTLB2
01,物理アドレスとデータとをペアにしてバッファリン
グする内蔵のデータキャッシュとして動作するかまたは
コンテキスト退避用の制御空間のメモリとして動作する
データバッファ202,アクセスされたデータの論理アドレ
スの上位とTLB201の論理アドレスタグとを比較する論理
アドレス比較器303,TLB201から出力された物理アドレス
とデータバッファ202から出力された物理アドレスタグ
とを比較する物理アドレス比較器204,データ入出力回路
207,アドレス出力回路206,ストアバッファ部208,更に論
理アドレス比較器203及び物理アドレス比較器204の比較
結果に従って全体を制御するオペランドアクセス部制御
回路205等にて構成されている。
The operand access unit 120 is a TLB2 that buffers a logical address and a physical address of data in pairs.
01, a data buffer 202 that operates as a built-in data cache that buffers physical addresses and data in pairs, or that operates as a memory in a control space for context saving, A logical address comparator 303 for comparing with a logical address tag; a physical address comparator 204 for comparing a physical address output from the TLB 201 with a physical address tag output from the data buffer 202; a data input / output circuit
207, an address output circuit 206, a store buffer unit 208, and an operand access unit control circuit 205 for controlling the whole according to the comparison result of the logical address comparator 203 and the physical address comparator 204.

(6.2) 「論理空間のデータリード時の動作」 整数演算部117から出力された論理アドレスのアドレ
ス変換対象となる上位20ビットの内の下位側(8ビッ
ト)でTLB201のエントリが指定される。
(6.2) “Operation at the time of reading data in logical space” The entry of the TLB 201 is specified in the lower side (8 bits) of the upper 20 bits of the logical address output from the integer operation unit 117, which are to be converted.

TLB201の指定されたエントリからは論理アドレスタグ
(12ビット)と物理アドレス(20ビット)とが出力され
る。この際、論理アドレスの上位側(12ビット)と論理
アドレスタグとが一致すればTLB201はヒットしたことに
なり、TLB201から出力された物理アドレスは有効であ
る。
From the designated entry of the TLB 201, a logical address tag (12 bits) and a physical address (20 bits) are output. At this time, if the upper side (12 bits) of the logical address matches the logical address tag, the TLB 201 has been hit, and the physical address output from the TLB 201 is valid.

データバッファ202が内蔵データキャッシュとして動
作する場合は、論理アドレスの内のページオフセットを
示し物理アドレスに変換されない下位ビット(12ビッ
ト)でデータバッファ202のエントリが指定される。デ
ータバッファ202の指定されたエントリからは物理アド
レスタグ(20ビット)とデータとが出力される。この
際、TLB201から出力された物理アドレスが有効で且つそ
れが物理アドレスタグと一致すればデータバッファ202
はヒットしたことになり、データバッファから出力され
たデータは有効である。
When the data buffer 202 operates as a built-in data cache, an entry of the data buffer 202 is designated by lower bits (12 bits) indicating a page offset in a logical address and not being converted into a physical address. From the designated entry in the data buffer 202, a physical address tag (20 bits) and data are output. At this time, if the physical address output from the TLB 201 is valid and matches the physical address tag, the data buffer 202
Is hit, and the data output from the data buffer is valid.

TLB201がミスした場合は、オペランドアクセス制御部
205の制御により、本発明のデータ処理装置100の外部の
メモリにあるアドレス変換テーブルがアクセスされ、論
理アドレスが物理アドレスに変換され、TLB201のエント
リが更新される。TLB201のエントリの更新後、再びTLB2
01がアクセスされ、TLB201はヒットする。
If the TLB201 misses, the operand access control unit
Under the control of 205, the address translation table in the external memory of the data processing device 100 of the present invention is accessed, the logical address is translated into the physical address, and the entry of the TLB 201 is updated. After updating the entry of TLB201, TLB2 again
01 is accessed and TLB 201 hits.

TLB201がヒットしたが内蔵データキャッシュとして動
作したデータバッファ202がミスした場合は、オペラン
ドアクセス部制御回路205の制御により、物理アドレス
で外部のメモリがアクセスされ、データバッファ202の
エントリが更新される。
If the TLB 201 hits but the data buffer 202 operating as a built-in data cache misses, the external memory is accessed by the physical address under the control of the operand access unit control circuit 205, and the entry in the data buffer 202 is updated.

TLB201がミスした場合は、TLB201から読出された物理
アドレスとデータバッファの物理アドレスタグとが一致
してもデータバッファ202はヒットとはならない。この
場合、データバッファ202のヒット/ミスの判定はTLB20
1のエントリが更新されてTLB201がヒットした後に行わ
れる。
When the TLB 201 misses, the data buffer 202 does not hit even if the physical address read from the TLB 201 matches the physical address tag of the data buffer. In this case, the hit / miss judgment of the data buffer 202 is determined by TLB20.
This is performed after the entry of 1 is updated and TLB 201 hits.

データバッファ202が制御空間のメモリとして動作す
る場合は、論理空間のアクセスに対してTLB201で変換さ
れた物理アドレスが本発明のデータ処理装置100の外部
に出力されることにより外部からデータがフェッチされ
る。
When the data buffer 202 operates as a memory of the control space, data is fetched from the outside by outputting the physical address converted by the TLB 201 to the access of the logical space to the outside of the data processing device 100 of the present invention. You.

(6.2) 「論理空間データライト時の動作」 オペランドアクセス部120に対するデータのライト動
作はTLB201のアクセスに関してはデータリード動作時と
同様である。
(6.2) “Operation at the time of logical space data write” The operation of writing data to the operand access unit 120 is the same as that of the data read operation regarding the access of the TLB 201.

データバッファ202が内蔵データキャッシュとして動
作する場合、データバッファ202のアクセス動作もデー
タリード動作と類似しているが、データバッファ202か
らデータが読出されることはない。
When the data buffer 202 operates as the built-in data cache, the access operation of the data buffer 202 is similar to the data read operation, but no data is read from the data buffer 202.

データライト動作ではデータバッファ202がヒットし
た場合はヒットしたエントリにデータが書込まれる。ミ
スした場合はデータバッファ202にはデータは書込まれ
ず、エントリの更新動作も行われない。
In the data write operation, when the data buffer 202 hits, data is written to the hit entry. If a miss occurs, no data is written to the data buffer 202, and no entry update operation is performed.

本発明のデータ処理装置100のデータバッファ202はラ
イトスルー制御のデータキャッシュとして動作し、デー
タライト動作時にデータバッファ202がヒットした場合
もミスした場合もストアデータが外部へ出力される。
The data buffer 202 of the data processing device 100 of the present invention operates as a data cache of write-through control, and stores data is output to the outside regardless of whether the data buffer 202 hits or misses during a data write operation.

データバッファ202が制御空間のメモリとして動作す
る場合は論理空間へのオペランドライト時にデータバッ
ファがアクセスされることはない。この場合、TLB201で
変換された物理アドレスが本発明のデータ処理装置100
の外部へ出力されると共にストアデータが外部へ出力さ
れる。
When the data buffer 202 operates as a memory of the control space, the data buffer is not accessed at the time of writing the operand to the logical space. In this case, the physical address converted by the TLB 201 corresponds to the data processing device 100 of the present invention.
And the store data is output to the outside.

外部へのデータのストア処理は最小でも2クロックを
必要とし、本発明のデータ処理装置100のEステージ35
のストア動作速度に比べて低速である。このため、スト
アデータはそのストア動作を行った命令のPC値,ストア
先の物理アドレス,ストア先の論理アドレスと共にスト
アバッファに一旦登録され、その後にストアバッファが
ストア動作を行う。ストアバッファに登録されるストア
動作を行った命令のPC値はPC計算部116から入力された
命令のPC値である。
The external data storage process requires at least two clocks, and the E stage 35 of the data processing apparatus 100 of the present invention.
Is slower than the store operation speed. For this reason, the store data is temporarily registered in the store buffer together with the PC value of the instruction that performed the store operation, the physical address of the store destination, and the logical address of the store destination, and thereafter the store buffer performs the store operation. The PC value of the instruction that has performed the store operation registered in the store buffer is the PC value of the instruction input from the PC calculation unit 116.

(6.4) 「制御空間アクセス時の動作」 データバッファ202が、アドレスがH'FFFFE000〜H'FFF
FFFFFの制御空間のメモリとして動作する場合は、アド
レスがH'FFFFE000〜H'FFFFFFFFである制御空間に対する
アクセスはデータバッファ202に対して行われる。
(6.4) “Operation at the time of access to control space” The data buffer 202 has an address of H'FFFFE000 to H'FFF.
When operating as a memory in the control space of FFFFF, access to the control space whose address is H'FFFFE000 to H'FFFFFFFF is made to the data buffer 202.

制御空間のアクセスではアドレス変換は行われず、TL
B201動作しない。またデータバッファ202はアドレス範
囲がH'FFFFE000〜H'FFFFFFFFであるランダムアクセスメ
モリ(RAM)として動作する。
No address translation is performed for access to the control space.
B201 does not work. The data buffer 202 operates as a random access memory (RAM) having an address range of H'FFFFE000 to H'FFFFFFFF.

リード動作時には、AAバス124から入力されたアドレ
スに従ってデータバッファ202の内容が読出され、DDバ
ス125を通じて整数演算部117または浮動小数点演算部11
8へ出力される。また、ライン動作時には、AAバス124か
ら入力されたアドレスに従ってDDバス125を通じてデー
タ入出力回路207に入力されたデータがデータバッファ2
02に書込まれる。
At the time of the read operation, the contents of the data buffer 202 are read according to the address input from the AA bus 124, and are read via the DD bus 125 to the integer operation unit 117 or the floating point operation unit 11.
Output to 8. In the line operation, data input to the data input / output circuit 207 via the DD bus 125 is transferred to the data buffer 2 according to the address input from the AA bus 124.
Written in 02.

アドレス範囲がH'FFFFE000〜H'FFFFFFFF以外である領
域の制御空間に対するアクセスは、本発明のデータ処理
装置100の外部に対して行われる。
Access to the control space in an area whose address range is other than H'FFFFE000 to H'FFFFFFFF is performed outside the data processing device 100 of the present invention.

制御空間のアクセスをデータバッファ202に対して行
うか又は外部に対して行うかは、制御空間アドレスの上
位20ビットに従ってオペランドアクセス部120内で判断
される。この判断は、論理アドレス比較器203でTLB201
側の20ビットで総て“1"にし、その値とAAバス124から
入力されたアドレスの上位の20ビットの内の最下位ビッ
トをdon't careにした19ビット分とを比較することによ
り行われる。
Whether to access the control space to the data buffer 202 or to the outside is determined in the operand access unit 120 according to the upper 20 bits of the control space address. This determination is made by the logical address comparator 203 in the TLB 201
By setting all 20 bits to “1” and comparing that value with the 19 bits of the lower 20 bits of the upper 20 bits of the address input from the AA bus 124, which are set to don't care Done.

(7) 「外部アクセス動作」 (7.1) 「入出力信号線」 第7図は本発明のデータ処理装置100の入出力信号を
示す模式図である。
(7) “External access operation” (7.1) “Input / output signal line” FIG. 7 is a schematic diagram showing input / output signals of the data processing device 100 of the present invention.

本発明のデータ処理装置100は、電源Vccと接地GND,64
本のデータピンと32本のアドレスピンと32本の命令ピン
及び入力クロックCLKの他に種々の制御信号を入出力す
る。
The data processing device 100 of the present invention has a power supply Vcc and a ground GND, 64
Various control signals are input and output in addition to the data pins, the 32 address pins, the 32 command pins, and the input clock CLK.

命令アクセスの場合もデータアクセスの場合も、アド
レスピンへは物理アドレスが出力される。
For both instruction access and data access, a physical address is output to the address pins.

CLKは外部入力クロックであり、本発明のデータ処理
装置100の動作クロックと同一周波数のクロックであ
る。
CLK is an external input clock, and is a clock having the same frequency as the operation clock of the data processing device 100 of the present invention.

データアドレスストローブDAS#(#は負論理を表
す)はアドレスピンに出力されたデータアドレスが有効
であることを示す。
The data address strobe DAS # (# represents negative logic) indicates that the data address output to the address pin is valid.

リードライトR/W#はデータピンのバスサイクルが入
力であるか出力であるかを区別する。
The read / write R / W # distinguishes whether the data pin bus cycle is an input or an output.

データストローブDS#は本発明のデータ処理装置100
がデータ入力準備を完了したことまたは本発明のデータ
処理装置100からデータが出力されたことを示す。
The data strobe DS # is a data processing device 100 of the present invention.
Indicates that data input preparation has been completed or that data has been output from the data processing apparatus 100 of the present invention.

DC#は本発明のデータ処理装置100にデータアクセス
サイクルを終了してもよいことを通知する信号である。
DC # is a signal that notifies the data processing device 100 of the present invention that the data access cycle may be ended.

BAT(0:2)は第28図に示す様に、アドレスピンとデー
タピンと命令ピンとの値の意味を示す。
BAT (0: 2) indicates the meaning of the values of the address pin, the data pin, and the instruction pin as shown in FIG.

命令アドレスストローブIAS#はアドレスピンに出力
された命令アドレスが有効であることを示す。
The instruction address strobe IAS # indicates that the instruction address output on the address pin is valid.

命令ストローブIS#は本発明のデータ処理装置100が
命令入力準備を完了したことを示す。
The instruction strobe IS # indicates that the data processing apparatus 100 of the present invention has completed preparation for inputting an instruction.

IC#は本発明のデータ処理装置100に命令アクセスサ
イクルを終了してもよいことを通知する信号である。
IC # is a signal notifying the data processing device 100 of the present invention that the instruction access cycle may be ended.

ホールドリクエストHREQ#は本発明のデータ処理装置
100にバス権を要求する信号であり、HACK#は本発明の
データ処理装置100がオールドリクエストHREQ#を受付
けてバス権を他のデバイスに渡したことを示す信号であ
る。
Hold request HREQ # is a data processing device of the present invention.
HACK # is a signal indicating that the data processing apparatus 100 of the present invention has received the old request HREQ # and passed the bus right to another device.

IRL#(0:2)は外部割込み要求信号である。 IRL # (0: 2) is an external interrupt request signal.

IACK#は本発明のデータ処理装置100が外部割込みを
受付け、割込みベクトルアクセスサイクルを行っている
ことを示す信号である。
IACK # is a signal indicating that the data processing device 100 of the present invention has received an external interrupt and is performing an interrupt vector access cycle.

また、WDピンは本発明のデータ処理装置のデータバス
を64ビット総て有効にするか、または32ビットのみを有
効にするかをシステムリセット時に設定するために使用
されるピンである。
The WD pin is a pin used to set, at the time of a system reset, whether the data bus of the data processor of the present invention is valid for all 64 bits or only 32 bits.

なお、第6図にはデータバスを64ビット総て有効にし
た場合の例が示されているが、本発明のデータ処理装置
ではデータバスを32ビットのみ有効にして動作させるこ
とにより、低コストのシステムを構成することが可能な
ようになっている。
Although FIG. 6 shows an example in which the data bus is made valid for all 64 bits, the data processing device of the present invention enables the data bus to operate with only 32 bits, thereby reducing the cost. It is possible to configure the system.

(7.2) 「外部デバイスのアクセス」 本発明のデータ処理装置100を用いた第6図に示した
システムの例では、本発明のデータ処理装置100とデー
タキャッシュ107,108とがデータピンに接続するデータ
バス102,アドレスピンに接続するアドレスバス101の
他、BAT(0:2),DAS#,R/W#,DS#,DC#でも接続されて
いる。
(7.2) “Access to External Device” In the example of the system shown in FIG. 6 using the data processing device 100 of the present invention, the data bus connecting the data processing device 100 of the present invention and the data caches 107 and 108 to the data pins is used. 102, the address bus 101 connected to the address pins, as well as BAT (0: 2), DAS #, R / W #, DS #, DC #.

本発明のデータ処理装置100と命令キャッシュ11とは
命令ピンに接続する命令バス103,アドレスバス101の
他、BAT(0:2),IAS#,IS#,IC#でも接続されている。
The data processor 100 of the present invention and the instruction cache 11 are connected to BAT (0: 2), IAS #, IS #, and IC # in addition to the instruction bus 103 and the address bus 101 connected to the instruction pins.

CLKはシステム全体に供給されシステムの基本タイミ
ングを決定するクロックである。
CLK is a clock supplied to the entire system and determining the basic timing of the system.

標準アクセスモードでのバスアクセスに際しては、デ
ータバス102を用いたデータアクセスと命令バス103を用
いた命令アクセスとをそれぞれ十分高速な外部のメモリ
に対して外部入力クロックCLKの2サイクルに1度の速
度で行う。
In the bus access in the standard access mode, the data access using the data bus 102 and the instruction access using the instruction bus 103 are performed once every two cycles of the external input clock CLK to a sufficiently high-speed external memory. Do it at speed.

クワッドアクセスモードでのバスアクセスに際して
は、データバス102を用いたデータアクセスと命令バス1
03を用いた命令アクセスとをそれぞれ十分高速な外部の
メモリに対して外部入力クロックCLKの5サイクルに4
度の速度で行う。
When accessing the bus in the quad access mode, the data access using the data bus 102 and the instruction bus 1
03 to the external memory which is sufficiently high-speed in 5 cycles of the external input clock CLK.
Perform at a speed of degrees.

アドレスバス101はデータキャッシュ107,108のアクセ
スと命令キャッシュ106のアクセスとの両方に利用され
る。
The address bus 101 is used for both accessing the data caches 107 and 108 and accessing the instruction cache 106.

(8) 「各種制御レジスタ」 (8.1) 「プロセッサ状態語PSWの構成」 第36図は本発明のデータ処理装置100の整数演算部117
にあるプロセッサ状態語(PSW)の構成を示す模式図で
ある。
(8) “Various control registers” (8.1) “Configuration of processor status word PSW” FIG. 36 shows an integer operation unit 117 of the data processing device 100 according to the present invention.
FIG. 3 is a schematic diagram showing a configuration of a processor status word (PSW) in FIG.

第36図において、SMビット20はリング0で割込み処理
用スタックポインタを使用中であるかリング0用スタッ
クポインタを使用中であるかを示す。
In FIG. 36, the SM bit 20 indicates whether the interrupt processing stack pointer is being used in the ring 0 or the ring 0 stack pointer is being used.

RNGフィールド21はプログラムが実行されているリン
グ番号を示す。
The RNG field 21 indicates the ring number where the program is being executed.

ATフィールド22はアドレス変換とメモリ保護とのモー
ドを示す。
AT field 22 indicates the mode of address translation and memory protection.

FEビット23は浮動小数点演算トラップの起動モードを
示す。
The FE bit 23 indicates a start mode of the floating-point operation trap.

DBビット24はデバッグ環境を示す。DB=1であればデ
バッグサポート機構がオンで、デバッグ条件が成立すれ
ばセルフデバッグトラップが起動される。DB=0であれ
ばデバッグサポート機構がオフで、デバッグ条件が成立
してもセルフデバッグトラップは起動されない。
DB bit 24 indicates the debug environment. If DB = 1, the debug support mechanism is on, and if the debug conditions are satisfied, a self-debug trap is activated. If DB = 0, the debug support mechanism is off, and the self-debug trap is not activated even if the debug conditions are satisfied.

IMASKフィールド25は外部割込みのマスクレベルを示
す。IMASKフィールド25で示されたマスクレベルより優
先度の高い外部割込みが本発明のデータ処理装置100に
入力されると割込み処理が起動される。
The IMASK field 25 indicates the mask level of the external interrupt. When an external interrupt having a higher priority than the mask level indicated in the IMASK field 25 is input to the data processing device 100 of the present invention, the interrupt processing is started.

PRNGフィールド26は現在のリングを呼出したリングの
リング番号を示す。
The PRNG field 26 indicates the ring number of the ring that called the current ring.

FLAGフィールド27は整数演算に関するフラグを示す。 The FLAG field 27 indicates a flag relating to an integer operation.

RSWはリセット時にはオールゼロにクリアされる。ま
た、PSWはLDC命令とSTC命令とでその内容を読出すこと
及び指定した内容をを書込むことがそれぞれ可能であ
る。
RSW is cleared to all zeros at reset. The PSW can read the contents of the LDC command and the STC command and write the specified contents.

(8.2) 「バッファメモリ制御レジスタ」 第3図は本発明のデータ処理装置100の内蔵データバ
ッファ202及び内蔵命令バッファの制御を行うバッファ
メモリ制御レジスタの構成を示す模式図である。
(8.2) “Buffer memory control register” FIG. 3 is a schematic diagram showing a configuration of a buffer memory control register for controlling the built-in data buffer 202 and the built-in instruction buffer of the data processing device 100 of the present invention.

第3図におて、DMフィールド3は内蔵データバッファ
202の制御を行うフィールドであり、以下に示す意味を
示す。
In Fig. 3, DM field 3 is a built-in data buffer.
This field controls 202 and has the following meaning.

DM=00:データバッファを動作させない。DM = 00: Data buffer is not operated.

DM=01:データバッファをアドレスがH'FFFFE000〜H'FFF
FFFFFである制御空間のメモリとして動作させる。
DM = 01: Data buffer address is H'FFFFE000 to H'FFF
Operate as the memory of the control space which is FFFFF.

DM=10:データバッファをライトスルー制御のデータキ
ャッシュとして動作させる。
DM = 10: Operate the data buffer as a write-through control data cache.

DM=11:未定義 RPフィールド1はデータバッファ202がデータキャッ
シュとして動作する際の制御を行うフィールドであり、
以下に示す意味を有する。
DM = 11: undefined The RP field 1 is a field for controlling when the data buffer 202 operates as a data cache.
It has the following meaning.

RP=00:データキャッシュをフリーズ状態にする。RP = 00: Data cache is frozen.

RP=01:未定義 RP=10:データキャッシュをラインサイズ16バイトで動
作させる。
RP = 01: Undefined RP = 10: Operate the data cache with a line size of 16 bytes.

RP=11:データキャッシュをラインサイズ32バイトで動
作させる。
RP = 11: Operate the data cache with a line size of 32 bytes.

IMフィールド4は内蔵命令バッファの制御を行うフィ
ールドであり、以下に示す意味を有する。
The IM field 4 is a field for controlling the internal instruction buffer, and has the following meaning.

IM=00:命令バッファを動作させない。IM = 00: Do not operate the instruction buffer.

IM=01:命令バッファを命令キューが空のときフェッチ
した命令を選択的に登録するセレクティブキャッシュと
して動作させる。
IM = 01: Operate the instruction buffer as a selective cache for selectively registering fetched instructions when the instruction queue is empty.

IM=10:未定義。IM = 10: Not defined.

IM=11:命令バッファをラインサイズ16バイトの命令キ
ャッシュとして動作させる。
IM = 11: Operate the instruction buffer as an instruction cache with a line size of 16 bytes.

LENフィールド2は命令バッファをセレクティブキャ
ッシュとして動作させた際の命令の登録条件を制御する
フィールドであり、以下に示す意味を有する。
The LEN field 2 is a field for controlling an instruction registration condition when the instruction buffer is operated as a selective cache, and has the following meaning.

LEN=000:命令の登録は行わず命令キャッシュをフリー
ズする。
LEN = 000: The instruction cache is frozen without registering the instruction.

LEN=001:命令キューが空になってから連続して1ライ
ン入換える。
LEN = 001: One line is continuously replaced after the instruction queue becomes empty.

LEN=010:命令キューが空になってから連続して2ライ
ン入換える。
LEN = 010: Two lines are exchanged continuously after the instruction queue becomes empty.

LEN=011〜111:未定義。LEN = 011 to 111: Not defined.

(8.3) 「パージ指定レジスタ」 第29図は本発明のデータ処理装置100の内蔵データバ
ッファ202及び内蔵命令バッファのパージ動作を制御す
るパージ指定レジスタの構成を示す模式図である。
(8.3) "Purge designation register" FIG. 29 is a schematic diagram showing a configuration of a purge designation register for controlling a purge operation of the built-in data buffer 202 and the built-in instruction buffer of the data processing device 100 of the present invention.

図中、DS5,DU6,IS7,IU8の各ビットは内蔵データバッ
ファ202のパージ動作を制御するためのビットであり、
これらの各ビットに“1"を書込むとそれぞれのビットに
対応するバッファメモリの内容がパージされる。また、
これらの各ビットに“0"を書込むとそれぞれのビットに
対応するバッファメモリの内容はパージされない。更
に、このレジスタの値が読出された場合には全ビットが
ゼロになる。
In the figure, each bit of DS5, DU6, IS7, IU8 is a bit for controlling the purge operation of the built-in data buffer 202,
When "1" is written to each of these bits, the contents of the buffer memory corresponding to each bit are purged. Also,
When "0" is written to each of these bits, the contents of the buffer memory corresponding to each bit are not purged. Further, when the value of this register is read, all bits become zero.

DS=0:負の物理アドレスのデータバッファエントリをパ
ージしない。
DS = 0: Do not purge data buffer entries with negative physical addresses.

DS=1:負の物理アドレスのデータバッファエントリをパ
ージする。
DS = 1: Purge data buffer entries with negative physical addresses.

DU=0:正の物理アドレスのデータバッファエントリをパ
ージしない。
DU = 0: Do not purge data buffer entries with positive physical addresses.

DU=1:正の物理アドレスのデータバッファエントリをパ
ージする。
DU = 1: Purge the data buffer entry at the positive physical address.

IS=0:負の物理アドレスの命令キャッシュエントリをパ
ージしない。
IS = 0: Do not purge instruction cache entries with negative physical addresses.

IS=1:負の物理アドレスの命令キャッシュエントリをパ
ージする。
IS = 1: Purge instruction cache entries at negative physical addresses.

IU=0:正の物理アドレスの命令キャッシュエントリをパ
ージしない。
IU = 0: Do not purge instruction cache entries at positive physical addresses.

IU=1:正の物理アドレスの命令キャッシュエントリをパ
ージする。
IU = 1: Purge instruction cache entry at positive physical address.

(9) 「本発明のデータ処理装置の例外処理機能」 (9.1) 「本発明のデータ処理装置で検出されるEITの
種類」 本発明のデータ処理装置100で発生するEITには、命令
に依存しないEITとして、アクセスした論理アドレスに
対応するデータ及び命令が主メモリ109上になくページ
フォールトが発しした場合に検出されるページ不在例
外,論理アドレスを物理アドレスに変換中に発生するエ
ラー,メモリ保護違反及びI/O領域に関する不当なアク
セスが生じた場合に発生するアドレス変換例外,命令ま
たはオペランドアクセスにおいて一定時間以内にバスか
らの応答がなくメモリアクセスが実行されなかった場合
に発生するバスアクセス例外がある。
(9) “Exception handling function of the data processing device of the present invention” (9.1) “Type of EIT detected by the data processing device of the present invention” The EIT generated by the data processing device 100 of the present invention depends on instructions. A non-existent EIT is a page fault exception detected when data and an instruction corresponding to the accessed logical address are not in the main memory 109 and a page fault occurs, an error occurs during the conversion of the logical address to a physical address, and memory protection. An address translation exception that occurs when a violation or an illegal access to the I / O area occurs, or a bus access exception that occurs when there is no response from the bus within a certain time during instruction or operand access and no memory access is executed There is.

また、命令に依存して発生するEITとして、ジャンプ
命令のジャンプ先アドレスが奇数であった場合に発生す
る奇数アドレスジャンプトラップ,割当てられていない
命令及びアドレッシングモードのビットパターンを実行
しようとした場合に発生する予約命令例外,整数演算で
0除算を行なった場合に発生するゼロ除算トラップ,浮
動小数点命令を実行した際にマスクされていない例外を
検出した場合に発生する浮動小数点演算トラップ,TRAPA
命令により発生する無条件トラップ,TRAP/cc命令により
発生する条件トラップがある。
Also, as an EIT generated depending on the instruction, an odd address jump trap generated when the jump destination address of the jump instruction is odd, an unassigned instruction, and an attempt to execute a bit pattern in the addressing mode are performed. Reserved instruction exception that occurs, division-by-zero trap that occurs when integer division is performed by zero, floating-point operation trap that occurs when an unmasked exception is detected when a floating-point instruction is executed, TRAPA
There are unconditional traps generated by instructions and conditional traps generated by TRAP / cc instructions.

(9.2) 「EIT処理ハイドラを起動する際の動作」 本発明のデータ処理装置100ではEITを検出すると、以
下の手順に従うマイクロプログラムが実行され、EIT処
理ハイドラが起動される。
(9.2) “Operation when Activating EIT Processing Hydra” In the data processing device 100 of the present invention, when an EIT is detected, a microprogram according to the following procedure is executed, and the EIT processing hydra is activated.

まず、検出したEITに応じたベクトル番号が本発明の
データ処理装置100内部で生成される。
First, a vector number corresponding to the detected EIT is generated inside the data processing device 100 of the present invention.

次に、メモリ空間上にあり、それぞれのEITに対する
処理ハイドラの先頭アドレスとEITのベクトルとがペア
にして記憶されているEITベクトルテーブルがアクセス
される。
Next, an EIT vector table which is stored in the memory space and stores a pair of the start address of the processing hydra for each EIT and the vector of the EIT is accessed.

EITベクトルテーブルの各エントリは8バイトで構成
されており、EIT処理ハイドラに処理が移る前に本発明
のデータ処理装置100のプロセッサステータスワード(P
SW)を更新するためのデータが含まれている。
Each entry of the EIT vector table is composed of 8 bytes, and before the processing is shifted to the EIT processing hydra, the processor status word (P
SW) to update the data.

次に、EIT処理ハイドラから復帰した後に元の命令列
に戻るための戻り先命令のPC値であるNEXTPC,EITを起動
する前のPSW,及び検出したEITの番号等の検出したEITに
関する各種の情報であるEITINFがスタックに退避され
る。
Next, after returning from the EIT processing hydra, NEXTPC which is the PC value of the return instruction to return to the original instruction sequence, PSW before starting the EIT, and various types of the detected EIT such as the number of the detected EIT. EITINF, which is information, is saved on the stack.

更に必要であれば、EITを検出した命令のPC値等の情
報もスタックに退避される。
If necessary, information such as the PC value of the instruction that detected the EIT is also saved on the stack.

これらの処理により生成されるスタックフレームはEI
Tの種類に依存しており、5種類のフォーマットに分か
れる。
The stack frame generated by these processes is EI
It depends on the type of T and is divided into five types.

次に、読込まれたEITベクトルテーブルエントリに基
づいてPSWが更新される。この際、PSWにreservedの値が
セットされようとするとシステムエラーとなる。このPS
Wの更新により、メモリ保護情報となるリング番号の更
新,アドレス変換の有無の切換え、デバッグ環境の切換
え,割込みマスクレベルの切換え,浮動小数点演算トラ
ップ受付モードの切換えを行うことが可能になる。
Next, the PSW is updated based on the read EIT vector table entry. At this time, if a reserved value is set in the PSW, a system error occurs. This PS
By updating W, it becomes possible to update the ring number serving as the memory protection information, switch the presence / absence of address conversion, switch the debug environment, switch the interrupt mask level, and switch the floating point operation trap acceptance mode.

次に、EITテーブルのエントリからフェッチされたPC
値へのジャンプが行われ、EIT処理ハンドラが起動す
る。多重にEITが検出されており、未処理のEITが抑止さ
れていない場合はEIT処理ハンドラの先頭命令を実行す
る以前にその未処理のEITに対するEIT処理ハンドラを起
動するための処理が行われる。
Next, the PC fetched from the entry in the EIT table
A jump to the value is performed, and the EIT processing handler starts. If multiple EITs are detected and the unprocessed EIT is not suppressed, a process for activating the EIT processing handler for the unprocessed EIT is performed before executing the first instruction of the EIT processing handler.

(9.3) 「EIT処理ハンドラから元の命令列への復帰動
作」 EIT処理ハンドラによる各EITに対応する処理が終了し
た後、EIT処理ハンドラで最後に実行されるREIT命令で
は以下のような処理を行うマイクロプログラムが実行さ
れて元の命令列に復帰する処理を行う。
(9.3) “Return operation from the EIT processing handler to the original instruction sequence” After the processing corresponding to each EIT by the EIT processing handler is completed, the REIT instruction executed last by the EIT processing handler performs the following processing. The microprogram to be executed is executed to perform processing for returning to the original instruction sequence.

まず、スタックからEITが検出された時点のPSW値とEI
TINFとが読込まれる。続いてスタックから戻先命令の論
理アドレスが読込まれる。
First, the PSW value and EI when the EIT is detected from the stack
TINF is read. Subsequently, the logical address of the return instruction is read from the stack.

更に、EITINF中のフォーマット情報により追加情報の
有無が判定され、追加情報があればスタックからそれが
読込まれる。追加情報は前述の如く5つのフォーマット
に依存してそれぞれ異なる。
Further, the presence or absence of additional information is determined based on the format information in EITINF, and if there is additional information, it is read from the stack. The additional information is different depending on the five formats as described above.

次に、スタックから読込まれたEITが検出された時点
のPSW値に従ってPSWの全フィールドがEIT発生前の値に
復帰される。
Next, all the fields of the PSW are returned to the values before the occurrence of the EIT according to the PSW value at the time when the EIT read from the stack is detected.

EITを発生したストアバッファによるライトサイクル
の再実行をREIT命令の実行中に行なう場合がある。
In some cases, the write cycle is re-executed by the store buffer that has generated the EIT during the execution of the REIT instruction.

次に、スタックから読込まれた戻り先命令の論理アド
レスへのジャンプが実行され、元の命令列に復帰する。
Next, a jump to the logical address of the return instruction read from the stack is executed, and the sequence returns to the original instruction sequence.

(10) 「データバッファの詳細動作」 (10.1) データバッファの構成 第8図はデータバッファ202と物理アドレス比較器204
との一構成例を示すブロック図である。
(10) “Detailed operation of data buffer” (10.1) Configuration of data buffer FIG. 8 shows the data buffer 202 and the physical address comparator 204
FIG. 3 is a block diagram showing an example of the configuration.

データバッファ202のタグアドレス部とデータ部とか
らなるメモリアレイ部はWブロック230,Xブロック231,Y
ブロック232,Zブロック233の4ブロックにて構成されて
いる。なお、各ブロック230,231,232,233には20ビット
のタグアドレスと16ビットのデータとで一組に構成され
るエントリが128個ずつある。
The memory array section of the data buffer 202 including the tag address section and the data section includes a W block 230, an X block 231, and a Y block.
It is composed of four blocks, a block 232 and a Z block 233. Each of the blocks 230, 231, 232, and 233 has 128 entries each composed of a 20-bit tag address and 16-bit data.

データはWD234,XD235,YD236,ZD237の4つのデータ入
出力レジスタを介して入出力される。
Data is input / output via four data input / output registers WD234, XD235, YD236, ZD237.

タグアドレスはWC238,XC239,YC240,ZC241の4つのア
ドレス比較器へ出力される。
The tag address is output to four address comparators WC238, XC239, YC240, and ZC241.

IAレジスタ242はTLB201又はアドレス入出力回路246か
らデータバッファ202へ入力されるアドレスを保持し、
上位20ビットが4つのアドレス比較器238,239,240,241
へ出力され、下位の5ビット目から13ビット目の9ビッ
トがメモリアレイ部へ出力される。また、IAレジスタ24
2の下位から12ビット目及び下位5ビットがマルチプレ
クサ制御回路244へ出力される。
The IA register 242 holds an address input from the TLB 201 or the address input / output circuit 246 to the data buffer 202,
Address comparator 238, 239, 240, 241 with four high-order 20 bits
And the lower 9th bit from the 5th bit to the 13th bit is output to the memory array unit. Also, IA register 24
The lower 12th bit and the lower 5 bits of 2 are output to the multiplexer control circuit 244.

マルチプレクサ243は、4つのデータ入出力レジスタ2
34,235,236,237とデータ入出力回路207とのインターフ
ェイスとなる8バイトのIODバッファ245に接続されてい
る。マルチプレクサ制御回路244は4つのアドレス比較
器238,239,240,241とIAレジスタ242との内容に従ってマ
ルチプレクサ243を制御する。
The multiplexer 243 has four data input / output registers 2
It is connected to an 8-byte IOD buffer 245 serving as an interface between the data input / output circuit 207 and the data input / output circuit 207. The multiplexer control circuit 244 controls the multiplexer 243 according to the contents of the four address comparators 238, 239, 240, 241 and the IA register 242.

(10.2) 「データキャッシュとしての動作」 バッファメモリ制御レジスタのDMフィールド3を“1
0"とし、RPフィールド1を“10"とするとデータバッフ
ァ202は容量が8kB,ラインサイズが16バイトで4ウエイ
セットアソシアティブのデータキャッシュとして動作す
る。また、メモリアレイの4つのブロック230,231,232,
233はそれぞれ1つのコンパートメントとして動作す
る。
(10.2) "Operation as data cache" Set DM field 3 of the buffer memory control register to "1".
If the RP field 1 is set to "10" and the RP field 1 is set to "10", the data buffer 202 operates as a 4-way set associative data cache having a capacity of 8 kB and a line size of 16. Bytes 230, 231, 232,
233 each operate as one compartment.

この場合、リードアクセスではIAレジスタ242に入力
されたアドレスの5ビット目から11ビット目の7ビット
で各コンパートメントのエントリが選択され、4つのタ
グアドレスが4つのアドレス比較器238,239,240,241に
それぞれ出力され、4つのバイトデータが4つのデータ
入出力レジスタ234,235,236,237にそれぞれ読出され
る。
In this case, in the read access, the entry of each compartment is selected by the 7th bit from the 5th bit to the 11th bit of the address input to the IA register 242, and the four tag addresses are output to the four address comparators 238, 239, 240, 241 respectively. Four byte data are read to four data input / output registers 234, 235, 236, 237, respectively.

4つのアドレス比較器238,239,240,241では4つのタ
グアドレスがIAレジスタ242の上位20ビットのアドレス
とそれぞれ比較される。IAレジスタ242の下位4ビット
のアドレスと比較結果とに従って、一致したコンパート
メントの出力データから必要なデータがマルチプレクサ
243により選択されてIODバッファ245に読出される。
The four tag comparators 238, 239, 240, and 241 compare the four tag addresses with the upper 20-bit address of the IA register 242, respectively. According to the address of the lower 4 bits of the IA register 242 and the comparison result, necessary data is output from the output data of the matched compartment to the multiplexer.
Selected by 243 and read to IOD buffer 245.

ライトアクセスでは、ヒットしたコンパートメントに
同様な動作でIODバッファ245からマルチプレクサ243と
データ入出力レジスタ234,235,236,267とを通じてデー
タが書込まれる。
In the write access, data is written from the IOD buffer 245 to the hit compartment through the multiplexer 243 and the data input / output registers 234, 235, 236, 267 by the same operation.

データキャッシュがミスした場合は、4バイト×4回
のクワッドアクセスモードで外部のメモリがアクセスさ
れ、4つのコンパートメントの内の対応する1つのエン
トリが書換えられる。このため、RPフィールド1=“1
0"の16バイトラインサイズモードでは、データバス102
を32ビットで使用するシステムで有効に動作する。
When the data cache misses, the external memory is accessed in the 4-byte × 4 quad access mode, and the corresponding one of the four compartments is rewritten. Therefore, RP field 1 = “1”
In the 16 "line size mode of 0", the data bus 102
Works well on systems that use 32-bit.

バッファメモリ制御レジスタのDMフィールド3を“1
0"とし、RPフィールド1を“11"とすると、データバッ
ファ202は容量が8kB,ラインサイズが32バイトで2ウエ
イセットアソシアティブのデータキャッシュとして動作
する。この場合、メモリアレイはWブロック230とXブ
ロック231とが組み合わさって1つのコンパートメント
として動作し、またYブロック232とZブロック233とが
組合わさって1つのコンパートメントとして動作する。
Set DM field 3 of the buffer memory control register to "1".
When the RP field 1 is set to "11" and the RP field 1 is set to "11", the data buffer 202 operates as a two-way set associative data cache having a capacity of 8 kB and a line size of 32 bytes. Block 231 combines to operate as one compartment, and Y block 232 and Z block 233 combine to operate as one compartment.

Wブロック230とXブロック231との同一エントリのタ
グアドレス部には同一の値が記憶され、同一エントリの
データ部には32バイトのデータが16バイトずつ記憶され
る。同様に、Yブロック232とZブロック233との同一エ
ントリのタグアドレス部には同一の値が記憶され、同一
エントリのデータ部には32バイトのデータが16バイトず
つ記憶される。
The same value is stored in the tag address part of the same entry in the W block 230 and the X block 231, and the data part of the same entry stores 16 bytes of 32-byte data. Similarly, the same value is stored in the tag address portion of the same entry in the Y block 232 and the Z block 233, and the data portion of the same entry stores 16 bytes of 32-byte data.

この場合、リードアクセスではIAレジスタ242に入力
されたアドレスの6ビット目から12ビット目の7ビット
で各コンパートメントのエントリが選択され、4つのタ
グデータが4つのアドレス比較器238,239,240,241にそ
れぞれ出力され、4つの16バイトデータが4つのデータ
入出力レジスタ234,235,236,237にそれぞれ読出され
る。
In this case, in the read access, the entry of each compartment is selected by the 7th bit from the 6th bit to the 12th bit of the address input to the IA register 242, and the four tag data are output to the four address comparators 238, 239, 240, 241 respectively. Four 16-byte data are read out to four data input / output registers 234, 235, 236, 237, respectively.

4つのアドレス比較器238,239,240,241では4つのタ
グアドレスがIAレジスタ242の上位20ビットのアドレス
とそれぞれ比較される。IAレジスタ242の下位5ビット
のアドレスと比較結果とに従って、一致したコンパート
メントとなる2つのブロックの出力データである32バイ
トから必要なデータがマルチプレクサ243により選択さ
れ、IODバッファ245に読出される。
The four tag comparators 238, 239, 240, and 241 compare the four tag addresses with the upper 20-bit address of the IA register 242, respectively. According to the lower 5 bits of the address of the IA register 242 and the comparison result, necessary data is selected by the multiplexer 243 from the 32 bytes, which are the output data of the two blocks that form the matched compartment, and read out to the IOD buffer 245.

ライトアクセスでは、ヒットしたコンパートメントに
同様な動作で、IODバッファ245からマルチプレクサ243
とデータ入出力レジスタ234,235,236,237とを通じてデ
ータが書込まれる。
In a write access, the operation similar to the hit compartment is performed, and the multiplexer 243 is transferred from the IOD buffer 245.
And data are written through the data input / output registers 234,235,236,237.

データキャッシュがミスしたときは8バイト×4回の
クワッドアクセスモードで外部のメモリがアクセスさ
れ、2つのコンパートメントの内の対応する1つのエン
トリが書換えられる。このため、RP1=“11"の際の32バ
イトラインサイズモードでは、データバス102の64ビッ
トで使用するシステムで有効に動作する。
When the data cache misses, the external memory is accessed in the quad access mode of 8 bytes × 4 times, and the corresponding one of the two compartments is rewritten. Therefore, in the 32-byte line size mode when RP1 = “11”, the system operates effectively in a system using the 64-bit data bus 102.

(103.4) 「制御空間メモリとしての動作」 バッファメモリ制御レジスタのDMフィールド3を“0
1"とするとRPフィールド1の値には拘わらず、データバ
ッファ202はアドレスがH'FFFFE000〜H'FFFFFFFFである
容量8kBの制御空間メモリとして動作する。
(103.4) “Operation as control space memory” Set DM field 3 of the buffer memory control register to “0”.
If "1" is set, the data buffer 202 operates as an 8 kB control space memory having addresses of H'FFFFE000 to H'FFFFFFFF regardless of the value of the RP field 1.

この場合、メモリアレイのタグアドレス部は使用され
ず、データ部のみが使用される。
In this case, the tag address part of the memory array is not used, and only the data part is used.

データバッファは4つのブロック230,231,232,233が
全体で256エントリ×32バイトのメモリアレイとして動
作し、IAレジスタ242で指定された制御空間アドレスの
6ビット目から13ビット目でエントリが指定され、メモ
リアレイがアクセスされる。
In the data buffer, the four blocks 230, 231, 232, and 233 operate as a memory array of 256 entries x 32 bytes in total, and the entry is specified by the 6th to 13th bits of the control space address specified by the IA register 242, and the memory array is accessed. Is done.

リード動作では、読出された32バイトのデータの内の
必要なバイトがIAレジスタ242の下位5ビットのアドレ
スに従ってマルチプレクサで選ばれ、IODバッファ245に
入力される。
In the read operation, necessary bytes of the read 32 bytes of data are selected by the multiplexer according to the lower 5 bits of the address of the IA register 242 and input to the IOD buffer 245.

ライト動作では、IODバッファ245に保持された8バイ
トのデータの内の必要なバイトがマルチプレクサで対応
するデータ入出力レジスタ234,235,236,237に転送さ
れ、メモリアレイの対応する場合に書込まれる。
In the write operation, necessary bytes of the 8-byte data held in the IOD buffer 245 are transferred to the corresponding data input / output registers 234, 235, 236, 237 by the multiplexer, and written in the corresponding case of the memory array.

(11) 「コンテキストスイッチ動作の詳細」 本発明のデータ処理装置100では第30図に示すコンテ
キストブロック情報をコンテキストスイッチング命令で
あるLDCTX命令とSTCTX命令とで操作する場合、8バイト
単位でデータを処理し、高速でコンテキストスイッチン
グを行う。
(11) “Details of context switch operation” In the data processing apparatus 100 of the present invention, when the context block information shown in FIG. 30 is operated by the LDCTX instruction and the STCTX instruction which are context switching instructions, data is processed in units of 8 bytes. And perform context switching at high speed.

(11.1) 整数演算部の詳細構成 第2図はコンテキストスイッチング動作に関係する整
数演算部117の構成例の詳細を、オペランドアドレス計
算部115,浮動小数点演算部118,オペランドアクセス部12
0と共に示すブロック図である。
(11.1) Detailed Configuration of Integer Operation Unit FIG. 2 shows details of a configuration example of the integer operation unit 117 related to the context switching operation, including an operand address calculation unit 115, a floating point operation unit 118, and an operand access unit 12
It is a block diagram shown with 0.

SAレジスタ210はオペランドアドレス計算部115から整
数演算部117に出力されるオペランドアドレス及び即値
を保持するレジスタである。
The SA register 210 is a register that holds an operand address and an immediate value output from the operand address calculation unit 115 to the integer operation unit 117.

AAレジスタ211は整数演算部117からオペランドアクセ
ス部120にアドレスを出力するためのレジスタであり、
保持内容に対する1,2,4,8のインクリメント・デクリメ
ント機能を有する。
The AA register 211 is a register for outputting an address from the integer operation unit 117 to the operand access unit 120,
It has 1, 2, 4, and 8 increment / decrement functions for the held contents.

汎用レジスタファイル213と専用レジスタ・作業用レ
ジスタファイルとは整数演算部117内の各種のデータを
保持し、演算回路215及び補助ALU212とそれぞれ3本の
4バイトのバスで結合されており、2つのレジスタ上の
オペランドに関する加算,比較等の演算が演算回路215
または補助ALU212で行える。
The general-purpose register file 213 and the dedicated register / work register file hold various data in the integer operation unit 117, and are connected to the operation circuit 215 and the auxiliary ALU 212 by three 4-byte buses each. Arithmetic operations such as addition and comparison on operands on registers are performed by arithmetic
Alternatively, it can be performed by the auxiliary ALU 212.

DDレジスタ216は整数演算部117とオペランドアクセス
部120とがデータを入出力するためのインタフェイスレ
ジスタであり、8バイトのDDバス123でオペランドアク
セス部120と結合されている。
The DD register 216 is an interface register for the integer operation unit 117 and the operand access unit 120 to input and output data, and is connected to the operand access unit 120 by an 8-byte DD bus 123.

FFレジスタ217は整数演算部117と浮動小数点演算部11
8とのインタフェイスレジスタである。
The FF register 217 has an integer operation unit 117 and a floating-point operation unit 11
8 is an interface register.

(11.2) 「コンテキストのロード動作」 コンテキストロード動作の一例として、CSMレジスタ
に格納されるべきデータのFRビット13とRGビット14とが
共に“1"であるコンテキストブロックに対してLDCTX/CS
命令を実行した場合の動作を説明する。この場合、コン
テキストブロックはアドレスがH'FFFFF000である制御空
間におかれているとする。また、LDCTX/CS命令はXビッ
ト15が“1"であるLDCTX命令である。
(11.2) "Context loading operation" As an example of a context loading operation, LDCTX / CS is used for a context block in which both FR bit 13 and RG bit 14 of data to be stored in the CSM register are "1".
The operation when the instruction is executed will be described. In this case, it is assumed that the context block is located in the control space whose address is H'FFFFF000. The LDCTX / CS instruction is an LDCTX instruction whose X bit 15 is “1”.

まず、CTXBADRフィールドで指定されたアドレッシン
グモードに従ってオペランドアドレス計算部115で計算
されてSAレジスタ210に転送されたコンテキストブロッ
クの先頭アドレスH'FFFFF000がS1バス221とAAレジスタ2
11とを通じてAAバスに出力されると共に、S1バス221,演
算回路215及びD1バス225を通じて専用レジスタ・作業用
レジスタファイル214中にあるCTXBBレジスタに格納され
る。
First, the start address H'FFFFF000 of the context block calculated by the operand address calculation unit 115 in accordance with the addressing mode specified in the CTXBADR field and transferred to the SA register 210 is stored in the S1 bus 221 and the AA register 2
The data is output to the AA bus through 11 and stored in the CTXBB register in the dedicated register / work register file 214 through the S1 bus 221, the arithmetic circuit 215, and the D1 bus 225.

AAレジスタ211は内容を出力後、その値を8インクリ
メントする。
After outputting the contents, the AA register 211 increments the value by eight.

オペランドアクセス部120ではデータバッファ202がア
クセスされ、コンテキストブロックの先頭の8バイトが
DDバス123を通じてDDレジスタに転送される。
The operand access unit 120 accesses the data buffer 202, and the first 8 bytes of the context block are
The data is transferred to the DD register via the DD bus 123.

次に、DDレジスタ216に格納された8バイトのデータ
の内の上位4バイトがS2バス222,演算回路215,D1バス22
5を通じて専用レジスタ・作業用レジスタファイル214中
にあるCSWレジスタに格納される。この際、演算回路215
はFRビット13とRGビット14との内容をチェックし、第1
マイクロROM部113へその結果を伝えてマイクロプログラ
ムでのコンテキストブロックフォーマットの判断に使用
する。
Next, the upper 4 bytes of the 8-byte data stored in the DD register 216 are stored in the S2 bus 222, the arithmetic circuit 215, and the D1 bus 22.
5 through the CSW register in the dedicated register / work register file 214. At this time, the arithmetic circuit 215
Checks the contents of FR bit 13 and RG bit 14,
The result is transmitted to the micro ROM unit 113 and used for determination of the context block format in the micro program.

また同時に、DDレジスタ216に格納された8バイトの
データの内の下位4バイトがS1バス221,補助ALU212,D3
バス226を通じて汎用レジスタファイル213中にあるSP0
レジスタに格納される。更に、同じく同時にAAレジスタ
211はH'FFFFF008をAAバス122を通じてオペランドアクセ
ス部120に転送し、データバッファ202からコンテキスト
ブロックの2番目の8バイトをDDレジスタ216へ読出
す。
At the same time, the lower 4 bytes of the 8-byte data stored in the DD register 216 are the S1 bus 221, the auxiliary ALU 212, and the D3 bus.
SP0 in general register file 213 via bus 226
Stored in a register. In addition, the AA register
211 transfers H'FFFFF008 to the operand access unit 120 via the AA bus 122, and reads the second 8 bytes of the context block from the data buffer 202 to the DD register 216.

AAレジスタ211は値を出力した後、内容を8インクリ
メントする。
After outputting the value, the AA register 211 increments the content by eight.

次に、DDレジスタ216に格納された8バイトのデータ
の内の上位4バイトがS2バス222,演算回路215,D1バス22
5を通じて汎用レジスタファイル213中にあるSP1レジス
タに格納される。この際、同時にDDレジスタ216に格納
された8バイトのデータの内の下位4バイトがS1バス22
1,補助ALU212,D3バス226を通じて汎用レジスタファイル
213中にあるSP2レジスタに格納される。また同時に、AA
レジスタ211はアドレスH'FFFFF010をAAバス122を通じて
オペランドアクセス部120に転送し、データバッファ202
からコンテキストブロックの3番目の8バイトをDDレジ
スタ216へ読出す。
Next, the upper 4 bytes of the 8-byte data stored in the DD register 216 are stored in the S2 bus 222, the arithmetic circuit 215, and the D1 bus 22.
5 is stored in the SP1 register in the general-purpose register file 213. At this time, the lower 4 bytes of the 8-byte data stored in the DD register 216 are stored in the S1 bus 22 at the same time.
1, General purpose register file through auxiliary ALU212, D3 bus 226
213 is stored in the SP2 register. At the same time, AA
The register 211 transfers the address H'FFFFF010 to the operand access unit 120 through the AA bus 122, and the data buffer 202
, The third 8 bytes of the context block are read into the DD register 216.

AAレジスタ211は値を出力した後、内容を8インクリ
メントする。
After outputting the value, the AA register 211 increments the content by eight.

同様の動作が反復され、CSW,SP0〜3,UATB,R0〜14の各
レジスタに値がロードされる。この際、SP3とUATB,R1と
R2,R3とR4,R5とR6,R7とR8,R9とR10,R11とR12,R13とR14
とのそれぞれにDDレジスタ216の上位4バイトと下位4
バイトとが一度にロードされる。レジスタR0にD3バス22
6から値がロードされる際は対応する上位4バイトのロ
ードは行われない。
A similar operation is repeated, and values are loaded into the registers CSW, SP0 to 3, UATB, and R0 to R14. At this time, SP3 and UATB, R1
R2, R3 and R4, R5 and R6, R7 and R8, R9 and R10, R11 and R12, R13 and R14
The upper 4 bytes and lower 4 bytes of DD register 216
Bytes are loaded at once. D3 bus 22 to register R0
When a value is loaded from 6, the corresponding upper 4 bytes are not loaded.

FR0〜FR15の各レジスタについてはオペランドアクセ
ス部120から浮動小数点演算部118に転送された8バイト
のデータが浮動小数点演算部118で各浮動小数点レジス
タに格納される。但し、アドレスは整数演算部117のAA
レジスタ211から出力される。
For each of the registers FR0 to FR15, the 8-byte data transferred from the operand access unit 120 to the floating point arithmetic unit 118 is stored in each floating point register by the floating point arithmetic unit 118. However, the address is AA of the integer operation unit 117.
Output from the register 211.

オペランドアクセス部120から転送された8バイトの
データがFR15レジスタに格納される際には、AAレジスタ
211からはアドレスは出力されず、データバッファ202の
アクセスは行われない。
When the 8-byte data transferred from the operand access unit 120 is stored in the FR15 register, the AA register
No address is output from 211, and the data buffer 202 is not accessed.

データバッファ202ではなく、外部のメモリからコン
テキストがロードされる際は、オペランドアクセス部12
0が外部のメモリをアクセスするため、データバッファ2
02からコンテキストをロードする場合に比してより多く
のクロックサイクルを必要とする。
When the context is loaded from an external memory instead of the data buffer 202, the operand access unit 12
Since 0 accesses the external memory, data buffer 2
Requires more clock cycles than loading context from 02.

(11.3) 「コンテキストのストア動作」 コンテキスト動作の一例としてCSWレジスタのFRビッ
ト13とRGビット14とが共に“1"である場合にSTCTX/CS命
令を実行した際の動作を説明する。なおこの場合、CTXB
Bレジスタの内容はH'FFFFF000とする。また、STCTX/CS
命令はXビット15が“1"であるSTCTX命令である。
(11.3) “Store Operation of Context” As an example of the context operation, an operation when the STCTX / CS instruction is executed when the FR bit 13 and the RG bit 14 of the CSW register are both “1” will be described. In this case, CTXB
The contents of the B register are H'FFFFF000. STCTX / CS
The instruction is an STCTX instruction whose X bit 15 is "1".

まず、CTXBBレジスタに保持されているコンテキスト
ブロックの先頭アドレスH'FFFFF000がS3バス213を通じ
てAAレジスタ211に転送されると共に、CSWレジスタの内
容がS1バス221を通じてDDレジスタ216の上位4バイトに
転送され、SP0レジスタの内容がS2バス222を通じてDDレ
ジスタ216の下位4バイトに転送される。また同時にCSW
レジスタの内容がS1バス221から演算回路215にも入力さ
れ、演算回路215はFRビット13とRGビット14との内容を
チェックして第1マイクロROM部113へその結果を伝え、
マイクロプログラムでのコンテキストブロックフォーマ
ットの判断に使用する。
First, the top address H'FFFFF000 of the context block held in the CTXBB register is transferred to the AA register 211 through the S3 bus 213, and the contents of the CSW register are transferred to the upper 4 bytes of the DD register 216 through the S1 bus 221. , SP0 register is transferred to the lower 4 bytes of the DD register 216 via the S2 bus 222. Also at the same time CSW
The contents of the register are also input to the arithmetic circuit 215 from the S1 bus 221. The arithmetic circuit 215 checks the contents of the FR bit 13 and the RG bit 14 and transmits the result to the first micro ROM unit 113.
Used to determine the context block format in the micro program.

次に、AAレジスタ211からアドレスH'FFFFF000がAAバ
ス122を通じてオペランドアクセス部120に転送され、DD
レジスタ216からはコンテキストブロックの先頭の8バ
イトデータとなるCSWレジスタ値とSP0レジスタ値とがDD
バス123を通じてオペランドアクセス部120へ転送され、
データバッファ202に格納される。
Next, the address H'FFFFF000 from the AA register 211 is transferred to the operand access unit 120 through the AA bus 122,
From the register 216, the CSW register value and the SP0 register value, which are the first 8-byte data of the context block, are DD
Transferred to the operand access unit 120 via the bus 123,
The data is stored in the data buffer 202.

AAレジスタ211は値を出力した後、内容を8インクリ
メントする。この際、コンテキストブロックの2番目の
8バイト情報の上位4バイトとなるSP1レジスタの内容
がS1バス221を通じて汎用レジスタファイル213からDDレ
ジスタ216の上位に転送され、下位4バイトとなるSP2レ
ジスタの内容がS2バス222を通じて汎用レジスタファイ
ル213からDDレジスタ216の下位に転送される。
After outputting the value, the AA register 211 increments the content by eight. At this time, the contents of the SP1 register, which is the upper 4 bytes of the second 8-byte information of the context block, are transferred from the general-purpose register file 213 to the upper position of the DD register 216 via the S1 bus 221 and the contents of the SP2 register, which is the lower 4 bytes, Is transferred from the general-purpose register file 213 to the lower part of the DD register 216 via the S2 bus 222.

次に、AAレジスタ211からアドレスH'FFFFF008がAAバ
ス122を通じてオペランドアクセス部120に転送され、DD
レジスタ216からはコンテキストブロックの2番目の8
バイトデータとなるSP1レジスタ値とSP2レジスタ値とが
DDバス123を通じてオペランドアクセス部120へ転送さ
れ、データバッファ202に格納される。
Next, the address H'FFFFF008 from the AA register 211 is transferred to the operand access unit 120 through the AA bus 122,
From register 216, the second 8 of the context block
The SP1 register value and SP2 register value that are byte data
The data is transferred to the operand access unit 120 via the DD bus 123 and stored in the data buffer 202.

AAレジスタ211は値を出力した後、内容を8インクリ
メントする。この際、コンテキストブロックの3番目の
8バイト情報の上位4バイトとなるSP3レジスタの内容
がS1バス221を通じて汎用レジスタファイル213からDDレ
ジスタ216の上位に転送され、下位4バイトとなるUATB
レジスタの内容がS2バス222を通じて専用レジスタ・作
業用レジスタファイル214からDDレジスタ216の下位に転
送される。
After outputting the value, the AA register 211 increments the content by eight. At this time, the contents of the SP3 register, which is the upper 4 bytes of the third 8-byte information of the context block, are transferred from the general-purpose register file 213 to the upper position of the DD register 216 via the S1 bus 221 and the UATB which is the lower 4 bytes
The contents of the register are transferred from the dedicated register / work register file 214 to the lower part of the DD register 216 via the S2 bus 222.

同様の動作が反復され、CSW,SP0日3,UATB,R0〜14の各
レジスタの値がデータバッファ202にストアされる。こ
の際、SP3とUATB,R1とR2,R3とR4,R5とR6,R7とR8,R9とR1
0,R11とR12,R13とR13の値がそれぞれからDDレジスタ216
の上位4バイトと下位4バイトとに一度に値が転送され
る。
The same operation is repeated, and the values of the registers CSW, SP0 day 3, UATB, and R0 to R14 are stored in the data buffer 202. At this time, SP3 and UATB, R1 and R2, R3 and R4, R5 and R6, R7 and R8, R9 and R1
0, the values of R11 and R12, and the values of R13 and R13 are
Are transferred at a time to the upper 4 bytes and the lower 4 bytes.

R0レジスタの値がDDレジスタ216に転送される際は対
応する上位バイトの転送は行われない。
When the value of the R0 register is transferred to the DD register 216, the corresponding upper byte is not transferred.

また、R0レジスタの値がDDレジスタ216からオペラン
ドアクセス部120に転送される際、対応する上位4バイ
トはゼロが転送される。
When the value of the R0 register is transferred from the DD register 216 to the operand access unit 120, zero is transferred to the corresponding upper 4 bytes.

FR0〜FR15の各レジスタについては、浮動小数点演算
部118の各浮動小数点レジスタから読出された値がオペ
ランドアクセス部120へ転送される。但し、アドレスは
整数演算部117のAAレジスタ211から出力される。
For each of the registers FR0 to FR15, the value read from each floating-point register of the floating-point operation unit 118 is transferred to the operand access unit 120. However, the address is output from the AA register 211 of the integer operation unit 117.

データバッファ202ではなく、外部のメモリへコンテ
キストをストアする場合は、オペランドアクセス部120
が外部のメモリをアクセスするため、データバッファ20
2へコンテキストをストアする場合に比してより多くの
クロックサイクルを必要とする。
When storing the context in an external memory instead of the data buffer 202, the operand access unit 120
Access the external memory, the data buffer 20
Requires more clock cycles than storing the context in 2.

(12) 「本発明の他の実施例」 上記実施例ではモード切換えによりデータバッファを
コンテキストブロックを保持する制御空間となるランダ
ムアクセスメモリまたはデータキャッシュのいずれかと
して動作させる例を述べたが、同様の方法でモード切換
えにより1つのバッファメモリをコンテキストブロック
を保持する制御空間となるランダムアクセスメモリまた
は命令キャッシュのいずれかとして動作させる構成を採
ってもよい。
(12) "Another embodiment of the present invention" In the above embodiment, an example was described in which the data buffer was operated as either a random access memory or a data cache serving as a control space for holding a context block by mode switching. In the method described above, a configuration may be adopted in which one buffer memory is operated as either a random access memory or an instruction cache serving as a control space for holding a context block by mode switching.

また、バッファメモリがランダムアクセスメモリとし
て動作する際はコンテキストブロックを保持する制御空
間として動作するのではなく、論理メモリ空間の一部と
して動作させる構成を採ってもよい。
When the buffer memory operates as a random access memory, a configuration may be adopted in which the buffer memory operates as a part of a logical memory space instead of operating as a control space for holding a context block.

なお上記実施例では、オペランドアクセス部へアドレ
スを出力するアドレスレジスタと、オペランドアクセス
部との間でデータを入出力する汎用レジスタの2倍のバ
イト幅のデータレジスタとを備え、レジスタファイルと
データレジスタ間は複数のバスからなり2つのデータを
同時に転送する転送経路を有し、2つ以上のレジスタに
メモリからデータをロードする命令であるLDCTX命令を
実行する場合、命令実行制御部の制御により、オペラン
ドアクセス部から2つのレジスタにロードすべき2つの
データが連結されたデータがデータレジスタへ転送さ
れ、データレジスタの上位4バイトと下位4バイトとが
2つ転送経路をそれぞれ通じて2つのレジスタに同時に
転送されるように構成されている。このため、データが
1つずつ転送される場合に比して2倍の転送速度でレジ
スタの内容をメモリへ転送することが可能になるので、
コンテキストのロード行うLDCTX命令の実行が高速化さ
れてタスクスイッチングに要する時間が短縮される。
In the above embodiment, an address register for outputting an address to the operand access unit and a data register having a byte width twice as large as a general-purpose register for inputting / outputting data to / from the operand access unit are provided. In the case where an LDCTX instruction, which is an instruction for loading data from a memory into two or more registers, is executed by controlling an instruction execution control unit, Data obtained by concatenating two data to be loaded into the two registers from the operand access unit is transferred to the data register, and the upper 4 bytes and the lower 4 bytes of the data register are transferred to the two registers via two transfer paths respectively. It is configured to be transferred at the same time. For this reason, the contents of the register can be transferred to the memory at twice the transfer speed as compared with the case where data is transferred one by one.
The execution of the LDCTX instruction for loading the context is accelerated, and the time required for task switching is reduced.

また、2つ以上のレジスタからメモリへデータをスト
アする命令であるSTCX命令を実行する場合、命令実行制
御部の制御により、2つのレジスタの内容が2つの転送
経路からデータレジスタの上位4バイトと下位4バイト
とに同時に転送され、データレジスタで2つのデータが
連結され、この連結されたデータがオペランドアクセス
部へ1つのメモリアクセスとして転送されるように構成
されている。これにより、データが1つずつ転送される
場合に比して2倍の転送速度でレジスタの内容を転送す
ることが可能になるので、コンテキストのストア行うST
CTX命令の実行が高速化されてタスクスイッチングに要
する時間が短縮される。
When executing the STCX instruction, which is an instruction to store data from two or more registers to the memory, the contents of the two registers are transferred from the two transfer paths to the upper four bytes of the data register under the control of the instruction execution control unit. The data is simultaneously transferred to the lower 4 bytes, two data are linked by a data register, and the linked data is transferred to the operand access unit as one memory access. This makes it possible to transfer the contents of the register at twice the transfer rate as compared with the case where data is transferred one by one.
The speed of execution of the CTX instruction is increased, and the time required for task switching is reduced.

更に、上述の実施例の如く、データバッファがデータ
処理装置本体と同一の集積回路上に内蔵されている構成
を採る場合は、データバッファに対するアクセス時間は
集積回路外のメモリに対するそれに比して特に短いた
め、上述の効果が特に大きい。
Further, when a configuration is adopted in which the data buffer is built in the same integrated circuit as the main body of the data processing device as in the above-described embodiment, the access time to the data buffer is particularly shorter than that to the memory outside the integrated circuit. Because of the short length, the above-described effect is particularly large.

[発明の効果] 以上詳述した如き本発明のデータ処理装置において
は、メモリ制御情報保持手段、つまりバッファメモリ制
御レジスタの内蔵データバッファ制御フィールドで第1
の値を保持させた場合は、メモリ(データバッファ)
は、命令実行部で実行すべき命令のオペランドとなるデ
ータを保持してキャッシングし、オペランドアクセス部
に出力されたアドレスとデータキャッシュ内のタグアド
レスが一致することによりデータキャッシュがヒットす
ればアクセスされたアドレスに対応するデータを出力す
る。
[Effects of the Invention] In the data processing device of the present invention as described in detail above, the memory control information holding means, that is, the first data buffer control field contained in the buffer memory control register is used.
Memory (data buffer)
Holds and caches data that is the operand of the instruction to be executed by the instruction execution unit, and is accessed if the data cache hits because the address output to the operand access unit matches the tag address in the data cache. Output data corresponding to the address.

一方、メモリ制御情報保持手段に第2の値を保持させ
た場合は、メモリは、命令によってアクセス可能なメモ
リ、それもユーザ空間のみならず、制御空間(ユーザ空
間以外の空間、つまりシステムプログラムが使用するメ
モリ空間)のメモリとして動作する。この場合、メモリ
(データバッファ)は、オペランドアクセス部に出力さ
れた制御空間のアドレスがアドレス領域の範囲内であれ
ばそのアドレスに保持されているデータを出力する。
On the other hand, when the second value is held by the memory control information holding means, the memory is a memory accessible by an instruction, which is not only a user space, but also a control space (a space other than the user space, that is, a system program). It operates as a memory in the used memory space). In this case, if the address of the control space output to the operand access unit is within the range of the address area, the memory (data buffer) outputs the data held at that address.

このため、本発明のデータ処理装置では、物理的には
1つのデータバッファがデータキャッシュとして動作す
ることも、特定アドレス領域のランダムアクセスメモリ
として動作することも可能なため、データバッファが効
率的に利用出来る。従って、コンテキストスイッチング
命令等ではコンテキスト退避用のデータバッファの領域
を特に高速なメモリ領域として利用することが可能にな
り、タスクスイッチング時間の最大値を小さくすること
ができる。
For this reason, in the data processing device of the present invention, one data buffer can physically operate as a data cache or can operate as a random access memory in a specific address area. Available. Therefore, in the context switching instruction or the like, the area of the context saving data buffer can be used as a particularly high-speed memory area, and the maximum value of the task switching time can be reduced.

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

第1図は本発明のデータ処理装置のオペランドアクセス
部の一構成例を示すブロック図、 第2図は本発明のデータ処理装置の整数演算部の部分的
詳細構成を示すブロック図、 第3図は本発明のデータ処理装置のバッファメモリ制御
レジスタの構成を示す模式図、 第4図は本発明のデータ処理装置の全体の構成例を示す
ブロック図、 第5図は本発明のデータ処理装置のパイプライン処理ス
テージの説明のためのブロック図、 第6図は本発明のデータ処理装置を用いたデータ処理シ
ステムの構成例を示すブロック図、 第7図は本発明のデータ処理装置の入出力信号ピンを示
す模式図、 第8図は本発明のデータ処理装置のデータバッファの詳
細な構成例を示すブロック図、 第9図乃至第13図は本発明のデータ処理装置の命令のフ
ォーマットを示す模式図、 第14図乃至第27図は本発明のデータ処理装置の命令中の
アドレッシングモード指定部のフォーマットを示す模式
図、 第28図は本発明のデータ処理装置のBAT(0:2)信号の意
味を表す表を示す図、 第29図は本発明のデータ処理装置のバッファメモリのパ
ージ指定のためのパージ指定レジスタの構成を示す模式
図、 第30図は本発明のデータ処理装置のコンテキストブロッ
クのフォーマットの一例を示す模式図、 第31図は本発明のデータ処理装置のコンテキストブロッ
クフォーマットを指定するCSWレジスタの構成を示す模
式図、 第32図は本発明のデータ処理装置のコンテキストロード
命令のビットパタンを示す模式図、 第33図は本発明のデータ処理装置のコンテキスト命令の
ビットパタンを示す模式図、 第34図は本発明のデータ処理装置により実行中のコンテ
キストブロックの先頭アドレスを保持するCTXBBレジス
タの構成を示す模式図、 第35図は本発明のデータ処理装置のユーザ用アドレス変
換テーブルの先頭アドレスを保持するためのUATBレジス
タの構成を示す模式図、 第36図は本発明のデータ処理装置のPSW(プロセッサ状
態後)の構成を示す模式図である。 3……DMフィールド、112……命令デコード部、117……
整数演算部、118……浮動小数点演算部、120……オペラ
ンドアクセス部、202……データバッファ なお、各図中同一符号は同一又は相当部分を示す。
FIG. 1 is a block diagram showing a configuration example of an operand access unit of a data processing device of the present invention. FIG. 2 is a block diagram showing a partial detailed configuration of an integer operation unit of the data processing device of the present invention. Is a schematic diagram showing the configuration of a buffer memory control register of the data processing device of the present invention, FIG. 4 is a block diagram showing an example of the overall configuration of the data processing device of the present invention, and FIG. FIG. 6 is a block diagram illustrating a pipeline processing stage, FIG. 6 is a block diagram illustrating a configuration example of a data processing system using the data processing device of the present invention, and FIG. 7 is an input / output signal of the data processing device of the present invention. FIG. 8 is a schematic diagram showing pins, FIG. 8 is a block diagram showing a detailed configuration example of a data buffer of the data processing device of the present invention, and FIGS. 9 to 13 show instruction formats of the data processing device of the present invention. 14 to 27 are schematic diagrams showing a format of an addressing mode designating section in an instruction of the data processing device of the present invention, and FIG. 28 is a BAT (0: 2) of the data processing device of the present invention. FIG. 29 is a diagram showing a table representing the meaning of signals, FIG. 29 is a schematic diagram showing a configuration of a purge designation register for purging a buffer memory of the data processing device of the present invention, and FIG. 30 is a diagram of the data processing device of the present invention. FIG. 31 is a schematic diagram illustrating an example of a format of a context block, FIG. 31 is a schematic diagram illustrating a configuration of a CSW register that specifies a context block format of the data processing device of the present invention, and FIG. 32 is a context load of the data processing device of the present invention. FIG. 33 is a schematic diagram showing a bit pattern of an instruction, FIG. 33 is a schematic diagram showing a bit pattern of a context instruction of the data processing device of the present invention, and FIG. FIG. 35 is a schematic diagram showing the configuration of a CTXBB register that holds the start address of the context block currently being executed. FIG. 35 shows the configuration of a UATB register that holds the start address of the user address conversion table of the data processing device of the present invention. FIG. 36 is a schematic diagram showing the configuration of the PSW (after the processor state) of the data processing device of the present invention. 3 ... DM field, 112 ... Instruction decoding unit, 117 ...
Integer operation unit, 118... Floating-point operation unit, 120... Operand access unit, 202... Data buffer In each drawing, the same reference numerals indicate the same or corresponding parts.

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】命令をフェッチする命令フェッチ部と、 該命令フェッチ部がフェッチした命令をデコードする命
令デコード部と、 該命令デコード部の出力に従って命令を実行する命令実
行部と、 アドレスデコーダ、タグアドレスを格納するタグアドレ
スメモリ及びデータを格納するデータメモリを備え、第
1のモード又は第2のモードで動作するメモリと、 該メモリの動作モードを規定する第1の値又は第2の値
を保持するメモリ制御情報保持手段と、 前記命令実行部及びメモリ間に接続された内部アドレス
バス及び内部データバスと、 前記命令実行部からの指示を受けてアドレスを生成して
前記メモリへ出力するアドレス生成部と、 前記メモリ制御情報保持手段が第1の値を保持している
場合に、前記アドレス生成部が出力したアドレスを前記
タグアドレスメモリに格納されているタグアドレスと比
較し、そのいずれかと一致したときに前記データメモリ
から対応するデータを前記内部データバスへ出力させる
手段と、 前記メモリ制御情報保持手段が第2の値を保持している
場合に、前記アドレス生成部が出力したアドレスを、命
令によってアクセス可能なメモリ空間の一部として前記
データメモリに割り付けたアドレスと比較し、該アドレ
スの範囲内であるときに、前記アドレス生成部は出力し
たアドレスを前記内部アドレスバスを介して前記データ
メモリへ転送し、前記データメモリから対応するデータ
を前記内部データバスへ出力させ、また転送したアドレ
スに対応する記憶位置に、内部データバスを介して命令
実行部から前記メモリに命令実行部で実行中の命令のオ
ペランドを転送して書き込む手段と を備えることを特徴とするデータ処理装置。
An instruction fetch unit for fetching an instruction, an instruction decode unit for decoding an instruction fetched by the instruction fetch unit, an instruction execution unit for executing an instruction in accordance with an output of the instruction decode unit, an address decoder, and a tag A memory comprising: a tag address memory for storing an address; and a data memory for storing data, the memory operating in a first mode or a second mode; and a first value or a second value defining an operation mode of the memory. Memory control information holding means for holding; an internal address bus and an internal data bus connected between the instruction execution unit and the memory; an address for generating an address in response to an instruction from the instruction execution unit and outputting the address to the memory A generation unit, and an address output by the address generation unit when the memory control information holding unit holds a first value. Is compared with a tag address stored in the tag address memory, and when a match is found with any of the tag addresses, means for outputting corresponding data from the data memory to the internal data bus; When the address output from the address generation unit is compared with the address allocated to the data memory as a part of the memory space accessible by the instruction when the address is within the range of the address, The address generating unit transfers the output address to the data memory via the internal address bus, outputs corresponding data from the data memory to the internal data bus, and stores the data at a storage location corresponding to the transferred address. The operation of the instruction being executed by the instruction execution unit is transferred from the instruction execution unit to the memory via the internal data bus. Means for transferring and writing lands.
【請求項2】命令をフェッチする命令フェッチ部と、 該命令フェッチ部がフェッチした命令をデコードする命
令デコード部と、 該命令デコード部の出力に従って命令を実行する命令実
行部と、 アドレスデコーダ、タグアドレスを格納するタグアドレ
スメモリ及びデータ又は命令コードを格納するデータメ
モリを備え、第1のモード又は第2のモードで動作する
メモリと、 該メモリの動作モードを規定する第1の値又は第2の値
を保持するメモリ制御情報保持手段と、 前記命令実行部及びメモリ間に接続された内部アドレス
バス及び内部データバスと、 前記命令実行部からの指示を受けてアドレスを生成して
前記メモリへ出力するアドレス生成部と、 前記メモリ制御情報保持手段が第1の値を保持している
場合に、前記アドレス生成部が出力したアドレスを前記
タグアドレスメモリに格納されているタグアドレスと比
較し、そのいずれかと一致したときに前記データメモリ
から対応する命令コードを前記命令フェッチ部へ出力さ
せる手段と、 前記メモリ制御情報保持手段が第2の値を保持している
場合に、前記アドレス生成部が出力したアドレスを、命
令によってアクセス可能なメモリ空間の一部として前記
データメモリに割り付けたアドレスと比較し、該アドレ
スの範囲内であるときに、前記アドレス生成部は出力し
たアドレスを前記内部アドレスバスを介して前記データ
メモリへ転送し、前記データメモリから対応するデータ
を前記内部データバスへ出力させ、また転送したアドレ
スに対応する記憶位置に、内部データバスを介して命令
実行部から前記メモリに命令実行部で実行中の命令のオ
ペランドを転送して書き込む手段と を備えることを特徴とするデータ処理装置。
2. An instruction fetch unit for fetching an instruction, an instruction decode unit for decoding an instruction fetched by the instruction fetch unit, an instruction execution unit for executing an instruction according to an output of the instruction decode unit, an address decoder, and a tag A memory including a tag address memory for storing an address and a data memory for storing data or an instruction code, and operating in a first mode or a second mode; and a first value or a second value defining an operation mode of the memory. Memory control information holding means for holding a value of the following; an internal address bus and an internal data bus connected between the instruction execution unit and the memory; an address generated in response to an instruction from the instruction execution unit; An address generation unit for outputting, and the address generation unit outputs when the memory control information holding unit holds the first value. Means for comparing the input address with a tag address stored in the tag address memory, and outputting a corresponding instruction code from the data memory to the instruction fetch unit when any of the addresses matches the tag address, and holding the memory control information. When the means holds the second value, the address output by the address generation unit is compared with an address allocated to the data memory as a part of a memory space accessible by an instruction, and the address range When the address is within, the address generation unit transfers the output address to the data memory via the internal address bus, outputs corresponding data from the data memory to the internal data bus, and At the corresponding storage location, the instruction execution unit transfers the data from the instruction execution unit to the memory via the internal data bus. Means for transferring and writing operands of an instruction being executed.
【請求項3】前記メモリ空間は、システムプログラムが
使用するメモリ空間である請求項1又は2記載のデータ
処理装置。
3. The data processing device according to claim 1, wherein the memory space is a memory space used by a system program.
【請求項4】複数のデータ処理プロセスを時分割で実行
する手段を備え、前記メモリ空間は、前記データ処理プ
ロセスの実行に係るコンテキストを退避させる命令で使
用するメモリ空間である請求項1又は2記載のデータ処
理装置。
4. The data processing apparatus according to claim 1, further comprising means for executing a plurality of data processing processes in a time-division manner, wherein said memory space is a memory space used for an instruction for saving a context related to execution of said data processing process. The data processing device according to claim 1.
JP1326253A 1989-12-16 1989-12-16 Data processing device Expired - Lifetime JP2696578B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1326253A JP2696578B2 (en) 1989-12-16 1989-12-16 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1326253A JP2696578B2 (en) 1989-12-16 1989-12-16 Data processing device

Publications (2)

Publication Number Publication Date
JPH03186935A JPH03186935A (en) 1991-08-14
JP2696578B2 true JP2696578B2 (en) 1998-01-14

Family

ID=18185706

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1326253A Expired - Lifetime JP2696578B2 (en) 1989-12-16 1989-12-16 Data processing device

Country Status (1)

Country Link
JP (1) JP2696578B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0690732B2 (en) * 1987-11-09 1994-11-14 三菱電機株式会社 Microprocessor
JPH0656611B2 (en) * 1988-03-31 1994-07-27 三菱電機株式会社 Vector processor

Also Published As

Publication number Publication date
JPH03186935A (en) 1991-08-14

Similar Documents

Publication Publication Date Title
JP2616182B2 (en) Data processing device
US5652900A (en) Data processor having 2n bits width data bus for context switching function
US5568624A (en) Byte-compare operation for high-performance processor
US5367705A (en) In-register data manipulation using data shift in reduced instruction set processor
US5249286A (en) Selectively locking memory locations within a microprocessor&#39;s on-chip cache
US5717946A (en) Data processor
JPS6339931B2 (en)
JP2581236B2 (en) Data processing device
US5469551A (en) Method and apparatus for eliminating branches using conditional move instructions
JPH1091443A (en) Information processing circuit, microcomputer and electronic equipment
JPH0766324B2 (en) Data processing device
JP2847974B2 (en) Data processing device
KR20000076310A (en) Eight-bit microcontroller having a risc architecture
JPH07120278B2 (en) Data processing device
JP2669158B2 (en) Data processing device
JP2004086837A (en) Data processor
US6757809B1 (en) Data processor having 2n bits width data bus for context switching functions
JP2556182B2 (en) Data processing device
JP3345787B2 (en) Data processing device
JPH04260929A (en) Data processor
JP2668456B2 (en) Bit search circuit and data processing device having the same
JP2504312B2 (en) Priority encoder and data processing device having the same
JP2504235B2 (en) Data processing device
JP2696578B2 (en) Data processing device
JP2646855B2 (en) Data processing device

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070919

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080919

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080919

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090919

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090919

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100919

Year of fee payment: 13

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100919

Year of fee payment: 13