JPH04283833A - Instruction register - Google Patents

Instruction register

Info

Publication number
JPH04283833A
JPH04283833A JP4804491A JP4804491A JPH04283833A JP H04283833 A JPH04283833 A JP H04283833A JP 4804491 A JP4804491 A JP 4804491A JP 4804491 A JP4804491 A JP 4804491A JP H04283833 A JPH04283833 A JP H04283833A
Authority
JP
Japan
Prior art keywords
field
instruction
value
register
instruction code
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
JP4804491A
Other languages
Japanese (ja)
Inventor
Takumi Maruyama
拓巳 丸山
Takahito Noda
敬人 野田
Yuji Kamisaka
裕士 神阪
Kazuyasu Nonomura
一泰 野々村
Toru Watabe
徹 渡部
Takumi Takeno
巧 竹野
Shinya Kato
慎哉 加藤
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4804491A priority Critical patent/JPH04283833A/en
Publication of JPH04283833A publication Critical patent/JPH04283833A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To increase instruction codes which can be specified by providing fields for the same instruction code at different positions according to the field length of a field required for address specification. CONSTITUTION:An instruction is fetched from a memory 27 to an instruction register 28. Then the contents of a register indicated by a source register number field 23 are set in a latch 30 and the value of an immediate value field 25 when the value of an instruction field 21 is not a specific value or the contents of a source register number field 24 when the field is the specific value are set in a latch 31. Then the value of the instruction code field 21 when the value of the instruction code field 21 is not the specific value or the value of an instruction code field 26 when so is decoded by a decoding circuit 37, an arithmetic circuit 32 performs arithmetic, and the result is stored in a latch 33. In this case, the value of the instruction field 26 and the value of the instruction code field 21 are equal, so only one decoding circuit 37 is required. Lastly, the contents of the latch 33 are written in a register indicated by a destination register number field 22.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、固定長命令形式の命令
レジスタに関する。近年のコンピュータシステムの高速
化の要求に伴い、デコード回路の単純化、高速化が容易
な固定長命令形式の命令レジスタを有する計算機が一般
的になりつつある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a fixed-length instruction format instruction register. 2. Description of the Related Art With the recent demand for faster computer systems, computers having fixed-length instruction format instruction registers are becoming more common, making it easier to simplify and speed up decoding circuits.

【0002】したがって、デコードハードを増加するこ
となく、命令コードを増加させることが必要となってい
る。
[0002] Therefore, it is necessary to increase the number of instruction codes without increasing the decoding hardware.

【0003】0003

【従来の技術】従来の固定長命令形式の命令レジスタと
しては、例えば図4に示すようなものがある。ここでは
、命令長は32ビットとし、アドレス指定方式として2
レジスタ+1即値(命令中で直接指定された数値)と、
3レジスタの2通りを持つものとする。
2. Description of the Related Art An example of a conventional fixed-length instruction format instruction register is shown in FIG. Here, the instruction length is 32 bits, and the addressing method is 2.
Register + 1 immediate value (number directly specified in the instruction),
It is assumed that there are two types of 3 registers.

【0004】図4において、1は操作内容を示す命令コ
ードを格納する6ビットのフィールド、2は操作結果が
格納されるレジスタ番号を示すデスティネーションレジ
スタ番号を格納する6ビットのフィールド、3,4は操
作入力用レジスタ番号を示すソースレジスタ番号を格納
する6ビットのフィールド、5は操作入力用値を示す即
値を格納する13ビットのフィールド、6はレジスタま
たは即値の指定を行うフィールド(値が0のとき即値、
値が1のときレジスタ)、7はアドレス指定方式が3レ
ジスタの場合、未使用となるフィールドである。
In FIG. 4, 1 is a 6-bit field that stores an instruction code indicating the content of the operation, 2 is a 6-bit field that stores a destination register number that indicates the register number where the operation result is stored, and 3, 4. is a 6-bit field that stores the source register number that indicates the operation input register number, 5 is the 13-bit field that stores the immediate value that indicates the operation input value, and 6 is the field that specifies the register or immediate value (value is 0). Immediate value when ,
When the value is 1, it is a register), and 7 is an unused field when the addressing method is 3 registers.

【0005】この例では命令コード長が6ビットである
から、2の6乗=64通りの命令コードが指定可能であ
る。次に、前記命令レジスタを用いた適用例を図5に示
す。この例においては、1命令がフェッチ、デコード、
実行、ライトの4ステージで実行される。図5において
、8は命令レジスタであり、メモリ9からフェッチされ
た命令を保持する。10はレジスタファイルであり、レ
ジスタを保持する。
In this example, since the instruction code length is 6 bits, 2 to the 6th power=64 instruction codes can be specified. Next, an application example using the instruction register is shown in FIG. In this example, one instruction involves fetching, decoding,
It is executed in four stages: execution and write. In FIG. 5, 8 is an instruction register that holds instructions fetched from memory 9. In FIG. A register file 10 holds registers.

【0006】11,12は演算回路入力用の各ラッチで
ある。また、13は演算回路、14は演算結果を保持す
るラッチ、15は命令レジスタ8の命令コードをデコー
ドするデコード回路、16はマルチプレクサである。命
令処理は、以下のシーケンスで行われる。まず、メモリ
9から命令を命令レジスタ8にフェッチする。
Numerals 11 and 12 are latches for inputting the arithmetic circuit. Further, 13 is an arithmetic circuit, 14 is a latch that holds the arithmetic result, 15 is a decode circuit that decodes the instruction code of the instruction register 8, and 16 is a multiplexer. Instruction processing is performed in the following sequence. First, an instruction is fetched from the memory 9 into the instruction register 8.

【0007】次に、命令レジスタ8中のフィールド3が
示すレジスタの内容をラッチ11にセットする。同時に
フィールド6が即値を示している場合(値は0)フィー
ルド5の即値を、また、レジスタを示している場合(即
値1)フィールド4の内容をマルチプレクサ16を介し
てラッチ12にセットする。
Next, the contents of the register indicated by field 3 in the instruction register 8 are set in the latch 11. At the same time, if field 6 indicates an immediate value (value is 0), the immediate value of field 5 is set, and if it indicates a register (immediate value 1), the contents of field 4 are set in latch 12 via multiplexer 16.

【0008】次に、命令レジスタ8中のフィールド1の
命令コードをデコード回路15でデコードして、演算を
行い、結果をラッチ14に格納する。最後に、ラッチ1
4の内容を命令レジスタ8のフィールド2が示すレジス
タに書き込む。
Next, the instruction code in field 1 in the instruction register 8 is decoded by the decoding circuit 15, arithmetic operations are performed, and the results are stored in the latch 14. Finally, latch 1
4 is written to the register indicated by field 2 of instruction register 8.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、このよ
うな従来の命令レジスタにあっては、アドレス指定に要
するフィールド長が短い場合に未使用のフィールドが生
じ、指定することができる命令コードを増加することが
できないという問題点があった。本発明は、このような
従来の問題点に鑑みてなされたものであって、指定する
ことができる命令コードを増加することができる命令バ
ッファを提供することを目的としている。
[Problem to be Solved by the Invention] However, in such a conventional instruction register, if the field length required for address specification is short, an unused field occurs, which increases the number of instruction codes that can be specified. The problem was that it could not be done. The present invention has been made in view of such conventional problems, and an object of the present invention is to provide an instruction buffer that can increase the number of instruction codes that can be specified.

【0010】0010

【課題を解決するための手段】図1は本発明の原理説明
図である。本発明は、図1に示すように、複数のアドレ
ス指定方式を持ち、固定長命令形式の命令レジスタ28
において、アドレス指定に要するフィールド22〜25
のフィールド長に応じて同一命令コードのフィールド2
6を異なる位置に設けたものである。
[Means for Solving the Problems] FIG. 1 is a diagram illustrating the principle of the present invention. As shown in FIG.
Fields 22 to 25 required for addressing
Field 2 of the same instruction code according to the field length of
6 are provided at different positions.

【0011】[0011]

【作用】本発明においては、アドレス指定に要するフィ
ールドのフィールド長に応じて同一命令コードのフィー
ルドを異なる位置に設け、未使用フィールドを削減する
ようにしたため、デコードハードを増加することなく、
命令コードのフィールド長を大きくすることができ、指
定することができる命令コードを増加することができる
[Operation] In the present invention, fields of the same instruction code are provided in different positions depending on the field length of the field required for address specification, and unused fields are reduced, so that the decoding hardware can be reduced without increasing the decoding hardware.
The field length of the instruction code can be increased, and the number of instruction codes that can be specified can be increased.

【0012】0012

【実施例】以下、本発明の実施例を図面に基づいて説明
する。図2および図3は本発明の一実施例を示す。この
実施例においては、従来例と同様に、命令長は32ビッ
トとし、アドレス指定方式として、2レジスタ+1即値
(命令中で直接指定された数値)と、3レジスタの2通
りを持つものとする。
Embodiments Hereinafter, embodiments of the present invention will be explained based on the drawings. 2 and 3 show one embodiment of the invention. In this embodiment, as in the conventional example, the instruction length is 32 bits, and there are two addressing methods: 2 registers + 1 immediate value (a numerical value directly specified in the instruction) and 3 registers. .

【0013】図2において、21は操作内容と示す命令
コードを格納する7ビットの命令コードフィールドであ
る。命令コードが特定値(ここではオール1)の場合は
、アドレス指定として3レジスタをとることを示し、特
定値でない場合は、アドレス指定として2レジスタ+1
即値をとることを示す。
In FIG. 2, reference numeral 21 is a 7-bit instruction code field for storing an instruction code indicating the operation content. If the instruction code is a specific value (here, all 1), it indicates that 3 registers are used for address specification, and if it is not a specific value, 2 registers + 1 are used for address specification.
Indicates that it takes an immediate value.

【0014】前者の場合、操作内容は命令コードフィー
ルド26で示すが、このときの値は、後者における命令
コードと同じ値になっている。22は操作結果が格納さ
れるレジスタ番号を示すディティネーションレジスタ番
号を格納する6ビットのデスティネーションレジスタ番
号フィールドである。23,24は操作入力用レジスタ
番号を示すソースレジスタ番号を格納する6ビットのソ
ースレジスタ番号フィールドである。
In the former case, the operation details are indicated in the instruction code field 26, and the value at this time is the same as the instruction code in the latter. 22 is a 6-bit destination register number field that stores a destination register number indicating the register number in which the operation result is stored. Reference numerals 23 and 24 are 6-bit source register number fields that store source register numbers indicating register numbers for operation input.

【0015】25は操作入力用値を示す即値を格納する
13ビットの即値フィールドである。26は操作内容を
示す命令コードを格納する7ビットの命令コードフィー
ルドである。前記命令コードフィールド21の値が特定
値(オール1)のときは、アドレス指定として3レジス
タをとることを示し、このときの操作内容をこの命令コ
ードフィールド26で指定する。
Reference numeral 25 is a 13-bit immediate value field for storing an immediate value indicating a value for operation input. 26 is a 7-bit instruction code field that stores an instruction code indicating the operation content. When the value of the instruction code field 21 is a specific value (all 1), it indicates that three registers are used for address specification, and the operation contents at this time are specified in the instruction code field 26.

【0016】本実施例においては、命令コード長が7ビ
ットであるので、2の7乗−1=127通りの命令コー
ドを指定することができる。次に、前記命令レジスタを
用いた適用例を図3に示す。この例においては、従来例
と同様に、1命令がフェッチ、デコード、実行、ライト
の4ステージで実行されるものとする。
In this embodiment, since the instruction code length is 7 bits, 2 to the 7th power - 1=127 instruction codes can be specified. Next, an application example using the instruction register is shown in FIG. In this example, it is assumed that one instruction is executed in four stages: fetch, decode, execute, and write, similar to the conventional example.

【0017】図3において、27は命令列が格納されて
いるメモリ、28はメモリ27からフェッチされた命令
を保持する前記命令レジスタである。29はレジスタを
保持するレジスタファイル、30,31は演算回路32
に入力するレジスタの内容を保持するラッチ、32はラ
ッチ30,31からのレジスタの内容を演算する演算回
路、33は演算結果を保持するラッチ、34は即値フィ
ールド25の即値またはソースレジスタ番号フィールド
23の内容を選択するマルチプレクサである。
In FIG. 3, 27 is a memory in which an instruction string is stored, and 28 is the instruction register that holds instructions fetched from the memory 27. 29 is a register file that holds registers, 30 and 31 are arithmetic circuits 32
32 is an arithmetic circuit that operates on the register contents from the latches 30 and 31; 33 is a latch that holds the operation result; 34 is the immediate value of the immediate value field 25 or the source register number field 23; This is a multiplexer that selects the contents of .

【0018】35は命令レジスタ28の命令コードフィ
ールド21の内容がすべて1かを判定する判定回路、3
6は命令コードフィールド21の内容または命令コード
フィールド26の内容を選択するマルチプレクサ、37
は選択された命令コードをデコードするデコード回路で
ある。次に、命令処理を説明する。
35 is a determination circuit that determines whether the contents of the instruction code field 21 of the instruction register 28 are all 1;
6 a multiplexer 37 for selecting the contents of the instruction code field 21 or the contents of the instruction code field 26;
is a decoding circuit that decodes the selected instruction code. Next, instruction processing will be explained.

【0019】まず、メモリ27から命令を命令レジスタ
28にフェッチする。次に、命令レジスタ28中のソー
スレジスタ番号フィールド23が示すレジスタの内容を
ラッチ30にセットする。同時に、命令コードフィール
ド21の値が特定値(ここではオール1)でない場合は
命令中の即値フィールド25の即値を、また、特定値の
場合はソースレジスタ番号フィールド24の内容を、ラ
ッチ31にセットする。
First, an instruction is fetched from memory 27 into instruction register 28 . Next, the contents of the register indicated by the source register number field 23 in the instruction register 28 are set in the latch 30. At the same time, if the value of the instruction code field 21 is not a specific value (all 1s here), the immediate value of the immediate value field 25 in the instruction is set to the latch 31, and if it is a specific value, the contents of the source register number field 24 are set to the latch 31. do.

【0020】次に、命令レジスタ28中の命令コードフ
ィールド21の値が特定値でない場合は、命令コードフ
ィールド21の値を、特定値の場合は命令コードフィー
ルド26の値を、デコード回路37でデコードして、演
算回路32で演算を行い、結果をラッチ33に格納する
。この場合、前者の命令コードフィールド26の値と後
者の命令コードフィールド21の値は同一値であるので
、デコード回路37は1つで良い。
Next, if the value of the instruction code field 21 in the instruction register 28 is not a specific value, the value of the instruction code field 21 is decoded by the decoding circuit 37, and if it is a specific value, the value of the instruction code field 26 is decoded by the decoding circuit 37. Then, the arithmetic circuit 32 performs the arithmetic operation, and the result is stored in the latch 33. In this case, since the value of the former instruction code field 26 and the value of the latter instruction code field 21 are the same value, only one decoding circuit 37 is required.

【0021】最後に、ラッチ33の内容を命令レジスタ
28のデスティネーションレジスタ番号フィールド22
が示すレジスタに書き込む。このように、デコードハー
ドを増やすことなく、指定することができる命令コード
を増加することができる。
Finally, the contents of the latch 33 are transferred to the destination register number field 22 of the instruction register 28.
Write to the register indicated by . In this way, the number of instruction codes that can be specified can be increased without increasing the decoding hardware.

【0022】[0022]

【発明の効果】以上説明してきたように、本発明によれ
ば、未使用フィールドを削減し、命令コード長を大きく
することができるので、指定することができる命令コー
ドを増加させることができる。
As described above, according to the present invention, unused fields can be reduced and the instruction code length can be increased, so the number of instruction codes that can be specified can be increased.

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

【図1】本発明の原理説明図[Fig. 1] Diagram explaining the principle of the present invention

【図2】本発明の一実施例を示す図[Fig. 2] A diagram showing an embodiment of the present invention.

【図3】命令レジスタの適用例を示す図[Figure 3] Diagram showing an example of application of the instruction register

【図4】従来例
を示す図
[Figure 4] Diagram showing a conventional example

【図5】従来の命令レジスタの適用例を示す図[Figure 5] Diagram showing an example of application of a conventional instruction register

【符号の説明】[Explanation of symbols]

21:命令コードフィールド 22:デスティネーションレジスタ番号フィールド23
,24:ソースレジスタ番号フィールド25:即値フィ
ールド 26:命令コードフィールド 27:メモリ 28:命令レジスタ 29:レジスタファイル 30,31,33:ラッチ 32:演算回路 34,36:マルチプレクサ 35:判定回路 37:デコード回路
21: Instruction code field 22: Destination register number field 23
, 24: Source register number field 25: Immediate value field 26: Instruction code field 27: Memory 28: Instruction register 29: Register file 30, 31, 33: Latch 32: Arithmetic circuit 34, 36: Multiplexer 35: Judgment circuit 37: Decode circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数のアドレス指定方式を持ち、固定長命
令形式の命令レジスタ(28)において、アドレス指定
に要するフィールド(22〜25)のフィールド長に応
じて同一命令コードのフィールド(26)を異なる位置
に設けたことを特徴とする命令レジスタ。
Claim 1: In an instruction register (28) having multiple addressing methods and having a fixed length instruction format, a field (26) of the same instruction code is assigned according to the field length of the fields (22 to 25) required for address specification. An instruction register characterized by being provided at different positions.
JP4804491A 1991-03-13 1991-03-13 Instruction register Pending JPH04283833A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4804491A JPH04283833A (en) 1991-03-13 1991-03-13 Instruction register

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4804491A JPH04283833A (en) 1991-03-13 1991-03-13 Instruction register

Publications (1)

Publication Number Publication Date
JPH04283833A true JPH04283833A (en) 1992-10-08

Family

ID=12792325

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4804491A Pending JPH04283833A (en) 1991-03-13 1991-03-13 Instruction register

Country Status (1)

Country Link
JP (1) JPH04283833A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS547725U (en) * 1977-06-16 1979-01-19
JPS62297940A (en) * 1986-06-18 1987-12-25 Hitachi Ltd Data processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS547725U (en) * 1977-06-16 1979-01-19
JPS62297940A (en) * 1986-06-18 1987-12-25 Hitachi Ltd Data processor

Similar Documents

Publication Publication Date Title
US6223277B1 (en) Data processing circuit with packed data structure capability
JP3592230B2 (en) Data processing device
JP3649470B2 (en) Data processing device
EP0415461B1 (en) Central processing unit supporting variable length instructions
KR100267098B1 (en) Vector processor design to reduce register file read ports
JPH09512652A (en) Data processing with multiple instruction sets
EP1241567B1 (en) Method and apparatus for executing coprocessor instructions
US7546442B1 (en) Fixed length memory to memory arithmetic and architecture for direct memory access using fixed length instructions
US20190250920A1 (en) Parsing-enhancement facility
JPH05150979A (en) Immediate operand expansion system
KR100308512B1 (en) Specialized millicode instruction for editing functions
US4812971A (en) Central processing unit for a digital computer
US6332188B1 (en) Digital signal processor with bit FIFO
KR100322726B1 (en) Specialized millicode instruction for translate and test
KR100317769B1 (en) Specialized millicode instructions for packed decimal division
US4893235A (en) Central processing unit for a digital computer
KR100322725B1 (en) Millicode flags with specialized update and branch instruction
US20040024992A1 (en) Decoding method for a multi-length-mode instruction set
US20030041229A1 (en) Shift processing unit
JPH04283833A (en) Instruction register
US20030005269A1 (en) Multi-precision barrel shifting
JP2002229776A (en) Data processor for executing multiple sets of instructions
JPH08263289A (en) Pipeline computer for plural instruction flows
JP2000112754A (en) Data processor
JP2003233496A (en) Microprocessor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19961203