The present application claims the benefit under 35 U.S.C. § 119 of German Patent Application No. DE 10 2023 201 021.6 filed on Feb. 8, 2023, which is expressly incorporated herein by reference in its entirety.
The present invention relates to a circuit and to a method for carrying out a vector operation.
In many computationally intensive tasks, in particular in artificial intelligence applications or in machine learning applications that use neural networks, the determination of scalar products of vectors is required. For example, the convolutions in a “convolutional neural network,” hereinafter referred to as CNN, are scalar products of vectors. In order to carry out such vector operations quickly and efficiently, vector matrix multipliers in the form of circuits specifically provided for this purpose can be used.
In these vector matrix multipliers, which are also referred to as dot product engines, a vector of input voltages is converted into a vector of output currents by means of a matrix-like array of memristors, which are arranged at crossing points of lines running orthogonally to one another, and which connect the crossing lines in pairs, wherein the output currents are each proportional to the scalar product (dot product) of the vector of the input voltages with the conductivities of the memristors arranged in a column. The input voltages are in this case applied to the row lines running in one direction, and result in currents via the memristors into the column lines which run orthogonally thereto and are connected to a ground potential. The intensities of the output currents can be detected by means of analog-to-digital converters in order to obtain corresponding digital values for further processing. The output currents can be converted into output voltages, for example by means of transimpedance amplifiers. Such circuits can reach sizes of in each case a few 100 or 1000 rows and columns.
According to the present invention, a circuit and a method for carrying out a vector operation as well as a vector operation circuit are provided. Advantageous example embodiments of the present invention are disclosed herein.
The present invention uses the measure of reducing, in a circuit or a method for carrying out a vector operation, a measurement current flowing into or out of a column line connected to memory cells at reduction times by the cell current of already activated cells. It is thereby achieved that the intensity of the measurement current remains relatively small (in comparison to the sum of all possible cell currents) and that an analog-to-digital converter with a low resolution, i.e., a low bit number, can thus be used for the measurement thereof, which analog-to-digital converter has a low energy and space requirement.
Further advantages and embodiments of the present invention can be found in the description and the figures.
The present invention is shown schematically in the figures on the basis of exemplary embodiments and is described below with reference to the figures.
The vector matrix multiplier furthermore comprises a row line 4 for each row of the matrix-like array and a column line 6 for each column. The memristors 2 are arranged at the crossing points of the row lines and column lines running perpendicular to one another, and respectively connect a row line to a column line, which are not connected otherwise.
Unless otherwise mentioned, the terms “connect” refer to electrically conductive connections or connections for electrical signals. The terms “current,” “voltage,” “resistance,” etc. refer to electrical variables.
If voltages are applied to the row lines, currents flow from the row lines 4 through the memristors 2 into the column lines 6. This is illustrated for a column and two rows in
The total current of each column can, for example, be converted into an output voltage Ua by means of a transimpedance amplifier 8 (see
The voltages at the row lines are typically generated from digital signals by means of digital-to-analog converters 14. Likewise, the output voltages at the column lines, i.e., the voltages Ua generated by the transimpedance amplifiers, are typically again converted into a digital signal by means of sample-and-hold elements 16 (sample-and-hold circuits) and analog-to-digital converters 18. The sample-and-hold elements 16 can be integrated in the analog-to-digital converter 18 or in the analog-to-digital converters 18.
Due to the analog-to-digital converters, a considerable area requirement on the chip on which the vector matrix multiplier is implemented, and a considerable energy requirement during operation can arise. The area requirement and energy requirement associated with the analog-to-digital conversion can in each case be in the range of approximately 30-60% of the total area requirement or of the total energy requirement of the circuit.
Instead of memristors, as in
Based on an operation (e.g., scalar product, as in
In particular, ferroelectric field-effect transistors (FeFET) can be used as semiconductor switching elements. Metal-oxide field-effect transistors with a floating gate (FGMOS, floating-gate metal-oxide semiconductor field-effect transistor) can also be used as semiconductor switching elements. A corresponding material layer of the FET, e.g., a ferroelectric layer in a FeFET or a floating gate in an FGMOS, serves as a memory for the memory states. Memory states correspond to the polarization of the ferroelectric layer in a FeFET or to the charge in the floating gate in an FGMOS. In the circuit shown, n-channel semiconductor switching elements are used. In principle, the use of p-channel semiconductor switching elements is also possible, wherein the voltages and currents would then be reversed accordingly, and the terminals would have to be adapted accordingly to the voltage source and ground.
If the voltage at the gate terminal is below the set or programmed threshold voltage of a memory cell or of a semiconductor switching element 20, no current or a very low current (blocking range or linear range) flows through the semiconductor switching element 20. If the voltage at the gate terminal is above the set threshold voltage (e.g., in the saturation range) of a semiconductor switching element 20, an electrical current flows through the semiconductor switching element 20 (i.e., from the drain terminal to the source terminal). Here, it is assumed that suitable voltages are applied at the drain terminal and the source terminal of the semiconductor switching element 20, i.e., the voltage difference VDS (voltage VD at the drain terminal minus voltage VS at the source terminal) across the drain-source path is greater than or equal to the gate-source voltage VGS, i.e., the voltage difference (voltage VG at the gate terminal minus voltage VS at the source terminal) between the gate terminal and the source terminal minus the threshold voltage Vth: VDS≥(VGS−Vth). The gate-source voltage VGS minus the threshold voltage Vth is referred to as the saturation voltage VDsat=(VGS−Vth). The exceedance of the threshold voltage by the gate voltage (or by the gate-source voltage) corresponds to an activation of the respective memory cell.
The gate terminals of the semiconductor switching elements 20 are connected to respective input terminals 21 of the memory cells, which in turn are connected to row lines.
A column line 22 is provided, which is connected to a voltage source 24 or current source. Provided in the connection between the voltage source 24 and the column line 22 is a current detection unit 26 with an analog-to-digital converter 27 (also referred to in simplified form as an ADC) which is configured to measure the intensity of the electrical current (also referred to as the measurement current) flowing into the column line 22 and to determine a corresponding digital value. The digital value can be determined as a binary value, as a BCD counter code or thermometer code, as a Gray code, as a BCD code, or as a digital value of another digital number system which is well understood by a person skilled in the art.
The drain terminals of the semiconductor switching elements 20 (memory cells) are connected via respective capacitors 28 to a column line 22. The source terminals of the semiconductor switching elements 20 are connected to ground or ground terminals. Thus, if the threshold voltage is exceeded at the gate terminal of a semiconductor switching element 20, a current (also referred to as a cell current) flows through the drain-source path thereof so that the capacitor 28 that is connected between the drain terminal of this semiconductor switching element 20 and the column line 22 is charged until the saturation voltage is reached. Correspondingly, until the saturation voltage is reached, a current flows from the column line 22 to the capacitor 28 and thus from the voltage source 24 through the current detection unit 26 or via the ADC 27. When the saturation voltage is reached, the current flow through the semiconductor switching element 20 and thus also from the column line 22 to the capacitor 28 ends, i.e., the current flow from the voltage source 24 into the column line 22 is reduced at a certain time, which can be referred to as the reduction time.
In the embodiment shown, a semiconductor switching element (e.g., a MOSFET; metal-oxide semiconductor field-effect transistor) referred to as the discharge semiconductor switching element 30 is furthermore provided, which is connected to the column line 22 so that the capacitors 28 are discharged when the discharge semiconductor switching element 30 is switched into the conductive state (by applying a discharge voltage at the control terminal or gate terminal of the discharge semiconductor switching element). For example, the drain terminal of the discharge semiconductor switching element 30 is connected to the column line 22, and the source terminal of the discharge semiconductor switching element 30 is connected to ground. If the discharge semiconductor switching element 30 is in the non-conductive state, the charge on the capacitors 28 is retained. The current detection unit 26 or its analog-to-digital converter 27 and the capacitors 28 and, where applicable, the discharge semiconductor switching element 30 can be regarded as elements of a detection circuit.
Furthermore, an input voltage circuit 38 or input voltage generation circuit is provided. This circuit is configured to increase the input voltages at the input terminals 21 (or correspondingly the gate voltages at the semiconductor switching elements 20, i.e., the voltage applied to the gates of the semiconductor switching elements 20) starting from a low level, in particular starting from a level of zero (e.g., ground potential) over time (in the case of the shown n-channel semiconductor switching elements) until input voltage levels that correspond to specifiable input values are reached. It should be noted here that, if p-channel semiconductor switching elements are used, the input voltages are reduced starting from zero. In both cases, the input voltages are thus increased in terms of magnitude (starting from a low level in terms of magnitude, in particular zero).
Based on an operation between two vectors (weight vector with weight values, input vector with input values), the input voltage levels can be regarded as input values, wherein high input voltage levels correspond to large input values.
In the implementation shown of the input voltage circuit 38 (for a different implementation, which could likewise be used here, see
The input voltage sources 32 are configured to provide the input voltages at input voltage levels corresponding to the specification (input values) in a manner that can be switched on and off. That is to say, each of the input voltage sources 32 is actuated to provide an assigned one of the input voltages (namely the one to which the voltage at the input terminal 21 of the memory cell or at the gate voltage of the semiconductor switching element to which the respective input voltage source is connected is to be increased) in a manner that can be switched on and off. In a switched-off state, no voltage is provided (voltage of zero or at ground potential), and, in the switched-on state, the input voltage is provided at the respective input voltage level. The input voltage sources 32 can be actuated in order to switch between the switched-off state and the switched-on state.
If, starting from the switched-off state, the input voltage sources 32 are (simultaneously or substantially simultaneously) switched into the switched-on state, a current flow takes place via the resistors 28, which current flow leads to the gate terminals of the semiconductor switching elements 20 being charged over time, i.e., the gate voltages of the semiconductor switching elements 20 being increased over time. If, at the gate terminal of a semiconductor switching element, the threshold voltage thereof is exceeded, a current flow (cell current) occurs, as explained above, until the saturation voltage is reached at the time referred to as the reduction time.
The detection circuit is furthermore configured to detect the digital value (which corresponds to the measurement current into the column line) determined by the ADC 27, as measurement values at predetermined times, which are referred to as detection times; i.e., the entire current in the column line, which is equal to the sum of the cell currents, in this case represents a measurement current, the intensity of which is measured by the ADC. Since the current from the column line to the capacitors is in each case reduced again at the reduction times, the total current in the column line remains relatively low, assuming that not all semiconductor switching elements switch simultaneously. Accordingly, an ADC with a low resolution, i.e., a low bit number, e.g., 3-bit or 4-bit, can be used, which ADC has a low space and energy requirement. The mentioned assumption is usually met in applications in the field of artificial intelligence or neural networks since the input values and the weight values are typically distributed over respective value ranges. Such applications also have a certain error tolerance if the resolution of the ADC should not be sufficient in individual cases.
It is furthermore provided in one embodiment to assign a weighting to each detection time, wherein the weighting for earlier detection times is greater, and to determine a sum, weighted with the weightings, of the measurement values. In this way, a result of the operation of the two vectors can be determined, which result corresponds to the scalar product, given a suitable selection of the detection times and the weights. The detection circuit can be configured accordingly to carry out this weighted summation (corresponding elements of the detection circuit are not shown for the sake of clarity).
The detection times are in particular selected, for example relative to the reduction times, within the time period (rise time period) in which the input voltages or gate voltages rise or are increased. This selection can be based on a calculation and/or a simulation and/or tests. Since the input values and the weight values, which are typically given as digital values, and thus typically also the input voltage levels and the threshold values each have only a finite number of known discrete values, the possible reduction times can, for example, be determined (by calculation and/or simulation and/or tests) and the detection times can accordingly be defined relative to the possible reduction times so that respective cell currents can be present at these times.
As in
The detection circuit, which differs from that in
In the embodiment of
The voltage source 24 is connected to the column line 22 via the measurement current path 40 and the compensation current path 42 connected in parallel thereto, so that a sum current or column current of a measurement current, which flows via the measurement current path 40, and a compensation current, which flows via the compensation current path 42, flows into the column line. The intensity of the column current is therefore equal to the sum of the intensity of the measurement current and the intensity of the compensation current. The column current in turn is the sum of all cell currents of the semiconductor switching elements 20 connected to the column line 22.
An analog-to-digital converter 44 (for example as part of a current detection unit) is arranged in the measurement current path 40 and is configured to measure the intensity of the measurement current and to determine corresponding digital values, which represent the measurement values, at predetermined detection times.
The measurement values are added up by an adder register 46 configured for this purpose, in order to determine a compensation sum. The compensation path 42 in turn is configured to provide the compensation current in the compensation path such that the intensity thereof corresponds to the compensation sum. For this purpose, a digital-to-analog converter 48 can be arranged in the compensation path 42, which digital-to-analog converter converts the compensation sum present in binary form into a current (compensation current), of which the intensity corresponds to the compensation sum. The adder register 46 is connected to the analog-to-digital converter 44 (ADC) and the compensation path 42 or the digital-to-analog converter 48.
Since the column current remains unchanged at the detection times (unless a detection time coincides with a switching time of a semiconductor switching element 20), the measurement current is thus reduced at these times (or shortly thereafter) by the increase in the compensation current. As in the embodiment of
From the measurement values, as already explained in connection with
The input voltage circuit 50, which is connected via row lines 52 to the input terminals 21 of the memory cell (or to the gate terminals of the semiconductor switching elements 20), is here designed to be different from that of
Apart from the input voltage circuits shown in
In the embodiments of
A corresponding embodiment is shown in
Each memory cell in
Based on an operation between two vectors (weight vector with weight values, input vector with input values), the resistance values of the memristors can be regarded as weight values, wherein low resistance values, for example, correspond to greater weight values. If semiconductor switching elements with programmable threshold voltages are used, lower threshold voltages, for example, correspond to greater weight values. By using semiconductor switching elements with programmable threshold voltages in addition to the memristors, it is possible, for example, to represent a greater number of different weight values, in particular over a larger value range.
Depending on the programmed resistance value of the memristor 60 of a memory cell, a more or less rapid rise of the gate voltage of the semiconductor switching element 20 occurs. The memory cells are thus activated at corresponding times. Accordingly, an input voltage circuit 62 connected to the row lines 34 can be used, which provides the input voltages directly according to the input voltage levels that correspond to the input values, i.e., without voltage rise. For example, the input voltage circuit can have input voltage sources 32 connected to the row lines 34; wherein the input voltage sources are configured to provide the input voltages with the input voltage levels, similarly to what is shown in
The detection circuit of the embodiment according to
In the embodiments of
In an optional step 100, the threshold voltages of the semiconductor switching elements are programmed according to the weight entries before the voltage generation circuit and the detection circuit are actuated.
In step 110, the input voltage circuit is actuated with input values corresponding to the input entries, i.e., the input values are specified according to the input entries of the input vector or the input voltage circuit is actuated therewith (e.g., by transmitting the input values into input registers of the input voltage circuit). The input voltage circuit is also caused to generate the input voltages (for example in a rising manner in terms of magnitude up to an input voltage level according to
In step 120, the detection circuit is actuated or caused to determine the measurement values at the detection times. Here, provision can additionally be made for detection times to be specified to the detection circuit, e.g., for at least one detection time register to be set accordingly.
In step 130, detection of the measurement values or of the weighted sum of the measurement values takes place.
Steps 110, 120, and 130 can be repeated several times without step 100 being carried out again.
A vector operation circuit can comprise an embodiment of a circuit according to the present invention (as shown, for example, in
The project that has led to this application was sponsored by the joint venture ECSEL (JU) within the framework of sponsorship agreement no. 826655. The JU is supported by the research and innovation program Horizon 2020 of the European Union and Belgium, France, Germany, the Netherlands and Switzerland.
Number | Date | Country | Kind |
---|---|---|---|
10 2023 201 021.6 | Feb 2023 | DE | national |