SUM OF PRODUCTS CALCULATION CIRCUIT AND SUM OF PRODUCTS CALCULATION METHOD THEREOF
20210326115 · 2021-10-21
Assignee
Inventors
Cpc classification
G06F2207/4828
PHYSICS
International classification
Abstract
A sum of products calculation circuit and a sum of products calculation method thereof are provided. A first input terminal of a differential amplifier is coupled to a reference voltage. A first adjustable resistance unit and a first parallel resistance unit are connected in parallel between a second input terminal of the differential amplifier and an operating voltage. A second adjustable resistance unit and a second parallel resistance unit are connected in parallel between the second input terminal of the differential amplifier and ground. A processing circuit adjusts resistance values of the first adjustable resistance unit and the second adjustable resistance unit, and calculates a sum of the products of a first input parameter and a second input parameter according to the resistance value of the second adjustable resistance unit corresponding to a situation in which an output of the differential amplifier is in transition.
Claims
1. A sum of products calculation circuit, comprising: a differential amplifier, wherein its first input terminal is coupled to a reference voltage; a first adjustable resistance unit; a first parallel resistance unit, connected in parallel to the first adjustable resistance unit between a second input terminal of the differential amplifier and an operating voltage; a second adjustable resistance unit; a second parallel resistance unit, connected in parallel to the second adjustable resistance unit between the second input terminal of the differential amplifier and ground, and resistance values of the first parallel resistance unit and the second parallel resistance unit are associated with a first input parameter and a second input parameter, wherein the resistance value of the first adjustable resistance unit is R/(M−K), and the resistance value of the second adjustable resistance unit is R/K, where R is a resistance value, M and K are positive integers, and M is greater than K; and a processing circuit, coupled to the differential amplifier, the first parallel resistance unit, and the second parallel resistance unit, and the processing circuit adjusts the resistance values of the first adjustable resistance unit and the second adjustable resistance unit and calculates a sum of products of the first input parameter and the second input parameter according to the resistance value of the second adjustable resistance unit corresponding to a situation in which an output of the differential amplifier is in transition.
2. The sum of products calculation circuit according to claim 1, wherein the first parallel resistance unit comprises a plurality of resistors R1n connected in parallel, the second parallel resistance unit comprises a plurality of resistors R2n connected in parallel, the first input parameter comprises a plurality of parameters xn, and the second input parameter comprises a plurality of parameters wn, where
3. The sum of products calculation circuit according to claim 2, wherein the processing circuit adjusts a K value to adjust the resistance values of the first adjustable resistance unit and the second adjustable resistance unit, and calculates the sum of products of the first input parameter and the second input parameter according to the K value corresponding to the situation in which the output of the differential amplifier is in transition.
4. The sum of products calculation circuit according to claim 1, wherein the processing circuit adjusts a K value to adjust the resistance values of the first adjustable resistance unit and the second adjustable resistance unit, and calculates the sum of products of the first input parameter and the second input parameter according to the K value corresponding to the situation in which the output of the differential amplifier is in transition.
5. The sum of products calculation circuit according to claim 1, wherein M is equal to 255.
6. The sum of products calculation circuit according to claim 1, wherein the first parallel resistance unit and the second parallel resistance unit respectively comprise a plurality of switches, and the switches change switched-on states of the switches in response to the first input parameter and the second input parameter, and adjust the number of resistors connected in parallel, so as to enable the first parallel resistance unit and the second parallel resistance unit to be associated with the first input parameter and the second input parameter.
7. The sum of products calculation circuit according to claim 6, further comprising: a first resistor, wherein one terminal of the first resistor is coupled to the second input terminal of the differential amplifier, and another terminal of the first resistor is coupled to the first adjustable resistance unit and the first parallel resistance unit; and a second resistor, wherein one terminal of the second resistor is coupled to the second input terminal of the differential amplifier, and another terminal of the second resistor is coupled to the second adjustable resistance unit and the second parallel resistance unit.
8. A sum of products calculation method of a sum of products calculation circuit, wherein the sum of products calculation circuit comprises a differential amplifier, a first adjustable resistance unit, a first parallel resistance unit, a second adjustable resistance unit, and a second adjustable resistance unit, a first input terminal of the differential amplifier is coupled to a reference voltage, the first adjustable resistance unit and the first parallel resistance unit are connected in parallel between a second input terminal of the differential amplifier and an operating voltage, the second adjustable resistance unit and the second parallel resistance unit are connected in parallel between the second input terminal of the differential amplifier and ground, resistance values of the first parallel resistance unit and the second parallel resistance unit are associated with a first input parameter and a second input parameter, the resistance value of the first adjustable resistance unit is R/(M−K), and the resistance value of the second adjustable resistance unit is R/K, where R is a resistance value, M and K are positive integers, and M is greater than K, the sum of products calculation method of the sum of products calculation circuit comprising: adjusting the resistance values of the first adjustable resistance unit and the second adjustable resistance unit; determining whether an output of the differential amplifier is in transition; and calculating a sum of the products of the first input parameter and the second input parameter according to the resistance value of the second adjustable resistance unit corresponding to a situation in which the output of the differential amplifier is in transition.
9. The sum of products calculation method of the sum of products calculation circuit according to claim 8, wherein the first parallel resistance unit comprises a plurality of resistors R1n connected in parallel, the second parallel resistance unit comprises a plurality of resistors R2n connected in parallel, the first input parameter comprises a plurality of parameters xn, and the second input parameter comprises a plurality of parameters wn, where
10. The sum of products calculation method of the sum of products calculation circuit according to claim 9, further comprising: adjusting a K value to adjust the resistance values of the first adjustable resistance unit and the second adjustable resistance unit; and calculating the sum of products of the first input parameter and the second input parameter according to the K value corresponding to when the output of the differential amplifier is in transition.
11. The sum of products calculation method of the sum of products calculation circuit according to claim 8, further comprising: adjusting a K value to adjust the resistance values of the first adjustable resistance unit and the second adjustable resistance unit; and calculating the sum of products of the first input parameter and the second input parameter according to the K value corresponding to when the output of the differential amplifier is in transition.
12. The sum of products calculation method of the sum of products calculation circuit according to claim 8, wherein the first parallel resistance unit and the second parallel resistance unit respectively comprise a plurality of switches, and the switches change switched-on states of the switches in response to the first input parameter and the second input parameter, and adjust the number of resistors connected in parallel, so as to enable the first parallel resistance unit and the second parallel resistance unit to be associated with the first input parameter and the second input parameter.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
DESCRIPTION OF THE EMBODIMENTS
[0016]
[0017] The processing circuit 110 may adjust resistance values of the adjustable resistance unit 102 and the adjustable resistance unit 106, and determine whether an output VO of the differential amplifier A1 is in transition (such as from a high voltage level to a low voltage level, or from a low voltage level to a high voltage level). Since the resistance values of the parallel resistance unit 104 and the parallel resistance unit 108 are associated with the first input parameter x and the second input parameter w, and a voltage at the second input terminal of the differential amplifier A1 is a voltage generated by dividing the operating voltage VC by the adjustable resistance unit 102, the parallel resistance unit 104, the adjustable resistance unit 106, and the parallel resistance unit 108, the processing circuit 110 may calculate a sum of products of the first input parameter x and the second input parameter w according to a proportional relationship between the resistance value of the adjustable resistance unit 106, a parallel resistance value of the adjustable resistance unit 102 and the parallel resistance unit 104, and a parallel resistance value of the adjustable resistance unit 106 and the parallel resistance unit 108 corresponding to a situation in which the output VO of the differential amplifier is in transition, through appropriately setting the resistance values of the parallel resistance unit 104 and the parallel resistance unit 108.
[0018] For example,
[0019] Therefore, a resistance value of the resistor R11 may be as follows.
[0020] A resistance value of the nth resistor R1n, deduced by analogy, may be as follows.
[0021] Similarly, in the parallel resistance unit 108, each resistor R2n may also include two resistors connected in series. For example, a resistor R21 may include a resistor R1′ and a resistor R2′ connected in series, and resistance values of the resistor R1′ and the resistor R2′ may be as follows.
[0022] Therefore, a resistance value of the resistor R21 may be as follows.
[0023] A resistance value of the nth resistor R1n, deduced by analogy, may be as follows.
[0024] In this way, a parallel resistance value RP of the adjustable resistance unit 102 and the parallel resistance unit 104, and a parallel resistance value RS of the adjustable resistance unit 106 and the parallel resistance unit 108 may be as follows.
[0025] The processing circuit 110 may adjust a K value to change the resistance values RP and RS, and divide the operating voltage VC. In the embodiment, a voltage level of the reference voltage VR may be set to, for example, 0.5 times of the operating voltage VC, but it is not limited thereto. The processing circuit 110 may determine whether the output VO of the differential amplifier is in transition while adjusting the K value. When the output VO of the differential amplifier is in transition, it means that the resistance value RP is equal to the resistance value RS, and according to the equations (9) and (10), at this time, the resistance value R/K of the adjustable resistance unit 106 may be as follows.
[0026] Therefore, a sum of products Σxn.Math.wn of the parameters x1 to xj and the parameters w1 to wj calculated by the processing circuit 110 may be as follows.
[0027] As described above, since the sum of products calculation circuit of the embodiment is mainly designed with a parallel resistance structure, it can effectively improve the issue of an excessively large resistance value caused by too many resistances connected in series, and thus, can greatly reduce the difficulty of circuit implementation.
[0028] In addition, in some embodiments, the parallel resistance unit 104 and the parallel resistance unit 108 may be implemented by an encoder, multiple resistances, and multiple switches. The multiple switches may be, for example, transistor switches.
[0029] In addition, the adjustable resistance unit 106 may also be implemented using a similar concept. As shown in
[0030]
[0031]
[0032] In addition, in some embodiments, a first resistor coupled between the second input terminal of the differential amplifier and the first parallel resistance unit, and a second resistor coupled between the second input terminal of the differential amplifier and the second parallel resistance unit may be provided to further reduce the influence of the resistance value fluctuation of the switches in the first adjustable resistance unit, the first parallel resistance unit, the second adjustable resistance unit, and the second parallel resistance unit, and the occurrence of a calculation error in the sum of products calculation circuit can be further prevented.
[0033] In summary, the first input terminal of the differential amplifier according to the embodiment of the disclosure is coupled to the reference voltage, the first adjustable resistance unit and the first parallel resistance unit are connected in parallel between the second input terminal of the differential amplifier and the operating voltage, and the second adjustable resistance unit and the second parallel resistance unit are connected in parallel between the second input terminal of the differential amplifier and the ground, and the processing circuit adjusts the resistance values of the first adjustable resistance unit and the second adjustable resistance unit and calculates the sum of products of the first input parameter and the second input parameter according to the resistance value of the second adjustable resistance unit corresponding to the situation in which the output of the differential amplifier is in transition. Since the sum of products calculation circuit is mainly designed as a parallel resistance structure, it can effectively improve the issue of an excessively large resistance value caused by too many resistances connected in series, and can greatly reduce the difficulty of circuit implementation. In some embodiments, the sum of products calculation circuit may further include the first resistor coupled between the second input terminal of the differential amplifier and the first parallel resistance unit, and the second resistor coupled between the second input terminal of the differential amplifier and the second parallel resistance unit, so as to further reduce the influence of the resistance value fluctuation of the switches in the first adjustable resistance unit, the first parallel resistance unit, the second adjustable resistance unit, and the second parallel resistance unit, and further prevent the occurrence of a calculation error in the sum of products calculation circuit.
[0034] Although the disclosure has been described with reference to the above-mentioned embodiments, it is not intended to be exhaustive or to limit the disclosure to the precise form or to exemplary embodiments disclosed. It is apparent to one of ordinary skill in the art that modifications to the described embodiments may be made without departing from the spirit and the scope of the disclosure. Accordingly, the scope of the disclosure is defined by the claims appended hereto and their equivalents in which all terms are meant in their broadest reasonable sense unless otherwise indicated.