JPS61237133A - 演算回路 - Google Patents

演算回路

Info

Publication number
JPS61237133A
JPS61237133A JP60078540A JP7854085A JPS61237133A JP S61237133 A JPS61237133 A JP S61237133A JP 60078540 A JP60078540 A JP 60078540A JP 7854085 A JP7854085 A JP 7854085A JP S61237133 A JPS61237133 A JP S61237133A
Authority
JP
Japan
Prior art keywords
circuit
rounding
bit
register
precision
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
JP60078540A
Other languages
English (en)
Inventor
Toshirou Harui
治居 敏朗
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 JP60078540A priority Critical patent/JPS61237133A/ja
Publication of JPS61237133A publication Critical patent/JPS61237133A/ja
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/483Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
    • G06F7/485Adding; Subtracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/38Indexing scheme relating to groups G06F7/38 - G06F7/575
    • G06F2207/3804Details
    • G06F2207/3808Details concerning the type of numbers or the way they are handled
    • G06F2207/3812Devices capable of handling different types of numbers
    • G06F2207/382Reconfigurable for different fixed word lengths
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/499Denomination or exception handling, e.g. rounding or overflow
    • G06F7/49905Exception handling
    • G06F7/4991Overflow or underflow
    • G06F7/49915Mantissa overflow or underflow in handling floating-point numbers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/499Denomination or exception handling, e.g. rounding or overflow
    • G06F7/49942Significance control
    • G06F7/49947Rounding

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Nonlinear Science (AREA)
  • General Engineering & Computer Science (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、浮動小数点データの演算回路に関するもので
、特に、演算結果の丸めを実行するための演算回路に関
する。
〔従来の技術〕
16進の浮動小数点データXは1通常9次の式で表現さ
れる。
z= (−1)8XMX 16”         (
1)ここで、Sは符号9Mは小数以下の値を示す仮数部
、Eは指数部である。
浮動小数点データは、仮数部Mの有効数字の桁数1=よ
って単精度の浮動小数点データと1倍精度の浮動小数点
データの区別がある。この浮動小数点データは9通常、
第6図のような形式で表わされる。この例では、符号S
が1ピツト。
指数部Eが7ピツト、仮数部Mは、単精度の時24ピツ
)(6桁)、倍精度の時56ビット(14桁)である。
浮動小数点データの演算の場合、結果として必要な桁数
のみを仮数部の演算で求めた場合。
最下位桁が正しい値とならない場合がある。この例を次
檻;示す。
α123456x16’−0,120OFFx 16’
=(0,123456−0,001200)X166=
0.122256X16’   (2)最下位桁まで正
しい値を得るためには、必要な桁より1桁あるいは2桁
余分監ユ演算結果を求め。
その桁を7捨8人する。この動−作を丸めといい。
この余分の桁を保護桁(G)と呼ぶ。(2)式の例(二
対し、保護桁Gを一桁取って演算した場合を次に示す。
0.123456x 166−0.120OFFX 1
6’= (0,1234560第7図は丸め処理のため
のファームウェアのフローチャートを示す。
丸めのために使用されるビットは、単精度と倍精度では
異なる。第6図の形式の場合では。
単精度の時ピット32が、また倍精度の時ピット64が
それぞれ丸めの対象となる。
また、丸めの結果によっては、仮数部(二桁あぶれが生
じる場合がある。この時、仮数部を右へ一桁シフトし、
指数部に1を加える。これを次に示す。
0、FFFFFF8 x 168乍’> 1.oooo
oo x 16BL−一一一一一口 =0.100000X169 もし、指数部が最大値であったならば、指数部に1を加
えること【二より、指数部も桁あぶれを生じる。この場
合9表現できる最大の値を越えているため、エラーとし
なければならない。
以下余日 〔発明が解決しようとする問題点〕 この上う蚤=、従来方法で丸めを実行する場合。
単精度か倍精度かの判断、丸めること1=よって仮数部
の桁あぶれが発生したかどうかの判断および指数部に1
を加えることによって指数部の桁あぶれが生じたかどう
かの判断が必要となる。
従って、丸めを行なう時のファームウェアのフローは複
雑かつ多くのステップ数が必要であった。
本発明の目的は、精度の違いによる丸め対象ビットを選
択したり、仮数部の桁あぶれを検出し、指数部の更新を
行なうよう(二回路を構成することにより、丸めを簡単
に実行できるような演算回路を提供することI:ある。
〔問題点を解決するための手段〕
本発明の浮動小数点データ演算回路は、精度を指定する
レジスタの値によって丸めの対象となるビットを選択し
て、そのビットの値を上位桁のキャリー入力端子へ入力
する機能と、指数部と仮数部を連結して演算する機能と
を持つ16進演算回路と、精度を指定するレジスタの値
によって不要なビットを0にマスクする機能と。
仮数部の最上位桁からのキャリー出力が”1”の時、仮
数部の上位から4ビット目を”1″にする機能とを持つ
マスク回路から構成される。
〔実施例〕
次に本発明の実施例について図面を参照して詳細に説明
する。
第1図は1本発明の一実施例の基本構成を示す。図にお
いて、1は指数部E、仮数部Mおよび保護桁Gを保持す
るレジスタ、2は精度を指定するレジスタ、5は指数部
E、仮数部M、保護桁Gの演算回路、4はマスク回路で
ある。丸めを実行する時、レジスタ1の内容は、演算回
路3およびマスク回路4を通過することにより処理され
、再びレジスタ1に結果がストアされる。
第2図は、$1図の演算回路3の詳細図であり、31は
指数部凡の演算回路、32は仮数部Mの単精度の部分の
演算回路、33は倍精度の時の仮数部下位桁および単精
度の時の保護桁の演算回路、34は倍精度の時の保護桁
の演算回路、65は単精度術のキャリー入力の選択回路
36は倍精度術のキャリー入力選択回路である。
第1図の精度レジスタ2が単精度を指定している時9選
択回路35はビット32の値を選択し。
選択回路36は0を選択する。倍精度が指定された時2
選択回路35はピット32からのキャリー出力を9選択
回路36はビット64の値をそれぞれ選択する。
第3図はマスク回路の詳細図であり、41は指数部と仮
数部の上位3ビットを通すバッファ。
42は演算回路からの出力のピット11と”11を選択
するセレクタ、43は演算回路からの出力のビット12
からビット31の値をそのまま出力するバッファ、44
は演算回路からの出力ビット32からピット63の値と
0”を選択するセレクタ、45は演算回路からの出力ビ
ット64からビット67の値と0“を選択するセレクタ
である。第1図の精度レジスタ2が単精度を指定してい
る時、セレクタ44.45は10″を選択し9倍精度を
指定している時、セレクタ45のみが“0″を選択する
。また、演算回路の仮数部最上位ピットからのキャリー
出力が′″1”の時、セレクタ42は1”を選択する。
第4図は本発明による丸め演算回路でのファームウェア
のフローチャートを示し、第2図。
第3図に示した如き演算回路、マスク回路を備えたこと
により、第7図のフローチャートに比して簡単かつ非常
(:少ないステップ数で済む。
第5図は本発明(=よる丸め演算回路を使用した演算の
例を示している。
〔発明の効果〕
以上説明したようC:、精度の違いによる丸め対象ピッ
トの選択および仮数部の桁あぶれを検出して、指数部の
更新を行なうよう演算回路を構成すること(二より、丸
め処理を実行する時のファームウェアフローを簡単にで
きるという効果がある。
以下余白 第5図

Claims (1)

  1. 【特許請求の範囲】 1、16進の浮動小数点データを処理する演算回路にお
    いて、精度を指定するレジスタと、該レジスタが単精度
    を指定した時は仮数部における単精度の有効桁の次の桁
    の最上位ビットの値を上位桁のキャリー入力とし、前記
    レジスタが倍精度を指定した時は仮数部における倍精度
    の有効桁の次の桁の最上位ビットを上位桁のキャリー入
    力とする機能を持つ演算回路と、前記レジスタの値によ
    って不要となる仮数部の桁を0にマスクする回路を持つ
    ことを特徴とする丸め演算回路。 2、特許請求の範囲第1項記載の丸め演算回路において
    、前記演算回路は、丸め処理の時のみ仮数部からのキャ
    リー出力が指数部のキャリー入力に接続され、連結して
    演算ができるように構成されていることを特徴とする丸
    め演算回路。 3、特許請求の範囲第2項記載の丸め演算回路において
    、前記マスク回路は、前記演算回路の仮数部最上位から
    のキャリー出力が“1”の時、仮数部の最上位から4ビ
    ット目を“1”にして出力する機能を持つことを特徴と
    する丸め演算回路。
JP60078540A 1985-04-15 1985-04-15 演算回路 Pending JPS61237133A (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60078540A JPS61237133A (ja) 1985-04-15 1985-04-15 演算回路

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60078540A JPS61237133A (ja) 1985-04-15 1985-04-15 演算回路

Publications (1)

Publication Number Publication Date
JPS61237133A true JPS61237133A (ja) 1986-10-22

Family

ID=13664743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60078540A Pending JPS61237133A (ja) 1985-04-15 1985-04-15 演算回路

Country Status (1)

Country Link
JP (1) JPS61237133A (ja)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0562513A2 (en) * 1992-03-23 1993-09-29 Nec Corporation Rounding operation circuit
EP1830252A3 (en) * 2006-02-09 2009-02-04 Altera Corporation Specialised processing block for programmable logic device
JP2011242827A (ja) * 2010-05-14 2011-12-01 Iwate Univ 乱数生成システム及びプログラム
US8862650B2 (en) 2010-06-25 2014-10-14 Altera Corporation Calculation of trigonometric functions in an integrated circuit device
US8886696B1 (en) 2009-03-03 2014-11-11 Altera Corporation Digital signal processing circuitry with redundancy and ability to support larger multipliers
US8886695B1 (en) 2008-03-14 2014-11-11 Altera Corporation Normalization of floating point operations in a programmable integrated circuit device
US8949298B1 (en) 2011-09-16 2015-02-03 Altera Corporation Computing floating-point polynomials in an integrated circuit device
US8959137B1 (en) 2008-02-20 2015-02-17 Altera Corporation Implementing large multipliers in a programmable integrated circuit device
US8996600B1 (en) 2012-08-03 2015-03-31 Altera Corporation Specialized processing block for implementing floating-point multiplier with subnormal operation support
US9053045B1 (en) 2011-09-16 2015-06-09 Altera Corporation Computing floating-point polynomials in an integrated circuit device
US9063870B1 (en) 2006-12-05 2015-06-23 Altera Corporation Large multiplier for programmable logic device
US9098332B1 (en) 2012-06-01 2015-08-04 Altera Corporation Specialized processing block with fixed- and floating-point structures
US9189200B1 (en) 2013-03-14 2015-11-17 Altera Corporation Multiple-precision processing block in a programmable integrated circuit device
US9207909B1 (en) 2012-11-26 2015-12-08 Altera Corporation Polynomial calculations optimized for programmable integrated circuit device structures
US9348795B1 (en) 2013-07-03 2016-05-24 Altera Corporation Programmable device using fixed and configurable logic to implement floating-point rounding
US9379687B1 (en) 2014-01-14 2016-06-28 Altera Corporation Pipelined systolic finite impulse response filter
US9395953B2 (en) 2006-12-05 2016-07-19 Altera Corporation Large multiplier for programmable logic device
US9600278B1 (en) 2011-05-09 2017-03-21 Altera Corporation Programmable device using fixed and configurable logic to implement recursive trees
US9684488B2 (en) 2015-03-26 2017-06-20 Altera Corporation Combined adder and pre-adder for high-radix multiplier circuit
US10942706B2 (en) 2017-05-05 2021-03-09 Intel Corporation Implementation of floating-point trigonometric functions in an integrated circuit device

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0562513A2 (en) * 1992-03-23 1993-09-29 Nec Corporation Rounding operation circuit
EP1830252A3 (en) * 2006-02-09 2009-02-04 Altera Corporation Specialised processing block for programmable logic device
US9395953B2 (en) 2006-12-05 2016-07-19 Altera Corporation Large multiplier for programmable logic device
US9063870B1 (en) 2006-12-05 2015-06-23 Altera Corporation Large multiplier for programmable logic device
US8959137B1 (en) 2008-02-20 2015-02-17 Altera Corporation Implementing large multipliers in a programmable integrated circuit device
US8886695B1 (en) 2008-03-14 2014-11-11 Altera Corporation Normalization of floating point operations in a programmable integrated circuit device
US8886696B1 (en) 2009-03-03 2014-11-11 Altera Corporation Digital signal processing circuitry with redundancy and ability to support larger multipliers
JP2011242827A (ja) * 2010-05-14 2011-12-01 Iwate Univ 乱数生成システム及びプログラム
US8862650B2 (en) 2010-06-25 2014-10-14 Altera Corporation Calculation of trigonometric functions in an integrated circuit device
US9600278B1 (en) 2011-05-09 2017-03-21 Altera Corporation Programmable device using fixed and configurable logic to implement recursive trees
US9053045B1 (en) 2011-09-16 2015-06-09 Altera Corporation Computing floating-point polynomials in an integrated circuit device
US8949298B1 (en) 2011-09-16 2015-02-03 Altera Corporation Computing floating-point polynomials in an integrated circuit device
US9098332B1 (en) 2012-06-01 2015-08-04 Altera Corporation Specialized processing block with fixed- and floating-point structures
US8996600B1 (en) 2012-08-03 2015-03-31 Altera Corporation Specialized processing block for implementing floating-point multiplier with subnormal operation support
US9207909B1 (en) 2012-11-26 2015-12-08 Altera Corporation Polynomial calculations optimized for programmable integrated circuit device structures
US9189200B1 (en) 2013-03-14 2015-11-17 Altera Corporation Multiple-precision processing block in a programmable integrated circuit device
US9348795B1 (en) 2013-07-03 2016-05-24 Altera Corporation Programmable device using fixed and configurable logic to implement floating-point rounding
US9379687B1 (en) 2014-01-14 2016-06-28 Altera Corporation Pipelined systolic finite impulse response filter
US9684488B2 (en) 2015-03-26 2017-06-20 Altera Corporation Combined adder and pre-adder for high-radix multiplier circuit
US10942706B2 (en) 2017-05-05 2021-03-09 Intel Corporation Implementation of floating-point trigonometric functions in an integrated circuit device

Similar Documents

Publication Publication Date Title
JPS61237133A (ja) 演算回路
JPH0644225B2 (ja) 浮動小数点丸め正規化回路
JP3845009B2 (ja) 積和演算装置、及び積和演算方法
EP0328619B1 (en) Apparatus and method for using a single carry chain for leading one detection and for ''sticky'' bit calculation
JPS62191926A (ja) 演算装置
US5063530A (en) Method of adding/subtracting floating-point representation data and apparatus for the same
JP2507183B2 (ja) 浮動小数点加減算装置
JPS63298435A (ja) 浮動小数点演算装置
JPS62128331A (ja) 情報処理装置
JP4428778B2 (ja) 演算装置及び演算方法並びに計算装置
JPS61224036A (ja) 演算装置
JPH0413734B2 (ja)
JPH0426495B2 (ja)
JPS62295136A (ja) 浮動小数点数演算回路
JPS60235241A (ja) 浮動小数点加算回路
JPH0644226B2 (ja) 演算処理装置
JP3124286B2 (ja) 浮動小数点数演算装置
JPH0352093B2 (ja)
JPH03217938A (ja) 浮動小数点丸め正規化装置
JPH01125625A (ja) 除算装置
JPH03269621A (ja) 演算処理装置
JPS63262723A (ja) 演算処理方法
JPS59160235A (ja) 除算装置
JPH1063482A (ja) 計算システム及び方法
JPS6194144A (ja) 浮動小数点加算回路