JPH04286022A - Barrel shifter - Google Patents

Barrel shifter

Info

Publication number
JPH04286022A
JPH04286022A JP3051691A JP5169191A JPH04286022A JP H04286022 A JPH04286022 A JP H04286022A JP 3051691 A JP3051691 A JP 3051691A JP 5169191 A JP5169191 A JP 5169191A JP H04286022 A JPH04286022 A JP H04286022A
Authority
JP
Japan
Prior art keywords
output
shifter
bit
input
shifters
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.)
Withdrawn
Application number
JP3051691A
Other languages
Japanese (ja)
Inventor
Makoto Nakahara
誠 中原
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 JP3051691A priority Critical patent/JPH04286022A/en
Publication of JPH04286022A publication Critical patent/JPH04286022A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To output a processing result at a high speed by selecting and outputting one output from more than two outputs among the outputs of plural shifters. CONSTITUTION:A multiplexer 7 as a first output selection means selects and outputs one output from more than two outputs among the outputs of the plural shifters (1-1) to (1-5). The multiplexer 7 selects one of the plural shifters (1-1) to (1-5) and inputs input data. At the time of obtaining a necessary shifting amount, it is unnecessary to permit all the shifters (1-1) to (1-5) to pass through them. Only the shifters of a necessary minimum, which are necessary for obtaining the shifting amount to be obtained, are selected by using the selection of input or output so as to cause them to passing through. Thus, the processing result can be outputted at a high speed since the unnecessary shifter is not required to pass through them.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はバレルシフタに係り、特
に入力データに対してシフト量が夫々異なる複数シフタ
より構成されたバレルシフタに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a barrel shifter, and more particularly to a barrel shifter comprised of a plurality of shifters each having a different amount of shift relative to input data.

【0002】近年の計算機の進歩により、扱うシフトビ
ット量も増加する傾向があり、最長パスを要するシフト
演算の出力時間に縛られていたのでは、計算機の性能低
下をもたらす原因にもなり兼ねず、速く結果をだせるシ
フト演算に関しては、速く結果を出力できることが望ま
れている。
[0002] With the recent advances in computers, the amount of shift bits handled has tended to increase, and being constrained by the output time of shift operations that require the longest path may cause a decline in computer performance. Regarding shift operations that can produce results quickly, it is desired that the results can be output quickly.

【0003】0003

【従来の技術】図8,図9に従来のバレルシフタのブロ
ック図を示す。図8において、11−1〜11−nは互
いにシフト量の異なるシフタを示している。シフタ11
−1〜11−nは入力端子Tinと出力端子Tout 
との間に従属接続される。シフタ11−1〜11−nは
制御回路6Gからの制御信号により入力データに対して
夫々のシフト量だけシフトを行なうか、シフトを行なわ
ずに出力するかが制御される。
2. Description of the Related Art FIGS. 8 and 9 show block diagrams of conventional barrel shifters. In FIG. 8, 11-1 to 11-n indicate shifters having mutually different shift amounts. shifter 11
-1 to 11-n are input terminal Tin and output terminal Tout
A subordinate connection is made between the The shifters 11-1 to 11-n are controlled by a control signal from the control circuit 6G to determine whether to shift the input data by the respective shift amounts or to output the data without shifting.

【0004】例えば、図9において、入力データを1ビ
ット分シフトさせる場合には制御回路6Hにより1ビッ
トシフタ11−1をシフト動作させ他のシフタ11−2
〜11−5はシフトを行なわないように制御する。また
、3ビット分のシフトを行なう場合には1ビットシフタ
11−1及び2ビットシフタ11−2をシフト動作させ
他のシフタ11−3〜11−5はシフトを行なわないよ
うに制御されていた。
For example, in FIG. 9, when input data is to be shifted by 1 bit, the control circuit 6H causes the 1-bit shifter 11-1 to shift, and the other shifter 11-2
to 11-5 are controlled so that no shift is performed. Furthermore, when shifting by 3 bits, the 1-bit shifter 11-1 and the 2-bit shifter 11-2 are controlled to perform a shifting operation, and the other shifters 11-3 to 11-5 are controlled not to perform the shifting.

【0005】[0005]

【発明が解決しようとする課題】従来のバレルシフタで
は、図8,図9に示すようにシフト量の異なる複数の入
出力端子間に直列に接続され、入力データにすべてのシ
フタを通過させ、複数のシフタのシフトを行なうか否か
を制御することにより必要とするシフト量を得ていたた
め、例えば、32ビットバレルシフタ(図9)において
、24ビットシフトの場合には、第4段(8ビットシフ
タ)及び第5段(16ビットシフタ)のみがシフト動作
すればよいのにもかかわらず、残りのシフタ、つまり、
第1,2,3段のシフタに関しても0シフトするという
形で通過することを余儀無くされており、従って、シフ
トするビット量が大きくなった場合、つまり、バレルシ
フタを構成する各シフタの段数が増加した場合、簡単に
結果を得ることのできるシフト操作にもかかわらず、最
長時間を要するシフト操作と同等の時間が出力に費やさ
れ、計算機の性能が劣化してしまう等の問題点があった
[Problems to be Solved by the Invention] Conventional barrel shifters are connected in series between a plurality of input/output terminals with different shift amounts as shown in FIGS. For example, in a 32-bit barrel shifter (FIG. 9), in the case of a 24-bit shift, the fourth stage (8-bit shifter) Although only the fifth stage (16-bit shifter) needs to perform a shift operation, the remaining shifters, that is,
The 1st, 2nd, and 3rd stage shifters are also forced to pass through in the form of a 0 shift. Therefore, when the amount of bits to be shifted becomes large, that is, the number of stages of each shifter that makes up the barrel shifter increases. If the number of outputs is increased, even though the shift operation can easily obtain results, the same amount of time as the shift operation that takes the longest time is spent on the output, resulting in problems such as deterioration of the computer's performance. Ta.

【0006】本発明は上記の点に鑑みてなされたもので
高速動作が可能なバレルシフタを提供することを目的と
する。
The present invention has been made in view of the above points, and an object of the present invention is to provide a barrel shifter capable of high-speed operation.

【0007】[0007]

【課題を解決するための手段】本発明は以上のような課
題を解決するために以下の手段を設けてなる。
[Means for Solving the Problems] The present invention provides the following means to solve the above problems.

【0008】第1の出力選択手段は複数のシフタ(1−
1〜1−5)の出力のうちの少なくとも2以上の出力か
ら1つの出力を選択して出力する。
The first output selection means includes a plurality of shifters (1-
1 to 1-5), one output is selected and output from at least two or more outputs.

【0009】第1の入力選択手段は複数のシフタのうち
いずれかを選択して前記入力データを入力する。
The first input selection means selects one of the plurality of shifters and inputs the input data.

【0010】第2の入力選択手段は複数のシフタに対応
して設けられ、入力データ及び他段のシフタ出力のうち
いずれか1つを選択し対応するシフタに入力し、第2の
出力選択手段は複数のシフタの出力から1つの出力を選
択して出力する。
[0010] The second input selection means is provided corresponding to the plurality of shifters, and selects any one of the input data and the output of the shifter at the other stage and inputs it to the corresponding shifter, and the second output selection means selects and outputs one output from the outputs of a plurality of shifters.

【0011】[0011]

【作用】以上のような構成とすることにより必要とする
シフト量を得ようとするときにすべてのシフタを通過さ
せる必要がなくなり、入力又は出力選択手段を用いて得
ようとするシフト量を得るために必要な必要最小限のシ
フタだけを選択して通過させることができる。
[Operation] With the above configuration, it is no longer necessary to pass through all the shifters when trying to obtain the required shift amount, and the desired shift amount can be obtained using the input or output selection means. It is possible to select and pass only the minimum necessary shifters.

【0012】0012

【実施例】図1は本発明の第1実施例のブロック図を示
す。同図中、1は16ビットシフタで、入力端子Tin
に入力される入力データを16ビット分シフトして出力
する。16ビットシフタ1は制御回路6Aから制御信号
が入力される。16ビットシフタ1は制御信号に応じて
入力データを16ビット分シフトさせて出力したり、シ
フトさせずに出力する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows a block diagram of a first embodiment of the present invention. In the figure, 1 is a 16-bit shifter, and the input terminal Tin
The input data input to the input terminal is shifted by 16 bits and output. A control signal is input to the 16-bit shifter 1 from the control circuit 6A. The 16-bit shifter 1 shifts input data by 16 bits and outputs it, or outputs it without shifting it, depending on the control signal.

【0013】2は8ビットシフタで、16ビットシフタ
1の出力が入力される。8ビットシフタ2は制御回路6
Aから制御信号が入力され、制御信号に応じて16ビッ
トシフタ1の出力を8ビット分シフトさせて出力するか
、シフトなしに出力する。
2 is an 8-bit shifter to which the output of the 16-bit shifter 1 is input. 8 bit shifter 2 is control circuit 6
A control signal is input from A, and depending on the control signal, the output of the 16-bit shifter 1 is shifted by 8 bits and output, or is output without being shifted.

【0014】3は4ビットシフタで、8ビットシフタ2
の出力が入力される。4ビットシフタ3は制御回路6A
から制御信号が入力され、制御信号に応じて8ビットシ
フタ2の出力を4ビット分シフトさせて出力したり、シ
フトさせずに出力する。
3 is a 4-bit shifter, and 8-bit shifter 2
The output of is input. 4 bit shifter 3 is control circuit 6A
A control signal is input from the 8-bit shifter 2, and depending on the control signal, the output of the 8-bit shifter 2 is shifted by 4 bits and output, or is output without being shifted.

【0015】4は2ビットシフタで、4ビットシフタ3
の出力が入力される。2ビットシフタ4は制御回路6と
接続され、制御信号に応じて4ビットシフタ3の出力を
2ビット分シフトさせ出力するか、シフトさせずに出力
する。
4 is a 2-bit shifter, and 4-bit shifter 3
The output of is input. The 2-bit shifter 4 is connected to the control circuit 6, and depending on the control signal, shifts the output of the 4-bit shifter 3 by 2 bits and outputs it, or outputs it without shifting.

【0016】5は1ビットシフタで、2ビットシフタ4
の出力が入力される。1ビットシフタ5は制御回路6A
と接続され、制御信号に応じて2ビットシフタ4の出力
を1ビット分シフトさせて出力するか、シフトさせずに
出力する。1ビットシフタ5の出力はマルチプレクサ7
に入力される。マルチプレクサ7には1ビットシフタ5
の出力の他に8ビットシフタ2の出力が入力されている
。また、マルチプレクサ7は制御回路6Aと接続され、
制御回路6Aから供給される制御信号に応じて出力端子
Tout に出力するデータを1ビットシフタ5又は8
ビットシフタ2の出力に切換える。
5 is a 1-bit shifter, and 2-bit shifter 4
The output of is input. 1 bit shifter 5 is control circuit 6A
The output of the 2-bit shifter 4 is either shifted by 1 bit and outputted, or is output without being shifted, depending on the control signal. The output of 1-bit shifter 5 is sent to multiplexer 7
is input. Multiplexer 7 has a 1-bit shifter 5
In addition to the output of 8-bit shifter 2, the output of 8-bit shifter 2 is input. Further, the multiplexer 7 is connected to the control circuit 6A,
The data to be output to the output terminal Tout is transferred to the 1-bit shifter 5 or 8 according to the control signal supplied from the control circuit 6A.
Switch to the output of bit shifter 2.

【0017】次に回路の動作について説明する。Next, the operation of the circuit will be explained.

【0018】入力端子Tinに入力される入力データを
8ビット、16ビット、24ビット分シフトさせる場合
には16ビットシフタ1及び8ビットシフタ2のみを用
いればよい。従って、マルチプレクサ7を制御回路6か
らの制御信号により制御して、出力端子Tout から
出力される出力データを8ビットシフタ2の出力とする
When the input data input to the input terminal Tin is shifted by 8 bits, 16 bits, or 24 bits, only the 16-bit shifter 1 and the 8-bit shifter 2 may be used. Therefore, the multiplexer 7 is controlled by the control signal from the control circuit 6, and the output data output from the output terminal Tout is output from the 8-bit shifter 2.

【0019】まず、入力データを8ビットシフトさせた
いときには制御回路6Aからの制御信号により16ビッ
トシフタ1は動作させず、入力データをそのまま通過さ
せ、8ビットシフタ2だけを動作させる。従って、入力
データは8ビットシフトしてマルチプレクサ7から出力
端子Tout に供給され、出力される。
First, when it is desired to shift input data by 8 bits, the 16-bit shifter 1 is not operated by a control signal from the control circuit 6A, the input data is passed through as is, and only the 8-bit shifter 2 is operated. Therefore, the input data is shifted by 8 bits and supplied from the multiplexer 7 to the output terminal Tout, and is output.

【0020】また、入力データを16ビットシフトさせ
たい場合には制御回路6Aの制御信号により16ビット
シフタ1及び8ビットシフタ2を制御し、16ビットシ
フタ1だけを動作させる。従って、入力データは16ビ
ットシフタ1により16ビット分だけシフトされ、8ビ
ットシフタ2から出力され、マルチプレクサ7を介して
出力端子Tout に供給される。
Further, when it is desired to shift the input data by 16 bits, the 16-bit shifter 1 and the 8-bit shifter 2 are controlled by the control signal of the control circuit 6A, and only the 16-bit shifter 1 is operated. Therefore, the input data is shifted by 16 bits by the 16-bit shifter 1, output from the 8-bit shifter 2, and supplied via the multiplexer 7 to the output terminal Tout.

【0021】また、入力データを24ビットシフトさせ
たい場合には制御回路6の制御信号により16ビットシ
フタ1及び8ビットシフタ2を制御し、16ビットシフ
タ1及び8ビットシフタ2を共に動作させる。入力デー
タは16ビットシフタ1により16ビットシフトされ、
さらに8ビットシフタ2により8ビットシフトされ、計
24ビットシフトされる。24ビットシフトされたデー
タは8ビットシフタ2からマルチプレクサ7に直接入力
され、出力端子Tout に供給される。
Further, when it is desired to shift input data by 24 bits, the 16-bit shifter 1 and the 8-bit shifter 2 are controlled by the control signal of the control circuit 6, and the 16-bit shifter 1 and the 8-bit shifter 2 are operated together. The input data is shifted by 16 bits by 16 bit shifter 1,
Further, the data is shifted by 8 bits by the 8-bit shifter 2, for a total of 24 bits. The 24-bit shifted data is input directly from the 8-bit shifter 2 to the multiplexer 7 and is supplied to the output terminal Tout.

【0022】また、他のシフト量を得たいときには制御
回路6によりマルチプレクサ7を制御して、1ビットシ
フタ5の出力が出力端子Tout と接続される構成と
し、入力データは16ビットシフタ1,8ビットシフタ
2,4ビットシフタ3,2ビットシフタ4,1ビットシ
フタ5すべてを通過させ必要とするシフト量を得る。
When it is desired to obtain another shift amount, the multiplexer 7 is controlled by the control circuit 6, so that the output of the 1-bit shifter 5 is connected to the output terminal Tout, and the input data is sent to the 16-bit shifter 1 and the 8-bit shifter 2. , 4-bit shifter 3, 2-bit shifter 4, and 1-bit shifter 5 to obtain the required shift amount.

【0023】このようにシフト量が8ビット、16ビッ
ト、24ビットの場合については16ビットシフタ1及
び8ビットシフタ2だけを通過させればよくシフタ2段
を通過させるだけで済み2段分の遅延しかないため、処
理結果を速く出力できる。特にロード/ストアデータの
アライメント処理を行なうのに適している。
In this way, when the shift amount is 8 bits, 16 bits, or 24 bits, it is sufficient to pass through only 16-bit shifter 1 and 8-bit shifter 2, and it is sufficient to pass through two stages of shifters, and the delay is only two stages. Therefore, processing results can be output quickly. It is particularly suitable for alignment processing of load/store data.

【0024】ロード/ストアデータのアライメント処理
とは、ロード/ストアデータが仮に8ビットのデータ(
バイトデータ)、或いは16ビットのデータ(ハーフワ
ードデータ)であった場合、それを32ビットのデータ
として取り扱うためには、その8ビット又は16ビット
のデータを32ビット中のどの部分に置くかを決定し、
その部分へ8ビット又は16ビットデータを並び換える
処理のことである。
[0024] Load/store data alignment processing means that the load/store data is assumed to be 8-bit data (
byte data) or 16-bit data (halfword data), in order to treat it as 32-bit data, you need to know in which part of the 32 bits the 8-bit or 16-bit data should be placed. decided,
This is the process of rearranging 8-bit or 16-bit data into that part.

【0025】ロード/ストアデータのアライメント処理
を図1に示すような32ビットバレルシフタでまかなう
場合、構成しているシフタの内の8ビットと16ビット
シフタ1−1,1−2のみを用いればよく、残りの1ビ
ット、2ビット、そして4ビットシフタ1−3,1−4
,1−5は不用となる。
When alignment processing of load/store data is performed using a 32-bit barrel shifter as shown in FIG. Remaining 1-bit, 2-bit, and 4-bit shifters 1-3, 1-4
, 1-5 are no longer needed.

【0026】この理由から、まず、バレルシフタの各シ
フタの構成順序を図5に示す従来のものとは変え、16
ビット、8ビット、4ビット、2ビット、そして1ビッ
トシフタの順番に並び換え、アライメントされたロード
/ストアデータを速く得るために、8ビットシフタの後
に出力を設ける。
For this reason, first, the order of construction of each shifter of the barrel shifter is changed from the conventional one shown in FIG.
Bit, 8-bit, 4-bit, 2-bit, and 1-bit shifters are ordered and the output is provided after the 8-bit shifter to quickly obtain aligned load/store data.

【0027】図2は第2の実施例のブロック図を示す。 同図中、図1と同一構成部分には同一符号を付しその説
明は省略する。本実施例は第1実施例において、マルチ
プレクサ7を用いて出力端子Tout を1つとしてい
たものをマルチプレクサ7を省略し、シフタ1−1〜1
−5を制御回路6Bにより制御し、2つの出力端子To
ut 1 ,Tout2を設け、夫々から出力データが
得られる構成としたもので、第1実施例と略同様な効果
を有し、ロード/ストアデータのアライメント処理を行
なう場合に出力端子Tout2を用いる構成としている
FIG. 2 shows a block diagram of the second embodiment. In the figure, the same components as those in FIG. In this embodiment, the multiplexer 7 is used to provide one output terminal Tout in the first embodiment, but the multiplexer 7 is omitted and the shifters 1-1 to 1
-5 is controlled by the control circuit 6B, and the two output terminals To
ut 1 and Tout 2 are provided, and output data can be obtained from each. This configuration has substantially the same effect as the first embodiment, and uses the output terminal Tout 2 when performing alignment processing of load/store data. It is said that

【0028】図3は本発明の第3実施例のブロック図を
示す。同図中、図1と同一構成部分には同一符号を付し
、その説明を省略する。
FIG. 3 shows a block diagram of a third embodiment of the invention. In the figure, the same components as those in FIG.

【0029】本実施例では入力端子Tin側から出力端
子Tout 側にかけて1ビットシフタ5,2ビットシ
フタ4,4ビットシフタ3,8ビットシフタ2,1ビッ
トシフタ1の順でシフタが接続され、4ビットシフタ3
と8ビットシフタ2との間にマルチプレクサ8が接続さ
れる。マルチプレクサ8には4ビットシフタ3の出力が
入力されると共に入力端子Tinと接続され、入力デー
タが入力される。マルチプレクサ8は制御回路6Cと接
続され、制御回路6Cからの制御信号により出力を4ビ
ットシフタ3の出力又は入力端子Tinに入力される入
力データに切換える。
In this embodiment, the shifters are connected in this order from the input terminal Tin side to the output terminal Tout side: 1-bit shifter 5, 2-bit shifter 4, 4-bit shifter 3, 8-bit shifter 2, and 1-bit shifter 1.
A multiplexer 8 is connected between the 8-bit shifter 2 and the 8-bit shifter 2 . The output of the 4-bit shifter 3 is input to the multiplexer 8, and it is also connected to the input terminal Tin, and input data is input thereto. The multiplexer 8 is connected to the control circuit 6C, and switches its output to the output of the 4-bit shifter 3 or the input data input to the input terminal Tin in response to a control signal from the control circuit 6C.

【0030】次に回路の動作について説明する。Next, the operation of the circuit will be explained.

【0031】8,16,24ビット分のシフトを行なお
うとする場合には制御回路6Cによりマルチプレクサ8
を入力端子Tinに入力されるデータが直接8ビットシ
フタ2に入力されるように制御し、第1実施例同様8ビ
ットシフタ2と16ビットシフタ1とを制御回路6Cに
より制御して8,16,24ビット分のシフトを行なう
。 他のビット数分のシフトを行なう場合には制御回路6C
によりマルチプレクサ8を4ビットシフタ3の出力が8
ビットシフタ2に入力されるように制御し、入力端子T
inに入力された入力データが1ビットシフタ5,2ビ
ットシフタ4,4ビットシフタ3,8ビットシフタ2,
16ビットシフタ1すべてを通過する構成とし、これら
のシフタを制御することにより必要とするシフト量を得
る。
When attempting to shift 8, 16, or 24 bits, the control circuit 6C controls the multiplexer 8.
is controlled so that the data input to the input terminal Tin is directly input to the 8-bit shifter 2, and as in the first embodiment, the 8-bit shifter 2 and the 16-bit shifter 1 are controlled by the control circuit 6C to convert the data to 8, 16, and 24 bits. Perform a minute shift. When performing a shift for another number of bits, the control circuit 6C
The output of 4-bit shifter 3 is set to 8 by multiplexer 8.
It is controlled so that it is input to bit shifter 2, and input terminal T
The input data input to in is transferred to 1-bit shifter 5, 2-bit shifter 4, 4-bit shifter 3, 8-bit shifter 2,
The signal passes through all 16-bit shifters 1, and the required shift amount is obtained by controlling these shifters.

【0032】従って、8,16,24ビット分のシフト
については8ビットシフタ2及び16ビットシフタ1だ
けを通過させればよいため、出力を速く得ることができ
る。従って、第1実施例同様ロード/ストアデータのア
ライメント処理などに適している。
Therefore, for shifts of 8, 16, and 24 bits, it is necessary to pass through only the 8-bit shifter 2 and the 16-bit shifter 1, so that output can be obtained quickly. Therefore, like the first embodiment, this embodiment is suitable for alignment processing of load/store data.

【0033】また、図4は第4実施例のブロック図を示
す。同図中、図3と同一構成部分には同一符号を付し、
その説明は省略する。本実施例は第3実施例で1つの入
力端子Tinからのデータだけを処理する構成であった
ものをマルチプレクサ8に2つの入力端子Tin1 及
びTin2 から別々にデータを入力できる構成とした
もので、ロード/ストアデータのアライメント処理を行
なうためのデータは入力端子Tin2 から入力する構
成とする。このような構成とすることにより第3実施例
と同様な効果が得られる。
Furthermore, FIG. 4 shows a block diagram of the fourth embodiment. In the figure, the same components as in FIG. 3 are designated by the same reference numerals.
The explanation will be omitted. In this embodiment, the configuration of the third embodiment was such that only data from one input terminal Tin was processed, but the configuration was changed to allow data to be input to the multiplexer 8 separately from two input terminals Tin1 and Tin2. Data for alignment processing of load/store data is input from the input terminal Tin2. With such a configuration, effects similar to those of the third embodiment can be obtained.

【0034】図5は第5の実施例のブロック図を示す。 同図中、図1乃至図4と同一構成部分には同一符号を付
し、その説明は省略する。
FIG. 5 shows a block diagram of a fifth embodiment. In the figure, the same components as those in FIGS. 1 to 4 are denoted by the same reference numerals, and the explanation thereof will be omitted.

【0035】本実施例は入力端子Tinから出力端子T
out にかけて、シフト量の異なる複数のシフタ10
−1〜10−nを設け、複数のシフタ10−1〜10−
nの間にマルチプレクサ9−1〜9−(n−1)を設け
ると共に出力端子Tout の前にマルチプレクサ9−
nを設けてなる。シフタ10−1〜10−n及びマルチ
プレクサ9−1〜9−nは制御回路6Dと接続され、制
御回路6Dからの制御信号により制御されている。
In this embodiment, the input terminal Tin is connected to the output terminal T.
out, a plurality of shifters 10 with different shift amounts
-1 to 10-n are provided, and a plurality of shifters 10-1 to 10- are provided.
Multiplexers 9-1 to 9-(n-1) are provided between n and multiplexer 9-1 to 9-(n-1) are provided in front of the output terminal Tout.
n is provided. Shifters 10-1 to 10-n and multiplexers 9-1 to 9-n are connected to control circuit 6D and controlled by control signals from control circuit 6D.

【0036】マルチプレクサ9−1〜9−(n−1)に
はシフタ10−1〜10−(n−1)の出力が入力され
ると共に入力端子Tinに入力される入力データが入力
され、シフタの出力と入力データとの切換えが行なわれ
る。
The outputs of the shifters 10-1 to 10-(n-1) are input to the multiplexers 9-1 to 9-(n-1), and the input data input to the input terminal Tin is input to the shifters 9-1 to 9-(n-1). Switching between the output and input data is performed.

【0037】また、マルチプレクサ9−nにはシフタ1
0−1〜10−nの出力がすべて入力され、制御回路6
Dによりシフタ10−1〜10−nのうち1つの出力を
選択し出力端子Tout に出力する。
The multiplexer 9-n also has a shifter 1.
All outputs from 0-1 to 10-n are input to the control circuit 6.
D selects one output from the shifters 10-1 to 10-n and outputs it to the output terminal Tout.

【0038】次に回路の動作について説明する。まず、
1ビット分のシフトを行ないたい場合には1ビットシフ
タ10−1を動作させ、入力データを1ビットシフタ1
0−1により1ビット分シフトさせ、マルチプレクサ9
−nを制御回路6Dにより1ビットシフタ10−1の出
力が出力端子Tout に出力されるように制御するこ
とにより出力端子Tout より1ビットシフトした出
力が得られる。また、2ビット分のシフトを行ないたい
場合には2ビットシフタ10−2を動作させ、制御回路
6Dによりマルチプレクサ9−1を2ビットシフタ10
−2に入力端子Tinからの入力データが入力されるよ
う制御すると共にマルチプレクサ9−nを2ビットシフ
タ10−2の出力が出力端子Toutに出力されるよう
に制御する。 従って、入力端子Tinに入力される入力データは2ビ
ットシフタ10−2により2ビット分シフトされ出力端
子Tout より出力される。
Next, the operation of the circuit will be explained. first,
If you want to shift by 1 bit, operate 1 bit shifter 10-1 and transfer the input data to 1 bit shifter 1.
Shift by 1 bit by 0-1, multiplexer 9
-n is controlled by the control circuit 6D so that the output of the 1-bit shifter 10-1 is output to the output terminal Tout, thereby obtaining an output shifted by 1 bit from the output terminal Tout. Further, when it is desired to perform a shift of 2 bits, the 2-bit shifter 10-2 is operated, and the multiplexer 9-1 is switched to the 2-bit shifter 10-2 by the control circuit 6D.
-2, and controls the multiplexer 9-n so that the output of the 2-bit shifter 10-2 is outputted to the output terminal Tout. Therefore, the input data input to the input terminal Tin is shifted by 2 bits by the 2-bit shifter 10-2 and output from the output terminal Tout.

【0039】さらに、3ビット分のシフトを行ないたい
場合には、1ビットシフタ10−1,及び2ビットシフ
タ10−2を動作させ、マルチプレクサ9−1は1ビッ
トシフタ10−1の出力が2ビットシフタ10−2に入
力されるよう制御し、マルチプレクサ9−nは2ビット
シフタ10−2の出力が出力端子Tout に出力され
るように制御する。このため、入力端子Tinに入力さ
れた入力データは1ビットシフタ10−1で1ビットシ
フトされた後、2ビットシフタ10−2に供給され、2
ビットシフトされ、出力端子Tout に供給される。 従って、入力データは3ビットシフトされ出力端子To
ut より出力されることになる。
Furthermore, when it is desired to shift by 3 bits, the 1-bit shifter 10-1 and the 2-bit shifter 10-2 are operated, and the multiplexer 9-1 shifts the output of the 1-bit shifter 10-1 to the 2-bit shifter 10-2. The multiplexer 9-n controls the output of the 2-bit shifter 10-2 to be output to the output terminal Tout. Therefore, the input data input to the input terminal Tin is shifted by 1 bit by the 1-bit shifter 10-1, and then supplied to the 2-bit shifter 10-2.
It is bit shifted and supplied to the output terminal Tout. Therefore, the input data is shifted by 3 bits and the output terminal To
It will be output from ut.

【0040】他のシフト量に対しても同様な動作が行な
われる。このように必要最小限のシフタだけを通して必
要とするシフト量が得られるため、出力を高速に得るこ
とができる。
Similar operations are performed for other shift amounts. In this way, the required shift amount can be obtained through only the minimum necessary shifter, so that output can be obtained at high speed.

【0041】図6は本発明の第6実施例のブロック図を
示す。同図中、図5と同一構成部分には同一符号を付し
、その説明は省略する。
FIG. 6 shows a block diagram of a sixth embodiment of the invention. In the figure, the same components as those in FIG. 5 are denoted by the same reference numerals, and the explanation thereof will be omitted.

【0042】本実施例は第5実施例でのシフタ10−1
〜10−nの間に設けられた入力のマルチプレクサ9−
1〜9−(n−1)に換え、シフタ10−1〜10−n
の夫々の入力の前にn入力のマルチプレクサ12−1〜
12−nを設け、夫々のシフタ10−1〜10−nの入
力に他のシフタの出力及び入力端子Tinに入力される
入力データが入力できるように構成したもので、このよ
うな構成とすることにより第5の実施例と同様な効果が
得られると共にシフタ10−1〜10−n接続順序は無
関係となり、必要とするシフト量に応じた必要なシフタ
だけを動作させることができる。
This embodiment uses the shifter 10-1 in the fifth embodiment.
Input multiplexer 9- provided between ~10-n
1 to 9-(n-1), shifters 10-1 to 10-n
n-input multiplexers 12-1 to 12-1 before each input of
12-n is provided, and the output of the other shifter and the input data input to the input terminal Tin can be input to the input of each shifter 10-1 to 10-n. As a result, the same effects as in the fifth embodiment can be obtained, and the order in which the shifters 10-1 to 10-n are connected becomes irrelevant, so that only the necessary shifters corresponding to the required shift amount can be operated.

【0043】例えば3ビットのシフト量を得ようとする
場合、制御回路6Eにより1ビットシフタ10−1,2
ビットシフタ10−2を動作させ、マルチプレクサ12
−1は入力端子Tinに入力される入力データが1ビッ
トシフタ10−1に入力されるように制御し、マルチプ
レクサ12−2は1ビットシフタ10−1の出力が2ビ
ットシフタ10−2に入力されるように制御し、さらに
、マルチプレクサ9−nは2ビットシフタ10−2の出
力が出力端子Tout に供給されるように制御する。
For example, when trying to obtain a shift amount of 3 bits, the control circuit 6E controls the 1-bit shifters 10-1 and 10-2.
The bit shifter 10-2 is operated and the multiplexer 12
-1 controls the input data input to the input terminal Tin to be input to the 1-bit shifter 10-1, and the multiplexer 12-2 controls the output of the 1-bit shifter 10-1 to input the output to the 2-bit shifter 10-2. Furthermore, the multiplexer 9-n controls the output of the 2-bit shifter 10-2 to be supplied to the output terminal Tout.

【0044】従って、入力端子Tinに入力される入力
データはマルチプレクサ12−1,1ビットシフタ10
−1,マルチプレクサ12−2,2ビットシフタ10−
2,マルチプレクサ9−nを介して出力端子Tout 
に供給され、3ビットのシフトが得られる。このとき、
マルチプレクサ12−1,12−2,9−nの入出力の
接続を切換え、2ビットマルチプレクサ10−2の次に
1ビットマルチプレクサ10−1を通過させる構成とす
ることも可能である。
Therefore, the input data input to the input terminal Tin is sent to the multiplexer 12-1 and the 1-bit shifter 10.
-1, multiplexer 12-2, 2-bit shifter 10-
2. Output terminal Tout via multiplexer 9-n
is supplied to obtain a 3-bit shift. At this time,
It is also possible to switch the input/output connections of the multiplexers 12-1, 12-2, and 9-n so that the signal passes through the 1-bit multiplexer 10-1 after the 2-bit multiplexer 10-2.

【0045】図7は本発明の第7実施例のブロック図を
示す。本実施例は32ビットバレルシフタを構成してい
る。同図中、図5と同一構成部分には同一符号を付し、
その説明は省略する。
FIG. 7 shows a block diagram of a seventh embodiment of the invention. This embodiment constitutes a 32-bit barrel shifter. In the figure, the same components as in FIG. 5 are designated by the same reference numerals.
The explanation will be omitted.

【0046】本実施例は第5実施例とは逆にシフタをシ
フト量の多い順に配列し、第5実施例におけるマルチプ
レクサ9−1〜9−(n−1)に換え、マルチプレクサ
13−1〜13−4を設け、その入力を下段に向うに従
って多くしていき、夫々のシフタ10−1〜10−4の
前の段の入力のすべてと入力端子Tinに入力される入
力データとが入力される構成としている。
In this embodiment, contrary to the fifth embodiment, the shifters are arranged in descending order of shift amount, and instead of multiplexers 9-1 to 9-(n-1) in the fifth embodiment, multiplexers 13-1 to 9-(n-1) are used. 13-4 is provided, and the inputs thereof are increased toward the lower stage, so that all the inputs of the stage before each shifter 10-1 to 10-4 and the input data input to the input terminal Tin are input. The structure is as follows.

【0047】このような構成とすることにより第5実施
例と略同様な効果が得られる。
With this configuration, substantially the same effects as in the fifth embodiment can be obtained.

【0048】例えば6ビットのシフト量を得ようとする
場合、制御回路6Fにより4ビットシフタ10−3,2
ビットシフタ10−2を動作させ、マルチプレクサ13
−2は入力端子Tinに入力される入力データが4ビッ
トシフタ10−3に入力されるように制御し、マルチプ
レクサ12−3は4ビットシフタ10−3の出力が2ビ
ットシフタ10−2に入力されるように制御し、さらに
、マルチプレクサ9−nは2ビットシフタ10−2の出
力が出力端子Tout に供給されるように制御する。
For example, when trying to obtain a 6-bit shift amount, the control circuit 6F controls the 4-bit shifters 10-3 and 2.
The bit shifter 10-2 is operated and the multiplexer 13
-2 controls the input data input to the input terminal Tin to be input to the 4-bit shifter 10-3, and the multiplexer 12-3 controls the output of the 4-bit shifter 10-3 to be input to the 2-bit shifter 10-2. Furthermore, the multiplexer 9-n controls the output of the 2-bit shifter 10-2 to be supplied to the output terminal Tout.

【0049】従って、入力端子Tinに入力される入力
データはマルチプレクサ13−3,4ビットシフタ10
−3,マルチプレクサ13−3,2ビットシフタ10−
2,マルチプレクサ9−nを介して出力端子Tout 
に供給され、6ビットのシフトが得られる。
Therefore, the input data input to the input terminal Tin is sent to the multiplexer 13-3, 4-bit shifter 10.
-3, multiplexer 13-3, 2-bit shifter 10-
2. Output terminal Tout via multiplexer 9-n
is supplied to obtain a 6-bit shift.

【0050】[0050]

【発明の効果】上述の如く、本発明によれば、入力デー
タは入力データのシフト量に応じた必要なシフタだけを
通過させて出力させればよいため、不要なシフタを通過
させなくてよい分だけ処理結果を高速に出力できる等の
特長を有する。
[Effects of the Invention] As described above, according to the present invention, input data only needs to pass through the necessary shifters according to the shift amount of the input data before being output, so there is no need to pass through unnecessary shifters. It has features such as being able to output processing results at high speed.

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

【図1】本発明の第1実施例のブロック図である。FIG. 1 is a block diagram of a first embodiment of the present invention.

【図2】本発明の第2実施例のブロック図である。FIG. 2 is a block diagram of a second embodiment of the invention.

【図3】本発明の第3実施例のブロック図である。FIG. 3 is a block diagram of a third embodiment of the present invention.

【図4】本発明の第4実施例のブロック図である。FIG. 4 is a block diagram of a fourth embodiment of the present invention.

【図5】本発明の第5実施例のブロック図である。FIG. 5 is a block diagram of a fifth embodiment of the present invention.

【図6】本発明の第6実施例のブロック図である。FIG. 6 is a block diagram of a sixth embodiment of the present invention.

【図7】本発明の第7実施例のブロック図である。FIG. 7 is a block diagram of a seventh embodiment of the present invention.

【図8】従来の一例のブロック図である。FIG. 8 is a block diagram of a conventional example.

【図9】従来の他の一例のブロック図である。FIG. 9 is a block diagram of another conventional example.

【符号の説明】[Explanation of symbols]

1−1  16ビットシフタ 1−2  8ビットシフタ 1−3  4ビットシフタ 1−4  2ビットシフタ 1−5  1ビットシフタ 6  制御回路 7,8  マルチプレクサ 10−1〜10−n  シフタ 9−1〜9−n  マルチプレクサ 1-1 16 bit shifter 1-2 8-bit shifter 1-3 4-bit shifter 1-4 2-bit shifter 1-5 1 bit shifter 6 Control circuit 7, 8 Multiplexer 10-1 to 10-n shifter 9-1 to 9-n multiplexer

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】  シフト量が夫々異なる複数のシフタ(
1−1〜1−5)を従属接続してなり、該複数のシフタ
(1−1〜1−5)のシフト動作の有無を制御すること
により入力データを所定のシフト量シフトして出力する
バレルシフタにおいて、前記複数のシフタ(1−1〜1
−5)の出力のうちの少なくとも2以上の出力から1つ
の出力を選択して出力する第1の出力選択手段(7)を
有したことを特徴とするバレルシフタ。
[Claim 1] A plurality of shifters each having a different shift amount (
1-1 to 1-5) are connected in series, and by controlling the presence or absence of shift operation of the plurality of shifters (1-1 to 1-5), input data is shifted by a predetermined shift amount and output. In the barrel shifter, the plurality of shifters (1-1 to 1
-5) A barrel shifter comprising first output selection means (7) for selecting and outputting one output from at least two or more of the outputs.
【請求項2】  シフト量が夫々異なる複数のシフタ(
1−1〜1−5)を従属接続してなり、該複数のシフタ
(1−1〜1−5)のシフト動作の有無を制御すること
により入力データを所定のシフト量シフトして出力する
バレルシフタにおいて、前記複数のシフタのうちいずれ
かを選択して前記入力データを入力する第1の入力選択
手段(8)を有することを特徴とするバレルシフタ。
[Claim 2] A plurality of shifters each having a different shift amount (
1-1 to 1-5) are connected in series, and by controlling the presence or absence of shift operation of the plurality of shifters (1-1 to 1-5), input data is shifted by a predetermined shift amount and output. A barrel shifter comprising a first input selection means (8) for selecting one of the plurality of shifters and inputting the input data.
【請求項3】  シフト量が夫々異なる複数のシフタ(
10−1〜10−n)を従属接続してなり、該複数のシ
フタ(10−1〜10−n)のシフト動作の有無を夫々
に制御することにより入力データをシフトして出力する
バレルシフタにおいて、前記複数のシフタ(10−1〜
10−n)に対応して設けられ前記入力データ及び他段
のシフタ出力のうちいずれか1つを選択して夫々に対応
するシフタに入力する第2の入力選択手段(9−1〜9
−(n−1),12−1〜12−n)と、前記複数のシ
フタの出力から1つの出力を選択して出力する第2の出
力選択手段(9−n)とを有することを特徴とするバレ
ルシフタ。
[Claim 3] A plurality of shifters each having a different shift amount (
10-1 to 10-n) are connected in a cascading manner, and the barrel shifter shifts and outputs input data by controlling whether or not each of the plurality of shifters (10-1 to 10-n) performs a shift operation. , the plurality of shifters (10-1 to
a second input selection means (9-1 to 9-n), which is provided corresponding to the input data and the shifter output of the other stage and selects any one of the input data and the output of the shifter of the other stage and inputs the selected one to the corresponding shifter;
-(n-1), 12-1 to 12-n), and second output selection means (9-n) for selecting and outputting one output from the outputs of the plurality of shifters. Barrel shifter.
JP3051691A 1991-03-15 1991-03-15 Barrel shifter Withdrawn JPH04286022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3051691A JPH04286022A (en) 1991-03-15 1991-03-15 Barrel shifter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3051691A JPH04286022A (en) 1991-03-15 1991-03-15 Barrel shifter

Publications (1)

Publication Number Publication Date
JPH04286022A true JPH04286022A (en) 1992-10-12

Family

ID=12893928

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3051691A Withdrawn JPH04286022A (en) 1991-03-15 1991-03-15 Barrel shifter

Country Status (1)

Country Link
JP (1) JPH04286022A (en)

Similar Documents

Publication Publication Date Title
US5386156A (en) Programmable function unit with programmable fast ripple logic
JP3445416B2 (en) Shift circuit and method for shifting and rearranging a plurality of data bytes
JP3378444B2 (en) Shift circuit
US6154052A (en) Combined tristate/carry logic mechanism
US5081607A (en) Arithmetic logic unit
JPH04286022A (en) Barrel shifter
JPH06237474A (en) Mixer circuit
CA2588512A1 (en) Multiplexer circuit
JPH07112146B2 (en) Variable delay circuit
KR100264641B1 (en) Delay, circuit
JPS5965376A (en) Address control circuit
US3184603A (en) Logic performing device
GB2270400A (en) Digital signal addition and selection.
JPH0214813B2 (en)
JP4158264B2 (en) Sort / merge processing device and sort / merge circuit
KR0172508B1 (en) Bit serial sorter in ascending/descending
KR0153960B1 (en) Barrel shifter circuit
JP2844971B2 (en) Digital code processing system
JPH11282651A (en) Parallel multiplier
JPH0470135A (en) Variable length shift register circuit
JPS58199495A (en) Data processor
JP2586374B2 (en) Test circuit for adder circuit
JPH0210478A (en) Program table interface circuit
JPH11150460A (en) Selection method and selector
JPH03188522A (en) Serial arithmetic circuit

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980514