JPH07120254B2 - Shifter - Google Patents

Shifter

Info

Publication number
JPH07120254B2
JPH07120254B2 JP61125434A JP12543486A JPH07120254B2 JP H07120254 B2 JPH07120254 B2 JP H07120254B2 JP 61125434 A JP61125434 A JP 61125434A JP 12543486 A JP12543486 A JP 12543486A JP H07120254 B2 JPH07120254 B2 JP H07120254B2
Authority
JP
Japan
Prior art keywords
shift
count register
shift count
shifter
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
JP61125434A
Other languages
Japanese (ja)
Other versions
JPS62282325A (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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP61125434A priority Critical patent/JPH07120254B2/en
Publication of JPS62282325A publication Critical patent/JPS62282325A/en
Publication of JPH07120254B2 publication Critical patent/JPH07120254B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、シフタに関し、特に、そのシフタのシフト数
を制御するシフトカウントレジスタに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shifter, and more particularly to a shift count register that controls the shift number of the shifter.

従来の技術 従来、シフタにおいてそのシフト数を与えシフタを制御
するシフトカウントレジスタはシフタに対して1個設け
られるだけであつた。
2. Description of the Related Art Conventionally, only one shift count register has been provided for a shifter to control the shifter by giving the shift number to the shifter.

発明が解決しようとする問題点 そのために、従来のシフタでは、シフトを行うデータの
ビツト長がシフタのビツト長より長い場合にはシフトを
行うデータをシフタのビツト長ごとに分割してシフトを
行うが、この際2つのシフト数が異なる2つのデータを
交互にシフトしようとすると各シフト動作ごとにシフト
数の発生、シフトカウントレジスタへのセツトを繰り返
し行なわなければならなかつた。
Therefore, in the conventional shifter, when the bit length of the data to be shifted is longer than the bit length of the shifter, the data to be shifted is divided by the bit length of the shifter before shifting. However, at this time, when it is attempted to alternately shift two data having two different shift numbers, it is necessary to repeatedly generate the shift number and set the shift count register for each shift operation.

従つて、シフタの制御が複雑になり、シフト数を演算す
る回路を兼用する場合などにおいては性能低下の要因と
もなる欠点がある。
Therefore, there is a drawback that the control of the shifter becomes complicated and the performance is deteriorated when the circuit for calculating the shift number is also used.

本発明は従来の上記事情に鑑みてなされたものであり、
従つて本発明の目的は、従来の技術に内在する上記欠点
を解消することを可能とした新規なシフタを提供するこ
とにある。
The present invention has been made in view of the above circumstances,
Therefore, an object of the present invention is to provide a novel shifter capable of solving the above-mentioned drawbacks inherent in the conventional technique.

問題点を解決するための手段 上記目的を達成する為に、本発明に係るシフタは、シフ
ト数を保持するn個(n≧2なる整数)の第1から第n
までのシフトカウントレジスタと、与えられたシフト数
または第1シフトカウントレジスタの値を選択して第2
から第nシフトカウントレジスタの任意のシフトカウン
トレジスタに与え与えられたシフト数または第2から第
nシフトカウントレジスタの値を選択して第1シフトカ
ウントレジスタに与える選択手段とを持ち、第1シフト
カウントレジスタの値によりシフトを行うように構成さ
れている。
Means for Solving the Problems In order to achieve the above object, the shifter according to the present invention has an n-th (n ≧ 2 integer) first to n-th holding shift number.
Up to the second shift count register and the selected shift number or the value of the first shift count register
To the n-th shift count register, and a selecting means for selecting the number of shifts given to any shift count register or the value of the second to n-th shift count registers and giving it to the first shift count register. It is configured to perform the shift according to the value of the count register.

実施例 次に本発明についてその好ましい一実施例に基づいて詳
細に説明する。
Example Next, the present invention will be described in detail based on a preferred example thereof.

第1図は本発明の一実施例を示すブロツク構成図であ
る。本実施例では1ワードをiビツトとし、記憶装置と
の読み出し書き込みおよび演算はiビツト単位、つまり
は1ワード単位に行なう情報処理装置において本発明の
シフタを含む場合を考える。
FIG. 1 is a block diagram showing an embodiment of the present invention. In this embodiment, it is assumed that one word is an i-bit, and the information processing apparatus that performs reading / writing and operation with the storage device in i-bit units, that is, in 1-word units includes the shifter of the present invention.

第1図を参照するに、参照番号100,200,300,400はデー
タレジスタであり、それぞれ1ワードのデータを格納す
る。500は2iビツト入力iビツト出力のシフタであり、
データレジスタ100,200のデータを受けてシフトを行
い、データレジスタ300または400に与える。700,800は
シフトカウントレジスタであり、選択手段600によりシ
フトカウントレジスタ700は、与えられたシフト数また
はシフトカウントレジスタ800に格納されているシフト
数を選択して受け、シフトカウントレジスタ800は、与
えられたシフト数またはシフトカウントレジスタ700に
格納されているシフト数を選択して受ける。また、シフ
トカウントレジスタ700はシフタ500にシフト数を与え
る。
Referring to FIG. 1, reference numerals 100, 200, 300 and 400 are data registers, each of which stores one word of data. 500 is a 2i bit input i bit output shifter,
The data in the data registers 100 and 200 is received and shifted, and the result is given to the data register 300 or 400. 700 and 800 are shift count registers, and the selection means 600 causes the shift count register 700 to select and receive the given shift number or the shift number stored in the shift count register 800, and the shift count register 800 receives the given shift number. The number of shifts or the number of shifts stored in the shift count register 700 is selected and received. Further, the shift count register 700 gives the shift number to the shifter 500.

次に、以上の構成を持つ本実施例の動作について説明す
る。ここで本実施例の動作としては、1ワードの途中か
ら始まり複数ワードで構成される2つのオペランドデー
タを取り出し1ワードずつ演算を行う場合において2つ
のオペランドを交互に取り出し1ワードずつのオペラン
ドデータとして取り出す動作を考える。
Next, the operation of this embodiment having the above configuration will be described. Here, as the operation of the present embodiment, when two operand data starting from the middle of one word and composed of a plurality of words are taken out and the operation is carried out word by word, the two operands are taken out alternately as operand data of each word. Consider the action of taking out.

ここで、2つのオペランドは第2図に示されるように、
オペランド1はj+1ビツト目から始まり、オペランド
2はk+1ビツト目から始まつており、最初第3図Step
1に示されるように、オペランド1の第1および第2ワ
ードがデータレジスタ100,200にセツトされ、シフトカ
ウントレジスタ700には、与えられたシフト数jが選択
手段600で選択されてセツトされる。次にStep2に示され
るようにデータレジスタ100,200の値がシフタ500でjビ
ツト左シフトされてデータレジスタ300にセツトされ、
オペランド1の最初の1ワードが取り出される。またそ
の動作と平行してオペランド2の第1第2ワードがデー
タレジスタ100,200にセツトされ、シフトカウントレジ
スタ700には与えられたシフト数kがシフトカウントレ
ジスタ800にはシフトカウントレジスタ700のシフト数j
がそれぞれ選択手段600により選択されてセツトされ
る。続いてStep2と同様にStep3に示されるように、デー
タレジスタ100,200の値がシフタ500でkビツト左シフト
されてデータレジスタ400にセツトされ、オペランド2
の最初の1ワードが取り出される。またその動作と平行
してオペランド1の第2、第3ワードがデータレジスタ
100,200にセツトされ、シフトカウントレジスタ700には
シフトカウントレジスタ800のシフト数jが、シフトカ
ウントレジスタ800にはシフトカウントレジスタ700のシ
フト数kがそれぞれ選択手段600により選択されてセツ
トされる。ここでデータレジスタ300,400にオペランド
1とオペランド2の最初の1ワードがそれぞれ取り出さ
れたことになり、次の演算へと送られる。続いてステツ
プ4においてもステツプ3と同様にデータレジスタ100,
200の値がシフタ500でjビツト左シフトされてデータレ
ジスタ300にセツトされ、オペランド1の2番目の1ワ
ードが取り出され、データレジスタ100,200にはオペラ
ンド2の第2、第3ワードがセツトされ、シフトカウン
トレジスタ700にはシフトカウントレジスタ800のシフト
数kが、シフトカウントレジスタ800にはシフトカウン
トレジスタ700のシフト数jが選択手段600により選択さ
れセツトされる。
Here, the two operands are as shown in FIG.
Operand 1 starts at the j + 1th bit and operand 2 starts at the k + 1th bit.
As shown in 1, the first and second words of the operand 1 are set in the data registers 100 and 200, and the shift count register 700 is selected and set by the selecting means 600 by the given shift number j. Next, as shown in Step 2, the values of the data registers 100 and 200 are shifted left by j by the shifter 500 and set in the data register 300.
The first word of operand 1 is fetched. In parallel with the operation, the first and second words of the operand 2 are set in the data registers 100 and 200, and the shift number k given to the shift count register 700 is stored in the shift count register 800 as the shift number j of the shift count register 700.
Are selected and set by the selection means 600. Then, as in Step 2, as in Step 3, the values in the data registers 100 and 200 are left-shifted by k bits in the shifter 500, set in the data register 400, and the operand 2
The first word of is taken. In parallel with the operation, the second and third words of operand 1 are data registers.
The number of shifts j of the shift count register 800 is set in the shift count register 700, and the number of shifts k of the shift count register 700 is selected in the shift count register 800 by the selecting means 600. Here, the first one word of the operand 1 and the operand 2 is fetched into the data registers 300 and 400, respectively, and sent to the next operation. Then, in step 4, as in step 3, the data register 100,
The value of 200 is shifted to the left by j bits by the shifter 500 and set in the data register 300, the second word of the operand 1 is taken out, and the second and third words of the operand 2 are set in the data registers 100 and 200. The shift count register 700 selects the shift number k of the shift count register 800, and the shift count register 800 selects the shift number j of the shift count register 700 by the selecting means 600 to be set.

以下、オペランド1とオペランド2をそれぞれ1ワード
ずつずらして交互にデータレジスタ100,200にセツト
し、ステツプ3,ステツプ4の動作を繰り返すことにより
オペランド1、オペランド2が1ワードずつワード数が
何ワードであつても同様の動作で取り出すことができ
る。
After that, operand 1 and operand 2 are shifted by 1 word each, and they are alternately set in the data registers 100 and 200, and the operations of steps 3 and 4 are repeated. However, the same operation can be performed.

発明の効果 以上説明したように、本発明によれば、最初に必要なシ
フト数を複数のシフトカウントレジスタにセツトするこ
とにより1つのシフタで複数のデータのシフトを交互に
行う場合の制御が簡単になる効果が得られる。
EFFECTS OF THE INVENTION As described above, according to the present invention, the control in the case where a plurality of shift count registers are set to the required number of shifts first and the plurality of data are alternately shifted is simple. The effect of becoming.

また、本実施例ではステツプ1、ステツプ2で順次2つ
のオペランドのシフト数をセツトしたが、この2つのシ
フト数を最初のシフト動作以前にセツトしておくことも
可能であり、シフト数発生のタイミングの自由度も増す
ことと各々1回ずつ計算すればよいことによりシフト数
発生のための計算手段を他の制御、演算のための計算手
段と兼用しなければならない場合など、シフト数の発生
が性能低下の原因となりにくいのはあきらかである。
Further, in the present embodiment, the shift numbers of the two operands are sequentially set in step 1 and step 2, but it is possible to set these two shift numbers before the first shift operation, and the shift number is not generated. When the calculation means for generating the shift number must also be used as the calculation means for other control and calculation because the degree of freedom of timing is increased and the calculation can be performed only once, the shift number is generated. It is clear that is unlikely to cause performance degradation.

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

第1図は本発明の一実施例を示すブロツク構成図、第2
図、第3図は本実施例の動作を説明するための図であ
る。 100,200,300,400……データレジスタ、500……シフタ、
600……選択手段、700,800……シフトカウントレジスタ
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG.
FIG. 3 and FIG. 3 are diagrams for explaining the operation of this embodiment. 100,200,300,400 …… Data register, 500 …… Shifter,
600 …… Selection means, 700,800 …… Shift count register

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数ビツトから成るデータのシフトを行う
シフタにおいて、シフト数を保持するn個(n≧2なる
整数)の第1から第nまでのシフトカウントレジスタ
と、与えられたシフト数または前記第1シフトカウント
レジスタの値を選択して前記第2から第nシフトカウン
トレジスタの任意のシフトカウントレジスタに格納し与
えられたシフト数または前記第2から第nシフトカウン
トレジスタの値を選択して前記第1シフトカウントレジ
スタに格納するための選択手段とを持ち、前記第1シフ
トカウントレジスタの値によりシフトを行うことを特徴
とするシフタ。
1. A shifter for shifting data consisting of a plurality of bits, wherein n (integers of n ≧ 2) first to nth shift count registers for holding the number of shifts and a given number of shifts or The value of the first shift count register is selected and stored in an arbitrary shift count register of the second to nth shift count registers, and the given shift number or the value of the second to nth shift count register is selected. And a selecting means for storing it in the first shift count register, and shifts according to the value of the first shift count register.
JP61125434A 1986-05-30 1986-05-30 Shifter Expired - Lifetime JPH07120254B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61125434A JPH07120254B2 (en) 1986-05-30 1986-05-30 Shifter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61125434A JPH07120254B2 (en) 1986-05-30 1986-05-30 Shifter

Publications (2)

Publication Number Publication Date
JPS62282325A JPS62282325A (en) 1987-12-08
JPH07120254B2 true JPH07120254B2 (en) 1995-12-20

Family

ID=14909993

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61125434A Expired - Lifetime JPH07120254B2 (en) 1986-05-30 1986-05-30 Shifter

Country Status (1)

Country Link
JP (1) JPH07120254B2 (en)

Also Published As

Publication number Publication date
JPS62282325A (en) 1987-12-08

Similar Documents

Publication Publication Date Title
US4754421A (en) Multiple precision multiplication device
US4722068A (en) Double precision multiplier
JP3188467B2 (en) Minimum / maximum value search device
JPH01182992A (en) Semiconductor memory device
JPH0818550A (en) Code sequence generator
US5019969A (en) Computer system for directly transferring vactor elements from register to register using a single instruction
US5201058A (en) Control system for transferring vector data without waiting for transfer end of the previous vector data
JP3271120B2 (en) Device for fast multiplication of binary numbers
US7296049B2 (en) Fast multiplication circuits
GB2274181A (en) Summation unit.
WO2015015905A1 (en) Arithmetic logic device
JPH07120254B2 (en) Shifter
EP0661648B1 (en) Digital signal processing circuit
EP0825528A2 (en) Digital signal processor
JP2679820B2 (en) Bit reversing device
JP2999101B2 (en) Interleave device
JPH03216026A (en) Apparatus and method for accessing parallelly generated circulating redundancy error check code
JPH0644051A (en) Microcomputer
JPS5947394B2 (en) Variable length two-dimensional register
JPH1083381A (en) Signal processor
SU1103236A1 (en) Data loding device
JP2748404B2 (en) Binary data memory
KR950005801B1 (en) Circuit transmitting image data in graphic system
SU976438A1 (en) Device for determination of character line length
JP3099255B2 (en) Remainder multiplier