JPS63121922A - Barrel shift circuit - Google Patents

Barrel shift circuit

Info

Publication number
JPS63121922A
JPS63121922A JP61267552A JP26755286A JPS63121922A JP S63121922 A JPS63121922 A JP S63121922A JP 61267552 A JP61267552 A JP 61267552A JP 26755286 A JP26755286 A JP 26755286A JP S63121922 A JPS63121922 A JP S63121922A
Authority
JP
Japan
Prior art keywords
word
input
shift circuit
bits
barrel 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
JP61267552A
Other languages
Japanese (ja)
Inventor
Kazumi Kubota
窪田 一実
Shigeo Tsujioka
辻岡 重夫
Hiromichi Enomoto
博道 榎本
Toshihiko Ogura
敏彦 小倉
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP61267552A priority Critical patent/JPS63121922A/en
Publication of JPS63121922A publication Critical patent/JPS63121922A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shift continuous words by extracting data equivalent to one-word which should be actually written in a memory after data of two words adjacent to each other is given as the input and is shifted by data equivalent to two words. CONSTITUTION:A second barrel shift circuit 2 is provided to take out the input, which should be allowed to correspond to idle bits, from a second word, and bits overflowed from the second input word by the shift processing of the second barrel shift circuit 2 are allowed to correspond to idle bits due to the shift processing of a first barrel shift circuit 1. As the result optical continuous bits equivalent to one-word are selected from first and second input words by the shift processing to obtain one output word.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はビットマツプ表示装置に係り、特に表示画面上
の図形を別位置に複写・移動する際の表示メモリ制御に
好適なバレルシフト回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a bitmap display device, and particularly to a barrel shift circuit suitable for display memory control when copying or moving a figure on a display screen to another position.

〔従来の技術〕[Conventional technology]

従来のビットマツプ表示装置では、ワードを単位として
構成したビットマツプメモリ上の図形データをビット単
位にずれた位置に複写・移動するタメ、NECrPC−
100?/ニカルマニエアル」第5−5頁に示されるよ
うなバレルシフト回路を備えている。これはビットマツ
プメモリから読み出した1ワードのデータを指定したビ
ット数だけシフトし、シフト結果を再びビットマツプメ
モリに書き込み、図形データをビット単位に移動する際
に使用するものである。バレルシフト回路は17−ドの
データを入力すると、予め設定したビット数のシフト処
理を行ったデータを出力するので、バレルシフト回路の
出力をビットマツプメモリに書き込むことにより、1ワ
ードの中での各ビットの位置をシフトすることができる
。しかしながら、1ワードを越える面積を持つ図形デー
タを移動する場合については配慮されていなかった。
In conventional bitmap display devices, the NECrPC-
100? It is equipped with a barrel shift circuit as shown in "Nical Manual", page 5-5. This is used to shift one word of data read from the bitmap memory by a specified number of bits, write the shift result back into the bitmap memory, and move graphic data bit by bit. When the barrel shift circuit receives 17-word data, it outputs the data that has been shifted by a preset number of bits, so by writing the output of the barrel shift circuit to the bitmap memory, the data in one word can be changed. The position of each bit can be shifted. However, no consideration has been given to the case where graphic data having an area exceeding one word is moved.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記従来技術は、複数ワードにまたがるデータのシフト
処理についての配慮がされておらず、シフトによって生
ずる空きビットに対しては、有効なデータが反映されな
いという問題があった。
The above-mentioned conventional technology does not take into account the shift processing of data spanning multiple words, and there is a problem in that valid data is not reflected in empty bits generated by the shift.

本発明の目的は、この問題を解決し、複数ワードにまた
がるデータをシフトする場合、シフトにより生ずる空き
ビットには隣接するワードのビットを反映して、連続ワ
ードのシフトを可能とするバレルシフト回路を提供する
ことにある。
An object of the present invention is to solve this problem, and when shifting data spanning multiple words, a barrel shift circuit enables shifting of consecutive words by reflecting the bits of adjacent words in the empty bits generated by the shift. Our goal is to provide the following.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的は、バレルシフト回路の入力として、互に隣接
する2ワードのデータを与え、2ワ一ド分のシフト処理
を行った後、実際にメモリに書き込む必要のある1ワ一
ド分のデータを抽出することにより達成される。
The above purpose is to input two adjacent words of data as input to the barrel shift circuit, perform shift processing for two words, and then data for one word that needs to be actually written into memory. This is achieved by extracting the .

〔作用〕[Effect]

本発明のバレルシフト回路は、第1ワードをシフトする
第1のバレルシフト回路と、@2ワードをシフトする第
2のバレルシフト回路とから成る。
The barrel shift circuit of the present invention includes a first barrel shift circuit that shifts the first word and a second barrel shift circuit that shifts the @2 word.

第1のバレルシフト回路は、与えられたシフ)ビット数
に応じて、第1の入力ワードの中から出力ワードの各ビ
ットに対応するビットを選び出し、これを出力とする。
The first barrel shift circuit selects bits corresponding to each bit of the output word from the first input word according to the given number of shift bits, and outputs the selected bits.

この際、シフト方向が左の場合には出力ワードの右側、
シフト方向が右の場合には出力ワードの左側に、入力ビ
ツトと対応しない空きビットが発生する。従来のバレル
シフト回路では、この空きビットに対して、シフト処理
により入力ワードからあふれ出すど、ットを対応させ、
ビット回転、或いはローティトと呼ばれる処理な実現し
ていた。これに対し、本発明では、空きビットに対応さ
せるための入力を第2ワードから取り出すために設けた
第20バレルシフト回路を偏見、コの第20バレルシフ
ト回路のシフト処理によって第2の入力ワードからあふ
れ出したビットを第10バレルシフト回路のシフト処理
で発生した空きビットに対応させる。この結果、第1.
第2の入力ワードの中から、シフト処理によって任意の
連続する1ワ一ド分のビットを選択し、出力1ワードと
することができる。
In this case, if the shift direction is left, the right side of the output word,
When the shift direction is right, empty bits that do not correspond to input bits are generated on the left side of the output word. In conventional barrel shift circuits, the bits that overflow from the input word are made to correspond to these empty bits through shift processing, and
A process called bit rotation, or rotation, was realized. In contrast, in the present invention, the 20th barrel shift circuit provided for extracting the input corresponding to the empty bit from the second word is biased, and the second input word is shifted by the shift processing of the 20th barrel shift circuit. The bits overflowing from the 10th barrel shift circuit are made to correspond to empty bits generated by the shift process of the 10th barrel shift circuit. As a result, 1.
From the second input word, bits for one arbitrary continuous word can be selected by shift processing and can be made into one output word.

〔実施例〕〔Example〕

以下、本発明の実施例を図を用いて詳細に説明する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図は本発明の一実施例を示すブロック図である。第
1図において、1は第1の入力ワードをシフトスる第1
0バレルシフト回路、2は第2の入力ワードをシフトす
る第2のバレルシ”アト回路、3はシフトするビット量
を2進値としてバレルシフト回路に与えるデコーダ、1
0〜17はバレルシフト回路1を構成するセレクタ、2
0はバレルシフト回路2を構成するセレクタである。
FIG. 1 is a block diagram showing one embodiment of the present invention. In FIG. 1, 1 is the first
0 barrel shift circuit; 2 is a second barrel shift circuit that shifts the second input word; 3 is a decoder that provides the amount of bits to be shifted as a binary value to the barrel shift circuit; 1
0 to 17 are selectors configuring the barrel shift circuit 1, and 2
0 is a selector configuring the barrel shift circuit 2.

なお、以下では簡単のため、1ワードを4ビツト、バレ
ルシフト回路は図の左方向として説明するが、他のワー
ド構成、或いは右シフトの場合にも同様の議論が成り立
つことは明らかである。
In the following, for the sake of simplicity, one word will be explained as having four bits, and the barrel shift circuit will be explained as being in the left direction in the figure, but it is clear that the same argument can be made in the case of other word configurations or right shift.

第1図において、セレクタ10〜17及び20は、切換
端子Sの入力値が論理値゛0″のとき、入力端子への信
号を出力端子Yに接続し、切換端子Sの入力値が論理値
゛1”のとき入力端子Bの信号を出力端子Yに接続する
ものとする。なお、このような機能を持ツTTL 2子
トシテ、日立裂標mTTL、 74LS157または7
4L8257 、及び相当品などを使用することができ
る。
In FIG. 1, selectors 10 to 17 and 20 connect the signal to the input terminal to the output terminal Y when the input value of the switching terminal S is a logical value "0", and the input value of the switching terminal S is a logical value. When "1", the signal at input terminal B is connected to output terminal Y. In addition, the TTL 2 child Toshite, Hitachi Ribyo mTTL, 74LS157 or 7 with such functions
4L8257 and equivalent products can be used.

第1図において、デコーダ3はバレルシフト回路1及び
2にシフトするビット数を与える。1ワードを4ビツト
とすると、シフトするビット数としては、Q、 1.2
.3ビツトが有効であり、デコーダ3は、これを2進値
の信号2ビツトとしてバレルシフト回路t2に供給する
。すなわち、シフトするピッ゛ト数が00とき、bl=
0. bO=0.1のときbj=Q、bQ=1.2のと
きb1=1. bO=0.5のときb1=1.bO=1
 となる。セレクタ14〜17及び20はデコーダ5か
ら与えられる信号b1を切換端子Sに入力するため、b
1=0のとき入力端子Aを、b1=1のとき入力端子B
を出力端子Yに接続する。第1及び第2の入力ワードは
、セレクタ14〜17及び20によりて、b1=oのと
き0ビツト、 bl−Jのとき2ビツト左にシフトされ
る。同様にセレクタ14〜17及び20の出力信号は、
セレクタ10〜LICよって、bO=0のとき0ビツト
、b1=1のとき1ビツト左にシフトされ、結果として
、セレクタ14〜17及び20と、セレクタ10〜13
のシフト量が積算されてo、t2.3ビツトのシフトが
可能となる。バレルシフト回路1の左シフト動作によっ
て、第1の入力ワードの右備には、本来、空きビットが
発生するが、本実施例においては、空きビットの発生す
る部分に第2の入力ワード及びバレルシフト回路2の出
力が接続されているため、第1.第2の入力ワードKま
たがりてシフト処理を行うことができる。また、バレル
シフト回路1及びデコーダ5は、従来のバレルシフト回
路と同一の構成であり、本発明を実施するに当たって必
要となる追加回路は、バレルシフト回路2だけである。
In FIG. 1, decoder 3 provides barrel shift circuits 1 and 2 with the number of bits to be shifted. Assuming 1 word is 4 bits, the number of bits to shift is Q, 1.2
.. Three bits are valid, and the decoder 3 supplies them as a two-bit binary signal to the barrel shift circuit t2. That is, when the number of pits to shift is 00, bl=
0. When bO=0.1, bj=Q; when bQ=1.2, b1=1. When bO=0.5, b1=1. bO=1
becomes. Since the selectors 14 to 17 and 20 input the signal b1 given from the decoder 5 to the switching terminal S, b
When 1=0, input terminal A, when b1=1, input terminal B
Connect to output terminal Y. The first and second input words are shifted to the left by selectors 14-17 and 20 by 0 bits when b1=o and by 2 bits when bl-J. Similarly, the output signals of selectors 14 to 17 and 20 are
Selectors 10 to LIC shift left by 0 bit when bO=0 and by 1 bit when b1=1, and as a result, selectors 14 to 17 and 20 and selectors 10 to 13
By integrating the shift amounts, it is possible to shift o,t2.3 bits. Due to the left shift operation of the barrel shift circuit 1, empty bits are normally generated in the right side of the first input word, but in this embodiment, the second input word and the barrel are placed in the portion where the empty bits occur. Since the output of shift circuit 2 is connected, the first. A shift operation can be performed across the second input word K. Further, the barrel shift circuit 1 and the decoder 5 have the same configuration as a conventional barrel shift circuit, and the barrel shift circuit 2 is the only additional circuit required to implement the present invention.

第1図実施例においては、バレルシフト回路2を構成す
るのはセレクタ20のみであり、本発明は安価に実施で
きる。
In the embodiment shown in FIG. 1, only the selector 20 constitutes the barrel shift circuit 2, and the present invention can be implemented at low cost.

一般に1ワードを2nビツトとすると、バレルシフト回
路1を構成するためには、n X 2”個のセレクタが
必要である。これに対し、バレルシフト回路2を構成す
るためには(2”−n−1)個のセレクタが必要となる
。両者の比率を較べると、例えばn=5のとき、24:
4.n=4のとき、64:11. n=5のとき1(5
0:26となり、バレルシフト回路2の追加による部品
の増加は少ない。
Generally, if one word is 2n bits, n x 2" selectors are required to configure the barrel shift circuit 1. On the other hand, to configure the barrel shift circuit 2, (2" - n-1) selectors are required. Comparing the ratio between the two, for example, when n=5, it is 24:
4. When n=4, 64:11. When n=5, 1(5
0:26, so there is little increase in the number of parts due to the addition of the barrel shift circuit 2.

第2図は本発明の他の実施例を示すブロック図である。FIG. 2 is a block diagram showing another embodiment of the invention.

第2図中、第1内と同一の回路部分には同一番号を付し
である。第2図において、4はバレルシフト回路12に
与える入力ワードを切換える入力切換回路、40〜42
は入力切換え回路4を構成するセレクタである。第2図
において、バレルシフト回路12及びデコーダ30回路
動作は、第1図実施例と全く同一である。入力切換回路
4はバレルシフト回路1.2に与える2ワードの入力ワ
ードの一方に対して、第1または第2の入力ワードを切
換えて供給する。入力切換回路4が第2の入力ワードを
選択し、出力端子Yに接続している場合には、第2図実
施例の回路動作は全体として第1図実施例と全く同一に
なる。入力切換回路4が第1の入力ワードを選択してい
る場合には、バレルシフト回路t2に入力される27−
ドのデータは双方とも第1の入力ワードとなる。この結
果、バレルシフト回路1のシフト動作によって生じる空
きビットには、バレルシフト回路2によって、第1の入
力ワードからあふれ出したビットが補われ、出力ワード
は第1の入力ワードをローティトしたものとなる。以上
に述べたように、第2図実施例では、第1.第2の入力
ワード忙またがるシフト処理に加え、第1の入力ワード
内でのローティト処理を行うことができる。
In FIG. 2, the same circuit parts as in FIG. 1 are given the same numbers. In FIG. 2, reference numeral 4 denotes an input switching circuit 40 to 42 for switching the input word to be applied to the barrel shift circuit 12.
is a selector forming the input switching circuit 4. In FIG. 2, the circuit operations of barrel shift circuit 12 and decoder 30 are exactly the same as in the embodiment of FIG. The input switching circuit 4 switches and supplies the first or second input word to one of the two input words applied to the barrel shift circuit 1.2. When the input switching circuit 4 selects the second input word and connects it to the output terminal Y, the circuit operation of the embodiment of FIG. 2 is completely the same as the embodiment of FIG. 1 as a whole. When the input switching circuit 4 selects the first input word, 27- input to the barrel shift circuit t2
The data of both words become the first input word. As a result, the barrel shift circuit 2 fills in the empty bits generated by the shift operation of the barrel shift circuit 1 with the bits overflowing from the first input word, and the output word becomes the rotated first input word. Become. As described above, in the embodiment of FIG. In addition to shifting across the second input word, rotation within the first input word can be performed.

第2図実施例では、セレクタ14〜17及び200Å力
端子B(IIに入力切換回路4を接続しているが、入力
切換回路4を入力端子A側に接続しても同様の効果が得
られることは明らかである。また、入力端子A、Bの双
方に対して、入力切換回路を設けると、第1.第2の入
力ワードの隣接関係を切り換えて使用することができる
In the embodiment shown in FIG. 2, the input switching circuit 4 is connected to the selectors 14 to 17 and the 200 Å power terminal B (II), but the same effect can be obtained by connecting the input switching circuit 4 to the input terminal A side. Furthermore, if an input switching circuit is provided for both input terminals A and B, the adjacency relationship between the first and second input words can be switched and used.

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

以上に述べたように1本発明によれば、2ワードKまた
がって入力データをビット単位にシフト  ゛し、任意
のビット位置から始まる1ワ一ド分のビット列を抽出す
ることができるので、ビットマツプメモリ上の図形デー
タを高速・効率的に複写・移動することができるという
効果がある。また、本発明を実施するために必要となる
回路規模の増加は少な(、安価に実施することができる
。特に本発明は単一の素子の集積により実現できるため
、LSI化にも好適であり、−層の回路規模の削減、経
費の低減を図ることができる。
As described above, according to the present invention, it is possible to shift input data bit by bit across two words K and extract a bit string for one word starting from an arbitrary bit position. The effect is that graphic data on the map memory can be copied and moved quickly and efficiently. In addition, the increase in circuit scale required to implement the present invention is small (and can be implemented at low cost. In particular, the present invention can be realized by integrating a single element, so it is suitable for LSI implementation. , - layer circuit scale and costs can be reduced.

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

第1図は本発明の一笑確例を示すブロック図、第2図は
本発明の他の実施例を示すブロック図である。 1・・・バレルシフト回路、2・・・バレルシフドロ路
、3・・・デコーダ、4・・・入力切換回路。 晃l 圀 晃/A入力フード          名2(71入カ
ワード晃20
FIG. 1 is a block diagram showing a simple example of the present invention, and FIG. 2 is a block diagram showing another embodiment of the present invention. 1... Barrel shift circuit, 2... Barrel shift draw path, 3... Decoder, 4... Input switching circuit. Akira Kuni/A input hood name 2 (71 pieces Coward Akira 20

Claims (1)

【特許請求の範囲】 1、所定の重み付けを持つ2値論理信号を入力とし、こ
れを各信号の重み付けに従って、左、または右に指定ビ
ット数シフトして出力するバレルシフト回路において、
出力する1語分の論理信号のビット数に対して、第1語
及び第2語の論理信号を同時に入力し、前記第1語の論
理信号を左、または右にシフトする際に生ずる空きビッ
トに対して、前記第2語の論理信号を前記第1語のシフ
トと同方向にシフトする際にあふれ出すビット信号を補
って1語分のシフト出力とすることを特徴とするバレル
シフト回路。 2、前記第1語、第2語の論理信号を入力する端子の少
なくとも一方に選択回路を設け、前記選択回路は前記第
1語及び第2語の論理信号を入力し、第1語、或いは第
2語の論理信号を切り換えて前記バレルシフト回路の入
力信号とするように構成したことを特徴とする特許請求
の範囲第1項記載のバレルシフト回路。
[Claims] 1. A barrel shift circuit that receives a binary logic signal with predetermined weighting, shifts it left or right by a specified number of bits according to the weighting of each signal, and outputs the shifted signal,
Empty bits that occur when inputting the first and second word logic signals simultaneously and shifting the first word logic signal to the left or right, relative to the number of bits of the logic signal for one word to be output In contrast, the barrel shift circuit is characterized in that the bit signal that overflows when the logic signal of the second word is shifted in the same direction as the shift of the first word is compensated for to provide a shift output for one word. 2. A selection circuit is provided in at least one of the terminals for inputting the logic signals of the first word and the second word, and the selection circuit inputs the logic signals of the first word and the second word, and the selection circuit inputs the logic signals of the first word and the second word. 2. The barrel shift circuit according to claim 1, wherein the logic signal of the second word is switched and used as an input signal of the barrel shift circuit.
JP61267552A 1986-11-12 1986-11-12 Barrel shift circuit Pending JPS63121922A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61267552A JPS63121922A (en) 1986-11-12 1986-11-12 Barrel shift circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61267552A JPS63121922A (en) 1986-11-12 1986-11-12 Barrel shift circuit

Publications (1)

Publication Number Publication Date
JPS63121922A true JPS63121922A (en) 1988-05-26

Family

ID=17446398

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61267552A Pending JPS63121922A (en) 1986-11-12 1986-11-12 Barrel shift circuit

Country Status (1)

Country Link
JP (1) JPS63121922A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59195741A (en) * 1983-04-22 1984-11-06 Nec Corp Shifter circuit
JPS60153543A (en) * 1984-01-23 1985-08-13 Hitachi Ltd Barrel shifter
JPS61234428A (en) * 1985-04-10 1986-10-18 Matsushita Electric Ind Co Ltd Data shift circuit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59195741A (en) * 1983-04-22 1984-11-06 Nec Corp Shifter circuit
JPS60153543A (en) * 1984-01-23 1985-08-13 Hitachi Ltd Barrel shifter
JPS61234428A (en) * 1985-04-10 1986-10-18 Matsushita Electric Ind Co Ltd Data shift circuit

Similar Documents

Publication Publication Date Title
EP0047440B1 (en) Shift circuit
CA1099029A (en) Triport memory apparatus
US4309755A (en) Computer input/output arrangement for enabling a simultaneous read/write data transfer
US4653019A (en) High speed barrel shifter
US4383304A (en) Programmable bit shift circuit
US4122534A (en) Parallel bidirectional shifter
JPH05134848A (en) Data shift circuit for central processing unit
EP0198341B1 (en) Digital data processing circuit having a bit reverse function
CA1207916A (en) Cmos multiport general purpose register
US5729482A (en) Microprocessor shifter using rotation and masking operations
JP2549601B2 (en) Register control circuit
US5010509A (en) Accumulator for complex numbers
US5577215A (en) Data transmission circuit for digital signal processor chip and method therefor
JPS63121922A (en) Barrel shift circuit
CA1076708A (en) Parallel bidirectional shifter
EP0234187B1 (en) Programmably controlled shifting mechanism in a programmable unit having variable data path widths
EP0114683B1 (en) Arithmetic unit
JPH03504292A (en) Bit blinker with narrow shift register
JP2679820B2 (en) Bit reversing device
JP2969825B2 (en) Dual port memory
EP0012016A1 (en) Memory access control
JPH05250497A (en) Device for selecting input/output function of microcomputer
JP2679996B2 (en) Communication control system
KR940004265Y1 (en) Control circuit for video memory writing
JPH01178198A (en) Memory integrated circuit