JPS59226943A - Shift arithmetic circuit - Google Patents
Shift arithmetic circuitInfo
- Publication number
- JPS59226943A JPS59226943A JP10164983A JP10164983A JPS59226943A JP S59226943 A JPS59226943 A JP S59226943A JP 10164983 A JP10164983 A JP 10164983A JP 10164983 A JP10164983 A JP 10164983A JP S59226943 A JPS59226943 A JP S59226943A
- Authority
- JP
- Japan
- Prior art keywords
- shift
- circuit
- data
- bit
- input
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F5/00—Methods or arrangements for data conversion without changing the order or content of the data handled
- G06F5/01—Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
Abstract
Description
【発明の詳細な説明】
発明の属する技術分野
本発明は、データ処理装置の演算回路等に使用されるシ
フト演算回路に関する。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a shift arithmetic circuit used in an arithmetic circuit of a data processing device.
従来技術
従来のシフト演算回路は、第1図に示すように、右シフ
ト回路1と、左シフト回路2と、シフト回路1,2の出
力を択一的に選択出力する選択回路3とから構成されて
いる。例えば、8ビツトの入力データa。−a7を0〜
3ビツトシフトする回路を例にとって説明すると、左、
右シフト回路1,2はいずれも8ビツト構成の4人力セ
レクタで1、選択回路3は8ビツト構成の2人力セレク
タである。そして、右シフト回路1には8ビツトの入力
データa0〜&7と3ビツトの第1の挿入データC6〜
C3とが入力されて、8ビツト構成の4つの入力回路に
は、それぞれao−a?”+ ” Qtt ao〜a
6′。Prior Art As shown in FIG. 1, a conventional shift calculation circuit is composed of a right shift circuit 1, a left shift circuit 2, and a selection circuit 3 that selectively outputs the outputs of the shift circuits 1 and 2. has been done. For example, 8-bit input data a. -a7 to 0~
Taking a circuit that shifts 3 bits as an example, the left,
The right shift circuits 1 and 2 are both 8-bit four-man selectors, and the selection circuit 3 is an 8-bit two-man selector. The right shift circuit 1 receives 8-bit input data a0~&7 and 3-bit first insertion data C6~
C3 is input, and each of the four input circuits with an 8-bit configuration receives ao-a? "+" Qtt ao~a
6′.
C11e’l、aQ〜a5”t ” Cot et
t Qtt FLo〜&4”i)”入力される。こ
の4つの入力回路のデータは、外部から与えられる選択
信号によって択一的に選択出力される。左シフト回路2
には、同様に8ビツトの入力データa(、”−tagと
第2の挿入データd、−d。C11e'l, aQ~a5"t" Cot et
t Qtt FLo~&4"i)" is input. The data of these four input circuits are selectively output by a selection signal applied from the outside. Left shift circuit 2
Similarly, 8-bit input data a(, "-tag and second insertion data d, -d.
とが入力されて、選択信号によj) ” &Q% a7
”。is input, and according to the selection signal j) ”&Q% a7
”.
al −a7. do”、′a2〜ays dot
al” jまたは’ tLB〜all dot a
tl a、 19が択一的に選択出力される0
第2図(a)は、8ビツトの入力データ” ao% a
7 ”を示し、同図(b)は右シフト時のシフトビット
数と出力データ(8ビツト)との関係を示し、同図(c
)は左シフト時のシフトビット数と出力データ(8ビツ
ト)との関係を示す。al-a7. do”,’a2~ays dot
al" j or' tLB~all dot a
tl a, 19 is selectively output. FIG. 2(a) shows the 8-bit input data "ao% a".
7'', the figure (b) shows the relationship between the number of shift bits and the output data (8 bits) when shifting to the right, and the figure (c)
) indicates the relationship between the number of shift bits during left shift and output data (8 bits).
上述の回路は、8ビツト4人力のセレクタが2個と、8
ビツト2人力のセレクタが1個必要とされる。すなわち
、左、右シフト回路が別々に必要とされるためハードウ
ェア量が多くなるという欠点がある。The circuit described above consists of two 8-bit 4-person selectors and 8
One bit two-man selector is required. That is, there is a drawback that the amount of hardware increases because left and right shift circuits are required separately.
発明の目的
本発明の目的は、上述の従来の欠点を解決し、左、右シ
フト回路のなかで共通化できる部分を共通化することに
よジノ・−・ドウエア量を減少させたシフト演算回路を
提供することにあるO発明の構成
本発明のシフト演算回路は、nビットの入力データを0
〜mビットシフトして出力するシフト演算回路において
、nビットの入力データのうち上位mビットと外部から
与えられるmビットの第1の挿入データとを入力し外部
から与えられるシフト選択信号によシ右シフト動作をし
てmビットの出力データを出す右シフト専用の第1のシ
フト回路と、前記nビットの入力データを入力し前記シ
フト選択信号によってシフト動作してn −mビットの
出力データを出す第2のシフト回路と、前記nビットの
入力データのうち下位mビットと外部から与えられるm
ビットの挿入データを入力し前記シフト選択信号によシ
左シフト動作してmビットの出力データを出す左シフト
専用の第3のシフト回路と、前記第1〜第3のシフト回
路の出力データを入力し外部から与えられる左右選択信
号によって前記第1と第2のシフト回路の出力データま
たは前記第2と第3のシフト回路の出力データのうちい
ずれか一方を択一的に選択出力する選択回路とを備えた
ことを特徴とする。OBJECTS OF THE INVENTION An object of the present invention is to provide a shift calculation circuit which solves the above-mentioned conventional drawbacks and reduces the amount of noise by making parts that can be shared in the left and right shift circuits common. The shift arithmetic circuit of the present invention converts n-bit input data to 0.
~ In a shift calculation circuit that shifts m bits and outputs the data, the upper m bits of n bits of input data and m bits of first insertion data given from the outside are input, and the shift operation circuit shifts the m bits and outputs the shifted data. a first shift circuit dedicated to right shift that performs a right shift operation and outputs m-bit output data; and a first shift circuit dedicated to right shift that inputs the n-bit input data and performs a shift operation according to the shift selection signal to output n - m bits of output data. a second shift circuit that outputs the lower m bits of the n-bit input data and m input from the outside;
a third shift circuit dedicated to left shift which inputs bit insertion data and performs a left shift operation according to the shift selection signal to output m bits of output data; a selection circuit that selectively outputs either the output data of the first and second shift circuits or the output data of the second and third shift circuits according to a left/right selection signal inputted and given from the outside; It is characterized by having the following.
発明の実施例
次に、本発明について、図面を参照して詳細に説明する
。Embodiments of the Invention Next, the present invention will be described in detail with reference to the drawings.
第3図は、本発明の一実施例を示すブロック図でおる。FIG. 3 is a block diagram showing one embodiment of the present invention.
すなわち、nビットの入力データが入力データ線71か
ら第1〜第3のシフト回路4〜6に入力されmビットの
第1の挿入データ72およびmビットの第2の挿入デー
タ73がそれぞれ第1および第3のシフト回路4,6に
入力される。That is, n-bit input data is input from the input data line 71 to the first to third shift circuits 4 to 6, and m-bit first insertion data 72 and m-bit second insertion data 73 are input to the first to third shift circuits 4 to 6, respectively. and is input to the third shift circuits 4 and 6.
第1の挿入データは右シフト時に外部から与えられるデ
ータであシ、第2の挿入データは左シフト時に外部から
与えられるデータである。第1のシフト回路4は右シフ
ト専用のシフト回路であシ、上記mビットの第1の挿入
データおよびnビットの入力データの上位mビットを入
力し、シフト選択信号74によってシフト動作しmビッ
トの出力データ41を出す。例えば8ビツトの入力デー
タをθ〜3ビットシフトする場合を例にとると、第1の
シフト回路4は3ビツト構成の4入力回路のセレクタで
構成される。今8ビットの入力データを89%jL7”
とし、第1の挿入データをn C,、、c2 nとし、
第2の挿入データをdo−d、 ”とすると、第1のシ
フト回路4の4つの入力回路のそれぞれKは、” a(
、al a2”、 ”C7aoal”2 c1 cl
ao″ν″Co cl a@ ”が入力される。そし
て、シフト選択信号の1′00″、’01”、″、″1
1”に0
対応して上記4つのデータが択一的に選択出力される。The first insertion data is data given from the outside when shifting to the right, and the second insertion data is data given from the outside when shifting to the left. The first shift circuit 4 is a shift circuit dedicated to right shifting, receives the m-bit first inserted data and the upper m bits of the n-bit input data, and performs a shift operation by a shift selection signal 74 to shift the m-bits. Output data 41 is output. For example, in the case where 8-bit input data is shifted by .theta..about.3 bits, the first shift circuit 4 is constituted by a 4-input circuit selector having a 3-bit configuration. Now the 8-bit input data is 89%jL7”
Let the first insertion data be n C, , c2 n,
If the second insertion data is do-d, ``, then each K of the four input circuits of the first shift circuit 4 is ``a(
, al a2”, “C7aoal”2 c1 cl
ao″ν″Co cl a@ ” is input. Then, the shift selection signal 1'00″, '01', ″, ″1
The above four data are selectively output in correspondence with 1" and 0.
第1のシフト回路4の3ビツト出力データを”ege1
e2’とすると、シフト選択信号と第1のシフト回路4
の出力データとの関係は第4図(a)に示すようKなる
。The 3-bit output data of the first shift circuit 4 is
e2', the shift selection signal and the first shift circuit 4
The relationship between the output data and the output data is K as shown in FIG. 4(a).
第2のシフト回路5は、nビットの入力データ71を入
力し、シフト選択信号74によってn −mビットの出
力データを出す。例えば8ビット入力データを0〜3ビ
ツトシフトする上述の例でいえば、第2のシフト回路5
は5ビツト構成の4人力回路のセレクタで構成される。The second shift circuit 5 inputs n-bit input data 71 and outputs nm-bit output data in response to a shift selection signal 74. For example, in the above example where 8-bit input data is shifted by 0 to 3 bits, the second shift circuit 5
consists of a 4-person circuit selector with a 5-bit configuration.
4つの入力回路にはそれぞれ、′a3〜a7′、″′a
、〜a6 pt、 ff a1〜a、′。Each of the four input circuits has 'a3 to a7', 'a
, ~a6 pt, ff a1~a,'.
aO−&4 ”が入力され、シフト選択信号74によっ
て択一的に選択出力される。第2のシフト回路5の出力
データ″1.□ f4Nとシフト選択信号74との対応
関係は第4図(a)に示すようになる。左シフト専用の
第3のシフト回路6は、3ピット構成4入力回路のセレ
クタであシ入カデータの下位3ビツト″a、〜a7′と
第2の挿入データ゛d0〜a2Nを入力しシフト選択信
号74によって3ビツトの出力データ゛g0〜g!nを
出す。4つの入力回路には、それぞれ” do”” d
2″、a7 d、 d4 ” 、 ” a6 a7
d(、”。aO-&4'' is input and selectively outputted by the shift selection signal 74. The output data of the second shift circuit 5 is ``1. □ The correspondence relationship between f4N and the shift selection signal 74 is as shown in FIG. 4(a). The third shift circuit 6 dedicated to left shift is a selector with a 3-bit configuration and 4 input circuits, which inputs the lower 3 bits "a, ~a7'" of the input data and the second insertion data "d0~a2N" and outputs a shift selection signal. 74 outputs 3-bit output data {g0~g!n.
2", a7 d, d4", "a6 a7
d(,”.
a、〜a、′が入力されている。第3のシフト回路6の
出力データ″go ”” gt ”とシフト選択信号と
の対応関係は第4図(a)に示す通シである。a, to a,' are input. The correspondence relationship between the output data "go" and "gt" of the third shift circuit 6 and the shift selection signal is as shown in FIG. 4(a).
第1のシフト回路4の出方するmビット(3ビツト)の
出力データ41と、第2のシフト回路5の出力するnm
ビット7(5ビツト)の出力データ51と、第3のシフ
ト回路6の出方するmビット(3ビツト)の出力データ
61とは選択回路3に入力される。The m-bit (3-bit) output data 41 output from the first shift circuit 4 and the nm output data 41 output from the second shift circuit 5
The output data 51 of bit 7 (5 bits) and the output data 61 of m bits (3 bits) output from the third shift circuit 6 are input to the selection circuit 3.
選択回路3は、8ビツト構成(一般にはnビット)の2
人力回路のセレクタで構成され、一方の入力回路には第
1のシフト回路4の出力データ41と第2のシフト回路
5の出力データ51とが入力され、他方の入力回路には
第2のシフト回路5の出力データ51と第3のシフト回
路6の出力データ61とが入力される。上記両入方回路
のデータは左右選択信号l (l Onまたは”1”)
Xによって択一定に選択され、シフト結果データ31と
して出力される。左右選択信号lが60”のときは選択
回路3の出力するシフト結果データは’e(Ie。The selection circuit 3 has an 8-bit configuration (generally n bits).
The output data 41 of the first shift circuit 4 and the output data 51 of the second shift circuit 5 are input to one input circuit, and the second shift circuit 5 is input to the other input circuit. Output data 51 of the circuit 5 and output data 61 of the third shift circuit 6 are input. The data of the above both input circuits is the left and right selection signal l (l On or “1”)
A constant selection is made by X and output as shift result data 31. When the left/right selection signal l is 60'', the shift result data output from the selection circuit 3 is 'e (Ie).
e2 f、) fl f21B f4 ”であシ、lが
71”(7) (!: キtD シフト結果データは”
fo flft f3 f4 go gt g2”で
ある(第4図(c)参照)0
従って、例えばシフト選択信号が′oo”で右シフトの
ときはシフト結果データはao−a7 ”でるシフトビ
ット数は0であるが、左シフトのときはシフト結果デー
タはa3〜ay、dOdl d、 ”となり、シフトビ
ット数は3である。左、右シフト時のシフト選択信号と
シフトビット数との関係は第4図(b) K示すように
なる。すなわち、0〜3ビツトのシフト演算が可能であ
る。e2 f,) fl f21B f4 ``Ashi, l is 71'' (7) (!: Ki tD Shift result data is''
fo flft f3 f4 go gt g2'' (see Figure 4(c)) 0 Therefore, for example, when the shift selection signal is 'oo' and the shift is to the right, the shift result data is ao-a7''.The number of shift bits output is 0. However, in the case of left shift, the shift result data is a3 to ay, dOdl d,'', and the number of shift bits is 3. The relationship between the shift selection signal and the number of shift bits during left and right shifts is as shown in FIG. 4(b)K. That is, a shift operation of 0 to 3 bits is possible.
WKnピント入方データを0〜mビットシフトする場合
は、第1および第3のシフト回路4゜6をそれぞれmビ
ット構成の(m+1)入力回路のセレクタで構成し、第
2のシフト回路5を(nm)ビット構成の(m+1)入
力回路のセレクタで構成し、選択回路3をnビット構成
の2人力回路のセレクタで構成すれば良い。When shifting WKn focus input data by 0 to m bits, the first and third shift circuits 4゜6 are each configured with a selector of (m+1) input circuits with m bit configuration, and the second shift circuit 5 is The selection circuit 3 may be configured with a selector of (m+1) input circuits with a (nm) bit configuration, and the selection circuit 3 may be configured with a two-person circuit selector with an n-bit configuration.
発明の効果
以上のよう処、本発明においては、左右層ずれのシフト
時においても出力される共通部分のシフト動作を第2の
シフト回路によって共通に行なうことにより、右シフト
専用の第1のシフト回路および左シフト専用の第3のシ
フト回路の所要ビット数を必要最少限としたから、全体
としてハードウェア蓋を減少させることができるという
効果がある。Effects of the Invention As described above, in the present invention, the second shift circuit commonly performs the shift operation of the common portion that is output even when shifting the left and right layers. Since the required number of bits of the circuit and the third shift circuit dedicated to left shift are set to the minimum necessary, there is an effect that the hardware requirement can be reduced as a whole.
第1図は従来のシフト演算回路の一例を示すブロック図
、第2図は上記従来例の各部データを示す図、第3図は
本発明の一実施例を示すブロック図、第4図(a)、
(b)? (e)はそれぞれ上記実施例における第1〜
第3のシフト回路の出力データとシフト選択信号との関
係、シフト選択信号とシフトビット数との関係および左
右選択信号とシフト結果データとの関係を示す図である
。
図において、1・・・右シフト回路、2・・・左シフト
回路、3・・・選択回路、4・・・第1のシフト回路、
5・・・第2のシフト回路、6・・・第3のシフト回路
。
代理人 弁理士 住田俊宗
第1図
第2図
(a)
(C)FIG. 1 is a block diagram showing an example of a conventional shift calculation circuit, FIG. 2 is a diagram showing data of each part of the conventional example, FIG. 3 is a block diagram showing an embodiment of the present invention, and FIG. ),
(b)? (e) are the first to
FIG. 7 is a diagram showing the relationship between the output data of the third shift circuit and the shift selection signal, the relationship between the shift selection signal and the number of shift bits, and the relationship between the left/right selection signal and shift result data. In the figure, 1... right shift circuit, 2... left shift circuit, 3... selection circuit, 4... first shift circuit,
5... Second shift circuit, 6... Third shift circuit. Agent Patent Attorney Toshimune Sumita Figure 1 Figure 2 (a) (C)
Claims (1)
るシフト演算回路において、nビットの入力データのう
ち上位mビットと外部から与えられるmビットの第1の
挿入データとを入力し外部から与えられるシフト選択信
号によシ右シフト動作をしてmビットの出力データを出
す右シフト専用の第1のシフト回路と、前記nビットの
入力データを入力し前記シフト選択信号によってシフト
動作してn−mビットの出力データを出す第2のシフト
回路と、前記nピットの入力データのうち下位mビット
と外部から与えられるmビットの挿入データを入力し前
記シフト選択信号によシ左シフト動作してmビットの出
力データを出す左シフト専用の第3のシフト回路と、前
記第1〜第3のシフト回路の出力データを入力し外部か
ら与えられる左右選択信号によって前記第1と第2のシ
フト回路の出力データまたは前記第2と第3のシフト回
路の出力データのうちいずれか一方を択一的に選択出力
する選択回路とを備えたことを特徴とするシフト演算回
路。In a shift operation circuit that shifts n-bit input data by O-m bits and outputs the result, the upper m bits of the n-bit input data and m-bit first insertion data given from the outside are inputted. a first shift circuit exclusively for right shifting which performs a right shift operation in response to a shift selection signal given to the output data and outputs m bits of output data; - A second shift circuit that outputs m-bit output data, inputs the lower m bits of the input data of the n pits and m-bit insertion data given from the outside, and performs a left shift operation according to the shift selection signal. a third shift circuit exclusively for left shift which outputs m-bit output data; and a third shift circuit dedicated to left shift that outputs m-bit output data; A shift calculation circuit comprising: a selection circuit that selectively outputs either the output data of the circuit or the output data of the second and third shift circuits.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10164983A JPS59226943A (en) | 1983-06-09 | 1983-06-09 | Shift arithmetic circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10164983A JPS59226943A (en) | 1983-06-09 | 1983-06-09 | Shift arithmetic circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS59226943A true JPS59226943A (en) | 1984-12-20 |
Family
ID=14306223
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP10164983A Pending JPS59226943A (en) | 1983-06-09 | 1983-06-09 | Shift arithmetic circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS59226943A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011013920A (en) * | 2009-07-01 | 2011-01-20 | Fujitsu Ltd | Shift calculator |
-
1983
- 1983-06-09 JP JP10164983A patent/JPS59226943A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011013920A (en) * | 2009-07-01 | 2011-01-20 | Fujitsu Ltd | Shift calculator |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4472788A (en) | Shift circuit having a plurality of cascade-connected data selectors | |
JP2674754B2 (en) | Barrel shifter | |
JPH03186924A (en) | Divider | |
US5113362A (en) | Integrated interpolator and method of operation | |
US5129066A (en) | Bit mask generator circuit using multiple logic units for generating a bit mask sequence | |
US5325321A (en) | High speed parallel multiplication circuit having a reduced number of gate stages | |
US5703802A (en) | Method and apparatus for automatically designing logic circuit, and multiplier | |
JPS59226943A (en) | Shift arithmetic circuit | |
EP0044450B1 (en) | Digital adder circuit | |
EP0242600A2 (en) | Carry look-ahead calculating method and circuits therefor | |
US5432727A (en) | Apparatus for computing a sticky bit for a floating point arithmetic unit | |
US5724275A (en) | Fast multi-operand bit pattern detection method and circuit | |
KR0164728B1 (en) | A circuit of obtaining the residue of binary calculation | |
US3705299A (en) | Circuit arrangement for converting a decimal number coded in the bcd code into a pure binary number | |
JP2605848B2 (en) | Non-restoring divider | |
JPS63259767A (en) | Averaging circuit | |
JPS59226942A (en) | Shift arithmetic circuit | |
KR100202555B1 (en) | Postscaler | |
JPS6116329A (en) | Carry look ahead operator | |
JP2568757B2 (en) | Carry Select Adder | |
SU1141422A2 (en) | Device for determining phase of spectrum components of analyzed signal | |
JPH10333885A (en) | Multiplying circuit | |
JPH0675743A (en) | Preceding-1 detector for minimum delay having bias control for result | |
JPH0635668A (en) | Full adder | |
JPH06510614A (en) | Digital logic circuit device for realizing fuzzy logic operators |