Hybrid domain multiply-accumulate computation circuit based on bit rotation input
By using a hybrid domain multiplication and accumulation circuit with bit rotation input, combined with rotation shift input and sign bit processing, the problems of high hardware overhead and insufficient accuracy in in-memory computing are solved, achieving low power consumption and high accuracy computing results, which is suitable for edge AI accelerators.
Patent Information
- Application Number
- CN202411672723.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Existing in-memory computing methods suffer from high hardware overhead and insufficient computational accuracy under the requirements of high performance and high computational density, making it difficult to meet complex computing needs, especially in edge artificial intelligence applications.
A hybrid domain multiplication and accumulation circuit based on bit rotation input is adopted. Through rotation shift input unit and mixed-sign-bit SRAM array with embedded sign bit processing, parallel data transfer and sign bit processing are realized, supporting signed and unsigned calculation modes, reducing hardware overhead and improving calculation accuracy.
It achieves low hardware overhead and high precision multiply-accumulate calculations, making it suitable for low-power, high-energy-efficiency edge AI accelerator designs and improving the overall performance of the computing architecture.
Smart Images

Figure CN119598937B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of integrated circuit design technology, and in particular to a hybrid domain multiplication and accumulation calculation circuit based on bit rotation input. Background Technology
[0002] Driven by demands for high performance and high computational density, Computing in Memory (CIM) technology has gradually become an important direction in processor design. CIM significantly reduces the energy consumption caused by repeated data transfers between the processor and memory by directly integrating Multiply and Accumulate (MAC) operations into the memory array, thus solving the "memory wall" bottleneck problem in the von Neumann architecture. In edge AI applications, CIM architecture has attracted widespread attention due to its high energy efficiency. However, traditional CIM structures typically employ computational methods with high hardware overhead and limited computational accuracy. In neural network applications, the data volume is large and parallelism is high; therefore, a low-power, high-performance computational method is needed to improve the overall performance of CIM. Current CIM methods mostly employ bit-parallel or bit-serial input methods, which, while implementing basic MAC operations, suffer from high hardware overhead or insufficient accuracy, making it difficult to meet complex computational requirements. Summary of the Invention
[0003] This invention provides a hybrid domain multiply-accumulate calculation circuit based on bit rotation input to solve the technical problem that existing single-precision floating-point quantization methods are incompatible with the design of accelerators (macrocells) for floating-point in-memory computing units.
[0004] This invention provides a hybrid domain multiply-accumulate calculation circuit based on bit rotation input, comprising: a collection buffer, a rotation-shift input unit, and a mixed-sign-bit SRAM array for in-memory computation. The collection buffer collects serial input data through multiple internal flip-flops and transmits the data to the rotation-shift input unit in parallel output form. By rotating and shifting the input data, multiple multiplication results are compressed into a single multiply-accumulate result, which is then combined with the mixed-sign-bit SRAM array for multiply-accumulate calculation.
[0005] Optionally, in one embodiment of the present invention, the data mapping input method of the hybrid domain multiply-accumulate calculation circuit is as follows: in each cycle, the data is sequentially passed to the adjacent flip-flops by a rotation shift operation, so that the input data bits and weight bits are aligned one after another, and the partial result of multiply-accumulate is updated in each cycle.
[0006] Optionally, in one embodiment of the present invention, each rotation-shift input unit includes two 2-to-1 multiplexers and a D flip-flop, supporting two modes selected by the 2-to-1 multiplexers: fetch mode and rotation mode; in fetch mode, the rotation-shift input unit obtains data from the collection buffer; in rotation mode, each rotation-shift input unit rotates and shifts the data bit by bit to the adjacent D flip-flop cycle by cycle.
[0007] Optionally, in one embodiment of the present invention, the complete rotation-shift multiply-accumulate operation includes one fetch cycle and seven rotation cycles. During the rotation cycles, feature data is passed between adjacent D flip-flops on the same side of multiple rotation-shift input units: the left D flip-flop passes data to the adjacent left flip-flop, the right D flip-flop passes data to the adjacent right flip-flop, and the left D flip-flop of the last rotation-shift input unit passes data to the right D flip-flop of the first rotation-shift input unit when passing data.
[0008] Optionally, in one embodiment of the present invention, the mixed-signal in-memory computing SRAM array includes a sign bit multiply-accumulate unit and a mixed-signal multiply-accumulate unit;
[0009] The sign bit multiply-add unit includes 16 6T-SRAM units, a sign bit extension unit, and a selective inverting digital multiplier. In each cycle, it reads 1 bit weight from the 16 6T-SRAM units and multiplies it with the input 2 bits of feature data. The sign bit extension unit is used to store the sign bit product result in a register and accumulate it in multiple cycles through an adder. The selective inverting digital multiplier is used to select the original multiplication result or the inverted result to be output according to the sign bit of the input.
[0010] The mixed-signal multiply-accumulate unit includes 16 6T-SRAM units, a selective inverting digital multiplier, and an analog multiplier. The selective inverting digital multiplier outputs the result of the digital part, and the analog multiplier outputs the result of the analog part, realizing mixed-signal computing.
[0011] Optionally, in one embodiment of the present invention, the hybrid domain multiplication-accumulation calculation circuit supports both signed and unsigned calculation modes. In signed mode, the sign bit extension unit stores the sign bit product result of the previous cycle in a register and is multiplexed and accumulated by the adder. Combined with the result of the digital-analog hybrid multiplication-accumulation unit, the sign information in multi-cycle calculation is correctly processed. In unsigned mode, the original multiplication result is directly output. At this time, the sign bit extension unit does not perform sign bit extension and directly outputs the original result.
[0012] The hybrid-domain multiply-accumulate computation circuit based on bit rotation input in this invention is suitable for efficient multiply-accumulate computation in mixed-signal in-memory computing units. By using a rotation-shift input method and an in-memory computing SRAM array with embedded sign bit processing, it significantly reduces hardware overhead while ensuring high computational accuracy. This method achieves efficient utilization of hardware resources by rotating and transmitting input data and accumulating it in both analog and digital domains, solving the problems of high hardware cost and limited accuracy in traditional computing structures. It is suitable for application in the design of low-power, high-energy-efficiency edge AI accelerators.
[0013] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0014] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0015] Figure 1 This is a schematic diagram of the overall structure of a hybrid domain multiplication and accumulation calculation circuit based on bit rotation input according to an embodiment of the present invention;
[0016] Figure 2 This is a schematic diagram illustrating the multiplication and accumulation operation flow of the digital part, analog part, and sign bit part in an embodiment of the present invention.
[0017] Figure 3 This is a schematic diagram of the working structure of the rotation shift input unit in extraction mode and rotation mode according to an embodiment of the present invention;
[0018] Figure 4 This is a schematic diagram illustrating the operation of a mixed-signal in-memory computing SRAM array in both signed and unsigned modes according to an embodiment of the present invention. Detailed Implementation
[0019] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0020] To address the problems in the background technology, this invention proposes a hybrid domain multiply-accumulate calculation circuit based on bit rotation input and a multiply-accumulate calculation method based on rotation-shift input. By using a hybrid storage array with rotation input and embedded sign bit processing, it achieves a calculation method with low hardware overhead and high precision, which is suitable for edge AI and high-performance neural network applications.
[0021] Figure 1This is a schematic diagram of the overall structure of a hybrid domain multiplication and accumulation calculation circuit based on bit rotation input according to an embodiment of the present invention.
[0022] like Figure 1 As shown, the mixed-domain multiplication and accumulation calculation circuit based on bit rotation input includes: a collection buffer, a rotation shift input unit, and a mixed-sign-bit in-memory SRAM array with embedded sign bit processing.
[0023] The collection buffer collects serial input data through multiple internal triggers and passes the data to the rotation-shift input unit in the form of parallel output. By rotating and shifting the input data, multiple multiplication results are compressed into a single multiply-accumulate result, and multiply-accumulate calculation is performed in combination with a mixed-sign-bit in-memory computing array.
[0024] This paper presents a multiply-accumulate computation method based on rotation-shifted input in a hybrid-domain multiply-accumulate computation circuit, designed to support efficient multiply-accumulate computation. In this structure, multiple multiplication results are compressed into a single multiply-accumulate result by rotating and shifting the input data. Combined with a mixed-signal in-memory computation array embedding a sign bit processing unit, this achieves low hardware overhead and high precision multiply-accumulate computation.
[0025] The collection buffer is used to collect serial input data and pass the data to the rotary input units through parallel output. Each collection buffer contains 8 flip-flops responsible for collecting serial input data and passing the data to 8 rotary input units in parallel.
[0026] A hybrid-domain multiply-accumulate computation architecture based on bit-rotated input is proposed to support the design of macrocells and accelerators for mixed-domain digital and analog in-memory computation. This circuit proposes a bit-rotated data mapping input method and designs a mixed-domain digital and analog in-memory computation architecture based on this, supporting both unsigned and signed number computation modes.
[0027] The bit-rotated data mapping input method is as follows: In each cycle, the data is passed bit by bit to the adjacent flip-flops through rotation and shift operations, so that the input data bits and weight bits are aligned one after another, and the multiplication and accumulation partial results are updated in each cycle.
[0028] Specifically, such as Figure 2 As shown, bit-rotated data mapping input is a method for achieving efficient data alignment through cycle-by-cycle rotation and shifting. In each computation cycle, the input data is rotated and passed bit by bit, aligning the input data bits with the weight bits successively, thus updating part of the multiplication-accumulation result each cycle. This data mapping method relies on the D flip-flop chain structure of the rotated input unit.
[0029] In one embodiment of the present invention, such as Figure 3 As shown, each rotation-shift input unit consists of two 2-to-1 multiplexers and one D flip-flop. The 2-to-1 multiplexers select between two modes: "extract mode" and "rotate mode." In extract mode, the rotation-shift input unit retrieves data from the collection buffer. Eight bits of feature data enter the left D flip-flop of each rotation-shift input unit, and eight zeros enter the right D flip-flop, preparing for the rotation operation. In rotate mode, the rotation-shift input unit rotates and shifts the data bit by bit to the adjacent D flip-flops cycle by cycle.
[0030] Furthermore, a complete rotation-shift-multiply-accumulate operation includes one fetch cycle and seven rotation cycles, such as... Figure 2 As shown, during a rotation cycle, the feature data is passed between adjacent D flip-flops on the same side of the eight rotation-shift input units: the left D flip-flop passes data to the adjacent left flip-flop, and the right D flip-flop passes data to the adjacent right flip-flop. When passing data, the left D flip-flop of the last rotation-shift input unit passes data to the right D flip-flop of the first rotation-shift input unit. This design ensures that only one feature data bit is passed in each rotation cycle, achieving efficient data flow.
[0031] In one embodiment of the present invention, the mixed-signal in-memory computing SRAM array includes a sign bit multiply-accumulate unit and a mixed-signal multiply-accumulate unit.
[0032] The sign-bit multiply-add unit consists of 16 6T-SRAM cells, a selective inverting digital multiplier, and a sign-bit extension unit. In each cycle, it reads one weight from the 16 6T-SRAM cells and multiplies it with the input two-bit feature data. The selective inverting digital multiplier performs multiplication on the digital part, selecting either the original multiplication result or the inverted result based on the sign bit of the input. The sign-bit extension unit stores the sign-bit product result in a register and uses an adder to multiplex and accumulate it across multiple cycles, ensuring correct processing of the sign information.
[0033] The mixed-signal multiply-accumulate unit consists of 16 6T-SRAM cells, a selective inverting digital multiplier, and an analog multiplier. The selective inverting digital multiplier outputs the digital part of the result, while the analog multiplier outputs the analog part, enabling mixed-signal computation and supporting both signed and unsigned operation modes.
[0034] In one embodiment of the present invention, such as Figure 4As shown, the mixed-signal in-memory SRAM array supports both signed and unsigned computation modes. In signed mode, the sign bit extension unit stores the sign bit product result of the previous cycle in a register, which is then multiplexed and accumulated by the adder. Combined with the result of the mixed-signal multiply-add unit, the sign information in multi-cycle computation is correctly processed. In unsigned mode, the original multiplication result is directly output. In this case, the sign bit extension unit does not perform sign bit extension and directly outputs the original result.
[0035] The mixed-signal in-memory SRAM array of this invention supports both signed and unsigned computing modes:
[0036] In signed mode, the sign bit processing is divided into two parts: (1) Selective inversion: The selective inversion digital multiplier will select to output the original multiplication result or the inverted result according to the sign bit of the multiplier (e.g., F[7]); (2) Sign bit extension: The sign bit extension unit stores the sign bit product result of the previous cycle (e.g., p07, p17, etc.) in the register and accumulates it through the adder to ensure the correct propagation of the sign information in multi-cycle calculation.
[0037] In unsigned mode, the selective inverting digital multiplier directly outputs the original multiplication result. At this time, the sign bit extension unit does not perform sign bit extension and directly accumulates the unsigned product result.
[0038] In one embodiment of the invention, the post-processing unit accumulates the calculation results of the analog and digital parts respectively in each cycle. For example... Figure 2 As shown, the sign bit product result is finally accumulated to the final multiply-add result through the sign bit extension unit, and the complete multiply-add result is obtained in the 7th cycle, ensuring the correctness of the calculation result.
[0039] The hybrid domain multiply-accumulate computation circuit based on bit rotation input proposed in this invention features a mixed-domain in-memory computation architecture that supports both unsigned and signed number computation modes. Compared to traditional mixed-domain in-memory computation structures with bit parallel and bit serial inputs, this invention employs bit rotation input technology to achieve the same computational accuracy as bit parallel methods with the same hardware overhead as bit serial methods, thus balancing low hardware overhead and high computational accuracy and improving the overall performance of the computational architecture and circuit.
[0040] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0041] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A hybrid domain multiplication-accumulation calculation circuit based on bit rotation input, characterized in that, include: The system includes a collection buffer, rotation-shift input units, and a mixed-sign-bit in-memory SRAM array for embedded sign bit processing. The collection buffer collects serial input data through multiple internal triggers and transmits the data to the rotation-shift input unit in the form of parallel output. By rotating and shifting the input data, multiple multiplication results are compressed into a single multiply-accumulate result, and multiply-accumulate calculation is performed in conjunction with a mixed-sign-bit in-memory SRAM array. The mixed-signal in-memory SRAM array includes a sign-bit multiply-accumulate unit and a mixed-signal in-memory multiply-accumulate unit; The sign bit multiply-add unit includes 16 6T-SRAM units, a sign bit extension unit, and a selective inverting digital multiplier. In each cycle, it reads 1 bit weight from the 16 6T-SRAM units and multiplies it with the input 2 bits of feature data. The sign bit extension unit is used to store the sign bit product result in a register and accumulate it in multiple cycles through an adder. The selective inverting digital multiplier is used to select the original multiplication result or the inverted result to be output according to the sign bit of the input. The mixed-signal multiply-accumulate unit includes 16 6T-SRAM units, a selective inverting digital multiplier, and an analog multiplier. The selective inverting digital multiplier outputs the result of the digital part, and the analog multiplier outputs the result of the analog part, realizing mixed-signal computing.
2. The hybrid domain multiplication and accumulation calculation circuit based on bit rotation input according to claim 1, characterized in that, The data mapping input method of the hybrid domain multiply-accumulate calculation circuit is as follows: In each cycle, the data is passed bit by bit to the adjacent flip-flops through rotation and shift operations, so that the input data bits and weight bits are aligned one after another, and the partial result of multiply-accumulate is updated in each cycle.
3. The hybrid domain multiplication and accumulation calculation circuit based on bit rotation input according to claim 1, characterized in that, Each rotation-shift input unit includes two 2-to-1 multiplexers and one D flip-flop, supporting two modes selected by the 2-to-1 multiplexers: fetch mode and rotation mode. In fetch mode, the rotation-shift input unit retrieves data from the collection buffer. In rotation mode, each rotation-shift input unit rotates and shifts the data bit by bit to the adjacent D flip-flop cycle by cycle.
4. The hybrid domain multiplication and accumulation calculation circuit based on bit rotation input according to claim 3, characterized in that, A complete rotation-shift multiply-accumulate operation consists of one fetch cycle and seven rotation cycles. During the rotation cycles, the feature data is passed between adjacent D flip-flops on the same side of multiple rotation-shift input units: the left D flip-flop passes the data to the adjacent left flip-flop, the right D flip-flop passes the data to the adjacent right flip-flop, and the left D flip-flop of the last rotation-shift input unit passes the data to the right D flip-flop of the first rotation-shift input unit while passing the data.
5. The hybrid domain multiplication and accumulation calculation circuit based on bit rotation input according to claim 1, characterized in that, The mixed-domain multiplication-accumulation circuit supports both signed and unsigned computation modes. In signed mode, the sign bit extension unit stores the sign bit product result of the previous cycle in a register, which is then multiplexed and accumulated by the adder. Combined with the result of the mixed-sign-analog multiplication-accumulation unit, it correctly handles the sign information in multi-cycle computation. In unsigned mode, the original multiplication result is directly output. In this case, the sign bit extension unit does not perform sign bit extension and directly outputs the original result.
Citation Information
Patent Citations
Mixed signal reading circuit based on SRAM (Static Random Access Memory) storage and calculation integrated circuit
CN117238335A
Backward-compatible computer architecture with extended word size and address space
EP0503514A2
