JP7131627B2 - 演算処理装置 - Google Patents
演算処理装置 Download PDFInfo
- Publication number
- JP7131627B2 JP7131627B2 JP2020554660A JP2020554660A JP7131627B2 JP 7131627 B2 JP7131627 B2 JP 7131627B2 JP 2020554660 A JP2020554660 A JP 2020554660A JP 2020554660 A JP2020554660 A JP 2020554660A JP 7131627 B2 JP7131627 B2 JP 7131627B2
- Authority
- JP
- Japan
- Prior art keywords
- arithmetic
- circuit
- processing circuit
- selector
- output
- 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
- 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/57—Arithmetic logic units [ALU], i.e. arrangements or devices for performing two or more of the operations covered by groups G06F7/483 – G06F7/556 or for performing logical operations
- G06F7/575—Basic arithmetic logic units, i.e. devices selectable to perform either addition, subtraction or one of several logical operations, using, at least partially, the same circuitry
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Complex Calculations (AREA)
Description
図1は第1実施形態の一例としての演算処理回路1aの構成を例示する図である。
演算処理回路1aにおいては、指数演算にradix-4のSTL(Sequential Table Lookup)法(第1のアルゴリズム)を用いる。
Lはべき数の空間の変数であり、Eは指数の空間の変数である。また、iは演算の繰り返し回数である。
Li+1= Li - log(1 + n × 2^-2i) ・・・(1)
Ei+1= Ei × (1 + n × 2^-2i)
= Ei + Ei × n × 2^-2i ・・・(2)
ただし、n = -2, -1, 0, +1, +2であり、Liと0との大小関係および差分を判定し、Liが0に一番近づくようにnを選ぶ。
本演算処理回路1aにおいては、対数演算にradix-4のSTL法を用いる。
対数演算において、xを入力とし、log(x)を求める。
Lは対数の空間の変数であり、Eは真数の空間の変数である。またiは繰り返し演算の回数である。
本演算処理回路1aにおいては、除算に、演算1回で商2bitを求めるradix-4のSRT(Sweeney, Robertson, Tocher)法(第2のアルゴリズム)を用いる。
除算において、x,yを入力とし、y/xを求める。
Qは部分商(繰り返し演算中の途中までの商)であり、Dは除数である。Rは部分剰余であり、iは演算の繰り返し回数である。
Ri+1= Ri - D × qi ・・・(3)
ただし、qi= (-2 or -1 or 0 or +1 or +2) × 2^-2iとする。
Qi+1 = Qi + qi ・・・(4)
Riと0との大小関係および差分を判定し、Riが0に一番近づくようにqiを選ぶ。
Rはsum+carryの形式で保持する。後述するレジスタ103のレジスタ値RSとレジスタ104のレジスタ値RCとが、sumとcarryとに相当する。
本演算処理回路1aにおいては、開平演算に、radix-4のSRT法(第2のアルゴリズム)を用いる。
開平演算において、yを入力とし、sqrt(y)を求める。
Qは部分商であり、Rは部分剰余であり、iは演算の繰り返し回数である。
初期値をQ0= 0,R0 = yとし、y = Qi^2 + Riを満たしつつ、演算を繰り返してRiを0に近づけることで、Qiがsqrt(y)に近づく(Ri=y→0、Qi^2=0→yつまりQ=0→sqrt(y))。
Ri+1 = Ri-2Qi × qi-qi^2 ・・・(5)
ただしqi=(-2 or -1 or 0 or +1 or +2)×2^-2iとする。
Qi+1= Qi+qi ・・・(6)
このように、開平演算においてRiおよびQiの演算方法は除算演算と概ね同様であるが、厳密にはRiの演算において相違がある。
Riと0との大小関係および差分を判定し、Riが0に一番近づくようにqiを選ぶ。
本第1実施形態の演算処理回路1aは、図1に示すように、レジスタ101~104,判定回路105,106,CSA(Carry-Save Adder:桁上げ保存加算器)107,108,Log Table回路109,右シフト回路(RSFT)110,111,処理回路112,演算回路113~119,130,131およびセレクタ120~126を備える。
Log Table回路109は、指数演算または対数演算に用いられる。Log Table回路109は、log(1+n*2^-2i)を出力する。Log Table回路109には、予め変数i, nに対応するlog(1+n*2^-2i)の値が設定されており、判定回路105に入力されるnとiに応じたlog(1+n*2^-2i)の値を出力する。
演算回路117は、指数演算時または対数演算時はnの符号に応じた処理を行なう。なお、除算時または開平演算時は演算回路117は使用されない。演算回路116には、セレクタ122によって選択された出力が入力される。
上述の如く構成された第1実施形態の一例としての演算処理回路1aの処理を、図3~図6に示すフローチャート(ステップS1~S34)に従って説明する。なお、図3はステップS1~ステップS9の処理を、図4はステップS10~S17の処理を、図5はステップS18~S25の処理を、図6はステップS26~S34の処理を、それぞれ示す。
このように、第1実施形態の一例としての演算処理回路1aによれば、レジスタ101~104,演算回路116およびCSA108を、指数・対数演算回路と除算・開平演算回路とで共用することで、指数・対数演算回路と除算・開平演算回路とを一つの演算処理回路1aとして構成することができる。
図1に例示した第1実施形態の演算処理回路1aにおいては、4in-2outのCSA108を用いているが、除算および開平演算において、このCSA108の入力が1つ未使用となっている。
図9は第3実施形態の一例としての演算処理回路1cの構成を例示する図である。
図11は上述した各実施形態の一例としての演算処理回路1a,1b,1cを、例えば、ディープラーニング等の用途のプロセッサに実装する構成例を示す図である。
10 制御ユニット
11 メモリ
101~104 レジスタ
105,106 判定回路
107,108 CSA
109 Log Table回路
110,111 右シフト回路
112,212,312 処理回路
113~119,130,131 演算回路
120~126,221~223,321,322 セレクタ
Claims (4)
- 指数演算および対数演算を処理する第1の処理部と、
除算および開平演算を処理する第2の処理部と
を有し、
前記第1の処理部と前記第2の処理部とで共用される共用部を備え、
前記第1の処理部において、前記指数演算における指数変数または前記対数演算における真数変数の演算を実行する桁上げ保存加算器と、前記第2の処理部において、前記除算における部分剰余または前記開平演算における部分剰余の演算を実行する桁上げ保存加算器とが、前記共用部である
ことを特徴とする、演算処理装置。 - 前記第1の処理部および前記第2の処理部に対して演算を実行させる制御部を備え、
前記制御部が、前記第1の処理部および前記第2の処理部に備えられた複数の回路の中から演算種類に応じた回路を選択して処理を実行させる
ことを特徴とする、請求項1記載の演算処理装置。 - 前記指数演算,前記対数演算,前記除算および前記開平演算のいずれかの処理過程において生成される値を格納する格納部が、前記共用部であり、
前記制御部が、演算種類に応じた初期値を前記格納部に設定する
ことを特徴とする、請求項2記載の演算処理装置。 - 前記第2の処理部において、
複数の出力値が設定される設定部と、
前記設定部の中から第1の出力値を選択して出力する第1選択部と、
前記設定部の中から第2の出力値を選択して出力する第2選択部と、
前記第1選択部および前記第2選択部からの出力が入力される加算器と
を備えることを特徴とする、請求項1~3のいずれか1項に記載の演算処理装置。
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2018/040475 WO2020090024A1 (ja) | 2018-10-31 | 2018-10-31 | 演算処理装置 |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2020090024A1 JPWO2020090024A1 (ja) | 2021-09-02 |
JP7131627B2 true JP7131627B2 (ja) | 2022-09-06 |
Family
ID=70463022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020554660A Active JP7131627B2 (ja) | 2018-10-31 | 2018-10-31 | 演算処理装置 |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7131627B2 (ja) |
WO (1) | WO2020090024A1 (ja) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005092372A (ja) | 2003-09-12 | 2005-04-07 | Tadahiro Omi | 演算処理回路 |
JP2005275626A (ja) | 2004-03-23 | 2005-10-06 | Fujitsu Ltd | 演算種別と精度を選択可能な近似演算処理方法および近似演算処理装置 |
JP2006172035A (ja) | 2004-12-15 | 2006-06-29 | Nec Computertechno Ltd | 除算・開平演算器 |
-
2018
- 2018-10-31 WO PCT/JP2018/040475 patent/WO2020090024A1/ja active Application Filing
- 2018-10-31 JP JP2020554660A patent/JP7131627B2/ja active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005092372A (ja) | 2003-09-12 | 2005-04-07 | Tadahiro Omi | 演算処理回路 |
JP2005275626A (ja) | 2004-03-23 | 2005-10-06 | Fujitsu Ltd | 演算種別と精度を選択可能な近似演算処理方法および近似演算処理装置 |
JP2006172035A (ja) | 2004-12-15 | 2006-06-29 | Nec Computertechno Ltd | 除算・開平演算器 |
Also Published As
Publication number | Publication date |
---|---|
JPWO2020090024A1 (ja) | 2021-09-02 |
WO2020090024A1 (ja) | 2020-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114402289B (zh) | 多模式运算电路 | |
KR100714358B1 (ko) | 연산을 수행하기 위한 방법, 시스템 및 장치 | |
JP3605181B2 (ja) | 掛け算累算命令を使用したデータ処理 | |
WO2017081437A1 (en) | Multiplication of first and second operands using redundant representation | |
KR19980041798A (ko) | 영상처리를 위한 명령을 지원하는 모듈 계산구조 | |
US20090300336A1 (en) | Microprocessor with highly configurable pipeline and executional unit internal hierarchal structures, optimizable for different types of computational functions | |
WO2004042599A1 (en) | Method and a system for performing calculation operations and a device | |
WO2017081435A1 (en) | Lane position information for processing of vector | |
JP3516503B2 (ja) | 電子乗算および加算装置および方法 | |
WO2017081434A1 (en) | Redundant representation of numeric value using overlap bits | |
US6728744B2 (en) | Wide word multiplier using booth encoding | |
JP4601544B2 (ja) | 入力値に逆数演算を実施して結果値を作り出すデータ処理装置および方法 | |
JP4476210B2 (ja) | 逆数演算の結果値の初期推定値を求めるデータ処理装置および方法 | |
JP7131627B2 (ja) | 演算処理装置 | |
CN113032723A (zh) | 一种矩阵乘法器的实现方法及矩阵乘法器装置 | |
WO2017081436A1 (en) | Overlap propagation operation | |
JPH04355827A (ja) | 開平演算装置 | |
US20060020654A1 (en) | Multiplier with look up tables | |
WO2020090025A1 (ja) | 演算処理装置および演算処理装置の制御方法 | |
JP2007500388A (ja) | 長整数乗算器 | |
CN114968180A (zh) | 高效蒙哥马利乘法器 | |
KR100900790B1 (ko) | 재구성형 프로세서 연산 방법 및 장치 | |
KR20050084681A (ko) | 승산 방법 및 시스템과 그 장치 | |
JP3563043B2 (ja) | 平方根の逆数計算方法、計算回路、及びプログラム | |
JP2019121171A5 (ja) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210311 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220125 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220325 |
|
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: 20220726 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220808 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7131627 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |