Apparatus and method for in-memory computing
By using pulse width modulation to control the voltage in the in-memory computing device, the calculation error and device size problems caused by PVT changes are solved, and higher calculation accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202410197481.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-02-14
- Filing Date
- 2024-02-22
- Publication Date
- 2024-08-27
AI Technical Summary
Existing in-memory computing devices suffer from large calculation errors and large device sizes when faced with process voltage temperature (PVT) changes, resulting in increased calculation accuracy and complexity.
The control voltage based on pulse width modulation is used to control the output current of the memory unit. The binary control voltage is modulated by pulse width to simplify the circuit implementation of the in-memory calculation, and the control voltage is delivered in the time periods D1 and D2 respectively to reduce the change in PVT. sensitivity.
The calculation error of the in-memory computing device is reduced, the size of the device is reduced, and the robustness to PVT changes is improved, the circuit design is simplified, and the complexity is reduced.
Smart Images

Figure CN118553291A_ABST
Abstract
Description
[0001] Priority claim
[0002] This application claims priority to French Patent Application No. 2301691 filed on February 24, 2023, the entire contents of which are incorporated herein by reference to the maximum extent permitted by law. Technical Field
[0003] The present disclosure relates generally to electronic devices, and more particularly, to electronic devices configured to perform in-memory computing (IMC) operations. Background Art
[0004] Many known applications or electronic systems use devices configured to implement in-memory computing operations. In these devices, computing operations (such as multiplication and summation of multiplication results) are at least partially implemented directly in memory cells of a memory (preferably a non-volatile memory) of the device.
[0005] Artificial intelligence (AI), artificial neural networks (ANN), and convolutional neural networks (CNN) are examples of applications that use devices configured to implement in-memory computing.
[0006] However, known devices configured to perform in-memory computations suffer from various drawbacks, for example relating to errors in the computations performed by these known devices and / or the size (ie, occupied circuit area) of these devices.
[0007] There is a need to overcome all or part of the disadvantages of known devices configured to perform in-memory computing. Summary of the invention
[0008] One embodiment provides a device configured to implement in-memory calculations that exhibit reduced calculation errors relative to known devices, for example when the calculation errors are caused by PVT ("Process Voltage Temperature") variations.
[0009] For example, one embodiment provides a device configured to implement in-memory computations that has a reduced size relative to known devices, such as when errors in these computations are caused by PVT ("Process Voltage Temperature") variations.
[0010] One embodiment provides a device comprising: memory cells, each memory cell including: a control input configured to receive a pulse width modulated control voltage; and an output configured to supply an output current, the output current having a value determined at least in part by the level of the control voltage of the memory cell and by a weight programmed in the memory cell; a connection node configured to receive the output currents of a plurality of memory cells in the memory cells during a first time period; a first circuit having an input connected to the connection node, the first circuit configured to pass an output signal having a value determined by the total amount of current received by the input of the first circuit during the first time period; and a second circuit for each memory cell in the plurality of memory cells, configured to receive a digital word and pass the control voltage to the memory cell at a first level during the first time period only during a second time period determined by the digital word.
[0011] According to one embodiment, each memory cell is configured such that the value of its output current is determined solely by the level of its control voltage and by a weight programmed in said memory cell.
[0012] According to one embodiment, each memory cell further includes a selection input and is configured so that: if its selection input receives a selection signal in a first state, then the value of its output current is at a level independent of its control voltage and independent of the value of the weight programmed in the memory cell (preferably zero); and when the state of the selection signal is different from the first state, the value of its output current is determined by the level of its control voltage, the weight programmed in the memory cell and the state of the selection signal received by the selection input.
[0013] According to an embodiment, the apparatus further comprises a selection circuit configured to deliver a selection signal of the memory cell to each memory cell of the plurality of memory cells.
[0014] According to one embodiment, each second circuit is configured such that the control voltage delivered by the second circuit comprises exactly two levels, said two levels comprising the first level.
[0015] According to an embodiment, the first node is connected to an output of each memory cell of the plurality of memory cells.
[0016] According to one embodiment, the device further includes: a connection network having an output connected to the first node and an input connected to the output of a memory cell of the plurality of memory cells; and a control circuit of the network configured to control the network during the first time period so that the first node receives the output current of each of the plurality of memory cells.
[0017] According to one embodiment, the first circuit includes an integrator circuit configured to integrate an amount of current received by the first circuit during a first time period and to deliver a first signal determined by the integration.
[0018] According to one embodiment, the first signal is an analog signal, and the first circuit further comprises an analog-to-digital converter configured to convert the first analog signal into a digital signal determining an output signal of the first circuit.
[0019] According to one embodiment, a first circuit comprises an oscillator having an oscillation frequency determined by a total current available on the first node, and a counter configured to deliver a digital signal having a value determined by a number of oscillations counted during the first time period, an output signal of the first circuit being determined by the digital signal delivered by the counter.
[0020] According to one embodiment, the first time period is equal to K times of one cycle of the clock, where K is a constant, and for each memory cell of the plurality of memory cells, the second time period is equal to Q times of the clock cycle, where Q is a number less than or equal to K.
[0021] According to one embodiment, the numbers K and Q are integers.
[0022] According to one embodiment, each second circuit comprises a counter configured to: receive the digital word received by the second circuit, count the number of cycles of the clock during the first time period, and during the first time period, if the counted number of cycles is less than the value determined by the digital word, then pass an output signal in a first binary state, and otherwise pass an output signal in a second binary state, the second circuit being further configured to pass the control voltage at the first level if the output signal of the counter is in the first binary state.
[0023] According to one embodiment, the number K is determined by a maximum value of the digital word and, for each memory cell of the plurality of memory cells, the number Q is determined by a value of the digital word received by a second circuit delivering a control voltage to the cell.
[0024] One embodiment provides a method implemented in a device including memory cells, each memory cell including a control input configured to receive a control voltage and an output configured to supply an output current, the output current having a value determined at least in part by the level of the control voltage of the memory cell and by a weight programmed in the memory cell, the method comprising during a first time period: providing the output currents of a plurality of memory cells of the memory cells of the device to a connection node; delivering an output signal with a first circuit having an input connected to the first node, the output signal having a value determined by the total amount of current received by the input of the first circuit during the first time period; and for each of the plurality of memory cells, receiving a digital word with a second circuit and delivering with the second circuit the control voltage of the memory cell at a first level only during a second time period determined by the received digital word. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The foregoing features and advantages, as well as other features and advantages, will be described in detail in the remainder of the disclosure of specific embodiments given by way of illustration and not limitation, with reference to the accompanying drawings, in which:
[0026] Figure 1 An example of a device configured to implement in-memory computing is schematically illustrated in block form;
[0027] Figure 2 An example of an embodiment of a device configured to implement in-memory computing is schematically illustrated in block form;
[0028] Figure 3 The diagram is schematically shown in the form of a box. Figure 2 Examples of embodiments of circuits of the device;
[0029] Figure 4 The diagram is schematically shown in the form of a box. Figure 2 An example of another circuit embodiment of a device;
[0030] Figure 5 Another example of an embodiment of a device configured to implement in-memory computing is schematically illustrated in block form; and
[0031] Figure 6 The diagram is schematically shown in the form of a box. Figure 2 and 5 An optional embodiment of the device. DETAILED DESCRIPTION
[0032] In the various drawings, the same features are represented by the same reference numerals. In particular, common structural and / or functional features in various embodiments may have the same reference numerals and may be provided with the same structure, dimensions and material properties.
[0033] For the sake of clarity, only the steps and elements used to understand the embodiments are detailed and described. In particular, the conventional memory units used to implement in-memory computing in the described devices are not described in a detailed manner, and the described embodiments and variants are compatible with these conventional memory units. In addition, conventional electronic systems and conventional applications (AI, ANN, CNN) in which one or more devices configured to implement in-memory computing are used are not described in detail, and the described embodiments and variants are compatible with these conventional systems and applications.
[0034] Unless otherwise specified, when referring to two elements being connected together, this means a direct connection without any intermediate elements except conductors, and when referring to two elements being coupled together, this means the two elements may be connected or they may be coupled via one or more other elements.
[0035] In the following description, when reference is made to terms defining absolute positions (such as terms “front”, “back”, “top”, “bottom”, “left”, “right”, etc.) or relative positions (such as terms “upper”, “lower”, “upper”, “lower”, etc.) or terms defining directions (such as terms “horizontal”, “vertical”, etc.), reference is made to the direction of the drawings, unless otherwise specified.
[0036] Unless otherwise stated, the expressions "about", "approximately", "substantially" and "in the order of" mean plus or minus 10%, preferably plus or minus 5%.
[0037] Figure 1 Examples of devices configured to implement in-memory computing are schematically illustrated in block form.
[0038] Device 1 includes N identical memory cells Ci, where N is an integer greater than or equal to 2 and i is an integer index from 1 to N. Figure 1 In the example of , N is equal to 4, so the device comprises N memory cells C1, C2, C3 and C4. For example, the N memory cells Ci form part of the memory of the device 1 comprising M memory cells identical to the cells Ci, where M is an integer greater than or equal to N.
[0039] Each memory cell Ci includes a control input configured to receive a control voltage Vi_a, where i is an integer index ranging from 1 to N ( Figure 1 V1_a, V2_a, V3_a and V4_a in it).
[0040] Each memory cell Ci also includes an output terminal that provides a current Ii, where i is an integer index from 1 to N ( Figure 1 , I1, I2, I3 and I4 in ). For each memory cell Ci, the current Ii has a value determined by the value of the voltage Vi_a received by the memory cell Ci and the weight Wi programmed in the memory cell Ci, for example, a value equal to the product of the voltage Vi_a and the weight Wi. As an example, the programming of the weight Wi in the memory cell Ci corresponds to the programming of the resistance value of the memory cell or the bias current of the memory cell.
[0041] The outputs of the N memory cells Ci are all connected to the same connection node 100. The node 100 thus receives the current Ii from the N memory cells Ci.
[0042] For each of the N memory cells Ci, the device 1 further comprises a digital-to-analog converter DACi, where i is an integer index from 1 to N ( Figure 1 Each converter DACi is configured to receive a digital word V1_n ( Figure 1 , i.e., values encoded in the form of digital words, and thus receive a value of a plurality of bits. Each converter DACi is further configured to transfer the control voltage Vi_a of the memory cell Ci to the corresponding memory cell Ci (having the same index i), so that the value of the voltage Vi_a is determined by the digital word Vi_n. In other words, each converter DACi is configured to convert the digital word Vi_n it receives into an analog voltage Vi_a, which is transferred to the memory cell Ci.
[0043] As an example, the device 1 comprises a circuit 102 configured to deliver digital words Vi_n to the converters DACi. As an example, these digital words Vi_n are the result of previous calculations, for example calculations implemented by previous layers of a neural network.
[0044] The device 1 further comprises an analog-to-digital converter ADC. The ADC converter has an input connected to the node 100. Thus, the input of the ADC converter receives a current IS equal to the sum of the currents Ii. The ADC converter is configured to deliver a digital output word V_n corresponding to the result of the analog-to-digital conversion of the current IS.
[0045] Thus, in operation, the device 1 is capable of performing an in-memory computation consisting of N multiplications Vi_n*Wi (i.e., N multiplications Vi_a*Wi) and the sum of the results of the N multiplications. The result of this sum, i.e. Figure 1The current IS in is then converted by the ADC circuit to obtain the word V_n.
[0046] However, in the device 1 , the larger the number N of multiplications is, the larger the number of converters DAC1 is, and thus the size of the device 1 increases.
[0047] Furthermore, the ADC circuit used to convert the current IS into the digital word V_n is sensitive to process, voltage, temperature (PVT) variations, whereby errors associated with PVT variations may be introduced by the ADC converter into the result V_n. Similarly, the circuit DACi is sensitive to PVT variations, whereby errors associated with PVT variations may be introduced into the value of the voltage Vi_a, and thus into the result V_n.
[0048] Furthermore, when the digital word Vi_n can take on X different values, where X is greater than 2, not only must the converter DACi have a precision or resolution sufficient to deliver an analog control voltage Vi_a capable of taking on X different corresponding values, but also, for each value of the weight Wi that can be programmed in this memory cell, each memory cell Ci must be able to deliver a current Ii capable of taking on X different corresponding values, which complicates the implementation of the device 1. However, this implies providing an ADC circuit with sufficient resolution.
[0049] Provided herein is an apparatus and method for implementing in-memory computing, wherein memory cells similar to the previous memory cells Ci are each controlled by a pulse width modulated binary control voltage based on the value of a corresponding digital word.
[0050] This makes it possible to avoid the use of digital-to-analog converters for generating the control voltages of the memory cells based on the digital words.
[0051] This further enables simplifying the implementation of the circuitry of the device that delivers a signal representing the result of a calculation within the memory based on the output current of the memory cell and / or making the circuitry more robust to PVT variations.
[0052] Figure 2 An example of an embodiment of an apparatus 2 configured to implement in-memory computing is schematically illustrated in block form.
[0053] Similar to device 1, device 2 includes N identical memory cells C'i, where N is an integer greater than or equal to 2, and i is an integer index from 1 to N. Figure 2 In the example of , N is equal to 4, and the device therefore includes N memory cells C'1, C'2, C'3 and C'4.
[0054] The N memory cells C′i for example form part of a memory of a device 2 comprising M memory cells identical to the memory cells C′i, where M is an integer greater than or equal to N.
[0055] For example, when the device 2 comprises M memory cells identical to the N memory cells C'i, where M is greater than N, the M memory cells are for example arranged in a memory cell array comprising rows and columns of memory cells. In this case, the N memory cells C'i for example form part of the same column of the array.
[0056] However, in other examples, the N memory cells Ci' may form part of different rows and / or columns of the M memory cell array.
[0057] Each memory cell C'i includes a control input configured to receive a control voltage Vi_pwm, where i is an integer index from 1 to N ( Figure 2 The voltage Vi_pwm is a voltage that takes only two levels (ie, a first high level and a second low level). Preferably, the low level of each voltage Vi_pwm corresponds to a zero voltage Vi_pwm.
[0058] The control input of each memory cell C'i corresponds, for example, to a row selection input of the array of the same M memory cells as the memory cell Ci'. In this case, all memory cells of the same row of the array receive, for example, the same voltage Vi_pwm, which is delivered to the memory cells of the row of the array through a conductor (e.g., called a word line) connected to the control input of each of the memory cells of this row of the array.
[0059] In order to deliver a control voltage Vi_pwm to N memory cells C'i based on a digital word Vi_n during a first time period D1, the device 2 comprises, for each memory cell C'i, a circuit PWMi, where i is an integer index from 1 to N ( Figure 2 PWM1, PWM2, PWM3, PWM4).
[0060] Each circuit PWMi is configured to receive a respective digital word Vi_n and to deliver a respective control voltage Vi_pwm to the memory cell C′i under consideration during a period D1 .
[0061] Each circuit PWMi is configured such that, during the time period D1 , the voltage Vi_pwm is at its first high level during a second time period D2 determined by the digital word Vi_n (ie by the value of the digital word Vi_n).
[0062] For example, for each voltage Vi_pwm, when the corresponding word Vi_n is zero, the ratio of the time period D2 to the time period D1 is minimum and zero, that is, represents a zero value, and when the word Vi_n is maximum, the ratio D2 / D1 is maximum and equal to 1, that is, represents a maximum value. In other words, during the time period D1, the duty cycle D2 / D1 of each voltage Vi_pwm is determined by the value of the corresponding digital word Vi_n.
[0063] As an example, in device 2, word Vi_n is passed to circuit PWMi by control circuit CTRL of device 2. By way of example, when N memory cells C'i form part of an array of M identical memory cells, circuit CTRL is a circuit for controlling a row of the array.
[0064] In the device 2 , the time period D1 is constant for each implemented in-memory computation and is common to the combination of N memory cells C′ i used in the in-memory computation.
[0065] According to an embodiment, although this Figure 2 It is not shown in , but the time period D1 corresponds to a constant number K of cycles of the clock clk of the device 2. Preferably, the number K is an integer, which simplifies the implementation of the device 2 relative to the case where the number K is a decimal.
[0066] In such an embodiment, for each memory cell C'i, the duration D2 of the first high level of the respective control voltage Vi_pwm corresponds to a number Q of cycles of the clock clk of the device 2. Preferably, the number Q is an integer, which simplifies the implementation of the device 2 relative to the case where the number K is C'1.
[0067] However, in an alternative embodiment, the voltages Vi_pwm (each of which has a ratio of time periods D2 / D1 determined by the corresponding word Vi_n) are generated by a conventional circuit for generating pulse-width modulated voltages, and the time periods D1 and D2 do not necessarily correspond to a number K and Q cycles of the clock clk of the device 2, respectively.
[0068] Preferably, when the time periods D1 and D2 correspond to respective numbers K and Q cycles of the clock clk of the device 2, the number K is determined by the maximum value taken by the word Vi_n, while the number Q is determined, for each memory cell C'i, or in other words, for each circuit PWMi, by the value of the word Vi_n received by this circuit PWMi.
[0069] Preferably, when the durations D1 and D2 correspond to integers K and Q of clock periods clk, respectively, the number K is equal to the total number of values that each word Vi_n can take, minus 1. In this case, each value of the word Vi_n corresponds to an integer value Q ranging from 0 to K-1, for example a zero value when the word Vi_n is zero, and equal to the maximum value of K when the word Vi_n is a maximum value. This further simplifies the implementation of the device 2.
[0070] Each memory cell C'i further includes an output supplying a current Ii_pwm, where i is an integer index ranging from 1 to N ( Figure 2 Each memory cell C'i is configured to supply a current Ii_pwm at a value determined at least in part by the product of the voltage Vi_pwm it receives and the weight Wi programmed in the memory cell. Preferably, when the memory cell C'i receives a low level voltage Vi_pwm, the current Ii_pwm it provides is zero.
[0071] According to an embodiment, each memory cell C′i is configured to supply a current Ii_pwm only at the level of the voltage Vi_pwm received by it and at a value determined by a weight Wi programmed in the memory cell.
[0072] As Figure 2 In a variant not shown in FIG. 4 , each memory cell C′i further comprises a selection input. The selection input of the memory cell C′i is configured to receive a selection signal, preferably a selection voltage.
[0073] In this variation, each memory cell C'i is configured to provide a current Ii_pwm having a value determined by the level of the voltage Vi_pwm it receives, the weight Wi programmed in the memory cell and the value of the selection voltage it receives, for example a value determined by the product of the voltage Vi_pwm, the weight Wi and the selection voltage of the memory cell.
[0074] When the memory cell C'i forms part of an array of M memory cells, this select input of each memory cell C'i corresponds to, for example, a column select input. In this case, all memory cells of the same column of the array receive, for example, the same select voltage, which is delivered to the memory cells of the column of the array through a conductive line (e.g., called a bit line) connected to the select input of each of the memory cells of this column of the array.
[0075] Preferably, in this variant, each memory cell C′i is configured to provide its current Ii_pwm with a zero value if the selection signal it receives is in a first state, for example a first state corresponding to a zero value of the selection signal.
[0076] For example, when the selection signal delivered to a memory cell C′i can assume at least two other states than the first state, this makes it possible to weight the value of the weight Wi programmed in the memory cell with the selection signal of this memory cell.
[0077] The device 2 comprises a connection node 200. The node 200 is configured to receive the output current Ii_pwm of the N memory cells C'i during a first time period D1 (ie over the entire time period D1).
[0078] According to one embodiment, Figure 2 As shown, the node 200 is connected to the outputs of all N memory cells C′i, and the node 200 may also be connected to the outputs of other memory cells among the M memory cells of the device 1 .
[0079] As Figure 2 In a variant not shown in FIG. 2 , the node 200 is coupled to the outputs of the N memory cells C′i via a connection network having inputs connected to the outputs of the N memory cells C′i and, for example, to outputs of other memory cells of the M memory cells of the device 2 .
[0080] The device 2 then comprises a circuit for controlling the connection network, which is configured to control the connection network so that during the time period D1, i.e. during the entire time period D1, the node 200 receives the output current Ii_pwm of the N memory cells C'i. For example, when the connection network is connected to the outputs of other memory cells besides the N memory cells C'i, the control circuit of the connection network is further configured so that over the entire time period D1, the outputs of these other memory cells are electrically insulated from the node 200 by the connection network.
[0081] The device 2 further comprises an integration and analog-to-digital conversion circuit INT / ADC. An input 202 of the circuit INT / ADC is connected to the node 200. Thus, the circuit INT / ADC receives during the time period D1 the sum IS_pwm of the output currents I1_pwm, I2_pwm, I3_pwm and I4_pwm supplied by the N memory cells C'1, C'2, C'3 and C'4, the outputs of which are electrically coupled to the node 200 during the time period D1. The circuit INT / ADC is configured to deliver, based on the sum IS_pwm of the currents Ii_pwm it receives from the node 200, a signal V_n having a value determined by the total amount of the current IS_pwm received by its input 202 over the entire time period D1. Preferably, the signal V_n is a digital word, i.e. a digital signal on a plurality of bits, encoding a value determined by the total amount of the current received by the input 202 of the circuit over the entire period D1.
[0082] According to one embodiment, in order to deliver a signal V_n based on the total amount of current IS_pwm received by its input 202 during the period D1, the circuit INT / ADC comprises an integrator circuit ( Figure 2 ), the integrator circuit is configured to integrate the amount of current IS_pwm received during the entire time period D1, that is, to calculate or determine the total amount of current received by the input 202 during the time period D1. The integrator circuit then delivers a signal representing the total amount of current received by its input 202 during the period D1.
[0083] As an example, the integrator circuit is an analog circuit having an input coupled to (preferably connected to) an input 202 of the circuit INT / ADC. In this case, the signal delivered by the integrator circuit is an analog signal. The circuit INT / ADC can then include an analog-to-digital converter configured to deliver a digital word resulting from an analog-to-digital conversion of the output signal of the integrator circuit, and to determine the signal V_n based on the digital word. As a variant, the signal V_n is an analog signal determined by the output signal of the integrator circuit, and the circuit INT / ADC does not include an analog-to-digital converter.
[0084] As an alternative example, the integrator circuit is a digital circuit. In this case, the circuit INT / ADC includes an analog-to-digital converter having an input coupled to (preferably connected to) an input 202 of the circuit INT / ADC, and the analog-to-digital converter converts the signal IS_pwm received during the time period D1 into digital samples having a capture frequency greater than the inverse of the time period D1 (e.g., at least 10 times greater). The integrator digital circuit receives these digital samples and integrates them, i.e., adds them here to deliver a digital signal representing the total amount of the current IS_pwm received during the time period D1. The signal V_n is then a digital signal determined based on the output digital signal of the integrator circuit.
[0085] As an alternative embodiment, in order to deliver a signal V_n based on the total amount of current IS_pwm received by its input 202 during the period D1, the circuit INT / ADC comprises an oscillator ( Figure 2 202 ), which has an oscillation frequency determined by the current IS_pwm received by the input 202. For example, the oscillator is powered by the current IS_pwm so that when the value of the current IS_pwm changes, the frequency of the oscillation changes accordingly. The oscillator is, for example, a ring oscillator. In this variant, the circuit INT / ADC also includes a counter, which is configured to transmit a digital output signal having a value determined by the counted number of oscillations of the oscillator during the time period D1, that is, over the entire time period D1. Therefore, the number of counted oscillations represents the total amount of current IS_pwm received during the time period D1, and the output signal V_n of the circuit INT / ADC is then determined based on the output signal of the counter.
[0086] Despite Figure 1 In the device 1, the instantaneous value of the current Ii of each memory cell Ci represents the product of the voltage Vi_a (and therefore the value of the word Vi_n) and the weight wi programmed in this memory cell. Figure 2 In device 2, due to the fact that the voltage Vi_pwm is based on the pulse width modulated voltage of the word Vi_n, the total amount of current Ii_pwm supplied by each memory cell C'i during the entire time period D1 represents the product of the voltage Vi_pwm (and therefore the value du of the word Vi_n) and the weight wi programmed in this memory cell.
[0087] Since the voltage Vi_pwm takes only two levels, in contrast to the voltage Vi_a, this makes it possible to simplify the device 2 relative to the device 1 .
[0088] In addition, since the N circuits DACi are replaced by N circuits PWMi and the circuit area occupied by the circuit PWMi is smaller than the circuit area occupied by the circuit DACi, the circuit area occupied by the device 2 is smaller than the circuit area occupied by the device 1.
[0089] This also enables an improvement in the calculation accuracy due to the fact that the circuit PWMi and therefore the voltage Vi_pwm are less sensitive to PVT variations than the circuit DACi and therefore the voltage Vi_a.
[0090] Figure 3 The time periods D1 and D2 corresponding to the time periods D1 and D2 are schematically shown in the form of boxes. Figure 2 In the case of device 2 clock clk cycle number K and Q, Figure 2 Examples of embodiments of circuits PWMi of the device 2. Preferably, all circuits PWMi are identical.
[0091] In the example of this embodiment, the circuit PWMi comprises a counter COUNTER with a nominal frequency of the clock clk. Then, the circuit PWMi and the counter COUNTER respectively receive the clock clk. The counter COUNTER also receives the digital word Vi_n. In order to know the start of the time period D1, the circuit PWMi and the circuit COUNTER each receive a signal start indicating the start of each time period D1, for example by switching between two states of the signal start.
[0092] During each time period D1, the counter COUNTER is configured to count the number of cycles of the clock clk. As long as the counted number is less than the value determined by the word Vi_n, the counter COUNTER transmits the binary signal sig2 in the first state, otherwise it transmits the binary signal sig2 in the second binary state, that is, the binary signal sig2 is transmitted as soon as the counter number of clock cycles clk reaches this value or exceeds this value.
[0093] The signal Vi_pwm is then determined based on the signal sig2.
[0094] For example, when the first state of signal sig2 is a high state and the second state of signal sig1 is a low state, signal Vi_pwm corresponds to or is equal to signal sig2. In other words, if signal sig2 is in its first binary state, voltage Vi_pwm is in its first high level, and if signal sig2 is in its second binary state, voltage Vi_pwm is in its second low level.
[0095] As an alternative example, when the first state of the signal sig2 is a low state and the second state of the signal sig1 is a high state, the signal Vi_pwm corresponds to or is equal to a signal complementary to (or inverse of) the signal sig2 .
[0096] As another alternative example, the voltage Vi_pwm is obtained at the output of a circuit (eg a voltage divider bridge) configured to adapt the values of the high and low levels of the voltage Vi_pwm relative to the levels of the first and second binary states of the signal sig2 or its binary complement.
[0097] A person skilled in the art will be able to provide other implementations of the counter-based circuit PWMi. For example, the word Vi_n can be passed to a digital comparator which also receives a digital output word of the counter indicating the number of cycles of the clock clk counted from the start of the cycle D1 indicated by the signal start. For example, the counter is reset at each start of the time period D1 and the comparator passes a binary signal in a first state as long as the digital output word of the counter is less than the word Vi_n, otherwise in a second binary state the voltage Vi_pwm is determined based on the binary output signal of the comparator.
[0098] Figure 4 The diagram is schematically shown in the form of a box. Figure 2 An example of an embodiment of the circuit INT / ADC of the device 2.
[0099] More specifically, Figure 4 Shows the previous combination Figure 2 An example of an embodiment is described, wherein: the circuit INT / ADC includes an integrator circuit INT, which is configured to integrate the amount of current IS_pwm received during the time period D1 and transmit an analog signal sig3 representing the integration, that is, the analog signal sig3 of the result of the integration; and the circuit INT / ADC may include an analog-to-digital converter ADC, which is configured to transmit a digital word generated by the analog-to-digital conversion of the output signal sig3 of the integrator circuit, the signal V_n being determined based on the digital output word of the ADC converter, for example being equal to the digital output word of the ADC converter.
[0100] Figure 5 A further example of embodiment of an apparatus 2 is schematically shown in block form.
[0101] In this example, device 2 includes M identical memory cells C'ku, where k is an integer index from 1 to P, u is an integer index from 1 to L, and M is equal to L times P. Memory cell C'ku is combined with the previous Figure 2 The memory cells C'i described are identical.
[0102] Furthermore, the memory cells C'ku are organized into P rows ( Figure 5 ) and L columns ( Figure 5 ) array.
[0103] exist Figure 5 In the example, P equals 4, L equals 3, and therefore M equals 12.
[0104] In this example, in each row, each memory cell C'ku of the row indexed k, where k is an integer index ranging from 1 to P, receives a control voltage Vk_pwm on its control input.
[0105] Therefore, in Figure 5 In a specific example, memory cells C'11, C'12 and C'13 of the row with index k equal to 1 each receive the same control voltage V1_pwm, memory cells C'21, C'22 and C'23 of the row with index k equal to 2 each receive the same control voltage V2_pwm, memory cells C'31, C'32 and C'33 of the row with index k equal to 3 each receive the same control voltage V3_pwm, and memory cells C'41, C'42 and C'43 of the row with index k equal to 4 each receive the same control voltage V4_pwm.
[0106] In this example of embodiment, the device 2 therefore comprises one circuit PWMk per row, where k is an integer index from 1 to P.
[0107] exist Figure 5 In the specific example, the device 2 therefore comprises a circuit PWM1 delivering a voltage V1_pwm based on a digital weight V1_n, a circuit PWM2 delivering a voltage V2_pwm based on a digital weight V2_n, a circuit PWM3 delivering a voltage V3_pwm based on a digital weight V3_n, and a circuit PWM4 delivering a voltage V4_pwm based on a digital weight V4_n.
[0108] The components of the circuit PMWk, employed together with the circuit CTRL delivering a digital word Vk_n, form a circuit for controlling P rows of an array, for example, where k is an integer index from 1 to P.
[0109] In this example of an embodiment, N memory cells of the same column (here the column with index u equal to 3) are used to implement the in-memory calculation. Figure 5 In the specific example of , N is equal to 3, and memory cells C'13, C'23 and C'33 are used to implement in-memory computation. Then, these N memory cells C'ku have their outputs coupled to (for example, at Figure 5 In the example above, the same node 500 is connected to the same node 500. Figure 2 Similar to the node 200 described, the node 500 is configured to receive the output currents of the N memory cells C'ku during a time period D1 corresponding to a memory internal calculation using these N memory cells.
[0110] Furthermore, an input 202 of the circuit INT / ADC is connected to a node 500 .
[0111] Therefore, during the period D1 corresponding to the calculation in the memory, the control voltage Vk_pwm is delivered to the N memory cells C'ku, and then the N memory cells C'ku provide the output current Iku_pwm to the node 500 (at Figure 5 33_pwm), and the circuit INT / ADC connected to the node 500 delivers a signal V_n based on the total amount of current received by its input 202 during this period D1.
[0112] As an example, Figure 5 As shown, for a column with index u equal to 3, the outputs of all memory cells C'uk of the same column are connected to the same node, in this example the node 500, which itself is connected to the input 202 of the circuit INT / ADC. Specifically, Figure 5 As shown by the dashed line in the middle, the memory cell C'43 is connected to the node 500, but it does not participate in the in-memory calculation using the N memory cells C'13, C'23, and C'33. In this case, for the memory cell C'ku of the column that does not participate in the in-memory calculation, that is, Figure 5 The memory cell C′43 in the specific example of does not change the calculation result and must deliver no output current I43_pwm or zero output current I43_pwm to the node 500 during the time period D1.
[0113] To this end, the corresponding word V4_n is set to a minimum value, for example zero, so that the voltage V4_pwm remains at its second low level during the entire period D1 , whereby the current I43_pwm remains equal during the entire period D1 .
[0114] As an alternative example, in each column, the memory cell(s) not participating in performing in-memory computations using other memory cells in the column are not connected to a connection node connected to the input 202 of the circuit INT / ADC. Figure 5 In the specific example of , memory cell C′ 43 is then not connected to node 500 .
[0115] Preferably, in an embodiment where the M memory cells are organized into an array of P rows and L columns, and all memory cells of the same row receive the same row control voltage Vk_pwm (k is the index of the row) in each time period D1, the memory cells C'ku of the array further include the column selection input as previously described. In this case, the memory cells of the same column receive the same selection signal selu, for example, where u is an integer index from 1 to L.
[0116] For example, Figure 5 As shown, the memory cells of the column with index u equal to 1 receive the signal sel1, the memory cells of the column with index u equal to 2 receive the signal sel2, and the memory cells of the column with index u equal to 3 receive the signal sel3. As an example, the signal SEL is delivered by a circuit SEL of the device 2 (e.g., a column control circuit SEL).
[0117] Thus, during the implementation of the in-memory calculation using the memory cells of a single column of index u, the memory cells of this column receive a selection signal selu whose value enables the memory cells in this column to supply an output current determined by the control voltage Vk_pwm received by the memory cells of this column and by the weights programmed in these memory cells. Conversely, the memory cells of the other columns of the array receive a selection signal selu with a value that forces the output current supplied by each of these memory cells to be a constant value and a zero value, regardless of the level of the control voltage Vk_pwm received by this memory cell.
[0118] Although this Figure 5 It is not shown, but the device 2 may include more than one circuit INT / ADC, for example, exactly one circuit INT / ADC per column of the array. Figure 4 In the device 2, in each column of the array, the outputs of all memory cells in the column are then connected to the circuit INT / ADC of this column.
[0119] Alternatively or additionally, for each column, the device 2 may include multiple circuits INT / ADC, such as a first circuit INT / ADC connected or coupled to the output of a first memory cell in the column and a second circuit INT / ADC connected or coupled to the output of a second memory cell in the column. This enables, for example, multiple in-memory computing operations to be implemented simultaneously using memory cells of a single column during the same time period D1. For example, using Figure 5 2, instead of connecting the output of the memory cell C'43 to the circuit INT / ADC shown, the output of the memory cell is connected to another circuit INT / ADC.
[0120] exist Figure 2 and Figure 5In the example shown, the outputs of all memory cells C'i and C'ku participating in the in-memory calculation during the corresponding period D1 are connected to nodes 200 and 500 respectively, which themselves are connected to the input 202 of the corresponding circuit INT / ADC.
[0121] However, it may be desirable to enable device 2 to be simply reconfigurable for a memory cell supplying an output current to a node connected to input 202 of a corresponding circuit INT / ADC during a given time period D1 to be at least partially different from a memory cell supplying an output current to this same node during another time period D1.
[0122] For this reason, as Figure 2 As already mentioned, each circuit INT / ADC of the device 2 and, more generally, each connection node is configured to receive the output currents of the N memory cells of the device 2 during a time period D1 of the implementation of the calculation within the memory, e.g. Figure 2 200 and Figure 5 500 in the apparatus 2 may be coupled to the outputs of the N memory cells and, for example, to the outputs of one or more other memory cells of the M memory cells of the apparatus 2 via a connection network controllable by a control circuit of the network.
[0123] In this case, the connection network has inputs connected to the outputs of these memory cells, and outputs connected to the connection nodes. The control circuit of the connection network is then configured to control the network during the time period D1 so that the connection nodes receive the output current of each of the N memory cells used in the in-memory calculation implemented during the time period D1. The control circuit of the network is also configured to control the network during the time period D1 so that the outputs of other memory cells connected to the inputs of the network and not used in the in-memory calculation implemented during the time period D1 are electrically insulated from the connection nodes. In other words, the network R and / or its control circuit is configured so that during the time period D1, the connection nodes connected to the outputs of the network R receive output currents only from the memory cells used in the in-memory calculation corresponding to the time period D1.
[0124] Figure 6 The diagram is schematically shown in the form of a box. Figure 2 and Figure 5 In an optional embodiment of the device 2, when the device 2 includes the connection network R as described above, it should be understood that the device 2 may include more than one network R, for example, each circuit INT / ADC of the device 2 includes a network R.
[0125] Figure 6 A specific example corresponds to Figure 5A specific example of where during time period D1, memory cells C'13, C'23 and C'33 are utilized in an implementation of in-memory computing, and where memory cell C'43 does not and must not supply output current I43_pwm to node 500.
[0126] The network R then comprises four inputs connected to the respective outputs of the memory cells C'13, C'23, C'33 and C'43, and an output connected to the node 500, itself connected to the input 202 of the circuit INT / ADC.
[0127] The device 2 also comprises a circuit R_CTRL for controlling the network R. The circuit R_CTRL provides a control signal sig4 to the network R. For a given period D1, the signal sig4, for example a digital word over a number of bits, determines which inputs of the network R are electrically coupled to the output of the network R through the network R and which inputs of the network R are electrically insulated from the output of the network R.
[0128] For example, for each input connected to the output of a respective memory cell C'ku, the network R comprises a switch IT connected between that input of the network and the output of the network R. The switch is controlled by the signal sig4. However, it is within the capabilities of a person skilled in the art to provide other examples of implementation of the network R.
[0129] exist Figure 6 In the specific example of , over the entire duration D1 of the in-memory calculation using the memory cells C'13, C'23 and C'33, the control circuit R_CTRL controls the network R so that the output of each of these memory cells is electrically coupled to the output of the network so that the output currents supplied by these memory cells are passed to the node 500 where they are added. Furthermore, during this same period D1, the circuit R_CTRL controls the network R so that its input connected to the output of the memory cell C'43 is electrically insulated from the output of the network R and therefore from the node 500.
[0130] exist Figure 6 In the example of , in which the network R is implemented by switches IT, the switch IT connected between the output of the memory cell C'13 and the node 500, the switch IT connected between the output of the memory cell C'23 and the node 500, and the switch IT connected between the output of the memory cell C'33 and the node 500 are set to the on state by the circuit R_CTRL during the entire duration D1 calculated in the memory, and the switch IT connected between the output of the memory cell C'43 and the node 500 is set to the on state during this entire time period D1.
[0131] Despite Figure 6In the example of , the memory cells C'13 to C'43 whose outputs are connected to corresponding inputs of network R all form part of the same column, but this is not mandatory. In practice, network R of device 2 may have inputs connected to any of the M memory cells of device 2 (e.g., to memory cells of two different columns of the array).
[0132] Combination of the above Figures 2 to 6 The described embodiments and variants of the device 2 enable the implementation of an in-memory computing method. The method then comprises, during a time period D1, the following steps: Figure 2 200 of them, Figure 5 and 6 500) provides output currents of N memory cells out of the M memory cells of the device; uses a circuit INT / ADC having an input 202 connected to the connection node to transmit an output signal V_n, the output signal V_n having a value determined by the total amount of current IS_pwm received by the input 202 of the circuit INT / ADC along the time period D1; and for each of the N memory cells, uses circuits PWM1, PWM2, PWM3, PWM4 to receive digital words V1_n, V2_n, V3_n, V4_n, and uses the circuits PWM1, PWM2, PWM3, PWM4 to transmit control voltages V1_pwm, V2_pwm, V3_pwm, V4_pwm of the memory cell at a first level (preferably non-zero) within a time period D2 determined by the received digital weight.
[0133] Various embodiments and variations have been described. Those skilled in the art will appreciate that certain features of these various embodiments and variations may be combined, and those skilled in the art will recognize other variations.
[0134] In particular, although reference has been made here to a memory cell having a control input and, for example, a select input, a memory cell comprising additional inputs may be used in the described device 2.
[0135] In addition, if combined Figure 5 Briefly mentioned, device 2 may include multiple circuits INT / ADC, or in other words, multiple connection nodes, each connection node being configured to receive the output current of the corresponding memory cell during the same time period D1, so that multiple in-memory computing operations are simultaneously implemented in device 2 during the time period D1.
[0136] Finally, based on the functional indications given above, the actual implementation of the described embodiments and variants is within the capabilities of a person skilled in the art.
[0137] In particular, for the implementation of the circuit PWMi, as already indicated, it is not limited to the already combined Figure 3 The description, and more generally, is not limited to a circuit PWMi comprising a counter.
[0138] Similarly, regarding the implementation of the circuit INT / ADC, it is not limited to combining Figure 4 The content described.
[0139] Furthermore, although this has not yet been described, it will be understood by those skilled in the art that during a given time period D1, the control voltage received by the memory cell used in the corresponding in-memory calculation is at its first level only during time period D2 (while time period D2 may be continuous or discontinuous and may also be zero or otherwise equal to D1), and is at its second level during the remainder of time period D1, i.e., during time period D3 which is equal to D1 minus D2 (while time period D3 may be continuous or discontinuous and may also be equal to D1 or otherwise zero).
[0140] To implement the described memory cell, one skilled in the art may use a memory cell designated by the symbol eSTM, or more generally, a non-volatile memory cell having at least two programming levels (a "multi-level memory cell").
Claims
1. A device configured to implement in-memory computing, comprising: memory cells, wherein each memory cell has a control input configured to receive a pulse width modulated control voltage and an output configured to supply an output current having a value determined at least in part by the pulse width modulated control voltage and by a weight programmed in the memory cell; a connection node configured to receive output current from the outputs of a plurality of the memory cells during a first time period; a first circuit having an input connected to the connection node, and the first circuit being configured to deliver an output signal having a value determined by a total amount of current received by the input of the first circuit during the first time period; as well as A second circuit for each memory cell of the plurality of memory cells is configured to receive a digital word and to pass the pulse width modulated control voltage at a first level during the first time period only during a second time period determined by the digital word.
2. The apparatus of claim 1, wherein a value of the output current from each memory cell is determined by the pulse-width modulated control voltage and by the weight programmed in the memory cell.
3. The apparatus of claim 1 , wherein each memory cell further comprises a select input and is configured such that: When the select input of the memory cell receives a select signal in a first state, the value of the output current is a zero current value; and When the select input of the memory cell receives the select signal in a second state different from the first state, the value of the output current is at a non-zero current value determined by the pulse width modulation control voltage and the weight programmed in the memory cell. 4 . The apparatus of claim 3 , wherein the apparatus further comprises a selection circuit configured to pass the selection signal of the memory cell to each memory cell of the plurality of memory cells.
5. The apparatus of claim 1, wherein each second circuit is configured such that the pulse width modulated control voltage delivered by the second circuit comprises exactly two levels, wherein the first level is one of the two levels.
6. The apparatus of claim 1, wherein the first node is connected to an output of each of the memory cells in the plurality of memory cells.
7. The apparatus of claim 1, wherein the apparatus further comprises: a connection network configured to selectively connect outputs of the plurality of memory cells to the first node; as well as A control circuit is configured to control the selective connection through the connection network during the first time period so that the first node receives only the output current of a selected memory cell among the plurality of memory cells.
8. The device of claim 7, wherein the memory cells selectively connected by the connection network include memory cells involved in the in-memory calculation, and other memory cells not selectively connected by the connection network include memory cells not involved in the in-memory calculation.
9. The apparatus of claim 1, wherein the first circuit comprises an integrator circuit configured to integrate the output current received by the first circuit during the first time period and to deliver a first signal determined by the integration.
10. The apparatus of claim 9, wherein the first signal is an analog signal, and the first circuit further comprises an analog-to-digital converter configured to convert the analog signal into a digital signal that determines the output signal of the first circuit.
11. The apparatus of claim 1 , wherein the first circuit comprises: an oscillator having an oscillation frequency controlled by said output current available at said first node, and A counter is configured to deliver a digital signal having a value determined by the number of oscillations counted during the first time period, the output signal of the first circuit being determined by the digital signal delivered by the counter.
12. The apparatus of claim 1, wherein the first time period is equal to K times a clock cycle, where K is a constant, and wherein the second time period is equal to Q times the clock cycle, where Q is a number less than or equal to K.
13. The apparatus of claim 12, wherein the numbers K and Q are integers.
14. The apparatus of claim 12, wherein each second circuit comprises a counter configured to: receiving the digital word received by the second circuit; counting a number of cycles of the clock during the first time period; and during said first time period, when the counted number of cycles is less than a value determined by said digital word, delivering an output signal in a first binary state, otherwise delivering an output signal in a second binary state; The second circuit is further configured to pass the pulse width modulated control voltage at the first level when the output signal of the counter is in the first binary state.
15. The apparatus of claim 12, wherein the number K is determined by a maximum value of the digital word, and the number Q is determined by a value of the digital word received by the second circuit that delivers the control voltage to the memory cell.
16. A method implemented in a device, the device comprising memory cells, wherein each memory cell has a control input configured to receive a pulse width modulated control voltage and an output configured to supply an output current, the output current having a value determined at least in part by the pulse width modulated control voltage and by a weight programmed in the memory cell, the method comprising, during a first time period: providing the output currents of a plurality of the memory cells to a connection node; delivering, with a first circuit having an input connected to the first node, an output signal having a value determined by a total amount of current received by the input of the first circuit during the first time period; as well as In response to receipt of a digital word, a pulse width modulated control voltage is delivered to each of the plurality of memory cells, the pulse width modulated control voltage having a first level only during a second time period determined by the received digital word.
17. The method of claim 16, further comprising, for each memory cell of the plurality of memory cells: generating a value of the output current at a zero current value when a select input of the memory cell receives a select signal in a first state; and When the select input of the memory cell receives a select signal in a second state different from the first state, the value of the output current is generated at a non-zero current value determined by the pulse width modulation control voltage and the weight programmed in the memory cell.
18. The method according to claim 16, further comprising: selectively connecting an output of the memory cell to the first node; as well as During the first time period, the selective connection is controlled so that the first node receives only output currents of selected ones of the memory cells.
19. The method of claim 18, wherein the memory cells selectively connected by the connection network include memory cells involved in the in-memory calculation, and other memory cells not selectively connected by the connection network include memory cells not involved in the in-memory calculation.
