WO2019135355A1 - 演算回路 - Google Patents

演算回路 Download PDF

Info

Publication number
WO2019135355A1
WO2019135355A1 PCT/JP2018/046496 JP2018046496W WO2019135355A1 WO 2019135355 A1 WO2019135355 A1 WO 2019135355A1 JP 2018046496 W JP2018046496 W JP 2018046496W WO 2019135355 A1 WO2019135355 A1 WO 2019135355A1
Authority
WO
WIPO (PCT)
Prior art keywords
circuit
value
bit
bit position
circuits
Prior art date
Application number
PCT/JP2018/046496
Other languages
English (en)
French (fr)
Inventor
健治 川合
亮 粟田
和人 武井
公昭 飯塚
Original Assignee
Nttエレクトロニクス株式会社
日本電信電話株式会社
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 Nttエレクトロニクス株式会社, 日本電信電話株式会社 filed Critical Nttエレクトロニクス株式会社
Priority to CN201880085295.3A priority Critical patent/CN111630509B/zh
Priority to US16/959,986 priority patent/US11494165B2/en
Publication of WO2019135355A1 publication Critical patent/WO2019135355A1/ja

Links

Images

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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • 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
    • G06F7/53Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel
    • G06F7/5324Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel partitioned, i.e. using repetitively a smaller parallel parallel multiplier or using an array of such smaller multipliers

Definitions

  • the present invention relates to an arithmetic circuit in digital signal processing, and more particularly to an arithmetic circuit that performs product-sum operation.
  • the main operation in digital signal processing is a product-sum operation in which data of a digital signal expressed as a fixed-point binary number is multiplied by a coefficient, also expressed as a fixed-point binary number, and these are summed up Patent Document 1).
  • FIG. 11 shows the configuration of a general product-sum operation circuit.
  • each data x [n] is a fixed-point binary number, and the number of digits after the decimal point (bit width after the decimal point) is x_scale.
  • Each coefficient c [n] is a fixed point binary number, and the number of digits after the decimal point is c_scale.
  • the product-sum operation circuit includes a summing circuit 1001.
  • the product-sum operation circuit includes a digit alignment circuit 1002.
  • the digit alignment circuit 1002 adjusts the number of decimal places to the number of decimal places z_scale of the fixed-point number z to be output by the product-sum operation circuit by lower-order bit truncation or rounding of y.
  • the number of decimal places z_scale is a value smaller than the number of decimal places x_scale + c_scale of s. Therefore, the digit alignment circuit 1002 that performs truncation processing outputs a value obtained by removing (x_scale + c_scale-z_scale) lower bits of y. Further, the digit alignment circuit 1002 which performs rounding processing outputs a value obtained by adding the most significant bit of the bits to be deleted by the above-mentioned truncation processing to the value remaining by the truncation processing.
  • the digit alignment circuit 1002 performs the truncation process or the rounding process on the value y summed by the summing circuit 1001 will be described below.
  • data and coefficients contain noise components, and the ratio of noise components to signal components is particularly large in the lower bits. Therefore, the ratio of noise components in the lower bits of the multiplication result of data and coefficients also becomes large.
  • quantization noise is included in bits lower than the number of decimal places of data or the number of decimal places of coefficients.
  • a value output from a certain product-sum operation circuit is usually an input of another product-sum operation circuit using another coefficient value.
  • the product-sum operation is performed in multiple stages, if the number of digits of the output value increases compared to the number of digits of the input value, the number of digits handled in the product-sum operation circuit in the subsequent stage increases.
  • the number of digits after multiplication when the number of digits is not reduced by digit alignment circuit 1002 is not less than the sum of the number of digits of data and coefficient It becomes. Therefore, in the configuration where the product-sum operation circuit of the former stage outputs the value without reducing the number of digits, the product-sum operation circuit of the latter stage inputs the value to perform the calculation, the product-sum operation of the latter stage than the product-sum operation circuit of the former stage In the circuit, the circuit size and power consumption will be significantly increased.
  • the product-sum operation circuit in the subsequent stage inputs a value with the number of digits increased by the product-sum operation circuit in the former stage to perform the operation, from the arithmetic processing for lower bits having a large ratio of noise components, No significant results can be obtained. Furthermore, the area of the circuit responsible for the product-sum operation in the subsequent stage and the power consumed by the circuit significantly increase due to the increase in the number of digits, so that the unnecessary circuit area and power consumption increase significantly. It occurs.
  • the low-order bits with high noise components are deleted by the digit alignment circuit 1002 and limited to significant bit widths and output to the subsequent stage. Power) is reduced.
  • the conventional product-sum operation circuit performs processing for deleting the lower bits having high noise components from the output value.
  • the internal multiplication circuit 1000-n itself performs accurate multiplication processing regardless of whether the bit is a high noise component. Therefore, the low order bits accurately calculated by the multiplication circuit 1000-n in the conventional product-sum operation circuit are deleted as high noise components by the digit alignment circuit 1002.
  • the multiplication circuit 1000-n has a characteristic that the circuit scale and the power consumption increase significantly with the increase of the number of digits (proportional to the square of the number of digits in the balanced tree type multiplication circuit). For this reason, although the increase in the number of digits leads to an increase in circuit elements and power consumption, the lower bits accurately calculated by the multiplier circuit 1000-n are deleted by the digit alignment circuit 1002 as high noise components.
  • the present invention has been made to solve the above-described problems, and it is an object of the present invention to provide an arithmetic circuit capable of reducing the circuit area and the power consumption.
  • An arithmetic circuit that calculates and outputs the value z [m], and generates a LUT configured to output a value calculated for each pair when the N coefficients c [n] are divided into two each A value of the product-sum operation z [m] which is the result of adding the circuit and N data x [m, n] of the data set X [m] by the N coefficients c [n]
  • M distributed arithmetic circuits configured to calculate and output in parallel for each of the M groups, each distributed arithmetic circuit corresponding to its own circuit A value obtained by dividing the N pieces of data
  • a plurality of binomial distributed arithmetic circuits configured to calculate and output in parallel for each time, a first summing circuit that adds up values calculated by the plurality of binary term distributed arithmetic circuits, and the first summing circuit
  • a process is performed to adjust the number of decimal places of the result added by the summing circuit to a predetermined number of decimal places smaller than the number of decimal places, and the process result is output as the value z [m] of the product-sum operation.
  • Each binomial distributed operation which is composed of a digit alignment circuit configured to A path is provided for each bit position of two values of the same set among the N pieces of data x [m, n], and a value of 0 and two of the N coefficients c [n] are formed of the same set of The same set of the N data x [m, n] among the element values consisting of the two values and the value calculated by the LUT generation circuit from the two values of the coefficient c [n] And a plurality of index circuits configured to acquire one element value corresponding to two values of the same bit position constituting two values of for each bit position, and the plurality of index circuits
  • the binomial product-sum operation is the sum of the values calculated by the plurality of bit position-specific arithmetic circuits configured to perform bit position-specific arithmetic operations on the plurality of element values and the plurality of bit position-specific arithmetic circuits.
  • a second summing circuit configured to output as the value of Among the number of bit position-specific arithmetic circuits, the bit position-specific arithmetic circuits whose corresponding bit positions l of the self circuit are smaller than a predetermined value Lc (Lc is an integer less than 2 and less than L) are the index circuits corresponding to the self circuit. And invalidate the (Lc ⁇ l) bits of the least significant bit side of the element value acquired by
  • the complex number coefficient C is applied to each of data corresponding to the self circuit among the complex number X [m], and the LUT generation circuit configured to calculate the value d_add of the sum of the real part value c_real and the imaginary part value c_imag
  • the complex value Y [m] which is the result of multiplication and addition, is M distributed arith
  • the arithmetic circuit according to the present invention is not a multiplication circuit that performs accurate multiplication on all bits without distinguishing upper bits and lower bits, but is a distributed operation in which LUTs are searched for each data bit position and element values are accumulated. By adopting this, it is possible to reduce the number of circuits for processing corresponding to the lower bits designated in advance for each bit position.
  • the reduced circuit is a wasteful circuit for calculating the lower bit value invalidated by the digit alignment circuit because the noise component is high.
  • the present invention has the effect of being able to reduce the area and power due to the useless circuit.
  • FIG. 1 is a block diagram showing the configuration of an arithmetic circuit according to a first embodiment of the present invention.
  • FIG. 2 is a block diagram showing the configuration of the distributed arithmetic circuit according to the first embodiment of the present invention.
  • FIG. 3 is a block diagram showing the configuration of a two-term distributed arithmetic circuit according to the first embodiment of the present invention.
  • FIG. 4 is a diagram for explaining the operation of the LUT index circuit in the first embodiment of the present invention.
  • FIG. 5 is a diagram for explaining the concept of operation of the binary term distributed arithmetic circuit according to the first embodiment of the present invention.
  • FIG. 6 is a diagram for explaining the concept of operation of the binary term distributed arithmetic circuit according to the first embodiment of the present invention.
  • FIG. 1 is a block diagram showing the configuration of an arithmetic circuit according to a first embodiment of the present invention.
  • FIG. 2 is a block diagram showing the configuration of the distributed arithmetic circuit according to
  • FIG. 7 is a block diagram showing the configuration of an arithmetic circuit according to the second embodiment of the present invention.
  • FIG. 8 is a block diagram showing the configuration of a distributed arithmetic circuit according to a second example of the present invention.
  • FIG. 9 is a diagram for explaining the operation of the real part LUT index circuit and the imaginary part LUT index circuit in the second embodiment of the present invention.
  • FIG. 10 is a diagram for explaining the operation concept of the distributed arithmetic circuit according to the second embodiment of the present invention.
  • FIG. 11 is a block diagram showing the configuration of a conventional product-sum operation circuit.
  • FIG. 1 is a block diagram showing the configuration of an arithmetic circuit according to a first embodiment of the present invention.
  • Each of the data x [m, n] and the coefficient c [n] is a two's complement binary number representing a signed fixed-point number.
  • the number of decimal places of each data x [m, n] is x_scale, and the number of decimal places of each coefficient c [n] is c_scale.
  • the value of the product-sum operation z [m] is a two's complement binary number representing a signed fixed-point number, and the number of decimal places is z_scale.
  • the arithmetic circuit of FIG. 1 includes one LUT generation circuit 1 and M (M is an integer of 2 or more) distributed arithmetic circuits 2-1 to 2-M.
  • the binomial distributed arithmetic circuit 20m-n ' forms a LUT in which the values 0, c [2 ⁇ n'-1], c [2 ⁇ n'], d [n '] are the numerical values of the respective elements, and
  • the result of product-sum operation c [2 ⁇ n′-1] ⁇ x [m, 2 ⁇ n′ ⁇ 1] + c [2 n ′] ⁇ x [m, 2 ⁇ n ′] is calculated by dispersion operation using LUT. Acquire and output as y '[m, n'].
  • the result y '[m, n'] of the product-sum operation is a two's complement binary number representing a signed fixed-point number.
  • the above description of the dispersion operation circuit 2-m is the case where N is an even number, and in the case where N is an odd number, c [N] ⁇ x [m, N] is calculated as shown in FIG.
  • An auxiliary multiplication circuit 23m is added which outputs the result as y '[m, N' + 1].
  • the digit alignment circuit 22m outputs the number of decimal places of y [m] by the arithmetic circuit by rounding off or discarding the lower bits of the result y [m] output from the distributed operation result summation circuit 21m. Processing is performed according to the number of decimal places z_scale of the power fixed-point number, and the processing result is output as z [m]. z_scale is a value smaller than the number of decimal places y_scale of y [m].
  • the digit alignment circuit 22 m that performs truncation processing outputs a value obtained by deleting the lower (y_scale-z_scale) bits of y [m]. Further, the digit alignment circuit 22m that performs rounding processing outputs a value obtained by adding the most significant bit of the bits to be deleted by the above-mentioned truncation processing to the value remaining by the truncation processing.
  • the binomial distributed arithmetic circuit 20m-n 'shown in FIG. 3 includes L LUT index circuits 200m-n'-l (select circuits) and L bit-specific arithmetic circuits 201m-n'-l. And a summing circuit 202m-n '.
  • the LUT index circuit 200m-n'-l is a bit x [m, x at the bit position l corresponding to its own circuit among the data x [m, 2 ⁇ n'-1] and x [m, 2 ⁇ n '].
  • LUT # m-n'-l is a two's complement binary number that represents a signed fixed-point number.
  • each value of bits x [m, 2 ⁇ n′ ⁇ 1] [l] and x [m, 2 ⁇ n ′] [l] and the element value LUT # m of the LUT selected at that time are shown.
  • the relationship with n'-l is shown.
  • the relationship between each value of the bits x [m, 2 ⁇ n′-1] [l] and x [m, 2 ⁇ n ′] [l] and the element value LUT # m-n′-l is generally This is the same as the relationship between the address and the stored value in the LUT in the case where the two-term product-sum operation is performed using the distributed operation.
  • LUT # m-n'-l is (c [2.times.n'-1] .times.x [m, 2.times.n'-1] [l] + c [2.times.n ']. Times.x [m, 2]. ⁇ n '] [l]).
  • Each of the LUTs # m-n'-l is subjected to a bit-wise operation by a bit-wise operation circuit 201m-n'-l.
  • the concept of the operation of the binomial distributed arithmetic circuit 20m-n ' will be described with reference to FIG.
  • This left shift operation is equivalent to multiplying the element value LUT # m-n'-l by 2 (l-Lc) , and is added to the LSB side by the left shift operation (l-Lc)
  • the bit value of is 0. Referring to FIG. 5, an example is shown in which bit position l is larger than Lc, and the bit position classified operation result BR # mn ′-(L ⁇ 1) is obtained.
  • the result of performing a left shift operation for 2 (L-Lc) bits after performing code inversion on '-L is output as a bit position-specific calculation result BR # m-n'-L.
  • the result of performing a right shift operation by (Lc-l) bits on the element value LUT # m-n'-l selected by the circuit 200 m-n'-l is the result of operation by bit position BR # m Output as -n'-l.
  • This right shift operation corresponds to dividing the element value LUT # m-n'-l by 2 (Lc-l) , and the LSB side (Lc-l) number of bits before the right shift operation is the right After the shift operation, it is not held by the circuit and becomes invalid.
  • the process of the right shift operation is equivalent to performing the truncation process on the LSB side (Lc-1) bits of the element value LUT # m-n'-l. Referring to FIG. 5, an example is shown in which the bit position l is smaller than Lc, as the bit position classified operation result BR # mn ′-(Lc ⁇ 1), BR # m n′ ⁇ 1.
  • the LSB side (Lc-1) bit values become invalid.
  • the LUT index circuit 200m-n'-l is used from four bit values for each bit position of the element values.
  • a 4: 1 selector circuit is used to select the value.
  • the LSB side (Lc-l) number of bits that become invalid by the bit position-specific arithmetic circuit 201 m-n'-l are the above-mentioned 4: By omitting one selector circuit, it is possible to reduce the circuit scale of the LUT index circuit 200m-n'-l.
  • Each bit position operation result BR # m-n'-l is a two's complement binary number representing a signed fixed point number. Therefore, in the bit width adjustment described above, it is necessary to add a bit having the same value as that of the sign bit S # l to the MSB side.
  • bit position classified operation circuit 201m-n'-l applies to element value LUT # m-n'-l.
  • bit position classified operation circuit 201m-n'-l applies to element value LUT # m-n'-l.
  • bit position classified operation circuit 201m-n'-l applies to element value LUT # m-n'-l.
  • bit position classified operation circuit 201m-n'-l applies to element value LUT # m-n'-l.
  • the value y '[m, n'] output from each of the two-term distributed arithmetic circuits 20m-n ' is the result of the product-sum operation of the data x [m, n] and the coefficient c [n].
  • the number of decimal places when the result of the product-sum operation is obtained by the conventional technique (operation combining multiplication and addition) is the number of decimal places x_scale of data x [m, n] and the decimal point of coefficient c [n]
  • the number of decimal places of the result of the product-sum operation is x_scale + c_scale.
  • the arithmetic circuit of this embodiment is not a multiplier circuit that performs accurate multiplication on all bits, but acquires element value LUT # m-n'-l from LUT for each bit position l of data, With respect to the element value LUT # m-n'-l, the lower bits designated in advance according to the bit position l, which are (Lc-1) lower bits in this embodiment, are invalidated, Perform a cumulative variance operation.
  • the present embodiment As compared with a conventional arithmetic circuit that does not perform invalidation, accumulation processing for the invalidated bits becomes unnecessary, and the circuit area and power consumption can be reduced accordingly. Further, since the low-order bits that are invalidated contain a lot of noise components, the rounding process and the round-off process are performed by the digit alignment circuit 22m in the conventional arithmetic circuit as well, so the low-order bits of this embodiment are invalidated. Does not degrade the accuracy of the value output by the arithmetic circuit.
  • the arithmetic circuit according to the present embodiment is not a multiplier circuit that performs accurate multiplication on all bits without discriminating between high-order bits and low-order bits.
  • FIG. 7 is a block diagram showing the configuration of an arithmetic circuit according to a second embodiment of the present invention.
  • the figure is
  • Each of the M complex values Z [m] corresponds to (C ⁇ X [m]). That is, the real part value z_real [m] corresponds to c_real x x real [m]-c imag x x imag [m].
  • the imaginary part value z_imag [m] corresponds to c_imag ⁇ x_real [m] + c_real ⁇ x_imag [m].
  • the real part value z_real [m] and the imaginary part value z_imag [m] are significant bits by removing the lower bits of the noise component from the multiplication result of the complex number X [m] and the complex coefficient C It is a value limited to the width.
  • the real part value z_real [m] does not always completely match c_real x x real [m]-c imag x x imag [m].
  • the imaginary part value z_imag [m] does not always completely match c_imag ⁇ x_real [m] + c_real ⁇ x_imag [m].
  • the real part value z_real [m] and the imaginary part value z_imag [m] are binary numbers of 2's complement that represent signed fixed-point numbers, and the number of decimal places is z_scale.
  • the arithmetic circuit shown in FIG. 7 includes one LUT generation circuit 1a, M (M is an integer of 2 or more) distributed arithmetic circuits 2a-1 to 2a-M, and M digit alignment circuits 3a-1 to 3a-M.
  • the LUT generation circuit 1a receives the real part value c_real and the imaginary part value c_imag of the complex number coefficient C, and the value d_sub corresponding to the difference c_real-c_imag between the real part value c_real and the imaginary part value c_imag and the real part value c_real
  • the value d_add corresponding to the sum c_real + c_imag of the imaginary part value c_imag is calculated, and the real part value c_real and the imaginary part value c_imag are output to the dispersion arithmetic circuits 2a-1 to 2a-M together with the values d_sub and d_add.
  • the dispersion operation circuit 2a-m is a real part LUT having a value of 0, c_real, -c_imag, d_sub as a numerical value of each element, and an imaginary part LUT having a value of 0, c_imag, c_real, d_add as a numerical value of each element, and
  • the result of product-sum operation of real part c_real ⁇ x_real [m] -c_imag ⁇ x_imag [m] is acquired by dispersion operation using the real part LUT, and is output as y_real [m] and an imaginary part
  • the result of product-sum operation of imaginary part c_imag ⁇ x_real [m] + c_real ⁇ x_imag [m] is acquired by the dispersion operation using the LUT for LUT and output as y_imag [m].
  • the digit alignment circuit 3a-m generates the number of decimal places of y_real [m] by the lower bit truncation or rounding off of the result y_real [m] of the product-sum operation of the real part output from the distributed arithmetic circuit 2a-m. Processing is performed according to the number of decimal places z_scale of the fixed point number to be output by the arithmetic circuit, and the processing result is output as z_real [m].
  • digit matching circuit 3a-m generates the decimal point of y_imag [m] by the lower bit truncation or rounding off of the result y_imag [m] of the product-sum operation of the imaginary part output from distributed arithmetic circuit 2a-m.
  • a process is performed to match the number with the number of decimal places z_scale of the fixed point number to be output by the arithmetic circuit, and the processing result is output as z_imag [m].
  • z_scale is a value smaller than the number of decimal places y_scale of y_real [m] and y_imag [m].
  • the digit alignment circuit 3a-m that performs truncation processing removes the lower (y_scale-z_scale) bits from y_real [m] and y_imag [m], and the values are respectively z_real [m], Output as z_imag [m]. Further, the digit alignment circuit 3a-m that performs rounding processing outputs a value obtained by adding the most significant bit of the bits to be deleted by the above-mentioned truncation processing to the value remaining by the truncation processing.
  • the distributed arithmetic circuit 2a-m shown in FIG. 8 includes L real part LUT index circuits 203m-1 (real part selection circuits), a sign inverting circuit 204, and L real part bit-specific operations.
  • the real part LUT index circuit 203m-l is the bit x_real [m] [l], x_imag [m] [l] of the data x_real [m], x_imag [m] at the bit position l corresponding to its own circuit. Based on this, one of the four element values of the real part LUT, that is, values 0, c_real, -c_imag, and d_sub, is selected, and the selected element value is acquired as LUTr # m-l.
  • the element value LUTr # m-1 is a two's complement binary number representing a signed fixed point number.
  • the LUT for LUT for imaginary part 207m-1 is the bit x_real [m] [l], x_imag [m] [l] in the bit position l corresponding to its own circuit among the data x_real [m] and x_imag [m]. Based on this, one element is selected from the four element values of the LUT for imaginary part, that is, the values 0, c_imag, c_real, and d_add, and the selected element value is acquired as LUTi # m-l.
  • the element value LUTi # m-1 is a two's complement binary number representing a signed fixed point number.
  • FIG. 9 shows the relationship between the values of the bits x_real [m] [l] and x_imag [m] [l] and the element values of the real part LUT and the imaginary part LUT selected at that time.
  • the relationship between each value of bits x_real [m] [l] and x_imag [m] [l] and the element value of the real part LUT and the element value of the imaginary part LUT is a general two-term product-sum operation. This is the same as the relationship between the address and the stored value in the LUT in the case of performing the dispersion operation.
  • the LUT element value LUTr # m selected for each bit position l (l 1,..., L) by the real part LUT index circuit 203m-l.
  • bit position-specific operations are performed by the real part bit position-specific calculating circuit 205m-l.
  • the LUT element value LUTi # m-1 selected for each bit position 1 by the imaginary part LUT index circuit 207m-1 is operated by bit position by the imaginary part bit position arithmetic circuit 208m-1. Will be applied.
  • FIG. 10 is a conceptual diagram for explaining the calculation of the distributed calculation circuit 2a-m. Note that bit-position-specific operation processing and summation processing are the same for real part and imaginary part, so in FIG. 10, bit-position-specific computation processing for real part and addition processing are described as an example There is.
  • left shift operations are equivalent to multiplying element values LUTr # m-1 and LUTi # m-1 by 2 (l-Lc) , and are added to the LSB side by the left shift operation (l Lc)
  • the number of bit values is 0. Referring to FIG. 10, an example is shown in which the bit position l is larger than Lc, and the bit position classified operation result BRr # m- (L-1) is obtained.
  • the real part bit-wise arithmetic circuit 205m-1 corresponds to the real part corresponding to the own circuit.
  • the right shift operation for (Lc-1) bits is performed on the element value LUTr # m-1 selected by the LUT index circuit 203m-1 for the real part, and the result of operation by bit position for real part BRr # m- Output as l.
  • the imaginary part bit-by-bit arithmetic circuit 208m-1 selects the element selected by the imaginary part LUT index circuit 207m-1 corresponding to its own circuit.
  • a value obtained by performing a right shift operation by (Lc-l) bits on the value LUTi # m-l is output as a calculation result BRi # m-l per imaginary bit position.
  • the operation is not performed, and the element value LUTr # m-Lc is output as it is as the calculation result BRr # m-Lc for each real part bit position.
  • the element value LUTi # m-Lc is output as it is as the imaginary-part bit-position-based calculation result BRi # m-Lc.
  • bit position-specific operation results BRr # m-l and BRi # m-l are two's complement binary numbers that represent signed fixed-point numbers. Therefore, in the above bit width alignment, it is necessary to add a bit having the same value as the sign bit to the MSB side.
  • the LSB side (Lc ⁇ l) bit values become invalid.
  • the LUT index circuits 203m-l and 207m-l to select one out of four element values of the LUT, one bit value from four bit values is selected for each bit position of the element values.
  • a 4: 1 selector circuit is used to select bit values.
  • bit position specific operation circuits 205m-1 and 208m-1 have element values LUTr # m-1 and LUTi # m-.
  • bit position specific operation circuits 205m-1 and 208m-1 When performing a right shift operation by (Lc-1) bits for l, the value of 1 bit on the MSB side among the LSB side (Lc-1) bits to be invalidated is added to the result of the right shift operation. It is also possible to set the bit position operation result BRr # m-l and BRi # m-l. This process is equivalent to rounding off the LSB side (Lc-1) bits of the element values LUTr # m-1 and LUTi # m-1.
  • the values y_real [m] and y_imag [m] output from the respective dispersion calculation circuits 2a-m are the product-sum operation results of the data x_real [m], x_imag [m] and the complex coefficient C.
  • the number of decimal places when the result of the product-sum operation is obtained by the conventional technique (operation combining multiplication and addition) is the number of decimal places x_scale of data x_real [m] and x_imag [m] and the complex coefficient C
  • the number of decimal places of the result of the product-sum operation is x_scale + c_scale.
  • the arithmetic circuit of this embodiment is not a multiplier circuit that performs accurate multiplication on all bits, but the element values LUTr # m-l and LUTi # m-l from the LUT for each bit position l of data.
  • the element value LUTr # m-l and LUTi # m-l are invalidated for the low-order bits designated in advance according to the bit position l, in this embodiment, (Lc-l) low-order bits. Then, a distributed operation is performed to accumulate them.
  • the present embodiment As compared with a conventional arithmetic circuit that does not perform invalidation, accumulation processing for the invalidated bits becomes unnecessary, and the circuit area and power consumption can be reduced accordingly. Further, since the low-order bits that are invalidated contain a lot of noise components, the rounding process and the round-off process are performed by the digit alignment circuit 22m in the conventional arithmetic circuit as well, so the low-order bits of this embodiment are invalidated. Does not degrade the accuracy of the value output by the arithmetic circuit.
  • the arithmetic circuit according to the present embodiment is not a multiplier circuit that performs accurate multiplication on all bits without discriminating between high-order bits and low-order bits. Reduces the area and power of the circuit without degrading the calculation accuracy by adopting the distributed calculation that acquires and accumulates l and LUTi # m-l and omitting the processing of the lower bits specified in advance for each bit position l There is an effect that can be done.
  • the arithmetic circuit described in the first and second embodiments can be realized by, for example, an FPGA (Field Programmable Gate Array).
  • FPGA Field Programmable Gate Array
  • (Lc-1) bits are deleted from the above-mentioned accurate product-sum operation value.
  • the value obtained by subtracting Log 2 (Lc) from the above Lr is the value of (Lc-1)
  • Lc-1 ⁇ Lr ⁇ Log 2 (Lc).
  • Lc is set to 5 or less.
  • the present invention can be applied to arithmetic circuits.
  • 1, 1a LUT generation circuit, 2-1 to 2-M, 2a-1 to 2a-M: dispersion operation circuit, 3a-1 to 3a-M, digit matching circuit, 20 m: 2-term dispersion operation circuit, 21 m: Distributed arithmetic result summing circuit, 22m ... digit matching circuit, 23m ... auxiliary multiplication circuit, 200m ... LUT index circuit, 201m ... bit position arithmetic circuit, 202m ... summing circuit, 203m ... real part LUT index circuit, 204 ...

Abstract

演算回路は、係数c[n](n=1,・・・,N)を2個ずつ組み分けしたときの組毎に計算した値を出力するLUT生成回路(1)と、データx[m,n]の組をM組含むデータセットX[m](m=1,・・・,M)のうちデータx[m,n]に係数c[n]をそれぞれ乗じて合算した積和演算の値z[m]を、M組の組毎に並列に計算する分散演算回路(2-m)を備える。分散演算回路(2-m)は、自回路に対応するN個のデータx[m,n]を2個ずつに組み分けした値と係数c[n]を2個ずつに組み分けした値とLUT生成回路(1)によって計算された値に基づいて2項積和演算の値を、2個ずつ組み分けした各組毎に計算する複数の2項分散演算回路と、計算された値を合算する合算回路と、合算された結果の小数点以下桁数を所定の小数点以桁数に合わせる桁合わせ回路から構成される。

Description

演算回路
 本発明は、ディジタル信号処理における演算回路に係り、特に積和演算を行う演算回路に関するものである。
 ディジタル信号処理における主な演算は、固定小数点の2進数として表現されたディジタル信号のデータに、同じく固定小数点の2進数として表現された係数を乗じて、これらを合算する積和演算である(非特許文献1参照)。図11に、一般的な積和演算回路の構成を示す。
 図11の積和演算回路は、各々が2進数で表現されたN個のデータx[n](n=1,・・・,N)と係数c[n](n=1,・・・,N)とを入力とする。ここで、各データx[n]は固定小数点の2進数であり、その小数点以下桁数(小数点以下のビット幅)はx_scaleである。また、各係数c[n]は固定小数点の2進数であり、その小数点以下桁数はc_scaleである。
 積和演算回路は、N個の乗算回路1000-n(n=1,・・・,N)を備える。各乗算回路1000-nは、データx[n]と係数c[n]との乗算c[n]×x[n]を行い、その結果w[n]を出力する。ここでの乗算は単純な2進数の乗算であるため、w[n]を固定小数点数として扱う場合の小数点以下桁数は、x_scale+c_scaleとなる。
 また、積和演算回路は、合算回路1001を備える。合算回路1001は、w[n](n=1,・・・,N)の合算Σn=1,・・・,N(c[n]×x[n])を行い、その結果yを出力する。ここでの合算は単純な2進数の加算を繰り返す演算であるため、yを固定小数点数として扱う場合の小数点以下桁数は、w[n]の小数点以下桁数と同じく、x_scale+c_scaleとなる。
 さらに、積和演算回路は、桁合わせ回路1002を備える。桁合わせ回路1002は、yの下位ビット切捨あるいは四捨五入によって、その小数点以下桁数を、積和演算回路が出力すべき固定小数点数zの小数点以桁数z_scaleに合わせる。通常は、小数点以桁数z_scaleは、sの小数点以下桁数x_scale+c_scaleよりも小さい値である。したがって、切捨処理を行う桁合わせ回路1002は、yの下位の(x_scale+c_scale-z_scale)個のビットを削除した値を出力する。また、四捨五入処理を行う桁合わせ回路1002は、前記の切捨処理によって削除されるビットのうち最上位1ビットを、切捨処理で残った値に加算した値を出力する。
 桁合わせ回路1002が、合算回路1001によって合算された値yに対して切捨処理あるいは四捨五入処理を行う理由を以下に説明する。
 一般的にデータや係数には雑音成分が含まれており、特に下位ビットにおいて、信号成分に対する雑音成分の比率が大きくなる。したがって、データと係数の乗算結果についても、その下位ビットにおいて、雑音成分の比率が大きくなる。特に、乗算結果を表すビットのうち、データの小数点以下桁数または係数の小数点以下桁数よりも下位のビットには、量子化雑音が含まれる。
 また、ディジタル信号処理において、ある積和演算回路が出力した値は、通常、さらに別の係数値を用いた別の積和演算回路の入力となる。このように積和演算が多段に行われるとき、入力値の桁数と比べて出力値の桁数が増加すると、後段の積和演算回路において扱う桁数が増大するため、回路規模や消費電力が増大するという問題を生じる。
 また、前段の積和演算回路内でデータと係数との乗算が行われるため、桁合わせ回路1002によって桁数を縮小しない場合の乗算以後の桁数は、データと係数の各桁数の和以上となる。したがって、前段の積和演算回路が桁数を縮小しないで出力した値を、その後段の積和演算回路が入力して演算を行う構成では、前段の積和演算回路よりも後段の積和演算回路の方が、回路規模や消費電力が大幅に増大することになる。
 したがって、後段の積和演算回路が、前段の積和演算回路によって桁数が増大した値を入力して演算を行っても、雑音成分の比率が大きい下位ビットを対象とした演算処理からは、有意な結果を得ることができない。さらに、後段の積和演算処理を担う回路の面積やその回路が消費した電力は、前記の桁数の増大によって大幅に増大するため、無駄な回路面積や消費電力が大幅に増大するという問題を生じる。
 そこで、図11の積和演算回路では、桁合わせ回路1002によって、雑音成分の高い下位ビットを削除し、有意なビット幅に限定して後段に出力することにより、後段回路のコスト(面積や消費電力)を削減している。
 このように、回路規模や消費電力を削減するため、従来の積和演算回路では、その出力値に対して雑音成分の高い下位ビットを削除する処理を行っている。しかしながら、内部の乗算回路1000-n自体は、雑音成分の高いビットであるか否かに関わらず、正確な乗算処理を行っていた。したがって、従来の積和演算回路内の乗算回路1000-nによって正確に算出された下位ビットは、桁合わせ回路1002によって雑音成分の高いビットとして削除されていた。
 乗算回路1000-nは、桁数の増加に対して回路規模や消費電力が大幅に増大する特性をもっている(バランスツリー型の乗算回路では桁数の2乗に比例する)。このため、桁数の増加は回路素子や消費電力の増大を招くが、乗算回路1000-nにより正確に算出された下位ビットは、桁合わせ回路1002によって雑音成分の高いビットとして削除される。
 したがって、従来の積和演算回路で使用されていた乗算回路1000-n内には、雑音成分が高いために桁合わせ回路1002によって無効化される下位ビット値を正確に計算するための回路が含まれており、この下位ビット値を正確に計算するための回路の面積やその回路が消費した電力は無駄になっていた。特に、ディジタル信号処理システムの精度向上のためのデータの桁数や係数の桁数を増やす場合に、無駄な回路面積と消費電力の増大を招くという課題があった。
易 茹,立岩武徳,浅見幸司,小林春夫,「遅延デジタルフィルタの分散型積和演算回路を用いたFPGA実装の検討」,第2回 電気学会 東京支部 栃木支所・群馬支所 合同研究発表会,2012年
 本発明は、上記課題を解決するためになされたもので、回路面積および消費電力を削減することができる演算回路を提供することを目的とする。
 本発明は、固定小数点の2進数であるN個(Nは2以上の整数)のデータx[m,n](n=1,・・・,N)の組をM組(Mは2以上の整数)含むデータセットX[m](m=1,・・・,M)と、固定小数点の2進数であるN個の係数c[n]とを入力とし、M個の積和演算の値z[m]を計算して出力する演算回路において、前記N個の係数c[n]を2個ずつに組み分けしたときの組毎に計算した値を出力するように構成されたLUT生成回路と、前記データセットX[m]のうちN個のデータx[m,n]に前記N個の係数c[n]をそれぞれ乗じて合算した結果である前記積和演算の値z[m]を、前記M組の各組毎に並列に計算して出力するように構成されたM個の分散演算回路とを備え、各分散演算回路は、自回路に対応するN個のデータx[m,n]を2個ずつに組み分けした値と前記N個の係数c[n]を2個ずつに組み分けした値と前記LUT生成回路によって計算された値とに基づいて、前記2個のデータx[m,n]に前記2個の係数c[n]をそれぞれ乗じて合算した2項積和演算の値を、前記2個ずつに組み分けした各組毎に並列に計算して出力するように構成された複数の2項分散演算回路と、前記複数の2項分散演算回路によって計算された値を合算する第1の合算回路と、この第1の合算回路によって合算された結果の小数点以下桁数を、この小数点以下桁数よりも小さい所定の小数点以桁数に合わせる処理を行い、この処理結果を前記積和演算の値z[m]として出力するように構成された桁合わせ回路とから構成され、各2項分散演算回路は、前記N個のデータx[m,n]のうち同一組の2個の値のビット位置毎に設けられ、値0と、前記N個の係数c[n]のうち同一組の2個の値と、この係数c[n]の2個の値から前記LUT生成回路によって計算された値とからなる要素値の中から、前記N個のデータx[m,n]のうち同一組の2個の値を構成する同一ビット位置の2個の値に対応する1個の要素値をビット位置毎に取得するように構成された複数の索引回路と、前記複数の索引回路によって取得された要素値に対してビット位置別演算を行うように構成された複数のビット位置別演算回路と、前記複数のビット位置別演算回路によって計算された値を合算した結果を前記2項積和演算の値として出力するように構成された第2の合算回路とから構成され、前記複数のビット位置別演算回路のうち、自回路の対応するビット位置lが所定の値Lc(Lcは2以上L未満の整数)より小さいビット位置別演算回路は、自回路に対応する前記索引回路によって取得された要素値の最下位ビット側の(Lc-l)ビット分を無効化することを特徴とするものである。
 また、本発明は、M個(Mは2以上の整数)の各々が実部値x_real[m]と虚部値x_imag[m](m=1,・・・,M)とに分かれる、M個の複素数X[m](m=1,・・・,M)と、実部値c_realと虚部値c_imagとに分かれる複素数係数Cとを入力とし、実部の積和演算の結果と虚部の積和演算の結果とからなるM個の複素数値Z[m]を計算して出力する演算回路において、前記複素数係数Cの実部値c_realと虚部値c_imagの差の値d_subと、実部値c_realと虚部値c_imagの和の値d_addとを計算するように構成されたLUT生成回路と、前記複素数X[m]のうち自回路に対応するデータの各々に前記複素数係数Cを乗じて合算した結果である複素数値Y[m]を、前記M個の各々について並列に計算して出力するように構成されたM個の分散演算回路と、このM個の分散演算回路から出力された複素数値Y[m]のうち、実部の積和演算の結果y_real[m]の小数点以下桁数と虚部の積和演算の結果y_imag[m]の小数点以下桁数のそれぞれを、これらの小数点以下桁数よりも小さい所定の小数点以桁数に合わせる処理を行い、この処理結果を前記複素数値Z[m]を構成するz_real[m],z_imag[m]として出力するように構成されたM個の桁合わせ回路とを備え、各分散演算回路は、前記複素数X[m]の実部値x_real[m]および虚部値x_imag[m]のビット位置毎に設けられ、値0、c_real、-c_imag、d_subからなる要素値の中から、前記実部値x_real[m]および前記虚部値x_imag[m]のうち自回路に対応するビット位置の2個の値に対応する1個の要素値をビット位置毎に取得するように構成された複数の第1の索引回路と、前記複数の第1の索引回路によって取得された要素値に対してビット位置別演算を行うように構成された複数の第1のビット位置別演算回路と、前記複数の第1のビット位置別演算回路によって計算された値を合算した結果を前記実部の積和演算の値y_real[m]として出力するように構成された第1の合算回路と、前記複素数X[m]の実部値x_real[m]および虚部値x_imag[m]のビット位置毎に設けられ、値0、c_imag、c_real、d_addからなる要素値の中から、前記実部値x_real[m]および前記虚部値x_imag[m]のうち自回路に対応するビット位置の2個の値に対応する1個の要素値をビット位置毎に取得するように構成された複数の第2の索引回路と、前記複数の第2の索引回路によって取得された要素値に対してビット位置別演算を行うように構成された複数の第2のビット位置別演算回路と、前記複数の第2のビット位置別演算回路によって計算された値を合算した結果を前記虚部の積和演算の値y_imag[m]として出力するように構成された第2の合算回路とから構成され、前記実部の積和演算c_real×x_real[m]-c_imag×x_imag[m]の結果であるy_real[m]と、前記虚部の積和演算c_imag×x_real[m]+c_real×x_imag[m]の結果であるy_imag[m]とを、前記M個の各々について並列に計算して出力するものであり、前記複数の第1、第2のビット位置別演算回路のうち、自回路の対応するビット位置lが所定の値Lc(Lcは2以上L未満の整数)より小さいビット位置別演算回路は、それぞれ自回路に対応する前記第1、第2の索引回路によって取得された要素値の最下位ビット側の(Lc-l)ビット分を無効化することを特徴とするものである。
 本発明の演算回路は、上位ビットと下位ビットを区別せずに全ビットに対して正確な乗算を行う乗算回路ではなく、データのビット位置毎にLUTを検索して要素値を累積する分散演算を採用することにより、ビット位置毎に予め指定された下位ビットに対応した処理の回路を削減することができる。前記の削減した回路は、雑音成分が高いために桁合わせ回路によって無効化される下位ビット値を計算するための無駄な回路である。本発明は、前記の無駄な回路による面積・電力を削減できる効果がある。
図1は、本発明の第1の実施例に係る演算回路の構成を示すブロック図である。 図2は、本発明の第1の実施例に係る分散演算回路の構成を示すブロック図である。 図3は、本発明の第1の実施例に係る2項分散演算回路の構成を示すブロック図である。 図4は、本発明の第1の実施例におけるLUT索引回路の動作を説明する図である。 図5は、本発明の第1の実施例に係る2項分散演算回路の演算の概念を説明する図である。 図6は、本発明の第1の実施例に係る2項分散演算回路の演算の概念を説明する図である。 図7は、本発明の第2の実施例に係る演算回路の構成を示すブロック図である。 図8は、本発明の第2の実施例に係る分散演算回路の構成を示すブロック図である。 図9は、本発明の第2の実施例における実部用LUT索引回路および虚部用LUT索引回路の動作を説明する図である。 図10は、本発明の第2の実施例に係る分散演算回路の演算の概念を説明する図である。 図11は、従来の積和演算回路の構成を示すブロック図である。
[第1の実施例]
 以下、本発明の実施例について図面を参照して説明する。図1は本発明の第1の実施例に係る演算回路の構成を示すブロック図である。本実施例の演算回路は、M組(Mは2以上の整数)のデータセットX[m](m=1,・・・,M)と、N個(Nは2以上の整数)の係数c[n](n=1,・・・,N)とを入力とする。各データセットX[m](m=1,・・・,M)は、N個のデータx[m,n](n=1,・・・,N)の組からなる。なお、データx[m,n]および係数c[n]の各々は、符号付きの固定小数点数を表現する、2の補数の2進数である。各データx[m,n]の小数点以桁数をx_scale、各係数c[n]の小数点以桁数をc_scaleとする。
 図1の演算回路は、上記入力に対して、M個の積和演算の値z[m](m=1,・・・,M)を計算して出力する。演算回路が出力する積和演算の値z[m](m=1,・・・,M)の各々は、データセットX[m](m=1,・・・,M)を構成するN個のデータx[m,n](n=1,・・・,N)の各々に係数c[n]を乗じて合算した結果、すなわちΣn=1,・・・,N(c[n]×x[m,n])に相当する結果から、雑音成分の高い下位ビットを削除して有意なビット幅に限定した値である。なお、積和演算の値z[m]は、符号付きの固定小数点数を表現する、2の補数の2進数であり、その小数点以桁数をz_scaleとする。
 図1の演算回路は、1個のLUT生成回路1と、M個(Mは2以上の整数)の分散演算回路2-1~2-Mとから構成される。
 LUT生成回路1は、積和演算の係数であるN個の係数c[n](n=1,・・・,N)を入力とし、これらを2個ずつの組に分けたときの各組の値から、分散演算用LUTの要素として使用する値を計算する。そして、LUT生成回路1は、計算した値を係数c[n]と併せて各分散演算回路2-1~2-Mに分配する。
 係数c[n](n=1,・・・,N)を2個ずつに組み分けする方法は、後述する各分散演算回路2-m(m=1,・・・,M)において行われる、分散演算に基づいた2項の積和演算の計算c[p]×x[m,p]+c[q]×x[m,q](pとqはそれぞれ1からNまでの範囲内の整数で、p≠q)でのc[p]とc[q]の組み分けと同じにする必要がある。
 本実施例では、係数c[n]を、番号順が連続する奇数番目の値と直後の偶数番目の値の2個の組に組み分けする方法を説明する。したがって、本実施例では、2個ずつの組み分けにより、c[1]とc[2]、c[3]とc[4]、・・・というように、c[2×n’-1]とc[2×n’](n’=1,・・・,N’、N’はN/2以下で最大の整数)が同じ組に属する。前記のN’の値は、Nが偶数の場合にN/2であり、Nが奇数の場合に(N-1)/2である。
 なお、本発明はこの組み分け方法に限定されず、係数c[n]の組み分け方法は、各分散演算回路2-m(m=1,・・・,M)において行われる分散演算に基づいた2項の積和演算での組み分け方法と同じであればよい。
 LUT生成回路1は、係数c[n](n=1,・・・,N)を2個ずつに組み分けした値c[2×n’-1]とc[2×n’](n’=1,・・・,N’)の和、すなわちc[2×n’-1]+c[2×n’]をd[n’]として計算し、係数c[n](n=1,・・・,N)と計算した値d[n’](n’=1,・・・,N’)とを、各分散演算回路2-1~2-Mに出力する。
 なお、本発明は、以上の計算に限定されず、各分散演算回路2-m(m=1,・・・,M)において用いられる分散演算用LUTの要素を生成するための計算であればよい。また、LUT生成回路1により計算された値d[n’]は、符号付きの固定小数点数を表現する、2の補数の2進数である。
 分散演算回路2-m(m=1,・・・,M)の各々は、N個のデータx[m,n](n=1,・・・,N)から構成されるデータセットX[m]と、LUT生成回路1から分配された係数c[n](n=1,・・・,N)およびLUT生成回路1で計算された値d[n’](n’=1,・・・,N’)とを入力とし、データセットX[m]のうち自回路に対応するN個のデータx[m,n](n=1,・・・,N)の各々に係数c[n]を乗じて合算した結果、すなわち、Σn=1,・・・,N(c[n]×x[m,n])に相当する値z[m]を出力する。
 図2に、分散演算回路2-m(m=1,・・・,M)の構成を示す。各分散演算回路2-mは、N’個の2項分散演算回路20m-n’(n’=1,・・・,N’)と、分散演算結果合算回路21mと、桁合わせ回路22mとから構成される。
 図2の分散演算回路2-mは、入力されたデータセットX[m]のうち自回路に対応するN個のデータx[m,n]に対して、LUT生成回路1が係数c[n](n=1,・・・,N)に対して行った2個ずつの組み分けと同様に、2個ずつの組み分けを行う。
 本実施例のLUT生成回路1は、係数c[n](n=1,・・・,N)のうち番号が連続する奇数番目の値と直後の偶数番目の値の2個を同じ組みとして組み分けしている。このため、各分散演算回路2-mが行うN個のデータx[m,n]の組み分けについても同じく、x[m,2×n’-1]とx[m,2×n’](n’=1,・・・,N’、N’はN/2以下で最大の整数)を1つの組とする。
 2項分散演算回路20m-n’(n’=1,・・・,N’)の各々は、自回路に対応する1組みのデータx[m,2×n’-1],x[m,2×n’]と、係数c[n](n=1,・・・,N)のうち自回路に対応する1組みの係数c[2×n’-1],c[2×n’]と、LUT生成回路1により計算された値d[n’]とを入力とする。
 2項分散演算回路20m-n’は、値0、c[2×n’-1]、c[2×n’]、d[n’]を各要素の数値とするLUTを構成し、このLUTを用いた分散演算によって、積和演算c[2×n’-1]×x[m,2×n’-1]+c[2n’]×x[m,2×n’]の結果を取得してy’[m,n’]として出力する。なお、積和演算の結果y’[m,n’]は、符号付きの固定小数点数を表現する、2の補数の2進数である。
 分散演算結果合算回路21mは、各2項分散演算回路20m-n’(n’=1,・・・,N’)が出力した値y’[m,n’]を合算、すなわち、Σn'=1,・・・,N'(y’[m,n’])を計算し、その結果をy[m]として出力する。
 なお、以上の分散演算回路2-mの説明はNが偶数の場合であり、Nが奇数の場合は、図2に示すように、c[N]×x[m,N]を計算して結果をy’[m,N’+1]として出力する補助乗算回路23mを追加する。
 さらに、Nが奇数の場合、分散演算結果合算回路21mは、各2項分散演算回路20m-n’(n’=1,・・・,N’)が出力した値y’[m,n’](n’=1,・・・,N’)と補助乗算回路23mが出力した値y’[m,N’+1]とを合算して、結果をy[m]として出力する。
 桁合わせ回路22mは、分散演算結果合算回路21mから出力された積和演算の結果y[m]の下位ビット切捨あるいは四捨五入によって、y[m]の小数点以下桁数を、演算回路が出力すべき固定小数点数の小数点以桁数z_scaleに合わせる処理を行い、その処理結果をz[m]として出力する。z_scaleは、y[m]の小数点以下桁数y_scaleよりも小さい値である。
 したがって、切捨処理を行う桁合わせ回路22mは、y[m]の下位の(y_scale-z_scale)個のビットを削除した値を出力する。また、四捨五入処理を行う桁合わせ回路22mは、前記の切捨処理によって削除されるビットのうち最上位1ビットを、切捨処理で残った値に加算した値を出力する。
 図3に、2項分散演算回路20m-n’(m=1,・・・,M、n’=1,・・・,N’)の構成を示す。ここで、2進数で表現された任意のデータx[m,n](m=1,・・・,M、n=1,・・・,N)の1個分のビット幅をLとし、2項分散演算回路20m-n’が入力とするデータx[m,2×n’-1]の各ビットをx[m,2×n’-1][l](l=1,・・・,L)、x[m,2×n’]の各ビットをx[m,2×n’][l](l=1,・・・,L)とする。
 図3に示した2項分散演算回路20m-n’は、L個のLUT索引回路200m-n’-l(選択回路)と、L個のビット位置別演算回路201m-n’-lと、合算回路202m-n’とから構成される。
 2項分散演算回路20m-n’は、データx[m,2×n’-1],x[m,2×n’]のビット位置l(l=1,・・・,L)毎に設けられたLUT索引回路200m-n’-lを有する。LUT索引回路200m-n’-lは、データx[m,2×n’-1]とx[m,2×n’]のうち自回路に対応するビット位置lにあるビットx[m,2×n’-1][l]とx[m,2×n’][l]とに基づいて、LUTの要素4個から1個を選択し、この選択した要素値をLUT#m-n’-lとして取得する。なお、LUT#m-n’-lは、符号付きの固定小数点数を表現する、2の補数の2進数である。
 図4に、ビットx[m,2×n’-1][l]およびx[m,2×n’][l]の各値と、そのとき選択されるLUTの要素値LUT#m-n’-lとの関係を示す。ビットx[m,2×n’-1][l]およびx[m,2×n’][l]の各値と要素値LUT#m-n’-lとの関係は、一般的な2項の積和演算を分散演算を用いて行う場合のLUTにおけるアドレスと記憶値との関係と同じである。LUT#m-n’-lの値は、(c[2×n’-1]×x[m,2×n’-1][l]+c[2×n’]×x[m,2×n’][l])となる。
 図3に示した2項分散演算回路20m-n’において、LUT索引回路200m-n’-lによってビット位置l(l=1,・・・,L)毎に選択された、LUTの要素値LUT#m-n’-lは、それぞれビット位置別演算回路201m-n’-lによってビット位置別演算が施される。
 合算回路202m-n’は、L個のビット位置別演算回路201m-n’-lによって計算されたビット位置別演算結果BR#m-n’-lを合算した結果、すなわち、Σl=1,・・・,L(BR#m-n’-l)をy’[m,n’]として出力する。図5を用いて、2項分散演算回路20m-n’の演算の概念を説明する。
 ビット位置別演算回路201m-n’-lは、自回路の対応するビット位置lがLc(Lcは2以上L未満の整数)より大きい場合(l=Lc+1,・・・,L)に、自回路に対応するLUT索引回路200m-n’-lによって選択された要素値LUT#m-n’-lに対して、(l-Lc)ビット分の左シフト演算を行った結果を、ビット位置別演算結果BR#m-n’-lとして出力する。
 この左シフト演算は、要素値LUT#m-n’-lに対して2(l-Lc)を乗じたことと等価であり、左シフト演算によってLSB側に追加される(l-Lc)個のビット値は0である。図5で言えば、ビット位置別演算結果BR#m-n’-(L-1)が、ビット位置lがLcより大きい場合の例を示している。
 ただし、l=Lのビット位置(データのMSB位置)に対応するビット位置別演算回路201m-n’-Lは、LUT索引回路200m-n’-Lによって選択された要素値LUT#m-n’-Lに対して符号反転を行った後に2の(L-Lc)ビット分の左シフト演算を行った結果を、ビット位置別演算結果BR#m-n’-Lとして出力する。
 また、ビット位置別演算回路201m-n’-lは、自回路の対応するビット位置lがLcより小さい場合(l=1,・・・,Lc-1)に、自回路に対応するLUT索引回路200m-n’-lによって選択された要素値LUT#m-n’-lに対して、(Lc-l)ビット分の右シフト演算を行った結果を、ビット位置別演算結果BR#m-n’-lとして出力する。
 この右シフト演算は、要素値LUT#m-n’-lを2(Lc-l)で除したことに相当し、右シフト演算前のLSB側(Lc-l)個のビット値は、右シフト演算後、回路によって保持されず無効となる。この右シフト演算の処理は、要素値LUT#m-n’-lのLSB側(Lc-l)個のビットに対して切捨処理を施すことと等価である。図5で言えば、ビット位置別演算結果BR#m-n’-(Lc-1),BR#m-n’-1が、ビット位置lがLcより小さい場合の例を示している。
 また、l=Lcのビット位置に対応するビット位置別演算回路201m-n’-Lcは、自回路に対応するLUT索引回路200m-n’-Lcによって選択された要素値LUT#m-n’-Lcに対して演算を行わず、要素値LUT#m-n’-Lcをそのままビット位置別演算結果#m-n’-Lcとして出力する。
 上述のように、ビット位置lがLcより小さい場合の各要素値LUT#m-n’-l(l=1,・・・,Lc-1)は、ビット位置別演算回路201m-n’-lでの(Lc-l)ビット分の右シフト演算によって、LSB側(Lc-l)個のビット値が無効となる。また、通常は、LUT索引回路200m-n’-lがLUTの要素値4個の中から1個を選択するために、要素値のビット位置毎に、4個のビット値から1個のビット値を選択する4:1セレクタ回路が用いられる。
 そこで、要素値LUT#m-n’-lの各ビットのうち、ビット位置別演算回路201m-n’-lにより無効となるLSB側(Lc-l)個のビットについては、前記の4:1セレクタ回路を省くことにより、LUT索引回路200m-n’-lの回路規模を削減することが可能である。
 各ビット位置別演算回路201m-n’-l(l=1,・・・,L)から出力されるビット位置別演算結果BR#m-n’-lは、合算回路202m-n’によって合算され、その合算結果Σl=1,・・・,L(BR#m-n’-l)が上記のy’[m,n’]として出力される。
 本実施例では、ビット位置lに応じて異なるビット数の左シフト演算あるいは右シフト演算が行われているため、各ビット位置別演算結果BR#m-n’-lは、それぞれ異なるビット幅となっている。そこで、合算回路202m-n’は、最大のビット幅、すなわち、ビット位置別演算結果BR#m-n’-Lのビット幅に、他のビット位置別演算結果BR#m-n’-1~BR#m-n’-(L-1)のビット幅を合わせた後に、各ビット位置別演算結果BR#m-n’-l(l=1,・・・,L)の合算を行う。
 各ビット位置別演算結果BR#m-n’-lは、符号付きの固定小数点数を表現した、2の補数の2進数である。したがって、前記のビット幅合わせでは、その符号ビットS#lと同じ値のビットをMSB側に追加する必要がある。
 なお、ビット位置lがLcより小さい場合(l=1,・・・,Lc-1)に、ビット位置別演算回路201m-n’-lが要素値LUT#m-n’-lに対して(Lc-l)ビット分の右シフト演算を行うとき、無効化されるLSB側(Lc-l)個のビットのうちMSB側1ビットの値を、前記右シフト演算の結果に加算して、ビット位置別演算結果BR#m-n’-lとすることも可能である。この処理は、要素値LUT#m-n’-lのLSB側(Lc-l)個のビットに対して四捨五入処理を施すことと等価である。
 各2項分散演算回路20m-n’が出力する値y’[m,n’]は、データx[m,n]と係数c[n]との積和演算の結果である。従来の技術(乗算と加算を組み合わせた演算)により積和演算の結果を得た場合の小数点以下桁数は、データx[m,n]の小数点以下桁数x_scaleと係数c[n]の小数点以下桁数c_scaleとの和、すなわち、x_scale+c_scaleである。また、積和演算を通常の分散演算(本実施例におけるパラメタLcの値を1とした場合に相当する)により行った場合も、積和演算の結果の小数点以下桁数はx_scale+c_scaleである。
 これに対して、本実施例では、図6に示したように、(Lc-l)個の下位ビットが無効化されているため、各2項分散演算回路20m-n’が出力する値y’[m,n’]の小数点以下桁数y’_scaleは、無効化されたビット数分だけ短くなるので、x_scale+c_scale-Lc+1となる。
 このように、本実施例の演算回路は、全ビットに対して正確な乗算を行う乗算回路ではなく、データのビット位置l毎にLUTから要素値LUT#m-n’-lを取得し、要素値LUT#m-n’-lに対して、ビット位置lに応じて予め指定された下位ビット、本実施例では(Lc-l)個の下位ビットについて、無効化した上で、これらを累積する分散演算を行う。
 これにより、本実施例では、無効化を行わない従来の演算回路と比較して、無効化されたビットに対する累積処理が不要となるため、その分の回路面積や消費電力を削減できる。また、無効化された下位ビットには雑音成分が多く含まれているため、従来の演算回路においても桁合わせ回路22mによって四捨五入処理や切捨処理が施されるので、本実施例の下位ビット無効化は、演算回路が出力する値の精度を劣化させない。
 すなわち、本実施例の演算回路は、上位ビットと下位ビットを区別せずに全ビットに対して正確な乗算を行う乗算回路ではなく、データのビット位置l毎にLUTから要素値LUT#m-n’-lを取得して累積する分散演算を採用し、ビット位置l毎に予め指定された下位ビットの処理を省くことにより、演算精度の劣化なく、回路の面積・電力を削減できる効果がある。
 特に、本実施例の演算回路は高速化のために、分散演算回路内のデータのビット位置l毎のLUT検索と累積を同時に行うためのデータビット幅分の並列化と、M個のデータセットに対する分散演算を同時に行うための分散演算回路の個数分の並列化を行っている。このため、本実施例の演算回路では、上記の無効化されたビットに対する累積処理に要する回路規模が増大しており、下位ビットの処理を省くことによる回路の削減効果は大きい。
[第2の実施例]
 次に、本発明の第2の実施例について説明する。図7は本発明の第2の実施例に係る演算回路の構成を示すブロック図である。図7の演算回路は、各々が実部値x_real[m]と虚部値x_imag[m](m=1,・・・,M)とに分かれる、M個(Mは2以上の整数)の複素数X[m](m=1,・・・,M)と、実部値c_realと虚部値c_imagとに分かれる複素数係数Cとを入力とする。なお、データx[m,n](m=1,・・・,M、n=1,・・・,N)は、負の値も取り得る符号付き数値(2の補数による2進数で表現された数値)である。各複素数X[m](m=1,・・・,M)の実部値x_real[m]および虚部値x_imag[m]の小数点以桁数をx_scale、複素数係数Cの実部値c_realおよび虚部値c_imagの小数点以桁数をc_scaleとする。
 また、2進数で表現された任意のデータx_real[m](m=1,・・・,M)およびx_imag[m](m=1,・・・,M)の1個分のビット幅をLとし、後述する分散演算回路2a-mが入力とするデータx_real[m]の各ビットをx_real[m][l](l=1,・・・,L)、x_imag[m]の各ビットをx_imag[m][l](l=1,・・・,L)とする。
 図7の演算回路は、上記入力に対して、実部値z_real[m]と虚部値z_imag[m](m=1,・・・,M)とに分かれる、M個の複素数値Z[m](m=1,・・・,M)を、分散演算(distributed arithmetic)により取得し出力する。M個の複素数値Z[m]は、各々が(C×X[m])に相当する。すなわち、実部値z_real[m]は、c_real×x_real[m]-c_imag×x_imag[m]に相当する。虚部値z_imag[m]は、c_imag×x_real[m]+c_real×x_imag[m]に相当する。
 ただし、実部値z_real[m]と虚部値z_imag[m]とは、複素数X[m]と複素数係数Cとの乗算結果に対して、雑音成分の高い下位ビットを削除して有意なビット幅に限定した値である。つまり、実部値z_real[m]は、c_real×x_real[m]-c_imag×x_imag[m]と完全に一致するとは限らない。同様に、虚部値z_imag[m]は、c_imag×x_real[m]+c_real×x_imag[m]と完全に一致するとは限らない。なお、実部値z_real[m]と虚部値z_imag[m]とは、符号付きの固定小数点数を表現する、2の補数の2進数であり、その小数点以桁数をz_scaleとする。
 図7に示す演算回路は、1個のLUT生成回路1aと、M個(Mは2以上の整数)の分散演算回路2a-1~2a-Mと、M個の桁合わせ回路3a-1~3a-Mとから構成される。
 LUT生成回路1aは、複素数係数Cの実部値c_realと虚部値c_imagとを入力とし、実部値c_realと虚部値c_imagの差c_real-c_imagに相当する値d_subと、実部値c_realと虚部値c_imagの和c_real+c_imagに相当する値d_addとをそれぞれ計算し、実部値c_realおよび虚部値c_imagと共に値d_subおよびd_addを各分散演算回路2a-1~2a-Mに出力する。
 分散演算回路2a-m(m=1,・・・,M)の各々は、複素数X[m](m=1,・・・,M)と、LUT生成回路1aから分配された実部値c_realおよび虚部値c_imagと値d_subおよびd_addとを入力とし、複素数X[m]のうち自回路に対応するデータの各々に複素数係数Cを乗じて合算した結果である複素数値Y[m](m=1,・・・,M)を、M個の各々について並列に計算して出力する。
 分散演算回路2a-mは、値0、c_real、-c_imag、d_subを各要素の数値とする実部用LUTと、値0、c_imag、c_real、d_addを各要素の数値とする虚部用LUTとを構成し、実部用LUTを用いた分散演算によって実部の積和演算c_real×x_real[m]-c_imag×x_imag[m]の結果を取得してy_real[m]として出力すると共に、虚部用LUTを用いた分散演算によって虚部の積和演算c_imag×x_real[m]+c_real×x_imag[m]の結果を取得してy_imag[m]として出力する。
 桁合わせ回路3a-mは、分散演算回路2a-mから出力された実部の積和演算の結果y_real[m]の下位ビット切捨あるいは四捨五入によって、y_real[m]の小数点以下桁数を、演算回路が出力すべき固定小数点数の小数点以桁数z_scaleに合わせる処理を行い、その処理結果をz_real[m]として出力する。同様に、桁合わせ回路3a-mは、分散演算回路2a-mから出力された虚部の積和演算の結果y_imag[m]の下位ビット切捨あるいは四捨五入によって、y_imag[m]の小数点以下桁数を、演算回路が出力すべき固定小数点数の小数点以桁数z_scaleに合わせる処理を行い、その処理結果をz_imag[m]として出力する。z_scaleは、y_real[m]やy_imag[m]の小数点以下桁数y_scaleよりも小さい値である。
 したがって、切捨処理を行う桁合わせ回路3a-mは、y_real[m],y_imag[m]に対して、下位の(y_scale-z_scale)個のビットを削除した値を、それぞれz_real[m],z_imag[m]として出力する。また、四捨五入処理を行う桁合わせ回路3a-mは、前記の切捨処理によって削除されるビットのうち最上位1ビットを、切捨処理で残った値に加算した値を出力する。
 図8に、分散演算回路2a-m(m=1,・・・,M)の構成を示す。図8に示した分散演算回路2a-mは、L個の実部用LUT索引回路203m-l(実部用選択回路)と、符号反転回路204と、L個の実部用ビット位置別演算回路205m-lと、実部用合算回路206mと、L個の虚部用LUT索引回路207m-l(虚部用選択回路)と、L個の虚部用ビット位置別演算回路208m-lと、虚部用合算回路209mとから構成される。
 分散演算回路2a-mは、データx_real[m],x_imag[m]のビット位置l(l=1,・・・,L)毎に設けられた実部用LUT索引回路203m-lと虚部用LUT索引回路207m-lとを有する。
 実部用LUT索引回路203m-lは、データx_real[m],x_imag[m]のうち自回路に対応するビット位置lにあるビットx_real[m][l],x_imag[m][l]に基づいて、実部用LUTの4要素値、すなわち値0、c_real、-c_imag、d_subの中から1個を選択し、この選択した要素値をLUTr#m-lとして取得する。要素値LUTr#m-lは、符号付きの固定小数点数を表現する、2の補数の2進数である。
 虚部用LUT索引回路207m-lは、データx_real[m],x_imag[m]のうち自回路に対応するビット位置lにあるビットx_real[m][l],x_imag[m][l]に基づいて、虚部用LUTの4要素値、すなわち値0、c_imag、c_real、d_addの中から1個を選択し、この選択した要素値をLUTi#m-lとして取得する。要素値LUTi#m-lは、符号付きの固定小数点数を表現する、2の補数の2進数である。
 図9に、ビットx_real[m][l]およびx_imag[m][l]の各値と、そのとき選択される実部用LUTの要素値および虚部用LUTの要素値との関係を示す。ビットx_real[m][l]およびx_imag[m][l]の各値と実部用LUTの要素値および虚部用LUTの要素値との関係は、一般的な2項の積和演算を分散演算を用いて行う場合のLUTにおけるアドレスと記憶値との関係と同じである。
 図8に示した分散演算回路2a-mにおいて、実部用LUT索引回路203m-lによってビット位置l(l=1,・・・,L)毎に選択された、LUTの要素値LUTr#m-lは、それぞれ実部用ビット位置別演算回路205m-lによってビット位置別演算が施される。同様に、虚部用LUT索引回路207m-lによってビット位置l毎に選択された、LUTの要素値LUTi#m-lは、それぞれ虚部用ビット位置別演算回路208m-lによってビット位置別演算が施される。
 実部用合算回路206mは、L個の実部用ビット位置別演算回路205m-lによって計算されたビット位置別演算結果BRr#m-lを合算した結果、すなわち、Σl=1,・・・,L(BRr#m-l)をy_real[m]として出力する。同様に、虚部用合算回路209mは、L個の虚部用ビット位置別演算回路208m-lによって計算されたビット位置別演算結果BRi#m-lを合算した結果、すなわち、Σl=1,・・・,L(BRi#m-l)をy_imag[m]として出力する。
 図10に、分散演算回路2a-mの演算を説明するための概念図を示す。なお、ビット位置別演算処理と合算処理とは、実部用・虚部用共に同じであるため、図10では、実部用のビット位置別演算処理と合算処理を例に挙げて記載している。
 実部用ビット位置別演算回路205m-lは、自回路の対応するビット位置lがLc(Lcは2以上L未満の整数)より大きい場合(l=Lc+1,・・・,L)に、自回路に対応する実部用LUT索引回路203m-lによってビット位置l毎に選択された要素値LUTr#m-lに対して、(l-Lc)ビット分の左シフト演算を行った結果を実部用ビット位置別演算結果BRr#m-lとして出力する。同様に、虚部用ビット位置別演算回路208m-lは、自回路の対応するビット位置lがLcより大きい場合に、自回路に対応する虚部用LUT索引回路207m-lによってビット位置l毎に選択された要素値LUTi#m-lに対して、(l-Lc)ビット分の左シフト演算を行った結果を虚部用ビット位置別演算結果BRi#m-lとして出力する。
 これらの左シフト演算は、要素値LUTr#m-l,LUTi#m-lに対して2(l-Lc)を乗じたことと等価であり、左シフト演算によってLSB側に追加される(l-Lc)個のビット値は0である。図10で言えば、ビット位置別演算結果BRr#m-(L-1)が、ビット位置lがLcより大きい場合の例を示している。
 ただし、l=Lのビット位置(データのMSB位置)に対応する実部用ビット位置別演算回路205m-Lは、実部用LUT索引回路203m-Lによって選択された要素値LUTr#m-Lに対して符号反転を行った後に2の(L-Lc)ビット分の左シフト演算を行った結果を実部用ビット位置別演算結果BRr#m-Lとして出力する。同様に、l=Lのビット位置に対応する虚部用ビット位置別演算回路208m-Lは、虚部用LUT索引回路207m-Lによって選択された要素値LUTi#m-Lに対して符号反転を行った後に2の(L-Lc)ビット分の左シフト演算を行った結果を虚部用ビット位置別演算結果BRi#m-Lとして出力する。
 また、実部用ビット位置別演算回路205m-lは、自回路の対応するビット位置lがLcより小さい場合(l=1,・・・,Lc-1)に、自回路に対応する実部用LUT索引回路203m-lによって選択された要素値LUTr#m-lに対して、(Lc-l)ビット分の右シフト演算を行った結果を実部用ビット位置別演算結果BRr#m-lとして出力する。同様に、虚部用ビット位置別演算回路208m-lは、自回路の対応するビット位置lがLcより小さい場合に、自回路に対応する虚部用LUT索引回路207m-lによって選択された要素値LUTi#m-lに対して、(Lc-l)ビット分の右シフト演算を行った結果を虚部用ビット位置別演算結果BRi#m-lとして出力する。
 これらの右シフト演算は、要素値LUTr#m-l,LUTi#m-lを2(Lc-l)で除したことに相当し、右シフト演算前のLSB側(Lc-l)個のビット値は、右シフト演算後、回路によって保持されず無効となる。この右シフト演算の処理は、要素値LUTr#m-l,LUTi#m-lのLSB側(Lc-l)個のビットに対して切捨処理を施すことと等価である。図10で言えば、ビット位置別演算結果BRr#m-(Lc-1),BRr#m-1が、ビット位置lがLcより小さい場合の例を示している。
 また、l=Lcのビット位置に対応する実部用ビット位置別演算回路205m-Lcは、自回路に対応する実部用LUT索引回路203m-Lcによって選択された要素値LUTr#m-Lcに対して演算を行わず、要素値LUTr#m-Lcをそのまま実部用ビット位置別演算結果BRr#m-Lcとして出力する。同様に、l=Lcのビット位置に対応する虚部用ビット位置別演算回路208m-Lcは、自回路に対応する虚部用LUT索引回路207m-Lcによって選択された要素値LUTi#m-Lcに対して演算を行わず、要素値LUTi#m-Lcをそのまま虚部用ビット位置別演算結果BRi#m-Lcとして出力する。
 実部用ビット位置別演算回路205m-l(l=1,・・・,L)から出力される実部用ビット位置別演算結果BRr#m-lは、実部用合算回路206mによって合算され、その合算結果Σl=1,・・・,L(BRr#m-l)がy_real[m]として出力される。同様に、虚部用ビット位置別演算回路208m-lから出力される虚部用ビット位置別演算結果BRi#m-lは、虚部用合算回路209mによって合算され、その合算結果Σl=1,・・・,L(BRi#m-l)がy_imag[m]として出力される。
 本実施例では、ビット位置lに応じて異なるビット数の左シフト演算あるいは右シフト演算が行われているため、各ビット位置別演算結果BRr#m-l,BRi#m-lは、それぞれ異なるビット幅となっている。
 そこで、実部用合算回路206mは、最大のビット幅、すなわち、ビット位置別演算結果BRr#m-Lのビット幅に、他のビット位置別演算結果BRr#m-1~BRr#m-(L-1)のビット幅を合わせた後に、各ビット位置別演算結果BRr#m-l(l=1,・・・,L)の合算を行う。同様に、虚部用合算回路209mは、ビット位置別演算結果BRi#m-Lのビット幅に、他のビット位置別演算結果BRi#m-1~BRi#m-(L-1)のビット幅を合わせた後に、各ビット位置別演算結果BRi#m-l(l=1,・・・,L)の合算を行う。
 各ビット位置別演算結果BRr#m-l,BRi#m-lは、符号付きの固定小数点数を表現した、2の補数の2進数である。したがって、前記のビット幅合わせでは、その符号ビットと同じ値のビットをMSB側に追加する必要がある。
 上述のように、ビット位置lがLcより小さい場合の各要素値LUTr#m-l,LUTi#m-l(l=1,・・・,Lc-1)は、ビット位置別演算回路205m-l,208m-lでの(Lc-l)ビット分の右シフト演算によって、LSB側(Lc-l)個のビット値が無効となる。また、通常は、LUT索引回路203m-l,207m-lがLUTの要素値4個の中から1個を選択するために、要素値のビット位置毎に、4個のビット値から1個のビット値を選択する4:1セレクタ回路が用いられる。
 そこで、要素値LUTr#m-l,LUTi#m-lの各ビットのうち、ビット位置別演算回路205m-l,208m-lにより無効となるLSB側(Lc-l)個のビットについては、前記の4:1セレクタ回路を省くことにより、LUT索引回路203m-l,207m-lの回路規模を削減することが可能である。
 なお、ビット位置lがLcより小さい場合(l=1,・・・,Lc-1)に、ビット位置別演算回路205m-l,208m-lが要素値LUTr#m-l,LUTi#m-lに対して(Lc-l)ビット分の右シフト演算を行うとき、無効化されるLSB側(Lc-l)個のビットのうちMSB側1ビットの値を、前記右シフト演算結果に加算し、ビット位置別演算結果BRr#m-l,BRi#m-lとすることも可能である。この処理は、要素値LUTr#m-l,LUTi#m-lのLSB側(Lc-l)個のビットに対して四捨五入処理を施すことと等価である。
 各分散演算回路2a-mが出力する値y_real[m],y_imag[m]は、データx_real[m],x_imag[m]と複素数係数Cとの積和演算結果である。従来の技術(乗算と加算を組み合わせた演算)により積和演算の結果を得た場合の小数点以下桁数は、データx_real[m],x_imag[m]の小数点以下桁数x_scaleと複素数係数Cの小数点以下桁数c_scaleとの和、すなわち、x_scale+c_scaleである。また、積和演算を通常の分散演算(本実施例におけるパラメタLcの値を1とした場合に相当する)により行った場合も、積和演算の結果の小数点以下桁数はx_scale+c_scaleである。
 これに対して、本実施例では、図10に示したように、(Lc-l)個の下位ビットが無効化されているため、各分散演算回路2a-mが出力する値y_real[m],y_imag[m]の小数点以下桁数y_scaleは、無効化されたビット数分だけ短くなるので、x_scale+c_scale-Lc+1となる。
 このように、本実施例の演算回路は、全ビットに対して正確な乗算を行う乗算回路ではなく、データのビット位置l毎にLUTから要素値LUTr#m-l,LUTi#m-lを取得し、要素値LUTr#m-l,LUTi#m-lに対して、ビット位置lに応じて予め指定された下位ビット、本実施例では(Lc-l)個の下位ビットについて、無効化した上で、これらを累積する分散演算を行う。
 これにより、本実施例では、無効化を行わない従来の演算回路と比較して、無効化されたビットに対する累積処理が不要となるため、その分の回路面積や消費電力を削減できる。また、無効化された下位ビットには雑音成分が多く含まれているため、従来の演算回路においても桁合わせ回路22mによって四捨五入処理や切捨処理が施されるので、本実施例の下位ビット無効化は、演算回路が出力する値の精度を劣化させない。
 すなわち、本実施例の演算回路は、上位ビットと下位ビットを区別せずに全ビットに対して正確な乗算を行う乗算回路ではなく、データのビット位置l毎にLUTから要素値LUTr#m-l,LUTi#m-lを取得して累積する分散演算を採用し、ビット位置l毎に予め指定された下位ビットの処理を省くことにより、演算精度の劣化なく、回路の面積・電力を削減できる効果がある。
 特に、本実施例の演算回路は高速化のため、分散演算回路内のデータのビット位置l毎のLUT検索と累積を同時に行うためのデータビット幅分の並列化と、M個のデータセットに対する分散演算を同時に行うための分散演算回路の個数分の並列化を行っている。このため、本実施例の演算回路では、上記の無効化されたビットに対する累積処理に要する回路規模が増大しており、下位ビットの処理を省くことによる回路の削減効果は大きい。
 第1、第2の実施例で説明した演算回路は例えばFPGA(Field Programmable Gate Array)によって実現することができる。
 なお、従来の積和演算回路では、データの小数点以下桁数をx_scaleとし、係数の小数点以下桁数をc_scaleとするとき、正確な積和演算値の小数点以下桁数はx_scale+c_scaleとなる。そして、桁合わせ回路によって、小数点以下桁数をz_scaleに丸めている。したがって、x_scale+c_scale-z_scaleが、桁合わせによって削除されるビット数Lrとなる。
 これに対して、本発明では、上記の正確な積和演算値よりも、(Lc-1)ビット分が削除されている。本発明により、回路規模や消費電力を削減しつつ、正確な積和演算値とほぼ同じ値を得たい場合は、上記LrからLog2(Lc)を減じた値を(Lc-1)の値よりも大きくする、すなわち、Lc-1<Lr-Log2(Lc)とする。例えば、Lが9、x_scale,c_scale,z_scaleが全て8の場合は、Lcを5以下とする。
 このようにLcの値を定める理由は、本発明ではデータのビット幅Lと同じ個数のLUTの索引結果を合算しており、この合算によって正確な積和演算値との差が累積されるので、差の累積によって、丸め後の値に大きい影響を及ぼさないようにするためである。
 本発明は、演算回路に適用することができる。
 1,1a…LUT生成回路、2-1~2-M,2a-1~2a-M…分散演算回路、3a-1~3a-M…桁合わせ回路、20m…2項分散演算回路、21m…分散演算結果合算回路、22m…桁合わせ回路、23m…補助乗算回路、200m…LUT索引回路、201m…ビット位置別演算回路、202m…合算回路、203m…実部用LUT索引回路、204…符号反転回路、205m…実部用ビット位置別演算回路、206m…実部用合算回路、207m…虚部用LUT索引回路、208m…虚部用ビット位置別演算回路、209m…虚部用合算回路。

Claims (8)

  1.  固定小数点の2進数であるN個(Nは2以上の整数)のデータx[m,n](n=1,・・・,N)の組をM組(Mは2以上の整数)含むデータセットX[m](m=1,・・・,M)と、固定小数点の2進数であるN個の係数c[n]とを入力とし、M個の積和演算の値z[m]を計算して出力する演算回路において、
     前記N個の係数c[n]を2個ずつに組み分けしたときの組毎に計算した値を出力するように構成されたLUT生成回路と、
     前記データセットX[m]のうちN個のデータx[m,n]に前記N個の係数c[n]をそれぞれ乗じて合算した結果である前記積和演算の値z[m]を、前記M組の各組毎に並列に計算して出力するように構成されたM個の分散演算回路とを備え、
     各分散演算回路は、
     自回路に対応するN個のデータx[m,n]を2個ずつに組み分けした値と前記N個の係数c[n]を2個ずつに組み分けした値と前記LUT生成回路によって計算された値とに基づいて、前記2個のデータx[m,n]に前記2個の係数c[n]をそれぞれ乗じて合算した2項積和演算の値を、前記2個ずつに組み分けした各組毎に並列に計算して出力するように構成された複数の2項分散演算回路と、
     前記複数の2項分散演算回路によって計算された値を合算する第1の合算回路と、
     この第1の合算回路によって合算された結果の小数点以下桁数を、この小数点以下桁数よりも小さい所定の小数点以桁数に合わせる処理を行い、この処理結果を前記積和演算の値z[m]として出力するように構成された桁合わせ回路とから構成され、
     各2項分散演算回路は、
     前記N個のデータx[m,n]のうち同一組の2個の値のビット位置毎に設けられ、値0と、前記N個の係数c[n]のうち同一組の2個の値と、この係数c[n]の2個の値から前記LUT生成回路によって計算された値とからなる要素値の中から、前記N個のデータx[m,n]のうち同一組の2個の値を構成する同一ビット位置の2個の値に対応する1個の要素値をビット位置毎に取得するように構成された複数の索引回路と、
     前記複数の索引回路によって取得された要素値に対してビット位置別演算を行うように構成された複数のビット位置別演算回路と、
     前記複数のビット位置別演算回路によって計算された値を合算した結果を前記2項積和演算の値として出力するように構成された第2の合算回路とから構成され、
     前記複数のビット位置別演算回路のうち、自回路の対応するビット位置lが所定の値Lc(Lcは2以上L未満の整数)より小さいビット位置別演算回路は、自回路に対応する前記索引回路によって取得された要素値の最下位ビット側の(Lc-l)ビット分を無効化することを特徴とする演算回路。
  2.  請求項1の演算回路において、
     前記複数のビット位置別演算回路のうち、自回路の対応するビット位置lが前記Lcより大きいビット位置別演算回路は、自回路に対応する前記索引回路によって取得された要素値に対して最下位ビット側に(l-Lc)ビット分の0を挿入する左シフト演算を行い、
     前記複数のビット位置別演算回路のうち、自回路の対応するビット位置lが前記Lcより小さいビット位置別演算回路は、自回路に対応する前記索引回路によって取得された要素値に対して(Lc-l)ビット分の右シフト演算を行い、
     前記複数のビット位置別演算回路のうち、自回路の対応するビット位置lが前記Lcと一致するビット位置別演算回路は、自回路に対応する前記索引回路によって取得された要素値をそのまま出力することを特徴とする演算回路。
  3.  請求項1または2記載の演算回路において、
     前記LUT生成回路は、前記N個の係数c[n]を2個ずつに組み分けした値c[2×n’-1]とc[2×n’](n’=1,・・・,N’)の和c[2×n’-1]+c[2×n’]を値d[n’]としてN’個(N’はN/2以下で最大の整数)の組毎に計算し、
     各分散演算回路は、前記データセットX[m]と前記LUT生成回路から出力された係数c[n]および前記LUT生成回路によって計算された値d[n’]とを入力とし、データセットX[m]のうち自回路に対応するN個のデータx[m,n]に前記N個の係数c[n]をそれぞれ乗じて合算した結果である前記積和演算の値z[m]を出力することを特徴とする演算回路。
  4.  請求項1乃至3のいずれか1項に記載の演算回路において、
     各分散演算回路は、
     前記Nが奇数の場合にc[N]×x[m,N]を計算した結果を出力するように構成された補助乗算回路をさらに備え、
     前記第1の合算回路は、前記Nが奇数の場合に、前記複数の2項分散演算回路によって計算された値と前記補助乗算回路によって計算された値とを合算することを特徴とする演算回路。
  5.  請求項1乃至4のいずれか1項に記載の演算回路において、
     前記第2の合算回路は、前記複数のビット位置別演算回路のうち最上位のビット位置に対応するビット位置別演算回路によって計算された値のビット幅に、他のビット位置別演算回路によって計算された値のビット幅を合わせた後に、前記複数のビット位置別演算回路によって計算された値を合算することを特徴とする演算回路。
  6.  M個(Mは2以上の整数)の各々が実部値x_real[m]と虚部値x_imag[m](m=1,・・・,M)とに分かれる、M個の複素数X[m](m=1,・・・,M)と、実部値c_realと虚部値c_imagとに分かれる複素数係数Cとを入力とし、実部の積和演算の結果と虚部の積和演算の結果とからなるM個の複素数値Z[m]を計算して出力する演算回路において、
     前記複素数係数Cの実部値c_realと虚部値c_imagの差の値d_subと、実部値c_realと虚部値c_imagの和の値d_addとを計算するように構成されたLUT生成回路と、
     前記複素数X[m]のうち自回路に対応するデータの各々に前記複素数係数Cを乗じて合算した結果である複素数値Y[m]を、前記M個の各々について並列に計算して出力するように構成されたM個の分散演算回路と、
     このM個の分散演算回路から出力された複素数値Y[m]のうち、実部の積和演算の結果y_real[m]の小数点以下桁数と虚部の積和演算の結果y_imag[m]の小数点以下桁数のそれぞれを、これらの小数点以下桁数よりも小さい所定の小数点以桁数に合わせる処理を行い、この処理結果を前記複素数値Z[m]を構成するz_real[m],z_imag[m]として出力するように構成されたM個の桁合わせ回路とを備え、
     各分散演算回路は、
     前記複素数X[m]の実部値x_real[m]および虚部値x_imag[m]のビット位置毎に設けられ、値0、c_real、-c_imag、d_subからなる要素値の中から、前記実部値x_real[m]および前記虚部値x_imag[m]のうち自回路に対応するビット位置の2個の値に対応する1個の要素値をビット位置毎に取得するように構成された複数の第1の索引回路と、
     前記複数の第1の索引回路によって取得された要素値に対してビット位置別演算を行うように構成された複数の第1のビット位置別演算回路と、
     前記複数の第1のビット位置別演算回路によって計算された値を合算した結果を前記実部の積和演算の値y_real[m]として出力するように構成された第1の合算回路と、
     前記複素数X[m]の実部値x_real[m]および虚部値x_imag[m]のビット位置毎に設けられ、値0、c_imag、c_real、d_addからなる要素値の中から、前記実部値x_real[m]および前記虚部値x_imag[m]のうち自回路に対応するビット位置の2個の値に対応する1個の要素値をビット位置毎に取得するように構成された複数の第2の索引回路と、
     前記複数の第2の索引回路によって取得された要素値に対してビット位置別演算を行うように構成された複数の第2のビット位置別演算回路と、
     前記複数の第2のビット位置別演算回路によって計算された値を合算した結果を前記虚部の積和演算の値y_imag[m]として出力するように構成された第2の合算回路とから構成され、
     前記実部の積和演算c_real×x_real[m]-c_imag×x_imag[m]の結果であるy_real[m]と、前記虚部の積和演算c_imag×x_real[m]+c_real×x_imag[m]の結果であるy_imag[m]とを、前記M個の各々について並列に計算して出力するものであり、
     前記複数の第1、第2のビット位置別演算回路のうち、自回路の対応するビット位置lが所定の値Lc(Lcは2以上L未満の整数)より小さいビット位置別演算回路は、それぞれ自回路に対応する前記第1、第2の索引回路によって取得された要素値の最下位ビット側の(Lc-l)ビット分を無効化することを特徴とする演算回路。
  7.  請求項6の演算回路において、
     前記複数の第1、第2のビット位置別演算回路のうち、自回路の対応するビット位置lが前記Lcより大きい第1、第2のビット位置別演算回路は、それぞれ自回路に対応する前記第1、第2の索引回路によって取得された要素値に対して最下位ビット側に(l-Lc)ビット分の0を挿入する左シフト演算を行い、
     前記複数の第1、第2のビット位置別演算回路のうち、自回路の対応するビット位置lが前記Lcより小さい第1、第2のビット位置別演算回路は、それぞれ自回路に対応する前記第1、第2の索引回路によって取得された要素値に対して(Lc-l)ビット分の右シフト演算を行い、
     前記複数の第1、第2のビット位置別演算回路のうち、自回路の対応するビット位置lが前記Lcと一致する第1、第2のビット位置別演算回路は、それぞれ自回路に対応する前記第1、第2の索引回路によって取得された要素値をそのまま出力することを特徴とする演算回路。
  8.  請求項6または7記載の演算回路において、
     前記第1の合算回路は、前記複数の第1のビット位置別演算回路のうち最上位のビット位置に対応する第1のビット位置別演算回路によって計算された値のビット幅に、他の第1のビット位置別演算回路によって計算された値のビット幅を合わせた後に、前記複数の第1のビット位置別演算回路によって計算された値を合算し、
     前記第2の合算回路は、前記複数の第2のビット位置別演算回路のうち最上位のビット位置に対応する第2のビット位置別演算回路によって計算された値のビット幅に、他の第2のビット位置別演算回路によって計算された値のビット幅を合わせた後に、前記複数の第2のビット位置別演算回路によって計算された値を合算することを特徴とする演算回路。
PCT/JP2018/046496 2018-01-05 2018-12-18 演算回路 WO2019135355A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880085295.3A CN111630509B (zh) 2018-01-05 2018-12-18 执行积和运算的运算电路
US16/959,986 US11494165B2 (en) 2018-01-05 2018-12-18 Arithmetic circuit for performing product-sum arithmetic

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-000452 2018-01-05
JP2018000452A JP6863907B2 (ja) 2018-01-05 2018-01-05 演算回路

Publications (1)

Publication Number Publication Date
WO2019135355A1 true WO2019135355A1 (ja) 2019-07-11

Family

ID=67143671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/046496 WO2019135355A1 (ja) 2018-01-05 2018-12-18 演算回路

Country Status (4)

Country Link
US (1) US11494165B2 (ja)
JP (1) JP6863907B2 (ja)
CN (1) CN111630509B (ja)
WO (1) WO2019135355A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6995629B2 (ja) * 2018-01-05 2022-01-14 日本電信電話株式会社 演算回路

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000132539A (ja) * 1998-10-28 2000-05-12 Matsushita Electric Ind Co Ltd 演算装置
JP2004171263A (ja) * 2002-11-20 2004-06-17 Sharp Corp 演算装置
US20050201457A1 (en) * 2004-03-10 2005-09-15 Allred Daniel J. Distributed arithmetic adaptive filter and method

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2630778B2 (ja) * 1987-07-17 1997-07-16 三洋電機株式会社 低周波帯域デジタルフィルタの構成方法
NZ510488A (en) * 1998-09-04 2003-07-25 Aventis Pasteur Immunotherapy for HPV DNA-positive cervical cancers with DNA constructs for the administration of HPV antigens to provide an immune response in a host
WO2000062421A1 (en) * 1999-04-14 2000-10-19 Nokia Networks Oy Digital filter and method for performing a multiplication based on a look-up table
US7043515B2 (en) * 2002-12-10 2006-05-09 Isic Corporation Methods and apparatus for modular reduction circuits
JP4724413B2 (ja) * 2004-11-26 2011-07-13 キヤノン株式会社 データ分類方法
WO2007080652A1 (ja) * 2006-01-13 2007-07-19 Fujitsu Limited モンゴメリ法用乗算剰余計算装置
GB2448744A (en) * 2007-04-26 2008-10-29 Wolfson Microelectronics Plc Look-up table indexing scheme with null values used to expand table to have a power of two number of entries in each cycle of coefficients
CN101682297B (zh) * 2007-06-04 2012-06-27 Nxp股份有限公司 包含频带选择的数字信号处理电路和方法
JP2011186592A (ja) * 2010-03-05 2011-09-22 Renesas Electronics Corp フィルタ演算器、フィルタ演算方法及び動き補償処理装置
KR20120077164A (ko) * 2010-12-30 2012-07-10 삼성전자주식회사 Simd 구조를 사용하는 복소수 연산을 위한 사용하는 장치 및 방법
WO2012111053A1 (ja) * 2011-02-15 2012-08-23 日本電気株式会社 複素演算処理用コプロセッサ及びプロセッサシステム
ES2396673B2 (es) * 2012-08-09 2014-01-24 Universidade De Santiago De Compostela Aparato y método para calcular operaciones de potenciación y extracción de raíces
US9753695B2 (en) * 2012-09-04 2017-09-05 Analog Devices Global Datapath circuit for digital signal processors
CN106293610B (zh) * 2014-07-02 2019-03-15 上海兆芯集成电路有限公司 微处理器及其方法
US10303735B2 (en) * 2015-11-18 2019-05-28 Intel Corporation Systems, apparatuses, and methods for K nearest neighbor search
JP6995629B2 (ja) * 2018-01-05 2022-01-14 日本電信電話株式会社 演算回路

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000132539A (ja) * 1998-10-28 2000-05-12 Matsushita Electric Ind Co Ltd 演算装置
JP2004171263A (ja) * 2002-11-20 2004-06-17 Sharp Corp 演算装置
US20050201457A1 (en) * 2004-03-10 2005-09-15 Allred Daniel J. Distributed arithmetic adaptive filter and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YI, RU ET AL.: "Implementation Consideration of Linear-Phase Delay Digital Filter Using Distributed Arithmetic on FPGA", JOINT RESEARCH PRESENTATION OF TOCHIGI AND GUNMA BRANCHES OF THE INSTITUTE OF ELECTRICAL ENGINEERS OF JAPAN, 29 February 2012 (2012-02-29), pages 18 - 20 , 25-26, XP055619872, [retrieved on 20190319] *

Also Published As

Publication number Publication date
JP6863907B2 (ja) 2021-04-21
CN111630509A (zh) 2020-09-04
US11494165B2 (en) 2022-11-08
US20210064340A1 (en) 2021-03-04
CN111630509B (zh) 2023-12-08
JP2019121172A (ja) 2019-07-22

Similar Documents

Publication Publication Date Title
US10768898B2 (en) Efficient modulo calculation
Gokhale et al. Design of area and delay efficient Vedic multiplier using Carry Select Adder
WO1999040508A1 (en) Fast adder/subtractor for signed floating point numbers
US5862068A (en) Arithmetic circuit for calculating a square-root of a sum of squares
JPH04205026A (ja) 除算回路
WO2019135355A1 (ja) 演算回路
Danysh et al. A recursive fast multiplier
EP1049002A2 (en) Method and apparatus for efficient calculation of an approximate square of a fixed-precision number
US4677583A (en) Apparatus for decimal multiplication
JP3660075B2 (ja) 除算装置
US7447726B2 (en) Polynomial and integer multiplication
JP2645422B2 (ja) 浮動小数点演算処理装置
JPH0793134A (ja) 乗算器
Awasthi et al. Hybrid signed digit arithmetic in efficient computing: A comparative approach to performance assay
Hu et al. Comparison of constant coefficient multipliers for CSD and booth recoding
RU2751802C1 (ru) Умножитель по модулю
JPH056263A (ja) 加算器およびその加算器を用いた絶対値演算回路
Ram et al. Efficient Hardware Design of Parameterized Posit Multiplier and Posit Adder
Iyer et al. Generalised Algorithm for Multiplying Binary Numbers Via Vedic Mathematics
US20230142818A1 (en) Circuits and methods for multiplying large integers over a finite field
US20040143619A1 (en) Sparce-redundant fixed point arithmetic modules
JPH05108308A (ja) 乗算回路
KR100241066B1 (ko) 단일명령사이클에서의 A+sin(A)식의 연산
KR950015180B1 (ko) 고속연산형 가산기
JPH06243194A (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: 18898669

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18898669

Country of ref document: EP

Kind code of ref document: A1