JPS60221826A - Shifting circuit - Google Patents

Shifting circuit

Info

Publication number
JPS60221826A
JPS60221826A JP7653784A JP7653784A JPS60221826A JP S60221826 A JPS60221826 A JP S60221826A JP 7653784 A JP7653784 A JP 7653784A JP 7653784 A JP7653784 A JP 7653784A JP S60221826 A JPS60221826 A JP S60221826A
Authority
JP
Japan
Prior art keywords
data
circuit
register
output
shift
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
JP7653784A
Other languages
Japanese (ja)
Inventor
Tsukasa Kudo
司 工藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP7653784A priority Critical patent/JPS60221826A/en
Publication of JPS60221826A publication Critical patent/JPS60221826A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decrease the number of shifting circuits, and to shorten the shifting time by adding a register, masking circuit and a mask pattern generating circuit to the shifting circuit. CONSTITUTION:The first and the second data from a bus 16 are inputted to a shift register 1 of a shifting circuit, and a data from the register 1 is inputted to an AND circuit 7 of a masking circuit 31. Also, a mask pattern from the bus 16 is stored in a register 4 of a pattern generating circuit 30, a value of each bit is inverted by an inverting circuit 5, added to a selector 6 together with the output of the register 4, and an inverted output from the register 4 and the circuit 5 is selected by the selector 6. AND of an output of this selector 6 and an output of the register 1 is derived by the circuit 7, and outputted from the circuit 31. This output data is processed by a register 8 and an OR circuit 9, and OR of the circuits 7, 8 is derived by the circuit 9, this output is outputted to the bus 16 through a register 3, this operation is applied to all bits, and the number of the shifting circuits is decreased.

Description

【発明の詳細な説明】 〔発明の技術分野〕 この発明は5例えば図形データ処理装置などにおいて、
ビット長の長いデータのシフトを効率良く行なうための
装置に関するものである。
[Detailed Description of the Invention] [Technical Field of the Invention] This invention relates to a graphical data processing device, etc.
The present invention relates to a device for efficiently shifting data with a long bit length.

〔従来技術〕[Prior art]

第1図は従来のシフト回路を示すブロック図でめ91図
において1はシフトレジスタ、2け1のシフト・アウト
・データをシフト・イン・データとするリセット可能な
シフトレジスタ、8はシフトレジスタ2の出力データを
格納するレジスタ、10はシフトレジスタ1に格納する
データを送るバス、11はシフトレジスタ1の77ト・
アラ)−データをシフトレジスタ2にシフト・イン・デ
ータとして入力するバス、12はシフトレジスタ2の出
力をレジスタ3に入力するバス、13はレジスタ8のデ
ータを出力するバスである。
FIG. 1 is a block diagram showing a conventional shift circuit. In FIG. 10 is a bus that sends data to be stored in shift register 1, 11 is a bus that sends data to be stored in shift register 1, and 11 is a register that stores output data of shift register 1.
12 is a bus for inputting the output of the shift register 2 to the register 3, and 13 is a bus for outputting the data of the register 8.

次に動作について説明する。Next, the operation will be explained.

第2図に、動作のタイミングを示す時間をも=1 、t
=2.・・・・・・とじ、各々のタイミングにおいて各
々のシフトレジスタ、レジスタに格納されるデータを示
す。
In Fig. 2, the time indicating the timing of the operation is also = 1, t
=2. . . . and shows the data stored in each shift register and register at each timing.

まずタイミングj=lでシフトレジスタ1に第1の入力
データAlとA2が格納されシートレジスタ2はリセッ
トされる。次にシフトレジスタ1゜2の間で、1のシフ
ト・アウト・データを2のシフト・イン・データとして
左シフトを繰り返した後、タイミングt==2でデータ
A1がシフトレジスタ2に、データA2がシフトレジス
タ1にそれぞれ格納される。
First, at timing j=l, first input data Al and A2 are stored in the shift register 1, and the sheet register 2 is reset. Next, after repeating left shifts between shift registers 1 and 2, using shift-out data of 1 as shift-in data of 2, data A1 is transferred to shift register 2 and data A2 is transferred to shift register 2 at timing t==2. are respectively stored in shift register 1.

タイミングt==3でシフトレジスタ2のデータをレジ
スタ3に格納することによって、シフトレジスタ1に入
力されたデータを必要なビット数だけ左シフトした第1
の出力データをレジスタ8に得る。
By storing the data in shift register 2 in register 3 at timing t==3, the data input to shift register 1 is shifted to the left by the required number of bits.
The output data of is obtained in register 8.

次にタイミングt、=2でデータを得たときと同様にし
てシフトを行なうことKより、タイミングt=4でシフ
トレジスタ2にデータA1とA2を得る。
Next, data A1 and A2 are obtained in the shift register 2 at timing t=4 by performing a shift K in the same manner as when data was obtained at timing t=2.

タイミングl=5で第2の入力データBl、B2をシフ
トレジスタHC入力し、その後、タイミングi=2でデ
ータを得たときと同様にシフトを行ない、タイミングを
工6でシフトレジスタ2にデータA2とB1を得る。
The second input data Bl and B2 are input to the shift register HC at timing l=5, and then shifted in the same way as when data was obtained at timing i=2, and data A2 is input to shift register 2 at timing i=2. and get B1.

タイミングl=7でシフトレジスタ2のデータをレジス
タ3に格納し%1M2の出力データを得る。
At timing l=7, the data in shift register 2 is stored in register 3 to obtain output data of %1M2.

このような操作を繰り返すことによって、第3図のよう
に長いビット幅を持つ入力データを必要なビット数だけ
シフトした形式の出力データを、第1の出力データ−9
第2の出力データ、・・・・・・のような部分データの
形式で逐次得ることができる。
By repeating these operations, output data in a format in which input data with a long bit width is shifted by the necessary number of bits as shown in Figure 3 is converted into the first output data -9.
The second output data can be obtained sequentially in the form of partial data such as...

従来のシフト回路は以上のように構成されているので1
部分データのビット長をnとすると1つの部分データを
得るために4回のシフトが必要となり、シフトするため
忙時間がかかるとiう欠点があった。
Since the conventional shift circuit is configured as described above, 1
If the bit length of partial data is n, it requires four shifts to obtain one partial data, and there is a drawback that shifting requires a lot of busy time.

〔発明の概要〕[Summary of the invention]

この発明は上記のような従来のものの欠点を除去するた
めになされたもので、少ないシフト回数で上記の出力デ
ータが得られるようにしたシフト回路を提供することを
目的としている。
The present invention was made in order to eliminate the above-mentioned drawbacks of the conventional circuit, and an object of the present invention is to provide a shift circuit that can obtain the above-mentioned output data with a small number of shifts.

〔発明の実施例〕[Embodiments of the invention]

以下、この発明の一実施例を図について説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第4図においてシフトレジスタ1.レジスタ3、バス1
0..13は第1図と同一または相自部分を示すもので
あり、4はマスク・パターンを格納するレジスタ、5は
上記レジスタ4のデータの各ビットの値を反転したデー
タを出力する反転回路、6はレジスタ4と反転回路5の
一方のデータを選択するセレクタ、7はシフトレジスタ
1のデータとセレクタ6のデータの論理積を出力するA
ND回路、8はデータをクリアする機能を持ちAND回
路7の出力データを格納するレジスタ、9はAND回路
7の出力データとレジスタ8のデータとの論理和を出力
するOR回路、14はシフトレジスタのシフト・アウト
・データを14のシフト・イン・データとして入力する
ためのバス、15はシフトレジスタ14のデータをAN
D回路1に送るバス、16はレジスタ4にデータを入力
するバス、17はレジスタ4のデータを反転回路5とセ
レクタ6に入力するバス、18は反転回路5の出力をセ
レクタ6に入力するバス、19はセレクタ6の出力をA
ND回路1に入力するバス、20はAND回路7の出力
をレジスタ8とOR回路9に入力するバス、21はレジ
スタ8のデータをOR回路9に入力するバス、22はO
R回路の出力をレジスタ3に入力するバス、30はパタ
ーン生成回路%31はマスク回路である。
In FIG. 4, shift register 1. register 3, bus 1
0. .. Reference numeral 13 indicates the same or similar part to that in FIG. 1; 4 is a register that stores a mask pattern; 5 is an inversion circuit that outputs data obtained by inverting the value of each bit of the data in register 4; and 6 is a selector that selects data from one of register 4 and inversion circuit 5, and 7 is a selector that outputs the AND of the data from shift register 1 and the data from selector 6.
ND circuit; 8 is a register that has the function of clearing data and stores the output data of AND circuit 7; 9 is an OR circuit that outputs the logical sum of the output data of AND circuit 7 and the data of register 8; 14 is a shift register A bus 15 inputs the shift-out data of the shift register 14 as shift-in data of the shift register 14.
16 is a bus that inputs data to register 4; 17 is a bus that inputs data from register 4 to inverting circuit 5 and selector 6; 18 is a bus that inputs the output of inverting circuit 5 to selector 6. , 19 indicates the output of selector 6 as A
20 is a bus that inputs the output of AND circuit 7 to register 8 and OR circuit 9, 21 is a bus that inputs the data of register 8 to OR circuit 9, 22 is O
A bus inputs the output of the R circuit to the register 3, 30 is a pattern generation circuit, and 31 is a mask circuit.

次に動作について説明する。Next, the operation will be explained.

動作のタイミングを示す時間をt=1 、t=2゜・・
・・・・とじ、各々のタイミングにおいてシフトレジス
タ1、レジスタ3,4.81C格納されるデータを第5
図に示す。このうち、レジスタ4に゛格納されるデータ
は不変であり、予じめシフトすべきビット数だけ右端か
ら1が格納され、残りのビットには0が格納される。
The time indicating the timing of the operation is t=1, t=2°...
..., and the data stored in shift register 1, register 3, 4.81C at each timing is
As shown in the figure. Of these, the data stored in the register 4 is unchanged, and 1s are stored from the right end by the number of bits to be shifted in advance, and 0s are stored in the remaining bits.

まずタイミングj=lでレジスタ4に上記のデータが、
そしてレジスタ1に第1の入力データAI。
First, at timing j=l, the above data is stored in register 4.
Then, register 1 receives first input data AI.

人2が格納され、レジスタ8・がクリアされる。Person 2 is stored and register 8 is cleared.

次にシフトレジスタ1のデータが必要なビット数だけロ
ーテーション・シフトされ、タイミング1=2でデータ
A1がデータA2の右に来る。同時にセレクタ6でレジ
スタ4のデータが選択され、このデータがシフトレジス
タlのデータと共にAND回路7に入力され両者の論理
積が出力される。
Next, the data in shift register 1 is rotated and shifted by the required number of bits, and data A1 comes to the right of data A2 at timing 1=2. At the same time, the selector 6 selects the data in the register 4, this data is input to the AND circuit 7 together with the data in the shift register 1, and the logical product of the two is output.

ここでセレクタ6の出力データはシフトレジスタ1のデ
ータA2に対応する部分が0であるから、AND回路1
の出力データはシフトレジスタ1のデータでデータA2
の部分に0を格納したものになる。
Here, since the part of the output data of the selector 6 corresponding to the data A2 of the shift register 1 is 0, the AND circuit 1
The output data is the data of shift register 1 and is data A2.
0 is stored in the part.

このデータはOR回路に入力されるが、レジスタ8は0
であるから、このときにはAND回路7とレジスタ8の
論理和であるOR回路9の出力はAND回路7の出力に
等しくなっている。
This data is input to the OR circuit, but register 8 is 0.
Therefore, at this time, the output of the OR circuit 9, which is the logical sum of the AND circuit 7 and the register 8, is equal to the output of the AND circuit 7.

タイミングt==3でOR回路9の出力がレジスタ3に
格納されて、第1の出力データを得る。
At timing t==3, the output of the OR circuit 9 is stored in the register 3 to obtain first output data.

続いてセレクタ6で反転回路5の出力が選択されバス1
9によってAND回路7に入力され、このデータとシフ
トレジスタ1のデータとの論理和が出力される。反転回
路5の出力はレジスタ4の各ビットにおいて、0,1の
値を反転したものであるから、今度はAND回路7の出
力はシフトレジスタ1でデータA1の部分に0を格納し
たものになっている。
Next, selector 6 selects the output of inverting circuit 5 and transfers it to bus 1.
9 is input to the AND circuit 7, and the logical sum of this data and the data of the shift register 1 is output. Since the output of the inversion circuit 5 is the inversion of the values 0 and 1 in each bit of the register 4, the output of the AND circuit 7 is the result of storing 0 in the data A1 portion of the shift register 1. ing.

こうしてタイミングt=4でAND回路70出力データ
をレジスタ8に格納する。
In this way, the AND circuit 70 output data is stored in the register 8 at timing t=4.

次にタイミングt==5でシフトレジスタ1に第2の入
力データBl、B、2が入力され、必要なビット数タケ
ローテーション・シフトされてタイミングt=6でデー
タB1がデータB2の右に来る。
Next, at timing t==5, the second input data Bl, B, and 2 are input to shift register 1, and are rotated and shifted by the required number of bits, and at timing t=6, data B1 comes to the right of data B2. .

同時にセレクタ6でレジスタ4のデータが選択されてA
ND回路7に入力され、レジスタ4とシフトレジスタ1
の論理積が出力される。これはシフトレジスタ1のデー
タB2の部分に0を格納したものになる。
At the same time, selector 6 selects the data in register 4 and A
Input to ND circuit 7, register 4 and shift register 1
The logical product of is output. This results in 0 being stored in the data B2 portion of shift register 1.

AND回路7の出力データはバス20によってOR回路
9に入力され、レジスタ8のデータとの論理和か出力さ
れる。このデータはA2の右にB1を結合したものとな
る。
The output data of the AND circuit 7 is input to the OR circuit 9 via the bus 20, and the OR circuit with the data of the register 8 is output. This data is the result of combining B1 to the right of A2.

タイミングi=7でOR回路9の出力データがレジスタ
8に格納されて第2の出力データを得る。
At timing i=7, the output data of the OR circuit 9 is stored in the register 8 to obtain second output data.

以下、同様の操作を繰り返すことによって、第3図のよ
うに長いビット幅を持つ入力データを必要なビット数だ
けシフトした形式の出力データを、第1の出力データ、
第2の出力データ、・・・・・・のような部分データの
形式で逐次得ることができる。
Thereafter, by repeating the same operation, output data in a format in which the input data with a long bit width is shifted by the necessary number of bits as shown in Fig. 3 is converted into the first output data,
The second output data can be obtained sequentially in the form of partial data such as...

なお、上記実施例ではパターン生成回路にレジスタを備
えてマスク・パターンを外部から入力したが、このレジ
スタをリセット機能を持つシフトレジスタとして最初に
リセットし、シフト・イン・データとして1を入力する
ように構成し、入力データを格納するシフト・レジスタ
の最初のシフト動作の時に同様にシフト動作を行なうよ
うにしてもよい。
Note that in the above embodiment, the pattern generation circuit is provided with a register and the mask pattern is input from the outside, but this register is first reset as a shift register with a reset function, and 1 is input as shift-in data. The shift register may be configured to perform a similar shift operation at the time of the first shift operation of a shift register storing input data.

またシフトレジスタのシフトの時に、左、右のシフトの
うちシフト回数の少ない方向にシフトできるように構成
すれば少ないシフト回数で同様の機能を期待できる。
Further, when shifting the shift register, if the shift register is constructed so that it can be shifted in the direction with fewer shifts between left and right, the same function can be expected with fewer shifts.

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

以上のように、この発明によればレジスタとマスク回路
、マスクパターン生成回路を付加することによって、シ
フト回数を少々くできるという効果がある。
As described above, according to the present invention, by adding a register, a mask circuit, and a mask pattern generation circuit, there is an effect that the number of shifts can be slightly reduced.

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

第1図は従来のシフト回路を示すブロック図、第2図は
その動作説明用のタイミングチャート図、第3図はデー
タフォーマットの説明図、第4図はとの発明の一実施例
によるシフト回路を示すブロック図、第5図はその動作
説明用のタイミングチャート図である。 図において、1・・・シフトレジスタ、8・・・レジス
タ、9・・・OR回路、30・・・ノ(ターン生成回路
、81・・・マスク回路である。 なお、各図中、同一符号は同一または相当部分を示すも
のとする。 特許出願人 三菱電機株式会社 第1図 第2図 t・70110「ロロ「口 第4図 第5図 t=70ロ四ロ1四日10巨 四ロ盃正書(自発) 59.9.21 昭和 年 月 日 特許庁長官殿 1、事件の表示 特願昭59−76537号2、発明の
名称 シフト回路 3、補正をする者 代表者片山仁へ部 6、補正の内容 明細書をつぎのとおり訂正する。
Fig. 1 is a block diagram showing a conventional shift circuit, Fig. 2 is a timing chart for explaining its operation, Fig. 3 is an explanatory diagram of the data format, and Fig. 4 is a shift circuit according to an embodiment of the invention. FIG. 5 is a timing chart for explaining its operation. In the figures, 1...shift register, 8...register, 9...OR circuit, 30...no (turn generation circuit), 81...mask circuit. Note that the same reference numerals are used in each figure. shall indicate the same or equivalent parts. Patent Applicant Mitsubishi Electric Corporation 59.9.21 Showa 1999 (Monday/Monday) Commissioner of the Japan Patent Office 1. Indication of the case: Japanese Patent Application No. 59-76537 2. Invention name shift circuit 3. To Hitoshi Katayama, representative of the person making the amendment. 6. The statement of contents of the amendment shall be amended as follows.

Claims (1)

【特許請求の範囲】[Claims] 同一ビット数のデータ群の連続からなるデータ列を、そ
れぞれのデータ群の間で所定ビットだけ順次データがシ
フトされている新たなデータ群からなるデータ列に変換
するためのシフト回路において、上記データ群を順次格
納しローテーションシフトを行なうシフトレジスタと、
上記データ群のシフトすべきビット数に対応したマスク
・パターンを生成するパターン生成回路と、上記シフト
レジスタのデータと上記マスク・パターンとを左入力と
するマスク回路と、このマスク回路の出力を格納するレ
ジスタとを設け、このレジスタの出力データと上記マス
ク回路の出力データとの論理和により上記性たなデータ
群からなるデータ列を得るように構成したことを特徴と
するシフト回路。
In a shift circuit for converting a data string consisting of successive data groups having the same number of bits into a data string consisting of a new data group in which data is sequentially shifted by a predetermined bit between each data group, the above-mentioned data A shift register that stores groups sequentially and performs rotational shifts;
A pattern generation circuit that generates a mask pattern corresponding to the number of bits to be shifted in the data group, a mask circuit that receives the shift register data and the mask pattern as left inputs, and stores the output of this mask circuit. 1. A shift circuit comprising: a register, and configured to obtain a data string consisting of a data group having the above characteristics by ORing the output data of the register and the output data of the mask circuit.
JP7653784A 1984-04-18 1984-04-18 Shifting circuit Pending JPS60221826A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7653784A JPS60221826A (en) 1984-04-18 1984-04-18 Shifting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7653784A JPS60221826A (en) 1984-04-18 1984-04-18 Shifting circuit

Publications (1)

Publication Number Publication Date
JPS60221826A true JPS60221826A (en) 1985-11-06

Family

ID=13608015

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7653784A Pending JPS60221826A (en) 1984-04-18 1984-04-18 Shifting circuit

Country Status (1)

Country Link
JP (1) JPS60221826A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729725A (en) * 1995-10-19 1998-03-17 Denso Corporation Mask data generator and bit field operation circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729725A (en) * 1995-10-19 1998-03-17 Denso Corporation Mask data generator and bit field operation circuit

Similar Documents

Publication Publication Date Title
EP0047440A1 (en) Shift circuit
JPS58207152A (en) Test system for pipeline arithmetic device
JPS60221826A (en) Shifting circuit
KR970077987A (en) Digital filter
JPH07198799A (en) High-speed test pattern generator
KR970029772A (en) Ultra-Scale Integrated Circuits for Bit-Serial Matrix Prefix
JPS6238975A (en) Self-correlating apparatus
JPS6120897B2 (en)
JPS59121538A (en) Data processor
JP2536135B2 (en) Serial / parallel conversion circuit
JPS60101643A (en) Data processor
JPS62237523A (en) Sorting circuit
JPS62166609A (en) Digital filter device
SU1298746A1 (en) Device for generating address of next microinstruction
KR0119785Y1 (en) Circuit of 2's complement generation
JPS60123931A (en) Arithmetic circuit
SU1425630A1 (en) Walsh function generator
KR940023099A (en) Method and apparatus for serial / parallel conversion of data
JPS6148177B2 (en)
JPH0540602A (en) Scan system for register file
JPH0628151A (en) Parallel latch circuit for serial data
JPS62160529A (en) Data processor
JPH033414A (en) (m) series code generator with variable number of stages
JPS63292267A (en) Address generating circuit for fast fourier transform
JPS5833578B2 (en) Digital circuit testing methods