JPH03192598A - Shift circuit - Google Patents

Shift circuit

Info

Publication number
JPH03192598A
JPH03192598A JP1332307A JP33230789A JPH03192598A JP H03192598 A JPH03192598 A JP H03192598A JP 1332307 A JP1332307 A JP 1332307A JP 33230789 A JP33230789 A JP 33230789A JP H03192598 A JPH03192598 A JP H03192598A
Authority
JP
Japan
Prior art keywords
bit
input
selector
terminal
bits
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1332307A
Other languages
Japanese (ja)
Inventor
Shoji Yamamoto
山本 祥二
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1332307A priority Critical patent/JPH03192598A/en
Publication of JPH03192598A publication Critical patent/JPH03192598A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain a high-speed shift operation independently of a shift bit number with small scale circuit constitution by specifically connecting (m) selectors having 2 set input terminals of (n) bits and (n+1) output terminals and selecting terminals. CONSTITUTION:The output terminal of a prestage selector is connected to the first input terminal of the succeeding stage selector, (m) selectors are respectively connected to a second input terminal so as to supply the signal shifted by 2<k-1> bit from an input digital signal to a first input terminal, each bit of (m) bit selective signal is supplied to each selective terminal of (m) selectors. Here 2<m=n, the first stage of K is 1. After all from the final stage selector 10m-1 the input digital signals D0-Dn-1 are bit shifted by bit number corresponding to the value of the binary number shown by (m) bit selective signals S0-Sm-1 and outputted. Consequently, the selectors are enough with the small number proportioned to an exponent (m).

Description

【発明の詳細な説明】 〔概要〕 入力ディジタル信号を任意のビット数シフトして出力す
るシフト回路に関し、 小規模な回路構成で、高速のシフト動作を行なうことを
目的とし、 nビットの入力ディジタル信号を任意のビット数シフト
して出力するシフト回路において、nピットの第1の入
力端子とnビットの第2の入力端子とn+1の出力端子
と該第1及び第2の入力端子の入力信号の一方を選択し
てnビット出力端子から出力させるためのセレクト端子
とを有するセレクタをm個(ただし、2m≦n)縦続接
続して前段のセレクタの該出力端子を次段のセレクタの
該第1の入力端子に接続し、かつ、該m個のセレクタの
各々は該第1の入力端子への入力ディジタル信号を2に
一1ビット(ただし、kは当該セレクタの接続順番に等
しく、初段のセレクタでは1とする)シフトしたディジ
タル信号を該第2の入力端子へ供給するよう前段のセレ
クタの該出力端子と次段のセレクタの該第2の入力端子
とを接続し、該m個のセレクタの各セレクト端子へmビ
ットのセレクト信号の各ビットを供給するよう構成する
[Detailed Description of the Invention] [Summary] Regarding a shift circuit that shifts an input digital signal by an arbitrary number of bits and outputs it, the purpose is to perform a high-speed shift operation with a small-scale circuit configuration. In a shift circuit that shifts a signal by an arbitrary number of bits and outputs the signal, input signals of an n-pit first input terminal, an n-bit second input terminal, an n+1 output terminal, and the first and second input terminals are provided. m selectors (however, 2m≦n) are connected in cascade, and the output terminal of the previous selector is connected to the select terminal of the next selector. 1 input terminal, and each of the m selectors divides the input digital signal to the first input terminal into 2 to 1 bits (k is equal to the connection order of the selectors, and The output terminal of the previous stage selector and the second input terminal of the next stage selector are connected so as to supply the shifted digital signal (1 in the selector) to the second input terminal, and the m selectors The configuration is such that each bit of the m-bit select signal is supplied to each select terminal of.

〔産業上の利用分野〕[Industrial application field]

本発明はシフト回路に係り、特に入力ディジタル信号を
任意のビット数シフトして出力するシフト回路に関する
The present invention relates to a shift circuit, and particularly to a shift circuit that shifts an input digital signal by an arbitrary number of bits and outputs the shifted signal.

任意のビット幅のディジタル信号を任意のビット幅シフ
トするシフト回路は、従来よりディジタル装置内に広く
用いられており、装置の小型化並びに演算動作の高速化
等のために、回路規模が小さく、高速にシフト動作でき
ることが必要とされる。
Shift circuits that shift a digital signal with an arbitrary bit width to an arbitrary bit width have been widely used in digital devices. It is necessary to be able to shift at high speed.

〔従来の技術〕[Conventional technology]

第3図は従来の一例の回路図を示す。同図中、1゜〜1
  は各々D型フリップ70ツブで、全−1 部でn個ある。20〜2o−1は各々論理回路で、D型
フリップ70ツブ10〜1  に1対1に対−1 応して設けられている。論理回路20〜2o−1は各々
同一構成で、各論理回路2.(ただし、iは0〜n−1
)はセレクト信号が入力されるインバータ3・と、イン
バータ31の出力と入力ゲイジタル信号の1ビツトデー
タD・とが入力されるAND回路41と、セレクト信号
とD型フリップ70ツブト のQ出力信号とが入力され
るAND−1 回路51と、AND回路41及び51の各出力の論理和
をとり、その出力をD型フリップ70ツブトのデータ入
力端子に供給するOR回路61とからなる。なお、AN
D回路5oは、AND回路51と同様にセレクト信号と
D型フリップ70ツブ1oのQ出力信号とが入力される
FIG. 3 shows a circuit diagram of a conventional example. In the same figure, 1° to 1
Each has 70 D-type flips, and there are n pieces in total. 20 to 2o-1 are logic circuits, which are provided in one-to-one correspondence to the D-type flips 70 and the knobs 10 to 1. The logic circuits 20 to 2o-1 each have the same configuration, and each logic circuit 2. (However, i is 0 to n-1
) is the inverter 3 to which the select signal is input, the AND circuit 41 to which the output of the inverter 31 and the 1-bit data D of the input gage signal are input, and the select signal and the Q output signal of the D-type flip 70. It consists of an AND-1 circuit 51 to which is input, and an OR circuit 61 which takes the logical sum of the respective outputs of the AND circuits 41 and 51 and supplies the output to the data input terminal of the D-type flip 70. In addition, AN
Similar to the AND circuit 51, the D circuit 5o receives the select signal and the Q output signal of the D-type flip 70 tube 1o.

次に、第3図に示す従来回路の動作について説明する。Next, the operation of the conventional circuit shown in FIG. 3 will be explained.

同図中、nビットのディジタル信号の各ビットD o 
”’ D n−1のデータは、AND回路4゜〜4o−
1の一方の入力端子に供給され、この状態でセレクト信
号がローレベル(以下、“L″と記す)とされる。これ
により、D o ”” D n−1の各データはAND
回路40〜4  とOR回路60〜−1 6  とを夫々通してD型フリップ70ツブ10−1 〜1  の各データ入力端子に印加され、クロッ−1 クパルスの入力時点でD型フリップフロップ1゜〜1 
 にラッチされる。
In the figure, each bit D o of the n-bit digital signal
"' D n-1 data is AND circuit 4°~4o-
1, and in this state, the select signal is set to a low level (hereinafter referred to as "L"). As a result, each data of D o "" D n-1 is AND
The voltage is applied to each data input terminal of the D-type flip-flop 70 through the circuits 40-4 and the OR circuits 60--16, respectively, and the D-type flip-flop 1° is applied at the time of input of the clock pulse. ~1
latched to.

−1 次に、セレクト信号がハイレベル(以下“H″と記す)
に切換えられる。これにより、AND回路50〜5n−
1が夫々ゲート「開」状態となり、かつ、AND回路4
0〜4o−1が夫々ゲート「閏」状態となり、入力デー
タD o ”−D n−1のOR回路60〜6n−1へ
の通過を遮断する。この状態で、クロックパルスが1個
入力されると、AND回路51+1及びOR回路61+
1を夫々通してD型フリップ70ップト のデータ入力
端子に印加され1+1 ているD型フリップ70ツブ11のQ出力信号がラッチ
される。
-1 Next, the select signal is at a high level (hereinafter referred to as "H")
can be switched to As a result, AND circuits 50 to 5n-
1 is in the gate "open" state, and AND circuit 4
0 to 4o-1 enter the gate "leap" state, blocking the input data D o ''-D n-1 from passing through the OR circuits 60 to 6n-1. In this state, one clock pulse is input. Then, AND circuit 51+1 and OR circuit 61+
The Q output signal of the D-type flip 70, which is applied to the data input terminal of the D-type flip 70 through 1+1, respectively, is latched.

従って、クロックパルスが1個入力されることにより、
D型フリップ70ツブ10〜1  のQ−1 出力端子から取り出される各出力信号Oo〜0n−1は
、入力ディジタルデータD o ”” D n−1を1
ビツトシフトしたnビットディジタルデータと等価であ
る。従って、セレクト信号を“H”にした状態でクロッ
クパルスを、シフトしたいビット数分入力することによ
り、希望のビット数シフトされた出力ディジタルデータ
O0〜On−1を得ることができる。
Therefore, by inputting one clock pulse,
Each output signal Oo~0n-1 taken out from the Q-1 output terminal of the D-type flip 70 tubes 10~1 converts the input digital data Do""Dn-1 into 1.
This is equivalent to bit-shifted n-bit digital data. Therefore, by inputting clock pulses corresponding to the number of bits to be shifted while the select signal is set to "H", output digital data O0 to On-1 shifted by the desired number of bits can be obtained.

次に、従来のシフト回路の他の例について第4図と共に
説明する。第4図中、8は2mxn入力n出力のセレク
タで、mビットのセレクト信号Sにより、nビット入力
端子A o =A   、 B o〜−1 B  、・・・、X o −X n−1への入力デイジ
タルデ−1 一タのうちいずれかの入力端子へのnビット入力ディジ
タルデータを出力端子O0〜On−1へ選択出力する。
Next, another example of the conventional shift circuit will be explained with reference to FIG. In Fig. 4, 8 is a selector with 2mxn inputs and n outputs, and an m-bit select signal S is used to select n-bit input terminals A o = A , B o ~-1 B , . . . , X o -X n-1 Input digital data to -1 The n-bit input digital data to any one of the input terminals is selectively output to the output terminals O0 to On-1.

ここで、セレクタ8のnビット入力端子Ao〜An−1
には入力ディジタルデータDO〜Dn−1が夫々入力さ
れ、次のnビット入力端子BO〜Bn−1には1ビツト
分シフトした形でBoと81には夫々データDoを入力
し、B2にはデータD1を入力し、Bn−2にはデータ
D。−2を入力し、以下同様にして最後のnビット入力
端子XO〜xn−1のうちXo−X、−2には、2m=
nとすると、データDoを入力し、x、−1にデータD
1を入力するよう、セレクタ8の入力端子群への接続が
なされている。
Here, the n-bit input terminals Ao to An-1 of the selector 8
Input digital data DO to Dn-1 are respectively input to the next n-bit input terminals BO to Bn-1, and data Do is input to Bo and 81, respectively, in a form shifted by one bit, and to B2. Data D1 is input, and data D is input to Bn-2. -2, and in the same way, 2m=
If n is input, data Do is input, and data D is input to x, -1.
Connections are made to the input terminal group of the selector 8 so that 1 is input.

従って、この従来回路によれば、2m個(すなわちn個
)あるnビット入力端子には、順次1ビツトずつ右方向
ヘシフトされた形でディジタルデータD o ”−On
−1が入力されるから、mビットセレクト信号Sにより
2m個あるnビット入力端子のうち所望ビット数シフト
されたデータが入力されているーのnビット入力端子を
選択することにより、セレクタ8の出力端子O0〜On
−1より入力ディジタルデータD o ”” On−1
を所望ビット数シフトしたディジタルデータを取り出す
ことができる。
Therefore, according to this conventional circuit, the 2m (that is, n) n-bit input terminals receive digital data D o ''-On in a form that is sequentially shifted to the right one bit at a time.
Since -1 is input, the m-bit select signal S selects the n-bit input terminal from among the 2m n-bit input terminals into which the data shifted by the desired number of bits is input, thereby outputting the output of the selector 8. Terminal O0~On
-1 to input digital data D o ”” On-1
It is possible to extract digital data that has been shifted by a desired number of bits.

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

しかるに、第3図に示した従来のシフト回路は、回路量
は多くはないが、シフトするビット数分のクロックパル
スを入力することが必要であるため、シフトするビット
数が多くなればなるほど、シフトに要する処理時間がか
かつてしまう。
However, although the conventional shift circuit shown in FIG. 3 does not have a large amount of circuitry, it is necessary to input clock pulses for the number of bits to be shifted. The processing time required for shifting increases.

他方、第4図に示した従来のシフト回路は、n+1ビッ
トのセレクト信号の値を設定するだけで所望のビット数
シフトされたデータを得ることができるから、シフトに
要する処理時間は極めて短くて済むが、その反面、入力
ディジタルデータのビット数と少なくともシフトしよう
とする最大ビット数との積だけ入力端子数があるセレク
タを必要とするため、入力ディジタルデータのビット数
が多くなればなるほど、またビットシフトしようとする
最大ビット数が多くなればなるほど回路量が莫大となっ
てしまう。
On the other hand, the conventional shift circuit shown in FIG. 4 can obtain data shifted by the desired number of bits by simply setting the value of the n+1 bit select signal, so the processing time required for shifting is extremely short. However, on the other hand, it requires a selector with the number of input terminals equal to the product of the number of bits of input digital data and at least the maximum number of bits to be shifted. As the maximum number of bits to be shifted increases, the amount of circuitry becomes enormous.

本発明は以上の点に鑑みなされたもので、小規模な回路
構成で高速のシフト動作を行なうことができるシフト回
路を提供することを目的とする。
The present invention has been made in view of the above points, and an object of the present invention is to provide a shift circuit that can perform a high-speed shift operation with a small-scale circuit configuration.

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

第1図は本発明の原理構成図を示す。同図中、100〜
10.−1は夫々セレクタで、nビットの入力端子Ao
=A   とnビットの入力端子B。
FIG. 1 shows a basic configuration diagram of the present invention. In the same figure, 100~
10. -1 is a selector, and n-bit input terminal Ao
=A and n-bit input terminal B.

−1 〜Bn−1とnビットの出力端子O0〜On−1とセレ
クト端子Sとを有する。m個(ただし、2重≦n)のセ
レクタ100〜101−1は縦続接続されて前段のセレ
クタ10L(ただし、t−o−m−2)の出力端子Oo
 ” On−1が次段のセレクタ10L+1の第1の入
力端子A o ” A n−1に接続されており、また
、その縦続接続のに番目(ただし、kは初段を1とする
)のセレクタは第1の入力端子A o ”” A p−
1に入力されるディジタル信号を2に一1ビットシフト
したディジタル信号が第2の入力端子Bo=BTlに入
力されるように、前段のセレクタ10Lの出力端子O0
〜On−1が次段のセレクタ10r+1の第2の入力端
子B o ”” B n−1に接続されている。
-1 to Bn-1, n-bit output terminals O0 to On-1, and a select terminal S. The m selectors 100 to 101-1 (however, 2≦n) are connected in cascade to the output terminal Oo of the previous stage selector 10L (however, t-o-m-2).
``On-1'' is connected to the first input terminal A o ``A n-1 of the next stage selector 10L+1, and the second selector in the cascade connection (k is 1 for the first stage). is the first input terminal A o ”” A p-
The output terminal O0 of the selector 10L at the previous stage is inputted to the second input terminal Bo=BTl so that the digital signal obtained by shifting the digital signal input to the input terminal 1 by 1 bit to 2 is input to the second input terminal Bo=BTl.
~On-1 is connected to the second input terminal B o "" B n-1 of the next stage selector 10r+1.

更に、セレクタ100〜1om−1のセレクト端子Sに
は、mビットのセレクト信号の各ビットが入力され、各
セレクタ100〜10I−1の第1及び第2の入力端子
の入力ディジタル信号の一方を選択してそのセレクタの
出力端子O0〜On−1より出力させる。
Further, each bit of the m-bit select signal is input to the select terminal S of the selectors 100 to 10I-1, and one of the input digital signals of the first and second input terminals of each selector 100 to 10I-1 is input. It is selected and output from the output terminals O0 to On-1 of the selector.

(作用) 入力ディジタル信号の各ビットデータDo〜Dn−1は
初段のセレクタ100の第1の入力端子A o ”’−
A n−1に供給される一方、1 (=20 )ビット
シフトされて第2の入力端子Bo”Bo−1に供給され
る。このセレクタ100のセレクト端子Sにはmビット
のセレクト信号の最下位ビット(LSB)の80が印加
され、その値が“1″(換言すると″“H”)のときセ
レクタ100は第2の入力端子B o ”” B n−
1に入力される1 (=20 )ビットシフトされたデ
ィジタル信号を出力端子O0〜On−1から出力し、′
0″ (換言すると“L”)のときセレクタ100は第
1の入力’jHfAo””A   のD o ”” D
 n−1からなるディジタル−1 信号をそのまま出力端子O0〜On−1から出力する。
(Function) Each bit data Do to Dn-1 of the input digital signal is sent to the first input terminal A o "'- of the selector 100 at the first stage.
On the other hand, it is shifted by 1 (=20) bits and is supplied to the second input terminal Bo''Bo-1. When the lower bit (LSB) 80 is applied and the value is "1" (in other words, "H"), the selector 100 selects the second input terminal B o "" B n-
The 1 (=20) bit-shifted digital signal input to 1 is outputted from output terminals O0 to On-1, and '
0" (in other words, "L"), the selector 100 selects the first input 'jHfAo'"A's D o ""D
The digital-1 signal consisting of n-1 is output as is from the output terminals O0 to On-1.

従って、セレクタ100からは入力ディジタル信号D 
o ”’ D n−1が何もシフトされることなく、又
は1ビツトシフトされて取り出され、次段のセレクタ1
01の第1の入力端子Ao〜An−1にそのまま入力さ
れる一方、2ビツトシフトされてセレクタ101の第2
の入力端子B o ”−B n−1に入力される。これ
により、セレクタ10+からはセレクタ101のセレク
ト端子Sに印加されるmビットセレクト信号の2ビツト
目S+の値が“OIfのときセレクタ100の出力ディ
ジタル信号がビットシフトされることなくそのまま取り
出され、Slの値が“1″のときは2 (=2” )ビ
ットシフトされて取り出される。従って、入力ディジタ
ル信号Do−On−1はセレクタ10+から5O81の
値を2進数とするビット数分ビットシフトされて取り出
される。
Therefore, from the selector 100, the input digital signal D
o ”' D n-1 is taken out without being shifted or shifted by 1 bit, and then sent to selector 1 in the next stage.
While it is input as is to the first input terminals Ao to An-1 of selector 101, it is shifted by 2 bits and input to the second input terminal of selector 101.
As a result, when the value of the second bit S+ of the m-bit select signal applied to the select terminal S of the selector 101 from the selector 10+ is "OIf," The output digital signal of 100 is taken out as is without being bit-shifted, and when the value of Sl is "1", it is taken out after being shifted by 2 (=2) bits. Therefore, the input digital signal Do-On-1 is The value of 5O81 is bit-shifted and taken out from selector 10+ by the number of bits that make it a binary number.

以下、上記と同様にして、結局最終段のセレクタ101
11−1からは、入力ディジタル信号Do〜Dn−1が
mビットのセレクト信号S o ”” S ll1−1
により示される2進数の値に相当するビット数分ビット
シフトされて取り出される。
Hereafter, in the same manner as above, the final stage selector 101
From 11-1, the input digital signals Do to Dn-1 are m-bit select signals S o "" S ll1-1
The bits are shifted by the number of bits corresponding to the binary value indicated by and extracted.

従って、本発明では、シフトしようとするビット数の長
短に関係なく、mビットのセレクト信号S o −8m
−1の値の設定によって所望シフトビット数を得ること
ができ、また、2nビツト入力nビツト出力のセレクタ
をm個設けた構成であり、シフトしようとする最大シフ
トビット数2箱に比例せずに指数mに比例した少ないセ
レクタ数で回路を構成することができる。
Therefore, in the present invention, regardless of the length of the number of bits to be shifted, the m-bit select signal S o -8m
The desired number of shift bits can be obtained by setting the value -1, and the configuration has m selectors with 2n bit input and n bit output, so the maximum number of shift bits to be shifted is 2 boxes. The circuit can be configured with a small number of selectors proportional to the index m.

〔実施例〕〔Example〕

第2図は本発明の一実施例の構成図を示す。同図中、第
1図と同一構成部分には同一符号を付しである。本実施
例はm=5.n=32の例で、初段のセレクタ20oの
第2の入力端子So”−83tには1 (=20 )ビ
ットシフトされた32ビットディジタル信号Do−D3
0が入力される。2番目のセレクタ201は第1の入力
端子Ao=A3+に入力されるディジタル信号を2 (
=2’ ”)ビットシフトしたディジタル信号がその第
2の入力端子Bo=83+に入力され、以下、同様にし
て3番目のセレクタ202.4番目のセレクタ203及
び5番目(最終段)のセレクタ204は各々第1の入力
端子Ao=A3+に入力されるディジタル信号を4 (
=22 )ビット、8 (=23 )ビット及び16(
=24>ビットビットシフトしたディジタル信号がその
第2の入力端子Bo=83+に入力されるよう接続され
ている。
FIG. 2 shows a configuration diagram of an embodiment of the present invention. In the figure, the same components as in FIG. 1 are given the same reference numerals. In this example, m=5. In the example where n=32, the second input terminal So''-83t of the first stage selector 20o receives a 32-bit digital signal Do-D3 shifted by 1 (=20) bits.
0 is input. The second selector 201 selects the digital signal input to the first input terminal Ao=A3+ by 2 (
=2''') The bit-shifted digital signal is input to the second input terminal Bo=83+, and thereafter, the third selector 202, the fourth selector 203, and the fifth (final stage) selector 204 are input in the same manner. are the digital signals input to the first input terminal Ao=A3+, respectively, as 4 (
=22) bits, 8 (=23) bits and 16(=23) bits
=24>bits The bit-shifted digital signal is connected to its second input terminal Bo=83+.

次に、かかる構成の本実施例の動作について説明する。Next, the operation of this embodiment having such a configuration will be explained.

32ビツトの入力ディジタル信号DO〜D31を、例え
ば右方向に10ビツトシフトした信号を得るものとする
と、このときは5ビットセレクト信号の最下位ビットS
oを“0”、2ビツト目S1を“1 ” 、 3ビツト
目S2を“O”、4ビツト目S3を“1″ 5ビツト目
(最上位ビット)S4を“0″とする。これにより、セ
レクタ20o 、202及び204が夫々第1の入力端
子Ao−A3+の32ビットディジタル信号を選択出力
し、かつ、セレク゛り20+及び203が夫々第2の入
力端子Bo−83+の32ビットディジタル信号を選択
出力するように制御される。
If a signal is obtained by shifting the 32-bit input digital signals DO to D31, for example, 10 bits to the right, then the least significant bit S of the 5-bit select signal
o is "0", second bit S1 is "1", third bit S2 is "O", fourth bit S3 is "1", and fifth bit (most significant bit) S4 is "0". As a result, the selectors 20o, 202 and 204 respectively select and output the 32-bit digital signal of the first input terminal Ao-A3+, and the selectors 20+ and 203 respectively select and output the 32-bit digital signal of the second input terminal Bo-83+. Controlled to selectively output signals.

従って、32ビツトの入力ディジタル信号り。Therefore, the input digital signal is 32 bits.

〜Dssはセレクタ20oを通してセレクタ201に入
力され、ここで2ビツト右方向ヘシフトされた後、セレ
クタ202に入力され、ここでシフトされることなく取
り出されてセレクタ203に入力され、ここで8ビツト
右方向ヘシフトされて取り出され、更にセレクタ204
でシフトされることなく出力される。従って、初段のセ
レクタ20oに入力される32ビットディジタル信号D
o−D3+は、結局セレクタ201により2ビツト、セ
レクタ203により8ビツトのm 10ビツト右方向ヘ
シフトされて最終段のセレクタ20<より取り出される
~Dss is input to the selector 201 through the selector 20o, where it is shifted to the right by 2 bits, and then input to the selector 202, where it is taken out without being shifted and input to the selector 203, where it is shifted to the right by 8 bits. direction and is taken out, and then the selector 204
is output without being shifted. Therefore, the 32-bit digital signal D input to the first stage selector 20o
o-D3+ is eventually shifted to the right by 2 bits by the selector 201 and by 8 bits by the selector 203, m10 bits, and then taken out from the final stage selector 20<.

このように、本実施例によれば、5ビットセレクト信号
S0〜An−84を2進数で表わしたときの値に相当す
るビット数分だけ右方向ヘシフトされたディジタル信号
を出力することができ、最大31ビツトシフトしたディ
ジタル信号を出力することができる。本実施例では、ビ
ットシフト数に関係なく、所望のビットシフト数は5ビ
ットセレクト信号により1回で設定することができるか
ら、シフトに要する処理時間を極めて短時間にすること
ができる。
In this way, according to this embodiment, it is possible to output a digital signal shifted to the right by the number of bits corresponding to the value when the 5-bit select signals S0 to An-84 are expressed in binary numbers. A digital signal shifted by up to 31 bits can be output. In this embodiment, regardless of the number of bit shifts, the desired number of bit shifts can be set once using the 5-bit select signal, so the processing time required for shifting can be extremely shortened.

しかも、本実施例では、最大31ビツトシフトのだめに
64ビツト入力32ビツト出力のセレクタが20o〜2
04の5個で済み、第4図に示した従来回路の32ビッ
トディジタル信号の最大31ビツトシフトのために必要
な1024 (= 32 X32)ビット入力32ビツ
ト出力のセレクタ1個の回路規模に比べて小規模にでき
る。
Moreover, in this embodiment, the selector with 64-bit input and 32-bit output can only be shifted from 20o to 2
04, which is smaller than the circuit scale of one selector with 1024 (= 32 x 32) bit input and 32 bit output required for maximum 31-bit shift of the 32-bit digital signal in the conventional circuit shown in Fig. 4. Can be done on a small scale.

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

上述の如く、本発明によれば、mビットのセレクト信号
の値の設定によって所望のシフトビット数を得ることが
できるため、シフトに要する時間をシフトするビット数
によらず一定にして高速処理ができ、またシフトしよう
とする最大シフトビット数2霜に比例せずに指数mに比
例した少ないセレクタ数で回路を構成できるため、少な
い回路量で効率的にかつ小規模な回路構成とすることが
できる等の特長を有するものである。
As described above, according to the present invention, the desired number of shift bits can be obtained by setting the value of the m-bit select signal, so that high-speed processing can be achieved by keeping the time required for shifting constant regardless of the number of bits to be shifted. In addition, since the maximum number of shift bits to be shifted is 2, and the circuit can be configured with a small number of selectors that is proportional to the index m, it is possible to configure an efficient and small-scale circuit with a small amount of circuitry. It has features such as:

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

第1図は本発明の原理説明図、 第2図は本発明の一実施例の構成図、 第3図及び第4図は夫々従来の各個の回路図である。 図において、 100〜10111−1 はセレクタ、 20o 〜204 は64ビツト入力32ビツト出力 セレクタ を示す。 FIG. 1 is a diagram explaining the principle of the present invention, FIG. 2 is a configuration diagram of an embodiment of the present invention, 3 and 4 are respective conventional circuit diagrams. In the figure, 100-10111-1 is a selector, 20o ~ 204 is 64 bit input 32 bit output selector shows.

Claims (1)

【特許請求の範囲】[Claims] nビットの入力ディジタル信号を任意のビット数シフト
して出力するシフト回路において、nビットの第1の入
力端子(A_0〜A_n_−_1)とnビットの第2の
入力端子(B_0〜B_n_−_1)とnビットの出力
端子(O_0〜O_n_−_1)と該第1及び第2の入
力端子(A_0〜A_n_−_1、B_0〜B_n_−
_1)の入力信号の一方を選択してnビット出力端子(
O_0〜O_n_−_1)から出力させるためのセレク
ト端子(S)とを有するセレクタ(10_0〜10_m
_−_1)をm個(ただし、2^m≦n)縦続接続して
前段のセレクタの該出力端子を次段のセレクタの該第1
の入力端子に接続し、かつ、該m個のセレクタ(10_
0〜10_m_−_1)の各々は該第1の入力端子への
入力ディジタル信号を2^k^−^1ビット(ただし、
kは当該セレクタの接続順番に等しく、初段のセレクタ
では1とする)シフトしたディジタル信号を該第2の入
力端子へ供給するよう前段のセレクタの該出力端子と次
段のセレクタの該第2の入力端子とを接続し、該m個の
セレクタ(10_0〜10_m_−_1)の各セレクト
端子(S)へmビットのセレクト信号の各ビットを供給
するよう構成したことを特徴とするシフト回路。
In a shift circuit that shifts an n-bit input digital signal by an arbitrary number of bits and outputs the result, an n-bit first input terminal (A_0 to A_n_-_1) and an n-bit second input terminal (B_0 to B_n_-_1) are used. ), n-bit output terminals (O_0 to O_n_-_1), and the first and second input terminals (A_0 to A_n_-_1, B_0 to B_n_-
Select one of the input signals of _1) and output it to the n-bit output terminal (
A selector (10_0 to 10_m) having a select terminal (S) for outputting from O_0 to O_n_-_1)
____1) are connected in cascade (2^m≦n) to connect the output terminal of the previous stage selector to the
is connected to the input terminal of the m selectors (10_
0 to 10_m_-_1) input the input digital signal to the first input terminal into 2^k^-^1 bits (however,
(k is equal to the connection order of the selector concerned, and is 1 for the first stage selector) The output terminal of the previous stage selector and the second stage of the next stage selector are connected so that the shifted digital signal is supplied to the second input terminal. 1. A shift circuit characterized in that the shift circuit is connected to an input terminal and is configured to supply each bit of an m-bit select signal to each select terminal (S) of the m selectors (10_0 to 10_m_-_1).
JP1332307A 1989-12-21 1989-12-21 Shift circuit Pending JPH03192598A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1332307A JPH03192598A (en) 1989-12-21 1989-12-21 Shift circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1332307A JPH03192598A (en) 1989-12-21 1989-12-21 Shift circuit

Publications (1)

Publication Number Publication Date
JPH03192598A true JPH03192598A (en) 1991-08-22

Family

ID=18253501

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1332307A Pending JPH03192598A (en) 1989-12-21 1989-12-21 Shift circuit

Country Status (1)

Country Link
JP (1) JPH03192598A (en)

Similar Documents

Publication Publication Date Title
EP0047440B1 (en) Shift circuit
JPS6059470A (en) Basic cell suitable for multiplication- accumulation processor and said processor
JPH0133850B2 (en)
US4325129A (en) Non-linear logic module for increasing complexity of bit sequences
JPH03192598A (en) Shift circuit
JPH0697431B2 (en) Barrel shifter
JP5253406B2 (en) Digital electronic binary rotator and inverter
JPS5965376A (en) Address control circuit
US5987090A (en) Method and apparatus for a logarithmic shift register
CN217034730U (en) Multi-bit selector, arithmetic circuit and chip
US5237597A (en) Binary counter compiler with balanced carry propagation
JPH041994A (en) Variable length shift register circuit
JPH04178011A (en) Selector
JP3540136B2 (en) Data division parallel shifter
JP2968629B2 (en) Maximum period sequence code generation circuit
JPH05334042A (en) Barrel shifter circuit
KR100265358B1 (en) Speedy shift apparatus
JPH0215499A (en) Shift register
JPH06103033A (en) Plural fixed magnifier
JP2003330704A (en) Pseudo-random number pattern generating circuit
JPH06120842A (en) Serial/parallel conversion circuit
JP2833885B2 (en) PN code generation circuit
JP2002325041A (en) Decoding circuit, and circuit and method for converting code
WO2004044731A2 (en) Device and method for performing shift/rotate operations
JPH06310996A (en) Sequence signal generating circuit