JPH0736150B2 - Barrel shift circuit - Google Patents

Barrel shift circuit

Info

Publication number
JPH0736150B2
JPH0736150B2 JP60017488A JP1748885A JPH0736150B2 JP H0736150 B2 JPH0736150 B2 JP H0736150B2 JP 60017488 A JP60017488 A JP 60017488A JP 1748885 A JP1748885 A JP 1748885A JP H0736150 B2 JPH0736150 B2 JP H0736150B2
Authority
JP
Japan
Prior art keywords
line
shifter
circuit
shift
bit
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.)
Expired - Lifetime
Application number
JP60017488A
Other languages
Japanese (ja)
Other versions
JPS61175819A (en
Inventor
多加志 堀田
英雄 前島
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 JP60017488A priority Critical patent/JPH0736150B2/en
Publication of JPS61175819A publication Critical patent/JPS61175819A/en
Publication of JPH0736150B2 publication Critical patent/JPH0736150B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明はマイクロコンピュータの演算回路に係り、特に
複数のデータ長を有するオペランドのシフト、回転操作
に好適なバレルシフト回路に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic circuit of a microcomputer, and more particularly to a barrel shift circuit suitable for shifting and rotating an operand having a plurality of data lengths.

〔発明の背景〕[Background of the Invention]

従来よりマイクロコンピュータにより汎用的に実行され
る命令には、第9図に示す如く、算術的右シフト,算術
的左シフト,論理的右シフト,論理的左シフト,右回
転,左回転,フラグを含む右回転,フラグを含む左回転
等の桁移動命令がある。この桁移動命令を実行する従来
のマイクロコンピュータの演算部は第16図に示す如きブ
ロック図の構成を有している。図において、201がレジ
スタ,202が算術論理演算ユニット(ALU),203が桁移動
命令を実行するためのシフタ,204,205,206はレジスタ20
1とALU202を接続するためのシステムバスである。この
レジスタ201内のデータは、システムバス204,205を経て
算術論理演算ユニットALU202で演算され、システムバス
206を経てレジスタ201に格納される。また、算術論理演
算ユニットALU202の後段に設けられたシフタ203は、従
来、右1ビットシフト、左1ビットシフトするといった
小規模のものであった。したがって、Nビットの桁移動
命令は、従来、1ビットシフトをN回繰り返すことによ
って実行していた。このため、Nビット桁移動を実行す
るのに時間を要し、演算速度が遅いという欠点を有して
いた。
As shown in FIG. 9, an instruction which is generally executed by a microcomputer in the past includes an arithmetic right shift, an arithmetic left shift, a logical right shift, a logical left shift, a right rotation, a left rotation, and a flag. There are digit movement instructions such as right rotation including and left rotation including flag. The arithmetic unit of the conventional microcomputer that executes this digit shift instruction has the configuration of the block diagram shown in FIG. In the figure, 201 is a register, 202 is an arithmetic and logic unit (ALU), 203 is a shifter for executing a digit shift instruction, and 204, 205 and 206 are registers 20.
This is a system bus for connecting 1 and ALU202. The data in the register 201 is operated by the arithmetic logic operation unit ALU202 via the system buses 204 and 205,
It is stored in the register 201 via 206. Further, the shifter 203 provided in the subsequent stage of the arithmetic logic operation unit ALU202 has conventionally been a small-sized one that shifts right 1 bit and left 1 bit. Therefore, the N-bit digit shift instruction is conventionally executed by repeating the 1-bit shift N times. Therefore, it takes a long time to execute the N-bit digit shift and has a drawback that the operation speed is slow.

そこで、桁移動命令を高速に実行するため、第17図に示
す如き、桁移動演算ユニットを設けたものが考えられて
いる。図において、303は、システムバス204よりデータ
を取り込む回路、304はバレルシフト回路、305は桁移動
されたデータをシステムバス206に出力するための回路
である。この桁移動回路としては、第18図に示す如き構
成を有している(CARVER MEADと、LYNN CONWAY著の「IN
TRODUCTION TO VLSI SYSTEMS」の第159頁に示されてい
る)。図において、601a〜601dは入力線、602a〜602dは
出力線、603a〜603dは制御線である。図で、入力線601a
〜601dより入ったデータは制御線603a〜603dのいずれか
によって選ばれたMOS(Metal Oxide Semiconductor)ト
ランジスタを通して出力線602a〜602dに出力される。こ
の従来の第18図図示回路は論理的シフトを高速に演算す
ることはできるが、回転を行うことができないという欠
点を有している。
Therefore, in order to execute the digit shift instruction at high speed, a digit shift arithmetic unit as shown in FIG. 17 is provided. In the figure, 303 is a circuit for fetching data from the system bus 204, 304 is a barrel shift circuit, and 305 is a circuit for outputting digit-shifted data to the system bus 206. This digit shift circuit has a configuration as shown in FIG. 18 (CARVER MEAD and “IN IN” by LYNN CONWAY).
TRODUCTION TO VLSI SYSTEMS ", page 159). In the figure, 601a to 601d are input lines, 602a to 602d are output lines, and 603a to 603d are control lines. In the figure, input line 601a
The data input from ˜601d are output to the output lines 602a to 602d through MOS (Metal Oxide Semiconductor) transistors selected by any of the control lines 603a to 603d. This conventional circuit shown in FIG. 18 has a drawback that it can perform logical shift at high speed, but cannot perform rotation.

〔発明の目的〕[Object of the Invention]

本発明の目的は、所定のデータ長のデータに対して個々
に回転等の桁移動命令を高速に実行することができるバ
レルシフト回路を提供することにある。
An object of the present invention is to provide a barrel shift circuit that can individually execute a digit movement instruction such as rotation for data having a predetermined data length.

〔発明の概要〕[Outline of Invention]

本発明は、入力データの桁移動量を決定する第1の制御
線と入力データの桁移動がシフトか回転かを決定する第
2の制御線とを備え、nビットの入力データを所定ビッ
ト同時にシフトまたは回転するバレルシフト回路におい
て、入力されるnビットのデータを所定ビット、シフト
する第1のシフタと、入力されるnビットのデータを所
定ビット、シフトする第2のシフタと、前記第1のシフ
タと第2のシフタとの間に設けられ入力データのデータ
長を可変にする回路接続手段とを有し、該回路接続手段
は、それぞれ前記第1のシフタの一対の斜め線及び折り
返し線と前記第2のシフタの一対の斜め線及び折り返し
線との間の接続を行なう複数のスイッチ回路と、該複数
のスイッチ回路の動作状態を制御する第3の制御線とか
らなり、前記複数の各スイッチ回路は、第3の制御線の
信号レベルに応じて前記第1のシフタの一対の斜め線及
び折り返し線及び前記第2のシフタの一対の斜め線及び
折り返し線のうち第1のシフタの斜め線と第2のシフタ
の斜め線とを接続し、かつ第1のシフタの折り返し線と
第2のシフタの折り返し線とを接続するか、または第1
のシフタの一対の斜め線と折り返し線とを接続し、かつ
第2のシフタの一対の斜め線と折り返し線とを接続する
ように制御されることを特徴とするものである。
The present invention comprises a first control line for determining the digit shift amount of input data and a second control line for determining whether the digit shift of the input data is shift or rotation, and the n-bit input data is simultaneously determined by a predetermined number of bits. In a barrel shift circuit that shifts or rotates, a first shifter that shifts input n-bit data by a predetermined number of bits, a second shifter that shifts input n-bit data by a predetermined number of bits, and the first shifter. Circuit connecting means provided between the shifter and the second shifter for varying the data length of the input data, and the circuit connecting means respectively comprises a pair of diagonal lines and folded lines of the first shifter. And a plurality of switch circuits for connecting between the pair of diagonal lines and the folded line of the second shifter, and a third control line for controlling the operating state of the plurality of switch circuits. Each switch circuit has a pair of diagonal lines and a folding line of the first shifter and a pair of diagonal lines and a folding line of the second shifter, which corresponds to the first shifter of the first shifter according to the signal level of the third control line. The diagonal line is connected to the diagonal line of the second shifter, and the folded line of the first shifter is connected to the folded line of the second shifter, or
The shifter is controlled so as to connect the pair of diagonal lines and the turn-back line, and to connect the pair of diagonal lines and the turn-back line of the second shifter.

〔発明の実施例〕Example of Invention

以下、本発明に係るバレルシフト回路の実施例を図面を
参照して説明する。本発明に係るバレルシフト回路の動
作を第2図を用いて説明する。
Hereinafter, embodiments of the barrel shift circuit according to the present invention will be described with reference to the drawings. The operation of the barrel shift circuit according to the present invention will be described with reference to FIG.

同図において401a〜401dは入力線,402a〜402dは出力線,
42a〜42d,43a〜43d,44a〜44d,45a〜45d,46a〜46dは入力
線と出力線を接続するスイッチである(各数字の添字a
の付いたビットが下位、dのついたビットが上位であ
る)。また、403〜407はスイッチの開閉を制御する制御
線である。415〜418は入力線と接続された斜め線であ
る。また、411〜414は入力線と接続されていない斜め線
である。第2図図示の状態は制御線406に接続されたス
イッチ45a〜45dが閉じている状態を示している。この状
態で、いま、入力線にa0,a1,a2,a3という4ビットのデ
ータを入力したとする。例えば、入力線401bに入力され
たデータは斜め線417,スイッチ45Cを介して出力線402c
から出力される。同様にして入力線401aから入力される
データは出力線402bに、また、入力線401cから入力され
るデータは出力線402dから出力される。また、出力線40
2aには、入力線401a〜401dのいずれとも接続されていな
い斜め線411が接続されている。いま、斜め線411を論理
「0」に対応する電圧にしておけば、出力線402aから出
力される値は「0」となる。すなわち、出力線402a,402
b,402c,402dに、「0」,「a0」,「a1」,「a2」とい
うデータが出力され、1ビットの論理的左シフトが行わ
れる。同様に、他のスイッチを閉じることにより、左2
ビット,左1ビット,左0ビット,右1ビット,右0ビ
ットの論理的シフトが1回で演算できる。また、第2図
は、データ長4ビットでシフト量が左右2ビットの例で
あるが、データ長,シフト量を増やすことは同一スイッ
チセルを増やすことによって容易に実現することができ
る。
In the figure, 401a to 401d are input lines, 402a to 402d are output lines,
42a to 42d, 43a to 43d, 44a to 44d, 45a to 45d, 46a to 46d are switches for connecting the input line and the output line (subscript a of each numeral a
Bits marked with are lower, bits marked with d are higher). Further, 403 to 407 are control lines for controlling the opening and closing of the switches. 415 to 418 are diagonal lines connected to the input line. Further, 411 to 414 are diagonal lines that are not connected to the input line. The state shown in FIG. 2 shows that the switches 45a to 45d connected to the control line 406 are closed. In this state, it is assumed that 4-bit data of a 0 , a 1 , a 2 , a 3 is input to the input line. For example, the data input to the input line 401b is output to the output line 402c via the diagonal line 417 and the switch 45C.
Is output from. Similarly, data input from the input line 401a is output to the output line 402b, and data input from the input line 401c is output from the output line 402d. Also, output line 40
A diagonal line 411 that is not connected to any of the input lines 401a to 401d is connected to 2a. If the diagonal line 411 is set to the voltage corresponding to the logic "0", the value output from the output line 402a will be "0". That is, the output lines 402a, 402
Data of “0”, “a 0 ”, “a 1 ”, and “a 2 ” are output to b, 402c, and 402d, and 1-bit logical left shift is performed. Similarly, by closing the other switches, the left 2
Logical shift of bit, left 1 bit, left 0 bit, right 1 bit, right 0 bit can be calculated at one time. Further, FIG. 2 shows an example in which the data length is 4 bits and the shift amount is 2 bits on the left and right. However, increasing the data length and the shift amount can be easily realized by increasing the same switch cell.

第3図には第2図図示スイッチ42a〜42d,43a〜43d,44a
〜44d,45a〜45d,46a〜46dをN型MOSトランジスタによっ
て構成したバレルシフト回路が示されている。図におい
て403,404,405,406,407は制御線,401a〜401dは入力線,4
02a〜402dは出力線である。また、第3図の204a〜204d,
206a〜206dは第2図におけるシステムバスである。この
第3図図示回路は、論理的左右シフトを行う回路であ
る。
FIG. 3 shows the switches 42a to 42d, 43a to 43d, 44a shown in FIG.
~ 44d, 45a ~ 45d, 46a ~ 46d is a barrel shift circuit constituted by N-type MOS transistors. In the figure, 403, 404, 405, 406 and 407 are control lines, 401a to 401d are input lines, 4
02a to 402d are output lines. In addition, 204a to 204d of FIG.
206a to 206d are system buses in FIG. The circuit shown in FIG. 3 is a circuit for logically shifting left and right.

第4図は、入力データの左右回転を行うバレルシフト回
路が示されている。回路構成は第3図図示バレルシフト
回路とほぼ同じであるが、第4図図示バレルシフト回路
には折り返し線702〜705が付け加えられている点で第3
図図示バレルシフト回路とは異なっている。すなわち、
第3図図示バレルシフト回路においては入力線と接続さ
れていなかった斜め線504が折り返し線705により、斜め
線507を経て入力線401cと接続されている。同様にして
折り返し線704,702,703によって斜め線503,501,502がそ
れぞれ入力線401d,401b,401aに接続されている。第4図
において、いま、例えば、入力線に下位より「a0」,
「a1」,「a2」,「a3」を入力し、制御線のうち406の
みを高レベルにすれば、出力線402a,402b,402c,402dに
「a3」,「a0」,「a1」,「a2」が出力される。このよ
うに1ビットの左回転が演算される。同様にしてこの第
4図図示バレルシフト回路によれば、左右2ビットまで
の回転演算を行うことができる。しかし、論理的シフト
はできない。
FIG. 4 shows a barrel shift circuit that rotates the input data left and right. The circuit configuration is almost the same as that of the barrel shift circuit shown in FIG. 3, but is different from the barrel shift circuit shown in FIG. 4 in that folding lines 702 to 705 are added.
This is different from the barrel shift circuit shown in the figure. That is,
In the barrel shift circuit shown in FIG. 3, the diagonal line 504, which is not connected to the input line, is connected to the input line 401c by the folded line 705 via the diagonal line 507. Similarly, diagonal lines 503, 501, 502 are connected to input lines 401d, 401b, 401a by folding lines 704, 702, 703, respectively. Referring now to FIG. 4, for example, in the input line, "a 0 ",
By inputting “a 1 ”, “a 2 ”, and “a 3 ”, and setting only 406 of the control lines to the high level, “a 3 ”, “a 0 ” is output to the output lines 402a, 402b, 402c, 402d. , “A 1 ”, “a 2 ” are output. In this way, 1-bit left rotation is calculated. Similarly, according to the barrel shift circuit shown in FIG. 4, it is possible to perform a rotation operation up to two bits on the left and right. However, no logical shift is possible.

第5図には、論理的シフトと回転の両命令を演算するこ
とができるバレルシフト回路が示されている。回路構成
は第4図図示バレルシフト回路とほぼ同じであるが、第
5図図示バレルシフト回路には折り返し線の斜め線との
間にMOSトランジスタ803〜806が設けられており、このM
OSトランジスタ803〜806のオン・オフを制御する制御線
801が付け加えられており、この点が第5図図示バレル
シフト回路と異なっている。この第5図図示バレルシフ
ト回路において制御線801を低レベルにして、MOSトラン
ジスタ803,804,805,806をオフすれば、論理的左右シフ
ト命令を演算することができる。また、制御線801を高
レベルにして、MOSトランジスタ803,804,805,806をオン
すれば、回転命令を演算することができる。
FIG. 5 shows a barrel shift circuit capable of operating both logical shift and rotate instructions. The circuit configuration is almost the same as that of the barrel shift circuit shown in FIG. 4, but the barrel shift circuit shown in FIG. 5 is provided with MOS transistors 803 to 806 between the diagonal lines of the folded lines.
Control line for controlling on / off of OS transistors 803-806
801 is added, which is different from the barrel shift circuit shown in FIG. In the barrel shift circuit shown in FIG. 5, if the control line 801 is set to low level and the MOS transistors 803, 804, 805, 806 are turned off, a logical left / right shift instruction can be calculated. If the control line 801 is set to high level and the MOS transistors 803, 804, 805, 806 are turned on, the rotation command can be calculated.

第5図図示バレルシフト回路は、4ビット長のデータを
回転する機能を有している。また、第1図図示バレルシ
フト回路は、4ビット及び8ビットデータを回転する機
能を持つバレルシフト回路である。全体は4ビットバレ
ルシフト回路109と4ビットバレルシフト回路110とより
なる。このバレルシフト回路109の回路構成は第5図図
示バレルシフト回路と全く同じである。また、バレルシ
フト回路110の回路構成も第5図図示バレルシフト回路
とほぼ同じである。第1図図示バレルシフト回路は、上
位4ビットと下位4ビットを接続するための回路105〜1
08が付加されている。この接続回路105〜108の回路構成
は第6図に示されている。第6図において、901と902
は、それぞれ上部に接続されるバレルシフト回路109の
斜め線と折り返し線である。また、図中903,904はそれ
ぞれ下部に接続されるバレルシフト回路110の斜め線と
折り返し線である。また、第6図中905,906はMOSトラン
ジスタ907〜910を制御する制御線であり、第1図におけ
る制御線102,103に相当する。
The barrel shift circuit shown in FIG. 5 has a function of rotating 4-bit data. The barrel shift circuit shown in FIG. 1 is a barrel shift circuit having a function of rotating 4-bit data and 8-bit data. The whole is composed of a 4-bit barrel shift circuit 109 and a 4-bit barrel shift circuit 110. The circuit configuration of the barrel shift circuit 109 is exactly the same as that of the barrel shift circuit shown in FIG. Further, the circuit configuration of the barrel shift circuit 110 is almost the same as that of the barrel shift circuit shown in FIG. The barrel shift circuit shown in FIG. 1 is a circuit for connecting upper 4 bits and lower 4 bits 105 to 1
08 is added. The circuit configuration of the connection circuits 105 to 108 is shown in FIG. In FIG. 6, 901 and 902
Are a diagonal line and a folded line of the barrel shift circuit 109 which are respectively connected to the upper part. In addition, reference numerals 903 and 904 in the figure respectively denote an oblique line and a folded line of the barrel shift circuit 110 connected to the lower part. Further, 905 and 906 in FIG. 6 are control lines for controlling the MOS transistors 907 to 910 and correspond to the control lines 102 and 103 in FIG.

この第6図図示バレルシフト回路中の制御線905を低レ
ベル、制御線906を高レベルとした時の各線の接続状態
が第7図に示されている。この第7図の状態では第6図
図示上部の斜め線901と折り返し線902,及び下部の斜め
線903と折り返し線904とが、それぞれ接続される。ま
た、MOSトランジスタ908とMOSトランジスタ909がオフに
なるので、上部の回路と下部の回路が分離される。
FIG. 7 shows the connection state of each line when the control line 905 in the barrel shift circuit shown in FIG. 6 is set to low level and the control line 906 is set to high level. In the state of FIG. 7, the diagonal line 901 and the folded line 902 in the upper part of FIG. 6 are connected, and the diagonal line 903 and the folded line 904 in the lower part are connected to each other. Further, since the MOS transistors 908 and 909 are turned off, the upper circuit and the lower circuit are separated.

また、更に制御線905を高レベル、制御線906を低レベル
とした時の各線の接続状態が第8図に示されている。こ
の場合には、上部の斜め線901と下部の斜め線903,及
び、上部の折り返し線902と下部の折り返し線904が、そ
れぞれ接続される。また、MOSトランジスタ907,MOSトラ
ンジスタ910がオフされ、上部のバレルシフト回路109と
下部のバレルシフト回路110が接続される。
Further, FIG. 8 shows the connection state of each line when the control line 905 is set to the high level and the control line 906 is set to the low level. In this case, the upper diagonal line 901 and the lower diagonal line 903, and the upper folding line 902 and the lower folding line 904 are connected, respectively. Further, the MOS transistors 907 and 910 are turned off, and the upper barrel shift circuit 109 and the lower barrel shift circuit 110 are connected.

以上の説明より第1図図示バレルシフト回路の動作を説
明すると、第1図の制御線101を高レベルにして、制御
線102を高レベル、制御線103を低レベルに設定すれば、
8ビットデータの回転命令が演算できる。一方、制御線
101を高レベルにして制御線102を低レベル、制御線103
を高レベルにすれば、上位4ビットデータと、下位4ビ
ットデータをそれぞれ独立に回転することができる。同
様に制御線101を低レベルにすれば、8ビットデータ,4
ビットデータの論理的シフト命令を演算することができ
る。
The operation of the barrel shift circuit shown in FIG. 1 will be described from the above description. If the control line 101 in FIG. 1 is set to high level, the control line 102 is set to high level, and the control line 103 is set to low level,
A rotation instruction of 8-bit data can be calculated. Meanwhile, the control line
101 is high level, control line 102 is low level, control line 103
Is set to a high level, the upper 4-bit data and the lower 4-bit data can be independently rotated. Similarly, if the control line 101 is set to low level, 8-bit data, 4
A logical shift instruction of bit data can be calculated.

このように、本実施例によれば、入力データの桁移動量
を決定する第1の制御線と入力データの桁移動がシフト
か回転かを決定する第2の制御線とを備え、nビットの
入力データを所定ビット同時にシフトあるいは回転する
バレルシフト回路において、入力データのデータ長を可
変にする回路接続手段を第1のシフタと第2のシフタと
の間に設けることにより、所定のデータ長のデータに対
して個々に回転等の桁移動命令を高速に実行できる。
As described above, according to the present embodiment, the first control line for determining the digit shift amount of the input data and the second control line for determining whether the digit shift of the input data is shift or rotation are provided, and n bits are included. In the barrel shift circuit that simultaneously shifts or rotates the input data of a predetermined number of bits, by providing a circuit connecting means for varying the data length of the input data between the first shifter and the second shifter, a predetermined data length is obtained. It is possible to individually execute a digit movement command such as rotation for the above data at high speed.

第10図には、本発明に係るバレルシフト回路の一実施例
の構成が示されている。
FIG. 10 shows the configuration of an embodiment of the barrel shift circuit according to the present invention.

図において、1332〜1336はシフト量を制御する制御線で
ある。また、C0〜C6はバレルシフタの機能を制御する制
御線である。また、1300の部分を第13図に示す。また、
第10図図示1308,1316の部分は第11図に示されている。
また、第10図図示1331の部分は、第14図に示されてい
る。残りの1301〜1307,1309〜1315,1317〜1330の部分は
第12図に示されている。
In the figure, 1332 to 1336 are control lines for controlling the shift amount. Further, C0 to C6 are control lines for controlling the function of the barrel shifter. Further, the portion of 1300 is shown in FIG. Also,
The portion of 1308 and 1316 shown in FIG. 10 is shown in FIG.
The portion 1331 shown in FIG. 10 is shown in FIG. The remaining portions 1301 to 1307, 1309 to 1315, 1317 to 1330 are shown in FIG.

第12図,第14図の回路の動作は第3図,第4図,第5図
の説明より明らかである。第11図の回路は、上部のバレ
ルシフト回路と、下部のバレルシフト回路の接続を制御
する回路である。8ビット及び16ビットデータの回転は
下位のみで行なえばよいので、第6図に示した4つの接
続用MOSトランジスタのうち2つを省略することができ
る。
The operation of the circuits shown in FIGS. 12 and 14 is clear from the description of FIGS. 3, 4, and 5. The circuit in FIG. 11 is a circuit for controlling the connection between the barrel shift circuit on the upper side and the barrel shift circuit on the lower side. Since 8-bit and 16-bit data can be rotated only in the lower order, two of the four connection MOS transistors shown in FIG. 6 can be omitted.

第13図で、1605はフラグからの入力線、1606は、フラグ
への出力線である。また、MOSトランジスタ1612〜1623
は、回転にフラグを含むか含まないかを制御するための
ものである。
In FIG. 13, 1605 is an input line from the flag, and 1606 is an output line to the flag. Also, MOS transistors 1612 to 1623
Is for controlling whether or not the rotation includes a flag.

これらの実施例の動作を説明したのが第9図である。8
ビット,16ビット,32ビット長のデータに対して、それぞ
れ算術的左右シフト,論理的左右シフト,左右回転,フ
ラグを含む左右回転を行う。ただし、8ビット演算は上
位8ビットについてのみ、16ビット演算は上位16ビット
に対してのみ演算するものとする。またシフト量は左2
ビット,右2ビットの範囲とする。
FIG. 9 illustrates the operation of these embodiments. 8
Performs arithmetic left / right shift, logical left / right shift, left / right rotation, and left / right rotation including flags on bit, 16-bit, and 32-bit length data, respectively. However, 8-bit operation is performed only on the upper 8 bits, and 16-bit operation is performed only on the upper 16 bits. The shift amount is 2 on the left
Bit, right 2 bits.

第15図は、各々の操作を実行する時の制御線の論理をま
とめたものである。ただし、8ビット算術右シフトの演
算前には、補数表示された8ビットデータの正負に伴
い、「0」あるいは「1」を上位ビットに書き込んでお
く必要がある。16ビット算術右シフトについても同様で
ある。また32ビット算術右シフトのためには、制御線C6
により入力線より切り離された斜め線を32ビットデータ
の正負に伴い、「1」あるいは「0」に固定しなくては
ならない。これらについては、詳しく説明しないが容易
に実現することができる操作である。
FIG. 15 summarizes the logic of the control lines when executing each operation. However, before the operation of 8-bit arithmetic right shift, it is necessary to write "0" or "1" in the upper bits according to the sign of the complemented 8-bit data. The same applies to 16-bit arithmetic right shift. Also, for 32-bit arithmetic right shift, control line C6
The diagonal line separated from the input line must be fixed to "1" or "0" depending on whether the 32-bit data is positive or negative. Although these are not described in detail, they are operations that can be easily realized.

したがって、本実施例によれば、高速,多機能という効
果を有する。
Therefore, according to this embodiment, there are advantages of high speed and multi-function.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明によれば、所定データ長のデ
ータに対して論理的シフト、回転、フラグを含む回転等
多様な桁移動操作を全て所定ビット同時にできるので、
高速化,多機能化が図れるという効果がある。
As described above, according to the present invention, various digit shift operations such as logical shift, rotation, rotation including a flag, etc. can be simultaneously performed for data of a predetermined data length by a predetermined number of bits at the same time.
This has the effect of increasing speed and increasing functionality.

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

第1図は本発明のバレルシフト回路を説明するための回
路図、第2図は本発明のバレルシフト回路の動作を説明
するための図、第3図は第2図の動作を説明するための
図、第4図は第2図の動作を説明するための図、第5図
は本発明のバレルシフト回路を示す図、第6図は第1図
図示回路の一部を示す図、第7図,第8図は第6図図示
回路動作を説明する図、第9図は本発明の実施例の動作
を説明する図、第10図は本発明の実施例を示すブロック
図、第11図,第12図,第13図,第14図は第10図図示回路
の一部拡大回路図、第15図は第10図図示実施例の制御線
の論理を示す図、第16図は従来の桁移動命令実行方式を
示すブロック図、第17図はバレルシフト回路を有する桁
移動命令実行方式を示すブロック図、第18図は従来のバ
レルシフト方式を示すブロック図である。 109……下位4ビットバレルシフト回路、 110……上位4ビットバレルシフト回路、 105〜108……接続回路、 101〜103……制御線。
FIG. 1 is a circuit diagram for explaining the barrel shift circuit of the present invention, FIG. 2 is a diagram for explaining the operation of the barrel shift circuit of the present invention, and FIG. 3 is for explaining the operation of FIG. FIG. 4, FIG. 4 is a diagram for explaining the operation of FIG. 2, FIG. 5 is a diagram showing a barrel shift circuit of the present invention, FIG. 6 is a diagram showing a part of the circuit shown in FIG. 7 and 8 are diagrams for explaining the operation of the circuit shown in FIG. 6, FIG. 9 is a diagram for explaining the operation of the embodiment of the present invention, FIG. 10 is a block diagram showing the embodiment of the present invention, and FIG. FIG. 12, FIG. 13, FIG. 13 and FIG. 14 are partially enlarged circuit diagrams of the circuit shown in FIG. 10, FIG. 15 is a diagram showing the logic of the control line of the embodiment shown in FIG. 10, and FIG. FIG. 17 is a block diagram showing a digit shift instruction execution system, FIG. 17 is a block diagram showing a digit shift instruction execution system having a barrel shift circuit, and FIG. 18 is a block diagram showing a conventional barrel shift method. FIG. 109 ... Lower 4 bit barrel shift circuit, 110 ... Higher 4 bit barrel shift circuit, 105-108 ... Connection circuit, 101-103 ... Control line.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】入力データの桁移動量を決定する第1の制
御線と入力データの桁移動がシフトか回転かを決定する
第2の制御線とを備え、nビットの入力データを所定ビ
ット同時にシフトまたは回転するバレルシフト回路にお
いて、 入力されるnビットのデータを所定ビット、シフトする
第1のシフタと、 入力されるnビットのデータを所定ビット、シフトする
第2のシフタと、 前記第1のシフタと第2のシフタとの間に設けられ入力
データのデータ長を可変にする回路接続手段とを有し、 該回路接続手段は、それぞれ前記第1のシフタの一対の
斜め線及び折り返し線と前記第2のシフタの一対の斜め
線及び折り返し線との間の接続を行なう複数のスイッチ
回路と、該複数のスイッチ回路の動作状態を制御する第
3の制御線とからなり、 前記複数の各スイッチ回路は、第3の制御線の信号レベ
ルに応じて前記第1のシフタの一対の斜め線及び折り返
し線及び前記第2のシフタの一対の斜め線及び折り返し
線のうち第1のシフタの斜め線と第2のシフタの斜め線
とを接続し、かつ第1のシフタの折り返し線と第2のシ
フタの折り返し線とを接続するか、または第1のシフタ
の一対の斜め線と折り返し線とを接続し、かつ第2のシ
フタの一対の斜め線と折り返し線とを接続するように制
御されることを特徴とするバレルシフト回路。
1. A first control line for determining a digit shift amount of input data, and a second control line for determining whether a digit shift of input data is a shift or a rotation. In a barrel shift circuit that simultaneously shifts or rotates, a first shifter that shifts input n-bit data by a predetermined number of bits, a second shifter that shifts input n-bit data by a predetermined number of bits, and A circuit connecting means provided between the first shifter and the second shifter for varying the data length of the input data, wherein the circuit connecting means includes a pair of diagonal lines and a folded line of the first shifter. A plurality of switch circuits for connecting between a line and a pair of diagonal lines and a folded line of the second shifter, and a third control line for controlling an operating state of the plurality of switch circuits, Each of the plurality of switch circuits includes a first of the pair of diagonal lines and the folding line of the first shifter and the pair of the diagonal line and the folding line of the second shifter according to the signal level of the third control line. The diagonal line of the shifter and the diagonal line of the second shifter are connected to each other, and the folding line of the first shifter and the folding line of the second shifter are coupled to each other, or the pair of diagonal lines of the first shifter is connected to each other. A barrel shift circuit, which is controlled so as to connect a folding line and a pair of diagonal lines of the second shifter and the folding line.
JP60017488A 1985-01-31 1985-01-31 Barrel shift circuit Expired - Lifetime JPH0736150B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60017488A JPH0736150B2 (en) 1985-01-31 1985-01-31 Barrel shift circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60017488A JPH0736150B2 (en) 1985-01-31 1985-01-31 Barrel shift circuit

Publications (2)

Publication Number Publication Date
JPS61175819A JPS61175819A (en) 1986-08-07
JPH0736150B2 true JPH0736150B2 (en) 1995-04-19

Family

ID=11945384

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60017488A Expired - Lifetime JPH0736150B2 (en) 1985-01-31 1985-01-31 Barrel shift circuit

Country Status (1)

Country Link
JP (1) JPH0736150B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6398729A (en) * 1986-10-15 1988-04-30 Fujitsu Ltd Barrel shifter
CA2007059C (en) * 1989-01-27 1994-05-24 Steven P. Davies Register and arithmetic logic unit
JP2624342B2 (en) * 1989-09-25 1997-06-25 三菱電機株式会社 Barrel shifter
FR2655748B1 (en) * 1989-12-07 1992-01-24 Bull Sa SHIFT CIRCUIT WITH PARITY BIT GENERATOR.

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5991541A (en) * 1982-11-18 1984-05-26 Toshiba Corp Data shifting circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5991541A (en) * 1982-11-18 1984-05-26 Toshiba Corp Data shifting circuit

Also Published As

Publication number Publication date
JPS61175819A (en) 1986-08-07

Similar Documents

Publication Publication Date Title
US4807172A (en) Variable shift-count bidirectional shift control circuit
JPS6351287B2 (en)
KR20080049825A (en) Fast rotator with embeded masking and method therefor
JPH0431411B2 (en)
EP0407177A2 (en) Bit sequence reversing device
US4999808A (en) Dual byte order data processor
JPH0736150B2 (en) Barrel shift circuit
JPS6227412B2 (en)
JPH034936B2 (en)
JPS623461B2 (en)
JP2559868B2 (en) Information processing device
US6122651A (en) Method and apparatus for performing overshifted rotate through carry instructions by shifting in opposite directions
JPH0225921A (en) Barrel shifter
JP2557629B2 (en) Interrupt method
JP2624342B2 (en) Barrel shifter
US5018092A (en) Stack-type arithmetic circuit
JP2922963B2 (en) Sequence controller
US5495433A (en) Data processing circuit
JPH0991118A (en) Floating point arithmetic unit
JPH04100150A (en) Register circuit
JPH0588887A (en) Data processor
JP3221003B2 (en) I / O port
JP2503017B2 (en) Barrel shifter circuit
JP3057749B2 (en) I / O port
JPH09292974A (en) Microprocessor

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term