JP2506759B2 - Shifter circuit - Google Patents
Shifter circuitInfo
- Publication number
- JP2506759B2 JP2506759B2 JP62114125A JP11412587A JP2506759B2 JP 2506759 B2 JP2506759 B2 JP 2506759B2 JP 62114125 A JP62114125 A JP 62114125A JP 11412587 A JP11412587 A JP 11412587A JP 2506759 B2 JP2506759 B2 JP 2506759B2
- Authority
- JP
- Japan
- Prior art keywords
- shift
- bits
- bit
- barrel shifter
- shifter
- 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 - Fee Related
Links
- 238000006243 chemical reaction Methods 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 14
- 238000002789 length control Methods 0.000 description 5
Description
【発明の詳細な説明】 産業上の利用分野 本発明はディジタル計算機の中央処理装置等に用いら
れるシフタ回路に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shifter circuit used in a central processing unit of a digital computer or the like.
従来の技術 従来のシフタ回路としては、例えば米国特許第3,274,
556号に示されている。As a conventional shifter circuit, for example, U.S. Pat.
It is shown in issue 556.
第6図は従来のシフタ回路の入出力を表わすブロック
図であり、2は64ビットの入出力を有するバレルシフ
タ、5は64ビットの入力データバス、7は64ビットの出
力データバス、9はバレルシフタ2で実行するシフト数
を表わす7ビットのシフト数制御線、10はバレルシフタ
2の動作を指定する2ビットのシフト制御線、12はキャ
リ出力線である。第7図はバレルシフタ2の入出力関係
を示す図であり、入力データをA63〜A0、シフト数をS6
〜S0、シフト制御をC1〜C0としたときの出力データY63
〜Y0とキャリCRを図示したものである。シフト数はS6〜
S0によって7ビットの符号つき数で表わされ、正のとき
は63ビットまで左シフトまたは左ローテート、負のとき
は64ビットまでの右シフトまたは右ローテートを意味す
る。また、シフト動作はC1とC0によって指定され、C1=
0からC0=0のときは算術シフト(右シフト時のシフト
インビットが符号ビット)、C1=0かつC0=1のときは
論理シフト(右シフト時のシフトインビットが0)、C1
=1のとき(C0は無関係)はローテートとして動作す
る。FIG. 6 is a block diagram showing the input / output of a conventional shifter circuit. 2 is a barrel shifter having 64-bit input / output, 5 is a 64-bit input data bus, 7 is a 64-bit output data bus, and 9 is a barrel shifter. A 7-bit shift number control line representing the number of shifts to be executed by 2, 10 is a 2-bit shift control line that specifies the operation of the barrel shifter 2, and 12 is a carry output line. FIG. 7 is a diagram showing the input / output relationship of the barrel shifter 2, where the input data is A 63 to A 0 and the shift number is S 6
To S 0 , output data when shift control is C 1 to C 0 Y 63
~ Y 0 and carry CR are illustrated. Number of shifts is S 6 ~
It is represented by a signed number of 7 bits by S 0. When positive, it means left shift or left rotate up to 63 bits, and when negative, it means right shift or right rotate up to 64 bits. Also, the shift operation is specified by C 1 and C 0 , and C 1 =
Arithmetic shift (shift in bit at right shift is sign bit) when 0 to C 0 = 0, logical shift (shift in bit at right shift is 0) when C 1 = 0 and C 0 = 1, C 1
When = 1 (C 0 is irrelevant), it operates as rotate.
以上のように構成された従来のシフタ回路において
は、入力データバス5を通して入力データを、シフト数
制御線9を通してシフト数をバレルシフタ2に与え、同
時にシフト制御線10を通してバレルシフタ2の動作を指
定することにより所望の出力データとキャリを出力デー
タバス7とキャリ出力線12から得るものである。In the conventional shifter circuit configured as described above, the input data is supplied to the barrel shifter 2 via the input data bus 5 and the shift number is supplied to the barrel shifter 2 through the shift number control line 9, and at the same time, the operation of the barrel shifter 2 is designated through the shift control line 10. As a result, desired output data and carry are obtained from the output data bus 7 and carry output line 12.
発明が解決しようとする問題点 しかしながら上記のような構成では、バレルシフタ2
のビット幅に等しい64ビットをデータ長とするシフト/
ローテート動作のみが実行可能であり、第8図aに示す
ように下位32ビットが有効な入力データ(上位32ビット
は未定義)を入力データバス5を通じバレルシフタ2に
与えて32ビットをデータ長とする1ビット左論理シフト
の実行を試みてもシフト結果は正しく得られるが、入力
データの上位の未定義ビットがキャリに反映され正しい
キャリは得られない。また、同図bに示すように同じ入
力データに対して32ビットをデータ長とする1ビット右
論理シフトの実行を試みてもキャリが正しく得られる
が、入力データの上位の未定義ビットがシフトダウンさ
れるため出力データバス7の下位32ビットに正しいシフ
ト結果が得られない。このように従来のシフタ回路では
バレルシフタ2のビット幅より小さいデータ長のシフト
/ローテート動作を行なうことができないという問題点
を有していた。Problems to be Solved by the Invention However, in the above-mentioned configuration, the barrel shifter 2
Shift with a data length of 64 bits equal to the bit width of /
Only the rotate operation can be executed, and as shown in FIG. 8a, the lower 32 bits are valid input data (the upper 32 bits are undefined) are supplied to the barrel shifter 2 through the input data bus 5 and 32 bits are set as the data length. Even if an attempt is made to execute the 1-bit left logical shift, the shift result is correctly obtained, but the upper undefined bit of the input data is reflected in the carry, and the correct carry cannot be obtained. Also, as shown in FIG. 6B, the carry can be obtained correctly even if an attempt is made to execute a 1-bit right logical shift with the data length of 32 bits for the same input data, but the upper undefined bits of the input data are shifted. Since it is down, a correct shift result cannot be obtained in the lower 32 bits of the output data bus 7. As described above, the conventional shifter circuit has a problem that the shift / rotate operation with the data length smaller than the bit width of the barrel shifter 2 cannot be performed.
本発明はかかる点に鑑み、用いるバレルシフタのビッ
ト幅に等しいデータ長に限らず、バレルシフタのビット
幅の半分または半分より小さい任意のデータ長のシフト
/ローテート動作を行なうことができるシフタ回路を提
供することを目的とする。In view of such a point, the present invention provides a shifter circuit capable of performing a shift / rotate operation of not only a data length equal to the bit width of the barrel shifter to be used but also half or less than half the bit width of the barrel shifter. The purpose is to
問題点を解決するための手段 本発明は従来のシフタ回路を構成するバレルシフタと
同等の機能を有しLビットのビット幅を持ち算術シフト
・論理シフト・ローテートを実行するバレルシフタと、
Lビットの入力データのLSB(Least Significant Bit)
からkビット(1≦k≦L/2またはk=L)の部分をMSB
(Most Significant Bit)からkビットの位置に複写し
てバレルシフタのシフトデータとして出力する入力変換
回路と、nビット(1≦n≦k)左(MSB方向)シフト
またはローテート時にはバレルシフタにおけるシフト数
が左nビットになる制御信号を出力しnビット右(LSB
方向)シフトまたはローテート時にはバレルシフタにお
けるシフト数が右(n+L−k)ビットになる制御信号
を出力するシフト数制御回路とを備えたシフタ回路であ
る。The present invention relates to a barrel shifter having a function equivalent to that of a barrel shifter that constitutes a conventional shifter circuit, having a bit width of L bits, and performing arithmetic shift / logical shift / rotate.
LSB (Least Significant Bit) of L-bit input data
MSB from k bits (1 ≤ k ≤ L / 2 or k = L)
Input conversion circuit that copies from (Most Significant Bit) to k bit position and outputs it as barrel shifter shift data. The number of shifts in the barrel shifter is left when n bits (1 ≤ n ≤ k) left (MSB direction) shift or rotate. Outputs a control signal that becomes n bits and outputs n bits right (LSB
The shifter circuit includes a shift number control circuit that outputs a control signal in which the shift number in the barrel shifter becomes right (n + L−k) bits during (direction) shift or rotation.
作用 第5図を用いて前記した手段によって発明の目的が達
成されることを説明する。Actions It will be described with reference to FIG. 5 that the above-mentioned means achieves the object of the invention.
シフトまたはローテートされるデータ長kビットの有
効な入力データはLビットの入力データバスのLSBから
kビットの位置に得られる。入力変換回路により複写さ
れたデータは左にnビットシフトまたはローテートする
場合、nビット左にシフト/ローテートされる。これは
同図aに示す。右にnビットシフトまたはローテートす
る場合、複写されたデータはシフト数制御回路により
(n+L−k)ビット右にシフト/ローテートされる。
これを同図bに示す。以上の結果、左または右シフトま
たはローテートされたkビットの有効な出力データがバ
レルシフタからのLビットの出力データバスのLSBから
kビットの位置に得られると共に、キャリ出力線にキャ
リが得られる。また、0ビットのシフト/ローテートに
ついても同様に結果とキャリ(0)が得られる。Valid input data having a data length of k bits to be shifted or rotated is obtained at a position of k bits from the LSB of the L bit input data bus. When the data copied by the input conversion circuit is shifted or rotated to the left by n bits, the data is shifted / rotated to the left by n bits. This is shown in FIG. When shifting or rotating to the right by n bits, the copied data is shifted / rotated to the right by (n + L−k) bits by the shift number control circuit.
This is shown in FIG. As a result, valid output data of left or right shifted or rotated k bits is obtained at a position of k bits from the LSB of the L bit output data bus from the barrel shifter, and a carry is obtained on the carry output line. Further, the same result and carry (0) are obtained for 0-bit shift / rotate.
以上説明したように、本発明は前記した構成により1
≦k≦L/2またはk=Lを満たす任意のkについて、k
ビットのデータ長のシフトおよびローテートを左右kビ
ットの範囲において実行することが可能になる。As described above, the present invention has the above-mentioned structure.
For any k that satisfies ≦ k ≦ L / 2 or k = L, k
It becomes possible to shift and rotate the data length of bits in the range of left and right k bits.
実施例 第1図に本発明の実施例におけるシフタ回路のブロッ
ク図を示すものである。1は本発明の意味するシフタ回
路、2は従来のシフタ回路を構成するバレルシフタと同
等の機能を有する64ビットのビット幅を持つのバレルシ
フタ、3は64ビットの入力データのLSBから8ビット、1
6ビットまたは32ビットの部分をMSBから8ビット、16ビ
ット、32ビットの位置に複写して出力するかもしくは64
ビットの入力データをそのまま出力する入力変換回路、
4は入力されるシフト数が負(右シフト/ローテート)
のとき実行するシフト/ローテートの動作のデータ長に
よりシフト数から56,48または32を減算するシフト数制
御回路、5は64ビットの入力データバス、6は入力変換
回路3の出力である64ビットのバレルシフタ入力データ
バス、7は64ビットの出力データバス、8はシフタ回路
1において実行するシフト/ローテート動作のデータ長
を表わす2ビットのデータ長制御線、9はシフタ回路1
で行なうシフト数を表わす7ビットのシフト数制御線、
10はバレルシフタ2の動作を指定する2ビットのシフト
制御線、11はシフト数制御回路4の出力でバレルシフタ
2で実行するシフト数を表わす7ビットのバレルシフタ
シフト数制御線、12はキャリ出力線である。第2図は入
力変換回路3の入出力関係を示す図であり、入力データ
バス5をA63〜A0、データ長制御線8をSZ1〜SZ0とした
ときのバレルシフタ入力データバス6B63〜B0上のデー
タを図示したものである。ここで*は0または1を表わ
す。また、シフタ回路1で実行するシフト/ローテート
動作のデータ長は、SZ1=0かつSZ0=0のとき8ビット
(バイト)、SZ1=0かつSZ0=1のとき16ビット(ハー
フワード)、SZ1=1かつSZ0=0のとき32ビット(ワー
ド)、SZ1=1かつSZ0=1のとき64ビット(ダブルワー
ド)と定義する。第3図はシフト数制御回路4の入出力
関係を示す図であり、シフト数制御線9をS6〜S0、デー
タ長制御線8をSZ1〜SZ0としたときのバレルシフタシフ
ト数制御線11D6〜D0上のビットパターンを図示したもの
である。バレルシフタ2の入出力関係はシフト制御線10
をC1〜C0とし、第7図においてA63〜A0をB63〜B0にS6〜
S0をD6〜D0に読みかえたものに等しい。シフタ回路1で
実行するシフト動作はバレルシフタ2のシフト動作と等
しく、C1=0かつC0=0のときは算術シフト、C1=0か
つC0=1のとき論理シフト、C1=1のときはローテート
となる。Embodiment FIG. 1 shows a block diagram of a shifter circuit in an embodiment of the present invention. Reference numeral 1 is a shifter circuit according to the present invention, 2 is a barrel shifter having a bit width of 64 bits having a function equivalent to that of a barrel shifter constituting a conventional shifter circuit, 3 is 8 bits from LSB of 64-bit input data, 1
Copy 6-bit or 32-bit part from MSB to 8-bit, 16-bit, 32-bit position and output, or 64
Input conversion circuit that outputs bit input data as it is,
4 has a negative shift number (right shift / rotate)
A shift number control circuit for subtracting 56, 48 or 32 from the shift number depending on the data length of the shift / rotate operation executed when, 5 is a 64-bit input data bus, and 6 is an output of the input conversion circuit 3 of 64 bits Barrel shifter input data bus, 7 is a 64-bit output data bus, 8 is a 2-bit data length control line representing the data length of the shift / rotate operation executed in the shifter circuit 1, and 9 is the shifter circuit 1.
7-bit shift number control line indicating the shift number
10 is a 2-bit shift control line that specifies the operation of the barrel shifter 2, 11 is a 7-bit barrel shifter shift number control line that represents the number of shifts executed by the barrel shifter 2 at the output of the shift number control circuit 4, and 12 is a carry output line. is there. FIG. 2 is a diagram showing the input / output relationship of the input conversion circuit 3. The barrel shifter input data bus 6B 63 when the input data bus 5 is A 63 to A 0 and the data length control line 8 is SZ 1 to SZ 0. ~ B 0 is a graphical representation of the data above. Here, * represents 0 or 1. The data length of the shift / rotate operation performed by the shifter circuit 1, 8-bit (byte) when SZ 1 = 0 and SZ 0 = 0, SZ 1 = 0 and 16-bit (half word when SZ 0 = 1 ), SZ 1 = 1 and SZ 0 = 0 are defined as 32 bits (word), and SZ 1 = 1 and SZ 0 = 1 are defined as 64 bits (double word). FIG. 3 is a diagram showing the input / output relationship of the shift number control circuit 4, in which the shift number control line 9 is S 6 to S 0 and the data length control line 8 is SZ 1 to SZ 0. It illustrates the bit pattern on line 11D 6 to D 0. The input / output relation of the barrel shifter 2 is the shift control line 10
Is C 1 to C 0, and in FIG. 7, A 63 to A 0 is replaced with B 63 to B 0 by S 6 to
Equivalent to reading S 0 from D 6 to D 0 . The shift operation executed by the shifter circuit 1 is the same as the shift operation of the barrel shifter 2. The arithmetic shift is performed when C 1 = 0 and C 0 = 0, the logical shift is performed when C 1 = 0 and C 0 = 1, and the C 1 = 1. When, it becomes rotate.
以上のように構成された本実施例のシフタ回路につい
て、以下その動作を説明する。The operation of the shifter circuit of the present embodiment configured as above will be described below.
実行するシフト/ローテート動作のデータ長をデータ
長制御線8を与え、算術シフト・論理シフト・ローテー
トの選択をシフト制御線10で指定し、入力データは入力
データバス5、シフト数はシフト数制御線9を通してシ
フタ回路1に与える。The data length of the shift / rotate operation to be executed is given to the data length control line 8, the selection of arithmetic shift / logical shift / rotate is specified by the shift control line 10, the input data is the input data bus 5, and the shift number is the shift number control. It is given to the shifter circuit 1 through the line 9.
(イ)データ長が8ビット(バイト)のとき 入力変換回路3により入力データバス5のLSBから8
ビットの有効な部分をMSBから8ビットの位置に複写し
てバレルシフタ入力データバス6に出力する。一方、シ
フト数制御回路4ではシフト数制御線9は下位4ビット
で符号つき整数と見なされ、0〜7のときは7ビットに
ゼロ拡張され、−8〜−1のときは56を減じてバレルシ
フタシフト数制御線11に出力する。バレルシフタ2では
バレルシフタ入力データバス6の64ビットのデータをバ
レルシフタシフト数制御線11のシフト数だけシフトまた
はローテートする。シフト/ローテート結果は出力デー
タバス7のLSBから8ビットの部分に、キャリはキャリ
出力線12に得られる。(B) When the data length is 8 bits (bytes) The input conversion circuit 3 changes the LSB of the input data bus 5 to 8
The valid part of the bit is copied from the MSB to the 8-bit position and output to the barrel shifter input data bus 6. On the other hand, in the shift number control circuit 4, the shift number control line 9 is regarded as a signed integer in the lower 4 bits, zero-extended to 7 bits when 0 to 7, and 56 is subtracted when -8 to -1. Output to the barrel shifter shift number control line 11. The barrel shifter 2 shifts or rotates the 64-bit data of the barrel shifter input data bus 6 by the number of shifts of the barrel shifter shift number control line 11. The shift / rotate result is obtained in the 8-bit portion from the LSB of the output data bus 7, and the carry is obtained in the carry output line 12.
(ロ)データ長が16ビット(ハーフワイド)のとき 入力変換回路3により入力データバス5のLBSから16
ビットの有効な部分をMSBから16ビットの位置に複写し
てバレルシフタ入力データバス6に出力する。一方、シ
フト数制御回路4ではシフト数制御線9は下位5ビット
で符号つき整数と見なされ、0〜15のときは7ビットに
ゼロ拡張され、−16〜−1のときは48を減じてバレルシ
フタシフト数制御線11に出力する。バレルシフタ2では
バレルシフタ入力データバス6の64ビットのデータをバ
レルシフタシフト数制御線11のシフト数だけシフトまた
はローテートする。シフト/ローテート結果は出力デー
タバス7のLSBから16ビットの部分に、キャリはキャリ
出力線12に得られる。(B) When the data length is 16 bits (half wide) The input conversion circuit 3 changes the LBS of the input data bus 5 to 16 bits.
The valid part of the bit is copied from the MSB to the 16-bit position and output to the barrel shifter input data bus 6. On the other hand, in the shift number control circuit 4, the shift number control line 9 is regarded as a signed integer in the lower 5 bits, zero-extended to 7 bits when 0 to 15 and subtracted from 48 when -16 to -1. Output to the barrel shifter shift number control line 11. The barrel shifter 2 shifts or rotates the 64-bit data of the barrel shifter input data bus 6 by the number of shifts of the barrel shifter shift number control line 11. The shift / rotate result is obtained in the 16-bit portion from the LSB of the output data bus 7, and the carry is obtained in the carry output line 12.
(ハ)データ長が32ビット(ワード)のとき 入力変換回路3により入力データバス5のLSBから32
ビットの有効な部分をMSBから32ビットの位置に複写し
てバレルシフタ入力データバス6に出力する。一方、シ
フト数制御回路4ではシフト数制御線9は下位6ビット
で符号つき整数と見なされ、0〜31のときは7ビットに
ゼロ拡張され、−32〜−1のときは32を減じてバレルシ
フタシフト数制御線11に出力する。バレルシフタ2では
バレルシフタ入力データバス6の64ビットのデータをバ
レルシフタシフト数制御線11のシフト数だけシフトまた
はローテートする。シフト/ローテート結果は出力デー
タバス7のLBSから32ビットの部分に、キャリはキャリ
出力線12に得られる。(C) When the data length is 32 bits (word) The input conversion circuit 3 changes the LSB of the input data bus 5 to 32.
The valid part of the bit is copied from the MSB to the 32-bit position and output to the barrel shifter input data bus 6. On the other hand, in the shift number control circuit 4, the shift number control line 9 is regarded as a signed integer in the lower 6 bits, zero-extended to 7 bits when 0 to 31, and subtracted by 32 when −32 to −1. Output to the barrel shifter shift number control line 11. The barrel shifter 2 shifts or rotates the 64-bit data of the barrel shifter input data bus 6 by the number of shifts of the barrel shifter shift number control line 11. The shift / rotate result is obtained from the LBS of the output data bus 7 in the 32-bit portion, and the carry is obtained on the carry output line 12.
(ニ)データ長が64ビット(ダブルワード)のとき入力
変換回路3は入力データバス5の64ビット有効データを
そのままバレルシフタ入力データバス6に、シフト数制
御回路4はシフト数制御線9をそのままバレルシフタシ
フト数制御線11にそれぞれ出力する。バレルシフタ2で
はバレルシフタ入力データバス6の64ビットのデータを
バレルシフタシフト数制御線11のシフト数だけシフトま
たはローテートする。64ビットのシフト/ローテート結
果は出力データバス7に、キャリはキャリ出力線12に得
られる。(D) When the data length is 64 bits (double word), the input conversion circuit 3 keeps the 64-bit valid data of the input data bus 5 as it is on the barrel shifter input data bus 6, and the shift number control circuit 4 keeps the shift number control line 9 as it is. Output to each of the barrel shifter shift number control lines 11. The barrel shifter 2 shifts or rotates the 64-bit data of the barrel shifter input data bus 6 by the number of shifts of the barrel shifter shift number control line 11. The 64-bit shift / rotate result is obtained on the output data bus 7 and the carry is obtained on the carry output line 12.
以上のように本実施例によれば、入力変換回路とシフ
ト数制御回路を64ビットのバレルシフタを前置すること
により、8ビットのデータ長については左7ビット・右
8ビットまでの、16ビットのデータ長については左15ビ
ット・右16ビットまでの、32ビットのデータ長について
は左31ビット・右32ビットまでの、64ビットのデータ長
については左63ビット・右64ビットまでの算術シフト・
論理シフト・ローテートを行なうことができる。As described above, according to the present embodiment, the input conversion circuit and the shift number control circuit are preceded by the 64-bit barrel shifter, so that the 8-bit data length is 16 bits up to the left 7 bits and the right 8 bits. Arithmetic shift up to left 15 bits / right 16 bits for left data length, left 31 bits / right 32 bits up to 32 bit data length, left 63 bits / right 64 bits up to 64 bit data length・
Logical shift / rotate can be performed.
なお、第4図は同実施例におけるシフト数制御回路の
論理回路図である。データ長に対応した56,48,32の減算
はそれぞれD5〜D3,D5〜D4,D5のビットを0にするだけ
で容易に実現できる。Incidentally, FIG. 4 is a logic circuit diagram of the shift number control circuit in the embodiment. The subtraction of 56, 48, 32 corresponding to the data length can be easily realized by setting the bits of D 5 to D 3 , D 5 to D 4 , and D 5 to 0, respectively.
発明の効果 以上説明したように、本発明によれば、用いるバレル
シフタのビット幅に等しいデータ長に限らず、バレルシ
フタのビット幅の半分または半分より小さい任意のデー
タ長のシフト/ローテート動作を行なうことができ、そ
の実用的効果は大きい。EFFECTS OF THE INVENTION As described above, according to the present invention, not only the data length equal to the bit width of the barrel shifter to be used but also the shift / rotate operation of half or less than the bit width of the barrel shifter is performed. Can be achieved, and its practical effect is great.
第1図は本発明の実施例におけるシフタ回路のブロック
図、第2図は同実施例の入力変換回路の入出力関係図、
第3図は同実施例のシフト数制御回路の入出力関係図、
第4図は同実施例のシフト数制御回路の論理回路図、第
5図は本発明の作用を示す説明図、第6図は従来のシフ
タ回路のブロック図、第7図は同従来例のバレルシフタ
の入出力関係図、第8図は同従来例の問題点を示す説明
図である。 1……シフタ回路、2……バレルシフタ、3……入力変
換回路、4……シフト数制御回路、5……入力データバ
ス、6……バレルシフタ入力データバス、7……出力デ
ータバス、8……データ長制御線、9……シフト数制御
線、10……シフト制御線、11……バレルシフタシフト数
制御線、12……キャリ出力線。FIG. 1 is a block diagram of a shifter circuit in an embodiment of the present invention, FIG. 2 is an input / output relational diagram of an input conversion circuit of the embodiment,
FIG. 3 is an input / output relational diagram of the shift number control circuit of the same embodiment,
FIG. 4 is a logic circuit diagram of the shift number control circuit of the same embodiment, FIG. 5 is an explanatory diagram showing the operation of the present invention, FIG. 6 is a block diagram of a conventional shifter circuit, and FIG. FIG. 8 is an input / output relationship diagram of the barrel shifter, and FIG. 8 is an explanatory diagram showing the problems of the conventional example. 1 ... Shifter circuit, 2 ... Barrel shifter, 3 ... Input conversion circuit, 4 ... Shift number control circuit, 5 ... Input data bus, 6 ... Barrel shifter input data bus, 7 ... Output data bus, 8 ... ... data length control line, 9 ... shift number control line, 10 ... shift control line, 11 ... barrel shifter shift number control line, 12 ... carry output line.
Claims (1)
理シフト・ローテートを実行するバレルシフタと、Lビ
ットの入力データのLSBからkビット(1≦k≦L/2また
はk=L)の部分をMSBからkビットの位置に複写して
前記バレルシフタのシフトデータとして出力する入力変
換回路と、nビット(1≦n≦k)左(MSB方向)シフ
トまたはローテート時には前記バレルシフタにおけるシ
フト数が左nビットになる制御信号を出力しnビット右
(LSB方向)シフトまたはローテート時には前記バレル
シフタにおけるシフト数が右(n+L−k)ビットにな
る制御信号を出力するシフト数制御回路とを備え、シフ
タ回路全体としてkビットのデータ長の算術シフト・論
理シフト・ローテートを行なうことができるシフタ回
路。1. A barrel shifter having an L-bit width and performing arithmetic shift / logical shift / rotate, and a portion of L bits of input data from k bits (1 ≦ k ≦ L / 2 or k = L). And an input conversion circuit for copying the data from the MSB to a position of k bits and outputting it as shift data of the barrel shifter, and the number of shifts in the barrel shifter is left n when n bits (1 ≦ n ≦ k) left (MSB direction) shift or rotate. A shift number control circuit that outputs a control signal that becomes a bit and outputs a control signal that outputs a right (n + L−k) bit shift number in the barrel shifter at the time of n-bit right (LSB direction) shift or rotate, and the entire shifter circuit. A shifter circuit capable of performing arithmetic shift / logical shift / rotate with a data length of k bits.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62114125A JP2506759B2 (en) | 1987-05-11 | 1987-05-11 | Shifter circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62114125A JP2506759B2 (en) | 1987-05-11 | 1987-05-11 | Shifter circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63278137A JPS63278137A (en) | 1988-11-15 |
| JP2506759B2 true JP2506759B2 (en) | 1996-06-12 |
Family
ID=14629760
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62114125A Expired - Fee Related JP2506759B2 (en) | 1987-05-11 | 1987-05-11 | Shifter circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2506759B2 (en) |
-
1987
- 1987-05-11 JP JP62114125A patent/JP2506759B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63278137A (en) | 1988-11-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3549549B2 (en) | Arithmetic logic unit | |
| EP0233635B1 (en) | Variable shift-count bidirectional shift control circuit | |
| US5995122A (en) | Method and apparatus for parallel conversion of color values from a single precision floating point format to an integer format | |
| US4839839A (en) | Barrel shifter including rotate operation | |
| US5497341A (en) | Sign-extension of immediate constants in an ALU using an adder in an integer logic unit | |
| JP3512216B2 (en) | Apparatus and method for adding and subtracting thermometer coded data | |
| US3751650A (en) | Variable length arithmetic unit | |
| US4992969A (en) | Integer division circuit provided with a overflow detector circuit | |
| JPH0375900B2 (en) | ||
| JP3248743B2 (en) | High-speed overflow / underflow limiter for signed adders | |
| JPS62160532A (en) | Floating point representation transformer | |
| JP2506759B2 (en) | Shifter circuit | |
| EP0356996A3 (en) | Digital division circuit using N/2-Bit subtractor for N subtractions | |
| JP2565730B2 (en) | Overflow detection circuit | |
| JPS5968058A (en) | Floating point multiplier | |
| JPS5979495A (en) | Shift circuit | |
| JP2509279B2 (en) | Floating point number-fixed point number converter | |
| JPS6170635A (en) | rounding control device | |
| JP2966439B2 (en) | D / A conversion unit for sequencer | |
| US5304994A (en) | Minimal delay leading one detector with result bias control | |
| JPS62154134A (en) | Data converter | |
| JP3125436B2 (en) | Bit offset calculator | |
| JP3284717B2 (en) | Barrel shifter | |
| JP2558939B2 (en) | Rounding circuit | |
| JP2850024B2 (en) | Image memory input device in character recognition device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |