In-memory computing circuit and control method, computing chip and memory
By inserting reference memory cells in the memory array and separating word line control, the reference voltage and analog voltage signals are generated in the same place, which solves the problem of the in-memory computing system being sensitive to PVT interference, improves calculation accuracy and stability, and reduces represents the area of the reference voltage generating circuit.
Patent Information
- Application Number
- CN202311872526.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-12-29
AI Technical Summary
Due to the different working logic and space-time between the reference voltage generation circuit and the calculation array, the existing in-memory computing system is sensitive to PVT interference and reduces the calculation accuracy. The reference voltage generation circuit occupies a large area and consumes high power.
Insert the reference memory unit into the memory array, control the calculation memory unit and the reference memory unit by separating the word lines, so that they work under the same logic and space-time conditions, and realize the simultaneous and co-local generation of the reference voltage and analog voltage signals, integrated in the memory array to reduce the area of the reference voltage generation circuit.
Effectively resisting PVT interference, improving calculation accuracy and system stability, while significantly reducing the area of the reference voltage generation circuit and improving calculation efficiency.
Smart Images

Figure CN117746933B
Abstract
Description
Technical Field
[0001] The present application relates to the field of in-memory computing technology, and in particular to an in-memory computing circuit and control method, a computing chip, and a memory. Background Art
[0002] With the development of artificial intelligence technology and its gradual application in various fields, in-memory computing technology has also developed rapidly because it overcomes the advantages of the memory wall and is highly compatible with deep learning. Taking the field of neural networks as an example, in-memory computing systems usually store the weight data of neural networks in a storage array, and input different excitation signals to the word line to keep the bit line at a high level or cause discharge, thereby obtaining the multiplication result of the single-bit input and the weight data: an analog voltage quantity. The analog voltage quantity needs to be converted to digital by the in-memory computing readout circuit and finally output in the form of a digital binary code. At present, one implementation method of the in-memory computing system readout circuit is to input the analog voltage quantity into a multi-bit analog-to-digital converter ADC, compare it with different reference voltages, and obtain the output result of the binary code. Therefore, the accuracy of the reference voltage is closely related to the accuracy of the calculation result output by the in-memory computing system.
[0003] However, the reference voltage generated by the current reference voltage generating circuit has a relatively obvious PVT (process, voltage and temperature) interference problem. When the reference voltage is subject to different degrees of PVT interference, the calculation output results of the in-memory computing system also have different error fluctuations, causing the analog memory calculation to be very sensitive to PVT condition fluctuations, thereby reducing the output accuracy of the in-memory computing system. Summary of the invention
[0004] In view of the above problems, the present disclosure provides an in-memory computing circuit and control method, a computing chip and a memory, which can solve or partially solve the technical problem that the computing accuracy of the in-memory computing circuit decreases due to PVT interference of the reference voltage.
[0005] In a first aspect, the present disclosure provides the following technical solution through an embodiment:
[0006] An in-memory computing circuit, comprising:
[0007] A storage array, comprising a plurality of storage units arranged in an array; each column of storage units comprises a plurality of calculation storage units and at least one reference storage unit, wherein the calculation storage unit is used to store calculation weights, and the reference storage unit is used to store reference weights;
[0008] A plurality of first word lines and second word lines; for each column of memory cells, one of the first word lines is connected to one of the calculation memory cells, and one of the second word lines is connected to one of the reference memory cells;
[0009] A plurality of first bit lines and second bit lines; for each column of memory cells, one end of the calculation memory cell and the reference memory cell is connected to one of the first bit lines, and the other end is connected to one of the second bit lines;
[0010] When performing calculation, the first word line is used to input an excitation signal so that the calculation storage unit outputs the calculated analog voltage signal to the first bit line; the second word line is used to input a reference signal so that the reference storage unit outputs the calculated reference voltage signal to the second bit line.
[0011] In some embodiments, the computing storage unit includes a first transistor, a second transistor, a first inverter and a second inverter, the input end of the first inverter is connected to the output end of the second inverter to form a first node, and the input end of the second inverter is connected to the output end of the first inverter to form a second node; the in-memory computing circuit also includes a plurality of third word lines;
[0012] A first electrode of the first transistor is connected to the first bit line, a control electrode is connected to the first word line, and a second electrode is connected to the first node;
[0013] The second transistor has a first electrode connected to the second bit line, a control electrode connected to the third word line, and a second electrode connected to the second node.
[0014] In some embodiments, the reference storage unit includes a third transistor, a fourth transistor, a third inverter and a fourth inverter, the input end of the third inverter is connected to the output end of the fourth inverter to form a third node, and the input end of the fourth inverter is connected to the output end of the third inverter to form a fourth node; the in-memory calculation circuit also includes a plurality of fourth word lines;
[0015] The first electrode of the third transistor is connected to the first bit line, the control electrode is connected to the fourth word line, and the second electrode is connected to the third node;
[0016] The fourth transistor has a first electrode connected to the second bit line, a control electrode connected to the second word line, and a second electrode connected to the fourth node.
[0017] In some embodiments, the in-memory computing circuit also includes multiple analog-to-digital converters, and the first bit line and the second bit line corresponding to each column of the storage cells are respectively connected to an input end of the analog-to-digital converter; the analog-to-digital converter is used to convert the analog voltage signal and the reference voltage signal into a digital voltage signal and output a digital result signal corresponding to this calculation.
[0018] In some embodiments, in each column of the storage cells, the reference storage cells are arranged alternately in the calculation storage cells.
[0019] In some embodiments, in each column of the storage cells, P rows of calculation storage cells are arranged between two adjacent rows of reference storage cells, and the value range of P is 8-32.
[0020] In some embodiments, the calculation storage unit and the reference storage unit are static random access storage units, and the static random access storage unit is one of a resistive memory unit, a spin electronic memory unit, a ferroelectric memory unit, and a phase change memory unit.
[0021] In the second aspect, based on the same inventive concept, the present disclosure provides the following technical solution through an embodiment:
[0022] A control method for an in-memory computing circuit is applied to the in-memory computing circuit provided by an embodiment of the first aspect, and the control method includes:
[0023] Controlling the first word line to input an excitation signal so that the calculation storage unit outputs the calculated analog voltage signal to the first bit line, and controlling the second word line to input a reference signal so that the reference storage unit outputs the calculated reference voltage signal to the second bit line;
[0024] The second word line is continuously controlled to input a reference signal, so that the reference memory cell continuously outputs the reference voltage signal to the second bit line.
[0025] In the third aspect, based on the same inventive concept, the present disclosure provides the following technical solution through an embodiment:
[0026] A computing chip includes the in-memory computing circuit provided by the embodiment of the first aspect.
[0027] In a fourth aspect, based on the same inventive concept, the present disclosure provides the following technical solutions through an embodiment:
[0028] A memory includes the in-memory computing circuit provided by the embodiment of the first aspect.
[0029] Through one or more technical solutions of the present disclosure, the present disclosure has the following beneficial effects or advantages:
[0030] The present disclosure provides an in-memory computing circuit, which integrates a circuit for generating a reference voltage and an in-memory computing circuit for calculation in the same column of storage cells by inserting at least one reference storage cell into a plurality of computing storage cells in each column to form a storage array; by separating a first word line and a second word line, respectively controlling the computing storage cell to perform calculations and the reference voltage generation of the reference storage cell, the reference storage cell and the computing storage cell can be operated under the same logic and time and space conditions, so that the reference voltage signal and the analog voltage signal are generated in the storage array at the same time and in the same place, thereby achieving the purpose of resisting PVT interference of the reference voltage and the calculation result; at the same time, the reference storage cell and the computing storage cell are integrated, thanks to the high-density layout design of the storage array, and compared with separately setting a reference voltage generation circuit outside the storage array, the area of the reference voltage generation circuit can be significantly reduced, which is beneficial to improving the calculation efficiency and enhancing the stability of the storage and computing system.
[0031] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present disclosure. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0033] Figure 1 A framework diagram of an in-memory computing circuit according to an embodiment of the present disclosure is shown;
[0034] Figure 2A A schematic diagram showing the relationship between the analog voltage VBL on the first bit line and the time t according to an embodiment of the present disclosure;
[0035] Figure 2B A schematic diagram showing the relationship between the reference voltage VBLB on the second bit line and the time t according to an embodiment of the present disclosure;
[0036] Figure 3 A circuit diagram of a calculation storage unit and a reference storage unit with a 6T structure according to an embodiment of the present disclosure is shown;
[0037] Figure 4 A control flow diagram of an in-memory computing circuit according to an embodiment of the present disclosure is shown;
[0038] Figure 5A schematic diagram of timing control of an in-memory computing circuit according to an embodiment of the present disclosure is shown;
[0039] Description of reference numerals:
[0040] 10. Storage array; 11. Computational storage unit; 12. Reference storage unit; WLL_cal, first word line; WLR_ref, second word line; WLR_cal, third word line; WLL_ref, fourth word line; BL, first bit line; BLB, second bit line; ADC, analog-to-digital converter; INV1, first inverter; INV2, second inverter; INV3, third inverter; INV4, fourth inverter; N1, first node; N2, second node; N3, third node; N4, fourth node; M1, first transistor; M2, second transistor; M3, third transistor; M4, fourth transistor. DETAILED DESCRIPTION
[0041] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0042] Various structural schematic diagrams according to embodiments of the present disclosure are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may further design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0043] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "one" or "the" do not indicate quantity restrictions, but indicate that there is at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0044] Research shows that the main reason why the reference voltage is susceptible to PVT interference is that the current analog storage circuit mostly uses analog-to-digital converters (ADCs) to convert analog quantities to digital quantities. Since the ADC requires an independent reference voltage generation circuit, that is, the reference voltage generation circuit is an independent digital-to-analog converter (DAC) or capacitor array, the reference voltage generation circuit and the storage array for in-memory calculation have different working logics and working time and space, resulting in a clear difference between the PVT conditions when the reference voltage is generated and the PVT conditions of the calculation array for in-memory calculation, thereby generating a relatively obvious PVT interference between the reference voltage signal and the analog voltage signal corresponding to the calculation result. Due to the different working logics and working time and space, under the condition of PVT fluctuations, the error fluctuation amplitudes of the reference voltage and the calculation array are also different, resulting in the phenomenon that the analog storage result is very sensitive to the fluctuation of the PVT conditions, which reduces the output accuracy of the storage system.
[0045] On the other hand, since ADC requires an independent reference voltage generation circuit, it has the characteristics of large area and high power consumption. If the reference voltage generation circuit adopts the traditional flash ADC (Flash Analog-to-Digital Converter), it is usually necessary to design a DAC based on serial resistors to form a DC path from the power supply to the ground, which occupies the chip area; if SAR ADC (Successive approximation ADC) is used, a larger capacitor array is required. Therefore, no matter which case, the reference voltage generation circuit must occupy a certain chip area and generate power consumption. At present, the area and power consumption consumed by ADC account for an increasingly large proportion of the entire storage and computing system, and its mismatch with the computing array makes it a part of the storage and computing system that needs to be optimized urgently.
[0046] In order to solve the problem of PVT interference and ADC area consumption, firstly, in an optional embodiment, refer to Figure 1 , provides an in-memory computing circuit, comprising:
[0047] The storage array 10 includes a plurality of storage units arranged in an array; each column of storage units includes a plurality of calculation storage units 11 and at least one reference storage unit 12, the calculation storage unit 11 is used to store calculation weights, and the reference storage unit 12 is used to store reference weights;
[0048] A plurality of first word lines WLL_cal and second word lines WLR_ref; for each column of memory cells, a first word line WLL_cal is connected to a calculation memory cell 11, and a second word line WLR_ref is connected to a reference memory cell 12;
[0049] A plurality of first bit lines BL and second bit lines BLB; for each column of memory cells, one end of all calculation memory cells 11 and reference memory cells 12 is connected to a first bit line BL, and the other end is connected to a second bit line BLB;
[0050] When performing calculation, the first word line WLL_cal is used to input an excitation signal so that the calculation storage unit 11 outputs the calculated analog voltage signal to the first bit line BL; the second word line WLR_ref is used to input a reference signal so that the reference storage unit 12 outputs the calculated reference voltage signal to the second bit line BLB.
[0051] Specifically, a plurality of memory cell arrays are arranged to form a memory array 10 or a computing array of N rows × M columns, and the dimensions of M and N are determined according to the needs of in-memory computing and are not limited here. The memory cells are divided into computing memory cells 11 and reference memory cells 12 according to their functions. That is, a column of memory cells includes multiple rows of computing memory cells 11 and at least one row of reference memory cells 12. Each computing memory cell 11 is used to store the corresponding computing weight. When performing in-memory computing, the control unit of the in-memory computing circuit converts the input vector into an excitation signal of the corresponding row and inputs it into the first word line WLL_cal. Therefore, the excitation signal in a first word line WLL_cal corresponds to a single-bit input quantity in the input vector to be calculated. The excitation signal is used to turn on the computing memory cell 11 to perform a multiplication operation between the single-bit input quantity and the pre-stored computing weight, and obtain an analog voltage quantity as the operation result and output it to the first bit line BL. Since all the computing memory cells 11 in each column of memory cells are connected to the same first bit line BL, the average value of several single-bit multiplication results can be obtained, which is expressed as an analog voltage quantity discharged to different degrees from a high level, such as Figure 2A shown. Figure 2A ΔV∝N MAC , means that the reduction amount ΔV of the analog voltage is proportional to the number of rows N of the calculation storage unit 11 involved in the calculation or discharge MAC The ideal analog voltage quantity satisfies the linear mapping from the calculation result to the analog voltage, and its mapping relationship can be expressed as follows:
[0052]
[0053] Among them, V MAC represents the multiplication and accumulation of analog voltages corresponding to a column of calculation storage units 11; V DD Indicates the working voltage loaded on the first bit line BL; IN i Represents the single-bit digital quantity corresponding to the input vector; W irepresents the calculation weight stored in the calculation storage unit 11 of the i-th row, which is a single-bit digital quantity; ΔV BL It represents the unit drop of the bit line voltage, which is obtained by discharging on the bit line; i represents the row number.
[0054] The principle of the reference storage unit 12 is similar to that of the calculation storage unit 11, except that the weight stored in the reference storage unit 12 corresponds to the reference weight of the reference voltage. When the excitation signal is input to the second bit line BLB, the multiplication operation of the corresponding single-bit input quantity and the reference weight can generate the corresponding reference voltage component, and then the reference voltage components output by all the reference storage units 12 connected in series on the second bit line BLB are aggregated to obtain the final reference voltage result. The reference voltage on the second bit line BLB is as follows: Figure 2B As shown, similarly, the reduction amount ΔV of the reference voltage is proportional to the number of rows N of the reference storage cells 12 involved in the generation of the reference voltage. discharge .
[0055] Therefore, the in-memory calculation circuit provided by the present disclosure inserts a certain number of reference memory cells 12 in each column of the calculation memory cell 11 of the memory array 10 to realize the generation of the reference voltage. The reference memory cell 12 and the calculation memory cell 11 share a pair of bit lines: the first bit line BL and the second bit line BLB, but each reference memory cell 12 and the calculation memory cell 11 are respectively controlled by two different word lines, namely the first word line WLL_cal and the second word line WLR_ref. By separating the word lines with shorted gates of the conventional left and right transmission tubes, an independent first word line WLL_cal and a second word line WLR_ref are formed, and the calculation memory cell 11 is controlled by the first word line WLL_cal and the reference memory cell 12 is controlled by the second word line WLR_ref, so that the analog voltage signal and the reference voltage signal corresponding to the calculation result can be generated simultaneously and in the same place.
[0056] In some embodiments, see Figure 1 The in-memory calculation circuit also includes multiple analog-to-digital converters ADC, and the first bit line BL and the second bit line BLB corresponding to each column of storage cells are respectively connected to the input end of an analog-to-digital converter ADC. In this way, after the analog voltage signal and the reference voltage signal are generated, the two can enter the analog-to-digital converter ADC, and the analog-to-digital converter ADC performs analog-to-digital conversion and comparison of the analog voltage signal and the reference voltage signal to obtain a digital result signal corresponding to this calculation.
[0057] Therefore, the in-memory computing circuit provided by the present disclosure has the following advantages:
[0058] 1) Anti-PVT interference: For each column of storage cells, the first word line WLL_cal controls the calculation storage cell 11, and the second word line WLR_ref controls the reference storage cell 12 through word line separation, so that the calculation storage cell 11 and the reference storage cell 12 can work under the same PVT conditions and simultaneously generate the analog voltage signal of the calculation result and the reference voltage signal required by the ADC. The error caused by the change of PVT can be analogized to the common mode input, so after achieving simultaneous and co-location operation, the calculation storage cell 11 and the reference storage cell 12 can antagonize this "common mode" error and achieve the effect of anti-PVT interference.
[0059] 2) Small circuit area: As mentioned above, if the reference voltage generation circuit adopts the traditional flash ADC, it is necessary to design a DAC based on serial resistors to form a DC path from the power supply to the ground, which occupies a large chip area. If a SAR ADC is adopted, a capacitor array with a larger area is required. The in-memory calculation circuit provided by the present disclosure integrates the reference storage unit 12 for generating the reference voltage into the storage array 10. Thanks to the high-density layout design of the storage array 10, especially the SRAM array, the chip area occupied by the reference voltage generation circuit can be greatly reduced, and a reference voltage generation process with anti-PVT interference and small area can be realized, and the stability of the storage calculation circuit or storage calculation system is enhanced.
[0060] In some embodiments, for each column of memory cells, the reference memory cells 12 are arranged at intervals in the calculation memory cells 11. The reference memory cells 12 arranged at intervals can make the reference voltage generating circuit more evenly distributed in the memory array 10, which is conducive to keeping the reference memory cells 12 in the same PVT condition as the calculation memory cells 11 to the greatest extent. For example, in each column of memory cells, P rows of calculation memory cells 11 are arranged between two adjacent rows of reference memory cells 12, and the value range of P is 8 to 32, that is, a row of reference memory cells 12 is inserted after every 8 to 32 rows of calculation memory cells 11.
[0061] Taking N=16 as an example, in a memory computing circuit applied in a certain field, each column of the storage array 10 includes 256 rows of computing storage cells 11, then the total number of reference storage cells 12 can be 16, and one row of reference storage cells 12 is inserted every 16 rows of computing storage cells 11, forming a total of 272 rows of storage arrays 10 per column. In this way, the reference storage cells 12 are evenly distributed in the array of computing storage cells 11, and the same PVT conditions as the computing storage cells 11 are maintained to the greatest extent.
[0062] In some embodiments, the calculation storage unit 11 and the reference storage unit 12 may be non-volatile static random access memory cells, i.e., SRAM memory cells. For example, the static random access memory cells may be resistive random access memory cells composed of resistive random access memory (RRAM), spintronic memory cells composed of spin-current magnetic random access memory (STT-MRAM), ferroelectric memory cells composed of ferroelectric random access memory (FRAM), or phase change memory cells composed of phase change memory (PCM).
[0063] The storage structures of the calculation storage unit 11 and the reference storage unit 12 can be the same or different. The preferred method is to make them the same, which is conducive to better reducing the impact of PVT. The storage structures of the calculation storage unit 11 and the reference storage unit 12 can be 6T, 8T or 10T, etc., which can be determined according to actual needs; T represents a transistor.
[0064] Take 6T storage unit as an example, please refer to Figure 3 The calculation storage unit 11 includes a first transistor M1, a second transistor M2, a first inverter INV1 and a second inverter INV2. The input end of the first inverter INV1 is connected to the output end of the second inverter INV2 to form a first node N1, and the input end of the second inverter INV2 is connected to the output end of the first inverter INV1 to form a second node N2; the in-memory calculation circuit also includes multiple third word lines WLR_cal; the first electrode of the first transistor M1 is connected to the first bit line BL, the control electrode is connected to the first word line WLL_cal, and the second electrode is connected to the first node N1; the first electrode of the second transistor M2 is connected to the second bit line BLB, the control electrode is connected to the third word line WLR_cal, and the second electrode is connected to the second node N2.
[0065] The transistors in the 6T storage unit can be thin film transistors (TFT), field effect transistors (FET) or other devices with the same characteristics. If not otherwise specified, the embodiments of the present disclosure are described using field effect transistors as an example. The control electrode of each transistor is the gate of the transistor, the first electrode is one of the source and drain of the transistor, and the second electrode is the other of the source and drain of the transistor. Since the source and drain of the transistor can be symmetrical in structure, the source and drain can be structurally indistinguishable. For example, if the transistor adopts a P-type transistor, the first electrode of the transistor is the source and the second electrode is the drain; if the transistor adopts an N-type transistor, the first electrode of the transistor is the drain and the second electrode is the source. When an N-type transistor is used, when the gate input is a high level, the N-type transistor is turned on, and the P-type transistor is the opposite.
[0066] The first inverter INV1 and the second inverter INV2 in the 6T storage unit can be composed of two transistors respectively, and one inverter inputs the signal into the other inverter after inverting it. Therefore, the first inverter INV1 and the second inverter INV2 are connected through input and output, and together constitute a latch to store the calculation weight. The structure of the inverter can refer to the prior art and will not be repeated here. The first transistor M1 connected to the first node N1 and the first bit line BL and the second transistor M2 connected to the second node N2 and the second bit line BLB are used as switching devices. The control electrode (gate) of the first transistor M1 is connected to the first word line WLL_cal, and is turned on when the first word line WLL_cal inputs the corresponding excitation signal for calculation, and outputs the corresponding analog voltage signal to the first bit line BL; the control electrode (gate) of the second transistor M2 is connected to the third word line WLR_cal, and the third word line WLR_cal can be used to provide a corresponding excitation signal when the calculation storage unit 11 writes or updates the calculation weight.
[0067] The reference storage unit 12 can use the same 6T storage structure as the calculation storage unit 11, see Figure 3 , the reference storage unit 12 includes a third transistor M3, a fourth transistor M4, a third inverter INV3 and a fourth inverter INV4, the input end of the third inverter INV3 is connected to the output end of the fourth inverter INV4 to form a third node N3, and the input end of the fourth inverter INV4 is connected to the output end of the third inverter INV3 to form a fourth node N4; the in-memory calculation circuit also includes multiple fourth word lines WLL_ref; the first electrode of the third transistor M3 is connected to the first bit line BL, the control electrode is connected to the fourth word line WLL_ref, and the second electrode is connected to the third node N3; the first electrode of the fourth transistor M4 is connected to the second bit line BLB, the control electrode is connected to the second word line WLR_ref, and the second electrode is connected to the fourth node N4. Similar to the calculation storage unit 11, the control electrode (gate) of the fourth transistor M4 is connected to the second word line WLR_ref, and is turned on when an excitation signal is input to the second word line WLR_ref, and the corresponding reference voltage signal is output to the second bit line BLB; the control electrode (gate) of the third transistor M3 is connected to the fourth word line WLL_ref, and the fourth word line WLL_ref can be used to provide a corresponding excitation signal when the reference storage unit 12 writes or updates the reference weight.
[0068] In the second aspect, based on the same inventive concept, in another optional embodiment, please refer to Figure 4 , a control method for an in-memory computing circuit is provided, comprising:
[0069] S41: Control the first word line WLL_cal to input an excitation signal, so that the calculation storage unit 11 outputs the calculated analog voltage signal to the first bit line BL, and control the second word line WLR_ref to input a reference signal, so that the reference storage unit 12 outputs the calculated reference voltage signal to the second bit line BLB;
[0070] S42 : Continue to control the second word line WLR_ref to input the reference signal, so that the reference memory cell 12 continues to output the reference voltage signal to the second bit line BLB.
[0071] by Figure 3 Taking the calculation storage unit 11 and the reference storage unit 12 of the corresponding 6T SRAM structure as an example, the first word line WLL_cal and the third word line WLR_cal connected to each row of the calculation storage unit 11 form a word line pair. When the first word line WLL_cal inputs an excitation signal, the calculation storage unit 11 performs multiplication and addition operations on the excitation and the stored calculation weight, and the result is expressed in the form of an analog voltage on the first bit line BL of the storage array 10. On the other hand, the reference storage unit 12 is controlled by the pulse of the second word line WLR_ref, and discharges on the second bit line BLB to generate a reference voltage. The voltage signals of the first bit line BL and the second bit line BLB are input to the analog-to-digital converter ADC below for comparison, and the comparison result is the digital output.
[0072] For a corresponding timing control scheme, please refer to Figure 5 , as follows:
[0073] In the first pulse cycle, the first word line WLL_cal corresponding to the calculation storage unit 11 refers to the second word line WLR_ref corresponding to the storage unit 12 and turns on a pulse signal or a pulse high level at the same time, performs multiplication and accumulation operations and generates a reference voltage, and the calculation result is the analog voltage V on the first bit line BL. BL The reference voltage signal is generated by the analog voltage V on the second bit line BLB. BLB express.
[0074] Starting from the second pulse cycle, the first word line WLL_cal corresponding to the calculation storage unit 11 is no longer turned on, so the voltage on the first bit line BL remains unchanged. The second word line WLR_ref corresponding to the reference storage unit 12 is still periodically turned on to generate different reference voltages required by the analog-to-digital converter ADC on the second bit line BLB, forming a step-down voltage waveform.
[0075] It should be noted that, in the whole process, the third word line WLR_cal of the calculation storage unit 11 and the fourth word line WLL_ref of the reference storage unit 12 are always kept in the closed state. Figure 5As shown. In this way, the calculation result and the reference voltage generation do not interfere with each other, and can be generated at the same time, which speeds up the processing speed of the in-memory calculation.
[0076] In summary, the disclosed embodiment provides an in-memory computing circuit with a built-in reference storage unit 12. By separating and individually controlling the word lines of the control computing storage unit 11 and the reference storage unit 12, the analog voltage of the calculation result and the reference voltage required by the ADC are generated simultaneously and at the same place in the storage array 10, thereby achieving the effect of resisting PVT interference, greatly reducing the area of the reference voltage generation circuit, improving the area efficiency, and enhancing the stability of the storage computing system.
[0077] In the third aspect, based on the same inventive concept, in another optional embodiment, a chip for in-memory computing is provided, including the in-memory computing circuit provided in the embodiment of the first aspect.
[0078] In a fourth aspect, based on the same inventive concept, in another optional embodiment, a memory is provided, comprising the in-memory computing circuit provided in the embodiment of the first aspect.
[0079] Through one or more embodiments of the present disclosure, the present disclosure has the following beneficial effects or advantages:
[0080] The present disclosure provides an in-memory computing circuit, a computing chip and a memory. By inserting at least one reference memory cell into a plurality of computing memory cells in each column to form a memory array, a circuit for generating a reference voltage and an in-memory computing circuit for calculation are integrated in the same column of memory cells. By separating a first word line and a second word line, the computing memory cell is controlled to perform calculations and reference voltage generation of the reference memory cell respectively, so that the reference memory cell and the computing memory cell can work under the same logic and same time and space conditions, so that the reference voltage signal and the analog voltage signal are generated in the memory array at the same time and in the same place, thereby achieving the purpose of resisting PVT interference of the reference voltage and the calculation result. At the same time, the reference memory cell is integrated with the computing memory cell. Thanks to the high-density layout design of the memory array, the area of the reference voltage generation circuit can be significantly reduced compared with separately setting a reference voltage generation circuit outside the memory array, which is beneficial to improving the computing efficiency and enhancing the stability of the memory computing system.
[0081] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0082] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An in-memory computing circuit, characterized in that: include: A storage array, comprising a plurality of storage units arranged in an array; Each column of storage units includes a plurality of calculation storage units and at least one reference storage unit, wherein the calculation storage unit is used to store calculation weights, and the reference storage unit is used to store reference weights; a plurality of first word lines and second word lines; For each column of memory cells, one of the first word lines is connected to one of the calculation memory cells, and one of the second word lines is connected to one of the reference memory cells; A plurality of first bit lines and second bit lines; for each column of memory cells, one end of the calculation memory cell and the reference memory cell is connected to one of the first bit lines, and the other end is connected to one of the second bit lines; When performing calculation, the first word line is used to input an excitation signal so that the calculation storage unit outputs the calculated analog voltage signal to the first bit line; the second word line is used to input a reference signal so that the reference storage unit outputs the calculated reference voltage signal to the second bit line; The computing storage unit includes a first transistor, a second transistor, a first inverter and a second inverter, the input end of the first inverter is connected to the output end of the second inverter to form a first node, and the input end of the second inverter is connected to the output end of the first inverter to form a second node; The in-memory computing circuit further includes a plurality of third word lines; A first electrode of the first transistor is connected to the first bit line, a control electrode is connected to the first word line, and a second electrode is connected to the first node; A first electrode of the second transistor is connected to the second bit line, a control electrode is connected to the third word line, and a second electrode is connected to the second node; The reference storage unit includes a third transistor, a fourth transistor, a third inverter and a fourth inverter, the input end of the third inverter is connected to the output end of the fourth inverter to form a third node, and the input end of the fourth inverter is connected to the output end of the third inverter to form a fourth node; The in-memory computing circuit further includes a plurality of fourth word lines; The first electrode of the third transistor is connected to the first bit line, the control electrode is connected to the fourth word line, and the second electrode is connected to the third node; The first electrode of the fourth transistor is connected to the second bit line, the control electrode is connected to the second word line, and the second electrode is connected to the fourth node; The in-memory calculation circuit also includes multiple analog-to-digital converters, and the first bit line and the second bit line corresponding to each column of the storage cells are respectively connected to the input end of one of the analog-to-digital converters; the analog-to-digital converter is used to convert the analog voltage signal and the reference voltage signal into a digital voltage signal and output a digital result signal corresponding to this calculation.
2. The in-memory computing circuit according to claim 1, wherein: In each column of the storage cells, the reference storage cells are arranged alternately in the calculation storage cells.
3. The in-memory computing circuit according to claim 2, characterized in that: In each column of the storage cells, P rows of calculation storage cells are arranged between two adjacent rows of reference storage cells, and the value range of P is 8-32.
4. The in-memory computing circuit according to claim 1, characterized in that: The calculation storage unit and the reference storage unit are static random access storage units, and the static random access storage unit is one of a resistive storage unit, a spin electronic storage unit, a ferroelectric storage unit and a phase change storage unit.
5. A control method for an in-memory computing circuit, characterized in that: Applied to the in-memory computing circuit as claimed in claim 1, the method comprises: Controlling the first word line to input an excitation signal so that the calculation storage unit outputs the calculated analog voltage signal to the first bit line, and controlling the second word line to input a reference signal so that the reference storage unit outputs the calculated reference voltage signal to the second bit line; The second word line is continuously controlled to input a reference signal, so that the reference memory cell continuously outputs the reference voltage signal to the second bit line.
6. A computing chip, characterized in that: The method comprises an in-memory computing circuit as claimed in any one of claims 1 to 4.
7. A memory, characterized in that: The method comprises an in-memory computing circuit as claimed in any one of claims 1 to 4.
