JPS63115229A - Element shift system - Google Patents

Element shift system

Info

Publication number
JPS63115229A
JPS63115229A JP61260931A JP26093186A JPS63115229A JP S63115229 A JPS63115229 A JP S63115229A JP 61260931 A JP61260931 A JP 61260931A JP 26093186 A JP26093186 A JP 26093186A JP S63115229 A JPS63115229 A JP S63115229A
Authority
JP
Japan
Prior art keywords
shift
data
shifted
register
circuit
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
JP61260931A
Other languages
Japanese (ja)
Inventor
Junko Hasegawa
純子 長谷川
Nobuyuki Sugiura
杉浦 信行
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 JP61260931A priority Critical patent/JPS63115229A/en
Publication of JPS63115229A publication Critical patent/JPS63115229A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the amount of hardware by using data, which is overflowed by data shift, as data of the shift result if the shift direction is different from the shift direction indicated with a code. CONSTITUTION:'1' is set to a code 8 indicating the shift direction, and '111111' is set to the shift quantity with 2' complement expression as shown by 9. If '111111' is left shift data, data 7 is left shifted by 63 bits because '111111' indicates that data should be left shifted by 63 bits, and the result is set to a register 11 and overflowed data is set to a register 10. As the result, right shifted data is held in the register 10, and left shifted data is held in the register 11. Consequently, it is unnecessary to convert the shift quantity to an absolute value through it is expressed with 2' complement in accordance with the shift direction, and hardware for this conversion is unnecessary.

Description

【発明の詳細な説明】 [概 要] 左方向にシフトするのか右方向にシフトするのかを示す
符号(例えば“0″のとき左、“1″のとき右)と、2
進数あるいは2の補数(例えば左シフトのときは2進数
で右シフトのときは2の補数)で示されるシフト量に基
づいてベクトルデータをエレメントごとにシフトするエ
レメントシフト命令が実行可能な演算処理装置において
、従来、2の補数によってシフト量が示される場合には
これをシフト量の絶対値に変換してからシフトを行なっ
ていたのでそのためのハードウェア量が増加し処理速度
も遅くなるという問題点があった。本発明はこのような
従来の問題点を解決するため、2の補数で示されるシフ
ト量を絶対値に変換する必要がなく、また、常に一定方
向のシフトによって、必要とするシフトデータを得るこ
とのデキルエレメントシフト方式について開示している
[Detailed Description of the Invention] [Summary] A code indicating whether to shift leftward or rightward (for example, "0" to the left, "1" to the right), and 2.
An arithmetic processing unit capable of executing an element shift instruction that shifts vector data element by element based on a shift amount indicated by a base number or a two's complement number (for example, a binary number for a left shift and a two's complement number for a right shift). Conventionally, when the shift amount is indicated by a two's complement number, this is converted to the absolute value of the shift amount before the shift is performed, which has the problem of increasing the amount of hardware and slowing down the processing speed. was there. In order to solve these conventional problems, the present invention eliminates the need to convert the shift amount represented by two's complement into an absolute value, and can always obtain the required shift data by shifting in a constant direction. Discloses the deckle element shift method.

[産業上の利用分野] 本発明はベクトルデータのシフトに関するものであって
、特に同一の命令によって、シフト方向とシフト量を指
示することにより、ベクトルデータをエレメントごとに
左方向または右にシフトする制御に係る。
[Industrial Application Field] The present invention relates to shifting vector data, and in particular, shifts vector data element by element to the left or right by instructing the shift direction and shift amount using the same command. Related to control.

[従来の技術] ベクトルデータを1つの命令でエレメントごとに左方向
あるいは右方向にシフトすることの可能な演算処理装置
がある。
[Prior Art] There is an arithmetic processing device that can shift vector data element by element to the left or to the right with a single instruction.

このような場合のシフト命令においては、シフト方向は
′0′”または” i ”の符号で示される。
In the shift command in such a case, the shift direction is indicated by the code '0' or 'i'.

例えば通常左シフトであれば符号″0”、右シフトであ
れば符号II I I+が用いられる。そして、符号が
“0”である場合シフト量は正数の2進数で示されるが
、符号が1”である場合はシフト量は負数すなわち、2
の補数で示される。
For example, normally a code "0" is used for a left shift, and a code II I I+ is used for a right shift. When the sign is “0”, the shift amount is indicated by a positive binary number, but when the sign is “1”, the shift amount is a negative number, that is, 2
It is shown as the complement of .

第3図は従来のベクトルデータのエレメントシフト命令
の実行系の構成の例を示す図で、51は2の補数で示さ
れたシフト量を絶対値に変換する絶対値変換回路(図で
は略号にてABSと記載)、52は前処理回路(図では
PRESHiFTERと記載)、53は論理演算回路(
図では略号にてALUと記載〉、54は1ビット単位で
左あるいは右にシフトするシフト回路(図ではB i 
T  S Hi F T E Rと記載)、55は 1
デジット単位で左シフトするシフト回路および後処理回
路(図ではP OS T  S Hi F T E R
と記載)、56はそれぞれレジスタを表している。
FIG. 3 is a diagram showing an example of the configuration of an execution system for a conventional element shift instruction for vector data. 51 is an absolute value conversion circuit (abbreviated in the figure) that converts a shift amount expressed as a two's complement number into an absolute value. 52 is a preprocessing circuit (indicated as PRESHiFTER in the figure), 53 is a logic operation circuit (indicated as PRESHiFTER),
In the figure, it is abbreviated as ALU>, and 54 is a shift circuit that shifts left or right in units of 1 bit (B i in the figure).
T S Hi F T E R), 55 is 1
A shift circuit that shifts left in digit units and a post-processing circuit (in the figure, POST
) and 56 each represent a register.

[発明が解決しようとする問題点] 上述したような従来のシフト命令の実行系においては、
2の補数で示された右シフト量を絶対値に変換する絶対
値変換回路51が必要であった。そして、右シフトは前
処理回路52とシフト回路54で、一方、左シフトはシ
フト回路54とシフト回路55で行なっており、絶対値
変換回路のハードウェアを必要とする上、処理速度が遅
いという問題点があった。
[Problems to be solved by the invention] In the conventional shift instruction execution system as described above,
An absolute value conversion circuit 51 was required to convert the right shift amount expressed as a two's complement number into an absolute value. The right shift is performed by a preprocessing circuit 52 and a shift circuit 54, while the left shift is performed by a shift circuit 54 and a shift circuit 55, which requires hardware for an absolute value conversion circuit and has a slow processing speed. There was a problem.

本発明は、このような従来の問題点に鑑み、2の補数で
シフト量が示される場合であっても、これを絶対値に変
換する回路を必要とすることなく、そのため、従来より
ハードウェア量を削減し得ると共に、処理速度の速い演
算処理装置を提供することを目的としている。
In view of these conventional problems, the present invention eliminates the need for a circuit to convert the shift amount into an absolute value even when the shift amount is expressed as a two's complement number, and therefore requires less hardware than the conventional method. It is an object of the present invention to provide an arithmetic processing device that can reduce the amount of data and has a high processing speed.

[問題点を解決するための手段] 本発明によれば上述の目的は前記特許請求の範囲に記載
のとおり、シフト方向を示す符号とシフト方向に応じて
2進数または2の補数によって示されるシフト量によっ
てベクトルデータをエレメントごとにシフトするエレメ
ントシフト命令が実行可能なシフト機能を有するベクト
ル演算処理装置において、前記符号によって示されるシ
フト方向とは無間係に一定方向にデータをシフトして該
シフト方向が符号によって示されるシフト方向と異なる
方向であるときデータをシフトすることによって桁あふ
れしたデータをシフト結果のデータとして使用すること
を特徴とするエレメントシフト方式により達成される。
[Means for Solving the Problems] According to the present invention, the above-mentioned object is achieved by using a code indicating a shift direction and a shift indicated by a binary number or a two's complement number depending on the shift direction. In a vector arithmetic processing device having a shift function capable of executing an element shift instruction that shifts vector data element by element depending on the amount, the data is shifted in a constant direction irrespective of the shift direction indicated by the symbol. This is achieved by an element shift method characterized in that when the data is shifted in a direction different from the shift direction indicated by the sign, the overflowed data is used as the shift result data.

[実施例] 第1図は本発明の一実施例のブロック図であって、ベク
トルデータのエレメントシフト命令の実行に係る系の構
成の例を示している。第1図において、1はそれぞれレ
ジスタ、2は前処理回路(図ではPRE  5HiFT
ERと記載)、3は論理演算回路(図では略号にてAL
Uと記載)、4は1ビット単位で左あるいは右にシフト
するシフト回路(図ではBiT  5HiFTERと記
載)、5は1デジット単位で左シフトするシフト回路に
シフト方向を示す符号によりデータをセレクトするセレ
クタを付加したシフト回路(図ではP OS T  S
 Hi F T E Rと記載)、6は68ビツトのラ
ッチを表している。
[Embodiment] FIG. 1 is a block diagram of an embodiment of the present invention, showing an example of the configuration of a system related to execution of an element shift instruction of vector data. In Figure 1, 1 is a register, 2 is a preprocessing circuit (in the figure, PRE 5HiFT
3 is a logic operation circuit (abbreviated as AL in the figure).
4 is a shift circuit that shifts left or right in 1-bit units (described as BiT 5HiFTER in the figure), 5 is a shift circuit that shifts left in 1-digit units, and data is selected by a code indicating the shift direction. A shift circuit with a selector (in the figure, POST
6 represents a 68-bit latch.

第2図はエレメントシフトの原理を示す図で、7はシフ
トされるデータ、8はシフトの方向を示す符号、9はシ
フト量を示すデータ、10、11はレジスタで、レジス
タ10の内容は右シフトされたデータ、レジスタ11の
内容は左シフトされたデータを表している。
Figure 2 is a diagram showing the principle of element shift, where 7 is the data to be shifted, 8 is a code indicating the direction of shift, 9 is data indicating the amount of shift, 10 and 11 are registers, and the contents of register 10 are shown on the right. Shifted data, the contents of register 11 represent left-shifted data.

以下第1図および第2図を用いてその動作を説明する。The operation will be explained below using FIGS. 1 and 2.

本発明においては、第1図で明らかなように、従来不可
欠であったところの2の補数で示されたシフト量を絶対
値に変換する回路を必要としない。その代わり、68ビ
ツトのラッチ6と、シフト方向を示す符号によってデー
タを選択する回路をシフト回路に付加したシフト回路5
を設けている。
In the present invention, as is clear from FIG. 1, there is no need for a circuit for converting a shift amount expressed as a two's complement into an absolute value, which was indispensable in the prior art. Instead, a shift circuit 5 is constructed by adding a 68-bit latch 6 and a circuit for selecting data according to a code indicating the shift direction to the shift circuit.
has been established.

第2図において、データ7を右に1ビツトシフトする場
合を示している。すなわち、この場合のシフト方向を示
す符号8は“1″がセットされ(左シフトなら“0゛′
)、また、シフト量(1ビツト)は2の補数表示で9に
示すように“111111°“がセットされる。”11
1111′′はこれを左シフトデータと見なすと左へ6
3ビツトシフトとなるので、データ7について左へ63
ビツトシフトして、その結果をレジスタ11にセットし
、あふれたデータをレジスタ10にセットする。これに
よって、結果的にレジスタ10には右シフトされたデー
タ、レジスタ11には左シフトされたデータが保持され
ることになるから、シフト方向を示す符号8により、そ
のいずれかを選択すれは良い。
FIG. 2 shows a case where data 7 is shifted to the right by one bit. That is, the code 8 indicating the shift direction in this case is set to "1" (if it is a left shift, it is set to "0").
), and the shift amount (1 bit) is set to "111111°" as shown at 9 in two's complement representation. ”11
1111'' is considered as left shift data and shifts to the left by 6.
Since it is a 3-bit shift, data 7 is shifted 63 to the left.
The bits are shifted, the result is set in register 11, and the overflow data is set in register 10. As a result, the right-shifted data will be held in register 10 and the left-shifted data will be held in register 11, so it is good to select one of them using the code 8 indicating the shift direction. .

[発明の効果コ 以上説明したように本発明のエレメントシフト方式によ
れば、シフト方向によってシフト量が2の補数により示
される場合であっても、これを絶対値に変換する必要が
ないから、そのためのハードウェアを設ける必要がなく
、従って系のハードウェア量を減少せし□め得ると共に
処理速度の向上を図ることができるという利点がある。
[Effects of the Invention] As explained above, according to the element shift method of the present invention, even if the shift amount is indicated by a two's complement number depending on the shift direction, there is no need to convert it into an absolute value. There is no need to provide any hardware for this purpose, and therefore there are advantages in that the amount of hardware in the system can be reduced and the processing speed can be improved.

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

第1図は本発明の1実施例のブロック図、第2図はエレ
メントシフトの原理を示す図、第3図は従来のベクトル
データのエレメントシフト命令の実行系の構成の例を示
す図である。 1.10.11・・・・・・レジスタ、2・・・・・・
前処理回路、3・・・・・・論理演算回路、4.5・・
・・・・シフト回路、6・・・・・・ラッチ、7・・・
・・・データ、8・・・・・・シフト方向を示す符号、
9・・・・・・シフト量を示すデータ 代理人 弁理士 井 桁 貞 − 結果
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a diagram showing the principle of element shift, and FIG. 3 is a diagram showing an example of the configuration of an execution system for a conventional vector data element shift instruction. . 1.10.11...Register, 2...
Preprocessing circuit, 3...Logic operation circuit, 4.5...
...Shift circuit, 6...Latch, 7...
...Data, 8... Code indicating shift direction,
9... Data showing the amount of shift Agent Patent attorney Sada Igeta − Results

Claims (1)

【特許請求の範囲】 シフト方向を示す符号とシフト方向に応じて2進数また
は2の補数によって示されるシフト量によってベクトル
データをエレメントごとにシフトするエレメントシフト
命令が実行可能なシフト機能を有するベクトル演算処理
装置において、 前記符号によって示されるシフト方向とは無関係に一定
方向にデータをシフトして該シフト方向が符号によって
示されるシフト方向と異なる方向であるときデータをシ
フトすることによって桁あふれしたデータをシフト結果
のデータとして使用することを特徴とするエレメントシ
フト方式。
[Claims] A vector operation having a shift function capable of executing an element shift instruction that shifts vector data element by element using a sign indicating a shift direction and a shift amount indicated by a binary number or a two's complement depending on the shift direction. In the processing device, the data is shifted in a constant direction regardless of the shift direction indicated by the symbol, and when the shift direction is different from the shift direction indicated by the symbol, the data is shifted to remove overflow data. An element shift method characterized by being used as shift result data.
JP61260931A 1986-10-31 1986-10-31 Element shift system Pending JPS63115229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61260931A JPS63115229A (en) 1986-10-31 1986-10-31 Element shift system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61260931A JPS63115229A (en) 1986-10-31 1986-10-31 Element shift system

Publications (1)

Publication Number Publication Date
JPS63115229A true JPS63115229A (en) 1988-05-19

Family

ID=17354756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61260931A Pending JPS63115229A (en) 1986-10-31 1986-10-31 Element shift system

Country Status (1)

Country Link
JP (1) JPS63115229A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008541498A (en) * 2005-01-20 2008-11-20 マーベル ワールド トレード リミテッド High memory efficiency sliding window addition
JP2014130573A (en) * 2012-12-29 2014-07-10 Intel Corp Apparatus and method of efficient vector roll operation

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008541498A (en) * 2005-01-20 2008-11-20 マーベル ワールド トレード リミテッド High memory efficiency sliding window addition
JP2014130573A (en) * 2012-12-29 2014-07-10 Intel Corp Apparatus and method of efficient vector roll operation
US9378017B2 (en) 2012-12-29 2016-06-28 Intel Corporation Apparatus and method of efficient vector roll operation

Similar Documents

Publication Publication Date Title
KR102447636B1 (en) Apparatus and method for performing arithmetic operations for accumulating floating point numbers
US4953115A (en) Absolute value calculating circuit having a single adder
EP0171805A2 (en) High speed digital arithmetic unit
JPH0426731B2 (en)
US4924421A (en) Priority encoding system
JPS63115229A (en) Element shift system
JPH0346024A (en) Floating point computing element
JPH07118654B2 (en) Arithmetic unit
JP2761558B2 (en) Bit search device
JPS60167030A (en) System and circuit for shift flag generation
US4141077A (en) Method for dividing two numbers and device for effecting same
JP3189552B2 (en) Arithmetic unit
JP2564318B2 (en) Communication processing device
JP2590840B2 (en) Run-length encoding device
JPH03241421A (en) Multiplier
SU1211720A1 (en) Subtracting device
SU949719A1 (en) Shifting device
SU1465882A1 (en) Inverse value computing device
JPS62143130A (en) Central processing unit
JPS622329B2 (en)
JPH04245323A (en) Barrel shifter circuit
JPH0644226B2 (en) Processor
JPS63181030A (en) Accelerating system for arithmetic calculation in specific data pattern
JPS60186933A (en) Binary-coded decimal multiplication system
JPH029386B2 (en)