Cross-level reconfigurable SRAM in-memory computing unit and method for edge intelligence

By performing reconfiguration calculations and column-sharing reconfigurable Boolean calculation units at the SRAM unit level, combined with pipelined bit-parallel addition, the problem of insufficient reconfigurability in the existing technology is solved, and edge intelligent in-memory computing is realized. Flexibility and efficiency.

CN116721682BActive Publication Date: 2024-10-01SHANGHAI JIAOTONG UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202310700487.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2024-10-01
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

Existing in-memory computing designs are relatively single in terms of reconfigurability and are difficult to meet the diverse needs of rapidly iterative edge-end neural networks and other algorithms, especially in terms of calculation accuracy, neural network layer kernel size, and model size.

Method used

A cross-level reconfigurable SRAM in-memory computing unit for edge intelligence is designed. By performing reconstruction calculations at the SRAM unit level, it combines column-sharing reconfigurable Boolean computing units and pipelined bit-parallel addition to support a variety of Boolean operations. and arithmetic operations, realizing flexible configuration of computing logic and optimization of hardware overhead.

Benefits of technology

It achieves reconfigurability with low power consumption and low hardware overhead, improves data throughput and computing efficiency, supports fast iterative software algorithms, and reduces latency and hardware overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116721682B_ABST
    Figure CN116721682B_ABST
Patent Text Reader

Abstract

The present invention provides a cross-level reconfigurable SRAM in-memory computing unit and method for edge intelligence, including an SRAM unit and a column-shared reconfigurable Boolean computing unit; reconfiguration calculation is performed based on the SRAM unit level to obtain a reconfigured structure; the column-shared reconfigurable Boolean computing unit outputs the calculation result based on the reconfigured structure; the peripheral computing circuit supporting pipelined bit-serial addition outputs the in-memory addition calculation result based on the Boolean calculation. In order to meet the requirements of edge AI for low power consumption and low hardware overhead, and to make the accelerator as adaptable as possible to fast-iteration software algorithms, the present invention proposes a new SRAM-based in-memory computing macro, which can be cross-level configured to support a variety of Boolean operations, arithmetic operations, and macro operations, so as to achieve a better balance between reconfigurability and additional overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of in-memory computing, and in particular to a cross-level reconfigurable SRAM in-memory computing unit and method for edge intelligence. Background Art

[0002] The work similar to digital in-memory computing is divided into three categories according to the hardware level: SRAM cell level, SRAM array and peripheral circuit level, architecture and system level. SRAM is the full name of Static Random Access Memory in English.

[0003] At the SRAM cell level, works [2] and [3] designed 12T and 10TSRAM computing cells for Boolean calculations, respectively. However, directly adding computing logic to SRAM cells will result in a large additional area overhead. Some designs stack computing logic on the SRAM array peripheral circuit to perform Boolean or arithmetic calculations. For example, work [1] proposed two peripheral circuit designs: bit-serial and bit-parallel computing peripheral circuits, which are respectively used for high data throughput and low computing time vector computing accelerators to process data read from the SRAM array. Although this work has obvious advantages in reducing the area overhead by concentrating the computing logic on the SRAM array peripheral circuit design, it ultimately failed to achieve the reconfigurability between the two peripheral circuits for different types of models or algorithms, and also failed to fully utilize the Boolean calculations that can be implemented in the SRAM cell to reduce the gate circuit overhead in the peripheral computing circuit. At the architecture and system level, work [4] proposed a cache accelerator that supports large-scale parallel computing, covering general arithmetic calculations and layer operators in neural networks. However, this work also uses a larger 8T SRAM unit design, which brings a larger area overhead. At the same time, the computing functions supported in the peripheral computing circuit are relatively fixed, and can also be optimized to support more different computing precisions and operators.

[0004] Recently, some reconfigurable in-memory computing designs have also emerged. Most designs focus on adjustable computing accuracy, such as work [5], [6], and [7]. Some works, such as [8] and [9], contain reconfigurable kernel sizes to facilitate the adaptation of various neural networks. There is also finer-grained reconfigurability, such as work [8], which adds the reconfigurability of bitwise Boolean operations. Work

[10] introduces a configuration module for switching between different computing modes. Work

[11] proposes an architecture similar to the FPGA structure at the system level to achieve reconfigurability. The full name of FPGA is Field Programmable Gate Array, which is translated into Chinese as Field Programmable Gate Array.

[0005] The Chinese invention patent document with publication number CN115083462A discloses a digital in-memory computing device based on SRAM, which includes: an SRAM weight array module, an input port, an AND gate array module, a counting array module and a digital weighing configuration module. Among them, the SRAM weight array module is used to store the calculation weight; the input port is used to obtain the input data; the AND gate array module is used to obtain the calculation result based on the calculation weight and the input data; the counting array module performs a counting operation on the calculation result to obtain the counting result; and the digital weighing configuration module is used to generate the final calculation result based on the counting result.

[0006] [1] K.Al-Hawaj, O.Afuye, S.Agwa, A.Apsel, and C.Batten, "Towards areconfigurable bit-serial / bit-parallel vector accelerator using in-situprocessing-in-SRAM," in 2020IEEE International Symposium on Circuits andSystems(ISCAS).IEEE, 2020, pp.1-5.

[0007] [2] S.Yin, Z.Jiang, J.-S.Seo, and M.Seok, "Xnor-SRAM: In-memory computingSRAM macro for binary / ternary deep neural networks," IEEE Journal of Solid-State Circuits, vol.55, no.6, pp.1733-1743, 2020.

[0008] [3] H.Zhang, L.Jiang, J.Wu, T.Chen, J.Liu, W.Kang, and W.Zhao, "Cp-SRAM: charge-pulsation SRAM marco for ultra-high energy-efficiency computing-in-memory," in Proceedings of the 59th ACM / IEEE Design Automation Conference, 2022, pp.109-114.

[0009] [4]C.Eckert,X.Wang,J.Wang,A.Subramaniyan,R.Iyer,D.Sylvester,D.Blaaauw,and R.Das,“Neural cache:Bit-serial in-cache acceleration of deepneural networks,”in 2018ACM / IEEE 45Th annual international symposium oncomputer architecture(ISCA).IEEE,2018,pp.383-396.

[0010] [5]F.Tu,Y.Wang,Z.Wu,L.Liang,Y.Ding,B.Kim,L.Liu,S.Wei,Y.Xie,and S.Yin,“A 28nm 29.2tflops / w bf16 and 36.5tops / w int8 reconfigurabledigital cimprocessor with unified fp / int pipeline and bitwise in-memory boothmultiplication for cloud deep learning acceleration,”in 2022IEEEInternational Solid-State Circuits Conference(ISSCC),vol.65.IEEE,2022,pp.1-3.

[0011] [6]H.Kim,T.Yoo,T.T.-H.Kim,and B.Kim,“Colonnade:A reconfigurable SRAM-based digital bit-serial compute-in-memory macro for processing neuralnetworks,”IEEE Journal of Solid-State Circuits,vol.56,no.7,pp.2221-2233,2021.

[0012] [7]K.Lee,J.Jeong,S.Cheon,W.Choi,and J.Park,“Bit parallel 6t SRAM in-memory computing with reconfigurable bit-precision,”in 2020 57th ACM / IEEEDesign Automation Conference(DAC).IEEE,2020,pp.1-6.

[0013] [8]B.Yan,J.-L.Hsu,P.-C.Yu,C.-C.Lee,Y.Zhang,W.Yue,G.Mei,Y.Yang,Y.Yang,H.Li et al.,“A 1.041-mb / mm 2 27.38-tops / w signedint8 dynamic-logic-based adc-less SRAM compute-in-memory macro in 28nm with reconfigurable bitwiseoperation for ai and embedded applications,”in 2022IEEE International Solid-State Circuits Conference(ISSCC),vol.65.IEEE,2022,pp.188-190.

[0014] [9]Y.-H.Lin,C.Liu,C.-L.Hu,K.-Y.Chang,J.-Y.Chen,and S.-J.Jou,“Areconfigurable in-SRAM computing architecture for dcnn applications,”in2021International Symposium on VLSIDesign,Automation and Test(VLSI-DAT).IEEE,2021,pp.1-2.

[0015]

[10] M.Kang, SKGonugondla, A.Patil, and NRshanbhag, "A multifunctional in-memory inference processor using a standard 6t SRAM array," IEEE Journal ofSolid-State Circuits, vol.53, no.2, pp.642-655, 2018.

[0016]

[11] R. Gauchi, V. Egloff, M. Kooli, J.-P. Noel, B. Giraud, P. Vivet, S. Mitra, and H.-P. Charles, "Reconfigurable tiles of computing-in-memory SRAM architecture for scalable vectorization," in Proceedings of the ACM / IEEE International Symposium on Low Power Electronics and Design,2020,pp.121-126.

[0017] Regarding the above-mentioned related technologies, the inventors believe that the aforementioned work is relatively simple in its exploration of reconfigurability. However, with the rapid iteration and diversification of algorithms in recent years, the acceleration of in-memory computing on edge neural networks requires a larger reconfigurable space, that is, the reconfigurable goals of computing accuracy, neural network layer kernel size dimension, model size, and even other common non-intelligent algorithms on the edge are difficult to achieve. Summary of the invention

[0018] In view of the defects in the prior art, the object of the present invention is to provide a cross-level reconfigurable SRAM in-memory computing unit and method for edge intelligence.

[0019] According to the present invention, a cross-level reconfigurable SRAM in-memory computing unit for edge intelligence includes an SRAM unit and a column-shared reconfigurable Boolean computing unit;

[0020] Perform reconstruction calculation based on the SRAM unit level to obtain the reconstructed structure;

[0021] The column-shared reconfigurable Boolean computing unit outputs the computing result based on the reconfigured structure.

[0022] Preferably, the SRAM cell is composed of a plurality of transistors, and the word line is separated to obtain a first word line and a second word line;

[0023] The first word line controls the reading and writing of the corresponding SRAM cell by the first bit line;

[0024] The first word line controls the reading and writing of the corresponding SRAM cell by the second bit line;

[0025] An additional plurality of transistors connected to the first bit line and the second bit line of each column are column-shared reconfigurable Boolean calculation units;

[0026] The level of the first read word line and the first second read word line depends on the Boolean calculation mode to be performed on the first bit line and the value of the external input;

[0027] The level of the second first read word line and the second second read word line depends on the Boolean calculation mode to be performed on the first bit line and the value of the external input;

[0028] The calculation results of the column-shared reconfigurable Boolean calculation unit are outputted through the first read bit line and the second read bit line respectively.

[0029] Preferably, the column-shared reconfigurable Boolean computing unit supports five modes, namely, read, write, and, or, and exclusive or;

[0030] The column-shared reconfigurable Boolean computing unit performs a configuration mode by decoding input data and computing mode through a logical mapping with reference to a read word line and a read bit line, thereby obtaining an ideal computing result.

[0031] Preferably, an in-memory calculation supporting pipelined bit-serial addition is established based on the establishment of the SRAM array;

[0032] During the in-memory computing establishment process, additional computing logic is added to the peripheral circuits of the SRAM array.

[0033] Preferably, let the number currently stored in the array be Q. When the number Q and the external input number IN need to be added, the carry value of the i-th bit and the sum value of the i+1-th bit will be calculated simultaneously. At this time, Q will be read from the first bit line respectively. i+1 and read the value of Q from the second bit line i '; where Q i ' indicates Q i The opposite value of Q i represents the i-th value in the binary representation sequence of the number Q;

[0034] The column-shared reconfigurable Boolean computing unit connected to the first bit line will perform a calculation on the first bit line and the corresponding decoded external input IN iThe decoded column-shared Boolean calculation unit connected to the second bit line performs an XOR calculation on the second bit line value and the corresponding decoded external input IN i+1 Perform AND calculations to obtain Boolean calculation results, where IN i Represents the i-th value in the binary expression sequence of the external input digital IN;

[0035] The Boolean calculation result read out from the read bit line will be input into the pipeline addition peripheral calculation circuit and complete the subsequent calculation logic.

[0036] Preferably, the multiply-accumulate operation is based on pipelined bit-parallel addition;

[0037] The inputs and weights of each layer of the neural network are stored in different slices of the SRAM array;

[0038] Each array has limited storage space and is adjusted at link time based on precision and kernel size requirements;

[0039] The multiplication and accumulation operation calculation process reuses the pipelined bit-parallel addition logic part in the peripheral circuit to perform the multiplication algorithm of shift and addition.

[0040] According to a cross-level reconfigurable SRAM in-memory computing method for edge intelligence provided by the present invention, a cross-level reconfigurable SRAM in-memory computing unit for edge intelligence is applied, comprising the following steps:

[0041] Reconstruction step: Perform reconstruction calculation based on the SRAM cell level to obtain the reconstructed structure;

[0042] Computation steps: The column-shared reconfigurable Boolean computation unit outputs the computation result based on the reconfigured structure.

[0043] Preferably, in the calculation step, the SRAM unit separates the word line to obtain a first word line and a second word line;

[0044] The first word line controls the reading and writing of the corresponding SRAM cell by the first bit line;

[0045] The first word line controls the reading and writing of the corresponding SRAM cell by the second bit line;

[0046] The level of the first read word line and the first second read word line depends on the Boolean calculation mode to be performed on the first bit line and the value of the external input;

[0047] The level of the second first read word line and the second second read word line depends on the Boolean calculation mode to be performed on the first bit line and the value of the external input;

[0048] The calculation results of the column-shared reconfigurable Boolean calculation unit are outputted through the first read bit line and the second read bit line respectively.

[0049] Preferably, in the reconstruction step, in-memory calculation supporting pipelined bit-parallel addition is established based on the establishment of the SRAM array, and additional calculation logic is added to the peripheral circuit of the SRAM array.

[0050] Preferably, in the calculation step, the number currently stored in the array is assumed to be Q. When the number Q and the external input number IN need to be added, the carry value of the i-th bit and the sum value of the i+1-th bit will be calculated simultaneously. At this time, Q will be read from the first bit line respectively. i+1 and read the value of Q from the second bit line i '; where Q i ' indicates Q i The opposite value of Q i represents the i-th value in the binary representation sequence of the number Q;

[0051] The column-shared reconfigurable Boolean computing unit connected to the first bit line will perform a calculation on the first bit line and the corresponding decoded external input IN i The decoded column-shared Boolean calculation unit connected to the second bit line performs an XOR calculation on the second bit line value and the corresponding decoded external input IN i+1 Perform AND calculations to obtain Boolean calculation results, where IN i Represents the i-th value in the binary expression sequence of the external input digital IN;

[0052] The Boolean calculation result read out from the read bit line will be input into the pipeline addition peripheral calculation circuit and complete the subsequent calculation logic.

[0053] Compared with the prior art, the present invention has the following beneficial effects:

[0054] 1. In order to meet the requirements of edge AI for low power consumption and low hardware overhead, and to make the accelerator adaptable to fast-iteration software algorithms as much as possible, the present invention proposes a new SRAM-based in-memory computing macro, which can be cross-level configured to support a variety of Boolean operations, arithmetic operations and macro operations to achieve a better balance between reconfigurability and additional overhead;

[0055] 2. The bit-serial addition calculation scheme of the present invention has lower latency than previous work [1] and can also improve the overall data throughput if the calculation mode is activated simultaneously in all columns;

[0056] 3. The peripheral computing circuit design supporting pipeline bit-parallel addition proposed by the present invention has higher reusability and flexibility. MAC calculation based on addition operation can repeatedly use the circuit to perform calculations to achieve the effect of reducing hardware overhead. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0058] Figure 1 Schematic diagram of 6T wordline separated SRAM array and column shared reconfigurable Boolean computation unit;

[0059] Figure 2 A schematic diagram of logic mapping of read word lines and read bit lines for a column-shared reconfigurable Boolean computation unit;

[0060] Figure 3 A schematic diagram of an SRAM array with peripheral computing circuits for addition calculations;

[0061] Figure 4 The waveform diagram of the operation process of the reconfigurable Boolean computing unit based on SRAM unit and column sharing;

[0062] Figure 5 This is a waveform diagram of the 4-bit addition process after using a peripheral circuit that supports pipelined bit-parallel addition. DETAILED DESCRIPTION

[0063] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0064] The embodiment of the present invention discloses a cross-level reconfigurable SRAM in-memory computing unit for edge intelligence, such as Figure 1 and Figure 2 As shown in the figure, a reconfigurable computing design based on SRAM cell level is first proposed (see Figure 1). Different from the structure of the traditional SRAM cell, the SRAM cell in the present invention separates the word line (WL) on top of the basic 6-transistor (6T) composition, so that two word lines WLX (Wordline X, the first word line) and WLY (Wordline Y, the second word line) are obtained, which respectively control the reading and writing of the corresponding SRAM cell by the two bit lines (BL and BLB). BL is Bitline (the first bit line) and BLB is Bitline Bar (the second bit line). The additional 4 transistors connected to each column BL and BLB respectively are "column-shared reconfigurable Boolean calculation units". For BL, the calculation mode to be performed with it and the value of the external input can be determined by controlling the levels on the two read word lines RWL_PX (Read Wordline PX, the first read word line) and RWL_NX (Read Wordline NX, the first second read word line). For BLB, the value level on the read word line RWL_PY (Read Wordline PY, the second first read word line) and RWL_NY (Read Wordline NY, the second second read word line) can be controlled for configuration. The results calculated by the column-shared reconfigurable Boolean calculation unit are output by the read bit lines RBL_X (Read Bitline X, the first read bit line) and RBL_Y (Read Bitline Y, the second read bit line). This unit can support 5 modes, namely read, write, AND, OR, and XOR. To configure these 5 modes, you can refer to Figure 2 The logical mapping of the read word line and the read bit line is used to decode the input data and the calculation mode to obtain the ideal calculation result. Figure 1 In the figure, VDD: supply voltage value; Q: value of the current SRAM cell; QB: value opposite to the value of the current SRAM cell. Figure 2 In the table, Operation refers to operation mode; Read refers to reading data; Input refers to input value.

[0065] The present invention also proposes an in-memory computing design that supports pipelined bit-parallel addition based on the aforementioned SRAM array design. The core of this design is to add additional computing logic to the peripheral circuit of the SRAM array (see Figure 3 ). Let the number currently stored in the array be Q, and its binary expression sequence be Q 0 ,Q 1 ,...,Q nWhen it is necessary to add the number and the external input number (set as IN, whose binary sequence expression is similar to Q), that is, when it is necessary to add a number stored in the array and the external input number, assuming that we are calculating the carry value of the i-th bit, at this time, Q will be read from BL at the same time i+1 、BLB reads Q i ', the column-shared reconfigurable Boolean computing unit connected by BL and BLB will calculate these two values ​​and their corresponding external inputs (IN i and IN i+1 ) respectively perform XOR and AND calculations. The Boolean calculation results read from the read bit line will be input into the pipeline addition peripheral calculation circuit and complete the subsequent calculation logic. This method divides the bit serial addition calculation into two stages, and shortens the total calculation time through pipeline improvement. This method also takes advantage of the characteristic of the SRAM array that the Boolean calculations of the same column values ​​can be performed simultaneously. IN i represents the i-th value in the binary expression sequence of the external input digital IN; Q i ' indicates Q i The opposite value of Q i Represents the i-th value in the binary representation of the number Q. Figure 3 In the figure, Cnext represents the carry value port; Sum represents the sum value port; Cin represents the carry value set / input from the outside; c_sel represents the carry value selection signal; Mux represents the selector; CLK represents the clock signal. All other i or i+1 etc. represent the intermediate results of the i-th or i-1-th bit.

[0066] The important operator in the neural network algorithm, the multiplication operation (MAC), can also be completed based on the above design. This operation can be decomposed into multiplication and addition; in addition, the multiplication itself can be regarded as a series of addition operations depending on the number of bits of the multiplier. Therefore, MAC can be built on the above pipelined bit-parallel addition design. We can store the input and weight of each layer of the neural network in slices of the SRAM array in different ways. Each array has a storage capacity of 4KB and can be connected to accommodate more weight values ​​when necessary to adapt to different precision or kernel size requirements. The SRAM array used for kernel storage can eliminate the column-shared Boolean calculation unit to reduce additional area overhead. The MAC calculation process reuses the pipelined bit-parallel addition logic part in the peripheral circuit to implement the "shift and add" multiplication algorithm. At the same time, in order to maintain a high calculation frequency, loading data from the chip memory and the calculation process are carried out simultaneously.

[0067] The present invention is a digital in-memory computing design based on SRAM. In order to evaluate the above design, the present invention adopts the industry standard TSMC28nm process and uses the software Cadence Virtuoso for simulation. The simulation voltage is 0.9V. For Boolean operations at the SRAM cell level, the two read word lines (RWL_PX and RWL_NX) need to be based on Figure 2 The calculation mode and external input are listed in the table. The simulation results show that all the results output from the read bit line are within a distinguishable level range and are functionally correct. For the reconfigurability of SRAM arrays in Boolean calculations, Figure 5 In the example, we give a combined test, which includes all Boolean operation modes. Starting from the 20th second, RWL_PX and RWL_NX are configured to perform AND, OR, and XOR modes, and the calculation mode is changed every 10 nanoseconds of simulation time, while the external input value (IN) is switched every 5 nanoseconds.

[0068] For the pipelined bit serial addition design, we first performed functional simulation under pipeline logic. After synthesizing the circuit to generate a netlist, we tested it under Spectre simulation. Figure 3 As shown, only one column of 6T SRAM cells is shown, and the details are simplified. Figure 3 The total delay of a set of test samples implementing 4-bit addition is 301ps. Figure 5 As shown. We specify a number stored in the SRAM array as 2 (4'b0010) and an external input number as 7 (4'b0111) to calculate the sum. The "sum" wave in the simulation waveform is the output waveform of the "Sum" port of the peripheral calculation circuit that is output bit by bit. The total delay of this 4-bit addition is within 4 clock cycles. The clock frequency can reach 3.125GHz during calculation. At the same time, the total energy consumption of this 4-bit calculation is 0.041pJ. Similarly, for n-bit calculations, the total calculation delay is n cycles. This bit serial addition calculation scheme has lower latency than previous work [1], and if the calculation mode is activated simultaneously in all columns, it can also improve the overall data throughput. Figure 4 and Figure 5 In the waveform diagram, bit 1 stored in a cell means the value currently stored in the SRAM cell is 1; decoded input means the decoded input; result bit means the result value; V(V): voltage (volts); Time(ns): time (nanoseconds); "IN 0,AND" in the waveform diagram means "the input is 0, and AND calculation is performed", and other marks have similar meanings.

[0069] The embodiment of the present invention also discloses a cross-level reconfigurable SRAM in-memory computing method for edge intelligence, which uses a cross-level reconfigurable SRAM in-memory computing unit for edge intelligence, including the following steps:

[0070] Reconstruction steps: Perform reconstruction calculation based on the SRAM cell level to obtain a reconstructed structure. On the basis of the SRAM array, perform in-memory calculation that supports pipelined bit-parallel addition, and add additional calculation logic to the peripheral circuit of the SRAM array.

[0071] Calculation steps: The column-shared reconfigurable Boolean calculation unit outputs the calculation result based on the reconfigured structure, and the peripheral calculation circuit supporting pipelined bit serial addition outputs the in-memory addition calculation result based on the Boolean calculation.

[0072] The SRAM unit separates the word line to obtain the first word line and the second word line; the first word line controls the reading and writing of the corresponding SRAM unit by the first bit line; the first word line controls the reading and writing of the corresponding SRAM unit by the second bit line; the level of the first read word line and the first second read word line depends on the Boolean calculation mode to be performed on the first bit line and the value of the external input; the level of the second read word line and the second second read word line depends on the Boolean calculation mode to be performed on the first bit line and the value of the external input; the calculation results of the column-shared reconfigurable Boolean calculation unit are output through the first read bit line and the second read bit line respectively.

[0073] Suppose the number currently stored in the array is Q. When the number Q and the external input number IN need to be added, the carry value of the i-th bit and the sum value of the i+1-th bit will be calculated at the same time. At this time, Q will be read from the first bit line respectively. i+1 and read the value of Q from the second bit line i '; where Q i ' indicates Q i The opposite value of Q i The i-th value in the binary expression sequence of the digital Q is represented; the column-shared reconfigurable Boolean computing unit connected to the first bit line will perform the operation on the first bit line and the corresponding decoded external input IN i The decoded column-shared Boolean calculation unit connected to the second bit line performs an XOR calculation on the second bit line value and the corresponding decoded external input IN i+1 Perform AND calculations to obtain Boolean calculation results, where IN i Represents the i-th value in the binary expression sequence of the external input digital IN; the Boolean calculation result read out from the read bit line will be input into the pipeline addition peripheral calculation circuit and complete the subsequent calculation logic.

[0074] The in-memory calculation method will take n-bit addition as an example. The n-bit here means that the binary sequences of the two operands of addition are both n-bit. The two operands are Q and IN, and their respective binary sequences are Q 0 ,Q 1 ,...,Q n and IN 0 ,IN 1 ,...,IN n .

[0075] Step S1: Read Q i and Q i+1 In this process, WLX and WLY respectively control the charge and discharge of BL and BLB, and we can get Q on BL at the same time. i+1 The value of and Q on BLB i ' value.

[0076] Step S2: Perform Boolean calculation. Q on BL i+1 and Q on BLB i ' will be input into the corresponding column shared reconfigurable Boolean calculation unit, respectively, and the decoded IN i and IN i+1 Calculate. Among them, IN i+1 and Q i+1 What is performed is the XOR calculation, and IN i and Q i 'An AND calculation is performed. The two calculation results will be read out from RBL_X and RBL_Y respectively.

[0077] Step S3: The value read out by RBL_X will be temporarily stored in a register in the peripheral computing circuit, and the value read out by RBL_Y will be used together with the intermediate result calculated in the previous clock cycle to calculate the carry value of the i-th bit, and the carry value will also be stored in another register.

[0078] Step S4: Entering the next clock cycle, the two registers release the carry value of the i-th bit and the XOR value of the i+1-th bit respectively, and after gate circuit operation, the sum value and carry value of the i+1-th bit will be obtained, which will be output from the Sum and Cnext ports respectively. That is, the existing serial carry adder is divided into two stages, and the part of the Boolean calculation performed in the SRAM unit is utilized, reducing the total time required for bit serial addition.

[0079] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0080] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A cross-level reconfigurable SRAM in-memory computing unit for edge intelligence. It is characterized in that Includes SRAM cells and column-shared reconfigurable Boolean computing cells; Perform reconstruction calculation based on the SRAM unit level to obtain the reconstructed structure; The column-shared reconfigurable Boolean computing unit outputs the computing result based on the reconfigured structure; The SRAM cell is composed of multiple transistors, and the word lines are separated to obtain a first word line WLX and a second word line WLY; The first word line WLX controls the reading and writing of the corresponding SRAM cell by the first bit line BL; The second word line WLY controls the reading and writing of the corresponding SRAM cell by the second bit line BLB; The additional plurality of transistors connected to the first bit line BL and the second bit line BLB of each column are column-shared reconfigurable Boolean calculation units; The level of the first read word line RWL_PX and the second read word line RWL_PY depends on the Boolean calculation mode to be performed on the first bit line BL and the value of the external input; The levels of the third read word line RWL_NX and the fourth read word line RWL_NY depend on the Boolean calculation mode to be performed on the second bit line BLB and the value of the external input; The calculation results of the column-shared reconfigurable Boolean calculation unit are outputted through the first read bit line RBLX and the second read bit line RBLY respectively; The six-transistor SRAM cell with word line separation includes: six transistors T1-T6, the drains of T2 and T4 are connected to Vdd, that is, the power supply terminal, the sources of T3 and T5 are grounded, the gates of T2 and T3 are connected to form a node Q, and the gates of T4 and T5 are connected to form a node QB; the source and drain of T1 are connected to the node Q and the first bit line BL, which are used to control the writing and reading of the SRAM cell; the source and drain of T6 are connected to the node QB and the second bit line BLB, the drain of T2 is connected to the drain of T3, and the drain of T4 is connected to the drain of T5, wherein QB and the second bit line BLB are the logical inverse values ​​of Q and the first bit line BL respectively, and T6 and T1 control the writing and reading of the SRAM cell together; the signal lines for controlling T1 and T6 are the first word line WLX and the second word line WLY respectively, and since the signal lines for controlling T1 and T6 are separated, the reading of the same SRAM cell can be completed by only turning on T1 or T6; The column-shared reconfigurable Boolean calculation unit includes: four transistors T9-T12, the source of T10 is connected to the third read word line RWL_NX, the source of T9 is connected to the first read word line RWL_PX, the drain of T9 and the drain of T10 are connected to the first read bit line RBLX, the gate of T9 and the gate of T10 are connected to the first bit line BL, the signals of the first read word line RWL_PX and the third read word line RWL_NX are determined by the calculation mode input from the outside of the SRAM array and the data content to be calculated, so that the third read word line RWL_NX, the first read word line RWL_PX and the read SRAM array data BL will be calculated together by T9 and T10 and the result will be calculated in the first The read bit line RBLX is output; the source of T12 is connected to the fourth read word line RWL_NY, the source of T11 is connected to the second read word line RWL_PY, the drain of T11 and the drain of T12 are connected to the second read bit line RBLY, the gate of T11 and the gate of T12 are connected to the second bit line BLB, and the signals of the second read word line RWL_PY and the fourth read word line RWL_NY are determined by the calculation mode input from the outside of the SRAM array and the data content to be calculated, thereby the fourth read word line RWL_NY, the second read word line RWL_PY and the read SRAM array data BLB will jointly calculate the result of T11 and T12 and output it on the second read bit line RBLY.

2. The cross-level reconfigurable SRAM in-memory computing unit for edge intelligence according to claim 1, It is characterized in that The column-shared reconfigurable Boolean computing unit supports five modes, namely, read, write, and, or, and exclusive or; The column-shared reconfigurable Boolean computing unit performs a configuration mode by decoding input data and computing mode through a logical mapping with reference to a read word line and a read bit line, thereby obtaining an ideal computing result.

3. The cross-level reconfigurable SRAM in-memory computing unit for edge intelligence according to claim 1, It is characterized in that Based on the SRAM array, in-memory computing that supports pipelined bit-serial addition is established; During the in-memory computing establishment process, additional computing logic is added to the peripheral circuits of the SRAM array.

4. The cross-level reconfigurable SRAM in-memory computing unit for edge intelligence according to claim 3, It is characterized in that Suppose the number currently stored in the array is Q. When the number Q and the external input number IN need to be added, the carry value of the i-th bit and the sum value of the i+1-th bit will be calculated at the same time. At this time, Q will be read from the first bit line BL respectively. i+1 and read the value of Q from the second bit line BLB i '; where Q i ' indicates Q i The opposite value of Q i represents the i-th value in the binary representation sequence of the number Q; The column-shared reconfigurable Boolean calculation unit connected to the first bit line BL will perform a calculation on the first bit line BL and the corresponding decoded external input IN i The decoded column-shared Boolean calculation unit connected to the second bit line BLB performs an XOR calculation on the value of the second bit line BLB and the corresponding decoded external input IN i+1 Perform AND calculations to obtain Boolean calculation results, where IN i Represents the i-th value in the binary expression sequence of the external input digital IN; The Boolean calculation result read out from the read bit line will be input into the pipeline addition peripheral calculation circuit and complete the subsequent calculation logic.

5. The cross-level reconfigurable SRAM in-memory computing unit for edge intelligence according to claim 3, It is characterized in that The multiply-accumulate operation is based on pipelined bit-parallel addition; The inputs and weights of each layer of the neural network are stored in different slices of the SRAM array; Each array has limited storage space and is adjusted at link time based on precision and kernel size requirements; The multiplication and accumulation operation calculation process reuses the pipelined bit-parallel addition logic part in the peripheral circuit to perform the multiplication algorithm of shift and addition.

6. A cross-level reconfigurable SRAM in-memory computing method for edge intelligence. It is characterized in that The application of the cross-level reconfigurable SRAM in-memory computing unit for edge intelligence described in any one of claims 1 to 5 comprises the following steps: Reconstruction step: Perform reconstruction calculation based on the SRAM cell level to obtain the reconstructed structure; Computation steps: The column-shared reconfigurable Boolean computation unit outputs the computation result based on the reconfigured structure.

Citation Information

Patent Citations

  • Novel digital in-memory computing device based on Sram

    CN115083462A

  • Storage system for supporting calculation in storage and calculation method

    CN110364203A

  • SRAM (Static Random Access Memory) cell suitable for high-speed content addressing and in-memory Boolean logic computation

    CN113205846A

  • In-memory computing circuit based on SRAM (Static Random Access Memory)

    CN114999544A

  • Accelerator design method for double 6T-SRAM (6 T-static random access memory) storage unit and double-bit local calculation unit based on separated word line

    CN115935894A