JPS63244227A - Arithmetic unit - Google Patents

Arithmetic unit

Info

Publication number
JPS63244227A
JPS63244227A JP62077862A JP7786287A JPS63244227A JP S63244227 A JPS63244227 A JP S63244227A JP 62077862 A JP62077862 A JP 62077862A JP 7786287 A JP7786287 A JP 7786287A JP S63244227 A JPS63244227 A JP S63244227A
Authority
JP
Japan
Prior art keywords
data
word
register
register file
shifter
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
JP62077862A
Other languages
Japanese (ja)
Inventor
Shoji Tashiro
田代 章二
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP62077862A priority Critical patent/JPS63244227A/en
Publication of JPS63244227A publication Critical patent/JPS63244227A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To eliminate need for providing an exclusive register in a byte shifter, by providing a shifter for coupling and shifting the data outputted from two pieces of read-out ports of a register file and outputting them as data of one word. CONSTITUTION:The data in a main storage device is loaded as it is to register files 11, 12, and data are fetched from outputs of shifters 21, 22 to be calculated by a computing element 25, and its result is stored in a word designated by an address A of the register file 12. When addresses which are set to registers 13, 14 are increased by every +1 word and are processed repeatedly, the result of calculation is obtained in the register file 12. In such a way, the shifters 21, 22 couple the data which are outputted from two pieces of read-out ports of the register files 11, 12 and output them as a data of one word, therefore, even in case of loading the data to the register files 11, 12, it is unnecessary to execute a byte alignment by using a byte shifter.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、コンピュータシステムにおける演算装置に関
する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to an arithmetic device in a computer system.

(従来の技術) 一般にコンピュータシステムにおいて、主記憶装置に格
納されているデータ間の演算を行なう場合樟は、例えば
第4図に示したように、主記憶装置1からリードしたそ
れぞれのデータをバイトシフタ2を用いて位置合せし、
レジスタファイル3とレジスタファイル4とにロードし
てALU(演算器)5に演算を行なっている。
(Prior Art) In general, in a computer system, when performing an operation between data stored in the main memory device, it is necessary to convert each data read from the main memory device 1 into a byte shifter, as shown in FIG. 4, for example. Align using 2,
The data is loaded into a register file 3 and a register file 4, and an arithmetic unit (ALU) 5 performs calculations.

例えば1ワードが4バイトの場合には、第5図に示した
ようにバイトシフタSFはリードデータRD (Go−
31)を入力し、レジスタファイルRWD(Go−31
)において1段LSB側に隣接して格納されている1ワ
ードと接続し、データのアドレスに基いてシフトさせ、
1ワードのデータを出力する。
For example, when one word is 4 bytes, the byte shifter SF is used as the read data RD (Go-
31) and register file RWD (Go-31
) is connected to one word stored adjacently on the LSB side of the first stage, and shifted based on the data address,
Outputs 1 word of data.

また1ワード(4バイト)のデータを主記憶装f1から
読出し、バイトシフタ2によりバイト位置合せする場合
には、第6図に示したように、主記憶装置内のデータD
が1ワードエリアW内に入っているときには、リードデ
ータをシフトさせず、そのままレジスタファイルにロー
ドする。
In addition, when reading one word (4 bytes) of data from the main memory f1 and aligning the byte byte shifter 2, as shown in FIG.
When the read data is within the 1-word area W, the read data is not shifted and is loaded into the register file as it is.

ここで第7図に示したように、データDが隣接する2つ
の1ワ一ドエリアw、、w2に跨っている場合には、第
8図に示したようにまずレジスタファイルRWDにおい
て1段LSB側に隣接して格納されているLSB側の1
ワードをリードしくステップA)、バイトシフタ内のレ
ジスタに格納しくステップB)、次の1ワードをリード
しくステップC)、これら2ワードを接続して1ワード
のデータを作成し、レジスタファイルにロードしなけれ
ばならない(ステップD)。
Here, as shown in FIG. 7, if data D spans two adjacent 1-word areas w, , w2, first, as shown in FIG. 1 on the LSB side stored adjacent to the side
Step A) to read a word, step B) to store it in a register in the byte shifter, step C) to read the next word, connect these two words to create one word of data, and load it into the register file. (Step D).

(発明が解決しようとする問題点) ところで従来の演算装置では、前記1段LSB側の1ワ
ードを格納するために専用のレジスタを設けておくが必
要である。またデータと主記憶装置のワードエリアとの
関係により、主記憶装置からレジスタファイルへデータ
をロードする場合に2種類の処理を行なう必要がある。
(Problems to be Solved by the Invention) In the conventional arithmetic device, it is necessary to provide a dedicated register in order to store one word on the LSB side of the first stage. Furthermore, depending on the relationship between the data and the word area of the main memory, two types of processing must be performed when loading data from the main memory to the register file.

すなわちデータが隣接するワードエリアに跨る場合、そ
のデータを一旦、バイトシフタ内のレジスタにロードし
なければならないので、データがワード境界に跨ってい
ない場合よりも処理ステップが多くなってしまうのであ
る。
That is, when data spans adjacent word areas, the data must be loaded into a register within the byte shifter, resulting in more processing steps than when the data does not span word boundaries.

本発明はこのような事情によりなされたもので、バイト
シフタ内に専用のレジスタを設けておく必要がなく、ま
たデータがワード境界に跨る場合でも処理ステップ数が
多くならない演算装置の提供を目的としている。
The present invention was made under these circumstances, and aims to provide an arithmetic device that does not require a dedicated register in the byte shifter and does not require an increase in the number of processing steps even when data crosses word boundaries. .

[発明の構成コ (問題点を解決するための手段) 本発明の演算装置は、2個の読出し用ポートを有するレ
ジスタファイルと、このレジスタファイルの一方のポー
トの読出しアドレスを設定するレジスタと、この読出し
アドレスに所定値を加算し前記レジスタファイルの他方
のポートの読出しアドレスを設定するする加算器と、前
記レジスタファイルの2個の読出しポートから出力され
たデータを結合してシフトさせ1ワードのデータとして
出力するシフタと、このシフタにおけるシフト数を指定
するレジスタとを備えたものである。
[Configuration of the Invention (Means for Solving Problems)] The arithmetic device of the present invention includes a register file having two read ports, a register for setting a read address of one port of the register file, An adder adds a predetermined value to this read address to set the read address of the other port of the register file, and combines and shifts the data output from the two read ports of the register file to form one word. It includes a shifter that outputs data and a register that specifies the number of shifts in this shifter.

(作 用) 本発明の演算装置では、前記レジスタファイルが2個の
読出しポートを備え、前記シフタが前記レジスタファイ
ルの2個の読出レポートから出力されたデータを結合し
1ワードのデータとして出力するので、前記レジスタフ
ァイルにデータをロードする場合でもバイトシフタを用
いてバイト位置合せを行なう必要が無い、またデータが
隣接するワードエリアに跨っている場合でも、バイトシ
フタ内の専用レジスタにデータをロードする必要が無い
(Function) In the arithmetic device of the present invention, the register file includes two read ports, and the shifter combines data output from two read reports of the register file and outputs the combined data as one word of data. Therefore, even when loading data into the register file, there is no need to perform byte alignment using a byte shifter, and even when data spans adjacent word areas, there is no need to load data into a dedicated register within the byte shifter. There is no

(実施例) 以下、本発明の実施例の詳細を図面に基づいて説明する
(Example) Hereinafter, details of an example of the present invention will be described based on the drawings.

第1図は本発明の一実施例の構成を示す図である。FIG. 1 is a diagram showing the configuration of an embodiment of the present invention.

同図において11.12は主記憶装置から読出したデー
タを格納するためのレジスタファイルであり、それぞれ
Aで指定したアドレスのワードを出力するポートと、B
で指定したアドレスのワードを出力するポートとを備え
、書込みはAで指定したアドレスのワードに行なうよう
にされている。
In the figure, 11 and 12 are register files for storing data read from the main memory, and a port outputs a word at the address specified by A, and a port B
A port for outputting the word at the address specified by A is provided, and writing is performed to the word at the address specified by A.

13.14はレジスタファイル11.12のアドレスA
を設定するためのレジスタ、15.16はレジスタ13
.14に格納されているアドレスAに+1を加算して、
レジスタファイル11.12のアドレスBを作成するた
めのALUである。
13.14 is address A of register file 11.12
register for setting, 15.16 is register 13
.. Add +1 to address A stored in 14,
This is an ALU for creating address B of register files 11.12.

また17はレジスタファイル11.12のアドレスAで
指定されるワードから出力されたデータ、18はレジス
タファイル11のアドレスBで指定されるワードから出
力されたデータである。
Further, 17 is data output from the word specified by address A of the register file 11.12, and 18 is data output from the word specified by address B of the register file 11.

同様に19はレジスタファイル12のアドレスAで指定
されるワードから出力されたデータ、20はレジスタフ
ァイル12のアドレスBで指定されるワードから出力さ
れたデータである。
Similarly, 19 is data output from the word specified by address A of the register file 12, and 20 is data output from the word specified by address B of the register file 12.

21.22はレジスタファイル11.12の2個の読出
しポートのそれぞれから出力されたデータを結合してシ
フトさせ、1ワードのデータを出力するシフタ、23.
24はシフタ21.22のシフト数を決定するレジスタ
である。
21.22 is a shifter that combines and shifts the data output from each of the two read ports of the register file 11.12, and outputs one word of data; 23.22;
A register 24 determines the number of shifts of the shifters 21 and 22.

そして25はシフタ21.22から出力されるデータの
演算を行うALUである。
And 25 is an ALU that performs calculations on the data output from the shifters 21 and 22.

1ワードが4バイト、主記憶装置のデータのアドレス指
定をLSBとした場合について説明する。
A case will be explained in which one word is 4 bytes and the addressing of data in the main memory is LSB.

まず、主記憶装置内のデータをバイトシフタを用いずに
そのままレジスタファイル11.12にロードし、レジ
スタファイル11.12にロードしたデータのアドレス
における下位2ビツトを、それぞれのレジスタ23.2
4に設定しておく。
First, the data in the main memory is loaded directly into the register file 11.12 without using a byte shifter, and the lower two bits of the address of the data loaded into the register file 11.12 are transferred to each register 23.2.
Set it to 4.

そしてレジスタ13.14に、レジスタ・ファイル11
.12内にロードしたデータのLSBが格納されている
ワード位置の設定を行なうと、シフタ21.22の出力
から、演算すべきデータのLSB側1側御ワードバイト
)が取出されてALU25で演算が行なわれ、その結果
がレジスタファイル12のアドレスAで指定したワード
に格納される。
And in registers 13 and 14, register file 11
.. When the word position in which the LSB of the data loaded into the ALU 25 is stored is set, the LSB side 1 side control word byte of the data to be calculated is taken out from the output of the shifter 21 and 22, and the calculation is performed in the ALU 25. The result is stored in the word specified by address A of the register file 12.

したがってレジスタ13.14に設定されているアドレ
スを+1ワードずつ増やし、上述したような処理を繰り
返し行なえば、レジスタファイル12に演算結果を得る
ことができる。
Therefore, by increasing the address set in the registers 13 and 14 by +1 word and repeating the above-described processing, the result of the operation can be obtained in the register file 12.

ところで第2図は主記憶装置内のデータがワード境界内
に入うている場合を示しており、アドレス下位の2ビツ
トが00であり、レジスタファイルからアドレスAで指
定したワードから取出した1ワードのデータをそのまま
シフタから出力させて演算を行なっている。
By the way, Figure 2 shows a case where the data in the main memory is within word boundaries, the lower two bits of the address are 00, and the one word extracted from the word specified by address A from the register file. The calculation is performed by outputting the data as is from the shifter.

また第3図は、主記憶装置内のデータがワード境界に跨
っている場合を示しており、アドレス下位2ビツトが1
0である。
Figure 3 also shows a case where data in the main memory straddles word boundaries, and the lower two bits of the address are 1.
It is 0.

この場合にはレジスタファイルのアドレスAで指定した
ワードから取出した1ワードのデータから有効なMSB
側2バイトを抜出し、次のMSB側1側御ワードアドレ
スで指定して取出し、LSB側2バイトを抜出し、抜出
したデータを接続して、シフタから1ワードのデータを
出力させて演算を行なっている6 かくして本実施例によれば主記憶装置からレジスタファ
イルにデータをロードする場合に、バイトシフタを用い
てバイト位置合せを行なう必要が無くなるので、データ
が隣接するワードエリアに跨っている場合でも、バイト
シフタ内のレジスタに一旦データをロードする必要が無
くなり、主記憶装置からレジスタファイルにデータをロ
ードする時の処理ステップを減らすことができる。
In this case, the MSB is valid from one word of data extracted from the word specified by address A of the register file.
Extract the 2 bytes on the side, specify and extract the next MSB side with the 1st side control word address, extract the 2 bytes on the LSB side, connect the extracted data, output 1 word of data from the shifter, and perform the calculation. Thus, according to this embodiment, when loading data from the main memory to the register file, there is no need to perform byte alignment using a byte shifter, so even if the data spans adjacent word areas, It is no longer necessary to once load data into the register in the byte shifter, and the processing steps when loading data from the main memory to the register file can be reduced.

またデータが1つのワードエリアに入ワているか否かに
よって処理を分ける必要が無くなるので、処理が極めて
容易になる。
Further, since there is no need to separate processing depending on whether data is stored in one word area, processing becomes extremely easy.

さらに本実施例によれば従来のバイトシフタのようにデ
ータを一旦格納して記憶しておくレジスタが不要になる
Furthermore, according to the present embodiment, there is no need for a register to temporarily store data as in a conventional byte shifter.

[発明の効果] 以上説明したように本発明の演算装置は、2個の読出し
用ポートを有するレジスタファイルと、このレジスタフ
ァイルの一方のポートの読出しアドレスを設定するレジ
スタと、この読出しアドレスに所定値を加算し前記レジ
スタファイルの他方のポートの読出しアドレスを設定す
るする加算器と、前記レジスタファイルの2個の読出し
ポートから出力されたデータを結合してシフトさせ1ワ
ードのデータとして出力するシフタと、このシフタにお
けるシフト数を指定するレジスタとを備えているので、
バイトシフタ内に専用のレジスタを設ける必要がなく、
またデータがワード境界に跨る場合にも処理ステップ数
が多くならない。
[Effects of the Invention] As explained above, the arithmetic device of the present invention includes a register file having two read ports, a register for setting a read address of one port of this register file, and a register for setting a read address of one port of this register file, and a an adder that adds values and sets a read address for the other port of the register file; and a shifter that combines and shifts the data output from the two read ports of the register file and outputs it as one word of data. and a register that specifies the number of shifts in this shifter, so
There is no need to provide a dedicated register in the byte shifter,
Furthermore, even when data straddles word boundaries, the number of processing steps does not increase.

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図および第3図は同実施例の動作を説明する図、第4
図は従来の演算装置の構成の一例を示すブロック図、第
5図は同従来装置の動作を説明する図、第6図および第
7図は同従来装置が扱うデータの記憶状態を示す図、第
8図は同従来装置の動作を説明する流れ図である。 11.12・・・・・・レジスタファイル13.14.
23.24・・・レジスタ15.16・・・・・・加算
器 17〜20・・・・・・データ 21.22・・・・・・シフタ 25・・・・・・・・・・・・・・・ALtJ出願人 
     株式会社 東芝 代理人 弁理士  須 山 佐 − 第2図 第3図 ’:x 4 <を 土 書己 債、 1[1主 1乞剖14k l竺60 
     第7興
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, FIGS. 2 and 3 are diagrams explaining the operation of the embodiment, and FIG.
FIG. 5 is a block diagram showing an example of the configuration of a conventional arithmetic device, FIG. 5 is a diagram explaining the operation of the conventional device, FIGS. 6 and 7 are diagrams showing the storage state of data handled by the conventional device, FIG. 8 is a flowchart illustrating the operation of the conventional device. 11.12...Register file 13.14.
23.24... Register 15.16... Adder 17-20... Data 21.22... Shifter 25... ...ALtJ applicant
Toshiba Corporation Agent Patent Attorney Satoshi Suyama - Figure 2 Figure 3': x 4
7th Ko

Claims (1)

【特許請求の範囲】[Claims] (1)2個の読出し用ポートを有するレジスタファイル
と、このレジスタファイルの一方のポートの読出しアド
レスを設定するレジスタと、この読出しアドレスに所定
値を加算し前記レジスタファイルの他方のポートの読出
しアドレスを設定するする加算器と、前記レジスタファ
イルの2個の読出しポートから出力されたデータを結合
してシフトさせ1ワードのデータとして出力するシフタ
と、このシフタにおけるシフト数を指定するレジスタと
を備えてなることを特徴とする演算装置。
(1) A register file that has two read ports, a register that sets the read address of one port of this register file, and a read address of the other port of the register file that adds a predetermined value to this read address. a shifter that combines and shifts the data output from the two read ports of the register file and outputs it as one word of data, and a register that specifies the number of shifts in this shifter. A computing device characterized by:
JP62077862A 1987-03-31 1987-03-31 Arithmetic unit Pending JPS63244227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62077862A JPS63244227A (en) 1987-03-31 1987-03-31 Arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62077862A JPS63244227A (en) 1987-03-31 1987-03-31 Arithmetic unit

Publications (1)

Publication Number Publication Date
JPS63244227A true JPS63244227A (en) 1988-10-11

Family

ID=13645867

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62077862A Pending JPS63244227A (en) 1987-03-31 1987-03-31 Arithmetic unit

Country Status (1)

Country Link
JP (1) JPS63244227A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015207203A (en) * 2014-04-22 2015-11-19 富士通株式会社 Shift circuit and arithmetic unit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015207203A (en) * 2014-04-22 2015-11-19 富士通株式会社 Shift circuit and arithmetic unit

Similar Documents

Publication Publication Date Title
US4814976A (en) RISC computer with unaligned reference handling and method for the same
US6260137B1 (en) Data processing unit with digital signal processing capabilities
US4761755A (en) Data processing system and method having an improved arithmetic unit
US4754421A (en) Multiple precision multiplication device
US4675809A (en) Data processing system for floating point data having a variable length exponent part
US6754810B2 (en) Instruction set for bi-directional conversion and transfer of integer and floating point data
JPH04172533A (en) Electronic computer
EP0220682B1 (en) Data processing system
US4888682A (en) Parallel vector processor using multiple dedicated processors and vector registers divided into smaller registers
EP0198341A2 (en) Digital data processing circuit having a bit reverse function
JPH0414385B2 (en)
US5757685A (en) Data processing system capable of processing long word data
US4967343A (en) Pipelined parallel vector processor including parallel configured element processors for processing vector elements in parallel fashion
US5903779A (en) System and method for efficient packing data into an output buffer
US4754424A (en) Information processing unit having data generating means for generating immediate data
JP2000322235A (en) Information processor
US5754875A (en) Computer system with double width data bus
JPS63244227A (en) Arithmetic unit
US4301514A (en) Data processor for processing at one time data including X bytes and Y bits
JPS59114677A (en) Vector processor
JPS5968058A (en) Floating point multiplier
US4812974A (en) Data processing apparatus for processing list vector instructions
US20020198916A1 (en) Method and circuit for normalization of floating point significands in a SIMD array MPP
JPH07110769A (en) Vliw type computer
JPS6051738B2 (en) Microprogram control method