JPH0650462B2 - シフト数制御回路 - Google Patents

シフト数制御回路

Info

Publication number
JPH0650462B2
JPH0650462B2 JP61034388A JP3438886A JPH0650462B2 JP H0650462 B2 JPH0650462 B2 JP H0650462B2 JP 61034388 A JP61034388 A JP 61034388A JP 3438886 A JP3438886 A JP 3438886A JP H0650462 B2 JPH0650462 B2 JP H0650462B2
Authority
JP
Japan
Prior art keywords
data
shift
circuit
bit
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
Application number
JP61034388A
Other languages
English (en)
Other versions
JPS62191920A (ja
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP61034388A priority Critical patent/JPH0650462B2/ja
Priority to US07/015,466 priority patent/US4807172A/en
Priority to EP87102242A priority patent/EP0233635B1/en
Priority to DE3788965T priority patent/DE3788965T2/de
Publication of JPS62191920A publication Critical patent/JPS62191920A/ja
Publication of JPH0650462B2 publication Critical patent/JPH0650462B2/ja
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • G06F5/015Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising having at least two separately controlled shifting levels, e.g. using shifting matrices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • G06F5/012Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising in floating-point computations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Complex Calculations (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、デジタル論理回路におけるデータ列のシフト
を制御する回路に関し、特にデータによってそのシフト
量が可変に制御される回路の構成に関する。
〔従来の技術〕
一般に、被シフトデータDに対して、そのシフト量を示
すデータとしてnビットから成るビット列Nを用いる場
合、0ビットシフトを含む2n-1種類のシフト量の制御が
可能である。このビット列はシフトの方向に関する情報
を含む場合と、シフト量だけを表現する場合とがある
が、ビット列が2の補数表現によるデータの場合、Nが
表現できる数範囲は下式によって規定される。
(miはNのビット列) (1)式の関係からその範囲は0を含む−2n-1から+(2
n-1−1)までの正数である。このデータがシフト方向
に関する情報として符号を用いる場合、左右シフトが可
能なシフタ回路で|N|ビットシフトする方式と、バレ
ルシフタ等のローテーション機能を利用してNビットシ
フトと2n-1−|N|……(2)シフトにより等価的に逆方
向のシフトを行う手段とがあり、シフタ回路の構成が容
易なことから後者が一般的である。また、浮動小数点演
算回路においても、2項演算(加減算)において、指数
データの桁が大きい方に小さい方を桁合せする場合、一
般にはその差分値だけ、指数部データの小さいデータの
仮数部をシフトに桁を合せる必要がある。この動作で
は、2項数の指数部データを比較して、大きなデータか
ら小さなデータを引くことで常に正のシフト量が求まる
が、高速浮動小数点演算回路では比較と差を求める演算
とを並列に実行するという工夫が必要で、そのためハー
ド量が大きくなる欠点を有していた。これは、シフトの
方向は一定であるが、大小関係を無視して引き算を行う
ことで小さな数から大きな数を引くことになり、2の補
数の負の値を結果として得る2つの数の内、小さい方を
シフタに導き|N|シフト動作を行う場合、 mn=1のとき |N|=+1・・・(3) 2の補数の絶対値を(3)式の関係から導出することを必
要とし、 前者の(2)式の 2n-1−|N|=2n-1−2n-1++1=+1・・・(4) 逆方向シフトをローテートで行う場合と同じ操作を施す
必要がある。例えば特開昭59-0079495号公報の記載によ
れば、これをシフト段と1ビットシフト段にシフタ回
路を分離して実行する構成をとっているが、一般に被シ
フト数はシフト数制御データよりもビット長が長く、1
ビットシフタのハード量が大きい。または、シフタ回路
がシフト段と1ビットシフト段の二段構造になり、信
号伝搬路が長く複雑化する傾向から集積回路装置に構成
する場合、ダイナミック回路などにおいて動作が制限さ
れる欠点を有していた。
〔発明が解決しようとする問題点〕
従来のローテーション機能で左右のシフトを制御する方
式、及び浮動小数点演算で桁合せに要請されるシフト量
を規定するビットの操作では、+1を演算回路で行う
にしろ、またはシフタ回路においてシフト段と1ビッ
トシフト段とを分離して実行するにしろ、演算速度ある
いはハード量、もしくは構成の複雑さにおいて前述した
ように夫々大きな欠点があった。
〔問題点を解決するための手段〕
本発明はシフト数を規定するビット列Nと該ビット列の
1の補数を生成する手段と、該N或いはを解続する
手段と、解読により生じたシフト量に対応する制御線を
1ビットシフトする手段とを具備し、この制御線のシフ
トの選択を前記の生成に呼応して行う様に構成するこ
とで、他に特殊な機構を設けることなく一般的なシフ
タ、ローテーション回路で左右シフトの制御、高速な浮
動小数点桁合せ制御を構成するのに著しい効果のある回
路を提供するものである。
〔実施例〕
次に、本発明について図面を参照して説明する。
第1図は本発明の一実施例である。本実施例は浮動小数
点の演算回路の一構成を示すブロック図で、nビットの
指数部データとmビットの仮数部データP,Q相互の加
減算を実行するものである。浮動小数点データの加減算
は桁合せを要するが、一般には指数部データEP,EQ相互
の大小比数を行い、その結果 大きな数に桁合せを行うため、(5)式の如く大きな数か
ら小さな数を引き、この差分を小さな指数データの仮数
部をLSB方向(ここでは右シフトという)にシフト
し、仮数部相互の演算を行い、その結果生じたMRに
EP,EQどちらか大きな方の指数をもって結果の指数ER
する。この動作がオーバーフローなどの例外処理や浮動
小数点の正規化を伴わない原理的な非正規化浮動小数点
演算装置の一例である。しかし高速演算が要請される場
合は、比較結果に基づき演算を変更する。或いは演算結
果が負の数になった場合、その絶対値を演算で求める
(2の補数の演算)ことは動作速度の点で不利であるた
め、第2図の如く2つの演算を同時に実行し、その結果
に応じて、正の数の出力をとる方式か或いは特開昭59-0
079495号公報の如くシフト出力を補正する手段がとられ
ていた。しかしこれはハード量が付加されたり、信号の
伝搬路が長くなるなど動作速度の点で不利であった。
本実施例では、EP−EQの演算を一律的に減算回路1で実
行し、この結果EQ−EPの出力が要請される場合を論理回
路2が検出するようにしている。この時、減算結果の1
の補数▲▼を1の補数生成回路3で生成し、この結
果をマルチフレクサ5を介してデコーダ回路4で解読
し、これに対応したシフト量の制御信号を生成する。か
くして生成された制御信号を1ビット増加方向にシフト
回路6でシフトし、これをマルチフレクサ7でシフタ回
路8に導びくことでシフト量の制御を行う。この一連の
動作でマルチフレクサ7から出力される結果は、等価的
に▲▼+1の値となっているため、シフタ回路は通
常のバレルシフタやリテラルシフタで特殊な構成をとる
ことを要しない。EP−EQの演算出力が要請される場合、
つまりEP>EQの条件では、減算回路1の出力はそのまま
マルチプレクサ5を介し、すなわちSvの値がそのままデ
コータ回路4に入り、この出力制御線がマルチプレクサ
7を通りこの結果でシフタ回路8が直接制御される。マ
ルチプレクサ5,7の動きは以上の様に行われるが、同
時にマルチプレクサ9,10,11は EP>EQのとき、 マルチプレクサ9はEPをERに導く。
マルチプレクサ10はMPを演算回路12に直接入力す
る。
マルチプレクサ11はMQをシフタに入力し EP−EQ分LSB側にシフトして演算回路12のもう一方
へデータを入力する。
EP<EQのとき、 マルチプレクサ9,10,11の各動作は全で上記と反
対となる。
ここで演算回路12は2項数MP,MQに対し演算を実行
し、この結果がMRとなって出力される。
第3図は本発明の他の実施例を示すものでCMOSトラ
ンジスタ回路で構成され、左右シフトを一方向のシフタ
で構成するための制御回路である。m0〜m2がシフト量
(0〜7ビットシフト)を表わし、m3が方向を示してい
る。S0〜S7がそれぞれのシフト量に対応した制御線で正
論理で記述されている。
m3=“0”でm0〜m2のデータに対し、 のシフト量がデコーダ回路によって導出され、対応した
制御線Svが選択され出力される。
m3=“1”のときmiの補数に対し、 デコード出力が導出されこれが1ビットローテートされ
ることで、 Sv=▲▼+1 =23−23+SV+1 =23−|Sv|・・・(8) (8)式の演算が等価的に実行されており、左1ビットと
右7ビットシフト、左2ビットシフトと右6ビットシフ
トなどが対応するよう制御出力を生成できる。この結果
に基ずき一方向のシフタ回路で左右のシフトが可能であ
る。
たとえば、あるデータに対し左2ビットシフトしたデー
タと右6ビットシフトしたデータとは対応するが、これ
を一方向のシフタ回路で実現するためには左2ビットの
シフト量を示すデータが入力されたときと右6ビットの
シフト量を示すデータが入力されたときとで同一のシフ
ト量対応制御線が“1”となればよく、第3図の回路に
より当該機能が実現されている。すなわち、左2ビット
のシフト量を示すデータm0、m1、m2、m3=0、
1、0、0が入力されると、第4図に丸で囲んだトラン
ジスタが導通し、シフト量2に対応した制御線S2が
“1”となる。一方、右6ビットのシフト量を示すデー
タm0、m1、m2、m3=0、1、1、1が入力され
た場合は、第5図に丸で囲んだトランジスタが導通し、
シフト量2に対応した制御系S2がやはり“1”とな
る。かくして、(8)式の演算が等価的に実行され、一方
向のシフタ回路で左右のシフトが可能となる。
〔発明の効果〕
以上、説明したように本発明のnビットから成るビット
列Nと該ビット列の1の補数を生成する手段と、前記
データN或いはを解読し相当する0〜2n-1−1のシフ
ト量を制御する信号を生成するデコーダと、該デコーダ
d・Dを一方向に0または1ビットシフトする手段とを具
備し、該0または1ビットシフトの選択が前記生成に
呼応して動作するように構成することで、特殊なシフタ
回路を伴うことなく、一方向シフタで右左のシフトを可
能にあることができる。さらに、浮動小数点の指数デー
タ演算では、比較或いはデータの補正を伴わずに通常の
シフタ回路を用いて高速な桁合せを実行することができ
るという効果を有するものである。
【図面の簡単な説明】
第1図は本発明の基本的構成を浮動小数点演算回路に適
用された一実施例を示すブロック図、第2図は従来の高
速浮動小数点回路の桁合せ部を示すブロック図、第3図
は本発明の他の実施例を示す左右シフト制御回路の一構
成を示すCMOSトランジスタ回路図、第4図は左2ビ
ットのシフト量をまずデータに対する第3図のトランジ
スタの導通状態およびシフト量制御線の状態を示す図、
第5図は右6ビットのシフト量を示すデータに対する第
3図のトランジスタの導通状態およびシフト量制御線の
状態を示す図である。 1……指数部演算器(減算回路)、2……論理回路、3
……1の補数生成回路、4……デコーダ回路、5……マ
ルチプレクサ、6……1ビットシフト回路、7……マル
チプレクサ、8……シフタ回路、9,10,11……マ
ルチプレクサ、12……仮数部演算器。

Claims (1)

    【特許請求の範囲】
  1. 【請求項1】シフト方向を規定する部分とシフト数を規
    定する部分とからなるnビット(n:正数)の第1デー
    タを生成する手段と、前記第1データの1の補数である
    第2データを生成する手段と、前記第1データかまたは
    第2データを前記第1データのうちシフト方向を規定す
    る部分に従って選択する選択手段と、この選択手段が選
    択したデータのうちシフト数を規定する部分をデコード
    して0から2n-1−1までのシフト数を規定する制御信号
    を発生する手段と、前記制御信号を受け前記選択手段が
    前記第1データを選択したときは前記制御信号をそのま
    ま出力し、前記第2データを選択したときは前記制御信
    号を増加方向へ1ビットさらにシフトして出力する手段
    とを備えるシフト制御回路。
JP61034388A 1986-02-18 1986-02-18 シフト数制御回路 Expired - Fee Related JPH0650462B2 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP61034388A JPH0650462B2 (ja) 1986-02-18 1986-02-18 シフト数制御回路
US07/015,466 US4807172A (en) 1986-02-18 1987-02-17 Variable shift-count bidirectional shift control circuit
EP87102242A EP0233635B1 (en) 1986-02-18 1987-02-17 Variable shift-count bidirectional shift control circuit
DE3788965T DE3788965T2 (de) 1986-02-18 1987-02-17 Steuerungsschaltung für Zweirichtungsverschiebung mit variabler Anzahl.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61034388A JPH0650462B2 (ja) 1986-02-18 1986-02-18 シフト数制御回路

Publications (2)

Publication Number Publication Date
JPS62191920A JPS62191920A (ja) 1987-08-22
JPH0650462B2 true JPH0650462B2 (ja) 1994-06-29

Family

ID=12412784

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61034388A Expired - Fee Related JPH0650462B2 (ja) 1986-02-18 1986-02-18 シフト数制御回路

Country Status (4)

Country Link
US (1) US4807172A (ja)
EP (1) EP0233635B1 (ja)
JP (1) JPH0650462B2 (ja)
DE (1) DE3788965T2 (ja)

Families Citing this family (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01204138A (ja) * 1988-02-09 1989-08-16 Nec Corp 演算回路
JPH0776911B2 (ja) * 1988-03-23 1995-08-16 松下電器産業株式会社 浮動小数点演算装置
US4982352A (en) * 1988-06-17 1991-01-01 Bipolar Integrated Technology, Inc. Methods and apparatus for determining the absolute value of the difference between binary operands
US4999803A (en) * 1989-06-29 1991-03-12 Digital Equipment Corporation Floating point arithmetic system and method
JP2831729B2 (ja) * 1989-09-30 1998-12-02 株式会社東芝 プライオリティエンコーダおよび浮動小数点正規化装置
US5075879A (en) * 1989-10-13 1991-12-24 Motorola, Inc. Absolute value decoder
JPH03136166A (ja) * 1989-10-23 1991-06-10 Nec Corp 演算回路
US5432727A (en) * 1989-11-02 1995-07-11 Intergraph Corporation Apparatus for computing a sticky bit for a floating point arithmetic unit
US4999800A (en) * 1989-11-13 1991-03-12 Motorola, Inc. Floating point adder with pre-shifter
US5038314A (en) * 1989-11-17 1991-08-06 Digital Equipment Corporation Method and apparatus for correction of underflow and overflow
US5117384A (en) * 1990-01-24 1992-05-26 International Business Machines Corporation Method and apparatus for exponent adder
US5166898A (en) * 1990-09-07 1992-11-24 Nec Corporation Shift amount floating-point calculating circuit with a small amount of hardware and rapidly operable
EP0602337A1 (en) * 1992-12-14 1994-06-22 Motorola, Inc. High-speed barrel shifter
US5442576A (en) * 1994-05-26 1995-08-15 Motorola, Inc. Multibit shifting apparatus, data processor using same, and method therefor
US5477543A (en) * 1994-08-03 1995-12-19 Chromatic Research, Inc. Structure and method for shifting and reordering a plurality of data bytes
US5745744A (en) * 1995-10-12 1998-04-28 International Business Machines Corporation High speed mask generation using selection logic
US5978822A (en) * 1995-12-29 1999-11-02 Atmel Corporation Circuit for rotating, left shifting, or right shifting bits
US5987603A (en) * 1997-04-29 1999-11-16 Lsi Logic Corporation Apparatus and method for reversing bits using a shifter
US6529924B1 (en) * 2000-03-27 2003-03-04 International Business Machines Corporation Method and apparatus for generating shift amount signals for an alignment shifter
GB0112269D0 (en) * 2001-05-21 2001-07-11 Micron Technology Inc Method and circuit for alignment of floating point significands in a simd array mpp
US7020788B2 (en) * 2001-06-01 2006-03-28 Microchip Technology Incorporated Reduced power option
US6975679B2 (en) * 2001-06-01 2005-12-13 Microchip Technology Incorporated Configuration fuses for setting PWM options
US7003543B2 (en) 2001-06-01 2006-02-21 Microchip Technology Incorporated Sticky z bit
US20030005268A1 (en) * 2001-06-01 2003-01-02 Catherwood Michael I. Find first bit value instruction
US6937084B2 (en) * 2001-06-01 2005-08-30 Microchip Technology Incorporated Processor with dual-deadtime pulse width modulation generator
US6985986B2 (en) * 2001-06-01 2006-01-10 Microchip Technology Incorporated Variable cycle interrupt disabling
US20020184566A1 (en) * 2001-06-01 2002-12-05 Michael Catherwood Register pointer trap
US7007172B2 (en) * 2001-06-01 2006-02-28 Microchip Technology Incorporated Modified Harvard architecture processor having data memory space mapped to program memory space with erroneous execution protection
US7467178B2 (en) * 2001-06-01 2008-12-16 Microchip Technology Incorporated Dual mode arithmetic saturation processing
US6552625B2 (en) 2001-06-01 2003-04-22 Microchip Technology Inc. Processor with pulse width modulation generator with fault input prioritization
US6604169B2 (en) 2001-06-01 2003-08-05 Microchip Technology Incorporated Modulo addressing based on absolute offset
US6728856B2 (en) 2001-06-01 2004-04-27 Microchip Technology Incorporated Modified Harvard architecture processor having program memory space mapped to data memory space
US6976158B2 (en) * 2001-06-01 2005-12-13 Microchip Technology Incorporated Repeat instruction with interrupt
US6601160B2 (en) 2001-06-01 2003-07-29 Microchip Technology Incorporated Dynamically reconfigurable data space
US6934728B2 (en) * 2001-06-01 2005-08-23 Microchip Technology Incorporated Euclidean distance instructions
US6952711B2 (en) * 2001-06-01 2005-10-04 Microchip Technology Incorporated Maximally negative signed fractional number multiplication
US20030005269A1 (en) * 2001-06-01 2003-01-02 Conner Joshua M. Multi-precision barrel shifting
US20030028696A1 (en) * 2001-06-01 2003-02-06 Michael Catherwood Low overhead interrupt
US20040021483A1 (en) * 2001-09-28 2004-02-05 Brian Boles Functional pathway configuration at a system/IC interface
US6552567B1 (en) 2001-09-28 2003-04-22 Microchip Technology Incorporated Functional pathway configuration at a system/IC interface
US8335810B2 (en) * 2006-01-31 2012-12-18 Qualcomm Incorporated Register-based shifts for a unidirectional rotator

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NL277572A (ja) * 1961-04-26
US3510846A (en) * 1967-07-14 1970-05-05 Ibm Left and right shifter
US4366548A (en) * 1981-01-02 1982-12-28 Sperry Corporation Adder for exponent arithmetic
JPS5960637A (ja) * 1982-09-30 1984-04-06 Toshiba Corp 浮動小数点演算装置
JPS5979495A (ja) * 1982-10-29 1984-05-08 Toshiba Corp シフト回路
JPS5979350A (ja) * 1982-10-29 1984-05-08 Toshiba Corp 浮動小数点演算装置
JPS59188740A (ja) * 1983-04-11 1984-10-26 Hitachi Ltd フロ−テイング加算器
JPS60140422A (ja) * 1983-12-28 1985-07-25 Nec Corp 演算処理装置
US4562553A (en) * 1984-03-19 1985-12-31 Analogic Corporation Floating point arithmetic system and method with rounding anticipation
JPS6132139A (ja) * 1984-07-24 1986-02-14 Nec Corp 双方向バレルシフト回路
US4943940A (en) * 1984-09-27 1990-07-24 Advanced Micro Devices, Inc. Floating point add/subtract and multiplying assemblies sharing common normalization, rounding and exponential apparatus

Also Published As

Publication number Publication date
US4807172A (en) 1989-02-21
DE3788965D1 (de) 1994-03-17
EP0233635A2 (en) 1987-08-26
EP0233635B1 (en) 1994-02-02
JPS62191920A (ja) 1987-08-22
DE3788965T2 (de) 1994-07-07
EP0233635A3 (en) 1990-05-09

Similar Documents

Publication Publication Date Title
JPH0650462B2 (ja) シフト数制御回路
US7352297B1 (en) Method and apparatus for efficient implementation of digital filter with thermometer-code-like output
US5761726A (en) Base address generation in a multi-processing system having plural memories with a unified address space corresponding to each processor
US5644522A (en) Method, apparatus and system for multiply rounding using redundant coded multiply result
JP2000155671A (ja) 浮動小数点演算装置
US6738795B1 (en) Self-timed transmission system and method for processing multiple data sets
JP3418460B2 (ja) 倍精度除算回路および方法
US6205461B1 (en) Floating point arithmetic logic unit leading zero count using fast approximate rounding
US4796218A (en) Arithmetic circuit capable of executing floating point operation and fixed point operation
JP2596909B2 (ja) 最小/最大検索命令を有するデジタル処理装置
US20020129075A1 (en) Apparatus and method of performing addition and rounding operation in parallel for floating-point arithmetic logical unit
US10310809B2 (en) Apparatus and method for supporting a conversion instruction
US5559730A (en) Shift operation unit and shift operation method
US5365471A (en) Divider for performing signed division using a redundant signed digit
US5270962A (en) Multiply and divide circuit
US4866655A (en) Arithmetic processor and divider using redundant signed digit
JPH09222991A (ja) 加算方法および加算器
US6269385B1 (en) Apparatus and method for performing rounding and addition in parallel in floating point multiplier
JPH0346024A (ja) 浮動小数点演算器
US7366749B2 (en) Floating point adder with embedded status information
US6615228B1 (en) Selection based rounding system and method for floating point operations
US20070050435A1 (en) Leading-Zero Counter and Method to Count Leading Zeros
US6122651A (en) Method and apparatus for performing overshifted rotate through carry instructions by shifting in opposite directions
US7444367B2 (en) Floating point status information accumulation circuit
US5926407A (en) Combined add/shift structure

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees