Computing device, memory controller, and method of performing in-memory computation
By disabling write operations with unchanged weights in the memory controller, the high power consumption problem in CIM applications is solved, the efficiency of MAC operations is improved, and the computing performance of artificial intelligence systems is enhanced.
Patent Information
- Application Number
- CN202210899481.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-25
- Filing Date
- 2022-07-28
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-07-28
AI Technical Summary
In existing technologies, updating weights in computation in memory (CIM) applications requires significant power consumption and has low MAC operation efficiency, which negatively impacts computational efficiency, especially in artificial intelligence systems.
By disabling write operations in the memory controller until the next update command is received, the frequency of write operations in the memory array is reduced, write operations are performed only when the weight changes, precharge and read operations are reduced, and the circuit design of the memory cells is optimized to reduce power consumption.
It effectively reduces the power consumption of computation in memory, improves the efficiency of MAC operations, and enhances the overall computing performance of artificial intelligence systems.
Smart Images

Figure CN115424645B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this application relate to computing devices, memory controllers, and methods for performing computations in memory. Background Technology
[0002] This disclosure generally relates to memory arrays used in data processing, such as multiplication-accumulation operations. In-memory computing (or compute-in-memory) systems store information in a computer's random access memory (RAM) and perform computations at the memory cell level, rather than moving large amounts of data between RAM and data storage cells for each computation step. In-memory computing techniques allow for real-time data analysis because data stored in RAM can be accessed quickly, enabling faster reporting and decision-making in machine learning applications. Summary of the Invention
[0003] According to one aspect of an embodiment of this application, a method for performing computation in memory is provided, comprising: storing data in a plurality of memory cells of a memory array, the data including a plurality of weights for computation; determining whether an update command for changing at least one of the plurality of weights is received; in response to receiving the update command, performing a write operation on the memory array to update the changed weights; and disabling the write operation on the memory array until a next update command for changing at least one of the plurality of weights is received.
[0004] According to another aspect of an embodiment of this application, a computing device is provided, comprising: a memory array configured to store data, the data including a plurality of weights for computation, the memory array including a plurality of memory cells grouped in rows and columns of memory cells; and a memory controller coupled to the memory array and configured to control the memory cells. The memory controller is configured to: perform a write operation on the memory array to update at least one changing weight in response to an update command; and disable write operations on the memory array until the next update command is received.
[0005] According to one aspect of an embodiment of this application, a memory controller is provided, comprising: a command generation circuit configured to output an update command when one of a plurality of weights used for calculation in the memory is replaced by a different weight; and a control circuit coupled to the command generation circuit and configured to disable write operations to a memory array used for storing the plurality of weights until the update command is received. Attached Figure Description
[0006] The various aspects of the invention will be best understood from the following detailed description when read in conjunction with the accompanying drawings. It should be emphasized that, in accordance with standard industrial practice, the various components are not drawn to scale and are for illustrative purposes only. In fact, for clarity of discussion, the dimensions of the various components may be arbitrarily increased or decreased.
[0007] Figure 1 This is a schematic diagram of a representative portion of an exemplary memory device according to some embodiments of the present disclosure.
[0008] Figure 2 This is a schematic diagram of a representative portion of an exemplary computing (CIM) device in an exemplary memory according to some embodiments of the present disclosure.
[0009] Figure 3 This is a schematic diagram of an exemplary memory cell according to some embodiments of the present disclosure.
[0010] Figure 4 The illustrations are of some embodiments according to this disclosure. Figure 2 An exemplary diagram of memory operation in a CIM device.
[0011] Figure 5 The illustrations are of some embodiments according to this disclosure. Figure 2 Another exemplary diagram of memory operation in a CIM device.
[0012] Figure 6 This is an exemplary flowchart of a method for performing computations in memory according to some embodiments of the present disclosure.
[0013] Figure 7 This is an implementation based on some embodiments of the present disclosure. Figure 6 An exemplary flowchart of the write operation in the method. Detailed Implementation
[0014] The following disclosure provides numerous different embodiments or examples for implementing various features of the invention. Specific embodiments or examples of components and arrangements are described below to simplify the invention. Of course, these are merely examples and not intended to be limiting. For example, in the following description, forming a first component above or on a second component can include embodiments where the first and second components are in direct contact, and can also include embodiments where an additional component can be formed between the first and second components, such that the first and second components are not in direct contact. Furthermore, reference numerals and / or letters may be repeated in various examples. This repetition is for simplicity and clarity and does not in itself indicate a relationship between the various embodiments and / or configurations discussed.
[0015] The terms used in this specification generally have their ordinary meaning in the art and in the specific context in which each term is used. The use of examples in this specification (including examples of any terms discussed herein) is merely illustrative and in no way limits the scope and meaning of this disclosure or any exemplary terminology. Similarly, this disclosure is not limited to the various embodiments given in this specification.
[0016] Although the terms “first,” “second,” etc., may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the embodiments. As used herein, the term “and / or” includes any and all combinations of one or more of the associated listed items.
[0017] Furthermore, for ease of description, this document may use spacing terms such as “below,” “under,” “lower,” “above,” “upper,” etc., to describe the relationship between one element or component and another, as shown in the figures. In addition to the orientations shown in the figures, spacing terms are intended to include different orientations of the device during use or operation. The device may be positioned in other ways (rotated 90 degrees or in other orientations), and the spacing descriptors used herein may be interpreted accordingly.
[0018] In this article, the term "coupled" may also be referred to as "electrically coupled," and the term "connected" may be referred to as "electrically connected." "Coupled" and "connected" can also be used to describe the cooperation or interaction of two or more elements.
[0019] Various embodiments of this disclosure will be described with reference to embodiments in a specific context, namely computation in memory (“CIM”) applications. An example of a CIM application is the multiplication-accumulation (“MAC”) operation. In a MAC operation, numbers in an input array (e.g., rows) are multiplied or “weighted” by corresponding elements in another array (e.g., columns), and the products are summed (accumulated) by an accumulator to compute an output sum. This operation is mathematically similar to the dot product of two vectors (i.e., a scalar product). In the dot product operation, the dot product of two vectors is defined as the sum of the products of pairs of components of the two vectors.
[0020] In some artificial intelligence (AI) systems, such as artificial neural networks, a numerical array can be weighted using multiple columns of weights. Each column of weighting produces a corresponding output sum. Therefore, an AI system can generate and output an array from a numerical input array multiplied by the weights in a multi-column matrix. In other words, the AI system maps input to output based on a set of weights. Similar operations are employed in various other applications, such as multi-bit convolutional neural networks (“CNNs”). When an AI system trains a neural network, the network may use various algorithms to update these weights used in the MAC operation to find the appropriate set of weights so that the neural network can correctly classify the data. In these CIM applications, the power required to update the weights can be significant, and the efficiency of the MAC operation is an issue. By reducing the power consumption of updating weights using SRAM operations, the efficiency of the MAC operation in CIM applications can be improved accordingly.
[0021] Figure 1 This is a schematic diagram of a representative portion of an exemplary memory device 100 according to some embodiments of the present disclosure. For example... Figure 1 As shown, the memory device 100 includes a memory array 110 and a memory controller 120, which is configured to perform read or write operations on the memory array 110.
[0022] The memory array 110 includes memory cells 112 arranged in M rows and N columns, where M is an integer corresponding to the number of rows and N is an integer corresponding to the number of columns. For example, the memory array 110 may be an array of 256 × 256 memory cells (112), that is, the memory cells 112 are arranged in 256 rows × 256 columns, but this disclosure is not limited thereto. In various embodiments, M and N can be any integers, such as 16, 32, 64, 128, etc. Furthermore, the memory array 110 may also be implemented using different types of arrays, including two-dimensional and three-dimensional arrays of various sizes.
[0023] In some embodiments, memory cell 112 may be a single-port (SP) static random access memory (SRAM) cell, but this disclosure is not limited thereto. In some embodiments, memory cell 112 may be a dual-port (DP) SRAM cell. Memory array 110 may include a single write port or read port, or more than one write port or read port.
[0024] continue Figure 1In one embodiment, M write word lines (WWL) WWL[0]-WWL[M-1] carry signals to activate the corresponding rows of memory cells 112 in the memory array 110. For example, write word line WWL[0] is electrically connected to the WWL terminal of the memory cell 112 forming row 0 of the memory array 110. Similarly, write word line WWL[1] is electrically connected to the WWL terminal of the memory cell 112 forming row 1 of the memory array 110, and write word line WWL[M-1] is electrically connected to the WWL terminal of the memory cell 112 forming row M-1 of the memory array 110.
[0025] N write bit lines (WBL) WBL[0]-WBL[N-1] and N write inverted bit lines WBLB[0]-WBLB[N-1] carry data signals for storage in selected memory cells 112. For example, write bit line WBL[0] and write inverted bit line WBLB[0] are electrically connected to the corresponding WBL and WBLB terminals of the memory cell 112 forming column 0, respectively. Similarly, write bit line WBL[1] and write inverted bit line WBLB[1] are electrically connected to the corresponding WBL and WBLB terminals of the memory cell 112 forming column 1 of the memory array 110, respectively, and write bit line WBL[N-1] and write inverted bit line WBLB[N-1] are electrically connected to the corresponding WBL and WBLB terminals of the memory cell 112 forming column N-1 of the memory array 110, respectively. Note that the term "inverted" as used in the context of the various embodiments of this disclosure refers to a logically inverted signal. For example, the signal carried by the write inverted bit line WBLB[j] associated with memory cell 112 in column j is logically reversed with the signal carried by the write bit line WBL[j] associated with memory cell 112 in column j.
[0026] During memory operation, the memory controller 120 is electrically connected to some of the write word lines WWL[0]-WWL[M-1], write bit lines WBL[0]-WBL[N-1], and write inverted bit lines WBLB[0]-WBLB[N-1] corresponding to one of the memory cells 112, and is configured to set voltage values accordingly to read or write data to the corresponding memory cell 112.
[0027] In various embodiments, the CIM device can utilize Figure 1The memory device 100 is used for implementation. For example, weights for multiply-accumulate operations can be stored in memory cells 112 of memory array 110. Memory device 100 can be a static random access memory (“SRAM”) device, but this disclosure is not limited to this. In an SRAM device, data can be written to and read from each SRAM cell via one or more bit lines (“BL”) when one or more access transistors in the SRAM cell are activated by an enable signal from one or more word lines (“WL”). An SRAM-based CIM design turns on multiple word lines associated with columns of SRAM cells to discharge common bit lines (such as read bit lines (“RBL”)) to implement a 1-bit MAC operation.
[0028] Figure 2 This is a schematic diagram of a portion of an exemplary CIM device 200 according to some embodiments of the present disclosure. Figure 2 As shown, the CIM device 200 includes a memory array 110 having memory groups 220 arranged in rows and columns. Each memory group 220 includes a corresponding memory cell 112 with storage weight, a first switching device 222, a capacitor 224 with capacitance (Ccell), and a second switching device 226. The memory group 220 in each row is electrically connected to a corresponding write word line (“WWL”), a corresponding input line (“IN”), and a corresponding evaluation control line (“EVAL”) controlled by the memory controller 120. The memory group 220 in each column is electrically connected to a corresponding write bit line (“WBL”), a corresponding write inverted bit line (“WBLB”), and a corresponding read bit line (“RBL”), also controlled by the memory controller 120.
[0029] The following uses memory cells associated with the corresponding row i and the corresponding column j (e.g.) Figure 2 The structure and circuitry of memory group 220[i,j], and its operation relative to the corresponding signal lines are described using memory group 220[i,j] as an example. Figure 2 As shown, for memory group 220[i, j], memory cell 112 is connected to the write word line WWL[i] associated with row i and the write bit line WBL[j] and write inverted bit line WBLB[j] associated with column j. When activated by a signal on the write word line WWL[i], memory cell 112 is configured to input a binary signal indicating a weight (“W”) (0 or 1) according to the values of the write bit line WBL[j] and the write inverted bit line WBLB[j], and store the weight accordingly.
[0030] A first switching device 222 is connected to memory cell 112 and an associated input line IN[i] for receiving input signals. The first switching device 222 is controlled by the input signal on input line IN[i] and is selectively turned on or off accordingly to receive weights from memory cell 112. For example, the first switching device 222 is on when the input signal on input line IN[i] is logic high (“1”) and off when the input signal on input line IN[i] is logic low (“0”). When the first switching device 222 is on, the weights stored in memory cell 112 can be transferred to node 228. A capacitor 224 is connected between the first switching device 222 and a reference voltage (e.g., ground). The voltage stored in capacitor 224 indicates the product of the input signal on input line IN[i] and the weights in the corresponding memory cell 112. The second switching device 226 is connected to the associated read bit line RBL[j] and the corresponding evaluation control line EVAL[i] and is controlled by a signal on the evaluation control line EVAL[i]. The second switching device 226 selectively interconnects the corresponding read bit line RBL[j] and node 228, at which the first switching device 222 and capacitor 224 are connected to each other.
[0031] Therefore, the voltage value sensed at node 228, also referred to herein as the cell voltage Vcell, is determined by the state of the first switching device 222 and the weights stored in memory cell 112. The first switching device 222 is then determined by the input signal received from the input line IN[i]. When the input signal on the input line IN[i] is logic high (“1”), the first switching device 222 is turned on and transmits the weights stored in memory cell 112 to node 228. When the input signal on the input line IN[i] is logic low (“0”), the first switching device 222 is turned off, and “0” is output to node 228, regardless of the weights stored in memory cell 112. Therefore, what is output to node 228 is the product of the input signal and the weights stored in memory cell 112. The output of the first switching device 222 can be given by Table 1 below:
[0032] Table 1
[0033] Input Weight Output 0 0 0 0 1 0 1 0 0 1 1 1
[0034] In some embodiments, prior to performing the multiplication operation described above, the voltage Vcell at node 228 of each memory group 220 is reset by a pre-discharge capacitor 224. For example, discharging the capacitor 224 can be achieved by turning off the first switching device 222 and turning on the second switching device 226, using the corresponding signals on the input line IN[i] and the evaluation control line EVAL[i], and driving the read bit line RBL[j] to 0. Therefore, in each memory group 220, a discharge current can flow through the second switching device 226 to reset the voltage Vcell at node 228 to 0.
[0035] Next, after reset, with the second switching device 226 in each memory group 220 turned off, the multiplication operation described above is performed. Therefore, the voltage Vcell at node 228 of each memory group 220 indicates (e.g., proportional to) the product of the input signal on input line IN[i] and the weight stored in the corresponding memory cell 112.
[0036] Next, the voltage VRBL on the read bit line RBL[j] can be obtained. The voltage VRBL is proportional to the sum of the product values (IN×W) of all memory groups 220 in the corresponding column j associated with the read bit line RBL[j]. For the calculation of the sum of the product values, the memory controller 120 can pre-discharge the read bit line RBL[j] to 0 volts and then turn on the second switching device 226 of all memory groups 220 by using the corresponding signals on the evaluation control lines EVAL[i], EVAL[i+1], ..., to allow the capacitors 224 of each memory group 220 in column j to discharge to the read bit line RBL[j]. Therefore, the voltage VRBL on the read bit line RBL[j] rises as the capacitors 224 of the memory groups 220 in column j discharge. Because the capacitors 224 in the various memory groups 220 in column j are connected in parallel with each other and in parallel with the capacitor 230 coupled between the read bit line RBL[j] and a reference voltage (e.g., ground), the charge is now shared among all the capacitors 224. Therefore, the voltage VRBL on the bit line RBL[j] is given by equation (1):
[0037]
[0038] In equation (1), n is the number of memory groups 220 on the same read bit line RBL[j], m is the number of nodes 228 indicating logic highs before charge sharing, Ccell is the capacitance value of each capacitor 224, CRBL is the capacitance value of the capacitor 230 coupled to the read bit line RBL[j], and VDD is the power supply voltage. Therefore, the voltage VRBL on the read bit line RBL[j] represents the sum of the products of the input signal and the weights (IN×W) in the memory groups 220 sharing the same read bit line RBL[j].
[0039] When using a multiply-accumulate system as a model in AI applications, the CIM device 200 can provide a set of input data (e.g., numbers) to the current model via input line IN[i]. The input data is processed by multiplying each input with its corresponding weight stored in memory array 110 and summing the multiplies to obtain output data. The output data is then compared to a target output voltage or desired output voltage. If the output data is not close enough to the desired value, the model is adjusted and the process is repeated until the output data is sufficiently close to the desired value. For example, as... Figure 2 As shown, the CIM device 200 may include a two-dimensional array of elements arranged in rows and columns, each element storing weights and capable of receiving inputs and generating outputs that are the arithmetic product of the inputs and the stored weights. The model system can provide each input to a row of elements and sum the outputs of each column of elements together.
[0040] Figure 3 This is a schematic diagram of an exemplary memory cell 300 according to some embodiments of the present disclosure. In some embodiments, the memory cell 300 is a six-transistor (6T) single-port (SP) SRAM memory cell, and the memory cell 300 can be used to implement... Figure 1 or Figure 2 The memory cell 112 is shown. In some other embodiments, the memory cell 300 employs a plurality of transistors in addition to six. For example, in some other embodiments, Figure 1 The memory cells in the memory device can be implemented using 8T SRAM bit cells, 10T SRAM bit cells, or any other type of memory cell. Figure 3 The 6T SRAM cell 300 shown is exemplary and used to explain the characteristics of the memory cell, but is not intended to limit the embodiments of this disclosure.
[0041] like Figure 3As shown, memory cell 300 includes a cross-coupled inverter pair 310, and access transistors 320 and 330 (also referred to as transmission gates or transmission transistors). The cross-coupled inverter pair 310 includes two p-type metal-oxide-semiconductor (PMOS) transistors 312 and 314 and two n-type metal-oxide-semiconductor (NMOS) transistors 316 and 318. The source terminals of PMOS transistors 312 and 314 are electrically connected to the power supply voltage (VDD) terminal. The drain terminals of PMOS transistors 312 and 314 are electrically connected to the drain terminals of n-type metal-oxide-semiconductor (NMOS) transistors 316 and 318 at their respective nodes QB and Q. The source terminals of NMOS transistors 316 and 318 are electrically connected to a reference node. Figure 3 As shown, in some embodiments, the reference node is substantially equal to a logic low signal. For example, the reference node may be substantially equal to ground voltage (VSS). The gate terminal of PMOS transistor 312 is electrically connected to the gate terminal of NMOS transistor 316 and the corresponding source / drain terminals of NMOS transistor 318 and PMOS transistor 314. Similarly, the gate terminal of PMOS transistor 314 is electrically connected to the gate terminal of NMOS transistor 318 and the corresponding source / drain terminals of NMOS transistor 316 and PMOS transistor 312.
[0042] PMOS transistors 312 and 314 can be referred to as pull-up transistors, and NMOS transistors 316 and 318 can be referred to as pull-down transistors. Specifically, PMOS transistors 312 and 314 are configured to pull the voltage potential towards the supply voltage VDD. NMOS transistors 316 and 318 are configured to pull the voltage potential towards the reference node (e.g., ground voltage VSS).
[0043] Access transistor 320 is configured to selectively connect the cross-coupled inverter 310 to the write bit line WBL. Access transistor 330 is configured to selectively connect the cross-coupled inverter 310 to the write inverted bit line WBLB. Both access transistors 320 and 330 are configured to be activated based on a signal on the write word line WWL. Figure 3 As shown, in some embodiments, access transistors 320 and 330 may be NMOS transistors with their gate terminals electrically connected to the write word line WWL, but this disclosure is not limited thereto. In other embodiments, access transistors 320 and 330 may be implemented using PMOS transistors.
[0044] for Figure 3The memory cell 300 has NMOS transistors for access transistors 320 and 330, and the memory cell 300 is connected to the write bit line WBL or the write inverted bit line WBLB via a logic high signal at the gate terminal of the access transistor 320 or the access transistor 330. Conversely, if the memory cell 300 alternatively includes PMOS transistors for access transistors 320 and 330, the memory cell 300 is connected to the write bit line WBL or the write inverted bit line WBLB via a logic low signal at the gate terminal of the access transistor 320 or the access transistor 330.
[0045] In various embodiments, memory cell 300 may have any suitable physical structure. For example, but not limited to, transistors 312, 314, 316, 318, 320 and 330 in memory cell 300 may include three-dimensional gate structures, such as fin field-effect transistors (FinFETs).
[0046] Figure 4 The illustrations are of some embodiments according to this disclosure. Figure 2 An exemplary diagram of memory operation in a CIM device 200. Figure 4 In one embodiment, SRAM memory cells 112 in memory array 110 are configured to store weights to be used in the CIM application. Memory controller 120 controls SRAM memory cells 112 to perform write operations to update the weights stored in one or more selected memory cells 112.
[0047] like Figure 4 As shown, in some embodiments, the CIM device 200 further includes a command generation circuit 410. The command generation circuit 410 determines whether a weight has changed and, in response to a weight change, provides an update command UC1 associated with the weight change. Conversely, when the weight remains unchanged, the command generation circuit 410 does not provide an update command UC1. In other words, the command generation circuit 410 is configured to output the update command UC1 only if one of the stored weights is replaced by a different weight.
[0048] exist Figure 4In one embodiment, the command generation circuit 410 is electrically coupled to the memory controller 120, but the invention is not limited thereto. In some other embodiments, the command generation circuit 410 may be disposed in and integrated into the memory controller 120. When the weights change, the memory controller 120 receives an update command UC1 to initiate an update. Therefore, in response to receiving the update command UC1, the memory controller 120 performs a write operation on the memory array 110 to update the corresponding weights stored in the corresponding memory cells 112. When performing the write operation, in order to write data to the target memory cells 112 in row i and column j of the memory array 110, during the precharge phase before the start of the write cycle, the memory controller 120 first precharges the write bit line WBL[j] and the write inverted bit line WBLB[j] associated with column j to a high voltage (e.g., the power supply voltage VDD). Then, as the write cycle begins, the memory controller 120 applies the value to be written to the write bit line WBL[j] and applies the logically inverted value to the write inverted bit line WBLB[j].
[0049] In other words, the memory controller 120 sets the corresponding write bit line WBL[j] to a first logic value based on the update weight associated with the update command UCl, and sets the corresponding complementary bit line, the write inverted bit line WBLB[j], to a second logic value complementary to the first logic value based on the update weight. For example, when writing data 0, the memory controller 120 is configured to set the write bit line WBL[j] to a logic low signal ("0") and the write inverted bit line WBLB[j] to a logic high signal ("1"). When writing data 1, the memory controller 120 is configured to set the write bit line WBL[j] to a logic high signal ("1") and the write inverted bit line WBLB[j] to a logic low signal ("0"). Therefore, data 1 can be written by inverting the values of the write bit line WBL[j] and the write inverted bit line WBLB[j].
[0050] Then, the memory controller 120 asserts the selected write word line WWL[i] associated with row i by setting the write word line WWL[i] to a logic high signal. Therefore, the value to be written is latched. Because the bit line input drivers are designed to be more powerful than the relatively weak transistors in memory cell 112, the memory controller 120 can override the previous state of the cross-coupled inverters in memory cell 112.
[0051] To reduce power consumption, memory controller 120 is configured to disable write operations to memory array 110 until the next update command UCl is received. For example, in some embodiments, memory controller 120 may skip or bypass one or more steps in the write operation described above to disable the write operation. For example, memory controller 120 may set the write word line WWL[i] to logic zero or set the write word line WWL[i] to floating to disable the write operation.
[0052] Specifically, during the precharge phase, a large charging current is required to charge the write bit line WBL[j] and the write inverted bit line WBLB[j] back to a high voltage (supply voltage VDD). In some embodiments, the memory controller 120 is configured to further disable the write operation until the next update command UC1 is received by disabling the precharge of the write bit line WBL[j] and the write inverted bit line WBLB[j] and disabling the setting of the values of the write bit line WBL[j] and the write inverted bit line WBLB[j]. Therefore, when the weights do not need to be changed, the write bit line WBL[j] and the write inverted bit line WBLB[j] are not charged back to a high voltage (VDD). Thus, the power consumption of the memory device 100 can be reduced. When the weights change and a write operation is required to the memory array 110, in response to receiving the update command UC1, the memory controller 120 precharges the write bit line WBL[j] and the write inverted bit line WBLB[j] again to perform the write operation.
[0053] In some embodiments, the memory controller 120 is configured to disable write operations by setting the write word line WWL[i] to logic zero until the next update command UC1 is received. In some other embodiments, the memory controller 120 may also set the write word line WWL[i] to a floating state to disable write operations. Therefore, when the memory controller 120 does not receive the update command UC1, the write word line WWL[i] is not asserted. Therefore, write operations to the SRAM memory cell 112 are disabled until the memory controller 120 receives the update command UC1.
[0054] In some embodiments, when SRAM memory cell 112 stores weights used in CIM applications, SRAM memory cell 112 does not require random access, i.e., it does not need to read or write data items in the next operation. In such embodiments, memory controller 120 can operate in "write-only" mode and disable read operations to reduce power consumption. As described above, memory controller 120 can maintain write bit line WBL[j] and write inverted bit line WBLB[j] in their previous states and not charge write bit line WBL[j] and write inverted bit line WBLB[j] back to high voltage (VDD). Therefore, regardless of whether update command UC1 is received, memory controller 120 can be configured to disable read operations to reduce the additional power consumption for charging write bit line WBL[j] and write inverted bit line WBLB[j]. Thus, the total power consumption of memory operations is reduced, and the efficiency of MAC operations is improved.
[0055] Figure 5 The illustrations are of some embodiments according to this disclosure. Figure 2 Another example diagram of memory operation in the CIM device 200. (See diagram for reference.) Figure 5 As shown, in some embodiments, the memory cells 112 in the memory array 110 are divided into multiple segments S1, S2, ..., SN. The memory controller 120 can be configured to perform a write operation on segment S1 in the memory array 110 in response to an update command UC1 associated with segment S1, and to individually disable write operations on other segments S2-SN that are separate from segment S1. Therefore, when updating the weights stored in the memory cells 112 in segment S1, the memory controller 120 can reduce overall power consumption by preventing unnecessary charging current in the remaining segments S2-SN, thereby improving the efficiency of MAC operations.
[0056] Figure 6 This is an exemplary flowchart of a method 600 for performing in-memory computation according to some embodiments of the present disclosure. It should be understood that... Figure 6 Additional operations are performed before, during, and / or after method 600 as described herein, and some other operations are only briefly described here. Method 600 can be used for... Figures 1-5 The memory device 100 and CIM device 200 illustrated in the embodiments are performed, but this disclosure is not limited thereto.
[0057] In operation 610, the memory controller (e.g., Figure 1 The memory controller 120 in the memory array stores data in the memory array (e.g., Figure 1 The data stored in the memory array 110 may include multiple weights for computation (e.g., in an AI system).
[0058] In operation 620, the memory controller determines whether an update command associated with at least one weight being changed has been received (e.g., Figure 4 In some embodiments, when one of the weights is replaced by a different weight, the command generation circuit in the memory device 100 or CIM device 200 (e.g., update command UC1) updates the command. Figure 4 The command generation circuit 410 in the middle outputs the update command.
[0059] When the memory controller receives an update command (operation 620 - Yes), in operation 630, the memory controller performs a write operation on the memory array to update the weights in response to receiving the update command. In some embodiments, the memory array is divided into multiple segments (e.g., Figure 5 In operation 630, in response to receiving an update command associated with a target segment (e.g., segment S1) to be written in the current cycle, the memory controller performs a write operation on the target segment and separately disables the remaining segments separate from the target segment (e.g., ...). Figure 5 The write operation is performed on the segment S2-SN in the middle. Furthermore, in the following cycle, in response to receiving a message indicating another target segment to be written (e.g., ...), Figure 5 The update command associated with segment S2 in the memory controller performs a write operation on the target segment and separately disables the remaining segments that are separate from the target segment (e.g., Figure 5 Write operations on segments S1 and S3-SN.
[0060] Figure 7 This is an exemplary flowchart of operation 630 for performing a write operation according to some embodiments of this disclosure. Figure 7 As shown, in some embodiments, operation 630 includes operations 632, 634, 636, and 638. In operation 632, the memory controller associates a corresponding bit line (e.g., ...) with one of the memory cells used to store updated weights. Figure 4 The write bit line WBL[j] and the corresponding complementary bit line (e.g., Figure 4The write inverted bit line WBLB[j] is precharged to a high voltage (e.g., supply voltage VDD). In operation 634, based on the update weight associated with the update command, the memory controller sets the corresponding bit line to a first logic value (e.g., logic 1 when writing data 1 or logic 0 when writing data 0). In operation 636, based on the update weight, the memory controller sets the corresponding complementary bit line to a second logic value complementary to the first logic value (e.g., logic 0 when writing data 1 or logic 1 when writing data 0). In operation 638, the memory controller precharges the corresponding word line (e.g., WBLB[j]) associated with the memory cell used to store the update weights to a high voltage (e.g., supply voltage VDD). Figure 4 The write word line WWL[i] in the middle is set to logic 1.
[0061] Refer again Figure 6 If the memory controller does not receive an update command (Operation 620 - No), then in Operation 640, the memory controller disables write operations to the memory array until it receives the next update command associated with the changing weights. For example, the memory controller can bypass... Figure 7 One or more operations 632, 634, 636, and 638 are used to disable write operations. Specifically, the memory controller may disable the operation included in operation 638 and set the corresponding word line associated with the memory cell having unchanged weights to a logic zero or floating state. In some embodiments, in operation 640, the memory controller disables pre-charging the corresponding bit line and corresponding complementary bit line associated with the memory cell storing unchanged weights (e.g., the operation described in operation 632), and disables setting the corresponding bit line and setting the corresponding complementary bit line (e.g., the operation included in operations 634 and 636). Therefore, the corresponding bit line and corresponding complementary bit line remain in their previous state.
[0062] In some embodiments, during operation 650, the memory controller disables read operations on the memory cells storing weights used for calculation, regardless of whether an update command is received. In other words, the memory controller does not perform random access to the memory cells storing weights in the memory array. That is, the memory controller operates in "write-only" mode and maintains the write bit lines and write inverted bit lines in their previous states, and does not charge the write bit lines and write inverted bit lines back to high voltage (VDD) after the current write operation is completed.
[0063] Through the above operations, a method for performing in-memory computations can be implemented to reduce the power consumption required to update weights stored in memory and used for MAC operations by disabling precharge operations until the next command is received. Therefore, the above method can improve the efficiency of MAC operations and reduce the overall power consumption required for various CIM applications in artificial intelligence systems. It should be understood that although the circuit architecture and method described above are in conjunction with SRAM cells, the methods described herein can be applied to CIM devices using other types of memory cells.
[0064] In some embodiments, a method for performing computation in memory is disclosed. The method includes: storing data in a plurality of memory cells of a memory array, the data including a plurality of weights for computation; determining whether an update command is received to change at least one of the plurality of weights; in response to receiving the update command, performing a write operation on the memory array to update the changed weights; and disabling the write operation on the memory array until a next update command is received to change at least one of the plurality of weights.
[0065] In some embodiments, the method further includes disabling read operations on memory cells storing multiple weights used for calculation.
[0066] In some embodiments, performing a write operation includes: precharging a bit line and a complementary bit line associated with one of the memory cells used to store updated weights to a power supply voltage; setting the bit line to a first logic value based on the updated weights associated with the update command; setting the complementary bit line to a second logic value complementary to the first logic value based on the updated weights; and setting a word line associated with one of the memory cells of the memory array to logic one.
[0067] In some embodiments, disabling write operations includes: disabling a bit line and a complementary bit line associated with a precharged memory cell having unchanged weights; and disabling a set bit line and a set complementary bit line.
[0068] In some embodiments, disabling write operations includes setting a word line associated with one of the memory cells having unchanged weights to logic zero.
[0069] In some embodiments, disabling write operations includes setting a word line associated with one of the memory cells having unchanged weights to a floating state.
[0070] In some embodiments, the method further includes: in response to receiving an update command associated with a first segment in the memory array, performing a write operation on the first segment and separately disabling write operations on a second segment separate from the first segment in the memory array.
[0071] In some embodiments, a computing device is disclosed. The computing device includes a memory array configured to store data, including multiple weights for computation. The memory array includes multiple memory cells grouped in rows and columns of memory cells, and a memory controller coupled to the memory array and configured to control the memory cells. The memory controller is configured to: perform a write operation on the memory array to update at least one changing weight in response to an update command, and disable write operations on the memory array until the next update command is received.
[0072] In some embodiments, the memory controller is configured to disable read operations on memory cells storing multiple weights used for computation.
[0073] In some embodiments, the memory controller is configured to perform a write operation by: precharging bit lines and complementary bit lines of a memory array associated with one of the memory cells used to store updated weights; setting the bit lines to a first logic value based on the updated weights associated with the update command; setting the complementary bit lines to a second logic value complementary to the first logic value based on the updated weights; and setting the word line associated with one of the memory cells to logic one.
[0074] In some embodiments, the memory controller is configured to disable write operations by disabling the bit line and complementary bit line associated with a precharged memory cell having unchanged weights; and disabling the set bit line and set complementary bit line.
[0075] In some embodiments, the memory controller is configured to disable write operations by setting the word line associated with one of the memory cells having unchanged weights to logic zero.
[0076] In some embodiments, the memory controller is configured to disable write operations by setting a word line associated with one of the memory cells having unchanged weights to a floating state.
[0077] In some embodiments, the memory controller is configured to perform a write operation on the first segment in response to an update command associated with the first segment in the memory array and to separately disable write operations on a second segment that is separate from the first segment in the memory array.
[0078] In some embodiments, the computing device further includes a command generation circuit configured to output an update command when one of a plurality of weights is replaced by a different weight.
[0079] In some embodiments, the command generation circuitry is coupled to the memory controller.
[0080] In some embodiments, the memory controller includes command generation circuitry.
[0081] In some embodiments, a memory controller is disclosed. The memory controller includes command generation circuitry configured to output an update command when one of a plurality of weights used for computation in the memory is replaced by a different weight, and control circuitry coupled to the command generation circuitry and configured to disable write operations to the memory array used to store the plurality of weights until the update command is received.
[0082] In some embodiments, the control circuitry is also configured to perform a write operation in response to an update command to update one of a plurality of weights in the memory array.
[0083] In some embodiments, the control circuitry is configured to disable write operations by disabling the bit line and complementary bit line associated with a precharged memory cell having unchanged weights; and disabling the set bit line and set complementary bit line.
[0084] The foregoing outlines features of several embodiments to enable those skilled in the art to better understand various aspects of this disclosure. Those skilled in the art will understand that they can readily use this disclosure as a basis for designing or modifying other processes and structures to achieve the same purposes and / or advantages of the embodiments described herein. Those skilled in the art will also recognize that such equivalent structures do not depart from the spirit and scope of the invention, and that various changes, substitutions, and modifications can be made within the invention without departing from its spirit and scope.
Claims
1. A method for performing computation in memory, comprising: The data is stored in multiple memory cells of a memory array, and the data includes multiple weights for calculation. Determine whether an update command has been received to change at least one of the plurality of weights; In response to receiving the update command, a write operation is performed on the memory array to update the changed weights; as well as Disable write operations to the memory array until the next update command is received to change at least one of the plurality of weights. The update command is output only when at least one of the plurality of weights changes and should be written to the memory array before the write operation is performed.
2. The method according to claim 1, further comprising: Disable read operations on the memory cells that store the multiple weights used for calculation.
3. The method according to claim 1, wherein, Performing the write operation includes: The bit line and complementary bit line associated with one of the memory cells used to store the updated weights are precharged to the power supply voltage. The bit line is set to a first logical value based on the weight of the update associated with the update command; Based on the updated weights, the complementary bit line is set to a second logical value that is complementary to the first logical value; and Set the word line associated with one of the memory cells in the memory array to logic one.
4. The method according to claim 1, wherein, Disabling the write operation includes: Disable precharge and the bit line and complementary bit line associated with one of the memory cells having unchanged weights; and Disable the settings for the bit line and set the complementary bit line.
5. The method according to claim 1, wherein, Disabling the write operation includes setting the word line associated with one of the memory cells having an unchanged weight to logic zero.
6. The method according to claim 1, wherein, Disabling the write operation includes setting the word line associated with one of the memory cells having unchanged weights to a floating state.
7. The method according to claim 1, further comprising: In response to receiving an update command associated with a first segment in the memory array, the write operation is performed on the first segment and write operations on a second segment separate from the first segment in the memory array are disabled separately.
8. A computing device, comprising: A memory array configured to store data, the data including multiple weights for calculation, the memory array comprising multiple memory cells grouped in rows and columns of memory cells; as well as A memory controller, coupled to the memory array and configured to control the memory cells, wherein the memory controller is configured to: In response to an update command, a write operation is performed on the memory array to update at least one changing weight; and Disable write operations to the memory array until the next update command is received. Specifically, the update command is only output when one of the multiple weights changes and should be written to the memory array before the write operation is performed.
9. The computing device according to claim 8, wherein, The memory controller is configured to disable read operations on the memory cells storing the plurality of weights used for calculation.
10. The computing device according to claim 8, wherein, The memory controller is configured to perform the write operation in the following manner: Precharge the bit lines and complementary bit lines of the memory array associated with one of the memory cells used to store the updated weights; The bit line is set to a first logical value based on the weight of the update associated with the update command; Based on the updated weights, the complementary bit line is set to a second logical value that is complementary to the first logical value; and Set the word line associated with one of the memory cells to logic one.
11. The computing device according to claim 8, wherein, The memory controller is configured to disable the write operation in the following manner: Disable precharge and the bit line and complementary bit line associated with one of the memory cells having unchanged weights; and Disable the settings for the bit line and set the complementary bit line.
12. The computing device according to claim 8, wherein, The memory controller is configured to disable the write operation by setting the word line associated with one of the memory cells having unchanged weights to logic zero.
13. The computing device according to claim 8, wherein, The memory controller is configured to disable the write operation by setting the word line associated with one of the memory cells having unchanged weights to a floating state.
14. The computing device according to claim 8, wherein, The memory controller is configured to perform the write operation on the first segment in response to the update command associated with the first segment in the memory array and to separately disable the write operation on a second segment that is separate from the first segment in the memory array.
15. The computing device of claim 8, further comprising a command generation circuit configured to output the update command when one of the plurality of weights is replaced by a different weight.
16. The computing device according to claim 15, wherein, The command generation circuit is coupled to the memory controller.
17. The computing device according to claim 15, wherein, The memory controller includes the command generation circuit.
18. A memory controller, comprising: The command generation circuit is configured to output an update command when one of the multiple weights used for calculation in memory should be replaced by a different weight; as well as A control circuit, coupled to the command generation circuit, is configured to disable write operations to the memory array used to store the plurality of weights until the update command is received. Specifically, before performing the write operation, the command generation circuit outputs the update command only when one of the plurality of weights changes and should be written to the memory array.
19. The memory controller of claim 18, wherein, The control circuitry is also configured to perform the write operation in response to the update command to update one of the plurality of weights in the memory array.
20. The memory controller of claim 18, wherein, The control circuit is configured to disable the write operation in the following manner: Disable precharge and the bit lines and complementary bit lines associated with a memory cell in the memory array having unchanged weights; and Disable the settings for the bit line and set the complementary bit line.
Citation Information
Patent Citations
In-memory computing bit unit and in-memory computing device
CN112558919A
Memory controller
JP1996202626A
Read and write data processing circuits and methods associated with computational memory cells that provides write inhibits and read bit line pre-charge inhibits
US10770133B1
