In-memory digital computation
The digital in-memory computational architecture addresses inefficiencies in machine learning processing by using a CIM array to store and calculate neural network weights within memory cells, enhancing accuracy and efficiency in resource-constrained devices.
Patent Information
- Application Number
- JP2024505603
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-07-29
- Filing Date
- 2022-08-01
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-08-01
AI Technical Summary
Existing machine learning processing systems face inefficiencies in power and space constraints, particularly in edge devices, and traditional in-memory computational architectures suffer from inaccuracies due to analog signal calculations, which impact neural network calculations.
A digital in-memory computational architecture using a CIM array with memory cells configured to store neural network weights and perform calculations within memory cells, utilizing accumulators to accumulate output signals sequentially after activating word lines, reducing the need for data transfer and enhancing accuracy.
This approach reduces power consumption, minimizes data transfer bottlenecks, and improves computational efficiency and accuracy for machine learning tasks, particularly in resource-constrained devices like mobile devices and IoT devices.
Smart Images

Figure 2024532682000001
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of and priority to U.S. Provisional Patent Application No. 63 / 228,523, filed August 02, 2021, which claims priority to U.S. Provisional Patent Application No. 17 / 816,285, filed July 29, 2022, the entire contents of each of which are incorporated herein by reference in their entirety. [Background technology]
[0002] Aspects of the present disclosure relate to performing machine learning tasks, and in particular to in-memory computing architectures.
[0003] Machine learning is generally the process of generating trained models (e.g., artificial neural networks, trees, or other structures) that represent a generalized fit to a set of training data that is known a priori. By applying the trained model to new data, inferences are generated, and the inferences can be used to gain insight into the new data. Sometimes, applying a model to new data is described as "performing inference" on the new data.
[0004] As the use of machine learning has proliferated to enable various machine learning (or artificial intelligence) tasks, a need has arisen for more efficient processing of machine learning model data. In some cases, specialized hardware such as machine learning accelerators can be used to enhance the processing system's ability to process machine learning model data. However, such hardware requires space and power, which are not always available on the processing device. For example, "edge processing" devices such as mobile devices, always-on devices, and internet of things (IoT) devices must typically balance processing power with power and packaging constraints. Furthermore, accelerators may move data across a common data bus, which can cause significant power usage and introduce latency to other processes sharing the data bus. Therefore, other aspects of the processing system are considered to process machine learning model data.
[0005] The memory device is an example of another aspect of a processing system that can be utilized to perform processing of machine learning model data through a so-called computation in memory (CIM) process. CIM arrays have been developed to implement nodes of a neural network framework without data transfer bottlenecks. By storing weight data in each cell of the CIM array and performing multiplication operations in each cell, data transfer bottlenecks are avoided. Neural networks are a form of artificial intelligence that relies on a high level of accuracy, and therefore CIM arrays can be expected to produce accurate results. Conventional CIM processes perform calculations using analog signals, which are more susceptible to inaccuracies in the calculation results that can adversely affect neural network calculations. Thus, systems and methods for performing in-memory computations with improved accuracy are needed. Further design goals of CIM can include flexibility and scalability. Summary of the Invention
[0006] Certain aspects provide apparatus and techniques for performing machine learning tasks, particularly in-memory computing architectures.
[0007] One aspect provides a circuit for in-memory computation. The circuit generally includes a plurality of memory cells on each of a plurality of bitlines of a memory, the plurality of memory cells configured to store a plurality of bits representing weights of a neural network. The plurality of memory cells on each of the plurality of bitlines may be on different wordlines of the memory. The circuit also includes a plurality of accumulators, each accumulator coupled to a respective one of the plurality of bitlines.
[0008] Another aspect provides a method for in-memory computation that generally includes storing a plurality of bits representing weights of a neural network in a plurality of memory cells on each of a plurality of bit lines of a memory, the plurality of memory cells on each of the plurality of bit lines being on different word lines of the memory, and accumulating, via respective accumulators of a plurality of accumulators, output signals of two or more of the plurality of memory cells on respective ones of the plurality of bit lines after two or more of the word lines are sequentially activated.
[0009] Yet another aspect provides an apparatus for in-memory computation that generally includes means for storing a plurality of bits representing neural network weights in a plurality of memory cells on each of a plurality of bit lines of a means for storing, the plurality of memory cells on each of the plurality of bit lines being on different word lines of the means for storing, and means for accumulating output signals of two or more of the plurality of memory cells on respective ones of the plurality of bit lines after two or more of the word lines are sequentially activated.
[0010] Yet another aspect provides a circuit for in-memory computation generally including a plurality of bit lines, a plurality of word lines, an array of in-memory computation cells, each in-memory computation cell coupled to one of the bit lines and one of the word lines and configured to store a weight bit of a neural network, and a plurality of accumulators, each accumulator coupled to a respective one of the plurality of bit lines.
[0011] Yet another aspect provides a method for in-memory computation that generally includes performing computations on weights and activation inputs of a neural network in at least a portion of an array of in-memory computation cells, each in-memory computation cell coupled to one of a plurality of bit lines and one of a plurality of word lines and configured to store a weight bit of the neural network, and accumulating, via respective accumulators of a plurality of accumulators, output signals from two or more of the in-memory computation cells coupled to respective ones of the plurality of bit lines.
[0012] Other aspects provide a processing system configured to perform the aforementioned methods and methods described herein; a non-transitory computer readable medium comprising instructions that, when executed by one or more processors of the processing system, cause the processing system to perform the aforementioned methods and methods described herein; a computer program product embodied on the computer readable storage medium comprising code for performing the aforementioned methods and methods further described herein; and a processing system comprising means for performing the aforementioned methods and methods further described herein.
[0013] The following description and the related drawings set forth in detail certain illustrative features of the one or more aspects.
[0014] So that the above-mentioned features of the present disclosure may be understood in detail, a more particular description, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the accompanying drawings, which should be noted, however, that the present description may admit of other equally effective embodiments, and therefore, the accompanying drawings illustrate only some typical embodiments of the present disclosure and should not be considered as limiting its scope. [Brief description of the drawings]
[0015] [Figure 1A] 1A-1C illustrate examples of various types of neural networks that may be implemented according to aspects of the present disclosure. [Figure 1B] 1A-1C illustrate examples of various types of neural networks that may be implemented according to aspects of the present disclosure. [Figure 1C] 1A-1C illustrate examples of various types of neural networks that may be implemented according to aspects of the present disclosure. [Figure 1D] 1A-1C illustrate examples of various types of neural networks that may be implemented according to aspects of the present disclosure. [Diagram 2] FIG. 1 illustrates an example of a conventional convolution operation that may be implemented according to aspects of the present disclosure. [Figure 3A] FIG. 1 illustrates an example of a depthwise separable convolution operation that may be implemented by aspects of the present disclosure. [Figure 3B] FIG. 1 illustrates an example of a depthwise separable convolution operation that may be implemented by aspects of the present disclosure. [Figure 4] FIG. 1 illustrates an exemplary memory cell implemented as an eight-transistor (8T) static random access memory (SRAM) cell for computation-in-memory (CIM) circuits. [Diagram 5] FIG. 2 is a block diagram of an example circuit for a digital CIM in accordance with certain aspects of the present disclosure. [Figure 6A] FIG. 1 is a flow diagram illustrating example operations for in-memory computing in accordance with certain aspects of the present disclosure. [Figure 6B]FIG. 1 is a flow diagram illustrating example operations for in-memory computing in accordance with certain aspects of the present disclosure. [Figure 7] FIG. 1 is a block diagram illustrating an example electronic device having a neural network configured to perform in-memory computational operations in accordance with certain aspects of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] For ease of understanding, wherever possible, the same reference numbers are used to designate identical elements common to the figures. It is contemplated that elements and features of one embodiment may be beneficially incorporated in other embodiments without further recitation.
[0017] Aspects of the present disclosure provide an apparatus, method, processing system, and computer-readable medium for performing computation in memory (CIM) to handle data-intensive processing, such as implementing machine learning models. Some aspects provide techniques for performing digital CIM using accumulators, each accumulator accumulating an output signal on a respective one of a plurality of bit lines of a memory after a plurality of activation cycles. In some aspects, one of the word lines may be activated during each of the plurality of activation cycles. In other words, the word lines may be activated sequentially, and the accumulators may simultaneously perform accumulation to provide an accumulation result after two or more of the word lines are activated sequentially.
[0018] CIM-based machine learning (ML) / artificial intelligence (AI) can be used for a wide variety of tasks, including image processing (e.g., still images and video), audio processing, control of the radio frequency (RF) front end in wireless communications, and wireless communications decisions (e.g., to optimize or at least increase throughput and signal quality). Furthermore, CIMs can be based on various types of memory architectures, such as dynamic random access memory (DRAM), static random access memory (SRAM) (e.g., based on SRAM cells as in FIG. 4), magnetoresistive random-access memory (MRAM), and resistive random-access memory (ReRAM or RRAM), and can be attached to various types of processing units, including central processing units (CPUs), digital signal processors (DSPs), graphics processing units (GPUs), field-programmable gate arrays (FPGAs), neural processing units (NPUs), neural signal processors (NSPs), and the like. In general, CIMs can advantageously reduce the "memory wall" problem, where moving data in and out of memory consumes more power than computing the data. Thus, significant power savings can be realized by performing computations in memory. This is particularly useful for various types of electronic devices such as low power edge devices, mobile devices, etc.
[0019] For example, a mobile device may include a memory device configured to store data and perform in-memory computation operations. The mobile device may be configured to perform ML / AI operations based on data generated by the mobile device, such as image data generated by a camera sensor of the mobile device, audio data received via a microphone of the mobile device, inertial data collected by an accelerometer or gyroscope of the mobile device, temperature data captured by a temperature sensor of the mobile device, and / or combinations thereof. Thus, a memory controller unit (MCU) of the mobile device may load weights from another on-board memory (e.g., flash or RAM) into a CIM array of the memory device and allocate input feature buffers and output (e.g., output activation) buffers. The processing device may then begin processing the data, for example, by loading layers in the input buffers and processing the layers with the weights loaded in the CIM array. This process may be repeated for each layer of data, and the outputs (e.g., output activations) may be stored in an output buffer and then used by the mobile device for ML / AI tasks, such as intelligently controlling wireless communications, heating and air conditioning systems, security systems, or other Internet of Things (IoT) applications.
[0020] A brief background on neural networks, deep neural networks, and deep learning Neural networks are organized into layers of interconnected nodes. In general, a node (or neuron) is where computations are performed. For example, a node may combine input data with a set of weights (or coefficients) that either amplify or attenuate the input data. Amplification or attenuation of an input signal may thus be viewed as an assignment of relative importance to various inputs with respect to the task the network is trying to learn. In general, the input-weight products are summed (or accumulated) and then this sum is passed through the node's activation function to determine whether and to what extent the signal should proceed further through the network.
[0021] In its most basic implementation, a neural network may have an input layer, a hidden layer, and an output layer. "Deep" neural networks generally have two or more hidden layers.
[0022] Deep learning is a method of training deep neural networks. In general, deep learning maps inputs to the network to outputs from the network, and is therefore sometimes called a "universal approximator" because deep learning can learn to approximate an unknown function f(x)=y between any input x and any output y. In other words, deep learning finds the correct f to transform x to y.
[0023] More specifically, deep learning trains each layer of nodes on a different set of features, i.e., the output from the previous layer. Thus, with each successive layer of a deep neural network, the features become more complex. Deep learning is therefore powerful because it can progressively extract higher level features from input data by learning to represent the input at successively higher levels of abstraction at each layer, thereby building useful feature representations of the input data, to perform complex tasks such as object recognition.
[0024] For example, when presented with visual data, the first layer of a deep neural network can be trained to recognize relatively simple features, such as edges, in the input data. In another example, when presented with auditory data, the first layer of a deep neural network can be trained to recognize the spectral power at specific frequencies in the input data. The second layer of the deep neural network can then be trained to recognize combinations of features, such as simple shapes in the visual data, or combinations of sounds in the auditory data, based on the output of the first layer. The higher layers can then be trained to recognize complex shapes in the visual data or words in the auditory data. The higher layers can then be trained to recognize common visual objects or spoken phrases. Thus, deep learning architectures can perform particularly well when applied to problems with natural hierarchical structures.
[0025] Layer Connectivity in Neural Networks Neural networks, such as deep neural networks (DNNs), can be designed with a variety of connectivity patterns between layers.
[0026] 1A illustrates an example of a fully-connected neural network 102. In a fully-connected neural network 102, each node in the first layer communicates its output to every node in the second layer, such that each node in the second layer receives input from every node in the first layer.
[0027] 1B illustrates an example of a locally connected neural network 104. In the locally connected neural network 104, a node in a first layer may be connected to a limited number of nodes in a second layer. More generally, the locally connected layers of the locally connected neural network 104 may be configured such that each node in a layer has the same or similar connectivity pattern, but with connection strengths (or weights) that may have different values (e.g., values associated with local areas 110, 112, 114, and 116 of the first layer nodes). The connectivity patterns of the local connections may result in spatially distinct receptive fields in the upper layers, since the higher layer nodes in a given region may receive inputs that are tuned to the characteristics of a constrained portion of the total inputs to the network through training.
[0028] One type of locally connected neural network is a convolutional neural network (CNN). Figure 1C shows an example of a convolutional neural network 106. The convolutional neural network 106 may be configured such that the connection strengths associated with the inputs for each node in the second layer are shared (e.g., for local areas 108 that overlap another local area of a first layer node). Convolutional neural networks are well suited to problems where the spatial location of the inputs makes sense.
[0029] One type of convolutional neural network is the deep convolutional network (DCN), which is a network of multiple convolutional layers and can be further configured with, for example, pooling layers and normalization layers.
[0030] 1D shows one embodiment of a DCN 100 designed to recognize visual features in an image 126 generated by an image capture device 130. For example, if the image capture device 130 is a camera mounted in or on (or otherwise moving with) a vehicle, the DCN 100 can be trained using a variety of supervised learning techniques to identify traffic signs, and even numbers on traffic signs. Similarly, the DCN 100 can be trained for other tasks, such as identifying lane markings, or identifying traffic signals. These are just a few example tasks, and many other tasks are possible.
[0031] In the embodiment of FIG. 1D, the DCN 100 includes a feature extraction section and a classification section. Upon receiving an image 126, the convolutional layer 132 applies a convolution kernel to the image 126 (e.g., as shown and described in FIG. 2) to generate a first set of feature maps 118 (or intermediate activations). In general, a "kernel" or "filter" includes a multi-dimensional array of weights designed to emphasize different aspects of the input data channels. In various embodiments, "kernel" and "filter" can be used interchangeably to refer to a set of weights applied in a convolutional neural network.
[0032] The first set of feature maps 118 may then be subsampled by a pooling layer (e.g., a max pooling layer, not shown) to generate a second set of feature maps 120. The pooling layer can reduce the size of the first set of feature maps 118 while retaining much of the information to improve model performance. For example, the second set of feature maps 120 may be downsampled by the pooling layer from a 28×28 matrix to a 14×14 matrix.
[0033] This process can be repeated through many layers, in other words, the second set of feature maps 120 may be further convolved through one or more subsequent convolutional layers (not shown) to generate one or more subsequent sets of feature maps (not shown).
[0034] 1D , the second set of feature maps 120 is provided to a fully connected layer 124, which then generates an output feature vector 128. Each feature in the output feature vector 128 may include a number corresponding to a possible feature of the image 126, such as "sign," "60," and "100." In some cases, a softmax function (not shown) may convert the numbers in the output feature vector 128 into probabilities. The output 122 of the DCN 100 is then the probability that the image 126 contains one or more features.
[0035] A softmax function (not shown) can convert the individual elements of the output feature vector 128 into probabilities such that the output 122 of the DCN 100 is one or more probabilities that an image 126, such as a sign having the number "60" on it, contains one or more features, as in the input image 126. Thus, in this example, the probabilities in the output 122 for "sign" and "60" should be higher than the probabilities of other elements of the output 122, such as "30", "40", "50", "70", "80", "90", and "100".
[0036] Prior to training the DCN 100, the output 122 produced by the DCN 100 may be inaccurate. Thus, an error may be calculated between the output 122 and a target output known a priori. For example, here the target output is an indication that the image 126 contains a "sign" and the number "60". Using the known target output, the weights of the DCN 100 may then be adjusted through training such that subsequent outputs 122 of the DCN 100 achieve the target output (with high probability).
[0037] To adjust the weights of the DCN 100, the learning algorithm may calculate a gradient vector for the weights. The gradient may indicate the amount by which the error would increase or decrease if the weights were adjusted in a particular way. The weights may then be adjusted to reduce the error. This method of adjusting the weights is sometimes called "backpropagation" because the adjustment process involves a "backward pass" through the layers of the DCN 100.
[0038] In practice, the error gradient of the weights may be calculated over a small number of examples such that the calculated gradient approximates the true error gradient. This approximation method is sometimes called stochastic gradient descent. Stochastic gradient descent may be iterated until the achievable error rate of the entire system stops decreasing or until the error rate reaches a target level.
[0039] After training, the DCN 100 may be presented with new images and the DCN 100 can generate inferences such as classifications or probabilities that various features are present in the new image.
[0040] Convolution Techniques for Convolutional Neural Networks Convolution is commonly used to extract useful features from an input dataset. For example, in convolutional neural networks as described above, convolution allows the extraction of different features using kernels and / or filters whose weights are automatically learned during training. The extracted features are then combined to make inferences.
[0041] Activation functions can be applied before and / or after each layer of a convolutional neural network. Activation functions are generally mathematical functions that determine the output of a node in a neural network. Thus, activation functions determine whether a node should pass on information based on whether the node's input is relevant to the model's prediction. In one embodiment, if y=conv(x) (i.e., y is a convolution of x), then both x and y may generally be considered "activations". However, with respect to a particular convolution operation, x may also be referred to as a "pre-activation" or "input activation" due to x's presence before the particular convolution, and y may be referred to as an output activation or feature map.
[0042] 2 shows an example of conventional convolution where an input image of 12 pixels by 12 pixels by 3 channels is convolved using a 5×5×3 convolution kernel 204 and a stride (or step size) of 1. The resulting feature map 206 is 8 pixels by 8 pixels by 1 channel. As can be seen in this example, conventional convolution can vary the dimensionality of the input data compared to the output data (here, from 12×12 to 8×8 pixels) and the channel dimensionality (here, from 3 channels to 1 channel).
[0043] One way to reduce the computational load (e.g., measured in floating point operations per second (FLOPs)) and number of parameters associated with neural networks that include convolutional layers is to factorize the convolutional layers. For example, a spatially separable convolution as shown in FIG. 2 can be factorized into two components: (1) a depthwise convolution (e.g., spatial fusion), where each spatial channel is independently convolved with a depthwise convolution, and (2) a pointwise convolution (e.g., channel fusion), where all spatial channels are linearly combined. An example of a depthwise separable convolution is shown in FIG. 3A and FIG. 3B. In general, during spatial fusion, the network learns features from the spatial plane, and during channel fusion, the network learns the relationship between these features across channels.
[0044] In one embodiment, depthwise separable convolution can be implemented using a 5×5 kernel for spatial fusion and a 1×1 kernel for channel fusion. In particular, channel fusion can use a 1×1×d kernel that iterates through every single point in the input image at depth d, where the depth of the kernel d generally matches the number of channels in the input image. Channel fusion with pointwise convolution is useful for dimensionality reduction for efficient computation. By applying a 1×1×d kernel and adding an activation layer after the kernel, added depth can be provided to the network, which can improve the performance of the network.
[0045] In particular, in FIG. 3A , a 12 pixel by 12 pixel by 3 channel input image 302 is convolved with a filter including three separate kernels 304A-C, each having a dimensionality of 5 by 5 by 1, to generate an 8 pixel by 8 pixel by 3 channel feature map 306, with each channel generated by a separate kernel in kernels 304A-C.
[0046] The feature map 306 is then further convolved using a point-wise convolution operation where the kernel 308 has dimensionality 1×1×3 to generate an 8 pixel×8 pixel×1 channel feature map 310. As shown in this example, the feature map 310 has reduced dimensionality (1 channel vs. 3 channels), which allows for more efficient computations using the feature map 310.
[0047] The results of the depthwise separable convolution in FIGS. 3A and 3B are substantially similar to the conventional convolution in FIG. 2, but the number of computations is significantly reduced, and therefore the depthwise separable convolution offers significant efficiency gains when the network design permits.
[0048] Although not shown in FIG. 3B, multiple (e.g., m) pointwise convolution kernels 308 (e.g., individual components of a filter) can be used to increase the channel dimensionality of the convolution output. Thus, for example, m=256 1×1×3 kernels 308 can be generated, each of which outputs an 8 pixel×8 pixel×1 channel feature map (e.g., feature map 310), which can be stacked to obtain a resulting 8 pixel×8 pixel×256 channel feature map. The resulting increase in channel dimensionality can provide more parameters for training, thereby improving the ability of the convolutional neural network to identify features (e.g., in the input image 302).
[0049] Exemplary Computation in Memory (CIM) Architecture 4 illustrates an exemplary static random access memory (SRAM) memory cell 400 that may be implemented in a CIM array. Memory cell 400 is sometimes referred to as an eight-transistor (8T) SRAM cell because memory cell 400 is implemented with eight transistors.
[0050] As shown, the memory cell 400 may include a flip-flop that may be implemented as a cross-coupled inverter pair 424 having an output 414 and an output 416. As shown, the cross-coupled inverter pair output 414 is selectively coupled to a write bit line (WBL) 406 via a pass gate transistor 402, and the cross-coupled inverter pair output 416 is selectively coupled to a complementary write bit line (WBLB) 420 via a pass gate transistor 418. The WBL 406 and WBLB 420 are configured to provide complementary digital signals to be written (e.g., stored) to the cross-coupled inverter pair 424. The WBL and WBLB may be used to store weight bits of a neural network in the memory cell 400. The gates of the pass gate transistors 402, 418 may be coupled to a write word line (WWL) 404, as shown. For example, a digital signal to be written may be provided to the WBL (the complement of the digital signal is provided to the WBLB). The passgate transistors 402, 418 (here implemented as n-type field effect transistors (NFETs)) are then turned on by providing a logic high signal to the WWL 404, resulting in the digital signal being stored in the cross-coupled inverter pair 424.
[0051] As shown, the cross-coupled inverter pair output 414 may be coupled to the gate of transistor 410. The source of transistor 410 may be coupled to a reference potential node (VSS or electrical ground) and the drain of transistor 410 may be coupled to the source of transistor 412. As shown, the drain of transistor 412 may be coupled to a read bit line (RBL) 422. The gate of transistor 412 may be controlled via a read word line (RWL) 408. RWL 408 may be controlled via an activate input signal.
[0052] During a read cycle, RBL 422 may be precharged to a logic high. If both the activation input and the weight bit stored in cross-coupled inverter pair output 414 are logic high, then transistors 410, 412 will both be on, electrically coupling RBL 422 to VSS at the source of transistor 410 and discharging RBL 422 to a logic low. If either the activation input or the weight stored in cross-coupled inverter pair output 414 are logic low, then at least one of transistors 410, 412 will be off, so that RBL 422 remains logic high. Thus, the output of memory cell 400 at RBL 422 is logic low only when both the weight bit and activation input are logic high, and is logic high otherwise, effectively performing a NAND gate operation.
[0053] 5 illustrates a circuit 500 for a CIM in accordance with certain aspects of the present disclosure. The circuit 500 includes a CIM array having N word lines 504-1 through 504-N (also referred to as rows) and M bit lines 506-1 through 506-M (also referred to herein as "columns"), where N and M are each any integer greater than 1. N and M may be the same or different. The bit lines 506-1 through 506-M (collectively referred to herein as "BL 506") are labeled BL1 through BL2 in FIG. M 5, and word lines 504-1 through 504-N (collectively referred to herein as “WL 504”) are labeled WL1 through WL N 5. Each of the BLs 506 may correspond to a RBL in the memory cell 400 of FIG. 4, and each of the WLs 504 may correspond to a RWL in the memory cell 400 of FIG. 4. As shown in FIG. 5, memory cells 502-1,1 through 502-N,M (collectively referred to herein as "memory cells 502") are implemented at the intersections of the WLs 504 and BLs 506. In the memory cell reference scheme (e.g., 502-2,1), the first integer after the dash (here, 2) indicates the word line and the second integer after the dash (here, 1) indicates the bit line of the intersection at which the memory cell is located.
[0054] Each of the memory cells 502 may be implemented using the memory cell architecture described with respect to FIG. 4. As shown, activation inputs X1-X N may be provided to each word line 504, and the memory cells 502 may store weights W1 through W N Each weight can be stored in M bits (e.g., W 1,1 ~W 1,M , W 2,1 ~W 2,M , and Ww N,1 ~W N,M For example, memory cells 502-1,1 to 502-1,M store M bits (for example, weight bits W 1,1 ~W 1,M ), and memory cells 502-2,1 to 502-2,M can store M bits (e.g., weight bits W 2,1 ~W 2,M ), and so on. Weights may be written to memory cells 502 via write bit lines (e.g., WBL 406 and WBLB 420) not shown in FIG. 5. During a computation cycle, each memory cell 502 may multiply a received activation bit by a stored weight bit (e.g., perform a logical NAND operation with the activation bit and the stored weight bit as inputs, as described with respect to FIG. 4).
[0055] In some embodiments, sense amplifiers (SAs) 508-1 through 508-M (collectively referred to herein as "SAs 508") may be used to sense signals (e.g., digital signals from NAND operations of memory cells) on each one of the bit lines 506. The SAs 508 may perform simultaneous sensing of the bit lines 506. Each of the sensed signals for each BL may be provided to a respective one of the accumulators 510-1 through 510-M (collectively referred to herein as "accumulators 510"). The accumulators 510 perform accumulation of the signals sensed by the SAs 508 on a bit line basis simultaneously.
[0056] In some embodiments, the activation inputs x1 to x N may be applied one row (word line) at a time (e.g., one row per computation cycle). For example, activation input X1 may be provided to word line 504-1 during a first computation cycle, and a computation (e.g., a multiplication such as the NAND operation described above) on activation input W1 and weight W1 results in bit weight W 1,1 ~W 1,M The signal (e.g., a digital signal) on the BL 506 after the first calculation cycle may be sensed (simultaneously) via the respective SA 508 and provided to the respective accumulator 510. During the subsequent calculation cycle, the activation inputs X2 to X N For each of the N The accumulators 510 can perform the same operations (in order ending with ). The accumulators 510 accumulate additional signals on the corresponding BLs 506 after each calculation cycle. After a calculation cycle is completed, each of the accumulators 510 provides an accumulation result for a respective one of the BLs 506. The accumulation result from each accumulator indicates the accumulation of the signals on the respective BLs, each of the signals being generated after one of the calculation cycles.
[0057] Activation input x1~x N Since the word lines 504 receiving the inputs x1 through x2 can be activated one at a time, the number of computation cycles corresponds to the number of activation inputs, and the computation cycles occur sequentially to activate the activation inputs x1 through x2. N is a measure of the amount of time it takes to receive an accumulation result for a computation cycle. In some aspects, if the activation input associated with a computation cycle is logic low, the computation cycle can be skipped, effectively speeding up the CIM process. In other words, activation inputs X1 to X Nmay be provided to a respective word line during each computation cycle 1-N. If activation input X2 is logic low, computation cycle 2 may be skipped, reducing the total amount of time taken for computation by the duration of one computation cycle. Thus, for certain embodiments, computations using memory cells 502-2,1 through 502-2,M may be skipped and / or accumulator 510 may skip accumulating output signals of memory cells 502-2,1 through 502-2,M based on activation input x2 being logic low. In this manner, the present disclosure provides a digital CIM array that provides more accurate multiply-accumulate (MAC) operations as compared to certain implementations that use analog CIMs.
[0058] Exemplary Operations for Digital Computing in Memory (CIM) 6A is a flow diagram illustrating an example operation 600 for in-memory computing according to certain aspects of the present disclosure. The operation 600 may be performed by a circuit for a CIM (e.g., a digital CIM), such as the circuit 500 described with respect to FIG.
[0059] The operations 600 begin at block 605 with the circuit storing a number of bits representing weights of a neural network in a number of memory cells (e.g., memory cell 502) on each of a number of bit lines (e.g., bit line 506) of a memory. For certain aspects, the bits representing the weights may be stored using other bit lines of the memory (e.g., write bit lines such as WBL 406 and WBLB 420). The memory cells on each of the number of bit lines are on different word lines (e.g., word line 504) of the memory, as shown in FIG. 5. In some aspects, the circuit multiplies one bit of the weights with an activation input provided to a respective one of the word lines via each of the number of memory cells.
[0060] In block 610, the circuit accumulates, via each accumulator of a plurality of accumulators (e.g., accumulator 510), output signals of two or more of the plurality of memory cells onto a respective one of the plurality of bit lines after two or more of the word lines are sequentially activated. The output signals may include digital signals generated by the plurality of memory cells on a respective one of the plurality of bit lines (e.g., by NAND logic of the memory cells). In some aspects, the circuit activates the word lines of the memory, one word line at a time. In this case, the activation includes multiplying one of the weights stored in the memory cells on a word line with an activation input provided to the word line.
[0061] In some aspects, the circuit senses a respective one of the multiple bit lines via a respective sense amplifier of the multiple sense amplifiers (e.g., SA508). The output signals of the multiple memory cells may be accumulated based on sensing the respective ones of the multiple bit lines. In some aspects, the multiple bit lines are sensed simultaneously via multiple sense amplifiers as described herein.
[0062] In some aspects, the circuitry selects two or more of the word lines to be sequentially activated based on an activation input applied to each of two or more of the word lines being logic high. For example, the circuitry may skip accumulation of at least one output signal of at least one other memory cell of the plurality of memory cells based on at least one other memory cell receiving an activation input that is logic low.
[0063] In some aspects, the output signal is accumulated via a respective one of a plurality of accumulators after a plurality of activation cycles, during each of the plurality of activation cycles, a respective activation input that is logic high is provided to a respective one of the word lines.
[0064] In some aspects, each of the plurality of memory cells includes a pass gate transistor (e.g., pass gate transistor 418), a flip-flop (e.g., including cross-coupled inverter pair 424) coupled to the pass gate transistor, a first transistor (e.g., transistor 410) having a gate coupled to an output of the flip-flop, and a second transistor (e.g., transistor 412) coupled between the first transistor and a respective one of a plurality of bit lines (e.g., RBL 422 shown in FIG. 4). The first transistor can include a source coupled to a reference potential node (e.g., electrical ground) and a drain coupled to a source of the second transistor, the drain of which is coupled to a respective one of the plurality of bit lines. The gate of the second transistor can be coupled to a respective one of the word lines (e.g., RWL 408 shown in FIG. 4).
[0065] 6B is a flow diagram illustrating example operations 650 for in-memory computation in accordance with certain aspects of the disclosure. The operations 650 may be performed by a circuit for a CIM (e.g., a digital CIM), such as the circuit 500 described with respect to FIG. Many of the operations 650 may be similar to the operations 600 described above and will not be repeated below.
[0066] The operations 650 begin at block 655, where the circuitry performs calculations on the weights and activation inputs of a neural network in at least a portion of an array of in-memory computational cells (e.g., memory cells 502). Each in-memory computational cell may be coupled to one of a number of bit lines (e.g., bit line 506) and one of a number of word lines (e.g., word line 504) and may be configured to store a weight bit of the neural network.
[0067] In block 660, the circuit accumulates output signals from two or more of the in-memory computational cells coupled to a respective one of the plurality of bit lines via respective accumulators of a plurality of accumulators (e.g., accumulator 510). The output signals may include digital signals generated by the in-memory computational cells on the respective one of the plurality of bit lines (e.g., by NAND logic of the memory cells).
[0068] In some aspects, operation 650 may further include the circuit sequentially activating two or more word lines, in which case the accumulation in block 660 may occur after the sequential activation. The sequential activation may involve applying an activation input to each of the two or more word lines, one word line at a time.
[0069] Exemplary Processing System for Computing in Memory (CIM) Figure 7 illustrates an example electronic device 700. The electronic device 700 may be configured to perform the methods described herein, including the operations 600 and 650 described with respect to Figures 6A and 6B.
[0070] The electronic device 700 includes a central processing unit (CPU) 702, which in some aspects may be a multi-core CPU. Instructions executed by the CPU 702 may be loaded from a program memory associated with the CPU 702 or may be loaded from a memory 724, for example.
[0071] The electronic device 700 also includes additional processing blocks tailored to specific functions, such as a graphics processing unit (GPU) 704, a digital signal processor (DSP) 706, a neural processing unit (NPU) 708, a multimedia processing block 710, and a wireless connectivity block 712. In one implementation, the NPU 708 is implemented in one or more of the CPU 702, the GPU 704, and / or the DSP 706.
[0072] In some aspects, the wireless connectivity processing block 712 may include components for, for example, third generation (3G) connectivity, fourth generation (4G) connectivity (e.g., 4G LTE), fifth generation (e.g., 5G or NR), Wi-Fi connectivity, Bluetooth connectivity, and / or wireless data transmission standards. The wireless connectivity processing block 712 is further coupled to one or more antennas 77 to facilitate wireless communications.
[0073] The electronic device 700 may also include one or more sensor processors 716 associated with any type of sensor, one or more image signal processors (ISP) 718 associated with any type of image sensor, and / or a navigation processor 720, which may include satellite-based positioning system components (e.g., GPS or GLONASS) and inertial positioning system components.
[0074] Electronic device 700 may also include one or more input and / or output devices 722, such as a screen, a touch-sensitive surface (including a touch-sensitive display), physical buttons, a speaker, a microphone, etc. In some aspects, one or more of the processors of electronic device 700 may be based on the ARM instruction set.
[0075] The electronic device 700 also includes a memory 724, which represents one or more static and / or dynamic memories, such as dynamic random access memory (DRAM), flash-based static memory, etc. In this example, the memory 724 includes computer-executable components, which may be executed by one or more of the aforementioned processors of the electronic device 700 and / or a CIM controller 732 (also referred to as a control circuit). In some aspects, the electronic device 700 includes a CIM circuit 726, such as circuit 500, as described herein. The CIM circuit 726 may be controlled via the CIM controller 732. For example, in some aspects, the memory 724 may include code 724A for storing (e.g., storing weights in memory cells) and code 724B for computing (e.g., performing neural network computations by applying activation inputs). As shown, the CIM controller 732 may include circuitry 728A for storing (e.g., storing weights in memory cells) and circuitry 728B for computing (e.g., performing neural network computations by applying activation inputs). The components shown and other components not shown may be configured to perform various aspects of the methods described herein.
[0076] In some aspects, such as when the electronic device 700 is a server device, various aspects, such as one or more of the multimedia processing block 710, the wireless connection processing block 712, the antenna 714, the sensor processor 716, the ISP 718, or the navigation processor 720, may be omitted from the embodiment shown in FIG.
[0077] Example clause Clause 1. A circuit comprising: a plurality of bit lines; a plurality of word lines; an array of in-memory computational cells, each in-memory computational cell coupled to one of the bit lines and one of the word lines and configured to store a weight bit of a neural network; and a plurality of accumulators, each accumulator coupled to a respective one of the plurality of bit lines.
[0078] Clause 2. The circuit of clause 1, further comprising a plurality of sense amplifiers, each sense amplifier having an output coupled to a respective one of the accumulators and having an input coupled to a respective one of the plurality of bit lines.
[0079] Clause 3. The circuit of clause 2, wherein the multiple sense amplifiers are configured to sense multiple bit lines simultaneously.
[0080] Clause 4. The circuit of any one of clauses 1-3, wherein a computational cell in the memory coupled to one of a plurality of bit lines and a plurality of word lines is configured to perform concurrent computations.
[0081] Clause 5. The circuit of any of clauses 1-4, wherein the multiple word lines are configured to be activated one word line at a time.
[0082] Clause 6. The circuit of any of clauses 1-5, wherein two or more of the word lines are configured to be sequentially activated, and each of the plurality of accumulators is configured to accumulate output signals from computational cells in the memory coupled to respective ones of the plurality of bit lines after two or more of the word lines are sequentially activated.
[0083] Clause 7. The circuit of clause 6, wherein the output signal comprises a digital signal generated by a computational cell in the memory on a respective one of the plurality of bit lines.
[0084] Clause 8. The circuit of clause 6 or 7, further comprising a control circuit configured to select two or more of the word lines to be sequentially activated based on an activation input applied to each of two or more of the word lines being logic high.
[0085] Clause 9. The circuit of any of clauses 1 to 5, wherein each of the plurality of accumulators is configured to perform accumulation of output signals from in-memory computational cells coupled to a respective one of the plurality of bit lines, and wherein, in performing the accumulation, each of the plurality of accumulators is configured to accumulate output signals from two or more of the in-memory computational cells, and to skip accumulation of at least one output signal from at least one other in-memory computational cell coupled to a respective one of the plurality of bit lines based on at least one other in-memory computational cell receiving an activation input that is logic low.
[0086] Clause 10. The circuit of any of clauses 1-7, wherein each in-memory computation cell is configured to multiply a stored weight bit with an activation input provided to a respective one of a plurality of word lines.
[0087] Clause 11. The circuit of any of clauses 1-5, wherein the in-memory computational cells coupled to each of the plurality of word lines are configured to be sequentially activated based on a plurality of activation inputs applied to the plurality of word lines, and each one of the plurality of accumulators is configured to accumulate output signals from the in-memory computational cells after the in-memory computational cells coupled to each of the plurality of word lines are sequentially activated.
[0088] Clause 12. The circuit of clause 11, wherein a respective one of the plurality of accumulators is configured to accumulate an output signal after a plurality of activation cycles, and during each of the plurality of activation cycles, a respective one of the activation inputs that is logic high is provided to a respective one of the plurality of word lines.
[0089] Clause 13. The circuit of any of clauses 1-12, wherein each in-memory computational cell includes a pass gate transistor, a cross-coupled inverter pair having an output coupled to the pass gate transistor, a first transistor having a gate coupled to the output of the cross-coupled inverter pair, and a second transistor coupled between the first transistor and a respective one of a plurality of bit lines.
[0090] Clause 14. The circuit described in clause 13, wherein a first transistor includes a source coupled to a reference potential node and a drain coupled to a source of a second transistor, the drain of the second transistor being coupled to a respective one of a plurality of bit lines.
[0091] Clause 15. The circuit of clause 13 or 14, wherein a gate of the second transistor is coupled to a respective one of a plurality of word lines.
[0092] Clause 16. The circuit of any of clauses 1-15, wherein at least one of the in-memory computational cells comprises an eight-transistor (8T) static random access memory (SRAM) cell.
[0093] Clause 17. A method, comprising: performing, in at least a portion of an array of in-memory computational cells, a computation on weights and activation inputs of a neural network, each in-memory computational cell being coupled to one of a plurality of bit lines and one of a plurality of word lines and configured to store a weight bit of the neural network; and accumulating, via respective accumulators of a plurality of accumulators, output signals from two or more of the in-memory computational cells coupled to respective ones of the plurality of bit lines.
[0094] Clause 18. The method of clause 17, further comprising sensing a respective one of a plurality of bit lines via a respective sense amplifier of the plurality of sense amplifiers, and output signals from two or more of the computational cells in the memory are accumulated based on the sensing of the respective one of the plurality of bit lines.
[0095] Clause 19. The method of clause 18, wherein the sensing includes simultaneously sensing multiple bit lines via multiple sense amplifiers.
[0096] Clause 20. The method of any of clauses 17-19, wherein the output signal comprises a digital signal generated by a computational cell in the memory on a respective one of the plurality of bit lines.
[0097] Clause 21. The method of any of clauses 17-20, further comprising sequentially activating two or more of the word lines, wherein accumulating occurs after the sequential activating, and wherein the sequential activating includes applying an activation input to each of the two or more word lines, one word line at a time.
[0098] Clause 22. The method of clause 21, further comprising selecting two or more of the word lines to be sequentially activated based on an activation input applied to each of two or more of the word lines being logic high.
[0099] Clause 23. The method of any of clauses 17-22, further comprising skipping accumulation of at least one output signal from at least one other in-memory computational cell in the array of in-memory computational cells based on at least one other in-memory computational cell receiving an activating input that is a logic low.
[0100] Clause 24. A method as described in any of clauses 17-23, wherein performing the computation includes multiplying a bit of weight with an activation input provided to each of a plurality of word lines via each of in-memory computation cells coupled to each of a plurality of word lines in at least a portion of the array.
[0101] Clause 25. A method as described in any of clauses 17-24, wherein the output signal is accumulated via a respective one of a plurality of accumulators after a plurality of activation cycles, and during each of the plurality of activation cycles, a respective activation input that is logic high is provided to a respective one of a plurality of word lines.
[0102] Clause 26. The circuit of any of clauses 17-25, wherein each in-memory computational cell includes a pass gate transistor, a flip-flop having an input coupled to the pass gate transistor, a first transistor having a gate coupled to the output of the flip-flop, and a second transistor coupled between the first transistor and a respective one of a plurality of bit lines.
[0103] Clause 27. The method of clause 26, wherein a first transistor includes a source coupled to a reference potential node and a drain coupled to a source of a second transistor, the drain of the second transistor being coupled to a respective one of a plurality of bit lines.
[0104] Clause 28. The method of clause 26 or 27, wherein a gate of the second transistor is coupled to a respective one of a plurality of word lines.
[0105] Clause 29. A circuit for in-memory computation, comprising: a plurality of memory cells on each of a plurality of bit lines of a memory configured to store a plurality of bits representing weights of a neural network, the plurality of memory cells on each of the plurality of bit lines being on different word lines of the memory; and a plurality of accumulators, each accumulator coupled to a respective one of the plurality of bit lines.
[0106] Clause 30. The circuit of clause 29, further comprising a plurality of sense amplifiers, each sense amplifier having an output coupled to a respective accumulator and having an input coupled to a respective one of the plurality of bit lines.
[0107] Clause 31. The circuit of clause 30, wherein the multiple sense amplifiers are configured to sense multiple bit lines simultaneously.
[0108] Clause 32. The circuit of any of clauses 29-31, wherein memory cells on a plurality of bit lines and on one of the word lines are configured to perform concurrent computations.
[0109] Clause 33. The circuit of any of clauses 29-32, wherein word lines of the memory are configured to be activated one word line at a time.
[0110] Clause 34. The circuit of any of clauses 29-33, wherein two or more of the word lines are configured to be sequentially activated, and each of the plurality of accumulators is configured to accumulate output signals of a plurality of memory cells on a respective one of the plurality of bit lines after two or more of the word lines are sequentially activated.
[0111] Clause 35. The circuit of clause 34, wherein the output signal comprises a digital signal generated by a plurality of memory cells on a respective one of the plurality of bit lines.
[0112] Clause 36. The circuit of clause 34 or 35, further comprising a control circuit configured to select two or more of the word lines to be sequentially activated based on an activation input applied to each of the two or more word lines being logic high.
[0113] Clause 37. A circuit described in any of clauses 29 to 36, wherein each of the plurality of accumulators is configured to perform accumulation of memory cell output signals for a respective one of the plurality of bit lines, and, in performing the accumulation, each of the plurality of accumulators is configured to accumulate output signals of two or more of the plurality of memory cells, and to skip accumulation of at least one output signal of at least one other memory cell of the plurality of memory cells based on at least one other memory cell receiving an activation input that is logic low.
[0114] Clause 38. The circuit of any of clauses 29-37, wherein each of the plurality of memory cells is configured to multiply one bit of the weight with an activation input provided to a respective one of the word lines.
[0115] Clause 39. The circuit of any of clauses 29-38, wherein the plurality of memory cells are configured to be sequentially activated based on a plurality of activation inputs applied to the word lines, and each one of the plurality of accumulators is configured to accumulate output signals from the plurality of memory cells after the plurality of memory cells are sequentially activated.
[0116] Clause 40. The circuit of clause 39, wherein a respective one of the plurality of accumulators is configured to accumulate an output signal after a plurality of activation cycles, and during each of the plurality of activation cycles, a respective one of the activation inputs that is logic high is provided to a respective one of the word lines.
[0117] Clause 41. The circuit of any of clauses 29-40, wherein each of a plurality of memory cells includes a pass gate transistor, a cross-coupled inverter pair having an output coupled to the pass gate transistor, a first transistor having a gate coupled to the output of the cross-coupled inverter pair, and a second transistor coupled between the first transistor and a respective one of a plurality of bit lines.
[0118] Clause 42. The circuit of clause 41, wherein a first transistor includes a source coupled to a reference potential node and a drain coupled to a source of a second transistor, the drain of the second transistor being coupled to a respective one of a plurality of bit lines.
[0119] Clause 43. The circuit of clause 41 or 42, wherein the gate of the second transistor is coupled to a respective one of the word lines.
[0120] Clause 44. The circuit of any of clauses 29-43, wherein at least one of the memory cells comprises an eight-transistor (8T) static random access memory (SRAM) cell.
[0121] Clause 45. A method for in-memory computation, comprising: storing a plurality of bits representing weights of a neural network in a plurality of memory cells on each of a plurality of bit lines of a memory, the plurality of memory cells on each of the plurality of bit lines being on different word lines of the memory; and accumulating, via respective accumulators of a plurality of accumulators, output signals of two or more of the plurality of memory cells on respective ones of the plurality of bit lines after two or more of the word lines are sequentially activated.
[0122] Clause 46. The method of clause 45, further comprising sensing a respective one of the plurality of bit lines via a respective sense amplifier of the plurality of sense amplifiers, and output signals of the plurality of memory cells are accumulated based on the sensing of the respective one of the plurality of bit lines.
[0123] Clause 47. The method of clause 46, wherein multiple bit lines are sensed simultaneously via multiple sense amplifiers.
[0124] Clause 48. The method of any of clauses 45-47, further comprising activating word lines of the memory, one word line at a time, the activating comprising multiplying one of the weights stored in the memory cells on the one word line by an activation input provided to the one word line.
[0125] Clause 49. The method of any of clauses 45-48, wherein the output signal comprises a digital signal generated by a plurality of memory cells on a respective one of a plurality of bit lines.
[0126] Clause 50. The method of any of clauses 45-49, further comprising selecting two or more of the word lines to be sequentially activated based on an activation input applied to each of two or more of the word lines being logic high.
[0127] Clause 51. The method of any of clauses 45-50, further comprising skipping accumulation of at least one output signal of at least one other memory cell of the plurality of memory cells based on the at least one other memory cell receiving an activation input that is a logic low.
[0128] Clause 52. The method of any of clauses 45-51, further comprising multiplying, via each of the plurality of memory cells, one bit of the weight with an activation input provided to a respective one of the word lines.
[0129] Clause 53. A method as described in any of clauses 45-52, wherein the output signal is accumulated via a respective one of a plurality of accumulators after a plurality of activation cycles, and during each of the plurality of activation cycles, a respective activation input that is logic high is provided to a respective one of the word lines.
[0130] Clause 54. A circuit as described in any of clauses 45-53, wherein each of a plurality of memory cells includes a pass gate transistor, a flip-flop having an input coupled to the pass gate transistor, a first transistor having a gate coupled to the output of the flip-flop, and a second transistor coupled between the first transistor and a respective one of a plurality of bit lines.
[0131] Clause 55. The method of clause 54, wherein a first transistor includes a source coupled to a reference potential node and a drain coupled to a source of a second transistor, the drain of the second transistor being coupled to a respective one of a plurality of bit lines.
[0132] Clause 56. The method of clause 54 or 55, wherein a gate of the second transistor is coupled to a respective one of the word lines.
[0133] Clause 57. An apparatus for in-memory computation, comprising: means for storing a plurality of bits representing weights of a neural network in a plurality of memory cells on each of a plurality of bit lines of a means for storing, the plurality of memory cells on each of the plurality of bit lines being on different word lines of the means for storing; and means for accumulating output signals of two or more of the plurality of memory cells on respective ones of the plurality of bit lines after two or more of the word lines are sequentially activated.
[0134] Clause 58. The apparatus of clause 57, further comprising means for sensing a respective one of the plurality of bit lines, wherein output signals of the plurality of memory cells are accumulated based on the sensing of the respective one of the plurality of bit lines.
[0135] Additional Considerations The preceding description is provided to enable any person skilled in the art to practice the various aspects described herein. The embodiments described herein are not intended to limit the scope, applicability, or aspects described in the claims. Various modifications of these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects. For example, changes may be made in the function and arrangement of the elements described without departing from the scope of the disclosure. Various embodiments may omit, substitute, or add various procedures or components as appropriate. For example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Also, features described with respect to some embodiments may be combined in some other embodiments. For example, an apparatus may be implemented or a method may be practiced using any number of the aspects described herein. Additionally, the scope of the disclosure is intended to encompass such apparatus or methods practiced using other structures, functions, or structures and functions in addition to or other than the various aspects of the disclosure described herein. It should be understood that any aspect of the disclosure disclosed herein may be embodied by one or more elements of a claim.
[0136] As used herein, the word "exemplary" means "serving as an example, instance, or illustration." Any aspect described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other aspects.
[0137] As used herein, a phrase referring to "at least one of" a list of items refers to any combination of those items, including single members. By way of example, "at least one of a, b, or c" is intended to encompass a, b, c, ab, ac, bc, and abc, as well as any combination having multiples of the same element (e.g., aa, aaa, aab, aac, abb, acc, bb, bbb, bbc, cc, and ccc, or any other permutation of a, b, and c).
[0138] As used herein, the term "determining" encompasses a wide variety of actions. For example, "determining" may include calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a table, database, or another data structure), ascertaining, etc. Also, "determining" may include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory), etc. Also, "determining" may include resolving, selecting, choosing, establishing, etc.
[0139] The methods disclosed herein include one or more steps or actions for achieving the method. The method steps and / or actions may be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of steps or actions is specified, the order and / or use of specific steps and / or actions may be modified without departing from the scope of the claims. Furthermore, various operations of the methods described above may be performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and / or software component(s) and / or module(s), including but not limited to circuits, application specific integrated circuits (ASICs), or processors. In general, where there are operations illustrated in the figures, those operations may have corresponding counterpart means-plus-function components with similar numbering. For example, the means for storing may include (1) a CIM array, such as an array of memory cells 502, or (2) a CIM controller, such as CIM controller 732, including circuitry 728A for storing, and memory, such as memory 724, including code 724A for storing. The means for accumulating may include an accumulator, such as accumulator 510. The means for sensing may include a sense amplifier (SA), such as SA 508.
[0140] The following claims are not limited to the embodiments set forth herein, but are to be accorded the full scope consistent with the language of the claims. In the claims, reference to an element in the singular does not mean "one and only one," but rather means "one or more." Unless otherwise specified, the term "several" refers to one or more. No claim element is to be construed under the provisions of 35 U.S.C. 112(f) unless the element is expressly recited using the phrase "means for" or, in the case of a method claim, unless the element is recited using the phrase "step for." All structural and functional equivalents of the elements of the various embodiments described throughout this disclosure that are known or that later become known to those skilled in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims. Moreover, nothing disclosed herein is intended to be made public, regardless of whether such disclosure is expressly recited in the claims.
Claims
1. 1. A circuit comprising: A plurality of bit lines; A plurality of word lines; an array of in-memory computational cells, each in-memory computational cell coupled to one of the bit lines and one of the word lines and configured to store a weight bit of a neural network; a plurality of accumulators, each accumulator coupled to a respective one of the plurality of bit lines; A circuit comprising:
2. 2. The circuit of claim 1 further comprising a plurality of sense amplifiers, each sense amplifier having an output coupled to a respective one of said accumulators and having an input coupled to said respective one of said plurality of bitlines.
3. 3. The circuit of claim 2, wherein the plurality of sense amplifiers are configured to sense the plurality of bit lines simultaneously.
4. The circuit of claim 1 , wherein the computational cells in the memory coupled to one of the plurality of bit lines and the plurality of word lines are configured to perform concurrent computations.
5. 2. The circuit of claim 1, wherein the plurality of word lines are configured such that one word line is activated at a time.
6. Two or more of the word lines are configured to be activated sequentially; 2. The circuit of claim 1, wherein each of the plurality of accumulators is configured to accumulate output signals from computational cells in the memory coupled to the respective ones of the plurality of bit lines after the two or more of the word lines are sequentially activated.
7. 7. The circuit of claim 6, wherein the output signal comprises a digital signal generated by the in-memory computational cell on the respective one of the plurality of bitlines.
8. 7. The circuit of claim 6, further comprising a control circuit configured to select the two or more of the word lines to be sequentially activated based on an activation input applied to each of the two or more of the word lines being logic high.
9. each of the plurality of accumulators configured to perform an accumulation of output signals from the computational cells in the memory coupled to the respective ones of the plurality of bit lines, and in performing the accumulation, each of the plurality of accumulators: accumulating output signals from two or more of said in-memory computational cells; skipping accumulation of at least one output signal from the at least one other computational cell in memory coupled to the respective one of the plurality of bit lines based on the at least one other computational cell in memory receiving an activation input that is a logic low. The circuit of claim 1 configured as follows:
10. 2. The circuit of claim 1, wherein each in-memory computation cell is configured to multiply the stored weight bit with an activation input provided to a respective one of the plurality of word lines.
11. the computational cells in the memory coupled to each of the plurality of word lines are configured to be sequentially activated based on a plurality of activation inputs applied to the plurality of word lines; a respective one of the plurality of accumulators configured to accumulate output signals from the in-memory computation cells coupled to each of the plurality of word lines after the in-memory computation cells are sequentially activated; The circuit of claim 1 .
12. the respective one of the plurality of accumulators configured to accumulate the output signal after a plurality of activation cycles; a respective one of the activation inputs being logic high is provided to a respective one of the plurality of word lines during each of the plurality of activation cycles.
12. The circuit of claim 11.
13. Each in-memory computation cell is A pass gate transistor; a cross-coupled inverter pair having outputs coupled to said pass gate transistors; a first transistor having a gate coupled to the output of the cross-coupled inverter pair; a second transistor coupled between the first transistor and the respective one of the plurality of bit lines; The circuit of claim 1 , comprising:
14. 14. The circuit of claim 13, wherein the first transistor includes a source coupled to a reference potential node and a drain coupled to a source of the second transistor, the drain of the second transistor being coupled to the respective one of the plurality of bit lines.
15. 14. The circuit of claim 13, wherein a gate of the second transistor is coupled to a respective one of the plurality of word lines.
16. 2. The circuit of claim 1, wherein at least one of the computational cells in memory comprises an eight-transistor (8T) static random access memory (SRAM) cell.
17. 1. A method comprising: performing computations on weights and activation inputs of a neural network in at least a portion of an array of in-memory computational cells, each in-memory computational cell being coupled to one of a plurality of bit lines and one of a plurality of word lines and configured to store a bit of the weights of the neural network; accumulating output signals from two or more of the computational cells in the memory coupled to respective ones of the plurality of bit lines via respective accumulators of a plurality of accumulators; A method comprising:
18. 20. The method of claim 17, further comprising sensing the respective ones of the plurality of bit lines via respective sense amplifiers of a plurality of sense amplifiers, and wherein the output signals from the two or more of the computational cells in the memory are accumulated based on the sensing of the respective ones of the plurality of bit lines.
19. 20. The method of claim 18, wherein said sensing step comprises simultaneously sensing said multiple bit lines via said multiple sense amplifiers.
20. 20. The method of claim 17, wherein the output signal comprises a digital signal generated by the in-memory computational cell on the respective one of the plurality of bitlines.
21. 20. The method of claim 17, further comprising the step of sequentially activating two or more of the word lines, the accumulating step occurring after the sequential activating step, the sequential activating step comprising applying the activation input to each of the two or more word lines, one word line at a time.
22. 22. The method of claim 21, further comprising selecting the two or more word lines to be sequentially activated based on the activation input applied to each of the two or more word lines being logic high.
23. 20. The method of claim 17, further comprising skipping accumulation of at least one output signal from the at least one other computational cell in memory in the array of computational cells in memory based on at least one other computational cell in memory receiving the activation input that is a logic low.
24. 20. The method of claim 17, wherein performing the calculation comprises multiplying the bit of the weight with the activation input provided to the respective one of the plurality of word lines via each of the in-memory computation cells coupled to the respective one of the plurality of word lines in the at least a portion of the array.
25. the output signal is accumulated via a respective one of the plurality of accumulators after a plurality of activation cycles; a respective activation input that is logic high is provided to a respective one of the plurality of word lines during each of the plurality of activation cycles; 20. The method of claim 17.
26. Each in-memory computation cell is A pass gate transistor; a flip-flop having an input coupled to said pass-gate transistor; a first transistor having a gate coupled to an output of the flip-flop; a second transistor coupled between the first transistor and the respective one of the plurality of bit lines; 20. The method of claim 17, comprising:
27. 27. The method of claim 26, wherein the first transistor includes a source coupled to a reference potential node and a drain coupled to a source of the second transistor, the drain of the second transistor being coupled to the respective one of the plurality of bit lines.
28. 27. The method of claim 26, wherein a gate of the second transistor is coupled to a respective one of the plurality of word lines.
Citation Information
Patent Citations
In-memory computing for machine learning
EP3671748A1
Semiconductor integrated circuit
JP2020035502A
Digital bit-serial multi-multiply-and-accumulate compute in memory
US10831446B2
Parallel processing of a convolutional layer of a neural network with compute-in-memory array
US20210089865A1
