WO2018154648A1 - デジタル演算処理回路 - Google Patents

デジタル演算処理回路 Download PDF

Info

Publication number
WO2018154648A1
WO2018154648A1 PCT/JP2017/006547 JP2017006547W WO2018154648A1 WO 2018154648 A1 WO2018154648 A1 WO 2018154648A1 JP 2017006547 W JP2017006547 W JP 2017006547W WO 2018154648 A1 WO2018154648 A1 WO 2018154648A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
unit
bit
processing circuit
output data
Prior art date
Application number
PCT/JP2017/006547
Other languages
English (en)
French (fr)
Inventor
高山 直久
平 和田
田島 賢一
Original Assignee
三菱電機株式会社
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 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to CN201780086343.6A priority Critical patent/CN110291500A/zh
Priority to US16/476,733 priority patent/US20210141601A1/en
Priority to JP2019501799A priority patent/JP6567213B2/ja
Priority to PCT/JP2017/006547 priority patent/WO2018154648A1/ja
Priority to DE112017006887.8T priority patent/DE112017006887T5/de
Publication of WO2018154648A1 publication Critical patent/WO2018154648A1/ja

Links

Images

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
    • 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/50Adding; Subtracting
    • 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/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • 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/544Methods 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 for evaluating functions by calculation
    • G06F7/5443Sum of products

Definitions

  • the present invention relates to a digital arithmetic processing circuit that performs a multiplication operation on data input in time series and performs an operation by cumulative addition on the result of the multiplication operation.
  • multiplication operation is performed on data input in time series, and output data is obtained by accumulatively adding to the result of the multiplication operation.
  • the bit width of the data is reduced by performing the bit shift, and the power consumption during operation is reduced.
  • the present invention has been made to solve such a problem, and an object thereof is to provide a digital arithmetic processing circuit capable of reducing power consumption during operation.
  • the digital arithmetic processing circuit includes a first arithmetic unit and a second arithmetic unit, a first arithmetic unit and a second arithmetic unit which multiply data inputted in time series and cumulatively add the multiplication results.
  • a first operation unit that shifts the input data to the lower side by a set bit and decreases the bit width by the bit shift; Multiply output data from data shifter A multiplier, a cumulative adder for cumulatively adding the output data of the multiplier, a bit shift to the upper side by the bit shift of the output data of the cumulative adder to the lower side, and an increase in the bit width by the bit shift A data reverse shifter is provided.
  • the input data is bit-shifted to the lower side by the set bit, and the data is multiplied by reducing the bit width by the bit shifted amount. Electric power can be reduced.
  • FIG. 1 is a configuration diagram of a digital arithmetic processing circuit according to the present embodiment.
  • the illustrated digital arithmetic processing circuit 1 includes a shift setting register 2, a determination unit 3, a control unit 4, a first arithmetic unit 5, a second arithmetic unit 6, a total arithmetic unit 7, an X register 8, and a Y register 9.
  • the shift setting register 2 is a register for setting the shift amount of the data shifter 501 in the first arithmetic unit 5.
  • the determination unit 3 is a processing unit that determines, as a determination threshold value, whether data input to the first calculation unit 5 and the second calculation unit 6 is greater than a specific positive value or less than a specific negative value. .
  • the control unit 4 performs control by the first calculation unit 5 when the determination result of the determination unit 3 satisfies the determination threshold value, and performs control by the second calculation unit 6 when the condition is not satisfied. It is.
  • the first calculation unit 5 is a calculation unit that multiplies data input in time series and cumulatively adds the multiplication results.
  • the data shifter 501 is a processing unit that reduces the data shift and the bit width corresponding to the data shift with respect to the data from the X register 8 and the Y register 9 based on the set value by the shift setting register 2.
  • the first multiplier 502 is an arithmetic unit that multiplies the output from the data shifter 501.
  • the first adder 503 is an arithmetic unit that adds the output of the first multiplier 502 and the output of the first accumulator 504 and outputs the result to the first accumulator 504.
  • the first accumulator 504 is a processing unit that holds the cumulative addition result of the first adder 503.
  • the first adder 503 and the first accumulator 504 constitute a first cumulative adder 505 that cumulatively adds the output data of the first multiplier 502.
  • the data inverse shifter 506 is a processing unit that performs a data shift opposite to the shift in the data shifter 501 on the output from the first accumulator 504 and increases the bit width corresponding to the bit shift.
  • the second arithmetic unit 6 is an arithmetic unit that multiplies data input in time series and cumulatively adds the multiplication results.
  • the second multiplier 601, the second adder 602, and the second accumulator 603 are used. Is provided.
  • the second multiplier 601 is an arithmetic unit that multiplies the data in the X register 8 and the Y register 9.
  • the second adder 602 is an arithmetic unit that adds the output from the second multiplier 601 and the output of the second accumulator 603 and outputs the addition result to the second accumulator 603.
  • the second accumulator 603 is a processing unit that holds the cumulative addition result of the second adder 602.
  • the second adder 602 and the second accumulator 603 constitute a second cumulative adder 604 that cumulatively adds the output data of the second multiplier 601.
  • the general arithmetic unit 7 is an arithmetic unit that adds the arithmetic results of the first arithmetic unit 5 and the second arithmetic unit 6 to generate output data of the digital arithmetic processing circuit 1, and the third adder 701 A limiter 702 is provided.
  • the third adder 701 is a calculator that adds the calculation results of the first calculation unit 5 and the second calculation unit 6, and the limiter 702 selects significant data from the output data of the third adder 701. And a processing unit for obtaining the output data of the general calculation unit 7.
  • the operation of the digital arithmetic processing circuit 1 As the calculation by the digital arithmetic processing circuit 1, the multiplication of the signal data and the phase information data inputted in time series or the multiplication of two data inputted in time series is performed.
  • the conditions defined for performing the operation of the digital arithmetic processing circuit 1 are as follows. First, the bit widths of input data (X data and Y data) and output data taken into the digital arithmetic processing circuit 1 are both 16. It is assumed that 4 (4 bits) is set in the shift setting register 2 as a bit shift amount.
  • the determination threshold value for selecting the first calculation unit 5 or the second calculation unit 6 as the calculation unit is that the bit widths of the X data and the Y data are both 16 bits. If X data or Y data is a positive value, both X data and Y data have a value obtained by adding +1 to the maximum value taken by data with a bit width of 15 +32768 half value + 16384 (positive threshold) . This is because the value of the most significant bit in X data and Y data is 0, and the value of the second bit from the most significant is 1.
  • X data or Y data is a negative value, a value obtained by adding ⁇ 1 to the minimum value taken by data having a bit width of 15 for both X data and Y data, ⁇ 16384 (negative threshold value) ). This is because the value of the most significant bit in the X data and the Y data is 1, and the value of the second most significant bit is 1.
  • both X data and Y data are set to a positive threshold (+16384) or more. If it is a negative value, both the X data and the Y data are set to a negative threshold value ( ⁇ 16384) or less. This is shown in FIG.
  • the X data and the Y data are both sine wave data whose value fluctuates for one cycle at 64 times in time series
  • the number of processing times by the first arithmetic unit 5 is 32
  • the number of times of processing in the second arithmetic unit 6 is 32.
  • the sum of the number of processes by the first calculation unit 5 and the number of processes by the second calculation unit 6 is a value 64 of one cycle.
  • FIG. 3 is a flowchart showing the operation of the digital arithmetic processing circuit 1.
  • FIG. 4 is an explanatory diagram showing the data state of each unit. 4A, in the processing 50 by the first arithmetic unit, the input data 101 of X data and Y data, the shift output data 102 which is the output of the data shifter 501 for the X data and Y data, the output of the first multiplier 502 Multiplier output data 103, adder output data 104 which is output data of the first adder 503, accumulator output data 105 which is output data of the first accumulator 504, and inverse which is output data of the data reverse shifter 506. Shift output data 106 is shown.
  • the multiplier output data 107 that is the output of the second multiplier 601
  • the adder output data 108 that is the output of the second adder 602
  • the second The accumulator output data 109 which is the output of the accumulator 603 is shown.
  • the adder output data 110 which is the output of the third adder 701 and the circuit output data 111 which is the output of the limiter 702 and which is the output of the digital arithmetic processing circuit 1 are shown. .
  • the digital arithmetic processing circuit 1 first takes in X data into the X register 8 and Y data into the Y register 9 (step ST201).
  • the X data value taken into the X register 8 and the Y data value taken into the Y register 9 by the determination unit 3 are both greater than or equal to the above-described positive threshold (+16384), or a negative threshold. (-16384) It is determined whether the value is equal to or less than (step ST202). The result of the determination is sent to the control unit 4 as YES if any of these is true, and NO if neither is true.
  • step ST202 when the determination unit 3 determines YES, the calculation processing by the first calculation unit 5 is performed under the control signal by the control unit 4 (step ST203 to step ST207). In parallel with this, the operation of the second arithmetic unit 6 is stopped by stopping the clock for operating the second arithmetic unit 6 by the control signal from the control unit 4.
  • a control signal is transmitted to the shift setting register 2 by a control signal from the control unit 4, and the bit shift amount 4 (4 bits) set in the shift setting register 2 is the data shifter. 501 is transmitted.
  • the data shifter 501 bit-shifts both the input data 101 of the X data and the Y data to the lower 4 bits and reduces the bit width from 16 to 12 to obtain the shift output data 102 of the X data and the Y data. (Step ST203). At this time, in the input data 101, both the X data and the Y data are truncated at the lower 4 bits.
  • the first multiplier 502 performs multiplication operation of the X data and the Y data of the shift output data 102 (step ST204) to obtain the multiplier output data 103.
  • the first adder 503 performs the addition operation of the multiplier output data 103 and the accumulator output data 105 in step ST204 (step ST205), and obtains the adder output data 104.
  • the accumulator output data 105 is in the initial state and the value is 0, the addition operation need not be performed.
  • the data obtained by truncating the least significant bit data is stored in the adder output data 104 in step ST205 (step ST206), and the accumulator output data 105 is transmitted.
  • This truncation of the least significant bit is for adjusting the bit width to the multiplier output data 103 before performing addition operation with the multiplier output data 103 at the next timing in step ST204.
  • the processing in steps ST203 to ST206 is performed 32 times, which is the number of the above-described conditions, and this cumulative addition result is given to the data inverse shifter 506.
  • step ST207 the bit width is increased from 24 to 32 by 8 bits (step ST207), Output as reverse shift output data 106.
  • step ST203 the data bit width is reduced by a total of 8 bits, 4 bits each for the X data and the Y data, so the bit width of the data is increased by the second operation by increasing the bit width by the reduced amount.
  • the bit width is matched with the accumulator output data 109 which is output data of the unit 6.
  • the reverse bit shift amount and the bit width increment in the data reverse shifter 506 are set together with the bit shift setting in the data shifter 501. Thereby, the addition operation in the third adder 701 of the total operation unit 7 can be performed.
  • step ST207 when the bit width is increased, if the value of the accumulator output data 105 is positive, “10000000” (MSB on the left side is +128 in decimal number) is set to negative in the lower 8 bits. In some cases, “01111111” (MSB on the left side is ⁇ 129 in decimal) is complemented. In the case of a positive value, the range of values that can be complemented is “0000000” (0 in decimal) to “1111111” (+255 in decimal), but “10000000” (+128) to be complemented in this case This value is an intermediate value within the range that can be complemented, and by using this value, errors can be minimized.
  • the range of values that can be complemented is “0000000” ( ⁇ 1 in decimal number) to “1111111” ( ⁇ 257 in decimal number), but “01111111” ( ⁇ 129) to be complemented is In this case, it is an intermediate value within the range that can be complemented, and by setting this value, the maximum error can be suppressed. In this operation, the maximum error is 0.0076%.
  • step ST202 when the determination unit 3 determines NO in step ST202, the calculation process by the second calculation unit 6 is performed under the control signal by the control unit 4 (step ST208 to step ST210). In parallel with this, the operation of the first arithmetic unit 5 is stopped by stopping the clock for operating the first arithmetic unit 5 by the control signal from the control unit 4.
  • the second multiplier 601 performs the multiplication operation of the X data and the Y data as the input data 101 (step ST208), and outputs the multiplier output data 107.
  • second adder 602 addition operation is performed on multiplier output data 107 and accumulator output data 109 in step ST208 (step ST209), and adder output data 108 is output.
  • the addition operation does not have to be performed.
  • step ST210 the data obtained by discarding the data of the least significant bit is stored in the adder output data 108 in step ST209 (step ST210), and the accumulator output data 109 is transmitted.
  • the truncation of the least significant bit here is for adjusting the bit width to the multiplier output data 107 before performing addition operation with the multiplier output data 107 at the next timing in step ST208.
  • the processing from step ST208 to step ST210 is performed 32 times, which is the number of conditions described above.
  • the accumulator output data 109 after 32 times is used as output data of the second arithmetic unit 6.
  • step ST211 to step ST212 addition calculation processing by the total calculation unit 7 is performed.
  • the total operation unit 7 adds the reverse shift output data 106 from the first operation unit 5 and the accumulator output data 109 from the second operation unit 6 by the third adder 701 (step ST211).
  • the adder output data 110 is obtained.
  • significant data bit width 16 is selected with respect to the adder output data 110 (bit width 33) in step ST211, the output data of the general arithmetic unit 7, and the digital arithmetic processing circuit 1 Is output as circuit output data 111 (step ST212).
  • the digital arithmetic processing circuit 1 As described above, in the digital arithmetic processing circuit 1 according to the first embodiment, as an operation thereof, a part of the arithmetic processing can be realized by the calculation by the first calculation unit 5 instead of the calculation by the second calculation unit 6. Therefore, the scale (number of gates) of the circuit used during operation can be reduced.
  • the circuit scale In the digital arithmetic processing circuit 1, when it is assumed that the scale of the circuit used during operation is proportional to the power consumed by the digital arithmetic processing circuit 1, the circuit scale is reduced with respect to the power consumption of the digital arithmetic processing circuit 1. Power consumption can be reduced by the proportion.
  • the first arithmetic unit and the second arithmetic unit that multiply the data input in time series and cumulatively add the multiplication results
  • a determination unit that determines whether data input to the first calculation unit and the second calculation unit is greater than or equal to a positive specific value or less than a negative specific value, and a determination result of the determination unit is a positive specific value
  • a control unit that controls to perform the calculation by the first calculation unit when it is equal to or greater than or equal to or less than a specific negative value; otherwise, the control unit controls the calculation by the second calculation unit;
  • a total operation unit that adds the operation results of the second operation unit to obtain output data
  • the first operation unit bit-shifts the input data to the lower side by a set bit and Data shifter and data shifter to reduce the bit width only
  • a multiplier that multiplies the output data from each other, a cumulative adder that cumulatively adds the output data of the multiplier, a bit shift to the upper side by the bit shift
  • FIG. 5 is a configuration diagram of the digital arithmetic processing circuit according to the second embodiment.
  • the setting unit 10 is installed outside the main body of the digital arithmetic processing circuit 1a, and is a processing unit for setting the bit shift amount in the shift setting register 2a and the discrimination threshold value in the discrimination unit 3a.
  • the shift setting register 2a in the digital arithmetic processing circuit 1a is set such that the value of the bit shift amount by the setting unit 10 is set, and the determination unit 3a is configured to set the determination threshold value by the setting unit 10. Since this is the same as the configuration of the first embodiment shown in FIG. 1, the same reference numerals are assigned to the corresponding parts, and the description thereof is omitted.
  • FIG. 6 is a flowchart illustrating the operation of the digital arithmetic processing circuit according to the second embodiment.
  • the setting unit 10 sets the bit shift amount (bit shift amount set in the shift setting register 2a) when performing the bit shift by the data shifter 501 in the shift setting register 2a. Is set (step ST200).
  • the subsequent steps ST201 to ST212 are the same as the processing shown in FIG.
  • the bit shift amount in the first arithmetic unit 5 and the discrimination threshold value in the discrimination unit 3a are set from the outside. It is possible to set the amount and the value of the discrimination threshold by the user viewing and judging.
  • the bit amount to be bit-shifted, the positive specific value, and the negative specific value are set from the outside.
  • the bit shift amount and the positive specific value and the negative specific value can be easily and reliably set.
  • bit shift amount and the discrimination threshold in the first and second embodiments are not limited to the values described in the first and second embodiments, and can be appropriately selected.
  • the invention of the present application can be freely combined with each embodiment, modified with any component in each embodiment, or omitted with any component in each embodiment. .
  • the digital arithmetic processing circuit relates to a configuration that performs a multiplication operation on data input in time series and performs an operation by cumulative addition on the result of the multiplication operation. It is suitable for use in a digital arithmetic processing circuit that performs multiplication of signal data and phase information data input in time series.

Landscapes

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

Abstract

判別部(3)は、第1の演算部(5)及び第2の演算部(6)に入力されるデータが正の特定の値以上または負の特定の値以下であるかを判定する。そうであった場合は第1の演算部(5)による演算を行う。第1の演算部(5)は、入力データを設定ビット分下位側にビットシフトし、ビットシフト分ビット幅を減少させるデータシフタ(501)と、データシフトしたデータ同士を乗算する乗算器(502)と、乗算結果のデータを累積加算する累積加算部(505)と、累積加算部(505)の出力データを下位側にビットシフトした分だけ上位側にビットシフトし、ビット幅をビットシフト分増加させるデータ逆シフタ(506)を備える。

Description

デジタル演算処理回路
 本発明は、時系列で入力するデータ同士による乗算演算を行い、この乗算演算の結果に対して累積加算による演算を行うデジタル演算処理回路に関する。
 デジタル演算処理回路では、時系列で入力するデータ同士による乗算演算を行い、この乗算演算の結果に対して累積加算することで出力データを得ている。従来、累積加算するための加算部の前後に配置するデータシフトでは、ビットシフトを行うことでデータのビット幅を削減し、動作時の消費電力を低減している。
特開2000-29664号公報
 しかしながら、上記従来のデジタル演算処理回路は、乗算後にビットシフトする構成であるため、加算演算での消費電力の低減はできても乗算演算においては消費電力を低減することができず、このような点から更なる消費電力の低減化が求められていた。
 この発明は、かかる問題を解決するためになされたもので、動作時における消費電力を低減することができるデジタル演算処理回路を提供することを目的とする。
 この発明に係るデジタル演算処理回路は、時系列で入力するデータ同士を乗算し、乗算結果を累積加算する第1の演算部及び第2の演算部と、第1の演算部及び第2の演算部に入力されるデータが正の特定の値以上または負の特定の値以下であるかを判定する判別部と、判別部の判定結果が正の特定の値以上または負の特定の値以下であった場合は、第1の演算部による演算を行い、そうでない場合は第2の演算部による演算を行うよう制御する制御部と、第1の演算部及び第2の演算部の演算結果を加算演算して出力データとする総合演算部とを備え、第1の演算部は、入力データを設定ビット分下位側にビットシフトし、かつ、ビットシフトした分だけビット幅を減少させるデータシフタと、データシフタからの出力データ同士を乗算する乗算器と、乗算器の出力データを累積加算する累積加算部と、累積加算部の出力データを下位側にビットシフトした分だけ上位側にビットシフトし、かつビット幅をビットシフト分増加させるデータ逆シフタを備えたものである。
 この発明に係るデジタル演算処理回路は、入力データを設定ビット分下位側にビットシフトし、かつ、ビットシフトした分だけビット幅を減少させてデータ同士を乗算するようにしたので、動作時における消費電力を低減させることができる。
この発明の実施の形態1のデジタル演算処理回路の構成図である。 この発明の実施の形態1のデジタル演算処理回路における判別閾値の説明図である。 この発明の実施の形態1のデジタル演算処理回路の動作を示すフローチャートである。 この発明の実施の形態1のデジタル演算処理回路における各部のデータの状態を示す説明図である。 この発明の実施の形態1のデジタル演算処理回路における各部のデータの状態を示す説明図である。 この発明の実施の形態2のデジタル演算処理回路の構成図である。 この発明の実施の形態2のデジタル演算処理回路の動作を示すフローチャートである。
 以下、この発明をより詳細に説明するために、この発明を実施するための形態について、添付の図面に従って説明する。
実施の形態1.
 図1は、本実施の形態によるデジタル演算処理回路の構成図である。図示のデジタル演算処理回路1は、シフト設定レジスタ2、判別部3、制御部4、第1の演算部5、第2の演算部6、総合演算部7、Xレジスタ8、Yレジスタ9を備える。シフト設定レジスタ2は、第1の演算部5におけるデータシフタ501のシフト量を設定するためのレジスタである。判別部3は、第1の演算部5及び第2の演算部6に入力されるデータが正の特定の値以上または負の特定の値以下であるかを判別閾値として判定する処理部である。制御部4は、判別部3の判定結果が判別閾値を満たす場合は第1の演算部5による演算を行い、条件を満たさない場合は第2の演算部6による演算を行うよう制御する制御部である。
 第1の演算部5は、時系列で入力するデータ同士を乗算し、この乗算結果を累積加算する演算部であり、データシフタ501、第1の乗算器502、第1の加算器503、第1のアキュムレータ504、データ逆シフタ506を備える。データシフタ501は、シフト設定レジスタ2による設定値に基づいてXレジスタ8及びYレジスタ9からのデータに対してデータシフトとデータシフト分のビット幅を減少させる処理部である。第1の乗算器502は、データシフタ501からの出力を乗算する演算部である。第1の加算器503は第1の乗算器502の出力と第1のアキュムレータ504の出力とを加算して第1のアキュムレータ504に出力する演算部である。第1のアキュムレータ504は、第1の加算器503の累積加算結果を保持する処理部である。また、第1の加算器503と第1のアキュムレータ504で、第1の乗算器502の出力データを累積加算する第1の累積加算部505を構成している。データ逆シフタ506は、第1のアキュムレータ504からの出力に対して、データシフタ501におけるシフトとは逆のデータシフトを行うと共に、ビットシフト分のビット幅を増加させる処理部である。
 第2の演算部6は、時系列で入力するデータ同士を乗算し、この乗算結果を累積加算する演算部であり、第2の乗算器601、第2の加算器602、第2のアキュムレータ603を備える。第2の乗算器601は、Xレジスタ8及びYレジスタ9のデータを乗算する演算部である。第2の加算器602は、第2の乗算器601からの出力と第2のアキュムレータ603の出力を加算し、その加算結果を第2のアキュムレータ603に出力する演算部である。第2のアキュムレータ603は、第2の加算器602の累積加算結果を保持する処理部である。また、第2の加算器602と第2のアキュムレータ603で、第2の乗算器601の出力データを累積加算する第2の累積加算部604を構成している。
 総合演算部7は、第1の演算部5と第2の演算部6の演算結果を加算演算してデジタル演算処理回路1の出力データを生成する演算部であり、第3の加算器701とリミッタ702を備える。第3の加算器701は、第1の演算部5と第2の演算部6の演算結果を加算する演算器であり、リミッタ702は、第3の加算器701の出力データから有意データを選択し、総合演算部7の出力データを得るための処理部である。
 次に、実施の形態1のデジタル演算処理回路1の動作について説明する。
 デジタル演算処理回路1による演算として、時系列で入力する信号のデータと位相情報のデータ同士の乗算演算、または、時系列で入力する二つのデータ同士の乗算演算を行い、次に、時系列で蓄えられた複数の乗算演算結果を加算演算する演算処理を考える。
 ここで、デジタル演算処理回路1の動作を行うために定めた条件は次の通りとする。
 先ず、デジタル演算処理回路1に取込む入力データ(XデータとYデータ)と出力データのビット幅は共に16とする。
 シフト設定レジスタ2にはビットシフトする量として4(4ビット)が設定されているものとする。
 判別部3において、演算部として第1の演算部5を選択するか、第2の演算部6を選択するかについての判別閾値は、XデータとYデータのビット幅が共に16ビットである場合は、XデータまたはYデータが正の値であれば、Xデータ、Yデータ共に、ビット幅15のデータが取る最大値に+1を加算した値+32768の半分の値+16384(正の閾値)とする。これは、Xデータ、Yデータにおいて最上位ビットの値が0、最上位から2番目のビットの値が1であることである。
 また、XデータまたはYデータが負の値であれば、Xデータ、Yデータ共に、ビット幅15のデータが取る最小値に-1を加算した値-32768の半分の値-16384(負の閾値)とする。これは、XデータとYデータにおいて最上位ビットの値が1、最上位から2番目のビットの値が1であることである。
 判別部3において、演算部として第1の演算部5を選択する条件は、正の値であれば、Xデータ、Yデータ共に、正の閾値(+16384)以上とする。負の値であれば、Xデータ、Yデータ共に、負の閾値(-16384)以下とする。これを示すのが図2である。すなわち、X≧+16384またはX≦-16384で、Y≧+16384またはY≦-16384であれば、第1の演算部5であり、X≧+16384またはX≦-16384で、-16383≦Y≦+16383であれば、第2の演算部6である。また、-16383≦X≦+16383である場合、Y≧+16384またはY≦-16384である場合と-16383≦Y≦+16383である場合は、共に第2の演算部6である。
 本実施の形態では、Xデータ及びYデータは、共に、時系列に64回で値が1周期分の変動をする正弦波のデータとし、第1の演算部5による処理回数を32とし、第2の演算部6における処理回数を32とする。第1の演算部5による処理回数と第2の演算部6における処理回数の合計が1周期の値64となる。
 以上の条件で、デジタル演算処理回路1の動作について説明する。
 図3は、デジタル演算処理回路1の動作を示すフローチャートである。また、図4は各部のデータの状態を示す説明図である。
 図4Aにおいて、第1の演算部による処理50では、Xデータ及びYデータの入力データ101、Xデータ及びYデータに対するデータシフタ501の出力であるシフト出力データ102、第1の乗算器502の出力である乗算器出力データ103、第1の加算器503の出力データである加算器出力データ104、第1のアキュムレータ504の出力データであるアキュムレータ出力データ105、データ逆シフタ506の出力データである逆シフト出力データ106を示している。
 また、図4Bにおいて第2の演算部による処理60では、第2の乗算器601の出力である乗算器出力データ107、第2の加算器602の出力である加算器出力データ108、第2のアキュムレータ603の出力であるアキュムレータ出力データ109を示している。更に、総合演算部による処理70では、第3の加算器701の出力である加算器出力データ110と、リミッタ702の出力でありデジタル演算処理回路1の出力となる回路出力データ111を示している。
 なお、図4A,図4Bにおいて、各データの上側の数値(0,1,2,…)はビット番号を示す。図面において最も左側がMSB、右側がLSBとなる。
 図3のフローチャートにおいて、デジタル演算処理回路1では、先ず、Xレジスタ8にXデータ、Yレジスタ9にYデータを取り込む(ステップST201)。次に、判別部3により、Xレジスタ8に取込んだXデータの値、Yレジスタ9に取込んだYデータの値が共に上述した正の閾値(+16384)以上であるか、または負の閾値(-16384)以下の値であるかを判別する(ステップST202)。これらのいずれかに該当する場合にはYESとして、どちらにも該当しない場合にはNOとして、判別の結果が制御部4に送られる。
 ステップST202において、判別部3によりYESと判別した場合においては、第1の演算部5による演算処理が制御部4による制御信号の元で行われる(ステップST203~ステップST207)。これと並行して、制御部4からの制御信号により、第2の演算部6を動作させるクロックを停止させることにより、第2の演算部6による動作が停止される。
 第1の演算部5では、先ず、制御部4による制御信号により、シフト設定レジスタ2に制御信号が送信され、シフト設定レジスタ2において設定されているビットシフトする量4(4ビット)がデータシフタ501に送信される。これにより、データシフタ501は、Xデータ及びYデータの入力データ101を共に4ビット下位側にビットシフトすると共に、ビット幅を16から12に減らし、Xデータ及びYデータのシフト出力データ102とする(ステップST203)。このとき、入力データ101はXデータ、Yデータ共に下位側4ビットのデータは切り捨てられる。
 次に、第1の乗算器502において、シフト出力データ102のXデータとYデータの乗算演算を行い(ステップST204)、乗算器出力データ103を得る。次いで、第1の加算器503では、ステップST204における乗算器出力データ103とアキュムレータ出力データ105との加算演算を行い(ステップST205)、加算器出力データ104を得る。但し、アキュムレータ出力データ105が初期状態であり、値が0である場合には加算演算はしなくてよい。
 次に、第1のアキュムレータ504において、ステップST205における加算器出力データ104に対して、最下位ビットのデータを切捨てしたデータを蓄積する(ステップST206)と共に、アキュムレータ出力データ105を送出する。この最下位ビットの切捨ては、ステップST204における次のタイミングにおける乗算器出力データ103と加算演算をする前にこの乗算器出力データ103にビット幅を合わせるためである。
 ステップST203~ステップST206における処理は、上述した条件の回数である32回分行われ、この累積加算結果がデータ逆シフタ506に与えられる。
 次に、データ逆シフタ506において、ステップST206におけるアキュムレータ出力データ105に対して、8ビット上位側へのビットシフトを行い、その結果、ビット幅を24から32に8ビット分増やし(ステップST207)、逆シフト出力データ106として出力する。これは、ステップST203において、XデータとYデータ共に4ビットずつ、計8ビット分データビット幅を減らしたので、減らした分だけのビット幅を増やすことにより、データのビット幅を第2の演算部6の出力データであるアキュムレータ出力データ109にビット幅を合わせるためである。なお、データ逆シフタ506における逆ビットシフト量及びビット幅の増分の設定はデータシフタ501へのビットシフトの設定と共に行われるものとする。これにより、総合演算部7の第3の加算器701における加算演算が行うことができる。
 また、ステップST207において、ビット幅を増やす際には、アキュムレータ出力データ105の値が正である場合には、下位側8ビットに”10000000”(左側がMSB、10進数では+128)を、負である場合には”01111111”(左側がMSB、10進数では-129)を補完する。正の値である場合には、補完できる値の範囲は”0000000”(10進数では0)~”1111111”(10進数では+255)になるが、補完する”10000000”(+128)は、この場合の補完できる範囲の中間の値であり、この値とすることにより誤差を最小限に抑えることができる。負の値である場合には、補完できる値の範囲は”0000000”(10進数では-1)~”1111111”(10進数では-257)になるが、補完する”01111111”(-129)はこの場合の補完できる範囲の中間の値であり、この値とすることにより誤差の最大値を抑えることができる。本動作においては、誤差の最大は0.0076%となる。
 一方、ステップST202において、判別部3によりNOと判別した場合は、第2の演算部6による演算処理が制御部4による制御信号の元で行われる(ステップST208~ステップST210)。これと並行して、制御部4からの制御信号により第1の演算部5を動作させるクロックを停止させることにより、第1の演算部5による動作が停止される。
 第2の演算部6では、先ず、第2の乗算器601において、入力データ101であるXデータとYデータの乗算演算を行い(ステップST208)、乗算器出力データ107を出力する。次に、第2の加算器602において、ステップST208における乗算器出力データ107とアキュムレータ出力データ109との加算演算を行い(ステップST209)、加算器出力データ108を出力する。但し、第2のアキュムレータ603における蓄積データが初期状態であり、値が0である場合には加算演算はしなくてよい。
 次に、第2のアキュムレータ603において、ステップST209における加算器出力データ108に対して、最下位ビットのデータの切捨てしたデータを蓄積する(ステップST210)と共に、アキュムレータ出力データ109を送出する。ここでの最下位ビットの切捨ては、ステップST208における次のタイミングにおける乗算器出力データ107と加算演算をする前にこの乗算器出力データ107にビット幅を合わせるためである。
 ステップST208~ステップST210における処理は、上述した条件の回数である32回分行われる。この32回後のアキュムレータ出力データ109を、第2の演算部6の出力データとする。
 次に、ステップST211~ステップST212において、総合演算部7による加算演算処理を行う。総合演算部7では、先ず、第1の演算部5からの逆シフト出力データ106と、第2の演算部6からのアキュムレータ出力データ109を第3の加算器701で加算演算し(ステップST211)、加算器出力データ110を得る。次に、リミッタ702において、ステップST211における加算器出力データ110(ビット幅33)に対して、有意データ(ビット幅16)を選択し、総合演算部7の出力データ、かつ、デジタル演算処理回路1の出力データである回路出力データ111として出力する(ステップST212)。
 このように、実施の形態1のデジタル演算処理回路1では、その動作として、一部の演算処理は第2の演算部6による演算ではなく第1の演算部5による演算で実現することができることから、動作時において使用する回路の規模(ゲート数)を削減することができる。デジタル演算処理回路1において、動作時に使用する回路の規模はデジタル演算処理回路1が消費する電力に比例すると仮定した場合には、デジタル演算処理回路1の消費電力に対して、回路規模を削減した割合の分だけ消費電力を削減することができる。
 実施の形態1においては、第2の演算部6による演算32回分が第1の演算部5で実現できる。いま、仮に、第2の演算部6(演算全64回)によるデジタル演算処理回路1全体(総合演算部7における加算演算1回分を含む)の消費電力を1.00とした場合、第1の演算部5(演算64回分)によるデジタル演算処理回路1全体が消費する電力の比率は0.72となるが、第1の演算部5の演算回数の割合0.5(=32/64)から本動作によりデジタル演算処理回路1全体が消費する電力の比率は0.85となる。
 これにより、デジタル演算処理回路1全体が占める消費電力に対して、約15%の電力を削減することができる。
 以上説明したように、実施の形態1のデジタル演算処理回路によれば、時系列で入力するデータ同士を乗算し、乗算結果を累積加算する第1の演算部及び第2の演算部と、第1の演算部及び第2の演算部に入力されるデータが正の特定の値以上または負の特定の値以下であるかを判定する判別部と、判別部の判定結果が正の特定の値以上または負の特定の値以下であった場合は、第1の演算部による演算を行い、そうでない場合は第2の演算部による演算を行うよう制御する制御部と、第1の演算部及び第2の演算部の演算結果を加算演算して出力データとする総合演算部とを備え、第1の演算部は、入力データを設定ビット分下位側にビットシフトし、かつ、ビットシフトした分だけビット幅を減少させるデータシフタと、データシフタからの出力データ同士を乗算する乗算器と、乗算器の出力データを累積加算する累積加算部と、累積加算部の出力データを下位側にビットシフトした分だけ上位側にビットシフトし、かつビット幅をビットシフト分増加させるデータ逆シフタを備えたので、動作時における消費電力を低減させることができる。
実施の形態2.
 実施の形態2は、シフト設定レジスタ2のビットシフト量と判別部3の判別閾値を設定する設定部を設けたものである。
 図5は実施の形態2のデジタル演算処理回路の構成図である。
 図5において、設定部10は、デジタル演算処理回路1aの本体の外部に設置され、シフト設定レジスタ2aにおけるビットシフトの量と判別部3aにおける判別閾値の値を設定するための処理部である。その他、デジタル演算処理回路1a内のシフト設定レジスタ2aが設定部10によるビットシフト量の値が設定され、また、判別部3aが設定部10によってその判別閾値が設定されるよう構成されている以外は図1に示した実施の形態1の構成と同様であるため、対応する部分に同一符号を付してその説明を省略する。
 図6は、実施の形態2のデジタル演算処理回路の動作を示すフローチャートである。
 先ず、設定部10から、データシフタ501でビットシフトする際のビットシフトの量(シフト設定レジスタ2aにおいて設定するビットシフトの量)をシフト設定レジスタ2aに設定し、また、判別部3における判別閾値を設定する(ステップST200)。それ以降のステップST201~ステップST212については、図3で示す処理と同一のため、その説明を省略する。
 このように、実施の形態2のデジタル演算処理回路1aでは、第1の演算部5におけるビットシフトの量と、判別部3aにおける判別閾値の値を外部から設定するようにしているため、ビットシフトの量と判別閾値の値をユーザが見て判断することにより設定することができる。
 以上説明したように、実施の形態2のデジタル演算処理回路によれば、ビットシフトするビット量と、正の特定の値及び負の特定の値は外部より設定されるようにしたので、実施の形態1の効果に加えて、ビットシフトの量と正の特定の値及び負の特定の値とを容易かつ確実に設定することができる。
 なお、上記実施の形態1及び実施の形態2におけるビットシフトする量及び判別閾値は、実施の形態1及び実施の形態2で説明した値に限定されるものではなく、適宜選択が可能である。
 また、本願発明はその発明の範囲内において、各実施の形態の自由な組み合わせ、あるいは各実施の形態の任意の構成要素の変形、もしくは各実施の形態において任意の構成要素の省略が可能である。
 以上のように、この発明に係るデジタル演算処理回路は、時系列で入力するデータ同士による乗算演算を行い、この乗算演算の結果に対して累積加算による演算を行う構成に関するものであり、例えば、時系列で入力する信号のデータと位相情報のデータ同士の乗算演算を行うデジタル演算処理回路に用いるのに適している。
 1,1a デジタル演算処理回路、2,2a シフト設定レジスタ、3,3a 判別部、4 制御部、5 第1の演算部、6 第2の演算部、7 総合演算部、8 Xレジスタ、9 Yレジスタ、10 設定部、501 データシフタ、502 第1の乗算器、503 第1の加算器、504 第1のアキュムレータ、505 データ逆シフタ、601 第2の乗算器、602 第2の加算器、603 第2のアキュムレータ、701 第3の加算器、702 リミッタ。

Claims (2)

  1.  時系列で入力するデータ同士を乗算し、当該乗算結果を累積加算する第1の演算部及び第2の演算部と、
     前記第1の演算部及び第2の演算部に入力されるデータが正の特定の値以上または負の特定の値以下であるかを判定する判別部と、
     前記判別部の判定結果が正の特定の値以上または負の特定の値以下であった場合は、前記第1の演算部による演算を行い、そうでない場合は前記第2の演算部による演算を行うよう制御する制御部と、
     第1の演算部及び第2の演算部の演算結果を加算演算して出力データとする総合演算部とを備え、
     前記第1の演算部は、入力データを設定ビット分下位側にビットシフトし、かつ、当該ビットシフトした分だけビット幅を減少させるデータシフタと、当該データシフタからの出力データ同士を乗算する乗算器と、当該乗算器の出力データを累積加算する累積加算部と、前記累積加算部の出力データを前記下位側にビットシフトした分だけ上位側にビットシフトし、かつビット幅を当該ビットシフト分増加させるデータ逆シフタを備えたことを特徴とするデジタル演算処理回路。
  2.  前記ビットシフトするビット量と、前記正の特定の値及び負の特定の値は外部より設定されることを特徴とすることを特徴とする請求項1記載のデジタル演算処理回路。
PCT/JP2017/006547 2017-02-22 2017-02-22 デジタル演算処理回路 WO2018154648A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201780086343.6A CN110291500A (zh) 2017-02-22 2017-02-22 数字运算处理电路
US16/476,733 US20210141601A1 (en) 2017-02-22 2017-02-22 Digital calculation processing circuit
JP2019501799A JP6567213B2 (ja) 2017-02-22 2017-02-22 デジタル演算処理回路
PCT/JP2017/006547 WO2018154648A1 (ja) 2017-02-22 2017-02-22 デジタル演算処理回路
DE112017006887.8T DE112017006887T5 (de) 2017-02-22 2017-02-22 Digitale berechnungsverarbeitungsschaltung

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/006547 WO2018154648A1 (ja) 2017-02-22 2017-02-22 デジタル演算処理回路

Publications (1)

Publication Number Publication Date
WO2018154648A1 true WO2018154648A1 (ja) 2018-08-30

Family

ID=63252512

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/006547 WO2018154648A1 (ja) 2017-02-22 2017-02-22 デジタル演算処理回路

Country Status (5)

Country Link
US (1) US20210141601A1 (ja)
JP (1) JP6567213B2 (ja)
CN (1) CN110291500A (ja)
DE (1) DE112017006887T5 (ja)
WO (1) WO2018154648A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021140730A1 (ja) * 2020-01-09 2021-07-15 日立Astemo株式会社 演算装置、認識装置および制御装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11275562B2 (en) * 2020-02-19 2022-03-15 Micron Technology, Inc. Bit string accumulation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000029664A (ja) * 1998-07-15 2000-01-28 Sony Corp ディジタル演算処理回路
JP2007280082A (ja) * 2006-04-07 2007-10-25 Oki Electric Ind Co Ltd 丸め演算方法及びこの演算装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4935619B2 (ja) * 2007-10-23 2012-05-23 ヤマハ株式会社 デジタル信号処理装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000029664A (ja) * 1998-07-15 2000-01-28 Sony Corp ディジタル演算処理回路
JP2007280082A (ja) * 2006-04-07 2007-10-25 Oki Electric Ind Co Ltd 丸め演算方法及びこの演算装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021140730A1 (ja) * 2020-01-09 2021-07-15 日立Astemo株式会社 演算装置、認識装置および制御装置
JP2021111082A (ja) * 2020-01-09 2021-08-02 日立Astemo株式会社 演算装置、認識装置および制御装置
JP7304295B2 (ja) 2020-01-09 2023-07-06 日立Astemo株式会社 演算装置、認識装置および制御装置

Also Published As

Publication number Publication date
JP6567213B2 (ja) 2019-08-28
DE112017006887T5 (de) 2019-10-02
US20210141601A1 (en) 2021-05-13
CN110291500A (zh) 2019-09-27
JPWO2018154648A1 (ja) 2019-11-07

Similar Documents

Publication Publication Date Title
US20060008080A1 (en) Modular-multiplication computing unit and information processing unit
US7315163B2 (en) Arithmetic unit
Hormigo et al. Measuring improvement when using HUB formats to implement floating-point systems under round-to-nearest
JP6567213B2 (ja) デジタル演算処理回路
US5260889A (en) Computation of sticky-bit in parallel with partial products in a floating point multiplier unit
CN111399803B (zh) 除法运算方法、装置、存储介质及电子设备
US20080098057A1 (en) Multiplication Apparatus
US7912888B2 (en) Rounding computing method and computing device therefor
GB2549153B (en) Apparatus and method for supporting a conversion instruction
US11119731B2 (en) Apparatus and method for rounding
EP1357460A2 (en) A numerically controlled oscillator (NCO) for generating rational frequencies
JP2018129040A (ja) 数学的関数を計算するためのシステムおよび方法
JP4159565B2 (ja) ベクトル積和演算回路
US20140253215A1 (en) Binary adder and multiplier circuit
US11347478B2 (en) Analog arithmetic unit
KR100901478B1 (ko) 나눗셈기의 평균값 출력 장치 및 출력 방법
KR101311617B1 (ko) 저전력 대규모 집적 회로 시스템을 위한 어드레스 버스코딩/디코딩 방법 및 장치
JPWO2006106576A1 (ja) パリティ予測回路及びこれを使用した論理演算回路
JP2010092412A (ja) 比較方法および比較器
JP2003223316A (ja) 演算処理装置
JP4271589B2 (ja) 演算装置の制御方法、並びに、そのプログラムおよび記録媒体
JP4887821B2 (ja) 線形補間演算器
CN116991362A (zh) 模乘运算处理方法、装置、电子设备及可读介质
CN115081020A (zh) 隐私算法构建方法、装置、电子设备和可读存储介质
JP2010033275A (ja) データ処理方法及びデータ処理プロセッサ

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17897393

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019501799

Country of ref document: JP

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 17897393

Country of ref document: EP

Kind code of ref document: A1