JP2803788B2 - Fast pipeline shifter element with parity prediction and string control - Google Patents

Fast pipeline shifter element with parity prediction and string control

Info

Publication number
JP2803788B2
JP2803788B2 JP53142196A JP53142196A JP2803788B2 JP 2803788 B2 JP2803788 B2 JP 2803788B2 JP 53142196 A JP53142196 A JP 53142196A JP 53142196 A JP53142196 A JP 53142196A JP 2803788 B2 JP2803788 B2 JP 2803788B2
Authority
JP
Japan
Prior art keywords
shift
operand
parity
bits
data
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
JP53142196A
Other languages
Japanese (ja)
Other versions
JPH09509275A (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.)
International Business Machines Corp
Original Assignee
International Business Machines 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 International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP53142196A priority Critical patent/JP2803788B2/en
Publication of JPH09509275A publication Critical patent/JPH09509275A/en
Application granted granted Critical
Publication of JP2803788B2 publication Critical patent/JP2803788B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • G06F5/015Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising having at least two separately controlled shifting levels, e.g. using shifting matrices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 発明の分野 本発明は、オペランドをシフト装置内にシフトする方
法に関する。
Description: FIELD OF THE INVENTION The present invention relates to a method for shifting an operand into a shift device.

従来の技術 シフト・レジスタまたはシフト装置は、情報を横方向
に転送する能力を有する。シフト・レジスタは、通常、
その出力がnビット並列データ・ワードから構成される
n段装置を表わす。単一のクロック・サイクルをシフト
・レジスタ装置に適用すると、出力ワードが右から左へ
(または左から右へ)1ビット位置だけシフトされる。
最左(または最右)ビットがレジスタの「端部」から失
われ、最右(または最左)ビット位置が直列入力端子か
らロードされる。
BACKGROUND OF THE INVENTION Shift registers or shift devices have the ability to transfer information laterally. The shift register is usually
Its output represents an n-stage device consisting of n-bit parallel data words. Applying a single clock cycle to the shift register device shifts the output word one bit position from right to left (or left to right).
The leftmost (or rightmost) bit is lost from the "end" of the register, and the rightmost (or leftmost) bit position is loaded from the serial input terminal.

並列出力を有し、その出力から供給される組合せ論理
を有するシフト・レジスタは、デジタル信号処理、およ
び誤り訂正コードおよび誤り検出コードの符号化および
復号化において非常に重要である。そのようなレジスタ
は、ハードウェアまたはソフトウェアの形で実施され、
2進またはq進である。(ハードウェア実施形態は、通
常、2値論理および時として3値論理の場合にのみ有利
である。) シフト装置は、一般に、演算装置および論理装置とと
もに使用される。第1図に、演算装置および論理装置と
ともにシフト装置を含む従来技術の実行装置のブロック
図を示す。一般に、それらの装置はすべて、不均衡な正
味長さおよび信号伝播時間を有することを回避するため
の速度が一致する必要がある。しかしながら、特にシフ
ト装置は、演算論理装置の速度と一致することが重要で
あると思われる。
Shift registers having parallel outputs and having combinational logic supplied from the outputs are very important in digital signal processing and in the coding and decoding of error correction and error detection codes. Such registers are implemented in hardware or software,
It is binary or q-ary. (Hardware embodiments are typically only advantageous for binary and sometimes ternary logic.) Shift devices are commonly used with arithmetic and logic devices. FIG. 1 shows a block diagram of a prior art execution device including a shift device together with an arithmetic device and a logic device. Generally, all of these devices need to be matched in speed to avoid having unbalanced net length and signal propagation time. However, it may be important that the shift device, in particular, match the speed of the arithmetic logic unit.

いくつかの用途では、2進数のグループ(例えば、ワ
ード、バイト、または文字)に対して検査を実施するた
めに、一般に、グループ内のビットのモジュロ2合計を
形成することによってパリティ機能を計算する。発生し
た合計すなわち冗長な値はパリティ・ビットと呼ばれ
る。元のグループ内の1個数が偶数個の場合、パリティ
・ビットは0である。元のグループ内の1の個数が奇数
個の場合、パリティ・ビットは1である。
In some applications, to perform a check on a group of binary numbers (eg, words, bytes, or characters), the parity function is generally calculated by forming a modulo-2 sum of the bits in the group. . The resulting sum or redundant value is called a parity bit. If the number in the original group is even, the parity bit is zero. If the number of ones in the original group is odd, the parity bit is one.

いま定義したパリティ計算では、2進数の拡張グルー
プ(元のグループ+パリティ・ビット)が偶数個の1を
有することになる。これは偶数パリティと呼ばれる。場
合によっては、ハードウェア考慮事項のために拡張グル
ープ内に1が奇数個あることが望ましいことがあり、1
の合計数が奇数個となるようにパリティ・ビットを選択
する。これは奇数パリティと呼ばれる。パリティ検査ま
たは奇偶検査とは、規定されたパリティ条件が存在する
かどうかを判定するためにパリティ・ビットを計算する
か、または検証のために再計算することである。
In the parity calculation just defined, the binary extended group (original group + parity bit) will have an even number of ones. This is called even parity. In some cases, it may be desirable to have an odd number of 1s in the extension group due to hardware considerations.
The parity bits are selected such that the total number of the parity bits becomes an odd number. This is called odd parity. A parity check or parity check is the computation of parity bits to determine if a defined parity condition exists, or recomputation for verification.

パリティ機能を含む用途におけるシフト装置は、それ
ぞれのグループ内のビットの合計が変化しているので、
各シフト演算の後でパリティを復元する必要がある。こ
れは、一般に、シフト演算後のパリティ発生によって達
成される。追加のセキュリティ機能として、用途によっ
てはさらに、シフト装置のパリティ発生と無関係に新し
いパリティ・ビットを予測するパリティ予測機能を有す
る。発生するパリティ・ビットと予測したパリティ・ビ
ットとを比較すれば、両方のパリティ・ビットが一致し
ない場合、パリティ発生装置かパリティ予測装置のどち
らかの欠点が明らかになる。しかしながら、そのような
パリティ分析は、ある一定の処理時間を必要とし、した
がって他の処理装置とのタイミングの要求される一致に
関して特に重要である。
Shifting devices in applications that include a parity function, since the sum of the bits in each group is changing,
Parity must be restored after each shift operation. This is generally achieved by parity generation after the shift operation. As an additional security function, some applications further include a parity prediction function for predicting a new parity bit regardless of the occurrence of parity of the shift device. Comparing the generated parity bit with the predicted parity bit reveals the disadvantages of either the parity generator or the parity predictor if both parity bits do not match. However, such a parity analysis requires a certain amount of processing time and is therefore particularly important with respect to the required consistency of timing with other processing units.

第1図に示すように、一般に、シフトすべきオペラン
ド(例えば4または8ビット)をデータ・ローカル・ス
トア(DLS)から読み出し、オペランド・レジスタA REG
またはB REG内に入力する。次のサイクル中、データを
処理装置のうちのいずれか1つにおいて処理し、例えば
シフトし、DLSのデータ・イン・レジスタDIに再び書き
込む。パリティ検査システムでは、シフトされたデータ
のバイト・パリティ、例えばバイト・パリティP0−P7
は、追加の遅延がシフタ・パスに加えられて発生する。
As shown in FIG. 1, generally, the operand to be shifted (eg, 4 or 8 bits) is read from a data local store (DLS) and the operand register A REG is read.
Or input into B REG. During the next cycle, the data is processed in any one of the processing units, for example, shifted, and written back to the data-in register DI of the DLS. In a parity check system, the byte parity of the shifted data, for example, byte parity P0-P7
Occurs when an additional delay is added to the shifter path.

シフト演算では、通常、例えばIBM S/390をベースと
するコンピュータでは、論理演算または算術演算として
右または左に4または8バイト・シフトを実行する。さ
らに、すべての種類の特殊マイクロ命令は、通常、シフ
ト装置によって実行される。シフト量は、一般に(例え
ば最大4つの入力を有するマルチプレクサが含まれる場
合)順次通過する32−16−8−4−2−1ビット・シフ
ト要素に分割される。したがって、0〜63ビットのシフ
ト量が可能である。直通させることによってレベルをバ
イパスすることができる。右または左へのシフトは、右
/左にシフトするのに適切なマルチプレクサ・レベルを
適用することによって行われる。
In a shift operation, for example, a computer based on IBM S / 390 typically performs a 4 or 8 byte shift right or left as a logical or arithmetic operation. In addition, all kinds of special microinstructions are usually executed by the shifting device. The shift amount is typically divided (for example, when a multiplexer with up to four inputs is included) into successively passing 32-16-8-4-2-1 bit shift elements. Therefore, a shift amount of 0 to 63 bits is possible. The level can be bypassed by passing it through. Shifting right or left is done by applying the appropriate multiplexer level to shift right / left.

データ・パスについてのパリティ検査は、一般に、バ
イト・パリティを発生させることによって達成される。
パリティ予測では、完全ダブル・ワード(8バイト)の
パリティ・ビットを発生させ、予測したダブル・ワード
・パリティ・ビットと比較する。予測したパリティ・ビ
ットは、シフト・アウトされないバイトのバイト・パリ
ティ・ビットを選択することによって達成される。他の
バイトは完全にシフト・アウトされ、0に置き代わり、
1バイトは部分的にシフトの影響を受ける(バイトの1
〜7ビットはシフト・アウトされる)。
Parity checking on the data path is generally achieved by generating byte parity.
In parity prediction, a complete double word (8 bytes) parity bit is generated and compared with the predicted double word parity bit. The predicted parity bits are achieved by selecting the byte parity bits of the bytes that are not shifted out. The other bytes are completely shifted out and replaced with zeros,
One byte is partially affected by the shift (one byte
~ 7 bits are shifted out).

この方法を奇数パリティに適用すれば、予測したパリ
ティは、残りのバイト・パリティ・ビットと、完全にシ
フト・アウトされ、0に置き代わったバイト・パリティ
・ビット用の1(奇数パリティと仮定する)と、部分的
にシフトされたバイトのパリティ・ビットとから構成さ
れる。部分的にシフトされたバイトの元のパリティ・ビ
ットは、シフト・アウトされたその1それぞれによって
はじき出される。
If this method is applied to odd parity, the predicted parity is assumed to be the remaining byte parity bits and 1 (odd parity) for the byte parity bits completely shifted out and replaced by zeros. ) And the parity bits of the partially shifted bytes. The original parity bits of the partially shifted byte are flipped out by each one shifted out.

最大64ビットをシフトするシフト装置は、一般に、パ
リティ発生用に6つのマルチプレクサ・レベルと、2つ
のXORレベルとから構成される。最大32ビットをシフト
するシフト装置は、パリティ発生用に5つのマルチプレ
クサ・レベルと、2つのXORレベルとから構成される。
パリティ予測では、追加の論理レベルが必要である。
Shifters that shift up to 64 bits typically consist of six multiplexer levels for parity generation and two XOR levels. A shifter that shifts up to 32 bits consists of five multiplexer levels for parity generation and two XOR levels.
Parity prediction requires additional logic levels.

一般に、バイト(8ビット)指向システムにおけるシ
フト量は、通常最大シフト量から始まる順次通過する1
−2−4−8−16−32−...−k/4−k/2ビット・シフト
要素に分割され、したがって合計0〜k−1ビットのシ
フト量が可能である。kビット・ワードに対してシフト
量がk以上の場合は、通常、そのワードはシフト・アウ
トされ、実際のシフト量と無関係に0を表わすので無意
味である。しかしながら、信号は、所要の結果が受信さ
れるまでいくつかの論理レベルを通過する必要がある。
これは、非常に時間がかかり、大きな欠点である。
In general, the amount of shift in a byte (8-bit) oriented system is typically 1
-2--4-8-16-32 -...- k / 4-k / 2 bits are divided into shift elements, so that a total shift amount of 0 to k-1 bits is possible. If the amount of shift is greater than or equal to k for a k-bit word, it is usually meaningless because the word is shifted out and represents 0 regardless of the actual amount of shift. However, the signal needs to pass through several logic levels until the desired result is received.
This is very time consuming and a major drawback.

発明の概要 本発明の目的は、改善されたシフト装置を提供するこ
とである。
SUMMARY OF THE INVENTION It is an object of the present invention to provide an improved shift device.

本発明の目的は、独立クレームによって解決される。 The object of the invention is solved by the independent claims.

様々な方法でデータをシフトでき、また左側でも右側
でもデータの切捨てを実行できる新しい機能装置を開示
する。速度の利点は、パイプラインを利用することによ
って、例えば実行を多数のサイクルに分割することによ
って達成される。すべての演算は、正しいパリティを予
測することによってパリティ検査できる。
A new functional device is disclosed that can shift data in various ways and perform data truncation on either the left or right side. The speed advantage is achieved by utilizing a pipeline, for example, by dividing the execution into a number of cycles. All operations can be parity checked by predicting the correct parity.

非常に概括的な言葉で言えば、本発明は、シフト演算
を、異なるパイプライン段内で実行できる並列シフトに
分解するシフト構造を開示する。第1のパイプ段内で、
オペランドを読み出し、オペランドまたはオペランドの
一部をシフト装置に結合されたレジスタ内に配置するこ
とによって少なくとも1つの部分シフトを達成する。シ
フト装置は、第2のパイプ段内で、残りの部分シフトを
実行することによって最終的にシフト演算を終了する。
これにより、シフト演算に要する時間が全体的に短縮さ
れ、また部分シフトを異なるパイプライン段に分配し
て、サイクル内の可能な残りの時間を使用することがで
きる。
In very general terms, the present invention discloses a shift structure that breaks down shift operations into parallel shifts that can be performed in different pipeline stages. In the first pipe stage,
The at least one partial shift is achieved by reading the operand and placing the operand or a portion of the operand in a register coupled to the shift device. The shift device finally completes the shift operation by performing the remaining partial shifts in the second pipe stage.
This reduces the overall time required for the shift operation, and also allows the partial shifts to be distributed to different pipeline stages to use the remaining time available in the cycle.

本発明によるシフト装置によって、第2のサイクル中
にシフト演算に要する時間をさらに短縮することができ
る。
The shift device according to the present invention can further reduce the time required for the shift operation during the second cycle.

本発明によるシフト装置では、第1のパイプ(パイプ
ライン)段内で、シフトすべきオペランドをデータ・ス
トアから読み出し、それぞれ長さk/2ビットの2つのオ
ペランド・レジスタの一方に入力する。ただし、kは整
数を表わす。次のサイクル中、第2のパイプ段内で、デ
ータを長さkビットのシフト装置内で処理し、データ・
レジスタに再び書き込む。また、任意選択のパリティ発
生装置および任意選択のパリティ予測装置を本発明のシ
フト装置に適用することもできる。
In the shift device according to the invention, in the first pipe (pipeline) stage, the operand to be shifted is read from the data store and input to one of two operand registers, each of length k / 2 bits. Here, k represents an integer. During the next cycle, in a second pipe stage, the data is processed in a k-bit long shifter and the data
Write to the register again. Also, an optional parity generation device and an optional parity prediction device can be applied to the shift device of the present invention.

本発明によるシフト構造は、シフトを2つのパイプ段
の両方に分割する。データ・ストアは、個々にまたはk
ビット長を有する対として読み出すことができるそれぞ
れ最大k/2ビット長を有するデータを含む。さらに、デ
ータ・ストアは、オペランド・レジスタのいずれか1つ
にデータをそれぞれ配置することができる多重化装置を
含む。
The shift structure according to the invention splits the shift into both two pipe stages. Data stores can be individually or
Includes data having a maximum of k / 2 bits each, which can be read as a pair having a bit length. Further, the data store includes a multiplexing device that can place the data in any one of the operand registers.

多重化装置の機能は、シフト機能の一部であり、当技
術分野で周知の命令制御装置によって制御される。多重
化装置は、シフトすべきk/2ビット・データをオペラン
ド・レジスタのいずれか1つに、したがってkビット・
シフト装置の右側または左側に配置することによってk/
2ビット・シフトを行い、したがってk/2ビット・シフト
要素を表わす。したがって、本発明のシフト装置は、1
−2−4−8−16−32−...k/4ビット・シフト要素のみ
を必要とし、したがって当技術分野で周知のシフト装置
に関して1つのシフト要素、したがって1つのシフト・
レベルが節約できる。
The function of the multiplexer is part of the shift function and is controlled by a command controller well known in the art. The multiplexor places the k / 2-bit data to be shifted into one of the operand registers, and thus the k-bit data.
By placing it on the right or left side of the shift device,
Perform a 2-bit shift, thus representing a k / 2-bit shift element. Therefore, the shift device of the present invention has
-2-4-8-16-32 -... k / 4 bit shift element only required, and thus one shift element and therefore one shift element for shift devices known in the art.
Level can be saved.

データ・ストアからの2つのk/2データ・ワードから
構成されるkビット・ワードを左(右)にシフト量>=
k/2だけシフトする場合、第1のパイプ段のサイクル中
に、最右(最左)k/2データ・ワードのみを、すでにk/2
シフトを表わすオペランド・レジスタの最も左(右)の
レジスタ内に読み込む必要がある。次いで、第2のパイ
プ段の次のサイクル中に、シフト装置によって連続シフ
トを適用する。第1のパイプ段内ですでにシフト量k/2
が実施されているので、合計k/2−1のシフト量だけが
第2のパイプ段の連続シフト装置内で必要である。
Shift k-bit word left (right) consisting of two k / 2 data words from the data store> =
If shifting by k / 2, during the cycle of the first pipe stage, only the rightmost (leftmost) k / 2 data word is already k / 2
It must be read into the leftmost (right) register of the operand register representing the shift. A continuous shift is then applied by the shift device during the next cycle of the second pipe stage. Shift amount k / 2 already in the first pipe stage
Is implemented, only a total shift amount of k / 2-1 is required in the continuous shifting device of the second pipe stage.

左または右へのシフト量<k/2のシフトを、第2のパ
イプ段のサイクル中にシフト装置のみによって適用す
る。
Shifts to the left or to the right with an amount of shift <k / 2 are applied by the shift device only during the cycle of the second pipe stage.

本発明のシフト構造は、第1のパイプ段におけるk/2
シフトのみに限定されるものではないことを理解された
い。まだ、データは、複数のオペランド・レジスタ内に
個々にまたは組合せの形で読み出すことができる。次い
で、多重化装置は、シフトすべき読み出されたデータを
複数のオペランド・レジスタ内に配置する。オペランド
・レジスタの数およびそれらのそれぞれのビット長に応
じて、シフトの様々な可能性が達成できる。例えば、4
つのオペランド・レジスタが備えられている場合、k/4
シフトまたはk/2シフトが実施できる。シフト・レベル
の数および各パイプ段におけるシフト量は、各サイクル
内に与えられる時間に依存することを理解されたい。
The shift structure of the present invention provides k / 2 in the first pipe stage.
It should be understood that the invention is not limited to shifts only. Still, data can be read into multiple operand registers individually or in combination. The multiplexer then places the read data to be shifted in a plurality of operand registers. Depending on the number of operand registers and their respective bit lengths, different shift possibilities are achievable. For example, 4
K / 4 if one operand register is provided
A shift or k / 2 shift can be implemented. It should be understood that the number of shift levels and the amount of shift in each pipe stage depends on the time given in each cycle.

シフト・レベルの数、したがってシフト演算に要する
時間をさらに短縮するために、本発明のシフト装置は、
シフト演算を一方向のみ、例えば左にのみ実行する。オ
ペランド・ビットは循環方式にシフトされる。反対方向
へのシフト演算は、左に補数シフト量だけシフトするこ
とによって行われる。
To further reduce the number of shift levels, and thus the time required for the shift operation, the shift device of the present invention
The shift operation is performed only in one direction, for example, only to the left. Operand bits are shifted in a circular fashion. The shift operation in the opposite direction is performed by shifting to the left by the complement shift amount.

循環シフト方式によるシフト装置内でのシフトは、連
続シフト・レベルに分割できる。一般に、各シフト・レ
ベルでは、それぞれ異なるシフト量を有するある最大数
のシフト・ゲートn、p、qなどが可能である。ただ
し、n、p、qなどは整数を表わす。例えば、CMOS技術
を適用した場合、通常、シフト・ゲートの最大数は4つ
に制限される。
Shifts within the shifter in a cyclic shift manner can be divided into successive shift levels. In general, each shift level allows a certain maximum number of shift gates n, p, q, etc., each having a different amount of shift. Here, n, p, q, etc. represent integers. For example, when applying CMOS technology, the maximum number of shift gates is usually limited to four.

第1のシフト・レベルでは、それぞれ隣接する2つの
シフト量間の距離がk/(2n)である次のシフト量:0、k/
(2n)、2*k/(2n)、3*k/(2n)、4*k/2
n、...、(n−2)*k/(2n)、(n−1)*k/(2n)
を有する最大n個のシフト・ゲートが可能である。第2
のシフト・レベルでは、それぞれ隣接する2つのシフト
量間の距離がk/(2np)であるシフト量:0、k/(2np)、
2*k/(2np)、3*k/(2np)、4*k/(2np)、...、
(p−2)*k/(2np)、(p−1)*k(2np)を有す
る最大p個のシフト・ゲートが可能である。第3のシフ
ト・レベルでは、それぞれ隣接する2つのシフト量間の
距離がk/(2npq)であるシフト量:0、k/(2npq)、2*
k/(2npq)、3*k/(2npq)、4*k/(2npq)、...、
(q−2)*k/(2npq)、(q−1)*k/(2npq)を有
する最大q個のシフト・ゲートが可能である。各連続シ
フト・レベルは、隣接する2つのシフト量間の距離をk/
(2II)に分割する。ただしIIは前の現在までのシフト
・レベルの最大シフト・ゲートの積を表わす。各シフト
量は整数のみであり、最後のシフト・レベルはシフト量
1で終わることが明らかである。
At the first shift level, the next shift amount: 0, k /, where the distance between two adjacent shift amounts is k / (2n).
(2n), 2 * k / (2n), 3 * k / (2n), 4 * k / 2
n, ..., (n-2) * k / (2n), (n-1) * k / (2n)
Are possible up to n shift gates. Second
, The distance between two adjacent shift amounts is k / (2np): 0, k / (2np),
2 * k / (2np), 3 * k / (2np), 4 * k / (2np), ...,
A maximum of p shift gates with (p-2) * k / (2np) and (p-1) * k (2np) are possible. At the third shift level, shift amounts: 0, k / (2npq), and 2 *, where the distance between two adjacent shift amounts is k / (2npq).
k / (2npq), 3 * k / (2npq), 4 * k / (2npq), ...,
Up to q shift gates with (q-2) * k / (2npq) and (q-1) * k / (2npq) are possible. Each successive shift level determines the distance between two adjacent shifts by k /
(2II). Where II represents the maximum shift gate product of the previous shift level to the present. It is clear that each shift amount is only an integer and the last shift level ends with a shift amount of one.

上記のことから明らかなように、本発明によるシフト
装置では、シフト・レベルの数が少なくとも1つ減る。
しかしながら、循環シフト方式によるシフト装置では、
シフト・レベルのさらに著しい減少が可能である。k/2
ビット・データをシフトする必要がある場合、追加の特
徴として、オペランド・レジスタからの内容を複写でき
る複写機能が多重化装置内の第1のパイプ内に必要であ
る。
As is evident from the above, the shift device according to the invention reduces the number of shift levels by at least one.
However, in a shift device using a cyclic shift method,
A further significant reduction of the shift level is possible. k / 2
If bit data needs to be shifted, an additional feature is that a copy function that can copy the contents from the operand register is required in the first pipe in the multiplexer.

循環シフト演算の得られたデータは、線形シフト演算
からの結果と同じ結果を受け取るために、例えば先行/
後続ゼロや符号拡張など、さらに操作を必要とすること
が多い。データABCD EFGHの線形シフト(A〜Hは個々
のバイトを表わす)では、元のデータの残りのビットが
シフト・アウト・ビット用の追加の0で満たされる。例
えば、データABCD EFGHに対して右に24(24ビットまた
は3バイト)シフトすると、新しいデータ000A BCDEが
生じる。しかしながら、この例の循環方式のシフトでは
FGHA BCDEが生じ、したがって線形シフトからの結果と
同じ結果を受け取るためにある処理が必要である。その
ような処理は、循環シフト結果を線形シフト結果に訂正
するビット値またはバイト値から構成される制御ストリ
ングなど、ビット値の個々のストリングによって行うこ
とが好ましい。シフト量は、シフト結果の有効ビットを
画定するストリングに復号される。
The resulting data of the cyclic shift operation is, for example, leading / negative to receive the same result as the result from the linear shift operation.
More operations are often required, such as trailing zeros or sign extensions. In a linear shift of data ABCD EFGH (A to H represent individual bytes), the remaining bits of the original data are filled with additional zeros for shift out bits. For example, shifting right (24 bits or 3 bytes) to the data ABCD EFGH results in new data 000A BCDE. However, in this example of a cyclic shift,
Some processing is needed to produce the FGHA BCDE and thus receive the same result from the linear shift. Such processing is preferably performed by individual strings of bit values, such as a control string composed of bit or byte values that correct the cyclic shift result to a linear shift result. The shift amount is decoded into a string that defines the significant bits of the shift result.

また、ストリングは任意選択のパリティ予測を制御で
きる。ストリングは、データの妥当性を画定し、パリテ
ィ予測用のパリティ・ビットを任意に選択する。ストリ
ングの適用により、所要の制御論理の量が大幅に減る。
Also, strings can control optional parity prediction. The string defines the validity of the data and arbitrarily selects the parity bits for parity prediction. The application of strings greatly reduces the amount of control logic required.

任意選択のパリティ予測では、部分的にシフトしたバ
イトをシフト・アウトされる1の計数は、片側、好まし
くはビットが循環方式でそれにシフトされる側でのみ達
成できることが好ましい。それには第1のパイプライン
段内でデータのある処理、例えばデータの複写が必要で
ある。これにより、パリティ予測論理において通過すべ
き論理回路の量が減る。
For optional parity prediction, the counting of ones shifted out of the partially shifted byte is preferably achievable only on one side, preferably on the side to which the bits are shifted in a circular fashion. This requires some processing of the data in the first pipeline stage, for example duplication of the data. This reduces the amount of logic circuits that must pass through in the parity prediction logic.

本発明のシフト構造は、例えば、プロセッサ・チップ
内の一部であるプロセッサ装置内でデータ操作を実行す
る実行装置内で使用することができる。
The shift structure of the present invention can be used, for example, in an execution device that performs data operations in a processor device that is part of a processor chip.

図面の説明 次に、本発明について例として添付の図面と関連して
説明する。
Description of the drawings The invention will now be described by way of example with reference to the accompanying drawings.

第1図は、演算装置および論理装置とともにシフト装
置を含む従来技術の実行装置のブロック図である。
FIG. 1 is a block diagram of a prior art execution device including a shift device as well as an arithmetic device and a logic device.

第2図は、本発明によるシフト装置を示す図である。 FIG. 2 is a diagram showing a shift device according to the present invention.

第3図は、循環シフト方式によるシフト装置10の一実
施形態の構造を示す図である。
FIG. 3 is a diagram showing the structure of one embodiment of the shift device 10 using the cyclic shift method.

第4a図は、循環シフト方式によるシフト装置10および
任意選択のパリティ予測装置30の一部30aの一実施形態
の構造を示す図である。
FIG. 4a is a diagram illustrating the structure of an embodiment of the shift device 10 and the part 30a of the optional parity prediction device 30 by the cyclic shift method.

第4b図は、任意選択のパリティ予測装置の一部30bお
よび任意選択のパリティ発生装置20の一実施形態の構造
を示す図である。
FIG. 4b shows the structure of one embodiment of the optional parity prediction device 30b and the optional parity generation device 20.

発明の詳細な説明 第2図に、本発明によるシフト装置を示す。第2図の
シフト装置は、第1図の実行装置の一部であることを理
解されたい。すでに第1図に示したように、第1のパイ
プ段内で、シフトすべきオペランドをデータ・ローカル
・ストアDLSから読み出し、それぞれ長さk/2ビットのオ
ペランド・レジスタA REGまたはB REG内に入力する。次
のサイクル中、第2のパイプ段内で、データをシフト装
置10内で処理し、DLSのデータ・イン・レジスタDIに再
び書き込む。さらに、第2図に、任意選択のパリティ発
生装置20および任意選択のパリティ予測装置30を示す。
これらの機能については後で説明する。
DETAILED DESCRIPTION OF THE INVENTION FIG. 2 shows a shift device according to the present invention. It should be understood that the shift device of FIG. 2 is part of the execution device of FIG. As already shown in FIG. 1, in the first pipe stage, the operand to be shifted is read from the data local store DLS and stored in operand registers A REG or B REG, each of length k / 2 bits. input. During the next cycle, in the second pipe stage, the data is processed in the shifter 10 and written back to the data-in register DI of the DLS. Further, FIG. 2 shows an optional parity generator 20 and an optional parity predictor 30.
These functions will be described later.

本発明によるシフト構造は、シフトを2つのパイプ段
1および2の両方に分割する。データ・ローカル・スト
アDLSは、個々にまたはkビット長を有する対として読
み出すことができるそれぞれ最大k/2ビット長を有する
データR0、R1、R2、R3などを含む。さらに、データ・ロ
ーカル・ストアDLSは、データR0、R1、R2、R3などをそ
れぞれレジスタA REGかまたはB REGに配置することがで
きる多重化装置40を含む。
The shift structure according to the invention splits the shift into both two pipe stages 1 and 2. The data local store DLS includes data R0, R1, R2, R3, etc., each having a maximum k / 2-bit length, which can be read individually or as pairs having a k-bit length. Further, the data local store DLS includes a multiplexing device 40 that can place the data R0, R1, R2, R3, etc., in the registers A REG or B REG, respectively.

多重化装置40の機能は、すでにシフト機能の一部であ
り、本明細書には示されていない当技術分野で周知の命
令制御装置によって制御される。多重化装置40はk/2ビ
ット・シフトを行い、したがってk/2ビット・シフト要
素を表わす。したがって、本発明のシフト装置10は、1
−2−4−8−16−32−...−k/4ビット・シフトのみを
必要とし、したがって当技術分野で周知のシフト装置に
関して1つのシフト要素、したがって1つのシフト・レ
ベルが節約できる。
The function of the multiplexer 40 is already part of the shift function and is controlled by a command controller known in the art, not shown here. Multiplexer 40 performs a k / 2-bit shift, thus representing a k / 2-bit shift element. Therefore, the shift device 10 of the present invention
-2-4-8-16-32 -...- k only requires a 4-bit shift, thus saving one shift element and therefore one shift level for shift devices known in the art. .

データ・ローカル・ストアDLSからの2つのk/2データ
・ワードから構成されるkビット・ワードを左(右)に
シフト量>=k/2だけシフトする場合、第1のパイプ段
のサイクル中に、最右(最左)k/2データ・ワードのみ
を、すでにk/2シフトを表わすレジスタA REG(B REG)
内に読み込む必要がある。次いで、第2のパイプ段の次
のサイクル中に、シフト装置10によって連続シフトを適
用する。
If a k-bit word consisting of two k / 2 data words from the data local store DLS is shifted left (right) by a shift amount> = k / 2, during the cycle of the first pipe stage Only the right-most (left-most) k / 2 data words are in register A REG (B REG), which already represents the k / 2 shift
Must be read in. A continuous shift is then applied by the shift device 10 during the next cycle of the second pipe stage.

本発明の実施形態のシフト装置10は、シフト演算を一
方向、例えば左にのみ実行する。オペランド・ビットは
循環方式にシフトされる。例えば先行/後続ゼロや符号
拡張など、得られたデータをさらに操作する必要がある
場合、後で説明する制御ストリングによって行うことが
好ましい。反対方向へのシフト演算は、左にシフト量CS
Aだけシフトすることによって行われる。
The shift device 10 according to the embodiment of the present invention executes the shift operation only in one direction, for example, only to the left. Operand bits are shifted in a circular fashion. If it is necessary to further manipulate the resulting data, for example leading / trailing zeros or sign extensions, it is preferred to do so with a control string described below. The shift operation in the opposite direction is performed by shifting the shift amount CS to the left.
This is done by shifting by A.

第3図に、循環シフト方式によるシフト装置10の一実
施形態の構造を示す。ただし、k=64および最大シフト
・ゲートは各シフト・レベルにおいてn=4である。パ
イプ段1においてすでにシフト量k/2=32が実施されて
いるので、合計31のシフト量だけが必要である。第1の
シフト・レベル100では、それぞれ隣接する2つのシフ
トゲート間の距離がk/(2n)=8であるシフト量0、
8、16、24が可能である。第2のシフト・レベル110で
は、それぞれ隣接する2つのシフト・ゲート間の距離が
k/(2nn)=2である量0、2、4、6が可能である。
第3の最後のシフト・レベル120では、0および1のシ
フト量のみが必要である。
FIG. 3 shows the structure of one embodiment of the shift device 10 using the cyclic shift method. Where k = 64 and the maximum shift gate is n = 4 at each shift level. Since a shift amount k / 2 = 32 has already been implemented in pipe stage 1, only a total of 31 shift amounts are required. In the first shift level 100, a shift amount 0 in which the distance between two adjacent shift gates is k / (2n) = 8,
8, 16, 24 are possible. In the second shift level 110, the distance between each two adjacent shift gates is
The quantities 0, 2, 4, 6 where k / (2nn) = 2 are possible.
At the third and last shift level 120, only the 0 and 1 shift amounts are needed.

したがって、k=128および最大シフト量が各シフト
・レベルにおいてn=4である循環シフト方式による他
のシフト装置10は次のシフト・レベルを必要とする。第
1のシフト・レベル100では、それぞれ隣接する2つの
シフト量間の距離がk/(2n)=16であるシフト量0、1
6、32、48が可能である。第2のシフト・レベル110で
は、それぞれ隣接する2つのシフト量間の距離がk/(2n
n)=4である量0、4、8、12が可能である。第3の
最後のシフト・レベル120では、0、1、2および3の
シフト量が必要である。
Therefore, another shift device 10 according to the cyclic shift scheme, where k = 128 and the maximum shift amount is n = 4 at each shift level, requires the next shift level. In the first shift level 100, shift amounts 0 and 1 where the distance between two adjacent shift amounts is k / (2n) = 16.
6, 32, 48 are possible. At the second shift level 110, the distance between two adjacent shift amounts is k / (2n
n) = 4, the quantities 0, 4, 8, 12 are possible. The third and final shift level 120 requires 0, 1, 2 and 3 shift amounts.

k/2bビット・データをシフトする必要がある場合、シ
フト構造は、追加の特徴として、レジスタA REGからの
内容をB REGに複写でき、逆もまた同様に複写できる複
写機能を多重化装置内40に必要とする。例えば、マスク
の下の文字を挿入せよ(ICM)、マスクの下の論理文字
を比較せよ(CLM)、マスクの下の文字を記憶せよ(STC
M)、または切捨て(TRUNC)機能などIBM S/390命令に
対して、およびパリティ予測を適用するすべてのシフト
に対して複写が必要になる。
If k / 2b bits of data need to be shifted, the shift structure has an additional feature that a copy function in the multiplexer that allows the contents from register A REG to be copied to B REG and vice versa. You need 40. For example, insert the characters under the mask (ICM), compare the logical characters under the mask (CLM), and memorize the characters under the mask (STC
M), or duplication is required for IBM S / 390 instructions, such as the truncation function, and for every shift that applies parity prediction.

循環方式のシフトでは、線形シフト演算からの結果と
同じ結果を受け取るためにある処理が必要である。本発
明の好ましい実施形態では、そのような処理は、ビット
値の個々のストリングによって行われる。シフト量は、
シフト結果の有効ビットを画定しかつまた任意選択のパ
リティ予測を制御できるビット・ストリングに復号され
る。ビット・ストリングは、データの妥当性を画定し、
パリティ予測用のパリティ・ビットを任意に選択する。
Circular shifts require some processing to receive the same result as a linear shift operation. In a preferred embodiment of the invention, such processing is performed by individual strings of bit values. The shift amount is
The shift result is decoded into a bit string that defines the significant bits and also controls the optional parity prediction. The bit string defines the validity of the data,
Arbitrarily select a parity bit for parity prediction.

例:64ビット・シフト装置 本発明を詳細に説明するために実施形態の一例を示
す。この実施形態は、64ビット・シフト装置を有する第
2図に従う構造を含む。この例のシフト装置は次の演算
を実行できる。
Example: 64-bit shift device An example of an embodiment will be described in order to explain the present invention in detail. This embodiment includes a structure according to FIG. 2 with a 64-bit shift device. The shift device of this example can execute the following operation.

1)4バイトまたは8バイトの左または右へのシフト。
シフトは算術シフト(所要の符号拡張)または論理シフ
トである。シフト量は0ビットから63ビットまでであ
る。
1) Shift 4 or 8 bytes left or right.
The shift is an arithmetic shift (required sign extension) or a logical shift. The shift amount is from 0 bit to 63 bits.

2)IBM S/390命令、マスクの下の文字を挿入せよ(IC
M)などのバイト演算。マスク内の1の個数の長さに等
しい記憶装置内の隣接するフィールドからのバイトは、
マスク内の1の位置に従って再配置される。オペランド
長は最大4バイトである。表4も参照されたい。
2) IBM S / 390 instruction, insert character under mask (IC
Byte operations such as M). Bytes from adjacent fields in storage equal to the length of the number of ones in the mask are:
Rearranged according to one position in the mask. The operand length is a maximum of 4 bytes. See also Table 4.

例 記憶オペランド ABC マスク 1101 結果 AB0C 3)IBM S/390命令、マスクの下の文字を記憶せよ(STC
M):レジスタからのバイトは、マスクに従って選択さ
れ、記憶装置内の隣接するバイト位置に記憶される。表
5も参照されたい。
Example Storage operand ABC mask 1101 Result AB0C 3) IBM S / 390 instruction, store the character under the mask (STC
M): The byte from the register is selected according to the mask and stored in an adjacent byte location in the storage device. See also Table 5.

例 レジスタ ABCD マスク 0110 結果 00BC 4)切捨て:4バイト・オペランドは左側または右側で切
捨てられる。切捨て量は0〜31である。
Example Register ABCD Mask 0110 Result 00BC 4) Truncate: 4-byte operands are truncated on the left or right. The truncation amount is 0 to 31.

例のシフト構造 上記の機能は、シフト要素がマルチプレクサの6つの
レベルを適用し、したがってレベル1が左または右への
32のシフト量を実行できることによって、またはシフト
要素がデータを直通させることによって行うことができ
る。追加のレベルは、16、8、4、2、1のシフト量を
実行する。しかしながら、その場合は、信号は、結果を
得るために論理の6つのレベルを通過する必要がある。
これは非常に時間がかかり、大きな欠点である。
Example Shift Structure The above function is that the shift element applies the six levels of the multiplexer, so that level 1 is left or right
This can be done by being able to perform 32 shift amounts, or by having the shift element pass data through. The additional levels perform 16, 8, 4, 2, 1 shift amounts. However, in that case, the signal needs to pass through six levels of logic to get the result.
This is very time consuming and a major drawback.

第4a図に、循環シフト方式によるシフト装置10および
任意選択のパリティ予測装置30の一部30aの一実施形態
の構造を示す。第4b図に、任意選択のパリティ予測装置
30の一部30bおよび任意選択のパリティ発生装置20の一
実施形態の構造を示す。マルチプレクサの3つのレベル
だけが表1の機能を実行する。データは、表1に従って
AレジスタおよびBレジスタ内に与えられる。第2図の
パイプ段1は、表1内で予想されるデータを与えること
ができる。これは、パイプ・レベル2のシフト装置に必
要である。
FIG. 4a shows the structure of an embodiment of the shift device 10 and the part 30a of the optional parity prediction device 30 based on the cyclic shift method. Figure 4b shows an optional parity prediction device.
2 shows the structure of one embodiment 30b of 30 and optional parity generator 20; Only the three levels of the multiplexer perform the functions in Table 1. Data is provided in the A and B registers according to Table 1. Pipe stage 1 of FIG. 2 can provide the data expected in Table 1. This is required for pipe level 2 shift devices.

例のシフト装置10 シフト装置10は、3つのマルチプレクサ・レベルを有
するすべての所要の機能を実行する。第4a図を参照され
たい。シフト量SA>=32のシフトは、第1のパイプ段内
ですでに量0〜31のシフトに低下している。マルチプレ
クサの3つのレベル(SUレベル1〜3)は、SA0〜31の
すべてのシフト、さらにIBM S/390命令ICM、CLM、STCM
および各種のマイクロ命令など若干の帰納を実行するの
に必要である。SUレベル1はバイト・シフト(左への
8、16、24)を行う。これらのシフト・レベルは、すべ
てのバイト・シフト、特にICMやSTCMなど、マスクによ
って制御される演算に必要である。SUレベル2は2、
4、または6ビットの左シフトを行い、レベル3は1の
シフトのみを行う。
Example Shift Unit 10 Shift unit 10 performs all required functions with three multiplexer levels. See FIG. 4a. Shifts with a shift amount SA> = 32 have already been reduced to shifts with amounts 0 to 31 in the first pipe stage. The three levels of the multiplexer (SU levels 1-3) are all shifts of SA0-31, plus the IBM S / 390 instructions ICM, CLM, STCM
And to perform some induction such as various microinstructions. SU level 1 performs a byte shift (8, 16, 24 to the left). These shift levels are required for all byte shifts, especially mask controlled operations such as ICM and STCM. SU level 2 is 2,
A left shift of 4 or 6 bits is performed, and a level 3 shift of 1 is performed only.

入力STRAIGHTを活動化することによって3つのレベル
すべてをバイパスすることができる。シフト結果のビッ
トは、SUレベル3においてすべてのゲート信号を非活動
化することによって0にされる。AUXILIARY入力を使用
して、算術右シフトの場合に符号拡張を行い、算術左シ
フトの場合に符号を挿入する。バイト・シフトはすべて
シフト・レベル1において行われ、量<=7のシフトは
すべてレベル2および3において行われる。例えば、IC
M/STCMはシフト・レベル1のみを必要とする。表4およ
び5を参照されたい。
All three levels can be bypassed by activating the input STRAIGHT. The bits resulting from the shift are forced to zero by deactivating all gate signals at SU level 3. Use the AUXILIARY input to perform sign extension for arithmetic right shifts and insert a sign for arithmetic left shifts. All byte shifts are performed at shift level 1, and all shifts of quantity <= 7 are performed at levels 2 and 3. For example, IC
M / STCM requires only shift level 1. See Tables 4 and 5.

例のストリングの実施形態 シフト量は、シフト結果の有効ビットを画定し、パリ
ティ予測を制御するビット・ストリングに復号される。
ストリングは、データの妥当性を画定し、パリティ予測
用のパリティ・ビットを選択する。表3を参照された
い。
Example String Embodiment The shift amount defines the significant bits of the shift result and is decoded into a bit string that controls parity prediction.
The string defines the validity of the data and selects the parity bits for parity prediction. See Table 3.

表1に、制御ストリングSの機能を示す。ストリング
は、幅32であるが、最大64ビットのシフト装置結果を制
御する。これは、ストリングの第2の半分が完全に
「0」かまたは完全に「1」であるためである。論理
上、このストリングは、64ビットのストリングと考えら
れる。空ビット位置が0に置き代わっている論理シフト
の場合、または符号ビットが拡張されている算術シフト
の場合(算術右シフトSRA)、制御ストリングS(i)
i=0〜63を適用して、先行0を画定する、または符号
を担持するビット位置を画定する。制御ストリングS
は、シフト量SAから発生する。例えば、SA=16の場合、
Si=1、i=0〜47、Sj=0、j=48〜63となる。スト
リングSは、左側に48個の1を含み、右側に16個の0を
含む。第4図から明らかなように、Siの各ビット位置i
は、シフト装置のレベル3のビット位置iを制御する。
入力(STRAIGHT、LEFT1、AUXILIARY)のいずれも活動化
されていない場合、MUXiの出力は0である。
Table 1 shows the function of the control string S. The string is 32 in width, but controls up to 64 bits of shifter result. This is because the second half of the string is either completely "0" or completely "1". Logically, this string is considered a 64-bit string. In the case of a logical shift in which the empty bit position is replaced by 0, or in the case of an arithmetic shift in which the sign bit is extended (arithmetic right shift SRA), the control string S (i)
Apply i = 0-63 to define leading zeros or define bit positions that carry the sign. Control string S
Is generated from the shift amount SA. For example, if SA = 16,
Si = 1, i = 0-47, Sj = 0, j = 48-63. The string S contains 48 ones on the left and 16 zeros on the right. As is apparent from FIG. 4, each bit position i of Si
Controls the bit position i of level 3 of the shift device.
If none of the inputs (STRAIGHT, LEFT1, AUXILIARY) are activated, the output of MUXi is zero.

論理左シフトの場合、ストリングは直接適用できる。
論理右シフトの場合、上記の例を考慮して、16個の0が
左側にあり、48個の1が右側にあるようにストリングを
交換する。
For a logical left shift, the strings can be applied directly.
In the case of a logical right shift, considering the above example, the strings are swapped such that 16 zeros are on the left and 48 ones are on the right.

符号が拡張されている(算術右シフトSRA)または元
の符号がその位置を保っている(算術左シフトSLA)算
術シフトの場合、MUXレベル3のAUXILIARY入力を使用し
て符号ビットを駆動する。SRAの場合、符号はS(i)
i=0〜63が0を担持するすべてのビット位置に駆動さ
れる。
For arithmetic shifts where the sign is extended (arithmetic right shift SRA) or the original sign retains its position (arithmetic left shift SLA), the MUX level 3 AUXILIARY input is used to drive the sign bit. For SRA, the code is S (i)
i = 0-63 are driven to all bit positions that carry zero.

表1に、IBM S/390シフト命令、適用された制御スト
リングS、およびパイプ・レベル1における演算のA RE
GおよびB REG内の適切な結果を示す。2つのシフトがオ
ペランドABCD EFGHにアクセスし、4バイト・シフトがA
BCDのみにアクセスすると仮定する。ただし、A〜Hは
それぞれバイトを表わす。
Table 1 shows the IBM S / 390 shift instruction, the applied control string S, and the A RE of the operation at pipe level 1.
Shows relevant results in G and B REGs. 2 shifts access the operand ABCD EFGH, 4 byte shift is A
Assume that you only access BCD. Here, A to H each represent a byte.

例のパリティ予測のストリング・サポート 第4b図では、パリティ予測論理により、一般にパリテ
ィ予測に必要な制御論理の量がかなり少なくなる。発生
したダブル・ワード・パリティ(信号+発生したダブル
・ワード・パリティ)は予測したダブル・ワード・パリ
ティと比較される。その場合、元のシフト・オペランド
のパリティ・ビットは、制御ストリングSに従って選択
される。表2を参照されたい。選択したパリティ・ビッ
トは予測したダブル・ワード・パリティを発生する。こ
の予測したダブル・ワード・パリティは(算術左シフト
の場合)符号挿入または(算術右シフトの場合)符号拡
張によって、および部分的にシフト・アウトしたビット
(信号PARITY OF PART.SHIFTED BYTE)によって再び操
作される。
Example String Support for Parity Prediction In FIG. 4b, the parity prediction logic generally reduces significantly the amount of control logic required for parity prediction. The generated double word parity (signal + generated double word parity) is compared to the predicted double word parity. In that case, the parity bits of the original shift operand are selected according to the control string S. See Table 2. The selected parity bit produces the predicted double word parity. This predicted double-word parity is re-established by sign insertion (for arithmetic left shift) or sign extension (for arithmetic right shift), and by partially shifted out bits (signal PARITY OF PART.SHIFTED BYTE). Operated.

右シフトの場合、交換された制御ストリングのビット
7、15、23および31がパリティ予測のために取るべき元
のオペランドのパリティ・ビットを画定する。左シフト
の場合、制御ストリング・ビット0、8、16および24が
予測のためにパリティ・ビットを画定する。
For a right shift, bits 7, 15, 23 and 31 of the exchanged control string define the parity bits of the original operand to be taken for parity prediction. For a left shift, control string bits 0, 8, 16, and 24 define the parity bits for prediction.

その他の例 例1)シフト量SA<32の場合の左シフト・ダブルSLDL
(レジスタ対Ri、Ri+1、i=偶数からの8バイト・オ
ペランド) RAはレジスタRiをアドレス付けし、RBはレジスタRi+
1をアドレス付けする。したがって、元のオペランドAB
CD EFGHは、AREGにABCDとして入力され、BREGにEFGHと
して入力される。
Other examples Example 1) Left shift double SLDL when shift amount SA <32
(Register pair Ri, Ri + 1, i = 8 byte operand from even) RA addresses register Ri, and RB registers Ri +
Address one. Therefore, the original operand AB
CD EFGH is input to AREG as ABCD, and input to BREG as EFGH.

例2)SA>=32の場合のSLDL RAはRi+1をアドレス付けし、RBはRiをアドレス付け
する。したがって、AREGはEFGHを含み、BREGはABCDを含
む。32ビット位置の循環シフトは、遅延を加えることな
しに行われた。元のオペランドABCD EFGHはA/BREGにEFG
H ABCDして読み込まれる。
Example 2) SLDL RA for SA> = 32 addresses Ri + 1 and RB addresses Ri. Thus, AREG contains EFGH and BREG contains ABCD. The cyclic shift of the 32-bit position was performed without any delay. Original operand ABCD EFGH is EFG to A / BREG
H ABCD and read.

例3)SA<32の場合の右シフト・ダブルSRDL(8バイ
ト) RAはRi+1をアドレス付けし、RBはRiをアドレス付け
する。したがって、元のデータABCD EFGHは、AREG内で
はEFGHとして現れ、BREG内ではABCDとして現れる。この
交換は、シフト量の補数で循環左シフトすることによっ
て右シフトを行う時に必要である。シフト32はパイプ1
内で行われるので、CSA=32−SAである。
Example 3) Right shift double SRDL when SA <32 (8 bytes) RA addresses Ri + 1 and RB addresses Ri. Thus, the original data ABCD EFGH appears as EFGH in AREG and as ABCD in BREG. This exchange is necessary when performing a right shift by performing a cyclic left shift with the complement of the shift amount. Shift 32 is pipe 1
CSA = 32−SA.

例4)SA<32の場合の算術右シフト・ダブルSRDA(8バ
イト) RAはRi+1をアドレス付けし、RBはRiをアドレス付け
する。したがって、元のデータABCD EFGHは、AREG内で
はEFGHとして現れ、BREG内ではABCDとして現れる。この
交換は、シフト量の補数で循環左シフトすることによっ
て右シフトを行う時に必要である。シフト32はパイプ1
内で行われるので、CSA=32−SAである。算術シフトで
は、符号を拡張する必要がある。0を担持するストリン
グSのすべてのビット位置は、符号がそこまで拡張され
るビット位置を指示する。符号はSUレベル3のAUXILIAR
Y入力において駆動される。
Example 4) Arithmetic shift right double SRDA for SA <32 (8 bytes) RA addresses Ri + 1 and RB addresses Ri. Thus, the original data ABCD EFGH appears as EFGH in AREG and as ABCD in BREG. This exchange is necessary when performing a right shift by performing a cyclic left shift with the complement of the shift amount. Shift 32 is pipe 1
CSA = 32−SA. Arithmetic shift requires sign extension. Every bit position in the string S that carries a zero indicates a bit position to which the sign is extended. The sign is AUXILIAR of SU level 3
Driven at the Y input.

例5)SA=19の場合の算術右シフトSRA(4バイト) 4バイトのみを適用するシフト装置10によって実行さ
れるすべての命令について、RAおよびRBは同じレジスタ
をアドレス付けする。したがって、オペランドはAREGお
よびBREGに複写される。また、複写は、パリティ予測に
も必要である。部分的にシフトしたバイトのシフト・ア
ウトされたビットは、シフト装置バイト0位置において
のみ検知される。第4図を参照されたい。表6に、例と
してSA=19の場合の算術右シフトSRA(4バイト)演算
を示す。
Example 5) Arithmetic right shift SRA with SA = 19 (4 bytes) For all instructions executed by the shifter 10 applying only 4 bytes, RA and RB address the same register. Therefore, the operand is copied to AREG and BREG. Copying is also required for parity prediction. The shifted out bits of the partially shifted byte are detected only at the shifter byte 0 position. See FIG. Table 6 shows an arithmetic right shift SRA (4 bytes) operation when SA = 19 as an example.

例6)例5のSA<32の場合のSRA 表2に、パリティ予測に貢献するパリティ・ビットの
選択を示す。上記の例5の場合と同様に、SA<32の場合
のSRAについて説明する。バイト・パリティは奇数であ
ると仮定する。
Example 6) SRA of Example 5 for SA <32 Table 2 shows the selection of parity bits that contribute to parity prediction. The SRA in the case of SA <32 will be described as in the case of the above Example 5. Assume that the byte parity is odd.

表7に、例としてSA<32の場合の算術右シフトSRA
(4バイト)演算を示す。ビット位置CSA(31、23)はP
0=1およびP1=0を選択し、P2、P3およびP4〜P7は1
に駆動される。予測ダブル・ワード・パリティPDはP0〜
P7から構成される。シフト量SAは奇数なので、奇数個の
符号ビットが拡張される。さらに、最後の予測パリティ
について、部分的にシフトしたバイトのパリティを考慮
する必要がある。
Table 7 shows an example of arithmetic right shift SRA when SA <32.
(4 bytes) Indicates an operation. Bit position CSA (31,23) is P
Select 0 = 1 and P1 = 0, and P2, P3 and P4-P7 are 1
Is driven. Predicted double word parity PD is P0 ~
Consists of P7. Since the shift amount SA is an odd number, an odd number of sign bits are extended. Furthermore, for the last predicted parity, it is necessary to consider the parity of the partially shifted bytes.

フロントページの続き (72)発明者 プフェッフェー、エルウイン ドイツ国ホルツガーリンゲン、テックシ ュトラーセ 12 (72)発明者 ゲルトナー、ウーテ ドイツ国、シェーンアイヒ、ウオルデン ベッカー シュトラーセ 30/1 (72)発明者 ゲアヴィヒ、ギュンター ドイツ国シモツハイム、イム シュレブ ッシュ 9 (58)調査した分野(Int.Cl.6,DB名) G06F 5/01,7/00Continued on the front page (72) Inventor Pffeffe, Erwin Holzgarlingen, Germany, Techstutras 12 (72) Inventor Gertner, Oute Germany, Schöneich, Walden Becker Strasse 30/1 (72) Inventors Geavig, Gunter Germany Simotzheim, Im Schrebuch 9 (58) Fields studied (Int.Cl. 6 , DB name) G06F 5 / 01,7 / 00

Claims (17)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数のオペランド・レジスタ(A REG、B R
EG)内に個々にまたは組合せの形で読み出すことができ
るデータ(R0〜R3)を含むデータ・ストア(DLS)と、 オペランド・レジスタ(A REG、B REG)の出力に結合さ
れたシフト装置(10)とを含み、 データ・ストア(DLS)の出力に結合され、シフトすべ
き読み出されたデータ(R0〜R3)を複数のオペランド・
レジスタ(A REG、B REG)内に配置することによって必
要な場合に少なくとも1つのシフト演算を行う多重化装
置(40)を特徴とする、シフト演算を実行するシフト構
造。
A plurality of operand registers (A REG, BR
EG) and a data store (DLS) containing data (R0-R3) that can be read individually or in combination, and a shift device (AREG, BREG) coupled to the outputs of the operand registers (AREG, BREG). 10) and coupled to the output of the data store (DLS) to read the data to be shifted (R0-R3) into a plurality of operands.
A shift structure for performing a shift operation, characterized by a multiplexing device (40) for performing at least one shift operation when required by placing it in a register (A REG, B REG).
【請求項2】シフト演算を連続する2つのパイプ段内で
実行し、ただしデータ・ストア(DLS)および多重化装
置(40)がパイプ段の第1の段内にあり、シフト装置
(10)がパイプ段の第2の段内にあることを特徴とす
る、請求項1に記載のシフト構造。
2. The method according to claim 1, wherein the shift operation is performed in two consecutive pipe stages, provided that the data store (DLS) and the multiplexer (40) are in the first stage of the pipe stage and the shift device (10). Shift structure according to claim 1, characterized in that is in the second stage of the pipe stage.
【請求項3】データ・ストア(DLS)がそれぞれ最大k/2
ビット長を有するデータ(R0〜R3)を含み、データ(R0
〜R3)が、それぞれk/2ビット長を有する一対のオペラ
ンド・レジスタ(A REG、B REG)内に個々にまたは最大
kビット長を有する対として読み込むことができ、 kビット長を有するシフト装置(10)が、オペランド・
レジスタ(A REG、B REG)の対に結合され、かつ複数の
シフト要素を含み、 多重化装置(40)が、シフトすべきk/2ビット・データ
(R0〜R3)をそれぞれオペランド・レジスタ(A REG、B
REG)の少なくとも1つに配置することによって必要な
場合にk/2ビット・シフトを行い、 シフト装置(10)が、k/4の最大シフト量を有するシフ
ト要素のみを必要とすることを特徴とする、請求項1ま
たは2に記載のシフト構造。
3. The data store (DLS) has a maximum of k / 2
Including data (R0 to R3) having a bit length, data (R0
R3) can be read individually or as pairs having a maximum length of k bits into a pair of operand registers (A REG, B REG) each having a length of k / 2 bits, a shift device having a length of k bits (10) is the operand
The multiplexer (40) is coupled to a pair of registers (A REG, B REG) and includes a plurality of shift elements, and the multiplexer (40) stores the k / 2-bit data (R0-R3) to be shifted in each of the operand registers (R0-R3). A REG, B
REG) to perform a k / 2-bit shift when necessary, wherein the shift device (10) requires only a shift element having a maximum shift amount of k / 4. The shift structure according to claim 1, wherein
【請求項4】多重化装置(40)が、オペランド・レジス
タ(A REG、B REG)の内容を複写する複写装置を含むこ
とを特徴とする、請求項1ないし3のいずれか一項に記
載のシフト構造。
4. The device according to claim 1, wherein the multiplexing device includes a copying device for copying the contents of the operand registers. Shift structure.
【請求項5】それぞれ異なるシフト量を有するn個、p
個、q個などのシフト・ゲートを含む複数の連続するシ
フト・レベルを含み、ただしn、p、qなどおよびシフ
ト量は整数を表し、 第1のシフト・レベルにおいて、シフト・ゲートが、そ
れぞれ隣接する2つのシフト量間の距離がk/(2n)であ
るシフト量:0、k/(2n)、2*k/(2n)、3*k/(2
n)、4*k/(2n)、...、(n−2)*k/(2n)、(n
−1)*k/(2n)を含み、 各連続するシフト・レベルにおいて、隣接する2つのシ
フト量間の距離がk/(2II)に分割され、ただしIIは現
在までの前のシフト・レベルのシフト・ゲートの数の積
を表わす、請求項1ないし4のいずれか一項に記載のシ
フト構造内で使用でき、循環方法で一方向のみにシフト
演算を実行するkビット長を有するシフト装置(10)。
5. The method according to claim 1, wherein n and p have different shift amounts.
, P, q, etc., and the amount of shift represents an integer, and at the first shift level, the shift gates are: Shift amounts in which the distance between two adjacent shift amounts is k / (2n): 0, k / (2n), 2 * k / (2n), 3 * k / (2
n), 4 * k / (2n), ..., (n-2) * k / (2n), (n
-1) * k / (2n), at each successive shift level the distance between two adjacent shift amounts is divided into k / (2II), where II is the previous shift level up to now Shift device having a k-bit length, which can be used in the shift structure according to any one of claims 1 to 4 and performs a shift operation in one direction only in a cyclic manner (Ten).
【請求項6】最後のシフト・レベルがシフト量1で終わ
ることを特徴とする、請求項5に記載のシフト装置(1
0)。
6. The shift device according to claim 5, wherein the last shift level ends with a shift amount of one.
0).
【請求項7】個々のビット値またはバイト値から構成さ
れるストリングが、循環シフト結果を線形シフト結果に
訂正し、それによりシフトすべきシフト量が、シフト結
果の有効ビットを画定するストリングに復号されること
を特徴とする、請求項5または6に記載のシフト装置
(10)。
7. A string comprising individual bit values or byte values, wherein the cyclic shift result is corrected to a linear shift result, whereby the amount of shift to be shifted is decoded into a string defining the significant bits of the shift result. Shifting device (10) according to claim 5 or 6, characterized in that the shifting is performed.
【請求項8】パリティ予測装置(30)を含むことを特徴
とする、請求項5ないし7のいずれか一項に記載のシフ
ト装置(10)。
8. A shift device (10) according to any one of claims 5 to 7, characterized in that it comprises a parity prediction device (30).
【請求項9】パリティ予測装置(30)内で、部分的にシ
フトされたバイトのシフト・アウトされるビットの計数
が片側でのみ達成されることを特徴とする、請求項8に
記載のシフト装置(10)。
9. A shift as claimed in claim 8, wherein the counting of the bits shifted out of the partially shifted bytes is effected only on one side in the parity estimator (30). Equipment (10).
【請求項10】パリティ予測装置(30)内で、部分的に
シフトされたバイトのシフト・アウトされるビットの計
数が、ビットを循環方式でシフトする側でのみ達成され
ることを特徴とする、請求項9に記載のシフト装置(1
0)。
10. In the parity predictor (30), the counting of bits shifted out of the partially shifted bytes is achieved only on the side shifting the bits in a cyclic manner. The shift device (1) according to claim 9,
0).
【請求項11】ストリングが、パリティ予測装置(30)
内でパリティ予測のためにパリティ・ビットを選択する
ことによってパリティ予測を制御できることを特徴とす
る、請求項8ないし10のいずれか一項に記載のシフト装
置(10)。
11. The apparatus according to claim 10, wherein the string is a parity prediction device.
Shift device (10) according to one of the claims 8 to 10, characterized in that the parity prediction can be controlled by selecting the parity bits for the parity prediction within.
【請求項12】請求項1ないし11のいずれか一項に記載
のシフト構造またはシフト装置(10)を特徴とする、プ
ロセッサ装置内でデータ操作を実行する実行装置。
12. An execution device for performing data operations in a processor device, characterized in that it comprises a shift structure or a shift device (10) according to any one of the preceding claims.
【請求項13】請求項1ないし12のいずれか一項に記載
のシフト構造またはシフト装置(10)または実行装置を
特徴とする、プロセッサ・チップ。
13. A processor chip, characterized by a shift structure or a shift device (10) or an execution device according to any one of the preceding claims.
【請求項14】データ・ストア(DLS)からシフトすべ
きオペランドを読み出すステップと、 オペランドを多重化装置(40)によって複数のオペラン
ド・レジスタ(A REG、B REG)内に入力し、それにより
必要な場合に少なくとも1つの部分シフトを実行するス
テップと、 シフト装置(10)によって残りの部分シフトを実行する
ことによってオペランドをシフトするステップとを含
む、シフト演算を実行する方法。
14. Reading an operand to be shifted from a data store (DLS), and inputting the operand by a multiplexer (40) into a plurality of operand registers (A REG, B REG), thereby requiring Performing at least one partial shift if necessary, and shifting the operand by performing the remaining partial shifts by the shift device (10).
【請求項15】シフトすべきオペランドを読み出すステ
ップおよび、オペランドを複数のオペランド・レジスタ
内に入力するステップを、第1のサイクル中に第1のパ
イプ段内で実行し、 シフト装置(10)によって残りの部分シフトを実行する
ことによってオペランドをシフトするステップを、次の
サイクル中に第2のパイプ段内で実行することを特徴と
する、請求項14に記載の方法。
Reading the operand to be shifted and inputting the operand into a plurality of operand registers in a first pipe stage during a first cycle; 15. The method of claim 14, wherein shifting the operand by performing a remaining partial shift is performed in a second pipe stage during a next cycle.
【請求項16】シフトすべきオペランドをそれぞれ長さ
k/2ビットの一対のオペランド・レジスタの一方に入力
し、ただしkは整数を表わし、それにより必要な場合に
k/2ビット・シフトを実行し、 オペランドのシフトを、長さkビットのシフト装置内で
残りの部分シフトを連続的にシフトすることによって実
行することを特徴とする、請求項14または15に記載の方
法。
16. Operands to be shifted each have a length.
Input to one of a pair of k / 2-bit operand registers, where k represents an integer, so that
16. The method according to claim 14, wherein a k / 2-bit shift is performed, and the shifting of the operands is performed by successively shifting the remaining partial shifts in a shift device of length k bits. The described method.
【請求項17】シフト量>=k/2だけ左/右にシフトす
るために、最右/最左のk/2データ・ワードのみをオペ
ランド・レジスタの対の最も左/右のレジスタ内に読み
込み、第1のパイプ段におけるサイクル中にk/2シフト
を表わすことを特徴とする、請求項16に記載の方法。
17. To shift left / right by a shift amount> = k / 2, only the rightmost / leftmost k / 2 data words are placed in the leftmost / right register of the operand register pair. 17. The method of claim 16, wherein the reading represents a k / 2 shift during a cycle in the first pipe stage.
JP53142196A 1995-04-18 1995-04-18 Fast pipeline shifter element with parity prediction and string control Expired - Lifetime JP2803788B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP53142196A JP2803788B2 (en) 1995-04-18 1995-04-18 Fast pipeline shifter element with parity prediction and string control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP53142196A JP2803788B2 (en) 1995-04-18 1995-04-18 Fast pipeline shifter element with parity prediction and string control

Publications (2)

Publication Number Publication Date
JPH09509275A JPH09509275A (en) 1997-09-16
JP2803788B2 true JP2803788B2 (en) 1998-09-24

Family

ID=18527698

Family Applications (1)

Application Number Title Priority Date Filing Date
JP53142196A Expired - Lifetime JP2803788B2 (en) 1995-04-18 1995-04-18 Fast pipeline shifter element with parity prediction and string control

Country Status (1)

Country Link
JP (1) JP2803788B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4073721B2 (en) 2002-06-28 2008-04-09 株式会社ルネサステクノロジ Data processing device
US8335810B2 (en) * 2006-01-31 2012-12-18 Qualcomm Incorporated Register-based shifts for a unidirectional rotator

Also Published As

Publication number Publication date
JPH09509275A (en) 1997-09-16

Similar Documents

Publication Publication Date Title
US7461109B2 (en) Method and apparatus for providing packed shift operations in a processor
EP3539130B1 (en) Apparatuses and methods for memory alignment
US7685408B2 (en) Methods and apparatus for extracting bits of a source register based on a mask and right justifying the bits into a target register
US7519795B2 (en) Method and system for performing permutations with bit permutation instructions
EP1073950B1 (en) Method and apparatus for performing shift operations on packed data
US5497341A (en) Sign-extension of immediate constants in an ALU using an adder in an integer logic unit
US7480686B2 (en) Method and apparatus for executing packed shift operations
JP3891997B2 (en) Modular binary multiplier for variable width signed and unsigned operands
US20080155210A1 (en) System and method for performing masked store operations in a processor
KR100346515B1 (en) Temporary pipeline register file for a superpipe lined superscalar processor
US5426600A (en) Double precision division circuit and method for digital signal processor
Avizienis Arithmetic algorithms for error-coded operands
KR20080049825A (en) Fast rotator with embeded masking and method therefor
US4477879A (en) Floating point processor architecture which performs square root by hardware
US4905178A (en) Fast shifter method and structure
US20120005458A1 (en) Fast Static Rotator/Shifter with Non Two&#39;s Complemented Decode and Fast Mask Generation
JPH0139131B2 (en)
JP2803788B2 (en) Fast pipeline shifter element with parity prediction and string control
JPS5829538B2 (en) floating point arithmetic unit
US4974188A (en) Address sequence generation by means of reverse carry addition
US5978957A (en) Very fast pipelined shifter element with parity prediction
EP0936537B1 (en) Cyclic redundancy check in a computer system
US5465261A (en) RAM based architecture for ECC circuits
Guyot OCAPI: architecture of a VLSI coprocessor for the GCD and the extended GCD of large numbers.
JPH0370416B2 (en)