JP2003337694A - Shift circuit - Google Patents

Shift circuit

Info

Publication number
JP2003337694A
JP2003337694A JP2002146697A JP2002146697A JP2003337694A JP 2003337694 A JP2003337694 A JP 2003337694A JP 2002146697 A JP2002146697 A JP 2002146697A JP 2002146697 A JP2002146697 A JP 2002146697A JP 2003337694 A JP2003337694 A JP 2003337694A
Authority
JP
Japan
Prior art keywords
shift
bit
data
barrel shifter
signal
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
JP2002146697A
Other languages
Japanese (ja)
Inventor
Keisoku Kitamura
恵則 北村
Katsuyuki Sumiya
勝之 角谷
Masaki Nakamura
正樹 中村
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2002146697A priority Critical patent/JP2003337694A/en
Publication of JP2003337694A publication Critical patent/JP2003337694A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To set an optional shift direction and improve a processing speed in a prescribed bit shift of input data. <P>SOLUTION: A shift circuit is provided with n pieces of barrel shifters 12a, 12b, 12c, 12d to 12n which are set to a different shift amount to m-bit data being input bit data and a shift control circuit 11 which controls the operation of each of barrel shifters 12a, 12b, 12c 12d to 12n. The shift control circuit 11 sets the shift directions of the m-bit data being the input bit data so that they may have optionally same direction and controls each of the barrel shifters 12a, 12b, 12c, 12d to 12n to shift an optional shift amount to the input bit data. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、半導体論理回路に
用いられるシフト回路に関し、特に、ビット列のデータ
に対して任意のビット長のシフトを行うシフト回路に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shift circuit used in a semiconductor logic circuit, and more particularly to a shift circuit that shifts data of a bit string by an arbitrary bit length.

【0002】[0002]

【従来の技術】半導体論理回路内の演算機能部として使
用されるシフト回路には、種々の回路形式が提案されて
いる。
2. Description of the Related Art Various circuit formats have been proposed for a shift circuit used as an arithmetic function unit in a semiconductor logic circuit.

【0003】その一例として、8ビットデータに対して
上位ビット方向(例えば左方向)または下位ビット方向
(例えば右方向)のいずれか一方向にデータをシフトす
る際に、データのシフト量であるビット長を変更し得る
シフト回路が、特開平5−204595号公報に開示さ
れている。そのシフト回路を図7(a)および(b)に
示す。
As an example thereof, when the data is shifted in one direction of the upper bit direction (for example, left direction) or the lower bit direction (for example, right direction) with respect to the 8-bit data, a bit which is a data shift amount. A shift circuit whose length can be changed is disclosed in Japanese Patent Application Laid-Open No. 5-204595. The shift circuit is shown in FIGS. 7 (a) and 7 (b).

【0004】図7(a)は、例えば、8ビットデータを
一方向にのみシフトさせる8ビットバレルシフタ回路の
全体構成を示す概略図である。図7(a)の8ビットバ
レルシフタ回路は、複数のセレクタをそれぞれ有する8
つのセレクタ群111〜118から構成されている。各
セレクタ群111〜118は、それぞれ3段のシフタか
ら構成されたセレクタ群である。各セレクタ群111〜
118には、入力信号102が入力されるとともに、4
ビットシフト信号105、2ビットシフト信号106お
よび1ビットシフト信号107もそれぞれ入力され、出
力信号103が出力される。
FIG. 7A is a schematic diagram showing the overall structure of an 8-bit barrel shifter circuit that shifts 8-bit data only in one direction, for example. The 8-bit barrel shifter circuit of FIG. 7A has 8 selectors each having a plurality of selectors.
It is composed of one selector group 111 to 118. Each of the selector groups 111 to 118 is a selector group composed of three stages of shifters. Each selector group 111 to
The input signal 102 is input to 118, and 4
The bit shift signal 105, the 2-bit shift signal 106, and the 1-bit shift signal 107 are also input, and the output signal 103 is output.

【0005】図7(b)は、図7(a)に示す8ビット
バレルシフタ回路を構成する各セレクタ群111〜11
8の中の1つのセレクタ群の構成図である。各セレクタ
群は、同様の構成になっており図7(b)に示すよう
に、4ビットシフト用のセレクタ201と、2ビットシ
フト用のセレクタ202と、1ビットシフト用のセレク
タ203とが横方向に並んで配置されており、各セレク
タ201〜203によって、データがそれぞれいる。
FIG. 7B shows selector groups 111 to 11 which form the 8-bit barrel shifter circuit shown in FIG. 7A.
9 is a configuration diagram of one selector group in FIG. Each selector group has the same configuration, and as shown in FIG. 7B, a selector 201 for 4-bit shift, a selector 202 for 2-bit shift, and a selector 203 for 1-bit shift are arranged horizontally. Data are provided by the selectors 201 to 203, respectively.

【0006】セレクタ201には、入力信号204およ
び4ビットシフト信号205が入力され、セレクタ20
2には、2ビットシフト信号206が入力され、セレク
タ203には、1ビットシフト信号207が入力され
る。
An input signal 204 and a 4-bit shift signal 205 are input to the selector 201, and the selector 20
The 2-bit shift signal 206 is input to 2, and the 1-bit shift signal 207 is input to the selector 203.

【0007】また、セレクタ201には、4ビットシフ
トされた信号210が入力され、セレクタ202には、
2ビットシフトされた信号209が入力され、セレクタ
203には、1ビットシフトされた信号208が入力さ
れる。信号208、209および210は、例えば、上
位ビットからの信号である。セレクタ201からセレク
タ202、および、セレクタ202からセレクタ203
には、それぞれシフトせずに伝送されるスルー信号21
4および215が伝播される。
The selector 201 receives the 4-bit shifted signal 210, and the selector 202 receives the signal 210.
The signal 209 shifted by 2 bits is input, and the signal 208 shifted by 1 bit is input to the selector 203. The signals 208, 209 and 210 are, for example, signals from upper bits. Selector 201 to Selector 202 and Selector 202 to Selector 203
The through signal 21 that is transmitted without shifting.
4 and 215 are propagated.

【0008】さらに、セレクタ201からは、入力信号
204と同じで4ビットシフトさせる信号211が出力
され、セレクタ202からは、スルー信号214と同じ
で2ビットシフトさせる信号212が出力され、セレク
タ203からは、スルー信号215と同じで1ビットシ
フトさせる信号213が出力される。セレクタ203か
らは、出力信号216が出力される。信号211、21
2および213は、例えば、下位ビット方向に出力され
る。
Further, the selector 201 outputs a signal 211 that is the same as the input signal 204 and is shifted by 4 bits, and the selector 202 is the same as the through signal 214 and a signal 212 that is shifted by 2 bits. The same as the through signal 215, a signal 213 that shifts by 1 bit is output. The output signal 216 is output from the selector 203. Signals 211, 21
2 and 213 are output in the lower bit direction, for example.

【0009】ここで、入力信号204がシフトされずに
伝送される場合は、入力信号204および出力信号21
6の入出力方向と、スルー信号214および215の伝
播する方向とが垂直になるように、セレクタ201〜2
03は配置されている。
When the input signal 204 is transmitted without being shifted, the input signal 204 and the output signal 21 are transmitted.
The selectors 201 and 2 are arranged so that the input / output direction of 6 and the propagation direction of the through signals 214 and 215 are perpendicular to each other.
03 is arranged.

【0010】これにより、図7(a)および(b)に示
すシフト回路のセレクタ201〜203の配置面積の低
減および高速動作が図られる。
As a result, the layout area of the selectors 201 to 203 of the shift circuit shown in FIGS. 7A and 7B can be reduced and high-speed operation can be achieved.

【0011】また、他の例として、多段セレクタ型シフ
タおよびマトリックス型シフタを具備し、データのシフ
ト量を可変し、データを一方向のみにシフトさせるシフ
ト回路が、特開平3−157719号公報に開示されて
いる。そのシフト回路を図8(a)および(b)に示
す。
As another example, a shift circuit having a multi-stage selector type shifter and a matrix type shifter for varying the data shift amount and shifting the data only in one direction is disclosed in Japanese Patent Laid-Open No. 3-157719. It is disclosed. The shift circuit is shown in FIGS. 8 (a) and 8 (b).

【0012】図8(a)は、特開平3−157719号
公報に開示されているシフト回路の原理図である。図8
(a)に示すシフト回路は、多段セレクタ型シフタ30
1およびマトリクス型シフタ302を具備している。多
段セレクタ型シフタ301は、2nビット長(nは自然
数)のデータDに応答し、マトリクス型シフタ302
は、多段セレクタ型シフタ301の出力データに応答す
る。
FIG. 8A is a principle diagram of the shift circuit disclosed in Japanese Patent Laid-Open No. 3-157719. Figure 8
The shift circuit shown in (a) is a multi-stage selector type shifter 30.
1 and a matrix type shifter 302. The multi-stage selector type shifter 301 responds to the data D having a length of 2 n bits (n is a natural number), and the matrix type shifter 302
Responds to the output data of the multi-stage selector shifter 301.

【0013】図8(b)は、図8(a)に示すシフト回
路の具体的な構成を示すブロック図である。ここで、シ
フトされるデータを2nビット、そのシフト量を(2n
1)ビットとし、データのシフト方向も一方向とする。
また、一点鎖線にて囲まれた部分301は、図8(a)
の多段セレクタ型シフタ301に対応し、同様に、一点
鎖線にて囲まれた部分302は、マトリクス型シフタ3
02に対応する。
FIG. 8B is a block diagram showing a specific structure of the shift circuit shown in FIG. 8A. Here, the data to be shifted is 2 n bits, and the shift amount is (2 n
1) Bits, and the data shift direction is also one direction.
The portion 301 surrounded by the alternate long and short dash line is shown in FIG.
The multi-stage selector type shifter 301 of FIG.
Corresponds to 02.

【0014】図8(b)に示すシフト回路は、2入力1
出力型のセレクタ311〜316が内蔵された多段セレ
クタ型シフタ301、および、マトリクス型のシフタ3
21〜324が内蔵されたマトリクス型シフタ302を
有している。
The shift circuit shown in FIG. 8B has two inputs and one input.
Multi-stage selector type shifter 301 having built-in output type selectors 311 to 316, and matrix type shifter 3
It has a matrix type shifter 302 having 21 to 324 built therein.

【0015】レジスタ326は、データのシフト量(=
(2n−1)ビット)を格納しており、レジスタ326
から出力されたシフト量を指示する信号は、デコーダお
よびマルチプレクサ327に入力され、デコーダおよび
マルチプレクサ327内にて復元および選択され、シフ
ト用制御信号SC1およびSC2として、各セレクタ3
11〜316および各シフタ321〜324にそれぞれ
供給される。
The register 326 has a data shift amount (=
(2 n -1) bits are stored in the register 326.
The signal indicating the shift amount output from the selector 3 is input to the decoder / multiplexer 327, restored and selected in the decoder / multiplexer 327, and used as the shift control signals SC1 and SC2.
11 to 316 and the shifters 321 to 324, respectively.

【0016】レジスタ310は、シフト前の2nビット
のデータを格納しており、セレクタ311に2n-1ビッ
ト長のデータを出力する。セレクタ311は、デコーダ
およびマルチプレクサ327から出力されるシフト用制
御信号SC1に応答し2n-1ビット長のデータを2n-1
ットシフトさせる機能を有している。セレクタ312
は、セレクタ311と協働し、セレクタ311と同様
に、シフト用制御信号SC1に応答し全体として2n
ット長のデータを操作する。セレクタ313は、セレク
タ311から2n-2ビット長のデータを受取り、シフト
用制御信号SC1に応答し2n-2ビット長のデータを2
n-2ビットシフトさせる機能を有している。セレクタ3
14〜316は、セレクタ313と同様の機能を有して
おり、セレクタ313と協働して、シフト用制御信号S
C1に応答し全体として2nビット長のデータを操作す
る。
The register 310 stores 2 n bits of data before shifting and outputs 2 n -1 bits of data to the selector 311. The selector 311 has a function of 2 n-1 bit shift data 2 n-1 bit length in response to a shift control signal SC1 output from the decoder and multiplexer 327. Selector 312
Operates in cooperation with the selector 311 and, similarly to the selector 311, responds to the shift control signal SC1 and manipulates data of 2 n- bit length as a whole. The selector 313 receives the data of 2 n-2 bit length from the selector 311 and responds to the shift control signal SC1 with the data of 2 n-2 bit length.
It has the function of shifting by n-2 bits. Selector 3
14 to 316 have the same function as the selector 313, and cooperate with the selector 313 to operate the shift control signal S.
In response to C1, it manipulates data of 2 n bit length as a whole.

【0017】シフタ321は、セレクタ313から2
n-2ビット長のデータを受取り、デコーダおよびマルチ
プレクサ327から出力されるシフト用制御信号SC2
に応答し2n-2ビット長のデータを2n-2ビットシフトさ
せる機能を有している。シフタ322〜324は、シフ
タ321と同様の機能を有し、それぞれセレクタ314
〜316から出力される2n-2ビット長のデータを受取
る。
The shifter 321 has two selectors 313 to 2
A shift control signal SC2 that receives data of n-2 bit length and is output from the decoder and multiplexer 327
In response to the above, it has a function of shifting data of 2 n-2 bits in length by 2 n-2 bits. The shifters 322 to 324 have the same function as that of the shifter 321.
The data of 2 n-2 bit length output from ˜316 is received.

【0018】レジスタ325は、シフタ321〜324
から出力されるシフト済のデータを格納する。シフタ3
21〜324のそれぞれにおいて、出力範囲外に排出さ
れた2n-2ビット長のデータは、バスを通じてそれぞれ
対応する隣のシフタの出力に併合(merge)され
る。
The register 325 has shifters 321 to 324.
Stores the shifted data output from. Shifter 3
In each of 21 to 324, the data of 2 n-2 bit length discharged to the outside of the output range is merged with the output of the corresponding adjacent shifter through the bus.

【0019】このように、図8(a)および(b)に示
すシフト回路は、まず多段セレクタ型シフタ301にお
いて、2nビット長のデータに対して、2の等比級数で
表されたシフト量の内、データのシフト量の大きい上位
側の部分、すなわち2n-1ビット長のデータおよび2n-2
ビット長のデータをシフト用制御信号SC1に応答して
シフトさせる。次に、マトリクス型シフタ302におい
て、データのシフト量の小さい下位側の残りの部分をシ
フト用制御信号SC2に応答してシフトさせている。こ
れにより、回路規模と遅延速度との双方の点で有利とな
っている。
As described above, in the shift circuits shown in FIGS. 8A and 8B, first, in the multi-stage selector type shifter 301, the shift represented by the geometric series of 2 with respect to the data of 2 n bit length. Of the amount, the upper part with the largest amount of data shift, that is, 2 n-1 bit length data and 2 n-2
Bit-length data is shifted in response to the shift control signal SC1. Next, in the matrix type shifter 302, the remaining lower part of the data shift amount which is smaller is shifted in response to the shift control signal SC2. This is advantageous in terms of both circuit scale and delay speed.

【0020】また、さらに他の例として、nビット長の
データに対して2nビット長のデータを格納できるレジ
スタを用意し、必要なシフト量に応じてビット分をずら
して、そのレジスタにデータを書き込み、そのデータを
読み出すことによってデータのシフト量を可変し、デー
タを一方向のみにシフトさせるシフト回路が、特願平5
−165602号公報に開示されている。そのシフト回
路の構成を図9に示す。
As still another example, a register capable of storing 2n-bit length data for n-bit length data is prepared, the bit is shifted according to the required shift amount, and the data is stored in the register. A shift circuit that changes the amount of data shift by writing and reading the data and shifts the data in only one direction is disclosed in Japanese Patent Application No. Hei 5 (1999) -135242.
No. 165602. The configuration of the shift circuit is shown in FIG.

【0021】図9に示すシフト回路は、入力セレクタ4
01およびセルアレイ402を有している。入力セレク
タ401は、セレクタ401Lおよびセレクタ401R
から構成され、セレクタ401Lは、外部から与えられ
るnビットのデータAを保持し、保持したデータAをセ
ルアレイ402に与える。セレクタ401Rは、nビッ
トのデータAまたはデータAと同様に外部から与えられ
るnビットのデータB択一的に選択して保持し、保持し
たデータAまたはデータBをセルアレイ2に与える。
The shift circuit shown in FIG. 9 has an input selector 4
01 and a cell array 402. The input selector 401 includes a selector 401L and a selector 401R.
The selector 401L holds the n-bit data A given from the outside, and gives the held data A to the cell array 402. The selector 401R selectively selects and holds the n-bit data A or the n-bit data B supplied from the outside similarly to the data A, and supplies the held data A or data B to the cell array 2.

【0022】セルアレイ402は、データAまたはデー
タBのビット長に応じた複数のシフトセル402a、4
02b、402c・・・が縦続接続されている。各シフ
トセル402a、402b、402c・・・は、左側の
シフトセル402aL、402bL、402cL・・・
と、右側のシフトセル402aR、402bR、402
cR・・・とで構成され、それぞれのシフトセルは、前
段のシフトセルのデータを選択することによりデータを
シフトするセレクタ群により構成されている。
The cell array 402 has a plurality of shift cells 402a, 4a, 4b depending on the bit length of the data A or the data B.
02b, 402c, ... Are cascade-connected. The shift cells 402a, 402b, 402c ... Are on the left side of the shift cells 402aL, 402bL, 402cL.
And the right shift cells 402aR, 402bR, 402
cR ... And each shift cell is composed of a selector group that shifts data by selecting the data of the shift cell in the previous stage.

【0023】このように、図9に示すシフト回路は、例
えば、シフトセル402aでは、左側のシフトセル40
2aLは、シフト制御信号aLにしたがって入力データ
の所定量をシフトさせる。左側のシフトセル402aL
に連結された右側のシフトセル402aRは、シフト制
御信号aRにしたがって、左側のシフトセル402aL
とは独立して入力データの所定量をシフトさせ、シフト
アウトされるデータを左側のシフトセル402aLにシ
フトインする。同様に、シフトセル402aに縦続接続
されたシフトセル402b、402c・・・によって、
シフトアウトおよびシフトインを繰り返し入力データを
複数ビットシフトさせることができる。
As described above, in the shift circuit shown in FIG. 9, for example, in the shift cell 402a, the left shift cell 40 is
2aL shifts a predetermined amount of input data according to the shift control signal aL. Left shift cell 402aL
The shift cell 402aR on the right side connected to the shift cell 402aL on the left side according to the shift control signal aR.
Independently of, a predetermined amount of input data is shifted, and the data to be shifted out is shifted into the left shift cell 402aL. Similarly, by the shift cells 402b, 402c ... Cascaded to the shift cell 402a,
Shift-out and shift-in can be repeated to shift input data by a plurality of bits.

【0024】これにより、図9に示すシフト回路は、回
路構成の小型化、シフトの動作時における、データ配列
調整の簡単化および処理速度の向上が達成できる。
As a result, in the shift circuit shown in FIG. 9, the circuit structure can be downsized, the data array adjustment can be simplified and the processing speed can be improved during the shift operation.

【0025】[0025]

【発明が解決しようとする課題】しかしながら、前述の
公報に開示されているそれぞれのシフト回路は、いずれ
もデータのシフト方向が一方向であるためデータを任意
の方向、すなわち上位ビット方向または下位ビット方向
にシフトさせることができない。このため、データのシ
フト方向を通常と逆の方向にシフトさせる場合、ソフト
ウエアによってデータのビット列を変更してからシフト
を行い、再度データのビット列を変更する必要がある。
したがって、前述のシフト回路では、入力データに対し
て任意のシフト量をシフトさせる場合、シフト方向が一
方向であるため、ソフトウエア処理による演算に要する
時間も必要となり、入力データのシフトを行う処理速度
が低下するおそれがある。
However, in each of the shift circuits disclosed in the above-mentioned publications, the data is shifted in one direction, so that the data can be transmitted in any direction, that is, in the upper bit direction or the lower bit direction. You cannot shift in the direction. For this reason, when shifting the data in the opposite direction to the normal direction, it is necessary to change the data bit string by software and then perform the shift to change the data bit string again.
Therefore, in the shift circuit described above, when an arbitrary shift amount is shifted with respect to the input data, since the shift direction is one direction, the time required for the calculation by the software processing is also required, and the process for shifting the input data is performed. May reduce speed.

【0026】本発明は、このような課題を解決するもの
であり、その目的は、入力データの所定ビットシフトに
おいて、シフト方向が任意に設定できるとともに、処理
速度も向上するシフタ回路を提供することにある。
The present invention solves such a problem, and an object thereof is to provide a shifter circuit in which a shift direction can be arbitrarily set and a processing speed is improved in a predetermined bit shift of input data. It is in.

【0027】[0027]

【課題を解決するための手段】本発明のシフト回路は、
入力ビットデータを出力させるシフト回路において、入
力ビットデータに対して異なるシフト量に設定された少
なくとも1個のバレルシフタと、バレルシフタのシフト
動作を制御するシフト制御回路とを有し、シフト制御回
路は、バレルシフタを制御して、入力ビットデータのシ
フト方向が、任意の同一方向にになるように設定すると
ともに、該入力ビットデータに対して任意のシフト量を
シフトさせるものであり、そのことにより上記目的が達
成される。
The shift circuit of the present invention comprises:
In a shift circuit that outputs input bit data, the shift control circuit includes at least one barrel shifter set to a different shift amount with respect to the input bit data, and a shift control circuit that controls a shift operation of the barrel shifter. The barrel shifter is controlled so that the shift direction of the input bit data is set to the same arbitrary direction, and the shift amount is shifted with respect to the input bit data. Is achieved.

【0028】また、好ましくは、本発明のシフト回路に
おいて、シフト制御回路は、外部より入力される入力ビ
ット列信号によってシフト制御信号を生成し、シフト制
御信号に基づいてバレルシフタを制御して、入力ビット
データの任意のシフト方向を設定し、任意のシフト量を
シフトさせる。
Further, preferably, in the shift circuit of the present invention, the shift control circuit generates a shift control signal by an input bit string signal input from the outside, controls the barrel shifter based on the shift control signal, and inputs the bit shift signal. An arbitrary shift direction of data is set, and an arbitrary shift amount is shifted.

【0029】さらに、好ましくは、本発明のシフト回路
において、シフト制御信号は、入力ビット列信号のビッ
ト列のうち特定ビットのビット値により任意のシフト方
向および任意のシフト量が決定され、特定ビットとは別
の特定部位のビット値により、バレルシフタのシフト動
作の有無が決定される。
Further, preferably, in the shift circuit of the present invention, the shift control signal has an arbitrary shift direction and an arbitrary shift amount determined by a bit value of a specific bit in the bit string of the input bit string signal. Whether the barrel shifter shifts or not is determined by the bit value of another specific portion.

【0030】さらに、好ましくは、本発明のシフト回路
において、入力ビット列信号の特定ビットが最上位ビッ
トまたは最下位ビットである。
Further, preferably, in the shift circuit of the present invention, the specific bit of the input bit string signal is the most significant bit or the least significant bit.

【0031】さらに、好ましくは、本発明のシフト回路
において、バレルシフタは、シフト制御信号に基づい
て、入力ビットデータのシフトに対して「上位ビット方
向へのシフト」と、「下位ビット方向へのシフト」と、
「シフト無し」との3つの動作のうちのいずれかの動作
を行う。
Further preferably, in the shift circuit of the present invention, the barrel shifter, based on the shift control signal, shifts the input bit data to "upper bit direction" and "lower bit direction shift". "When,
One of the three operations of "no shift" is performed.

【0032】さらに、好ましくは、本発明のシフト回路
において、バレルシフタは、シフト量が最大(m/2ビ
ット、m=2n:nは1以上の整数)のバレルシフタか
ら、シフト量が1/2ビットづつ少なくなるバレルシフ
タが順番に配置され、最後にシフト量が1ビットのバレ
ルシフタになるように配置されている。
Further preferably, in the shift circuit of the present invention, the barrel shifter has a maximum shift amount (m / 2 bits, m = 2 n : n is an integer of 1 or more), and the shift amount is 1/2. Barrel shifters that decrease bit by bit are arranged in order, and finally, the barrel shifters are arranged so that the shift amount is 1 bit.

【0033】さらに、好ましくは、本発明のシフト回路
において、バレルシフタはそれぞれ、データ選択手段に
接続されており、データ選択手段は、シフト制御回路に
おいて入力ビット列信号によって生成された選択信号に
基づいてデータを出力する。
Further, preferably, in the shift circuit of the present invention, each barrel shifter is connected to a data selection means, and the data selection means is configured to output data based on a selection signal generated by the input bit string signal in the shift control circuit. Is output.

【0034】上記構成より、以下、その作用を説明す
る。
The operation of the above structure will be described below.

【0035】本発明のシフト回路は、入力ビットデータ
のシフトにおいて、シフト制御回路に外部より入力され
た入力ビット列信号によって、シフト制御回路にて生成
されたシフト制御信号に基づいて、シフト制御回路が各
バレルシフタを制御して入力ビットデータのシフト方向
およびシフト動作の有無を決定し、入力ビットデータに
対するシフト動作が実行される。この時、入力ビットデ
ータのシフト方向が任意の同一方向に設定されるととも
に、任意のシフト量がシフトされるために、シフト回路
の処理速度の向上が図れる。
In the shift circuit of the present invention, when shifting the input bit data, the shift control circuit is controlled based on the shift control signal generated by the shift control circuit by the input bit string signal externally input to the shift control circuit. By controlling each barrel shifter, the shift direction of the input bit data and the presence / absence of the shift operation are determined, and the shift operation for the input bit data is executed. At this time, the shift direction of the input bit data is set to an arbitrary same direction and an arbitrary shift amount is shifted, so that the processing speed of the shift circuit can be improved.

【0036】また、入力ビットデータのシフトにおける
シフト方向およびシフト量の変更は、外部より入力され
る入力ビット列信号によって行われ、従来のように入力
ビットデータのシフト動作時にソウトウエア処理による
演算時間の必要もないので、処理速度の一層の向上が図
れる。
Further, the shift direction and the shift amount in shifting the input bit data are changed by an input bit string signal input from the outside, which requires a calculation time by software processing when shifting the input bit data as in the conventional case. Therefore, the processing speed can be further improved.

【0037】[0037]

【発明の実施の形態】以下、図面を参照しながら本発明
の実施の形態を説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.

【0038】図1は、本発明の実施形態であるシフト回
路の具体例を示すブロック図である。図1に示すシフト
回路10には、データのシフト量、シフト方向を制御す
るシフト制御信号等を生成するシフト制御回路11、お
よび、データの任意に設定したビット長(1ビット以
上)を任意のシフト方向(上位ビット方向または下位ビ
ット方向)にシフトさせることが可能である複数のバレ
ルシフタ12a、12b、12c、12d・・・を有す
るバレルシフタブロック12が設けられている。シフト
制御回路11では、外部のプロセッサ等からバスライン
16を介して、各種のデータと、データのシフト量およ
びシフト方向の情報を含むシフト制御命令データとが伝
送されると、入力ビット列信号であるシフト制御命令デ
ータを受取り、バレルシフタブロック12の動作を制御
するシフト制御信号を生成する。そして、バレルシフタ
ブロック12は、シフト制御回路11からのシフト制御
信号を受取り、そのシフト制御信号に基づいて、入力さ
れるmビットデータに対する任意のビット長のシフト量
および任意のシフト方向にシフトを実行する。
FIG. 1 is a block diagram showing a specific example of the shift circuit according to the embodiment of the present invention. The shift circuit 10 shown in FIG. 1 includes a shift control circuit 11 for generating a shift control signal for controlling a data shift amount and a shift direction, and an arbitrarily set bit length (1 bit or more) of data. A barrel shifter block 12 having a plurality of barrel shifters 12a, 12b, 12c, 12d, ... Which can be shifted in a shift direction (upper bit direction or lower bit direction) is provided. In the shift control circuit 11, when various data and shift control command data including information on the shift amount and shift direction of the data are transmitted from an external processor or the like via the bus line 16, it is an input bit string signal. The shift control command data is received and a shift control signal for controlling the operation of the barrel shifter block 12 is generated. Then, the barrel shifter block 12 receives the shift control signal from the shift control circuit 11, and based on the shift control signal, executes the shift amount of an arbitrary bit length and the arbitrary shift direction for the input m-bit data. To do.

【0039】シフト制御回路11は、mビットデータ、
シフト制御命令データ等を伝送するバスライン16から
シフト制御命令データを受取る。シフト制御回路11
は、データ保持機能を有する第1データレジスタ13
に、レジスタ書込み信号を出力する。レジスタ書込み信
号が入力された第1データレジスタ13は、バスライン
16からバレルシフタブロック12に対するシフト入力
データであるmビットデータ(m=2n)を受取り、m
ビットデータを保持する。mビットデータは、バレルシ
フタブロック12にてシフト前のソースデータである。
さらに、シフト制御回路11は、バレルシフタブロック
12にシフト入力ラッチ信号を出力する。シフト入力ラ
ッチ信号が入力されると、バレルシフタブロック12
は、第1データレジスタ13からシフト入力データであ
るmビットデータを受取りラッチする。mビットデータ
を受取ったバレルシフタブロック12は、シフト制御回
路11からのシフト制御信号に基づいて、各バレルシフ
タ12a、12b、12c、12d・・・にて、それぞ
れ入力されたmビットデータに対し、任意のシフト方向
および所定のシフト量のシフトを実行する。
The shift control circuit 11 uses the m-bit data,
The shift control command data is received from the bus line 16 that transmits the shift control command data and the like. Shift control circuit 11
Is a first data register 13 having a data holding function.
Then, a register write signal is output. The first data register 13 to which the register write signal is input receives m-bit data (m = 2 n ) which is shift input data for the barrel shifter block 12 from the bus line 16 and outputs m
Holds bit data. The m-bit data is source data before being shifted by the barrel shifter block 12.
Further, the shift control circuit 11 outputs a shift input latch signal to the barrel shifter block 12. When the shift input latch signal is input, the barrel shifter block 12
Receives and latches m-bit data which is shift input data from the first data register 13. The barrel shifter block 12 that has received the m-bit data arbitrarily selects the input m-bit data at each barrel shifter 12a, 12b, 12c, 12d ... Based on the shift control signal from the shift control circuit 11. Shift direction and a predetermined shift amount are executed.

【0040】各バレルシフタ12a、12b、12c、
12d・・・は、シフト量の最も大きな第1バレルシフ
タ12aがバレルシフタブロック12の入力側に配置さ
れ、以下、第2バレルシフタ12b、第3バレルシフタ
12c、第4バレルシフタ12d・・・のようにシフト
量の小さくなる順番に配置され、バレルシフタブロック
12の出力側には、シフト量の最も小さいバレルシフタ
が配置されている。
Each barrel shifter 12a, 12b, 12c,
12d ..., the first barrel shifter 12a having the largest shift amount is arranged on the input side of the barrel shifter block 12, and hereinafter, the second barrel shifter 12b, the third barrel shifter 12c, the fourth barrel shifter 12d ... Are arranged in ascending order, and the barrel shifter with the smallest shift amount is arranged on the output side of the barrel shifter block 12.

【0041】第1バレルシフタ12aは、上位ビット方
向または下位ビット方向のいずれかにm/2ビットのシ
フト量のシフトを実行する。以下、このようなシフトを
±(m/2)ビットシフトと表す。尚、シフト方向を示
す+の記号は上位ビット方向、−の記号は下位ビット方
向へのシフトを示す。第2バレルシフタ12bは、±
(m/4)ビットシフト、第3バレルシフタ12cは、
±(m/8)ビットシフト、および、第4バレルシフタ
12dは、±(m/16)ビットシフトを実行する。こ
のように、各バレルシフタは、その入力側に隣接するバ
レルシフタのシフト量の(1/2)倍のシフト量のシフ
トを実行する。
The first barrel shifter 12a performs a shift amount of m / 2 bits in either the upper bit direction or the lower bit direction. Hereinafter, such shift is referred to as ± (m / 2) bit shift. The + sign indicating the shift direction indicates a shift in the upper bit direction, and the − sign indicates a shift in the lower bit direction. The second barrel shifter 12b is ±
(M / 4) bit shift, the third barrel shifter 12c
The ± (m / 8) bit shift and the fourth barrel shifter 12d perform ± (m / 16) bit shift. In this way, each barrel shifter executes a shift amount of (1/2) times the shift amount of the barrel shifter adjacent to the input side thereof.

【0042】各バレルシフタ12a、12b、12c、
12d・・・は、まず始めに、±(m/2)ビットシフ
トを実行するシフト量の最も大きな第1バレルシフタ1
2aから動作し、以後、シフト量の小さくなる順番に動
作し、第1バレルシフタ12aに続いて±(m/4)ビ
ットシフトを実行する第2バレルシフタ12b、±(m
/8)ビットシフトを実行する第3バレルシフタ12
c、±(m/16)ビットシフトを実行する第4バレル
シフタ12d・・・が動作する。この場合、すべてのバ
レルシフタは、同一方向にビットシフトを実施するよう
に、それぞれ動作する。
Each barrel shifter 12a, 12b, 12c,
12d ... is the first barrel shifter 1 having the largest shift amount for performing ± (m / 2) bit shift.
The second barrel shifters 12b, ± (m) that operate from 2a and then operate in the order of decreasing shift amount, and that perform ± (m / 4) bit shift subsequent to the first barrel shifter 12a.
/ 8) Third barrel shifter 12 for performing bit shift
The fourth barrel shifter 12d ... That performs c, ± (m / 16) bit shift operates. In this case, all barrel shifters each operate to perform a bit shift in the same direction.

【0043】このようにして、バレルシフタブロック1
2におけるmビットデータのビットシフトの完了後、シ
フトされたmビットデータは、バレルシフタブロック1
2からデータ選択手段であるデータセレクタ14に出力
される。シフトされたmビットデータは、シフト制御回
路11からデータセレクタ14に出力される選択信号の
シフト出力セレクタ信号に基づいて、データセレクタ1
4にてデータを選択されて、第2データレジスタ15に
出力され、第2データレジスタ15に保持される。
In this way, the barrel shifter block 1
After the bit shift of the m-bit data in 2 is completed, the shifted m-bit data is transferred to the barrel shifter block 1
2 is output to the data selector 14, which is a data selection unit. Based on the shift output selector signal of the selection signal output from the shift control circuit 11 to the data selector 14, the shifted m-bit data is output to the data selector 1
The data is selected at 4, output to the second data register 15, and held in the second data register 15.

【0044】シフト回路10は、このような構成によ
り、入力されるmビットデータに対して、任意のシフト
方向に、指定ビット長のシフトが可能となり、また、シ
フト時のソフトウエア処理も不要となり処理速度が高速
化できる。
With such a configuration, the shift circuit 10 can shift the input m-bit data by a designated bit length in an arbitrary shift direction and does not require software processing at the time of shifting. The processing speed can be increased.

【0045】ここで、通常、コンピュータ等で扱うデー
タは、8(23)ビットまたは16(24)ビットのよう
に、2のべき乗のビット長データである。このような2
のべき乗のビット長データは、データバスおよびアドレ
スバスのバスライン16を介してシフト回路10に伝送
され、コンピュータ等からの命令動作が実行される。バ
スライン16に伝送されるデータは、データバスにおい
てはシフトの命令のデータ、シフト量のデータおよびシ
フトを行うデータであり、アドレスバスにおいてはバレ
ルシフタブロック12のシフトを行うレジスタアドレス
データおよびデータを保持するラッチレジスタのレジス
タアドレスデータである。
Here, data handled by a computer or the like is usually a power of 2 bit length data such as 8 (2 3 ) bits or 16 (2 4 ) bits. 2 like this
The exponentiation bit length data is transmitted to the shift circuit 10 via the bus lines 16 of the data bus and the address bus, and the instruction operation from the computer or the like is executed. The data transmitted to the bus line 16 is shift instruction data, shift amount data, and shift data in the data bus, and the register address data and data for shifting the barrel shifter block 12 are held in the address bus. Register address data of the latch register to

【0046】図2は、本発明のシフト回路10に設けら
れているシフト制御回路11のブロック図である。シフ
ト制御回路11は、バスライン16であるデータバスか
らのデータ信号(入力ビット列信号)によってレジスタ
書き込み信号を生成するレジスタ書き込み信号生成ブロ
ック11aと、シフトされたmビットデータであるシフ
ト出力データを選択するためのシフト出力セレクタ信号
を生成するシフト出力セレクタ信号生成ブロック11b
と、シフト前のmビットデータであるソースデータ(シ
フト入力データ)をラッチするためのシフト入力ラッチ
信号を生成するシフト入力ラッチ信号生成ブロック11
cと、シフトの動作(上位ビット方向へのシフト、下位
ビット方向へのシフトまたはシフトせずにそのまま出力
する、3つの動作)を行うためのバレルシフタ動作選択
信号を生成するバレルシフタ動作選択信号生成ブロック
11dとを有する。
FIG. 2 is a block diagram of the shift control circuit 11 provided in the shift circuit 10 of the present invention. The shift control circuit 11 selects a register write signal generation block 11a that generates a register write signal by a data signal (input bit string signal) from a data bus that is a bus line 16 and shift output data that is shifted m-bit data. Shift output selector signal generation block 11b for generating a shift output selector signal for
And a shift input latch signal generation block 11 for generating a shift input latch signal for latching source data (shift input data) which is m-bit data before shifting.
c and a barrel shifter operation selection signal generation block that generates a barrel shifter operation selection signal for performing the shift operation (shift to the upper bit direction, shift to the lower bit direction, or output as is without shifting) 11d and.

【0047】図3は、シフト制御回路11の動作状態を
説明するためのブロック図である。
FIG. 3 is a block diagram for explaining the operating state of the shift control circuit 11.

【0048】シフト制御回路11は、入力信号としてデ
ータバス16aからのデータバス信号、アドレスバス1
6bからのアドレスバス信号およびラッチ用パルス信号
が入力される。これらの入力信号が、レジスタ書込み信
号生成ブロック11aに入力されると、レジスタ書込み
信号生成ブロック11aは、アドレスバス信号により第
1データレジスタ13のアドレスを検出し、データバス
信号により第1データレジスタ13へのレジスタ書込み
命令を検出し、その後、ラッチ用パルス信号によってレ
ジスタ書込み信号を生成する。
The shift control circuit 11 receives the data bus signal from the data bus 16a and the address bus 1 as input signals.
The address bus signal and the latch pulse signal from 6b are input. When these input signals are input to the register write signal generation block 11a, the register write signal generation block 11a detects the address of the first data register 13 by the address bus signal and the first data register 13 by the data bus signal. A register write command to the register is detected, and then a register write signal is generated by the pulse signal for latching.

【0049】同様に、シフト出力セレクタ信号生成ブロ
ック11bは、アドレスバス信号によりデータセレクタ
14のアドレスを検出し、データバス信号によりデータ
セレクタ14へのシフト出力セレクタ命令を検出し、そ
の後、ラッチ用パルス信号によってシフト出力セレクタ
信号を生成する。
Similarly, the shift output selector signal generation block 11b detects the address of the data selector 14 by the address bus signal, detects the shift output selector instruction to the data selector 14 by the data bus signal, and then the latch pulse. A shift output selector signal is generated by the signal.

【0050】シフト入力ラッチ信号生成ブロック11c
は、アドレスバス信号により後述するバレルシフタブロ
ック12内のシフトデータラッチレジスタ12eおよび
12fのアドレスを検出し、データバス信号によりシフ
トデータラッチレジスタ12eおよび12fへのシフト
入力ラッチ命令を検出し、その後、ラッチ用パルス信号
によってシフト入力ラッチ信号を生成する。
Shift input latch signal generation block 11c
Detects an address of shift data latch registers 12e and 12f in a barrel shifter block 12 described later by an address bus signal, detects a shift input latch instruction to shift data latch registers 12e and 12f by a data bus signal, and then latches The shift input latch signal is generated by the use pulse signal.

【0051】バレルシフタ動作選択信号生成ブロック1
1dは、アドレスバス信号により後述するバレルシフタ
ブロック12内のバレルシフタ部12gのアドレスを検
出し、データバス信号によりバレルシフタ部12gへの
バレルシフタ動作選択命令を検出し、その後、ラッチ用
パルス信号によってバレルシフタ動作選択信号を生成す
る。
Barrel shifter operation selection signal generation block 1
1d detects an address of a barrel shifter unit 12g in a barrel shifter block 12 described later by an address bus signal, detects a barrel shifter operation selection command to the barrel shifter unit 12g by a data bus signal, and then selects a barrel shifter operation selection by a latch pulse signal. Generate a signal.

【0052】これにより、シフト制御回路11は、出力
信号として第1データレジスタ13に出力されるレジス
タ書込み信号と、データセレクタ14に出力されるシフ
ト完了後のシフト出力データを選択するシフト出力セレ
クタ信号と、バレルシフタブロック12内のシフトデー
タラッチレジスタ12eおよび12fへのシフト入力ラ
ッチ信号およびバレルシフタブロック12内のバレルシ
フタ部12gへのシフト動作を選択するバレルシフタ動
作選択信号が出力される。
As a result, the shift control circuit 11 selects the register write signal output to the first data register 13 as an output signal and the shift output data output to the data selector 14 for selecting the shift output data after the shift is completed. Then, a shift input latch signal to the shift data latch registers 12e and 12f in the barrel shifter block 12 and a barrel shifter operation selection signal for selecting a shift operation to the barrel shifter unit 12g in the barrel shifter block 12 are output.

【0053】シフト制御回路11は、バスライン16を
構成するデータバス16aからデータバス信号であるシ
フト制御命令データが入力される。シフト制御回路11
は、シフト制御命令データが所定ビットシフトの内容と
一致することを確認すると、レジスタ書込み信号生成ブ
ロック11aにてレジスタ書込み信号を生成し、第1デ
ータレジスタ13にレジスタ書込み信号を出力する。第
1データレジスタ13は、レジスタ書込み信号に基づい
て、データバス16aからシフト前のソースデータであ
るmビットデータを受取り保持する。
The shift control circuit 11 receives shift control command data, which is a data bus signal, from the data bus 16a forming the bus line 16. Shift control circuit 11
When confirming that the shift control instruction data matches the content of the predetermined bit shift, the register write signal generation block 11a generates a register write signal and outputs the register write signal to the first data register 13. The first data register 13 receives and holds the m-bit data, which is the source data before shifting, from the data bus 16a based on the register write signal.

【0054】次に、シフト制御回路11は、シフト出力
セレクタ信号生成ブロック11bにてシフト出力セレク
タ信号を生成し、データセレクタ14にシフト出力セレ
クタ信号を出力する。
Next, the shift control circuit 11 generates a shift output selector signal in the shift output selector signal generation block 11b and outputs the shift output selector signal to the data selector 14.

【0055】次に、シフト制御回路11は、シフト入力
ラッチ信号生成ブロック11cにてシフト入力ラッチ信
号を生成し、バレルシフタブロック12にシフト入力ラ
ッチ信号を出力する。バレルシフタブロック12は、シ
フト制御回路11からのシフト入力ラッチ信号に基づい
て第1データレジスタ13からシフト前のソースデータ
(シフト入力データ)であるmビットデータを受取る。
Next, the shift control circuit 11 generates a shift input latch signal in the shift input latch signal generation block 11c and outputs the shift input latch signal to the barrel shifter block 12. The barrel shifter block 12 receives m-bit data which is source data (shift input data) before shifting from the first data register 13 based on the shift input latch signal from the shift control circuit 11.

【0056】次に、シフト制御回路11は、バレルシフ
タ動作選択信号生成ブロック11dにてバレルシフタ動
作選択信号を生成し、バレルシフタブロック12にバレ
ルシフタ動作選択信号を出力する。バレルシフタブロッ
ク12は、シフト制御回路11からのバレルシフタ動作
選択信号に基づいて、シフト前のmビットデータに対す
る所定のシフト方向およびシフト量のシフトを行う。
Next, the shift control circuit 11 generates a barrel shifter operation selection signal in the barrel shifter operation selection signal generation block 11d and outputs the barrel shifter operation selection signal to the barrel shifter block 12. The barrel shifter block 12 performs a predetermined shift direction and shift amount shift on the pre-shift m-bit data based on the barrel shifter operation selection signal from the shift control circuit 11.

【0057】図4は、シフト制御回路11から出力され
るレジスタ書込み信号、シフト出力セレクタ信号、シフ
ト入力ラッチ信号およびバレルシフタ動作選択信号のタ
イミングチャートである。
FIG. 4 is a timing chart of the register write signal, shift output selector signal, shift input latch signal, and barrel shifter operation selection signal output from the shift control circuit 11.

【0058】ラッチ用パルス信号は、所定のパルス幅お
よび周期にて、アドレスバス16bおよびデータバス1
6aのそれぞれのアドレス信号および命令信号に対応す
るように入力される。アドレスバス16bからは、レジ
スタ書込みアドレス信号、シフト出力セレクタ信号、シ
フト入力ラッチアドレス信号およびバレルシフタ動作選
択アドレス信号が時系列に入力され、各アドレス信号の
パルス幅は、ラッチ用パルス信号のパルス幅よりも長く
設定されている。同時に、データバス16aからは、各
アドレス信号に対応するように、それぞれのアドレス信
号とほぼ等しいパルス幅にて、レジスタ書込み命令信
号、シフト出力セレクタ命令信号、シフト入力ラッチ命
令信号およびバレルシフタ動作選択命令信号が時系列に
入力される。
The latching pulse signal has a predetermined pulse width and a predetermined period, and is used for the address bus 16b and the data bus 1.
6a is input so as to correspond to each address signal and command signal. A register write address signal, a shift output selector signal, a shift input latch address signal, and a barrel shifter operation selection address signal are input in time series from the address bus 16b, and the pulse width of each address signal is greater than the pulse width of the latch pulse signal. Is also set long. At the same time, a register write command signal, a shift output selector command signal, a shift input latch command signal, and a barrel shifter operation selection command are sent from the data bus 16a with a pulse width substantially equal to that of each address signal so as to correspond to each address signal. The signals are input in time series.

【0059】まず、アドレスバス16bからのレジスタ
書込みアドレス信号と、データバス16aからのレジス
タ書込み命令信号との所定のパルス状態が確認されると
ともに、レジスタ書込み命令信号の命令とレジスタ書込
みアドレス信号のアドレスとの信号内容が正しいと判断
されると、ラッチ用パルス信号に基づいて、レジスタ書
込み信号がアクティブ(ON)状態となり、レジスタ書
込み信号が生成される。ここで、レジスタ書込みアドレ
ス信号およびレジスタ書込み命令信号の前述のパルス条
件、信号条件の一方がその条件を満足しないと、レジス
タ書込み信号が非アクティブ(OFF)状態となる。
First, the predetermined pulse states of the register write address signal from the address bus 16b and the register write command signal from the data bus 16a are confirmed, and the command of the register write command signal and the address of the register write address signal are checked. If it is determined that the signal contents of and are correct, the register write signal becomes active (ON) based on the latch pulse signal, and the register write signal is generated. If one of the pulse condition and the signal condition of the register write address signal and the register write command signal does not satisfy the condition, the register write signal becomes inactive (OFF).

【0060】シフト出力セレクタ信号、シフト入力ラッ
チ信号およびバレルシフタ動作選択信号も、同様の手順
にて生成される。
The shift output selector signal, the shift input latch signal and the barrel shifter operation selection signal are also generated in the same procedure.

【0061】これにより、シフト制御回路11からの出
力信号は、まずレジスタ書込み信号が生成され、その
後、シフト出力セレクタ信号、シフト入力ラッチ信号お
よびバレルシフタ動作選択信号の順番に生成される。
As a result, the output signal from the shift control circuit 11 is first generated as a register write signal, and then sequentially generated as a shift output selector signal, a shift input latch signal, and a barrel shifter operation selection signal.

【0062】図5は、本発明のシフト回路10に設けら
れているバレルシフタブロック12のブロック図であ
る。バレルシフタブロック12は、シフト前のmビット
データであるシフト入力データをラッチするシフトデー
タラッチレジスタ12eおよびシフト後のmビットデー
タであるシフト出力データを出力するシフトデータラッ
チレジスタ12fと、実際にmビットデータのシフトを
行う複数のバレルシフタから成るバレルシフタ部12g
とを有する。
FIG. 5 is a block diagram of the barrel shifter block 12 provided in the shift circuit 10 of the present invention. The barrel shifter block 12 includes a shift data latch register 12e that latches shift input data that is m-bit data before shifting, a shift data latch register 12f that outputs shift output data that is m-bit data after shifting, and actually shifts m bits. Barrel shifter section 12g consisting of multiple barrel shifters for shifting data
Have and.

【0063】バレルシフタ部12gは、mビットデータ
のシフト動作制御およびシフト方向制御を行い、mビッ
トデータを上位ビット方向にシフトさせる上位ビット方
向シフト回路と、mビットデータを下位ビット方向にシ
フトさせる下位ビット方向シフト回路と、mビットデー
タをシフトさせないでそのままmビットデータをラッチ
するシフト無し回路とを有している。
The barrel shifter unit 12g controls the shift operation and the shift direction of the m-bit data and shifts the m-bit data to the upper bit direction, and the lower bit direction shift circuit to shift the m-bit data to the lower bit direction. It has a bit-direction shift circuit and a non-shift circuit that latches m-bit data as it is without shifting m-bit data.

【0064】バレルシフタブロック12は、入力信号と
してシフト前のmビットデータであるシフト入力デー
タ、このシフト入力データをシフトデータラッチレジス
タにラッチさせるためのシフト入力ラッチ信号、およ
び、シフト入力データのシフト動作を制御するシフト制
御信号であるバレルシフタ動作選択信号が入力され、出
力信号として所定ビットシフトの完了したmビットデー
タであるシフト出力データが出力される。
The barrel shifter block 12 has shift input data, which is m-bit data before shifting, as an input signal, a shift input latch signal for latching the shift input data in the shift data latch register, and a shift operation of the shift input data. A barrel shifter operation selection signal, which is a shift control signal for controlling, is input, and shift output data, which is m-bit data after completion of predetermined bit shift, is output as an output signal.

【0065】バレルシフタブロック12は、データバス
からの信号であるシフト入力データ、シフト制御回路1
1からの出力信号であるシフト入力ラッチ信号およびバ
レルシフタ動作選択信号が入力されてシフトの動作を実
行する。まず、始めにシフト制御回路11から第1デー
タレジスタ13にレジスタ書込み信号が出力され、第1
データレジスタ13はデータバスからの信号であるシフ
ト入力データを保持する。次に、シフト制御回路11か
らバレルシフタブロック12の入力側のシフトデータラ
ッチレジスタ12eにシフト入力ラッチ信号が出力さ
れ、入力側のシフトデータラッチレジスタ12eは、シ
フト入力ラッチ信号にしたがって第1データレジスタ1
3に保持されているシフト入力データを受取る。次に、
シフト制御回路11からシフト動作およびシフト方向を
制御するバレルシフタ動作選択信号がバレルシフタ部1
2gに出力されると、バレルシフタ部12gはシフトデ
ータラッチレジスタにラッチされているシフト入力デー
タを受取り、バレルシフタ動作選択信号に基づいて各バ
レルシフタにてシフト入力データに対する所定のシフト
量およびシフト方向のシフトの動作が実行される。
The barrel shifter block 12 has shift input data, which is a signal from the data bus, and the shift control circuit 1.
The shift input latch signal and the barrel shifter operation selection signal, which are output signals from 1, are input to execute the shift operation. First, the shift control circuit 11 first outputs a register write signal to the first data register 13,
The data register 13 holds shift input data which is a signal from the data bus. Next, the shift control circuit 11 outputs a shift input latch signal to the shift data latch register 12e on the input side of the barrel shifter block 12, and the shift data latch register 12e on the input side outputs the first data register 1 according to the shift input latch signal.
The shift input data held in 3 is received. next,
The barrel shifter operation selection signal for controlling the shift operation and the shift direction is sent from the shift control circuit 11 to the barrel shifter unit 1.
When output to 2g, the barrel shifter unit 12g receives the shift input data latched in the shift data latch register, and based on the barrel shifter operation selection signal, each barrel shifter shifts a predetermined shift amount and shift direction with respect to the shift input data. The operation of is executed.

【0066】通常、バレルシフタブロック12のバレル
シフタ部12gにおけるシフト入力データのビットシフ
トは、図1に示すように、シフト量の大きな第1バレル
シフタ12aからシフト量の小さな第4バレルシフタ1
2dに向かって順番に実行される。
Usually, the bit shift of the shift input data in the barrel shifter section 12g of the barrel shifter block 12 is, as shown in FIG. 1, from the first barrel shifter 12a having a large shift amount to the fourth barrel shifter 1 having a small shift amount.
It is sequentially executed toward 2d.

【0067】例えば、シフト入力データが8ビットデー
タ(m=8)では、まずシフト量が±4ビット(+の記
号は上位ビットへのシフト動作、−の記号は下位ビット
へのシフト動作を示す)のバレルシフタからシフトの動
作を実行する。±4ビットのバレルシフタは、シフトの
動作を指定するバレルシフタ動作選択信号に基づいて、
「±4ビットシフト動作」、または、「シフト動作せ
ず」、のどちらかのシフトの動作を選択して実行する。
「±4ビットシフト動作」が選択されると、8ビットの
シフト入力データは、+4ビット方向シフト回路または
−4ビット方向シフト回路に入力され、上位ビット方向
または下位ビット方向に4ビットシフトされる。
For example, when the shift input data is 8-bit data (m = 8), the shift amount is first ± 4 bits (the + sign indicates the shift operation to the higher bit, the − sign indicates the shift operation to the lower bit). ) The shift operation is executed from the barrel shifter. The ± 4 bit barrel shifter is based on the barrel shifter operation selection signal that specifies the shift operation.
Either the "± 4 bit shift operation" or the "no shift operation" is selected and executed.
When "± 4 bit shift operation" is selected, the 8-bit shift input data is input to the +4 bit direction shift circuit or the -4 bit direction shift circuit, and is shifted by 4 bits in the upper bit direction or the lower bit direction. .

【0068】シフト量が±4ビットのバレルシフタでの
8ビットのシフト入力データの±4ビットシフトが終了
すると、±4ビットシフトが施された8ビットのシフト
入力データは、シフト量が±2ビットのバレルシフタに
送られ、±2ビットのバレルシフタでの上位ビット方向
または下位ビット方向に2ビットシフトの動作が実行さ
れる。尚、シフト量が±4ビットのバレルシフタのシフ
トの動作において「シフト動作せず」が選択されると8
ビットのシフト入力データは、シフト無し回路に入力さ
れ、シフトされずに、そのまま±2ビットのバレルシフ
タに送られる。
When the ± 4 bit shift of the 8-bit shift input data in the barrel shifter with the shift amount of ± 4 bits is completed, the shift amount of the ± 8 bit shift input data is ± 2 bits. , And the 2-bit shift operation is performed in the upper bit direction or the lower bit direction in the ± 2 bit barrel shifter. If "no shift operation" is selected in the shift operation of the barrel shifter with a shift amount of ± 4 bits, 8
The bit shift input data is input to the non-shift circuit, and is sent to the ± 2 bit barrel shifter as it is without being shifted.

【0069】±2ビットのバレルシフタも±4ビットの
バレルシフタと同様に、シフト動作を指定するバレルシ
フタ動作選択信号に基づいて、「±2ビットシフト動
作」、または、「シフト動作せず」、のどちらかのシフ
トの動作を選択して実行する。±2ビットのバレルシフ
タでの8ビットのシフト入力データのシフトの動作が終
了すると、8ビットのシフト入力データは、シフト量が
±1ビットのバレルシフタに送られる。
Like the ± 4 bit barrel shifter, the ± 2 bit barrel shifter selects either "± 2 bit shift operation" or "no shift operation" based on the barrel shifter operation selection signal designating the shift operation. Select and execute the shift operation. When the shift operation of the 8-bit shift input data by the ± 2 bit barrel shifter is completed, the 8-bit shift input data is sent to the barrel shifter whose shift amount is ± 1 bit.

【0070】±1ビットのバレルシフタでは、±4ビッ
トのバレルシフタおよび±2ビットのバレルシフタと同
様に、8ビットのシフト入力データに対して最後のシフ
トの動作が実行される。
In the ± 1 bit barrel shifter, the final shift operation is performed on the 8-bit shift input data, similarly to the ± 4 bit barrel shifter and the ± 2 bit barrel shifter.

【0071】±1ビットのバレルシフタでのシフトの動
作が終了すると、シフト制御回路11からバレルシフタ
ブロック12の出力側のシフトデータラッチレジスタ1
2fに、シフト入力ラッチ信号が出力され、バレルシフ
タ部12gにてシフトされた8ビットのシフト入力デー
タがシフトデータラッチレジスタ12fにラッチされ
る。シフトデータラッチレジスタ12fにラッチされた
シフト後の8ビットのシフト入力データは、シフト出力
データとして、バレルシフタブロック12から出力され
データセレクタ14に入力される。データセレクタ14
に入力されたシフト出力データは、シフト制御回路11
からデータセレクタ14に出力されるシフト出力セレク
タ信号に基づいて選択され、第2データレジスタ15に
出力され、第2データレジスタ15に保持される。
When the shift operation in the ± 1 bit barrel shifter is completed, the shift control circuit 11 shifts the shift data latch register 1 on the output side of the barrel shifter block 12.
The shift input latch signal is output to 2f, and the 8-bit shift input data shifted by the barrel shifter unit 12g is latched in the shift data latch register 12f. The shifted 8-bit shift input data latched in the shift data latch register 12f is output from the barrel shifter block 12 and input to the data selector 14 as shift output data. Data selector 14
The shift output data input to the shift control circuit 11 is
Is selected on the basis of the shift output selector signal output to the data selector 14, is output to the second data register 15, and is held in the second data register 15.

【0072】ここで、8ビットのシフト入力データに対
する±4ビットのバレルシフタでのシフトの動作が終了
後、8ビットのシフト入力データに対して、以降の所定
ビットシフトが必要でない場合(+4ビットシフトまた
は−4ビットシフトにて終了)は、8ビットのシフト入
力データは、±2ビットのバレルシフタに送られず、±
4ビットのバレルシフタから、データセレクタ14に伝
送される。その後の動作は、上記と同様である。このた
め、余分なシフトの動作が省かれ、シフトの動作が簡略
化される。
Here, after the shift operation of the ± 4 bit barrel shifter for the 8-bit shift input data is completed, the subsequent predetermined bit shift is not necessary for the 8-bit shift input data (+4 bit shift). Or -4 bit shift ends), the 8-bit shift input data is not sent to the ± 2 bit barrel shifter.
It is transmitted to the data selector 14 from the 4-bit barrel shifter. The subsequent operation is the same as above. Therefore, an extra shift operation is omitted and the shift operation is simplified.

【0073】これにより、バレルシフタブロック12に
おけるシフト入力データに対する所定ビットシフトの動
作が完了する。
As a result, the operation of shifting the predetermined bit for the shift input data in the barrel shifter block 12 is completed.

【0074】図6は、本発明のシフト回路10の具体的
な動作を説明するブロック図である。
FIG. 6 is a block diagram illustrating a specific operation of the shift circuit 10 of the present invention.

【0075】本実施形態では、8ビットのシフト入力デ
ータを”01001101”とし、この”010011
01”を上位ビットに5ビットシフトさせる場合を説明
する。
In the present embodiment, 8-bit shift input data is set to "01001101", and this "01001101" is set.
A case of shifting "01" by 5 bits to the upper bits will be described.

【0076】8ビットデータは、第0ビット〜第7ビッ
トのビット列で構成され、第0ビットが最下位ビット、
第7ビットが最上位ビットである。
The 8-bit data is composed of a bit string of 0th bit to 7th bit, the 0th bit being the least significant bit,
The 7th bit is the most significant bit.

【0077】8ビットデータを所定ビットシフトする場
合には、3個のバレルシフタが必要となる。バレルシフ
タの個数は、mビットデータのmが、m=2n(m:ビ
ット数)を満足する場合、nの値がその個数を示す。し
たがって、8ビットでは、8=23より、n=3となり
バレルシフタの数が決まる。
To shift 8-bit data by a predetermined number of bits, three barrel shifters are required. As for the number of barrel shifters, when m of m-bit data satisfies m = 2 n (m: number of bits), the value of n indicates the number. Therefore, in 8 bits, n = 3 is obtained from 8 = 2 3 , and the number of barrel shifters is determined.

【0078】8ビットデータでは、最上位ビットの第7
ビットがシフト方向を表し、第2ビット、第1ビット、
第0ビットの3ビット列がシフトの動作を表す。例え
ば、第7ビットは、”0”にて上位ビットのシフト方
向、”1”にて下位ビットのシフト方向を表す。また、
第2ビット、第1ビット、第0ビットの各ビットでは、
それぞれ”1”にてシフト実行、”0”にてシフトせず
を表す。したがって、図6に示すように、8ビットデー
タの”01001101”を上位ビットに5ビットシフ
トさせるシフト制御命令データは、”0000010
1”となる。
In 8-bit data, the 7th most significant bit
The bit represents the shift direction, and the second bit, the first bit,
The 3-bit string of 0th bit represents the shift operation. For example, the 7th bit indicates a shift direction of the upper bit by "0" and a shift direction of the lower bit by "1". Also,
In each of the 2nd bit, the 1st bit, and the 0th bit,
"1" indicates that the shift is executed, and "0" indicates that the shift is not performed. Therefore, as shown in FIG. 6, the shift control instruction data for shifting the 8-bit data “01001101” by 5 bits to the upper bits is “0000010”.
1 ”.

【0079】まず、シフト制御回路10は、バスライン
16を構成するデータバス16aからシフト制御命令デ
ータである”00000101”を受取り、そのシフト
制御命令データの内容を確認後、第1データレジスタ1
3にレジスタ書込み信号を出力する。第1データレジス
タ13は、レジスタ書込み信号を受取ると、データバス
16aからシフト入力データの”01001101”を
受取り、そのデータをラッチする。
First, the shift control circuit 10 receives the shift control command data "00000101" from the data bus 16a constituting the bus line 16, confirms the content of the shift control command data, and then checks the first data register 1
A register write signal is output to 3. Upon receiving the register write signal, the first data register 13 receives the shift input data "01001101" from the data bus 16a and latches the data.

【0080】次に、バレルシフタブロック12は、シフ
ト制御回路11からのシフト入力ラッチ信号にしたがっ
て、シフト入力データの”01001101”を受取
り、そのデータをラッチする。
Next, the barrel shifter block 12 receives the shift input data "01001101" in accordance with the shift input latch signal from the shift control circuit 11, and latches the data.

【0081】次に、バレルシフタブロック12は、シフ
ト制御回路11から出力されるシフト制御信号であるバ
レルシフタ動作選択信号を受取り、バレルシフタブロッ
ク12内の+4ビットバレルシフタ17、+2ビットバ
レルシフタ18および+1ビットバレルシフタ19は、
バレルシフタ動作選択信号に基づいて所定ビットシフト
の動作を行う。バレルシフタ動作選択信号は、シフト制
御命令データである”00000101”に基づいた内
容を含んでいる。すなわち、最上位の先頭ビットが”
0”であり上位ビット方向にシフトする。また、第2ビ
ットが”1”であり、+4(22)ビットバレルシフタ
17がシフト実行、第1ビットが”0”であり、+2
(21)ビットバレルシフタ18がシフトせず、第0ビ
ットが”1”であり、+1(20)ビットバレルシフタ
19がシフト実行して、全体で上位ビット方向に5ビッ
トシフトすることになる。
Next, the barrel shifter block 12 receives the barrel shifter operation selection signal which is the shift control signal output from the shift control circuit 11, and the +4 bit barrel shifter 17, the +2 bit barrel shifter 18 and the +1 bit barrel shifter 19 in the barrel shifter block 12 are received. Is
A predetermined bit shift operation is performed based on the barrel shifter operation selection signal. The barrel shifter operation selection signal includes contents based on "00000101" which is shift control instruction data. That is, the most significant first bit is "
It is 0 "and shifts toward the upper bit. Also, the second bit is" 1 ", the +4 (2 2 ) bit barrel shifter 17 shifts, and the first bit is" 0 ", +2.
The (2 1 ) bit barrel shifter 18 does not shift, the 0th bit is “1”, and the +1 (2 0 ) bit barrel shifter 19 shifts and shifts by 5 bits in the upper bit direction as a whole.

【0082】+4ビットバレルシフタ17は、シフト入
力データの”01001101”を受取り、このデータ
を上位ビット方向に4ビットシフトさせ、”11010
000”を生成する。
The +4 bit barrel shifter 17 receives the shift input data "01001101", shifts this data by 4 bits in the upper bit direction, and outputs "11010".
000 "is generated.

【0083】次に、生成された8ビットデータ”110
10000”は、+4ビットバレルシフタ17から+2
ビットバレルシフタ18に送られる。+2ビットバレル
シフタ18は、8ビットデータ”11010000”に
対して、シフトを行わないために、8ビットデータ”1
1010000”は、そのまま+1ビットバレルシフタ
19に送られる。
Next, the generated 8-bit data "110"
10000 "is from +4 bit barrel shifter 17 to +2
It is sent to the bit barrel shifter 18. Since the +2 bit barrel shifter 18 does not shift the 8-bit data "11010000", the 8-bit data "1"
1010000 ″ is sent to the +1 bit barrel shifter 19 as it is.

【0084】+1ビットバレルシフタ19は、8ビット
データ”11010000”を受取り、このデータを上
位ビット方向に1ビットシフトさせ、”1010000
0”を生成する。
The + 1-bit barrel shifter 19 receives the 8-bit data "11010000", shifts this data by 1 bit in the upper bit direction, and outputs "1010000".
0 "is generated.

【0085】+1ビットバレルシフタ19にて生成され
た8ビットデータ”10100000”は、バレルシフ
タブロック12のシフト出力データとして、データセレ
クタ14に出力される。
The 8-bit data “10100000” generated by the + 1-bit barrel shifter 19 is output to the data selector 14 as the shift output data of the barrel shifter block 12.

【0086】データセレクタ14に入力されたシフト出
力データの”10100000”は、シフト制御回路1
1からデータセレクタ14に出力されるシフト出力セレ
クタ信号に基づいて選択され、第2データレジスタ15
に出力され、第2データレジスタ15に保持される。
The shift output data “10100000” input to the data selector 14 is the shift control circuit 1
1 to the second data register 15 selected based on the shift output selector signal output to the data selector 14.
And is held in the second data register 15.

【0087】これにより、図6に示すシフト回路10に
おいて、シフト入力データの”01001101”に対
する上位ビット方向に5ビットのシフトの動作が完了す
る。そして、上位ビット方向に5ビットシフトされたシ
フト出力データの”10100000”は、バスライン
16を介して外部プロセッサ等に伝送される。
As a result, in the shift circuit 10 shown in FIG. 6, the operation of shifting 5 bits in the upper bit direction with respect to "01001101" of the shift input data is completed. Then, “10100000” of the shift output data which is shifted by 5 bits in the upper bit direction is transmitted to the external processor or the like via the bus line 16.

【0088】このように、本発明のシフト回路10は、
入力データの所定ビットシフトにおいて、バスライン1
6を介して伝送されるシフト制御命令データに基づいて
シフト方向が任意の方向に設定できるとともに、所定ビ
ットシフト時のソフトウエア処理が不必要となり、処理
速度の向上が図れる。
In this way, the shift circuit 10 of the present invention is
Bus line 1 at a predetermined bit shift of input data
The shift direction can be set to an arbitrary direction based on the shift control command data transmitted via 6, and software processing at the time of predetermined bit shift is unnecessary, so that the processing speed can be improved.

【0089】尚、本実施形態では、8ビットデータの所
定ビットシフトを説明したが、シフト入力データのビッ
ト列が増加した128ビットの場合でも、バレルシフタ
ブロック12内のバレルシフタを増設して7個(128
=27)にするだけで、上記内容のシフト回路10が簡
略に得られる。
In the present embodiment, the predetermined bit shift of 8-bit data has been described. However, even when the bit string of the shift input data is 128 bits, the number of barrel shifters in the barrel shifter block 12 is increased by 7 (128).
= 2 7 ), the shift circuit 10 having the above contents can be simply obtained.

【0090】以上の説明により、本発明のシフト回路
は、ユーザーの所望のシフト量に対してトランジスタ等
を使用した回路にて、シフト制御回路、バレルシフタ、
データセレクタ等を構成することができる。このため、
従来、任意の方向にシフト動作するには、ソフトウエア
処理を行っていたが、ソフトウエア処理を用いずに任意
の方向のシフト動作が可能となり、処理時間が短縮でき
る効果がある。また、実際に、所定ビットシフトを行う
回路がバレルシフタで構成されているので、シフトの動
作の高速化も可能となる。さらに、バレルシフタは、L
SI工程に作製できるため1チップ化も可能となり、回
路の小形化が図れるという効果もある。
From the above description, the shift circuit of the present invention is a circuit using a transistor or the like for the shift amount desired by the user, and includes a shift control circuit, a barrel shifter,
A data selector or the like can be configured. For this reason,
Conventionally, software processing is performed to perform a shift operation in an arbitrary direction, but a shift operation in an arbitrary direction can be performed without using software processing, which has an effect of reducing processing time. Moreover, since the circuit for performing the predetermined bit shift is actually composed of the barrel shifter, the shift operation can be speeded up. Furthermore, the barrel shifter is L
Since it can be manufactured in the SI process, it can be made into one chip, and there is an effect that the circuit can be downsized.

【0091】[0091]

【発明の効果】本発明のシフト回路は、入力ビットデー
タに対して異なるシフト量に設定された少なくとも1個
のバレルシフタと、該バレルシフタのシフト動作を制御
するシフト制御回路とを有し、シフト制御回路は、バレ
ルシフタを制御して、入力ビットデータのシフト方向
が、任意の同一方向にになるように設定するとともに、
入力ビットデータに対して任意のシフト量をシフトさせ
ることによって、入力データに対する所定ビットシフト
にて、シフト方向が任意に設定できるとともに処理速度
の向上も図れる。
The shift circuit of the present invention has at least one barrel shifter set to a different shift amount for input bit data, and a shift control circuit for controlling the shift operation of the barrel shifter. The circuit controls the barrel shifter and sets the shift direction of the input bit data so that it is in the same arbitrary direction.
By shifting an arbitrary shift amount with respect to the input bit data, the shift direction can be arbitrarily set and the processing speed can be improved in the predetermined bit shift with respect to the input data.

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

【図1】本発明の実施形態であるシフト回路の具体例を
示すブロック図である。
FIG. 1 is a block diagram showing a specific example of a shift circuit according to an embodiment of the present invention.

【図2】図1のシフト回路に設けられているシフト制御
回路のブロック図である。
FIG. 2 is a block diagram of a shift control circuit provided in the shift circuit of FIG.

【図3】図2のシフト制御回路の動作状態を説明するた
めのブロック図である。
FIG. 3 is a block diagram for explaining an operating state of the shift control circuit of FIG.

【図4】シフト制御回路から出力されるレジスタ書込み
信号、シフト出力セレクタ信号、シフト入力ラッチ信号
およびバレルシフタ動作選択信号のタイミングチャート
である。
FIG. 4 is a timing chart of register write signals, shift output selector signals, shift input latch signals, and barrel shifter operation selection signals output from the shift control circuit.

【図5】図1のシフト回路に設けられているバレルシフ
タブロックのブロック図である。
5 is a block diagram of a barrel shifter block provided in the shift circuit of FIG.

【図6】図1のシフト回路の具体的な動作を説明するブ
ロック図である。
FIG. 6 is a block diagram illustrating a specific operation of the shift circuit in FIG.

【図7】(a)は、従来のシフト回路のブロック図であ
り、(b)は、その要部の構成図である。
FIG. 7A is a block diagram of a conventional shift circuit, and FIG. 7B is a configuration diagram of a main part thereof.

【図8】(a)は、従来の他のシフト回路の原理図であ
り、(b)は、その要部のブロック図である。
FIG. 8A is a principle diagram of another conventional shift circuit, and FIG. 8B is a block diagram of a main part thereof.

【図9】従来のさらに他のシフト回路の構成図である。FIG. 9 is a configuration diagram of still another conventional shift circuit.

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

10 シフト回路 11 シフト制御回路 11a レジスタ書込み信号生成ブロック 11b シフト出力セレクタ信号生成ブロック 11c シフト入力ラッチ信号生成ブロック 11d バレルシフタ動作選択信号生成ブロック 12 バレルシフタブロック 12a 第1ビットバレルシフタ 12b 第2ビットバレルシフタ 12c 第3ビットバレルシフタ 12d 第4ビットバレルシフタ 12e シフトデータラッチレジスタ 12f シフトデータラッチレジスタ 12g バレルシフタ部 13 第1データレジスタ 14 データセレクタ 15 第2データレジスタ 16 バスライン 16a データバス 16b アドレスバス 10 shift circuits 11 Shift control circuit 11a register write signal generation block 11b Shift output selector signal generation block 11c shift input latch signal generation block 11d Barrel shifter operation selection signal generation block 12 barrel shifter block 12a 1st bit barrel shifter 12b 2nd bit barrel shifter 12c 3rd bit barrel shifter 12d 4th bit barrel shifter 12e Shift data latch register 12f shift data latch register 12g barrel shifter 13 First data register 14 Data selector 15 Second data register 16 bus lines 16a data bus 16b address bus

───────────────────────────────────────────────────── フロントページの続き (72)発明者 中村 正樹 大阪府大阪市阿倍野区長池町22番22号 シ ャープ株式会社内 Fターム(参考) 5B022 AA00 BA00 DA01 FA01    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Masaki Nakamura             22-22 Nagaikecho, Abeno-ku, Osaka-shi, Osaka             Inside the company F term (reference) 5B022 AA00 BA00 DA01 FA01

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 入力ビットデータを出力させるシフト回
路において、 該入力ビットデータに対して異なるシフト量に設定され
た少なくとも1個のバレルシフタと、該バレルシフタの
シフト動作を制御するシフト制御回路とを有し、 該シフト制御回路は、該バレルシフタを制御して、該入
力ビットデータのシフト方向が、任意の同一方向ににな
るように設定するとともに、該入力ビットデータに対し
て任意のシフト量をシフトさせるシフト回路。
1. A shift circuit for outputting input bit data, comprising at least one barrel shifter set to a different shift amount for the input bit data, and a shift control circuit for controlling a shift operation of the barrel shifter. Then, the shift control circuit controls the barrel shifter to set the shift direction of the input bit data in the same arbitrary direction and shifts the arbitrary shift amount with respect to the input bit data. Shift circuit to let.
【請求項2】 前記シフト制御回路は、外部より入力さ
れる入力ビット列信号によってシフト制御信号を生成
し、該シフト制御信号に基づいて該バレルシフタを制御
して、前記入力ビットデータの任意のシフト方向を設定
し、任意のシフト量をシフトさせる請求項1に記載のシ
フト回路。
2. The shift control circuit generates a shift control signal according to an input bit string signal input from the outside, controls the barrel shifter based on the shift control signal, and shifts the input bit data in an arbitrary shift direction. The shift circuit according to claim 1, wherein the shift circuit is set to shift an arbitrary shift amount.
【請求項3】 前記シフト制御信号は、前記入力ビット
列信号のビット列のうち特定ビットのビット値により前
記任意のシフト方向および任意のシフト量が決定され、
該特定ビットとは別の特定部位のビット値により前記バ
レルシフタのシフト動作の有無が決定される請求項2に
記載のシフト回路。
3. The shift control signal determines the arbitrary shift direction and the arbitrary shift amount according to a bit value of a specific bit in a bit string of the input bit string signal,
The shift circuit according to claim 2, wherein the shift operation of the barrel shifter is determined by a bit value of a specific portion other than the specific bit.
【請求項4】 前記入力ビット列信号の特定ビットが最
上位ビットまたは最下位ビットである請求項3に記載の
シフト回路。
4. The shift circuit according to claim 3, wherein the specific bit of the input bit string signal is the most significant bit or the least significant bit.
【請求項5】 前記バレルシフタは、前記シフト制御信
号に基づいて、前記入力ビットデータのシフト動作に対
して「上位ビット方向へのシフト」と、「下位ビット方
向へのシフト」と、「シフト無し」との3つの動作のう
ちのいずれかの動作を行う請求項1に記載のシフト回
路。
5. The barrel shifter, based on the shift control signal, performs a "shift in a higher bit direction", a "shift in a lower bit direction", and "no shift" with respect to a shift operation of the input bit data. The shift circuit according to claim 1, wherein the shift circuit performs any one of three operations.
【請求項6】 前記バレルシフタは、シフト量が最大
(m/2ビット、m=2n:nは1以上の整数)のバレ
ルシフタから、シフト量が1/2ビットづつ少なくなる
バレルシフタが順番に配置され、最後にシフト量が1ビ
ットのバレルシフタになるように配置されている請求項
1に記載のシフト回路。
6. The barrel shifter is arranged such that a barrel shifter having a maximum shift amount (m / 2 bits, m = 2 n : n is an integer of 1 or more) is sequentially arranged from a barrel shifter having a shift amount reduced by 1/2 bit. The shift circuit according to claim 1, wherein the shift circuit is arranged so that the shift amount is finally a 1-bit barrel shifter.
【請求項7】 前記バレルシフタはそれぞれ、データ選
択手段に接続されており、該データ選択手段は、前記シ
フト制御回路において前期入力ビット列信号によって生
成された選択信号に基づいてデータを出力する請求項6
に記載のシフト回路。
7. The barrel shifters are each connected to a data selection means, and the data selection means outputs data based on a selection signal generated by an input bit string signal in the previous period in the shift control circuit.
The shift circuit according to.
JP2002146697A 2002-05-21 2002-05-21 Shift circuit Withdrawn JP2003337694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002146697A JP2003337694A (en) 2002-05-21 2002-05-21 Shift circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002146697A JP2003337694A (en) 2002-05-21 2002-05-21 Shift circuit

Publications (1)

Publication Number Publication Date
JP2003337694A true JP2003337694A (en) 2003-11-28

Family

ID=29705598

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002146697A Withdrawn JP2003337694A (en) 2002-05-21 2002-05-21 Shift circuit

Country Status (1)

Country Link
JP (1) JP2003337694A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006030639A1 (en) * 2004-09-14 2006-03-23 Matsushita Electric Industrial Co., Ltd. Barrel shift device
JP2015154119A (en) * 2014-02-10 2015-08-24 パナソニックIpマネジメント株式会社 Variable shifter, ldpc decoder and data shift method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006030639A1 (en) * 2004-09-14 2006-03-23 Matsushita Electric Industrial Co., Ltd. Barrel shift device
US7461108B2 (en) 2004-09-14 2008-12-02 Panasonic Corporation Barrel shift device
JP2015154119A (en) * 2014-02-10 2015-08-24 パナソニックIpマネジメント株式会社 Variable shifter, ldpc decoder and data shift method

Similar Documents

Publication Publication Date Title
US4472788A (en) Shift circuit having a plurality of cascade-connected data selectors
EP1271474B1 (en) Function block
CN213042269U (en) Computing chip, computing force plate and digital currency mining machine
US5675527A (en) Multiplication device and sum of products calculation device
JPH08123769A (en) Parallel processor
US5010509A (en) Accumulator for complex numbers
JP2003337694A (en) Shift circuit
JP5253406B2 (en) Digital electronic binary rotator and inverter
JPH09244873A (en) Fast barrel shifter
JP3329921B2 (en) Arithmetic unit
JPH09185493A (en) Integrated circuit for adder
US5615141A (en) Multiplying apparatus
JPH08212168A (en) Array processor
US7266581B2 (en) Arithmetic circuit
JPH11282651A (en) Parallel multiplier
JPH04330519A (en) Multiplier
JPH04343130A (en) Accumulator
JPS6182234A (en) Multiplier circuit
JPH0437211A (en) Digital arithmetic circuit
JP2001195234A (en) Information processor
JP2001005642A (en) Multiplier
JPH05224889A (en) Multiplier
JPH1069371A (en) Data temporary storage device and clock synchronous type data processor
JP2000293354A (en) Arithmetic operation processor
JPH0844533A (en) Barrel shifter device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050802