JPH03194621A - Data processor - Google Patents

Data processor

Info

Publication number
JPH03194621A
JPH03194621A JP1332726A JP33272689A JPH03194621A JP H03194621 A JPH03194621 A JP H03194621A JP 1332726 A JP1332726 A JP 1332726A JP 33272689 A JP33272689 A JP 33272689A JP H03194621 A JPH03194621 A JP H03194621A
Authority
JP
Japan
Prior art keywords
instruction
field
bit
incorporated
immediate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1332726A
Other languages
Japanese (ja)
Inventor
Kenji Miyazaki
健司 宮崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP1332726A priority Critical patent/JPH03194621A/en
Publication of JPH03194621A publication Critical patent/JPH03194621A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To freely set the address designation value and immediate data of an arbitrary length without enlarging an instruction decoder by giving an instruction with a bit field showing continuity with the other instruction code in an instruction code. CONSTITUTION:The instruction code consists of an operation code field OP in which an operation code is incorporated the bit field C showing the continuity of the instruction and a designation field DI in which a displacement value or immediate data is incorporated. When the displacement value and immediate data are small and they are incorporated in the designation field D, the bit field C is set to zero. When they are unable to be incorporated in the designation field, the bit field C is set to '1', high-order 16 bits of the displacement value and immediate data are incorporated in the designation field DI. Then, the bit field is set to '0' by the subsequent instruction and low-order 16 bits are incorporated in the designation field.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、プログラム制御技術さらにはコンピュータも
しくはマイクロプロセッサの命令フォーマットさらには
命令体系の構成方法に適用して特に有効な技術に関し、
例えばRISC型プロセッサの命令形式に利用して有効
な技術に関する。
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a technique that is particularly effective when applied to program control techniques, instruction formats for computers or microprocessors, and methods for configuring instruction systems.
For example, it relates to a technique that is effective when used in the instruction format of a RISC type processor.

[従来の技術] 近年、従来の複雑な命令体系を持つCl5C型プロセツ
サに対し、簡単な命令しかハードウェアでサポートしな
いRISC型プロセッサが提案されている。
[Prior Art] In recent years, a RISC type processor that supports only simple instructions by hardware has been proposed, in contrast to the conventional Cl5C type processor which has a complicated instruction system.

従来提案されているRISC型プロセッサは、一般に3
2ビット固定長命令形式を採用している(Cypres
s  Semlconductor社、RISCFam
ily  Users  Guide (1988)p
p2−18〜2−20)。
Conventionally proposed RISC processors generally have 3
Adopts a 2-bit fixed length instruction format (Cypres
s Semlconductor, RISCFam
ily Users Guide (1988) p.
p2-18 to 2-20).

[発明が解決しようとする課題] 32ビット固定長命令形式のプロセッサの場合、扱われ
るデータはもちろんアドレスも32ビツト長である。し
かるに、命令コード中には、少なくとも数ビットのオペ
レーションコードの入るフィールドを必要とするため、
固定長命令形式のRISCプロセッサでは、32ビツト
の即値セット命令や32ビツトの分岐先アドレスを持つ
分岐命令を一命令では表現できないという問題点があっ
た。
[Problems to be Solved by the Invention] In the case of a processor with a 32-bit fixed-length instruction format, not only data but also addresses handled are 32-bits long. However, since the instruction code requires a field containing at least several bits of operation code,
A RISC processor with a fixed-length instruction format has a problem in that a 32-bit immediate value set instruction or a branch instruction with a 32-bit branch destination address cannot be expressed in one instruction.

このため、従来の5PARCチツプのようなRISCプ
ロセッサではサブルーチン呼び出し命令(Call命令
)の分岐先アドレスは30ビツトに、条件分岐命令(B
 r a n c h命令)の分岐先アドレスは22ビ
ツトに、また即値セット命令の即値データは2つに分け
て、Set  Hi全命令上位22ビツトを入れ、Lo
ad  lmm1diate命令に下位13ビツトを入
れて即値データのセットを行う形成としている。
Therefore, in a RISC processor such as the conventional 5PARC chip, the branch destination address of a subroutine call instruction (Call instruction) is 30 bits, and the branch destination address of a conditional branch instruction (B
The branch destination address of the RANCH instruction is 22 bits, and the immediate value data of the immediate value set instruction is divided into two parts.
The lower 13 bits are entered in the ad lmm1diate command to set immediate value data.

このように従来の固定長命令形式のRISCプロセッサ
では、分岐命令やサブル−チ呼び出し命令において自由
に分岐先アドレスを設定できないとともに即値セットに
は2種類の命令を使用しなくてはならない。そのため、
命令デコーダも複雑になるという問題点があった。
As described above, in the conventional fixed-length instruction format RISC processor, a branch destination address cannot be freely set in a branch instruction or a subroutine call instruction, and two types of instructions must be used for immediate value sets. Therefore,
There was a problem in that the instruction decoder was also complicated.

本発明の目的は、固定長命令形式のRISCプロセッサ
において、命令デコーダの規模を増大させることなく任
意の長さのアドレス指定値(変位量)や即値データを一
種類の命令のみで自由に設定できるようにすることにあ
る。
An object of the present invention is to enable a fixed-length instruction format RISC processor to freely set an address specification value (displacement amount) or immediate value data of any length using only one type of instruction without increasing the scale of the instruction decoder. The purpose is to do so.

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

[課題を解決するための手段] 本願において開示される発明のうち代表的なものの概要
を説明すれば、下記のとおりである。
[Means for Solving the Problems] Representative inventions disclosed in this application will be summarized as follows.

すなわち、固定長命令形式のプロセッサにおいて、分岐
命令やサブルーチン呼び出し命令、即値セット命令等ア
ドレスや即値データをセットする命令内に、連続する複
数の命令をまとめて一つの命令として扱うことを指定す
るビットフィールドを設け、プロセッサにはこのビット
フィールドの内容に基づいてマルチプレクサ等を制御し
て命令中のビット列をプログラムカウンタおよび汎用レ
ジスタに接続されたプリバッファレジスタの上位または
下位にセットさせるようにした。
In other words, in fixed-length instruction format processors, there is a bit in an instruction that sets an address or immediate data, such as a branch instruction, subroutine call instruction, or immediate value set instruction, that specifies that multiple consecutive instructions are treated as a single instruction. A field is provided, and the processor controls a multiplexer or the like based on the contents of this bit field to set the bit string in the instruction in the upper or lower part of the pre-buffer register connected to the program counter and the general-purpose register.

[作用] 上記した手段によれば、1命令中に入りきらないような
分岐アドレスや即値データは2つに分割して2つの同一
種類の命令中に入れ、連続性を示すビットフィールドを
セットしておくことで、同一種類の命令のみによって、
任意の長さのアドレスや即値データを自由に設定するこ
とができるようになるとともに、命令デコーダも変更す
る必要がない。
[Operation] According to the above-mentioned means, branch addresses and immediate data that cannot fit into one instruction are divided into two and placed into two instructions of the same type, and a bit field indicating continuity is set. By keeping the commands of the same type,
Addresses and immediate data of arbitrary length can be freely set, and there is no need to change the instruction decoder.

[実施例] 第1図には、本発明に係る固定長命令形式のRISCプ
ロセッサの命令形式の一例が示されている。
[Embodiment] FIG. 1 shows an example of an instruction format of a fixed-length instruction format RISC processor according to the present invention.

すなわち、この実施例の命令は、オペレーションコード
の入るオペコードフィールドOPと、命令の連続性を示
すビットフィールドC(以下、Cビットと称する)と、
ディスプレースメントもしくは即値データ(イミーディ
エイト値)の入る指定フィールドDIとにより構成され
ている。
That is, the instruction of this embodiment includes an operation code field OP in which an operation code is entered, a bit field C (hereinafter referred to as C bit) indicating continuity of the instruction,
It is composed of a designated field DI into which displacement or immediate value data (immediate value) is entered.

オペコードフィールドOPの長さは、プロセッサに用意
される命令の数等によって変わる。また、オペコードフ
ィールドOPにはディスティネーションとなるレジスタ
の番号や条件付命令における設定条件が入ることもある
The length of the opcode field OP varies depending on the number of instructions prepared for the processor, etc. Further, the operation code field OP may contain the number of a register serving as a destination and the setting conditions of a conditional instruction.

次に、上記形式の命令を解読し実行するプロセッサの構
成例を第2図を用いて説明する。
Next, an example of the configuration of a processor that decodes and executes instructions in the above format will be described with reference to FIG.

第2図において、lはデータバスを介してプログラムメ
モリから命令がフェッチされる命令レジスタ、2は命令
レジスタlにフェッチされた命令を解読して実行ユニッ
ト3内の演算論理ユニットALUやレジスタ群REGに
対する制御信号を形成する命令デコーダである。
In FIG. 2, l is an instruction register from which instructions are fetched from the program memory via a data bus, and 2 is an arithmetic logic unit ALU and a register group REG in an execution unit 3 that decodes the instructions fetched into the instruction register l. An instruction decoder that forms control signals for the

また、4は命令フェッチアドレスの入るプログラムカウ
ンタ、5は外部データバスと実行ユニット3との間でデ
ータのやりとりを行う際にデータを一時的に保持するデ
ータバッファである。
Further, 4 is a program counter into which an instruction fetch address is entered, and 5 is a data buffer that temporarily holds data when data is exchanged between the external data bus and the execution unit 3.

この実施例では、命令レジスタlにフェッチされた命令
コードの指定フィールドDI内のディスプレースメント
値またはイミーディエイト値を一時的に保持可能なプリ
バッファレジスタ6と、マルチプレクサ7とが命令レジ
スタlとプログラムカウンタ4および実行ユニット3と
の間に設けられている。プリバッファレジスタ6は、指
定フィールドDIの2倍(例えば32ビツト)の幅を持
ち、セットされたディスプレースメント値をプログラム
カウンタ4へ、またイミーデイエイト値を実行ユニット
3内のレジスタへ転送できるように構成されている。さ
らに、マルチプレクサ7は、命令コード内のCビットの
内容に応じて上記指定フィールドDI内の値を、Cビッ
トが[l」のときはプリバッファレジスタ6の上位側に
、またCビットが「0」のときはプリバッファレジスタ
6の下位側に供給するように構成されている。
In this embodiment, a pre-buffer register 6 that can temporarily hold the displacement value or immediate value in the specified field DI of the instruction code fetched into the instruction register l, and a multiplexer 7 are connected to the instruction register l and the program. It is provided between the counter 4 and the execution unit 3. The pre-buffer register 6 has a width twice (for example, 32 bits) as the designated field DI, and is designed to transfer the set displacement value to the program counter 4 and the immediate value to the register in the execution unit 3. It is composed of Further, the multiplexer 7 transfers the value in the specified field DI according to the contents of the C bit in the instruction code to the upper side of the pre-buffer register 6 when the C bit is [l], and to the upper side of the pre-buffer register 6 when the C bit is [0]. ”, the configuration is such that the signal is supplied to the lower side of the pre-buffer register 6.

従って、ディスプレースメント値やイミーデイエイト値
のビット数が小さく、命令中の指定フィールドDIに一
度に入るような長さの場合には、Cビットが「OJの命
令を用いる。一方、ディスプレースメント値やイミーデ
イエイト値のビット数が大きく、1命令中の指定フィー
ルドDIに入りきらない長さの場合には、先ずCビット
がrlJの命令を用いてその指定フィールドDI中にデ
イスプレースメント値やイミーディエイト値の上位16
ビツトを入れ、続いて同一種類の命令でCビットのみr
OJの命令を用いその指定フィールドDI中にディスプ
レースメント値やイミーディエイト値の下位16ビツト
を入れてやるようにする。
Therefore, if the number of bits in the displacement value or immediate eight value is small and the length is such that it can be entered in the designated field DI in the instruction at once, the C bit is set to "Use the OJ instruction. On the other hand, the displacement value If the number of bits in the or immediate value is too large to fit in the specified field DI in one instruction, first use an instruction with the C bit rlJ to write the displacement value or immediate value in the specified field DI. Top 16 immediate values
bit, and then use the same type of instruction to input only the C bit.
Using the OJ command, the lower 16 bits of the displacement value and immediate value are placed in the designated field DI.

このようにすれば、32ビツトの命令と16ビツトの命
令のフォーマットを統一することができ、デコーダの構
成が複雑になることもない。
In this way, the formats of 32-bit instructions and 16-bit instructions can be unified, and the structure of the decoder does not become complicated.

なお、上記実施例では、プリバッファレジスタ6の長さ
が命令中の指定フィールドDIのビット数の2倍である
場合について説明したが、プリバッファレジスタ6を指
定フィールドの4倍の長さにしておくこともできる。そ
の場合、例えばディスプレースメント値またはイミーデ
ィエイト値が続いている間はCビットが「lJの命令を
用い、最下位側(もしくは最上位側)の値を入れるとき
にCビットが「0」の同一命令を用いるようにすればよ
い。
In the above embodiment, the length of the pre-buffer register 6 is twice the number of bits of the specified field DI in the instruction, but it is also possible to make the pre-buffer register 6 four times as long as the specified field. You can also leave it there. In that case, for example, while the displacement value or immediate value continues, the C bit is "0" when using the "lJ" instruction and inputting the lowest (or highest) value. It is sufficient to use the same command.

さらに、プリバッファレジスタ6の長さが命令コード中
の指定フィールドDIの3倍以上あるときは、Cビット
を2ビット以上設けておくようにしてもよい。その場合
、Cビットを命令デコーダ2でデコーダした信号でマル
チプレクサ7を制御して上から順番にディスプレースメ
ント値もしくはイミーディエイト値をプリバッファレジ
スタ6へ入れていくようにするとよい。
Furthermore, when the length of the pre-buffer register 6 is three times or more the designated field DI in the instruction code, two or more C bits may be provided. In that case, it is preferable to control the multiplexer 7 with a signal obtained by decoding the C bit by the instruction decoder 2 so as to input the displacement value or immediate value into the pre-buffer register 6 in order from the top.

また、上記実施例では、ディスプレースメント付きの命
令や即値セット命令を例にとって説明したがディスプレ
ースメントや即値データの他に、間接アドレッシング命
令や直接アドレッシング命令において、命令中(指定フ
ィールドDI)にアドレス値やレジスタ番号を入れる場
合にも適用することができる。
In addition, in the above embodiment, instructions with displacement and immediate value set instructions were explained as examples, but in addition to displacement and immediate value data, in indirect addressing instructions and direct addressing instructions, an address value is stored in the instruction (designated field DI). It can also be applied to inputting register numbers.

さらに、命令コードは32ビツト固定長に限定されず、
16ビツトであってもよい。その場合、指定フィールド
DIの大きさは半分の8ビット程度になる。
Furthermore, the instruction code is not limited to a fixed length of 32 bits,
It may be 16 bits. In that case, the size of the designated field DI will be about half, about 8 bits.

以上説明したように上記実施例は、固定長命令形式のプ
ロセッサにおいて、分岐命令やサブルーチン呼び出し命
令、即値セット命令等アドレスや即値データをセットす
る命令中に、連続する複数の命令をまとめて一つの命令
として扱うことを指定するビットフィールドを設け、プ
ロセッサにはこのビットフィールドの内容に基づいてマ
ルチプレクサ等を制御して命令コード内のビット列を、
プログラムカウンタおよび汎用レジスタに接続されたプ
リバッファレジスタの上位または下位にセットさせるよ
うにしたので、l命令中に入りきらないような分岐アド
レスや即値データは2つに分割して2つの同一種類の命
令に入れて、連続性を示すビットフィールドをセットし
ておくことで、同一種類の命令のみで任意の長さのアド
レスや即値データを自由に設定することができるように
なるとともに、命令デコーダも変更する必要がないとい
う効果がある。
As explained above, in the fixed-length instruction format processor, the above embodiment combines multiple consecutive instructions into a single instruction in an instruction that sets an address or immediate data, such as a branch instruction, subroutine call instruction, or immediate value set instruction. A bit field is provided that specifies that it should be treated as an instruction, and the processor controls a multiplexer etc. based on the contents of this bit field to convert the bit string in the instruction code,
Since it is set in the upper or lower part of the pre-buffer register connected to the program counter and general-purpose registers, branch addresses and immediate data that cannot fit into an instruction can be divided into two and stored in two identical types. By putting it in an instruction and setting a bit field that indicates continuity, you can freely set addresses and immediate data of any length using only instructions of the same type, and the instruction decoder also This has the effect that there is no need to change it.

以上本発明者によってなされた発明を実施例に基づき具
体的に説明したが、本発明は上記実施例に限定されるも
のではなく、その要旨を逸脱しない範囲で種々変更可能
であることはいうまでもない。プリバッファを介してプ
ログラムカウンタや汎用レジスタにディスプレースメン
ト値やイミーディエイト値を入れているが、プリバッフ
ァを省略して、直接プログラムカウンタや汎用レジスタ
の上位または下位に指定して入れるようにしてもよい。
Although the invention made by the present inventor has been specifically explained above based on Examples, it goes without saying that the present invention is not limited to the above Examples and can be modified in various ways without departing from the gist thereof. Nor. Displacement values and immediate values are stored in the program counter and general-purpose registers via a pre-buffer, but the pre-buffer is omitted and they are directly specified and stored in the upper or lower part of the program counter or general-purpose register. Good too.

以上の説明では主として本発明者によってなされた発明
をその背景となった利用分野である固定長命令形式のR
ISC型プロセッサに適用したものについて説明したが
、この発明はそれに限定されるものでなく、Cl5C型
プロセツサその化プログラム制御方式のコンピュータ一
般に利用することができる。
The above explanation will mainly focus on the fixed-length instruction format R
Although the present invention has been described as being applied to an ISC type processor, the present invention is not limited thereto, and can be used in general program control type computers such as a C15C type processor.

[発明の効果] 本願において開示される発明のうち代表的なものによっ
て得られる効果を簡単に説明すれば下記のとおりである
[Effects of the Invention] The effects obtained by typical inventions disclosed in this application are briefly explained below.

すなわち、固定長命令形式のRISCプロセッサにおい
て、命令デコーダの規模を増大させることなく任意の長
さのアドレス指定値(変位量)や即値データを一種類の
命令のみで自由に設定できるようになる。
That is, in a fixed-length instruction format RISC processor, address designation values (displacement amounts) and immediate data of any length can be freely set using only one type of instruction without increasing the scale of the instruction decoder.

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

第1図は本発明に係る固定長命令形式のRISCプロセ
ッサの命令形式の一例を示すフォーマット構成図、 第2図は本発明に係る固定長命令形式のRISCプロセ
ッサの一実施例を示すブロック図である。 1・・・・命令レジスタ、2・・・・命令デコーダ、3
・・・・実行ユニット、7・・・・マルチプレクサ(転
送切換手段)。
FIG. 1 is a format configuration diagram showing an example of the instruction format of a fixed-length instruction format RISC processor according to the present invention, and FIG. 2 is a block diagram showing an embodiment of the fixed-length instruction format RISC processor according to the present invention. be. 1...Instruction register, 2...Instruction decoder, 3
...Execution unit, 7...Multiplexer (transfer switching means).

Claims (1)

【特許請求の範囲】 1、固定長命令形式のデータ処理装置であって、命令コ
ード中に他の命令コードとの連続性を示すビットフィー
ルドを有する命令を持つことを特徴とするデータ処理装
置。 2、上記命令コードは、上記ビットフィードと、オペレ
ーションコードの入るフィールドと、アドレス変位量も
しくは即値データの入る指定フィールドとから構成され
ていることを特徴とする請求項1記載のデータ処理装置
。 3、上記ビットフィールドの内容に応じて上記指定フィ
ールド内のビット列を、転送先レジスタの所定の位置に
転送する転送切換手段を備えることを特徴とする請求項
2記載のデータ処理装置。
[Scope of Claims] 1. A data processing device in a fixed-length instruction format, characterized in that the instruction code has an instruction having a bit field indicating continuity with other instruction codes. 2. The data processing device according to claim 1, wherein the instruction code is composed of the bit feed, a field containing an operation code, and a designation field containing address displacement amount or immediate value data. 3. The data processing apparatus according to claim 2, further comprising transfer switching means for transferring the bit string in the designated field to a predetermined position in a transfer destination register according to the contents of the bit field.
JP1332726A 1989-12-25 1989-12-25 Data processor Pending JPH03194621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1332726A JPH03194621A (en) 1989-12-25 1989-12-25 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1332726A JPH03194621A (en) 1989-12-25 1989-12-25 Data processor

Publications (1)

Publication Number Publication Date
JPH03194621A true JPH03194621A (en) 1991-08-26

Family

ID=18258180

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1332726A Pending JPH03194621A (en) 1989-12-25 1989-12-25 Data processor

Country Status (1)

Country Link
JP (1) JPH03194621A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007088819A1 (en) * 2006-02-03 2007-08-09 Matsushita Electric Industrial Co., Ltd. Processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007088819A1 (en) * 2006-02-03 2007-08-09 Matsushita Electric Industrial Co., Ltd. Processor

Similar Documents

Publication Publication Date Title
US4839797A (en) Microprocessor compatible with any software represented by different types of instruction formats
US4266270A (en) Microprocessor having plural internal data buses
JPS6339931B2 (en)
JP4226085B2 (en) Microprocessor and multiprocessor system
US4347566A (en) Data processor with register file and arithmetic logic circuit on one chip and register means directly connected to the chip
GB1321851A (en) Multi-mode process control computer with bit processing
JPH0546383A (en) Data processor
US6542989B2 (en) Single instruction having op code and stack control field
WO1996008769A1 (en) Computer instruction prefetch system
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
US5867696A (en) Saving a program counter value as the return address in an arbitrary general purpose register
EP0240606B1 (en) Pipe-line processing system and microprocessor using the system
US5499363A (en) Microprocessor coupled to coprocessor by coprocessor bus separate from system bus to external memory for increased efficiency
JPH03194621A (en) Data processor
US6564312B1 (en) Data processor comprising an arithmetic logic unit
US6012128A (en) Microcontroller having a page address mode
JPS6217773B2 (en)
JPH0377137A (en) Information processor
US5649229A (en) Pipeline data processor with arithmetic/logic unit capable of performing different kinds of calculations in a pipeline stage
WO1996008767A2 (en) Microcontroller system with a multiple-register stacking instruction
GB2007887A (en) Central processor unit for executing instruction of variable length
JPS59218569A (en) Microcomputer
JPH02252044A (en) Coprocessor and data transfer control system
JP2696578B2 (en) Data processing device
JPS6298443A (en) Data processor