JPH03110625A - Barrel shifter - Google Patents

Barrel shifter

Info

Publication number
JPH03110625A
JPH03110625A JP24837089A JP24837089A JPH03110625A JP H03110625 A JPH03110625 A JP H03110625A JP 24837089 A JP24837089 A JP 24837089A JP 24837089 A JP24837089 A JP 24837089A JP H03110625 A JPH03110625 A JP H03110625A
Authority
JP
Japan
Prior art keywords
shift
bit
register
input
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.)
Granted
Application number
JP24837089A
Other languages
Japanese (ja)
Other versions
JP2624342B2 (en
Inventor
Takashi Tatsumi
隆 辰巳
Yuichi Saito
祐一 斉藤
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1248370A priority Critical patent/JP2624342B2/en
Publication of JPH03110625A publication Critical patent/JPH03110625A/en
Application granted granted Critical
Publication of JP2624342B2 publication Critical patent/JP2624342B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To perform rotation, logical shift, and arithmetic shift in a circuit adapted to integration with a small amount of hardware by providing first and second registers and a bidirectional shift matrix. CONSTITUTION:One of first and second registers 1 and 2 is used as the input register of data for shift processing, and the other is used as the output register of shift results. When an input/output terminal for N-th bit shift data transfer of the first register 1 and that for M-th bit shift data transfer of the second register 2 are connected in a bidirectional shift matrix 3, one transmission gate is connected between both connected terminals in the case of N>=M. In the case of N<M, two transmission gates are connected in series between connected terminals, and one transmission gate is used as a selector. Thus, a high-speed barrel shifter is obtained which has functions of rotation, logical shift, and arithmetic shift with a small amount of hardware in the circuit constitution adapted to integration.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、シフト機能を有するデータ処理装置に関する
ものであり、特に少ない素子数で、がっ、集積化に適し
た回路で、ローティトを実現するシフト回路に関するも
のである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a data processing device having a shift function, and in particular realizes rotation with a small number of elements and a circuit suitable for integration. The present invention relates to a shift circuit.

〔従来の技術〕[Conventional technology]

一般に、マイクロプロセッサ等のデータ処理装置は、デ
ータの複数ビットのシフト処理を高速に行うためにバレ
ルシフタを備えている。そして、論理演算、及び、算術
演算を行うため、バレルシフタは、論理シフト、算術シ
フト、ローティトの3種類の処理機能を備えている。
Generally, a data processing device such as a microprocessor is equipped with a barrel shifter to shift multiple bits of data at high speed. In order to perform logical operations and arithmetic operations, the barrel shifter has three types of processing functions: logical shift, arithmetic shift, and rotation.

第6図は、従来の32ビツトのバレルシフタの回路図で
ある。33は1ビツトの固定桁シフト回路、34は2ビ
ツトの固定桁シフト回路、35は4ビツトの固定桁シフ
ト回路、36は8ビツトの固定桁シフト回路、37は1
6ビツトの固定桁シフト回路である。入力信号線200
〜231は32ビツトのデータの入力信号線である。4
1はANDゲート、42はORゲートである。1ビツト
の固定桁シフト回路33において、38は1ビツトの左
方向のシフトを行うための制御信号、39はシフトせず
に入力データをそのまま出力するための制御信号、40
は1ビツトの右方向のシフトを行うための制御信号であ
る。2ビツトの固定桁シフト回路34において、43は
2ビツトの左方向のシフトを行うための制御信号、44
はシフトせずに入力データをそのまま出力するための制
御信号、45は2ビツトの右方向のシフトを行うための
制御信号である。4ビツト固定桁シフト回路35におい
て、46は4ビツトの左方−向のシフトを行うための制
御信号、47はシフトせずに入力データをそのまま出力
するための制御信号、48は4ビツトの右方向のシフト
を行うための制御信号である。8ビツトの固定桁シフト
回路36において、49は8ビツトの左方向のシフトを
行うための制御信号、50はシフトせずに入力データを
そのまま出力するための制御信号、51は8ビツトの右
方向のシフトを行うための制御信号である。
FIG. 6 is a circuit diagram of a conventional 32-bit barrel shifter. 33 is a 1-bit fixed digit shift circuit, 34 is a 2-bit fixed digit shift circuit, 35 is a 4-bit fixed digit shift circuit, 36 is an 8-bit fixed digit shift circuit, and 37 is a 1-bit fixed digit shift circuit.
This is a 6-bit fixed digit shift circuit. Input signal line 200
-231 are input signal lines for 32-bit data. 4
1 is an AND gate, and 42 is an OR gate. In the 1-bit fixed digit shift circuit 33, 38 is a control signal for performing a 1-bit leftward shift, 39 is a control signal for outputting input data as it is without shifting, and 40
is a control signal for shifting one bit to the right. In the 2-bit fixed digit shift circuit 34, 43 is a control signal for performing a 2-bit leftward shift;
45 is a control signal for outputting the input data as it is without shifting, and 45 is a control signal for shifting 2 bits to the right. In the 4-bit fixed digit shift circuit 35, 46 is a control signal for performing a 4-bit left shift, 47 is a control signal for outputting the input data as it is without shifting, and 48 is a 4-bit right shift signal. This is a control signal for performing a direction shift. In the 8-bit fixed digit shift circuit 36, 49 is a control signal for performing an 8-bit leftward shift, 50 is a control signal for outputting the input data as it is without shifting, and 51 is an 8-bit rightward shift. This is a control signal for shifting.

16ビツトの固定桁シフト回路37において、52は1
6ビツトの左方向のシフトを行うための制御信号、53
はシフトせずに入力データをそのまま出力するための制
御信号、54は16ビツトの右方向のシフトを行うため
の制御信号である。
In the 16-bit fixed digit shift circuit 37, 52 is 1
Control signal for performing a 6-bit leftward shift, 53
54 is a control signal for outputting the input data as it is without shifting, and 54 is a control signal for shifting 16 bits to the right.

1ビツトの固定桁シフト回路33は、制御信号38を“
H”にすると1ビツト左方向のローティトを行うことが
でき、制御信号39を“H″にすると入力データをその
まま出力することができる。
The 1-bit fixed digit shift circuit 33 outputs the control signal 38 as “
When the control signal 39 is set to "H", it is possible to rotate one bit to the left, and when the control signal 39 is set to "H", the input data can be output as is.

制御信号40を“H”にすることにより、1ビツトの右
方向のローティトを行うことができる。
By setting the control signal 40 to "H", one bit can be rotated to the right.

32ビツトのバレルシフタを構成する場合、2ビツト、
4ビツト、8ビツト、16ビントの固定桁シフト回路を
1ビツトの固定桁シフト回路33と同様の構成で構成し
、5段直列に接続することにより任意ビットの左右方向
のローティトを実現していた。
When configuring a 32-bit barrel shifter, 2 bits,
The 4-bit, 8-bit, and 16-bit fixed digit shift circuits were constructed in the same configuration as the 1-bit fixed digit shift circuit 33, and by connecting them in five stages in series, it was possible to rotate any bit in the left/right direction. .

例えば、10ビツトの右方向のローティトを行う場合、
2ビツトの固定桁シフト回路34で制御信号45を′″
H′″にすることにより2ビツトの右方向のローティト
を行い、前記ローティトを行ったデータについて8ビツ
トの固定桁シフト回路36の制御信号51を“Hlにす
ることにより、8ビツトの右方向のローティトを行う、
そして、他の固定桁シフト回路は入力信号をそのまま出
力するように制御信号39.47.53を“H′″にす
ることにより、10ビツトの右方向のローティトが実現
できる。
For example, when rotating 10 bits to the right,
The control signal 45 is changed by the 2-bit fixed digit shift circuit 34.
By setting it to H''', 2 bits are rotated to the right, and by setting the control signal 51 of the 8-bit fixed digit shift circuit 36 to ``H'' for the rotated data, 8 bits are rotated to the right. perform rotation,
The other fixed digit shift circuits can achieve a rightward rotation of 10 bits by setting the control signals 39, 47, 53 to "H'" so as to output the input signals as they are.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記従来のバレルシフタでは、以上に述べたように、多
段の固定桁シックが直列に接続され、多くのゲートを通
過するために遅延が太き(なり、処理時間が長くなり、
LSIに実現する上で配線が複雑になるという問題点が
あった。
In the above-mentioned conventional barrel shifter, as mentioned above, multiple stages of fixed digit chics are connected in series, and the delay becomes thick (and the processing time becomes long) because it passes through many gates.
There was a problem in that the wiring became complicated when implementing it into an LSI.

また、上記バレルシフタはローティト操作専用のもので
あり、更に、論理シフト、算術シフトの機能を追加しよ
うとすると、制御信号の数、トランジスタの数が増加し
てしまうという問題点があった。
Further, the barrel shifter is used exclusively for rotation operations, and if it were attempted to add logical shift and arithmetic shift functions, there was a problem in that the number of control signals and the number of transistors would increase.

この発明は、上記従来のものの問題点を解消するために
なされたもので、少ないハードウェア量で、しかも、集
積化に適した回路でローティト、論理シフト、算術シフ
トを行うことができるバレルシフタを提供することを目
的とする。
This invention was made in order to solve the problems of the conventional ones, and provides a barrel shifter that can perform rotation, logical shift, and arithmetic shift with a small amount of hardware and with a circuit suitable for integration. The purpose is to

〔課題を解決するための手段〕[Means to solve the problem]

この発明にかかるバレルシフタは、双方向のシフトマト
リクスを有し、かつ、シフトマトリクスにおいて、第1
のレジスタのNビット目のシフトデータ転送用の入出力
端子と第2のレジスタのMビット目のシフトデータ転送
用の入出力端子が接続している場合、82Mならば、接
続された端子間に1つのトランスミッションゲートが接
続され、N<Mならば、接続された端子間に2つのトラ
ンスミッションゲートが直列に接続され、かつ、−方の
トランスミッションゲートがセレクタとなるように構成
し、更に内部をプリチャージ方式で、かつ、高速化のた
め、反転論理でシフト動作を行うようにバレルシフタを
構成したものである。
The barrel shifter according to the present invention has a bidirectional shift matrix, and in the shift matrix, the first
If the input/output terminal for transferring the N-th bit shift data of the register is connected to the input/output terminal for transferring the M-th bit shift data of the second register, if 82M, there is a connection between the connected terminals. If one transmission gate is connected and N<M, two transmission gates are connected in series between the connected terminals, and the negative transmission gate is configured to function as a selector. The barrel shifter is a charge system and is configured to perform a shift operation using inverted logic to increase speed.

〔作用〕[Effect]

この発明においては、双方向のシフトマトリクスを有し
、かつ、各シフトマトリクスにおいて、第1のレジスタ
のNビット目のシフトデータ転送用の入出力端子と第2
のレジスタのMビット目のシフトデータ転送用の入出力
端子が接続している場合、82Mならば、接続された端
子間に1つのトランスミツシロンゲートが接続され、N
<Mならば、接続された端子間に2つのトランスミッシ
ョンゲートが接続され、かつ、一方のトランスミッショ
ンゲートがセレクタとなるようにシフト回路を構成する
ことにより、少ないハードウェア量で、かつ、集積化に
適した回路構成で、ローティト、論理シフト、算術シフ
トの機能を有する高速なバレルシフタを実現することが
できる。
In the present invention, a bidirectional shift matrix is provided, and in each shift matrix, an input/output terminal for transferring N-th bit shift data of a first register and a second
When the input/output terminals for transferring the M-th bit shift data of the register are connected, if it is 82M, one transmitter gate is connected between the connected terminals, and N
<M, by configuring the shift circuit so that two transmission gates are connected between the connected terminals and one transmission gate serves as a selector, the amount of hardware can be reduced and integration can be achieved. With a suitable circuit configuration, a high-speed barrel shifter having rotation, logical shift, and arithmetic shift functions can be realized.

(実施例〕 以下、本発明の一実施例を図について説明する。(Example〕 Hereinafter, one embodiment of the present invention will be described with reference to the drawings.

第1図は、本発明の一実施例による32ビツトのバレル
シフタを示す、1はBBOO,BBOI。
FIG. 1 shows a 32-bit barrel shifter according to one embodiment of the present invention, where 1 is BBOO, BBOI.

BBO2,・・・、BB31の32ビツトから構成され
る第2レジスタである。2はBAOO,BAOl、BA
O2,・・・BA31の32ビツトから構成される第2
レジスタである。上記レジスタのうちいずれか一方がシ
フト処理時のデータの入力レジスタとなり、他方がシフ
ト結果の出力レジスタとなる。3は双方向のシフトマト
リクス、4はデータ入力バス、5はシフト結果の出力バ
スである。
This is a second register consisting of 32 bits BBO2, . . . , BB31. 2 is BAOO, BAOL, BA
O2, ... The second consisting of 32 bits of BA31
It is a register. One of the above registers serves as an input register for data during shift processing, and the other serves as an output register for shift results. 3 is a bidirectional shift matrix, 4 is a data input bus, and 5 is a shift result output bus.

7ij(0−5i≦3、O≦j≦9)はシフト幅に応じ
て“H”となる制御信号であり、71jはシフト幅が1
jビツトの時に“H”となる制御信号である。10はロ
ーティトを行う場合にH”となる制御信号、11は算術
シフト、かつ、右方向のシフト、かつ、符号ビットが“
l”の場合にのみ“H″となる制御信号である。16は
ROTIOが“H”である時にONするトランジスタ群
である。17は5HAIIが“H″である時にONする
トランジスタ群である。5ijは5FTlj(7i j
)が“H′の時にONするトランジスタ群である。80
0〜831は第ルジスタ1に接続されるシフトバスであ
り、シフトパス<5k1)(0≦に≦3.0≦1≦9)
は第ルジスタ1のに1ビツト目のBBk 1に接続して
いる。900〜931は第2レジスタ2に接続されるシ
フトパスであり、シフトパス9st(Q≦3≦3.0≦
t≦9)は第2レジスタ2のstビット目のBA3tに
接続している。600〜631はローティト、或いは算
術シフトを行う際に必要となるシフトパスであり、シフ
トパス(6g h)  (0≦g≦3.0≦h≦9)は
トランジスタ群16がONすることによりシフトパス(
8g h)に接続される。
7ij (0-5i≦3, O≦j≦9) is a control signal that becomes “H” depending on the shift width, and 71j is a control signal that becomes “H” when the shift width is 1.
This is a control signal that becomes "H" when the bit is j. 10 is a control signal that becomes "H" when performing a rotation, 11 is an arithmetic shift, a shift in the right direction, and a sign bit of "
This is a control signal that becomes "H" only when ROTIO is "H". Reference numeral 17 is a transistor group that is turned on when ROTIO is "H". Reference numeral 17 is a transistor group that is turned on when 5HAII is "H". 5ij is 5FTlj (7i j
) is a group of transistors that turn on when it is “H”.80
0 to 831 are shift buses connected to the No. 1 register, and shift paths <5k1) (0≦≦3.0≦1≦9)
is connected to the 1st bit BBk1 of the register 1. 900 to 931 are shift paths connected to the second register 2, and shift paths 9st (Q≦3≦3.0≦
t≦9) is connected to the st bit BA3t of the second register 2. 600 to 631 are shift paths required when performing rotation or arithmetic shift, and shift path (6g h) (0≦g≦3.0≦h≦9) is the shift path (6g h) (0≦g≦3.0≦h≦9) when the transistor group 16 is turned on.
8g h).

本発明の一実施例である第1図のバレルシフタの回路図
をブロック図で表すと第2図のようになる。
The circuit diagram of the barrel shifter shown in FIG. 1, which is an embodiment of the present invention, is shown in a block diagram as shown in FIG.

第ルジスタ1.第2レジスタ2の回路構成を第3図に示
す、23はデータを保持するラッチ、24は入力バス4
から第ルジスタ1、或いは、第2レジスタ2に入力デー
タを取り込む際に開くトランスミツシロンゲート、25
はシフト結果を第ルジスタ1、或いは第2レジスタ2に
取り込む際に開くトランスミッションゲート、26はイ
ンバータ、27はディスチャージのための直列に接続し
たNチャンネルトランジスタ、28はプリチャージ用の
Pチャネルトランジスタ、29はPATHで、これはシ
フトパスである800〜831.900〜931に接続
される。30はラッチ23の帰還用のトランスミッショ
ンゲート、31゜32はインバータである。
No. 1. The circuit configuration of the second register 2 is shown in FIG. 3, where 23 is a latch that holds data, and 24 is an input bus 4.
a transmitter gate 25 that opens when input data is taken into the register 1 or the second register 2;
26 is an inverter; 27 is an N-channel transistor connected in series for discharging; 28 is a P-channel transistor for precharging; 29 is PATH, which is connected to the shift path 800-831.900-931. 30 is a transmission gate for feedback of the latch 23, and 31 and 32 are inverters.

第4図は、第1図のシフト回路において、1ビット右方
向のローティトを行う場合のタイミング図である。21
はシフト回路を含むデータ処理装置の内部動作クロック
であり、本発明の一実施例であるバレルシフタはA、B
、C,Dの4フエーズで動作する。22はプリチャージ
用のPチャネルトランジスタ28を制御するためのクロ
ック信号φである。
FIG. 4 is a timing diagram when rotating one bit to the right in the shift circuit of FIG. 1. 21
is an internal operating clock of a data processing device including a shift circuit, and a barrel shifter according to an embodiment of the present invention has clocks A and B.
, C, and D. 22 is a clock signal φ for controlling the P-channel transistor 28 for precharging.

第3図と第4図を用いて第ルジスタl、及び第2レジス
タ2の動作について説明する。内部動作クロック21が
Aのタイミングの時、入力データ取り込み用のトランス
ミッションゲート24が開き、入力バス4からラッチ2
3に入力データを取り込むことにより、第ルジスタ1に
入力データを格納する。内部動作クロック21がBのタ
イミングになると制御クロックφ22が“L”となり、
Pチャネルトランジスタ28がONL、、シフトパス6
00〜631.800〜831.900〜931がプリ
チャージされる。内部動作クロック21がCのタイミン
グに、右方向のローティト、算術シフト、或いは論理シ
フトが行われる時、第2レジスタ2の直列に接続したデ
ィスチャージトランジスタ27のゲート信号の一方であ
るC4はH″となる。この時、第ルジスタ1のラッチ2
3に格納されているデータが0”の場合、PATH29
はディスチャージされず、プリチャージされたデータ“
l”がPATH29上に出力される。PATH29上に
出力されたデータ“1′″はシフトされ、第2レジスタ
2のインバータ26により反転され、ラッチ23に取り
込まれることにより、第2レジスタ2には、シフト結果
である“0”が格納される。逆に、第ルジスタ1のラッ
チ23に格納されているデータが“1”の場合、PAT
H29はディスチャージトランジスタ27によりディス
チャージされ、ディスチャージされたデータ“0”がP
ATH29上に出力される。
The operations of the first register 1 and the second register 2 will be explained using FIGS. 3 and 4. When the internal operation clock 21 is at timing A, the transmission gate 24 for taking in input data opens, and the latch 2 is transferred from the input bus 4.
By taking in the input data into the register 3, the input data is stored in the register 1. When the internal operation clock 21 reaches timing B, the control clock φ22 becomes "L",
P-channel transistor 28 is ONL, shift path 6
00-631.800-831.900-931 are precharged. When the internal operation clock 21 performs a rightward rotation, arithmetic shift, or logical shift at timing C, C4, which is one of the gate signals of the discharge transistor 27 connected in series in the second register 2, becomes H''. At this time, the latch 2 of the first register
If the data stored in 3 is 0'', PATH29
is not discharged and the precharged data “
1'' is output on the PATH 29. The data ``1'' output on the PATH 29 is shifted, inverted by the inverter 26 of the second register 2, and taken into the latch 23. , the shift result "0" is stored. Conversely, if the data stored in the latch 23 of the first register 1 is "1", the PAT
H29 is discharged by the discharge transistor 27, and the discharged data “0” becomes P.
Output on ATH29.

PATH29上に出力されたデータ“0”はシフトされ
、第2レジスタ2のインバータ26により反転され、ラ
ッチ23に取り込まれることにより、第2レジスタ2に
は、シフト結果である1″が格納される。このようにシ
フトマトリクス内では反転論理でデータの転送が行われ
る。
The data "0" output on the PATH 29 is shifted, inverted by the inverter 26 of the second register 2, and taken into the latch 23, so that the shift result 1" is stored in the second register 2. In this way, data is transferred within the shift matrix using inverted logic.

次に、第1図、第4図を用いてローティトの動作を説明
する。まず、32ビツトのデータで、1ピントの右方向
のローティトを行う場合について説明を行う。
Next, the operation of the rotito will be explained using FIGS. 1 and 4. First, a case will be described in which a one-focus rotation to the right is performed using 32-bit data.

入力バス4から入力されたデータは、第ルジスタ1に格
納される。MSBがBB31である。
Data input from the input bus 4 is stored in the first register 1. The MSB is BB31.

ローティトを行う時には、ROTIOは、内部動作クロ
ック21がDの立ち上がりから次のDの立ち上がりまで
H”となる、これによりトランジスタ群16が開く。算
術シフトは行わないので5HAILは“L”のままであ
る、この例の場合においては1ビツトの右方向のローテ
ィトなので、5FTOI  (701)だけが“H”と
なり、5FTOO(700)、5FTO2(702)、
・・・5FT31  (731)は′L”となる、これ
によりトランジスタ群501がONする。トランジスタ
群501がONすることにより、第ルジスタ1のBBO
I、・・・、BB31に格納された入力データが、トラ
ンジスタ群501を通過し、シフトパス801〜831
からシフトパス900〜930へ伝わり、第2レジスタ
2のBAOO,・・・BA30にシフトされる。第ルジ
スタ1のBBOOは、シフトパス800からトランスミ
ッションゲート16aを経てシフトパス600へ伝わり
、その後、トランスミッションゲート501aを経てシ
フトパス931に伝わり、第2レジスタ2のBA31に
ローティトされる。以上に述べたようにして1ビツト右
方向のローティトが行われる。
When rotating, ROTIO becomes "H" from the rising edge of D to the next rising edge of D, and this opens the transistor group 16.Since no arithmetic shift is performed, 5HAIL remains "L". In this example, since the rotation is 1 bit to the right, only 5FTOI (701) becomes "H", and 5FTOO (700), 5FTO2 (702),
...5FT31 (731) becomes 'L'', which turns on the transistor group 501. By turning on the transistor group 501, the BBO of the first transistor 1 turns on.
The input data stored in I, .
The signals are transmitted to shift paths 900 to 930 and shifted to BAOO, . . . BA30 of the second register 2. BBOO of the first register is transmitted from the shift path 800 to the shift path 600 via the transmission gate 16a, and then transmitted to the shift path 931 via the transmission gate 501a, and rotated to BA31 of the second register 2. Rotating one bit to the right is performed as described above.

以上、1ビツトの右方向のローティトについて述べたが
、1ビツトの左方向のローティトの場合でも、入力デー
タが格納される入力レジスタが第2レジスタ2、シフト
結果が格納される出力レジスタが第ルジスタ1に変わる
だけで、動作については、1ビツトの右方向のローティ
トの場合と全く同じである。
The above description has been about rightward rotation of 1 bit, but even in the case of 1 bit leftward rotation, the input register where input data is stored is the second register 2, and the output register where the shift result is stored is the register 2. The operation is exactly the same as in the case of a rightward rotation of 1 bit.

以上では、32ビツトのデータについて1ビツトのロー
ティトを行う場合について述べたが、本発明の32ビツ
トのバレルシフタでは、32ビツトのデータについてだ
けでなく、ハーフワード16ビツト、バイト(8ビツト
)のデータについてもローティトを実現できる。
In the above, we have described the case where 1-bit rotation is performed for 32-bit data, but the 32-bit barrel shifter of the present invention can rotate not only 32-bit data but also halfword 16-bit and byte (8-bit) data. It is also possible to achieve rotito.

第5図は、この発明の一実施例における各種サイズの処
理方法を示す図である。第5図(a)に示すように、1
6ビツトのデータを扱う場合には、32ビツトの第ルジ
スタ1の上位16ビツト、及び下位16ビツトの両方に
16ビツトのデータを入力し、第5図(b)に示すよう
に、右方向ローティトの場合には第2レジスタ2のMS
B側の上位16ビツトを出力し、左方向ローティトの場
合には第2レジスタ2のLSB側の下位16ビツトを出
力する。また、8ビツトのデータを扱う場合には、第5
図(a)に示すように、32ビツトの第ルジスタ1の上
位8ビツト、及び下位8ビツトの両方に8ビツトのデー
タを入力し、第5図(b)に示すように、右方向へのロ
ーティトの場合には第2レジスタ2のMSB側の上位8
ビツトを出力し、左方向へのローティトの場合には第2
レジスタ2のLSB側の下位8ビツトを出力する。
FIG. 5 is a diagram showing a method of processing various sizes in an embodiment of the present invention. As shown in FIG. 5(a), 1
When handling 6-bit data, input 16-bit data to both the upper 16 bits and lower 16 bits of the 32-bit register 1, and rotate the right rotation as shown in Figure 5(b). In the case of , the MS of the second register 2
The upper 16 bits on the B side are output, and in the case of leftward rotation, the lower 16 bits on the LSB side of the second register 2 are output. Also, when handling 8-bit data, the fifth
As shown in Figure (a), 8-bit data is input to both the upper 8 bits and lower 8 bits of the 32-bit register 1, and as shown in Figure 5 (b), the data is input to the right. In the case of rotation, the upper 8 on the MSB side of the second register 2
Outputs the bit, and in case of rotation to the left, the second
The lower 8 bits on the LSB side of register 2 are output.

1ビツトの右方向の論理シフトを行う場合には、第4図
に示すタイミング図で、ROTIOが“L”のままとな
り、他の信号はローティトの場合と同じである。このた
め、右方向の論理シフトの場合は、第ルジスタ1から第
2レジスタ2の31ビツト目のBA31にシフトするパ
スが存在しなくなる。その結果、プリチャージされたシ
フトパス931の反転信号である“0”が、第2レジス
タ2の31ビツト目BA31に取り込まれ、ゼロ拡張さ
れる。1ビツトの左方向の論理シフトの場合は、左方向
の論理シフトの場合と同様に、第2レジスタ2かし第2
レジスタ2のOビット目のBBooにシフトするパスが
存在しなくなる。4:の結果、プリチャージされたシフ
トパス800の反転信号である“0”が、第ルジスタ1
の0ビツト目のBBOOに取り込まれ、ゼロ拡張される
When performing a 1-bit rightward logical shift, ROTIO remains at "L" in the timing diagram shown in FIG. 4, and the other signals are the same as in the case of ROTIO. Therefore, in the case of a rightward logical shift, there is no path for shifting from the register 1 to the 31st bit BA31 of the second register 2. As a result, "0", which is the inverted signal of the precharged shift path 931, is taken into the 31st bit BA31 of the second register 2 and zero-extended. In the case of a 1-bit leftward logical shift, the second register 2 or the second
There is no longer a path to shift to the O-th bit BBoo of register 2. 4: As a result, “0”, which is the inverted signal of the precharged shift path 800, is transferred to the first register
The data is taken into the 0th bit of BBOO and zero-extended.

次に算術シフトについて説明する。算術シフトの動作で
論理シフトの動作と違うのは右方向のシフトで、かつ、
符号ビットが“l゛の場合だけである。従って、1ビツ
ト右方向の算術シフト(符号ビットが“1”)の場合に
ついて説明する。この場合には、5HA11’l<Cの
タイミングの1フエーズだけ“H”となる、これにより
、右方向のシフトを行うと共に、プリチャージされたシ
フトパス600〜631がトランジスタ群17によりデ
ィスチャージされ60″となり、トランスミッションゲ
ー)501aがONすることによりディスチャージされ
たデータ″0′″がシフトパス931を通過し、そのデ
ータ“0”を反転することにより、符号拡張の必要があ
る第2レジスタ2の31ビツト目のBA31にデータ′
″1”を格納する。
Next, arithmetic shift will be explained. The operation of an arithmetic shift differs from that of a logical shift in that it is a rightward shift, and
This applies only when the sign bit is “l”. Therefore, we will explain the case of arithmetic shift to the right by 1 bit (sign bit is “1”). In this case, 1 phase with a timing of 5HA11'l<C. As a result, a rightward shift is performed, and the precharged shift paths 600 to 631 are discharged by the transistor group 17 to become 60'', and the data discharged by turning on the transmission gate 501a. "0" passes through the shift path 931, and by inverting the data "0", the data "0" is transferred to the 31st bit BA31 of the second register 2, which requires sign extension.
Store "1".

以上に述べた動作により、算術シフトの動作で、かつ、
右方向のシフト、符号ビットが“1”の場合にも本回路
は動作できるものである。
With the operation described above, the operation of arithmetic shift, and
The present circuit can also operate when there is a rightward shift and the sign bit is "1".

なお、以上はlビットの論理シフト、算術シフト、ロー
ティ士について述べたが、Nビットの論理シフト、算術
シフト、ローティトについても同様に動作する。
Note that although the above description has been made regarding the l-bit logical shift, arithmetic shift, and roti shift, the same operation applies to the N-bit logical shift, arithmetic shift, and roti.

また、以上では32ビツトバレルシフタの一例を示した
が、Nビットのバレルシフタについても同様に実現でき
る。
Further, although an example of a 32-bit barrel shifter has been shown above, an N-bit barrel shifter can be similarly implemented.

〔発明の効果〕〔Effect of the invention〕

以上のように、この発明によれば、双方向のシフトマト
リクスを有し、かつ、シフトマトリクスにおいて、第1
のレジスタのNビット目のシフトデータ転送用の入出力
端子と第2のレジスタのMビット目のシフトデータ転送
用の入出力端子が接続している場合、N≧Mならば、接
続された端子間に1つのトランスミッションゲートが接
続され、N<Mならば、接続された端子間に2つのトラ
ンスミッションゲートが直列に接続されるようにシフト
回路を構成するようにしたーので、その回路構成は、簡
単な繰り返し構造で、規則正しく集積化に適した構成と
なり、ビットスライス的にレイアウトを行うことができ
る。また、双方向シフト可能な1段或いは、2段のNチ
ャネルMO3を用いてシフトパスを構成できるので、シ
フトパスのゲート段数が少なく、高速なバレルシフタを
実現できる。更に、算術シフト時に必要となる符号拡張
のためにディスチャージトランジスタを付加するだけで
、論理シフトと算術シフトとを選択的に実現できる効果
がある。
As described above, according to the present invention, there is a bidirectional shift matrix, and in the shift matrix, the first
When the input/output terminal for transferring the N-th bit shift data of the register is connected to the input/output terminal for transferring the M-th bit shift data of the second register, if N≧M, the connected terminal One transmission gate is connected between them, and if N<M, the shift circuit is configured such that two transmission gates are connected in series between the connected terminals.The circuit configuration is as follows. It has a simple repeating structure, has a regular structure suitable for integration, and can be laid out in a bit-sliced manner. Furthermore, since the shift path can be constructed using one or two stages of N-channel MO3s that are bidirectionally shiftable, the number of gate stages in the shift path is small, and a high-speed barrel shifter can be realized. Furthermore, by simply adding a discharge transistor for sign extension required during arithmetic shift, there is an effect that logical shift and arithmetic shift can be selectively realized.

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

第1図は本発明の一実施例によるバレルシフタを示す図
、第2図は上記実施例のバレルシフタのブロック図、第
3図は第ルジスタ1.第2レジスタ2の回路構成図、第
4図は第1図のシフト回路において1ビツトのローティ
トを行う場合のタイミング図、第5図は各種サイズのデ
ータの処理方法を示す図、第6図は従来の32ビツトバ
レルシフタの一例を示す図である。 lは32ビツトの第2レジスタ、2は32ビツトの第2
レジスタであり、上記レジスタのうちいずれか一方が入
力データの入力レジスタとなり、他方がシフト結果の出
力レジスタとなる。3はシフト方向が双方向であるシフ
トマトリクス、4は入力データの入力バス、5はシフト
結果の出力バスである。 なお図中同一符号は同−又は相当部分を示す。
FIG. 1 is a diagram showing a barrel shifter according to an embodiment of the present invention, FIG. 2 is a block diagram of the barrel shifter of the above embodiment, and FIG. 3 is a diagram showing a barrel shifter according to an embodiment of the present invention. A circuit configuration diagram of the second register 2, FIG. 4 is a timing diagram when rotating one bit in the shift circuit of FIG. 1, FIG. 5 is a diagram showing how to process data of various sizes, and FIG. 1 is a diagram showing an example of a conventional 32-bit barrel shifter. l is the 32-bit second register; 2 is the 32-bit second register;
One of the registers serves as an input register for input data, and the other serves as an output register for shift results. 3 is a shift matrix whose shift direction is bidirectional, 4 is an input bus for input data, and 5 is an output bus for shift results. Note that the same reference numerals in the figures indicate the same or equivalent parts.

Claims (3)

【特許請求の範囲】[Claims] (1)複数のビットを有し、各々のビット毎に、1つの
データ入出力端子と1つのシフトデータ転送用の入出力
端子とを備えた第1、及び、第2のレジスタと、 2組の前記第1、第2のレジスタの各々のビット数と等
しい数の端子群を持つ双方向のシフトマトリクスを有し
、かつ、 前記シフトマトリクスにおいて、該第1のレジスタのN
ビット目のシフトデータ転送用の入出力端子と該第2の
レジスタのMビット目のシフトデータ転送用の入出力端
子が接続している場合、N≧Mならば、前記接続された
端子間に1つのトランスミッションゲートが接続されて
おり、N<Mならば、前記接続された端子間に2つのト
ランスミッションゲートが直列に接続されていることを
特徴とするバレルシフタ。
(1) Two sets of first and second registers each having a plurality of bits and each bit having one data input/output terminal and one shift data transfer input/output terminal. a bidirectional shift matrix having a number of terminal groups equal to the number of bits of each of the first and second registers;
When the input/output terminal for bit-th shift data transfer and the input/output terminal for M-th shift data transfer of the second register are connected, if N≧M, there is a connection between the connected terminals. A barrel shifter characterized in that one transmission gate is connected, and if N<M, two transmission gates are connected in series between the connected terminals.
(2)前記シフトマトリクスにおいて、該第1のレジス
タのNビット目のシフトデータ転送用の入出力端子と該
第2のレジスタのMビット目のシフトデータ転送用の入
出力端子が接続している場合、N<Mならば、前記接続
された端子間に2つのトラッスミッションゲートが直列
に接続されており、かつ、一方のトランスミッションゲ
ートが論理シフトと算術シフトのセレクタとなっている
ことを特徴とする特許請求の範囲第1項記載のバレルシ
フタ。
(2) In the shift matrix, the input/output terminal for transferring the N-th bit shift data of the first register is connected to the input/output terminal for transferring the M-th bit shift data of the second register. If N<M, two transmission gates are connected in series between the connected terminals, and one transmission gate serves as a selector for a logical shift and an arithmetic shift. A barrel shifter according to claim 1.
(3)前記第1、第2のレジスタのシフトデータ転送用
の入出力端子において、プリチャージ回路を有し、かつ
、シフトデータの転送を反転論理で行うことを特徴とす
る特許請求の範囲第1項又は第2項記載のバレルシフタ
(3) The input/output terminals for shift data transfer of the first and second registers include a precharge circuit, and the shift data transfer is performed using inverted logic. Barrel shifter according to item 1 or 2.
JP1248370A 1989-09-25 1989-09-25 Barrel shifter Expired - Fee Related JP2624342B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1248370A JP2624342B2 (en) 1989-09-25 1989-09-25 Barrel shifter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1248370A JP2624342B2 (en) 1989-09-25 1989-09-25 Barrel shifter

Publications (2)

Publication Number Publication Date
JPH03110625A true JPH03110625A (en) 1991-05-10
JP2624342B2 JP2624342B2 (en) 1997-06-25

Family

ID=17177090

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1248370A Expired - Fee Related JP2624342B2 (en) 1989-09-25 1989-09-25 Barrel shifter

Country Status (1)

Country Link
JP (1) JP2624342B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04107728A (en) * 1990-08-29 1992-04-09 Nec Ic Microcomput Syst Ltd Barrel shifter circuit
JP2011522317A (en) * 2008-05-29 2011-07-28 アクシス・セミコンダクター・インコーポレーテッド Microprocessor technology for real-time signal processing and updating

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59161731A (en) * 1983-03-07 1984-09-12 Hitachi Ltd Barrel shifter
JPS61175819A (en) * 1985-01-31 1986-08-07 Hitachi Ltd Barrel shifting circuit
JPS62212724A (en) * 1986-03-13 1987-09-18 Fujitsu Ltd Data converting circuit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59161731A (en) * 1983-03-07 1984-09-12 Hitachi Ltd Barrel shifter
JPS61175819A (en) * 1985-01-31 1986-08-07 Hitachi Ltd Barrel shifting circuit
JPS62212724A (en) * 1986-03-13 1987-09-18 Fujitsu Ltd Data converting circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04107728A (en) * 1990-08-29 1992-04-09 Nec Ic Microcomput Syst Ltd Barrel shifter circuit
JP2011522317A (en) * 2008-05-29 2011-07-28 アクシス・セミコンダクター・インコーポレーテッド Microprocessor technology for real-time signal processing and updating

Also Published As

Publication number Publication date
JP2624342B2 (en) 1997-06-25

Similar Documents

Publication Publication Date Title
EP0407177B1 (en) Bit sequence reversing device
US3932734A (en) Binary parallel adder employing high speed gating circuitry
US4890251A (en) Arithmetic shifter with sign extend facility
EP0033343A1 (en) Cmos microprocessor architecture.
JPH0769782B2 (en) Microprogrammable 32-bit cascadable bit slice
US5636157A (en) Modular 64-bit integer adder
JPH0438009B2 (en)
US4049974A (en) Precharge arithmetic logic unit
KR100298029B1 (en) Barrel shifter
US5416731A (en) High-speed barrel shifter
US4903005A (en) Comparator circuit
US4349888A (en) CMOS Static ALU
JPH03110625A (en) Barrel shifter
JPH0697431B2 (en) Barrel shifter
US5499383A (en) DMA control device controlling sequential storage of data
GB1427993A (en) Asynchronous electronic binary storage and shift registers
US4805130A (en) Arithmetic and logic circuit stage
US5978826A (en) Adder with even/odd 1-bit adder cells
US5729706A (en) Microcomputer with improved data processing and data transfer capabilities
JPS63314639A (en) Barrel shifter circuit
JP3026268B2 (en) Logic circuit
JP2615746B2 (en) Bit operation circuit
JPH06149540A (en) Arithmetic logical operation circuit
JP2711487B2 (en) Fixed data addition / subtraction circuit
JPS62221727A (en) Full-adder circuit

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees