JP5966764B2 - 乗算装置及び乗算方法 - Google Patents
乗算装置及び乗算方法 Download PDFInfo
- Publication number
- JP5966764B2 JP5966764B2 JP2012183419A JP2012183419A JP5966764B2 JP 5966764 B2 JP5966764 B2 JP 5966764B2 JP 2012183419 A JP2012183419 A JP 2012183419A JP 2012183419 A JP2012183419 A JP 2012183419A JP 5966764 B2 JP5966764 B2 JP 5966764B2
- Authority
- JP
- Japan
- Prior art keywords
- circuit
- product
- mantissa part
- multiplier
- digits
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F5/00—Methods or arrangements for data conversion without changing the order or content of the data handled
- G06F5/01—Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
- G06F5/012—Methods 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/483—Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
- G06F7/485—Adding; Subtracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/483—Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
- G06F7/487—Multiplying; Dividing
- G06F7/4876—Multiplying
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Nonlinear Science (AREA)
- Complex Calculations (AREA)
Description
図1は、固定小数点数の乗算方法を説明するための図である。「011111」は、被乗数となる固定小数点10進数である。「001111」は、乗数となる固定小数点10進数である。被乗数リーディングゼロカウント値P1は、被乗数の「011111」の上位に連続するゼロの数であり、「1」である。乗数リーディングゼロカウント値P2は、乗数の「001111」の上位に連続するゼロの数であり、「2」である。「111110」は、被乗数の「011111」を被乗数リーディングゼロカウント値P1の「1」だけ左シフトした正規化数である。「111100」は、乗数の「001111」を乗数リーディングゼロカウント値P2の「2」だけ左シフトした正規化数である。「12344321000」は、被乗数の正規化数の「111110」に対して乗数の正規化数の「111100」を乗算した積である。その右隣の値Pの「3」は、P1+P2=1+2=3で表される。積の「12344321」は、積の「12344321000」を値Pの「3」だけ右シフトした値である。この右シフトを行うための右シフト回路は、被乗数及び乗数の固定精度の桁数が「6」の場合、最大で6×2=12桁必要となり、物量が大きくなってしまう。積の出力OUT1は、6桁の固定精度の「344321」の固定小数点数であり、正確な値が得られない。
=16−LZC2−1
=15−LZC2
=(15−LZC2)+1
=(m−LZC2−1)+1
=m−LZC2
図13は、第2の実施形態による乗算装置の構成例を示す図である。図13の乗算装置は、図9の乗算装置に対して、セレクタ1301、デクリメント回路1302及びレジスタ1303を追加したものである。以下、本実施形態が第1の実施形態と異なる点を説明する。
902,909 加算回路
903 被乗数リーディングゼロカウント回路
904 乗数リーディングゼロカウント回路
905 左シフト回路
906,908 減算回路
907,910,912,925 セレクタ
911,913 インクリメント回路
914 デクリメント回路
915 乗算ループ回路
916 論理和回路
917 丸め処理回路
918 制御回路
919〜924 レジスタ
Claims (9)
- 乗数である浮動小数点数の仮数部の上位に連続するゼロの数を計数する計数回路と、
前記仮数部の固定精度の桁数及び前記計数回路が計数した計数値を基にシフト量を演算するシフト量演算回路と、
前記シフト量だけ被乗数である浮動小数点数の仮数部を左シフトするシフト回路と、
前記仮数部の固定精度の桁数から前記計数値を減算して前記乗数の仮数部の桁数を演算する桁数演算回路と、
前記シフト回路により左シフトされた被乗数の仮数部と、前記乗数の仮数部とを基に、前記乗数の仮数部の桁単位で中間積を出力する乗算回路と、
前記被乗数である浮動小数点数の指数部と前記乗数である浮動小数点の指数部とを加算した値を出力する加算回路と、
前記乗算回路が出力する中間積の回数が前記桁数演算回路により演算された桁数になる場合、前記乗算回路が出力する中間積を積の浮動小数点数の仮数部として出力し、前記加算回路により出力された値を積の浮動小数点数の指数部として出力する制御回路と
を有することを特徴とする乗算装置。 - 前記制御回路は、前記乗算回路が出力する中間積の回数が前記桁数演算回路により演算された桁数になり、かつ前記乗算回路が出力する中間積の桁数が積の固定精度の桁数を超える場合には、前記乗算回路が出力する中間積を1桁右シフトした値を積の浮動小数点数の仮数部として出力し、前記加算回路により出力された値をインクリメントした値を積の浮動小数点数の指数部として出力することを特徴とする請求項1記載の乗算装置。
- さらに、前記被乗数の仮数部の上位に連続するゼロの数を計数する第2の計数回路と、
前記加算回路により出力された値に対して前記シフト量を加算して前記第2の計数回路が計数した第2の計数値を減算した値を出力する指数部補正回路とを有し、
前記シフト回路は、前記シフト量演算回路により演算されたシフト量が前記第2の計数値より大きい場合、前記第2の計数値だけ前記被乗数の仮数部を左シフトし、
前記制御回路は、前記シフト量演算回路により演算されたシフト量が前記第2の計数値より大きい場合、前記指数部補正回路により出力された値を積の浮動小数点数の指数部として出力することを特徴とする請求項1記載の乗算装置。 - 前記制御回路は、前記乗算回路が出力する中間積の回数が前記桁数演算回路により演算された桁数になり、かつ前記乗算回路が出力する中間積の桁数が積の固定精度の桁数を超える場合には、前記乗算回路が出力する中間積を1桁右シフトした値を積の浮動小数点数の仮数部として出力し、前記指数部補正回路により出力された値をインクリメントした値を積の浮動小数点数の指数部として出力することを特徴とする請求項3記載の乗算装置。
- さらに、前記乗算回路が出力する中間積の回数が前記桁数演算回路により演算された桁数になり、かつ前記乗算回路が出力する中間積の桁数が積の固定精度の桁数を超える場合には、前記乗算回路が出力する中間積に対して丸め処理を行い、丸め処理した前記中間積を積の浮動小数点数の仮数部として出力する丸め処理回路を有することを特徴とする請求項1〜4のいずれか1項に記載の乗算装置。
- さらに、入力した前記被乗数である浮動小数点数の正負符号と前記乗数である浮動小数点数の正負符号が同じである場合、積の浮動小数点数の正負符号を正として出力し、入力した前記被乗数である浮動小数点数の正負符号と前記乗数である浮動小数点数の正負符号が異なる場合、積の浮動小数点数の正負符号を負として出力する正負符号演算回路を有することを特徴とする請求項1〜5のいずれか1項に記載の乗算装置。
- 前記シフト量演算回路は、前記仮数部の固定精度の桁数に対して前記計数値を減算して1を減算することにより前記シフト量を演算することを特徴とする請求項1〜6のいずれか1項に記載の乗算装置。
- 前記制御回路は、固定レイテンシの計数値を計数後に、前記積の浮動小数点数の仮数部及び指数部を出力することを特徴とする請求項1〜7のいずれか1項に記載の乗算装置。
- 計数回路が、乗数である浮動小数点数の仮数部の上位に連続するゼロの数を計数値として計数し、
シフト量演算回路が、前記仮数部の固定精度の桁数及び前記計数値を基にシフト量を演算し、
シフト回路が、前記シフト量だけ被乗数である浮動小数点数の仮数部を左シフトし、
桁数演算回路が、前記仮数部の固定精度の桁数から前記計数値を減算することにより前記乗数の仮数部の桁数を演算し、
乗算回路が、前記シフト回路により左シフトされた被乗数の仮数部と、前記乗数の仮数部とを基に、前記乗数の仮数部の桁単位で中間積を出力し、
加算回路が、前記被乗数である浮動小数点数の指数部と前記乗数である浮動小数点の指数部とを加算した値を出力し、
制御回路が、前記乗算回路が出力する中間積の回数が前記桁数演算回路により演算された桁数になる場合には、前記乗算回路が出力する中間積を積の浮動小数点数の仮数部として出力し、前記加算回路により出力された値を積の浮動小数点数の指数部として出力することを特徴とする乗算方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012183419A JP5966764B2 (ja) | 2012-08-22 | 2012-08-22 | 乗算装置及び乗算方法 |
US13/924,661 US20140059097A1 (en) | 2012-08-22 | 2013-06-24 | Multiplying device and multiplying method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012183419A JP5966764B2 (ja) | 2012-08-22 | 2012-08-22 | 乗算装置及び乗算方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014041474A JP2014041474A (ja) | 2014-03-06 |
JP5966764B2 true JP5966764B2 (ja) | 2016-08-10 |
Family
ID=50148983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012183419A Active JP5966764B2 (ja) | 2012-08-22 | 2012-08-22 | 乗算装置及び乗算方法 |
Country Status (2)
Country | Link |
---|---|
US (1) | US20140059097A1 (ja) |
JP (1) | JP5966764B2 (ja) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10127015B2 (en) | 2016-09-30 | 2018-11-13 | International Business Machines Corporation | Decimal multiply and shift instruction |
US10241757B2 (en) | 2016-09-30 | 2019-03-26 | International Business Machines Corporation | Decimal shift and divide instruction |
US11188303B2 (en) * | 2019-10-02 | 2021-11-30 | Facebook, Inc. | Floating point multiply hardware using decomposed component numbers |
CN113434113B (zh) * | 2021-06-24 | 2022-03-11 | 上海安路信息科技股份有限公司 | 基于静态配置数字电路的浮点数乘累加控制方法及系统 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59154542A (ja) * | 1983-02-23 | 1984-09-03 | Hitachi Ltd | 乗算装置 |
JPH0383126A (ja) * | 1989-08-25 | 1991-04-09 | Fujitsu Ltd | 浮動小数点乗算器 |
US5347481A (en) * | 1993-02-01 | 1994-09-13 | Hal Computer Systems, Inc. | Method and apparatus for multiplying denormalized binary floating point numbers without additional delay |
JPH086762A (ja) * | 1994-06-21 | 1996-01-12 | Matsushita Electric Ind Co Ltd | 乗算回路 |
US5844830A (en) * | 1996-08-07 | 1998-12-01 | Sun Microsystems, Inc. | Executing computer instrucrions by circuits having different latencies |
US6697833B2 (en) * | 2001-01-18 | 2004-02-24 | International Business Machines Corporation | Floating-point multiplier for de-normalized inputs |
EP1710690A1 (en) * | 2005-04-07 | 2006-10-11 | STMicroelectronics (Research & Development) Limited | Multiplication circuitry |
-
2012
- 2012-08-22 JP JP2012183419A patent/JP5966764B2/ja active Active
-
2013
- 2013-06-24 US US13/924,661 patent/US20140059097A1/en not_active Abandoned
Also Published As
Publication number | Publication date |
---|---|
US20140059097A1 (en) | 2014-02-27 |
JP2014041474A (ja) | 2014-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102430645B1 (ko) | 독립형 부동소수점 변환장치 | |
US7546328B2 (en) | Decimal floating-point adder | |
KR102318494B1 (ko) | 곱셈 가산기 | |
US8812575B2 (en) | Decimal floating-point square-root unit using Newton-Raphson iterations | |
JP5966764B2 (ja) | 乗算装置及び乗算方法 | |
US9552189B1 (en) | Embedded floating-point operator circuitry | |
KR101560340B1 (ko) | 포화가 적용된 정수 곱셈 연산 및 곱셈-덧셈 연산 | |
JP5966763B2 (ja) | 除算装置及び除算方法 | |
CN109901813B (zh) | 一种浮点运算装置及方法 | |
US9851947B2 (en) | Arithmetic processing method and arithmetic processor having improved fixed-point error | |
WO1999040508A1 (en) | Fast adder/subtractor for signed floating point numbers | |
KR102412746B1 (ko) | 부동 소수점 제곱근 연산 장치 및 방법 | |
US9400635B1 (en) | Methods and apparatus for performing dynamic data alignment for floating-point operations | |
JP2502836B2 (ja) | 除算回路の前処理装置 | |
JP5397061B2 (ja) | 演算処理装置、その制御方法および演算処理プログラム | |
JP2010218197A (ja) | 浮動小数点積和演算装置、浮動小数点積和演算方法、及び浮動小数点積和演算用プログラム | |
JP2022162183A (ja) | 演算装置および演算方法 | |
EP3647939A1 (en) | Arithmetic processing apparatus and controlling method therefor | |
Hass | Synthesizing optimal fixed-point arithmetic for embedded signal processing | |
JPH0283728A (ja) | 浮動小数点乗算装置 | |
JP7247418B2 (ja) | 乗算のための計算ユニット、方法及びコンピュータプログラム | |
JP5939893B2 (ja) | 画像処理装置および画像処理方法 | |
JP2951685B2 (ja) | 固定小数点演算器 | |
JP2006023974A (ja) | 剰余演算処理装置及び剰余演算処理方法 | |
JP5376659B2 (ja) | 積和演算装置及び積和演算装置の制御方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150512 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160530 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20160607 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160620 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5966764 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |