[go: up one dir, main page]

CN115810374A - Memory circuit and memory computing circuit with BCAM addressing and logic operation functions - Google Patents

Memory circuit and memory computing circuit with BCAM addressing and logic operation functions Download PDF

Info

Publication number
CN115810374A
CN115810374A CN202211499158.9A CN202211499158A CN115810374A CN 115810374 A CN115810374 A CN 115810374A CN 202211499158 A CN202211499158 A CN 202211499158A CN 115810374 A CN115810374 A CN 115810374A
Authority
CN
China
Prior art keywords
gate
memory
storage
blb
word line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211499158.9A
Other languages
Chinese (zh)
Inventor
李鑫
王瑞璇
戴成虎
彭春雨
蔺智挺
吴秀龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui University
Original Assignee
Anhui University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui University filed Critical Anhui University
Priority to CN202211499158.9A priority Critical patent/CN115810374A/en
Publication of CN115810374A publication Critical patent/CN115810374A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Static Random-Access Memory (AREA)

Abstract

本发明涉及静态随机存储器技术领域,特别是涉及存储电路、具有BCAM寻址和逻辑运算功能的存内计算电路。该存储电路包括NMOS管N1~N5以及PMOS管P0~P1;其中,N1~N4和P0~P1构成6T‑SRAM单元,N5连接在6T‑SRAM单元任意一个存储节点对应的两个MOS管之间,且N5的栅极受控制信号线EN控制。本发明设计的存储电路和传统的6T‑SRAM相比,增加了一个晶体管,用于将读端口与存储节点隔离,进而改善了6T结构的读破坏问题。同时相较于传统的读写分离的8T‑SRAM,少了一个晶体管,在面积上占有更大优势。

Figure 202211499158

The invention relates to the technical field of static random access memory, in particular to a storage circuit and an in-memory calculation circuit with BCAM addressing and logic operation functions. The storage circuit includes NMOS transistors N1-N5 and PMOS transistors P0-P1; among them, N1-N4 and P0-P1 form a 6T-SRAM unit, and N5 is connected between two MOS transistors corresponding to any storage node of the 6T-SRAM unit , and the gate of N5 is controlled by the control signal line EN. Compared with the traditional 6T-SRAM, the storage circuit designed by the present invention adds a transistor for isolating the read port from the storage node, thereby improving the read damage problem of the 6T structure. At the same time, compared with the traditional 8T-SRAM with read-write separation, it has one less transistor and has a greater advantage in area.

Figure 202211499158

Description

存储电路、具有BCAM寻址和逻辑运算功能的存内计算电路Storage circuits, in-memory computing circuits with BCAM addressing and logical operation functions

技术领域technical field

本发明涉及静态随机存储器技术领域,特别是涉及一种存储电路、基于存储电路的具有BCAM寻址和逻辑运算功能的存内计算电路,以及以存储电路为基础的存储芯片。The invention relates to the technical field of static random access memory, in particular to a storage circuit, an in-memory computing circuit based on the storage circuit with BCAM addressing and logic operation functions, and a storage chip based on the storage circuit.

背景技术Background technique

为了克服传统冯·诺依曼架构带来的计算限制,存内计算(Computing InMemory,CIM)的概念被提出。存内计算不需要频繁地将数据从存储器传输到处理器,直接将运算部分整合到存储阵列内部执行计算,不仅减少了中间数据的传输,还减轻了处理器的运算量;存内计算的另一个显著优势是能够进行多行读取,通过多行读取技术,位线的放电量和存储的数据呈线性关系。用位线电压来完成一些简单的逻辑运算,从而减少对存储器的访问次数,这样在一定程度上减少能量的损耗,增加数据的吞吐量。SRAM作为被广泛运用在高速缓存领域的存储器,其在芯片的面积和功耗中占用的比重越来越大,对基于SRAM存内计算的研究也变得尤为重要。In order to overcome the computing limitations brought by the traditional von Neumann architecture, the concept of Computing In Memory (CIM) was proposed. In-memory computing does not need to frequently transfer data from the memory to the processor, and directly integrates the calculation part into the storage array to perform calculations, which not only reduces the transmission of intermediate data, but also reduces the workload of the processor; another aspect of in-memory computing A significant advantage is the ability to perform multi-row reading. Through multi-row reading technology, the discharge amount of the bit line has a linear relationship with the stored data. Use the bit line voltage to complete some simple logic operations, thereby reducing the number of accesses to the memory, thus reducing energy consumption to a certain extent and increasing data throughput. As a memory widely used in the cache field, SRAM occupies an increasing proportion in chip area and power consumption, and the research on SRAM-based in-memory computing has become particularly important.

传统的6T-SRAM具有交叉耦合反相器和两个用于读写操作的存取晶体管。在读取操作期间,位线BL和BLB被预充电到VDD,并且字线WL被设置为VDD以进行读取。6T-SRAM的读取路径通过存储节点到地(GND),这通常导致读取干扰。存内计算的关键技术是多行读取技术,即在读操作时,同时打开多行而不是一行字线;而传统的6T-SRAM则在一次数据读取的过程中只能读取一行数据。A conventional 6T-SRAM has cross-coupled inverters and two access transistors for read and write operations. During a read operation, bit lines BL and BLB are precharged to VDD, and word line WL is set to VDD for reading. The read path of 6T-SRAM goes through the storage node to ground (GND), which usually causes read disturb. The key technology of in-memory computing is the multi-row read technology, that is, during the read operation, multiple rows are turned on at the same time instead of one row of word lines; while the traditional 6T-SRAM can only read one row of data during a data read process.

为解决读干扰问题提出了带有读耦合的8T-SRAM结构,该结构具有读写分离的结构优势,也有使用带读写分离的9T-SRAM,甚至是10T-SRAM单元来实现存内计算,相较于传统的6T-SRAM,这些结构虽然能改善读干扰问题,但面积也相应的增加。In order to solve the problem of read interference, an 8T-SRAM structure with read coupling is proposed. This structure has the structural advantages of read-write separation. There are also 9T-SRAM with read-write separation, and even 10T-SRAM units are used to realize in-memory computing. Compared with the traditional 6T-SRAM, although these structures can improve the read disturbance problem, the area also increases accordingly.

发明内容Contents of the invention

基于此,有必要针对现有SRAM单元以牺牲面积来改善读干扰的问题,提供一种存储电路、基于存储电路的具有BCAM寻址和逻辑运算功能的存内计算电路,以及以存储电路为基础的存储芯片。Based on this, it is necessary to address the problem of improving read disturbance at the expense of the area of the existing SRAM unit, and provide a storage circuit, an in-memory computing circuit with BCAM addressing and logic operation functions based on the storage circuit, and a storage circuit-based memory chips.

为实现上述目的,本发明采用了以下技术方案:To achieve the above object, the present invention adopts the following technical solutions:

一种存储电路,包括NMOS管N1~N5以及PMOS管P0~P1。其中,N1~N4和P0~P1构成6T-SRAM单元,N5连接在6T-SRAM单元任意一个存储节点对应的两个MOS管之间,且N5的栅极受控制信号线EN控制。存储电路的具体连接方式如下:A storage circuit includes NMOS transistors N1-N5 and PMOS transistors P0-P1. Among them, N1-N4 and P0-P1 form a 6T-SRAM unit, and N5 is connected between two MOS transistors corresponding to any storage node of the 6T-SRAM unit, and the gate of N5 is controlled by the control signal line EN. The specific connection method of the storage circuit is as follows:

N1的栅极与N2的漏极、N4的漏极、P1的栅极电连接。N1的漏极与N3的漏极、N5的源极电连接。N1的源极与N2的源极接GND。P2的栅极与P1的漏极、N2的栅极、N5的漏极电连接。P2的漏极与N1的栅极、N2的漏极、N4的漏极、P1的栅极电连接。P1的源极与P2的源极接VDD。N3的栅极接右字线WLR,N4的栅极接左字线WLL,N5的栅极与外部控制信号线EN电连接。N3的源极接位线BLB,N4的源极接位线BL。The gate of N1 is electrically connected to the drain of N2, the drain of N4, and the gate of P1. The drain of N1 is electrically connected to the drain of N3 and the source of N5. The source of N1 and the source of N2 are connected to GND. The gate of P2 is electrically connected to the drain of P1, the gate of N2, and the drain of N5. The drain of P2 is electrically connected to the gate of N1, the drain of N2, the drain of N4, and the gate of P1. The source of P1 and the source of P2 are connected to VDD. The gate of N3 is connected to the right word line WLR, the gate of N4 is connected to the left word line WLL, and the gate of N5 is electrically connected to the external control signal line EN. The source of N3 is connected to the bit line BLB, and the source of N4 is connected to the bit line BL.

其中,P2和N2构成反相器,N3、N4构成存储电路的传输管。存储节点Q通过N4与位线BL相连,存储节点QB通过N5、N3与位线BLB相连。Wherein, P2 and N2 form an inverter, and N3 and N4 form transmission tubes of the storage circuit. The storage node Q is connected to the bit line BL through N4, and the storage node QB is connected to the bit line BLB through N5 and N3.

进一步的,存储电路实现SRAM模式包括保持操作、写操作和读操作。存储电路执行保持操作时,控制信号线EN保持高电平,左字线WLL、右字线WLR保持低电平,P1、P2、N1、N2、N5构成的锁存结构对存储节点Q、QB的存储数据进行锁存。存储电路执行写操作时,控制信号线EN保持高电平,左字线WLL、右字线WLR被拉为高电平,同时将需要写入的数据加载到写位线上。所述存储电路执行读操作时,位线BLB预充至高电平,控制信号线EN为低电平,左字线WLL被拉低,右字线WLR保持高电平,经过灵敏放大器SA读取结果。Further, the storage circuit implementing the SRAM mode includes holding operation, writing operation and reading operation. When the storage circuit performs the hold operation, the control signal line EN maintains a high level, the left word line WLL and the right word line WLR maintain a low level, and the latch structure formed by P1, P2, N1, N2, and N5 controls the storage nodes Q and QB. The stored data is latched. When the storage circuit performs a write operation, the control signal line EN maintains a high level, the left word line WLL and the right word line WLR are pulled to a high level, and at the same time, the data to be written is loaded onto the write bit line. When the storage circuit performs a read operation, the bit line BLB is precharged to a high level, the control signal line EN is at a low level, the left word line WLL is pulled low, and the right word line WLR is kept at a high level, and read through the sense amplifier SA result.

本发明还涉及一种具有BCAM寻址和逻辑运算功能的存内计算电路,其由多个相同的存储单元构成N×M的阵列形式。其中,N为存储单元的行数,M为存储单元的列数。每行存储单元共享左字线WLL、右字线WLR。每列存储单元共享位线BL、BLB。The invention also relates to an in-memory computing circuit with BCAM addressing and logic operation functions, which is composed of a plurality of identical memory cells in the form of an N*M array. Wherein, N is the number of rows of the storage unit, and M is the number of columns of the storage unit. Each row of memory cells shares a left word line WLL and a right word line WLR. Each column of memory cells shares bit lines BL, BLB.

存储单元采用前述的存储电路的电路结构,并实现该电路结构的完整功能。The storage unit adopts the circuit structure of the aforementioned storage circuit, and realizes the complete functions of the circuit structure.

进一步的,所有位线BL、BLB与灵敏放大器一一对应连接。每列存储单元中位线BL或BLB分别作为一个灵敏放大器的一路输入,灵敏放大器的另一路输入参考电压。当BL或BLB的电平高于参考电压,则灵敏放大器输出高电平,否则输出低电平。Further, all the bit lines BL, BLB are connected to the sense amplifiers in a one-to-one correspondence. The bit line BL or BLB in each column of memory cells is respectively used as one input of a sense amplifier, and the other input of the sense amplifier is a reference voltage. When the level of BL or BLB is higher than the reference voltage, the sense amplifier outputs a high level, otherwise it outputs a low level.

进一步的,每列存储单元的位线BL、BLB通过单端灵敏放大器连接在一个与门上。两个单端灵敏放大器的输出端分别作为一个与门的两路输入。当两个灵敏放大器的输出均为高电平,则与门输出高电平,否则输出低电平。Further, the bit lines BL and BLB of each column of memory cells are connected to an AND gate through a single-ended sense amplifier. The outputs of the two single-ended sense amplifiers are respectively used as two inputs of an AND gate. When the outputs of the two sense amplifiers are both high, the AND gate outputs a high level, otherwise it outputs a low level.

进一步的,存内计算电路执行存内布尔逻辑运算时,位线BLB上连接的灵敏放大器输出端作为执行该运算的结果输出端。存内计算电路执行BCAM运算时,与门输出端作为执行该运算的结果输出端。存内计算电路执行乘法运算时,位线BLB的放电量为乘法运算的结果。进一步的,存内计算电路实现存内布尔逻辑运算的方式如下:将同一列存储单元的左字线WLL及控制信号线EN保持低电平,将所需参与存内布尔逻辑运算的存储单元的右字线WLR置为高电平,其余字线置为低电平。经灵敏放大器将位线BLB上的电压与一个参考电压比较后输出相应的存内布尔逻辑运算结果。Further, when the in-memory calculation circuit executes the in-memory Boolean logic operation, the output terminal of the sense amplifier connected to the bit line BLB serves as the output terminal of the result of the operation. When the in-memory calculation circuit executes the BCAM operation, the output end of the AND gate is used as the output end of the result of the operation. When the in-memory calculation circuit executes the multiplication operation, the discharge amount of the bit line BLB is the result of the multiplication operation. Further, the method of implementing the Boolean logic operation in the memory by the calculation circuit in the memory is as follows: keep the left word line WLL and the control signal line EN of the same row of memory cells at low level, and set the The right word line WLR is set to high level, and the other word lines are set to low level. The sense amplifier compares the voltage on the bit line BLB with a reference voltage and then outputs the corresponding Boolean logic operation result in the memory.

进一步的,存内计算电路实现BCAM运算的方式如下:将同一列存储单元的控制信号线EN保持低电平;将搜索数据对应的电压信号和其相反信号分别通过左字线WLL、右字线WLR输入至预存有待查找数据的存储单元;经两个单端灵敏放大器输及一个与门将表征运算结果的位线BL、BLB的电压信号输出;与门的输出端输出高电平,表示搜索数据与待查找数据匹配;与门的输出端输出低电平,表示搜索数据与待查找数据不匹配。Further, the method of realizing the BCAM operation by the calculation circuit in the memory is as follows: keep the control signal line EN of the memory cells of the same column at a low level; pass the voltage signal corresponding to the search data and its opposite signal through the left word line WLL and the right word line respectively WLR is input to the storage unit that pre-stores the data to be searched; the voltage signal output of the bit line BL and BLB representing the operation result is output through two single-ended sense amplifiers and an AND gate; the output of the AND gate outputs a high level, indicating the search data Match the data to be searched; the output terminal of the AND gate outputs a low level, indicating that the search data does not match the data to be searched.

进一步的,存内计算电路实现乘法运算的方式如下:Further, the method of implementing the multiplication operation by the in-memory computing circuit is as follows:

将同一列存储单元的控制信号线EN、左字线WLL保持低电平,将被乘数对应的电压信号通过右字线WLR输入至预存有乘数的存储单元,根据位线BLB的放电量得到所需乘法结果。Keep the control signal line EN and the left word line WLL of the same column of memory cells at low level, and input the voltage signal corresponding to the multiplicand to the memory cell pre-stored with the multiplier through the right word line WLR, according to the discharge capacity of the bit line BLB to get the desired multiplication result.

本发明还涉及一种存储芯片,其采用前述的存储电路封装而成。存储芯片的引脚包括:The present invention also relates to a storage chip, which is packaged by the aforementioned storage circuit. The pins of the memory chip include:

接地引脚,其与PMOS管P1、P2的源极相连。The ground pin is connected to the sources of the PMOS transistors P1 and P2.

电源引脚,其与NMOS管N1、N2的源极相连。The power supply pin is connected to the sources of the NMOS transistors N1 and N2.

第一引脚,其与NMOS管N4的源极相连。The first pin is connected to the source of the NMOS transistor N4.

第二引脚,其与NMOS管N3的源极相连。The second pin is connected to the source of the NMOS transistor N3.

第三引脚,其与NMOS管N4的栅极相连。The third pin is connected to the gate of the NMOS transistor N4.

第四引脚,其与NMOS管N3的栅极相连。The fourth pin is connected to the gate of the NMOS transistor N3.

本发明提供的技术方案,具有如下有益效果:The technical scheme provided by the invention has the following beneficial effects:

1、本发明设计的存储电路和传统的6T-SRAM相比,增加了一个晶体管,用于将读端口与存储节点隔离,进而改善了6T结构的读破坏问题。同时相较于传统的读写分离的8T-SRAM,少了一个晶体管,在面积上占有更大优势。1. Compared with the traditional 6T-SRAM, the storage circuit designed by the present invention adds a transistor for isolating the read port from the storage node, thereby improving the read damage problem of the 6T structure. At the same time, compared with the traditional 8T-SRAM that separates read and write, it has one less transistor and has a greater advantage in area.

2、本发明设计的阵列分布的存内计算电路可以进行正常的保持、读和写的SRAM模式,同时还可以进行简单的布尔逻辑运算、BCAM寻址运算以及乘法运算,从而满足多种运算需求。2. The in-memory calculation circuit of the array distribution designed by the present invention can carry out normal maintenance, read and write SRAM mode, and can also perform simple Boolean logic operations, BCAM addressing operations and multiplication operations, thereby meeting various computing needs .

附图说明Description of drawings

图1为本发明实施例1的存储电路的电路结构图;Fig. 1 is the circuit structural diagram of the memory circuit of embodiment 1 of the present invention;

图2为本发明实施例2的两行存储单元执行与和与非运算的电路示意图;FIG. 2 is a schematic circuit diagram of AND and NAND operations performed by two rows of memory cells in Embodiment 2 of the present invention;

图3为基于图2的与和与非运算的仿真结果图;Fig. 3 is the simulation result figure based on the AND and NAND operation of Fig. 2;

图4为本发明实施例2的两行存储单元执行或和或非运算的电路示意图;4 is a schematic circuit diagram of OR and NOR operations performed by two rows of memory cells in Embodiment 2 of the present invention;

图5为基于图4的或和或非运算的仿真结果图;Fig. 5 is the simulation result figure based on the OR and OR non-operation of Fig. 4;

图6为本发明实施例2的以4×4存储单元为例BCAM寻址的电路示意图;FIG. 6 is a schematic circuit diagram of BCAM addressing with 4×4 memory cells as an example in Embodiment 2 of the present invention;

图7为基于图6的BCAM寻址的仿真结果图;Fig. 7 is the simulation result figure based on the BCAM addressing of Fig. 6;

图8为本发明实施例2的执行4bit×1bit二进制乘法运算的电路结构图;Fig. 8 is the circuit structural diagram of the execution 4bit * 1bit binary multiplication operation of embodiment 2 of the present invention;

图9为基于图8的执行4bit×1bit二进制乘法运算的仿真结果图;Fig. 9 is a simulation result diagram based on the execution of 4bit * 1bit binary multiplication in Fig. 8;

图10为基于图8的4bit×1bit二进制乘法运算结果线性度变化图。FIG. 10 is a linearity variation diagram of the 4bit×1bit binary multiplication operation result based on FIG. 8 .

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

实施例1Example 1

请参阅图1,图1示出了本实施例介绍了一种存储电路,包括NMOS管N1~N5以及PMOS管P0~P1。其中,N1~N4和P0~P1构成6T-SRAM单元,N5连接在6T-SRAM单元任意一个存储节点对应的两个MOS管之间,且N5的栅极受控制信号线EN控制。存储电路的具体连接方式如下:Please refer to FIG. 1 . FIG. 1 shows a storage circuit introduced in this embodiment, including NMOS transistors N1 - N5 and PMOS transistors P0 - P1 . Among them, N1-N4 and P0-P1 form a 6T-SRAM unit, and N5 is connected between two MOS transistors corresponding to any storage node of the 6T-SRAM unit, and the gate of N5 is controlled by the control signal line EN. The specific connection method of the storage circuit is as follows:

N2的漏极与N1的栅极电连接,N2的源极与N1的源极电连接。N3的栅极与右字线WLR电连接,N3的漏极与N1的漏极电连接,N3的源极与位线BLB电连接。N4的栅极与右字线WLL电连接,N4的漏极与N2的漏极、N1的栅极电连接,N4的源极与位线BL电连接。N5的栅极与外部控制信号EN电连接,N5的漏极与N2的栅极电连接,N5的源极与N1的漏极、N3的漏极电连接。P1的栅极与N1的栅极、N2的漏极、N4的漏极电连接,P1的漏极与N2的栅极、N5的漏极电连接。P2的栅极与N2的栅极、N5的漏极电连接,P2的漏极与N1的栅极、N2的漏极、N4的漏极、P1的栅极电连接P1的源极与P2的源极电连接。The drain of N2 is electrically connected to the gate of N1, and the source of N2 is electrically connected to the source of N1. The gate of N3 is electrically connected to the right word line WLR, the drain of N3 is electrically connected to the drain of N1, and the source of N3 is electrically connected to the bit line BLB. The gate of N4 is electrically connected to the right word line WLL, the drain of N4 is electrically connected to the drain of N2 and the gate of N1, and the source of N4 is electrically connected to the bit line BL. The gate of N5 is electrically connected to the external control signal EN, the drain of N5 is electrically connected to the gate of N2, and the source of N5 is electrically connected to the drain of N1 and the drain of N3. The gate of P1 is electrically connected to the gate of N1, the drain of N2, and the drain of N4, and the drain of P1 is electrically connected to the gate of N2 and the drain of N5. The gate of P2 is electrically connected to the gate of N2 and the drain of N5, the drain of P2 is electrically connected to the gate of N1, the drain of N2, the drain of N4, and the gate of P1 is electrically connected to the source of P1 and the gate of P2 source electrical connection.

电路右半部分的P1的漏极和N1的漏极之间增加了一个NMOS晶体管N5,N5的栅极由外部控制信号线EN控制,左半部分的P2和N2构成反相器,当N5管导通时,左右两侧对存储节点Q、QB存储的数据进行锁存,晶体管P1、P2的源极电连接到VDD,开启存储节点Q、QB对电源通路,晶体管N1、N2的源极电连接到GND,开启存储节点Q、QB对地通路。当N5管关断时,晶体管P1和晶体管N1之间断开,此时N1的栅极受Q控制,N1的漏极不再直接受QB影响,晶体管N3受字线WLR控制,且晶体管N1与晶体管N3与右位线BLB相连接,在晶体管N1和N3都导通时,右位线BLB可形成对地通路,通过控制晶体管N1和N3的导通程度可控制右位线BLB的放电量,利用此原理可实现不同的计算模式。An NMOS transistor N5 is added between the drain of P1 and the drain of N1 in the right half of the circuit. The gate of N5 is controlled by the external control signal line EN, and P2 and N2 in the left half form an inverter. When the N5 transistor When turned on, the left and right sides latch the data stored in the storage nodes Q and QB, the sources of the transistors P1 and P2 are electrically connected to VDD, and the storage nodes Q and QB are connected to the power supply, and the source electrodes of the transistors N1 and N2 are electrically connected to VDD. Connect to GND, open storage nodes Q, QB to ground path. When the N5 tube is turned off, the transistor P1 and the transistor N1 are disconnected. At this time, the gate of N1 is controlled by Q, and the drain of N1 is no longer directly affected by QB. The transistor N3 is controlled by the word line WLR, and the transistor N1 and the transistor N3 is connected to the right bit line BLB. When both transistors N1 and N3 are turned on, the right bit line BLB can form a path to the ground. By controlling the conduction degree of transistors N1 and N3, the discharge amount of the right bit line BLB can be controlled. This principle enables different computing modes.

存储节点Q通过晶体管N4与位线BL相连,存储节点QB通过晶体管N5、N3与位线BLB相连,N4、N3为传输管位于结构左、右两侧作为两条通路,分别受左字线WLL、右字线WLR控制。The storage node Q is connected to the bit line BL through the transistor N4, and the storage node QB is connected to the bit line BLB through the transistors N5 and N3. , Right word line WLR control.

本实施例的电路是由7个晶体管构成的7T-SRAM,相较于传统6T-SRAM,由于将读端口与存储节点相隔离,因此改善了6T结构的读破坏问题。相较于传统的读写分离的8T-SRAM,少了一个晶体管,在面积上占有更大优势。The circuit of this embodiment is a 7T-SRAM composed of 7 transistors. Compared with the traditional 6T-SRAM, since the read port is isolated from the storage node, the read corruption problem of the 6T structure is improved. Compared with the traditional 8T-SRAM that separates read and write, it has one less transistor and has a greater advantage in area.

下面对于本实施例的存储电路在SRAM模式下的具体操作进行说明。在SRAM模式下,包括保持操作、写操作和读操作,具体的操作步骤如下:The specific operation of the storage circuit of this embodiment in the SRAM mode will be described below. In SRAM mode, including hold operation, write operation and read operation, the specific operation steps are as follows:

(1)保持模式(1) Hold mode

保持数据期间,外部控制信号线EN保持高电平,左字线WLL、右字线WLR保持低电平,NMOS晶体管N3、N4关断,N5导通。PMOS晶体管P1、P2和NMOS晶体管N1、N2、N5构成的锁存结构对存储节点Q、QB的值进行锁存,位线BL、BLB的变化对存储节点Q、QB不会造成影响。During the data holding period, the external control signal line EN maintains a high level, the left word line WLL and the right word line WLR maintain a low level, the NMOS transistors N3 and N4 are turned off, and N5 is turned on. The latch structure formed by the PMOS transistors P1, P2 and the NMOS transistors N1, N2, N5 latches the values of the storage nodes Q, QB, and the changes of the bit lines BL, BLB will not affect the storage nodes Q, QB.

(2)写操作(2) Write operation

写操作期间,外部控制信号线EN、左字线WLL、右字线WLR保持高电平,NMOS晶体管N3、N4、N5均导通,将需要写入的数据加载到写位线上。During the write operation, the external control signal line EN, the left word line WLL, and the right word line WLR maintain a high level, and the NMOS transistors N3, N4, and N5 are all turned on, and the data to be written is loaded onto the write bit line.

假设在写操作前存储节点Q为高电平,QB为低电平,即存储数据为“1”,写入数据“0”时,将需要写入的数据“0”加载到写位线上,即BL为低电平,BLB为高电平。BL通过NMOS管N2下拉存储节点Q,BLB通过PMOS管P1上拉存储节点QB,锁存结构的反馈机制被打破,数据“0”写入存储电路内。Assume that the storage node Q is at high level and QB is at low level before the write operation, that is, the stored data is "1", and when writing data "0", load the data "0" to be written on the write bit line , that is, BL is low level and BLB is high level. BL pulls down storage node Q through NMOS transistor N2, BLB pulls up storage node QB through PMOS transistor P1, the feedback mechanism of the latch structure is broken, and data "0" is written into the storage circuit.

假设在写操作前存储节点Q为低电平,QB为高电平,即存储数据为“0”,写入数据“1”时,将需要写入的数据“1”加载到写位线上,即BL为高电平,BLB为低电平。BL通过P2上拉存储节点Q,BLB通过N1下拉存储节点QB,锁存结构的反馈机制被打破,数据“1”写入存储电路内。Assume that the storage node Q is low level and QB is high level before the write operation, that is, the stored data is "0", and when writing data "1", load the data "1" to be written on the write bit line , that is, BL is high level, and BLB is low level. BL pulls up storage node Q through P2, BLB pulls down storage node QB through N1, the feedback mechanism of the latch structure is broken, and data "1" is written into the storage circuit.

(3)读操作(3) Read operation

读操作期间,外部控制信号线EN、左字线WLL为低电平、右字线WLR为高电平,NMOS晶体管N4、N5关断,NMOS晶体管N3导通,即进行单边读操作。During the read operation, the external control signal line EN, the left word line WLL are at low level, and the right word line WLR is at high level, the NMOS transistors N4 and N5 are turned off, and the NMOS transistor N3 is turned on, that is, the unilateral read operation is performed.

假设在读操作前存储节点Q为高电平,QB为低电平,即存储数据为“1”,在读操作开始时,位线BLB被预充到高电平,存储节点Q控制N1的栅极,Q为高电平时N1导通,位线BLB通过NMOS管N3、N1放电至低电平,经过灵敏放大器SA完成读“1”的操作。Assuming that before the read operation, the storage node Q is at a high level and QB is at a low level, that is, the stored data is "1", at the beginning of the read operation, the bit line BLB is precharged to a high level, and the storage node Q controls the gate of N1 , when Q is at a high level, N1 is turned on, the bit line BLB is discharged to a low level through the NMOS transistors N3 and N1, and the operation of reading "1" is completed through the sense amplifier SA.

假设存储节点Q为低电平,QB为高电平,即存储数据Q为“0”时,在读操作开始时,位线BLB同样被预充到高电平,存储节点Q为低电平,控制NMOS晶体管N1关断,位线BLB无法放电,仍保持高电平,经过灵敏放大器SA完成读“0”的操作。Assuming that the storage node Q is at low level and QB is at high level, that is, when the stored data Q is "0", at the beginning of the read operation, the bit line BLB is also precharged to high level, and the storage node Q is at low level. The NMOS transistor N1 is controlled to be turned off, the bit line BLB cannot be discharged, and remains at a high level, and the operation of reading "0" is completed through the sense amplifier SA.

基于此,实现SRAM模式的真值表如下表所示,其中L代表低电平,H代表高电平,Read代表读操作,Write代表写操作,Hold代表保持状态。Based on this, the truth table for implementing the SRAM mode is shown in the following table, where L stands for low level, H stands for high level, Read stands for read operation, Write stands for write operation, and Hold stands for hold state.

表1:SRAM真值表Table 1: SRAM truth table

Figure BDA0003966162510000061
Figure BDA0003966162510000061

因此本实施例的存储电路不仅通过将读端口和存储节点Q之间相间隔,在通过位线读取存储电路内部存储的数据时能够改善读干扰的问题。同时只增加了一个晶体管,和8T-SRAM、9T-SRAM、10T-SRAM相比,在改善读干扰的基础上降低了面积的占用,因此和现有的改善读干扰的结构相比,具有良好的面积优势。Therefore, the storage circuit of this embodiment can not only improve the problem of read disturbance when reading the data stored inside the storage circuit through the bit line by separating the read port from the storage node Q. At the same time, only one transistor is added. Compared with 8T-SRAM, 9T-SRAM, and 10T-SRAM, the area occupied is reduced on the basis of improving read disturbance, so compared with the existing structure for improving read disturbance, it has good performance. area advantage.

实施例2Example 2

本实施例介绍了一种具有BCAM寻址和逻辑运算功能的存内计算电路,其由多个相同的存储单元构成N×M的阵列形式;其中,N为存储单元的行数,M为存储单元的列数;每行存储单元共享左字线WLL、右字线WLR;每列存储单元共享位线BL、BLB;存储单元采用前述的存储电路的电路结构,并实现该电路结构的完整功能。This embodiment introduces an in-memory computing circuit with BCAM addressing and logical operation functions, which consists of a plurality of identical storage units in the form of an N×M array; where N is the number of rows of storage units, and M is the number of storage units. The number of columns of cells; each row of memory cells shares the left word line WLL and the right word line WLR; each column of memory cells shares the bit lines BL and BLB; the memory cells adopt the circuit structure of the aforementioned memory circuit and realize the complete functions of the circuit structure .

灵敏放大器的数量与位线的数量相同,每列存储单元中位线BL或BLB分别作为一个灵敏放大器的一路输入,灵敏放大器的另一路输入参考电压;当BL或BLB的电平高于参考电压,则灵敏放大器输出高电平,否则输出低电平。与门的数量为存储单元列数的一半,每列存储单元中两个灵敏放大器的输出端分别作为一个与门的两路输入;当两个灵敏放大器的输出均为高电平,则与门输出高电平,否则输出低电平。The number of sense amplifiers is the same as the number of bit lines, and the bit line BL or BLB in each column of memory cells is used as one input of a sense amplifier, and the other input reference voltage of the sense amplifier; when the level of BL or BLB is higher than the reference voltage , the sensitive amplifier outputs a high level, otherwise it outputs a low level. The number of AND gates is half of the number of memory cell columns, and the output terminals of the two sense amplifiers in each column of memory cells are respectively used as two inputs of an AND gate; when the outputs of the two sense amplifiers are both high, the AND gate Output high level, otherwise output low level.

基于前述电路,本实施例不仅能够实现SRAM模式功能,同时基于不同列与行之间的相互配合,还可实现存内布尔逻辑运算、BCAM寻址以及乘法运算。下面针对这几种运算的实现方式进行详细说明。Based on the aforementioned circuit, this embodiment can not only realize the SRAM mode function, but also realize Boolean logic operation, BCAM addressing and multiplication operation in the memory based on the cooperation between different columns and rows. The implementation of these operations will be described in detail below.

一、存内布尔逻辑运算1. In-memory Boolean logic operations

执行存内布尔逻辑运算时,同一列存储单元的左字线WLL及控制信号线EN保持低电平,将所需参与存内布尔逻辑运算的存储单元的右字线WLR置为高电平,其余字线置为低电平;经灵敏放大器SA将位线BLB上的电压与一个参考电压比较后输出相应的存内布尔逻辑运算结果。When performing the Boolean logic operation in the memory, the left word line WLL and the control signal line EN of the memory cells in the same column are kept at a low level, and the right word line WLR of the memory cells required to participate in the Boolean logic operation in the memory is set to a high level, The rest of the word lines are set to low level; the voltage on the bit line BLB is compared with a reference voltage through the sense amplifier SA, and then the corresponding internal Boolean logic operation results are output.

如图2所示,以两个1bit存储数据的逻辑与和与非为例介绍同一列中两行之间存储数据实现与和与非功能。As shown in Figure 2, taking the logical AND and NAND of two 1-bit stored data as an example, it introduces the function of storing data between two rows in the same column to realize AND and NAND.

两个存储单元的左字线WLL和外部控制信号线EN始终处于低电位,因此NMOS晶体管N4、N5始终处于关断状态,将两行的存储单元分别标记为A和B,第A行字线记为WLL0和WLR0,第B行字线记为WLL1和WLR1,A和B共享位线BL、BLB。右字线WLR是否开启决定该行是否参与运算,并为其配制一个灵敏放大器SA,SA的另一端接参考电压VREF1,灵敏放大器将位线BLB的电压与参考电压VREF1比较,进而输出A和B的逻辑与和与非的运算结果。The left word line WLL and the external control signal line EN of the two memory cells are always at low potential, so the NMOS transistors N4 and N5 are always in the off state, and the memory cells of the two rows are respectively marked as A and B, and the word line of row A It is marked as WLL0 and WLR0, the word line of row B is marked as WLL1 and WLR1, and A and B share bit lines BL and BLB. Whether the right word line WLR is turned on determines whether the row participates in the operation, and a sense amplifier SA is prepared for it. The other end of SA is connected to the reference voltage VREF1. The sense amplifier compares the voltage of the bit line BLB with the reference voltage VREF1, and then outputs A and B The results of logical AND and NAND operations.

位线BLB预充至高电平,同时开启两个单元的右字线WLR0和WLR1,即WLR0和WLR1为高电平。当单元内存储数据为“1”,也就是Q为高电平,QB为低电平时,位线BLB与GND之间形成对地通路,BLB上的电荷向GND流动,此时位线BLB进行放电,A或B存储数据为1时位线BLB的放电速度一致,A和B的存储数据均为1时BLB的放电速度更快,利用相同时间内两个单元存储数据均为“1”和只有一个单元存储数据为“1”时位线放电速度不同,设置灵敏放大器SA的参考电压VREF1,即灵敏放大器SA的参考电压VREF1位于相同时间内两个单元放电后的位线电压和一个单元放电后的位线电压之间,若VBLB>VREF1,则A、B至少有一个存储数据为“0”或者两个均为“0”。若VBLB<VREF1,则A和B存储的数据均为“1”。The bit line BLB is precharged to a high level, and the right word lines WLR0 and WLR1 of the two cells are turned on at the same time, that is, WLR0 and WLR1 are at a high level. When the data stored in the cell is "1", that is, when Q is high and QB is low, a path to ground is formed between the bit line BLB and GND, and the charge on BLB flows to GND. At this time, the bit line BLB Discharge, when the stored data of A or B is 1, the discharge speed of the bit line BLB is the same. When the stored data of A and B are both 1, the discharge speed of BLB is faster, and the stored data of the two cells are both "1" and When only one cell stores data as "1", the discharge speed of the bit line is different, and the reference voltage VREF1 of the sense amplifier SA is set, that is, the reference voltage VREF1 of the sense amplifier SA is at the same time as the bit line voltage after two cells are discharged and one cell is discharged Between the subsequent bit line voltages, if VBLB>VREF1, at least one of the stored data of A and B is “0” or both are “0”. If VBLB<VREF1, the data stored in A and B are both "1".

由于与操作的原理是只有在两个操作数均为高电平时才会输出高电平,与非操作是只有两个操作数均为高电平时才会输出低电平。因此本实施例进行仿真实验,由图3仿真结果可以看出,当且仅当上下两个单元都放电时灵敏放大器的输出为“0”,其余情况下输出为“1”,输出A和B与非运算结果,灵敏放大器SA另一端输出与此端输出相反,输出A和B相与运算结果。多行之间的与和与非运算的原理和两行之间的运算原理相同。Since the principle of the AND operation is to output a high level only when both operands are high, and the non-operation is to output a low level only when both operands are high. Therefore, the simulation experiment is carried out in this embodiment, and it can be seen from the simulation results in Fig. 3 that the output of the sense amplifier is "0" if and only when both the upper and lower units are discharged, and the output is "1" in other cases, and the outputs A and B The output of the other end of the sense amplifier SA is the opposite of the output of this end, and the result of the AND operation of A and B phases is output. The principle of AND and NAND operations between multiple rows is the same as the operation principle between two rows.

如图4所示,以两个1bit存储数据的逻辑或和或非为例介绍同一列两行之间存储数据实现或和或非功能。As shown in Figure 4, the logical OR and NOR of two 1-bit stored data is taken as an example to introduce the OR and NOR function of storing data between two rows in the same column.

A和B进行和或非运算的设置条件与进行与和与非运算设置的条件相同,区别在于A和B执行或和或非运算时SA的一端接位线BLB,另一端接参考电压VREF2,SA将位线BLB的电压与参考电压VREF2比较,输出A和B的逻辑或和或非运算的结果。The setting conditions for A and B to perform AND or NOT operations are the same as those for AND and NOR operations. The difference is that when A and B perform OR and OR NOT operations, one end of SA is connected to the bit line BLB, and the other end is connected to the reference voltage VREF2. SA compares the voltage of the bit line BLB with the reference voltage VREF2, and outputs the result of the logical OR and NOR operation of A and B.

先将位线BLB预充至高电平,同时开启两个单元的右字线WLR0和WLR1,当单元内任一或全部存储数据为“1”,即Q为1,QB为0时,位线BLB与GND之间形成对地通路,位线BLB上的电荷向GND处流动,位线BLB进行放电。利用第A行和第B行的存储数据均为低电平时位线BLB不放电和A或B中有一个存储数据为高电平时位线BLB放电的原理进行判断。SA的参考电压VREF2位于位线电压不放电和一个单元放电后的位线电压之间。若VBLB>VREF2,则A和B存储的数据均为“0”;若VBLB<VREF2,则A或B中至少有一个存储的数据为“1”或者两个均为“1”。First precharge the bit line BLB to a high level, and turn on the right word lines WLR0 and WLR1 of the two cells at the same time. When any or all of the stored data in the cell is "1", that is, when Q is 1 and QB is 0, the bit line A path to ground is formed between BLB and GND, charges on the bit line BLB flow to GND, and the bit line BLB discharges. Judgment is made by using the principle that the bit line BLB is not discharged when the stored data in row A and row B are both low level and the bit line BLB is discharged when one of the stored data in row A or B is high level. The SA reference voltage VREF2 is between the bit line voltage without discharge and the bit line voltage after a cell discharge. If VBLB>VREF2, then the data stored in A and B are both "0"; if VBLB<VREF2, then at least one of the stored data in A or B is "1" or both are "1".

由于或操作的原理是只有两个操作数均为低电平时才会输出低电平,或非的原理是只有两个操作数为低电平,才会输出高电平,因此本实施例进行仿真实验,由图5仿真结果可以看出,只有当两个单元的存储数据都为“0”时,即两个单元中右位线BLB都不对地进行放电时,BLB保持高电平,SA的输出结果为“1”,任何一个单元存储数据“1”,即任何一个单元中右位线BLB对地放电时,SA的输出结果为“0”,此时的SA的参考电压VREF2位于位线电压不放电和一个单元放电后的位线电压之间,则灵敏放大器SA的一端输出A和B的或非运算结果,另一端输出与之相反,输出A和B相或运算结果。多行之间的或和或非运算的原理和两行之间的运算原理相同。Because the principle of the OR operation is to output a low level only when both operands are low, and the principle of NOR is to output a high level only when the two operands are low, so this embodiment performs From the simulation experiment, it can be seen from the simulation results in Figure 5 that only when the storage data of the two cells are "0", that is, when the right bit line BLB in the two cells is not discharged to the ground, BLB remains high, and SA The output result of SA is "1", and any cell stores data "1", that is, when the right bit line BLB in any cell is discharged to the ground, the output result of SA is "0", and the reference voltage VREF2 of SA at this time is located at bit Between the undischarged line voltage and the bit line voltage after a cell is discharged, one end of the sense amplifier SA outputs the NOR operation result of A and B, and the other end outputs the opposite, and outputs the OR operation result of A and B phases. The OR and OR NOT operation between multiple rows works in the same way as the operation between two rows.

基于此,本实施例的存内计算电路可以实现逻辑运算与和与非操作、或和或非操作;需要强调的是,灵敏放大器的两个输出端输出的是相反的结果,与位线BLB相连的输入端同一侧的输出端输出与非或者或非的结果,与参考电压相连的输入端同一侧的输出端输出与或者或的结果。Based on this, the in-memory calculation circuit of this embodiment can realize logical operation AND and NAND operation, OR and NOR operation; it should be emphasized that the output of the two output terminals of the sense amplifier is the opposite result, and the bit line BLB The output terminal on the same side as the connected input terminal outputs the result of NAND or NOR, and the output terminal on the same side as the input terminal connected to the reference voltage outputs the result of AND or OR.

实现布尔逻辑运算中同一列两行之间逻辑与和与非、或和或非模式的真值表如下表所示,其中A代表第A行的存储数据,B代表第B行的存储数据,L代表低电平,H代表高电平。Realize the truth table of logical AND and NAND, OR and NOR mode between two rows in the same column in Boolean logic operations as shown in the following table, where A represents the stored data in row A, and B represents the stored data in row B. L stands for low level and H stands for high level.

表2:存内布尔逻辑运算真值表Table 2: In-memory Boolean logic operation truth table

Figure BDA0003966162510000091
Figure BDA0003966162510000091

二、BCAM寻址运算Two, BCAM addressing operation

将同一列存储单元的控制信号线EN保持低电平;将搜索数据对应的电压信号和其相反信号分别通过左字线WLL、右字线WLR输入至预存有待查找数据的存储单元;其匹配与否结果通过两个单端灵敏放大器SA和一个与门输出表示。与门的输出端输出高电平,表示匹配;与门的输出端输出低电平,表示不匹配。Keep the control signal line EN of the memory cell in the same row at low level; input the voltage signal corresponding to the search data and its opposite signal through the left word line WLL and the right word line WLR respectively to the memory cell with pre-stored data to be searched; its matching and No result is represented by two single-ended sense amplifiers SA and an AND gate output. The output terminal of the AND gate outputs a high level, indicating a match; the output terminal of the AND gate outputs a low level, indicating a mismatch.

如图6所示,在BCAM运算模式下,外部控制信号线EN始终为低电平,即NMOS晶体管N5处于关断状态,待查找的二进制数据存储于存储单元内部Q节点,搜索线为左字线WLL,左字线WLL为搜索数据的二进制数据所对应的高电平或低电平,右字线WLR为搜索数据的二进制数据的反码所对应的高电平或低电平,数据为“1”时对应的字线置于高电平,数据为“0”时对应的字线置于低电平,左右位线BL、BLB下端各接入一个灵敏放大器SA,两个SA的输出接入到一个与门,与门的输出结果表明是否匹配。在数据查找之前,存储单元存入待查的二进制数据,左右位线BL、BLB预充到高电平,左右字线分别根据搜索数据置高电平或低电平,之后根据待查找数据与搜索数据是否匹配控制位线是否放电,相匹配时不进行放电,反之则放电,只有当该列左右位线均不放电时,灵敏放大器SA的输出为高电平,通过与门后输出为高电平,表示匹配,反之,与门输出为低电平,表示不匹配。As shown in Figure 6, in the BCAM operation mode, the external control signal line EN is always at low level, that is, the NMOS transistor N5 is in the off state, the binary data to be searched is stored in the internal Q node of the storage unit, and the search line is the left word line WLL, the left word line WLL is the high level or low level corresponding to the binary data of the search data, the right word line WLR is the high level or low level corresponding to the inverse code of the binary data of the search data, and the data is When the data is "1", the corresponding word line is set to high level, when the data is "0", the corresponding word line is set to low level, the lower ends of the left and right bit lines BL and BLB are each connected to a sense amplifier SA, and the output of the two SAs Connected to an AND gate, the output of the AND gate indicates whether there is a match. Before the data search, the storage unit stores the binary data to be searched, the left and right bit lines BL and BLB are precharged to high level, and the left and right word lines are respectively set to high level or low level according to the search data, and then according to the data to be searched and Whether the search data matches or not controls whether the bit line is discharged. When it matches, it does not discharge, otherwise it discharges. Only when the left and right bit lines of the column are not discharged, the output of the sense amplifier SA is high, and the output is high after passing through the AND gate. The level indicates a match, otherwise, the output of the AND gate is a low level, indicating a mismatch.

下面分析数据比较过程,当搜索数据为“0”时,左字线WLL为低电平,NMOS晶体管N4关断,BL无法进行放电,保持高电平,此时右字线WLR为高电平,NMOS晶体管N3导通,假设存储节点Q为“0”,作用于NMOS晶体管N1的栅极控制N1关断,BLB放电路径被夹断,BLB不进行放电,则表明此时位线BL、BLB都不进行放电,此单元数据匹配;假设存储节点Q为“1”,作用于NMOS晶体管N1的栅极控制N1导通,BLB放电,则此时位线BL不进行放电,位线BLB进行放电,此单元数据不匹配。同理,当搜索数据为“1”时,右字线WLR为低电平,NMOS晶体管N3关断,BLB无法进行放电,保持高电平,此时左字线WLL为高电平,NMOS晶体管N3导通,假设存储节点Q为“0”,存储节点QB为“1”,作用于N2的栅极控制NMOS晶体管N2导通,BL进行放电,则此时位线BLB不进行放电,位线BL进行放电,此单元数据不匹配,假设存储节点Q为“1”,存储节点QB为“0”,作用于N2的栅极控制NMOS晶体管N2关断,BL不进行放电,则此时位线BL、BLB均不进行放电,此单元数据匹配。The data comparison process is analyzed below. When the search data is "0", the left word line WLL is at low level, the NMOS transistor N4 is turned off, BL cannot be discharged, and remains at high level. At this time, the right word line WLR is at high level , the NMOS transistor N3 is turned on, assuming that the storage node Q is "0", the gate acting on the NMOS transistor N1 controls N1 to turn off, the BLB discharge path is pinched off, and the BLB does not discharge, indicating that the bit lines BL and BLB are at this time No discharge is performed, and the data of this cell matches; assuming that the storage node Q is "1", the gate acting on the NMOS transistor N1 controls N1 to be turned on, and the BLB is discharged, then the bit line BL is not discharged at this time, and the bit line BLB is discharged , the cell data does not match. Similarly, when the search data is "1", the right word line WLR is at low level, the NMOS transistor N3 is turned off, BLB cannot be discharged and remains at high level, at this time the left word line WLL is at high level, and the NMOS transistor N3 N3 is turned on, assuming that the storage node Q is "0" and the storage node QB is "1", the gate acting on N2 controls the NMOS transistor N2 to turn on, and BL discharges, then the bit line BLB does not discharge at this time, and the bit line BL discharges, the cell data does not match, assuming that the storage node Q is "1" and the storage node QB is "0", the gate acting on N2 controls the NMOS transistor N2 to turn off, and BL does not discharge, then the bit line at this time BL and BLB are not discharged, and the data of this unit matches.

结合图6,以4×4个存储单元进行BCAM运算为例,第一行至第四行的四对字线分别记为WLL0、WLR0;WLL1、WLR1;WLL2、WLR2;WLL3、WLR3,第一列至第四列的四对位线分别记为BL0、BLB0;BL1、BLB1;BL2、BLB2;BL3、BLB3。为了更加清晰地展现出本发明所提供的技术方案及其产生的技术效果,以四位二进制数据“0011”进行列搜索为例,即搜索的数据为“0011”,“0”为低电平,“1”为高电平。因此左字线WLL0、WLL1、WLL2、WLL3分别置于低电平、低电平、高电平、高电平,右字线WLR0、WLR1、WLR2、WLR3分别置于高电平、高电平、低电平、低电平。阵列一共有四列,从左到右每一列存储的数据依次为“0111”、“0011”、“1011”、“1101”。In combination with Figure 6, taking 4×4 memory cells to perform BCAM operations as an example, the four pairs of word lines from the first row to the fourth row are respectively marked as WLL0, WLR0; WLL1, WLR1; WLL2, WLR2; WLL3, WLR3, the first The four pairs of bit lines from columns 1 to 4 are respectively marked as BL0, BLB0; BL1, BLB1; BL2, BLB2; BL3, BLB3. In order to show the technical solution provided by the present invention and its technical effects more clearly, take the column search of four-bit binary data "0011" as an example, that is, the searched data is "0011", and "0" is low level , "1" is high level. Therefore, the left word lines WLL0, WLL1, WLL2, and WLL3 are respectively placed at low level, low level, high level, and high level, and the right word lines WLR0, WLR1, WLR2, and WLR3 are respectively placed at high level and high level. , low level, low level. There are four columns in the array, and the data stored in each column from left to right is "0111", "0011", "1011", and "1101".

根据上述分析可知,第一列存储的数据为“0111”,虽然第二行存储数据为“1”,但由于左字线WLL1为低电平,处于关断状态,因此左位线BL0不放电,SA输出“1”,但右字线WLR1与左字线WLL1状态相反,因此右字线WLR1为高电平,传输管N3导通,此时BLB0放电,SA输出“0”,两个SA的结果经与门输出后为“0”,因此第一列存储数据与搜索数据不匹配。According to the above analysis, it can be seen that the data stored in the first column is "0111", although the data stored in the second row is "1", but because the left word line WLL1 is at low level and is in an off state, the left bit line BL0 is not discharged , SA outputs "1", but the state of the right word line WLR1 is opposite to that of the left word line WLL1, so the right word line WLR1 is at high level, and the transmission tube N3 is turned on. At this time, BLB0 discharges, and SA outputs "0". The result of the AND gate output is "0", so the stored data in the first column does not match the search data.

第二列存储的数据为“0011”,此时位线BL1、BLB1均不放电,两个SA输出均为“1”,经与门输出“1”,因此第二列与搜索数据匹配。The data stored in the second column is "0011". At this time, the bit lines BL1 and BLB1 are not discharged, and the two SA outputs are both "1", and "1" is output through the AND gate, so the second column matches the search data.

第三列存储的数据为“1011”,虽然第一行存储的数据“1”与搜索数据不匹配,但由于左字线WLL0为低电平,处于关断状态,因此左位线BL2不放电,SA输出“1”,但右字线WLR0与左字线WLL0状态相反,此时WLR0为高电平,传输管N3导通,右位线BLB2放电,SA输出“0”,两个SA的结果经与门输出后为“0”,因此第三列存储数据与搜索数据不匹配。The data stored in the third column is "1011", although the data "1" stored in the first row does not match the search data, but because the left word line WLL0 is low and in the off state, the left bit line BL2 is not discharged , SA outputs "1", but the state of the right word line WLR0 is opposite to that of the left word line WLL0. At this time, WLR0 is at high level, the transmission transistor N3 is turned on, the right bit line BLB2 is discharged, and SA outputs "0". The result is "0" after being output by the AND gate, so the stored data in the third column does not match the search data.

第四列存储的数据为“1101”,第一行、第二行以及第三行存储的数据与搜索数据均不相同,但由于第一行、第二行的左字线WLL0、WLL1为低电平,传输管N4未导通,不影响左位线BL3,第三行左字线WLL2为高电平,传输管N4导通,BL3放电,SA输出“0”,右字线WLR0、WLR1、WLR2与左字线WLL0、WLL1、WLL2相反,第一行和第二行的传输管N4导通,右位线BLB3放电,SA输出“0”,两个SA的结果经与门输出后为“0”,因此第四列存储数据与搜索数据不匹配。The data stored in the fourth column is "1101", and the data stored in the first row, the second row, and the third row are different from the search data, but because the left word lines WLL0 and WLL1 of the first row and the second row are low Level, transmission tube N4 is not turned on, does not affect the left bit line BL3, the third line left word line WLL2 is high level, transmission tube N4 is turned on, BL3 discharges, SA outputs "0", right word lines WLR0, WLR1 , WLR2 is opposite to the left word line WLL0, WLL1, WLL2, the transmission transistor N4 of the first row and the second row is turned on, the right bit line BLB3 is discharged, SA outputs "0", and the results of the two SAs are output by the AND gate. "0", so the fourth column store data does not match the search data.

最终可知晓只有第二列与搜索数据匹配。如图7中BCAM的仿真结果可知,当一列的四个单元数据均匹配时,左右位线BL、BLB均不进行放电从而保持高电平,则BL和BLB经过两个灵敏放大器和一个与门后输出高电平,表示搜索数据与待查找数据匹配;反之,当一列的四个单元中存在数据不匹配的单元时,左右位线BL、BLB定会存在其中的一条位线放电,则BL和BLB经过两个灵敏放大器和一个与门后输出低电平,表示搜索数据与待查找数据不匹配。Eventually it can be known that only the second column matches the search data. As can be seen from the simulation results of BCAM in Figure 7, when the four cell data in a column are all matched, the left and right bit lines BL and BLB are not discharged to maintain a high level, then BL and BLB pass through two sense amplifiers and an AND gate Then output a high level, indicating that the search data matches the data to be searched; on the contrary, when there are units with unmatched data in the four cells in a column, one of the left and right bit lines BL and BLB must be discharged, and then BL And BLB outputs low level after passing through two sensitive amplifiers and an AND gate, indicating that the search data does not match the data to be searched.

三、乘法运算3. Multiplication

左字线WLL和外部控制信号EN保持低电平,被乘数通过工作在右字线WLR上的不同电压表示,乘数存储于存储单元内部,其乘法输出结果通过右位线BLB上的放电量来表示。每个存储单元在每个计算阶段完成2bit×1bit乘法,2bit被乘数作用于右字线WLR,通过将被乘数转化为字线电压来实现,乘数作用于存储单元内部。The left word line WLL and the external control signal EN keep low level, the multiplicand is represented by different voltages working on the right word line WLR, the multiplier is stored inside the memory cell, and the multiplication output result is discharged through the right bit line BLB amount to express. Each storage unit completes 2bit×1bit multiplication in each calculation stage, and the 2bit multiplicand acts on the right word line WLR, which is realized by converting the multiplicand into a word line voltage, and the multiplier acts on the inside of the storage unit.

请参阅图8,以实现4bit×1bit二进制乘法为例来说明本实施例实现该功能的方式。要实现4bit×1bit二进制乘法运算,只需两个实现2bit×1bit二进制乘法运算的单元通过一条位线放电。Referring to FIG. 8 , the method of realizing this function in this embodiment is described by taking the realization of 4bit×1bit binary multiplication as an example. To realize 4bit×1bit binary multiplication operation, only two units that realize 2bit×1bit binary multiplication operation need to be discharged through a bit line.

首先,设定为单个存储单元能够实现2bit被乘数与1bit乘数的二进制乘法,2bit被乘数即“00”、“01”、“10”、“11”,分别对应于四个WLR的电压0、VWLR1、VWLR2、VWLR3,右字线的不同电压作用于NMOS晶体管N3的栅极,相同时间下,不同的栅压控制NMOS的导通程度不同,流经的电流也不同,以此来区分不同加权的被乘数,二进制乘数为“0”和“1”,存储于存储单元内部节点Q中。首先对位线BLB进行预充,当二进制乘数为“0”时,无论晶体管N3的栅压为多少,位线BLB上的放电量始终为零,当二进制乘数为“1”时,控制NMOS晶体管N1导通,此时位线BLB的放电量取决于控制晶体管N3的栅压大小,以此达到区分2bit×1bit二进制乘法运算结果的目的。First, set a single storage unit to realize the binary multiplication of 2-bit multiplicand and 1-bit multiplier. The 2-bit multiplicands are "00", "01", "10", and "11", which correspond to the four WLRs respectively. Voltage 0, V WLR1 , V WLR2 , V WLR3 , different voltages of the right word line act on the gate of the NMOS transistor N3, at the same time, different gate voltages control the conduction degree of the NMOS to be different, and the current flowing through it is also different. In this way, different weighted multiplicands are distinguished, and the binary multipliers are "0" and "1", which are stored in the internal node Q of the storage unit. First, precharge the bit line BLB. When the binary multiplier is "0", no matter how much the gate voltage of the transistor N3 is, the discharge amount on the bit line BLB is always zero. When the binary multiplier is "1", the control The NMOS transistor N1 is turned on, and the discharge amount of the bit line BLB at this time depends on the magnitude of the gate voltage of the control transistor N3, so as to achieve the purpose of distinguishing 2bit×1bit binary multiplication results.

实现2bit×1bit二进制乘法运算的真值表如下表所示,其中X代表任意2bit数据及其对应的字线电压。The truth table for realizing 2bit×1bit binary multiplication operation is shown in the following table, where X represents any 2bit data and its corresponding word line voltage.

表3:2bit×1bit二进制乘法运算结果真值表Table 3: 2bit×1bit binary multiplication result truth table

Figure BDA0003966162510000121
Figure BDA0003966162510000121

两个实现2bit×1bit二进制乘法运算的单元通过一条位线放电实现4bit×1bit二进制乘法运算,高2bit与低2bit的区分可通过晶体管尺寸加权技术、电容阵列加权技术、脉冲个数/高度/宽度加权技术等技术来实现。在本阐述中,选择采用脉冲宽度调制技术来举例,其他技术与脉冲宽度调制技术操作方式类似,将位线BLB预充到高电平,根据不同的被乘数与乘数得到不同的加权电流。Two units that realize 2bit×1bit binary multiplication operation realize 4bit×1bit binary multiplication through a bit line discharge, and the distinction between high 2bit and low 2bit can be achieved through transistor size weighting technology, capacitor array weighting technology, pulse number/height/width Weighting technology and other technologies to achieve. In this explanation, pulse width modulation technology is chosen as an example. Other technologies are similar to pulse width modulation technology. The bit line BLB is precharged to a high level, and different weighted currents are obtained according to different multiplicands and multipliers. .

实现4bit×1bit二进制乘法运算的真值表如下表所示,其中X代表任意4bit数据。The truth table for realizing 4bit×1bit binary multiplication operation is shown in the following table, where X represents any 4bit data.

表4:4bit×1bit二进制乘法运算结果真值表Table 4: 4bit×1bit binary multiplication result truth table

Figure BDA0003966162510000131
Figure BDA0003966162510000131

图9为4bit×1bit二进制乘法运算结果的示意图,在位线BLB上外接计算电容,将加权电流转化为加权电压,通过ADC进行模数转换,进而得到表征4bit×1bit二进制乘法运算结果的二进制数。因此本实施例的存内计算电路在执行乘法运算时可以得到4bit×1bit二进制乘法运算的16个乘法结果。Figure 9 is a schematic diagram of the result of the 4bit×1bit binary multiplication operation. A calculation capacitor is externally connected to the bit line BLB to convert the weighted current into a weighted voltage, and perform analog-to-digital conversion through the ADC to obtain a binary number representing the result of the 4bit×1bit binary multiplication operation. . Therefore, the in-memory computing circuit of this embodiment can obtain 16 multiplication results of 4bit×1bit binary multiplication operations when performing multiplication operations.

本发明实现区分乘法结果的方式是通过位线不同放电量来判别,位线不同放电量之间的线性度好坏可以通过位线电压变化量和积分非线性度(INL:Integralnonlinearity)来衡量,图10为测得的INL值,由图9可知,线性度在乘法结果为9时最差,此时INL值为0.62LSB,但INL值依旧较小,线性度较好。因此本实施例能够有效实现4bit×1bit二进制乘法运算。The method of the present invention to distinguish the multiplication results is to distinguish the different discharge amounts of the bit lines, and the linearity between the different discharge amounts of the bit lines can be measured by the change of the bit line voltage and the integral nonlinearity (INL: Integralnonlinearity). Figure 10 shows the measured INL value. It can be seen from Figure 9 that the linearity is the worst when the multiplication result is 9. At this time, the INL value is 0.62LSB, but the INL value is still small and the linearity is better. Therefore, this embodiment can effectively implement a 4bit×1bit binary multiplication operation.

综上,本实施例的存内计算电路不仅具有实施例1相同的效果,同时在实施例1的基础上构成的阵列中,可以进行全阵列的运算。此外还可以进行简单的布尔逻辑运算,BCAM寻址运算以及4bit×1bit二进制乘法运算方式,满足多种方式的运算。To sum up, the in-memory calculation circuit of this embodiment not only has the same effect as that of Embodiment 1, but also can perform operations on the entire array in the array formed on the basis of Embodiment 1. In addition, simple Boolean logic operations, BCAM addressing operations, and 4bit×1bit binary multiplication operations can be performed to meet various operations.

实施例3Example 3

本实施例介绍了一种存储芯片,采用前述的存储电路封装而成。存储芯片的引脚包括:接地引脚,其与PMOS管P1、P2的源极相连;电源引脚,其与NMOS管N1、N2的源极相连;第一引脚,其与NMOS管N4的源极相连;第二引脚,其与NMOS管N3的源极相连;第三引脚,其与NMOS管N4的栅极相连;第四引脚,其与NMOS管N3的栅极相连。This embodiment introduces a memory chip, which is packaged by the aforementioned memory circuit. The pins of the memory chip include: a ground pin, which is connected to the sources of the PMOS transistors P1 and P2; a power pin, which is connected to the sources of the NMOS transistors N1 and N2; a first pin, which is connected to the source electrodes of the NMOS transistor N4 The source is connected; the second pin is connected with the source of the NMOS transistor N3; the third pin is connected with the gate of the NMOS transistor N4; the fourth pin is connected with the gate of the NMOS transistor N3.

将存储电路封装成芯片的模式,更易于本领域技术人员的使用,也利于存储电路的推广和使用。The mode of packaging the storage circuit into a chip is easier for those skilled in the art to use, and is also conducive to the promotion and use of the storage circuit.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.

以上实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above examples only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it should not be construed as limiting the scope of the patent for the invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.

Claims (10)

1.一种存储电路,其特征在于,其包括NMOS管N1~N5以及PMOS管P0~P1;其中,N1~N4和P0~P1构成6T-SRAM单元,N5连接在所述6T-SRAM单元任意一个存储节点对应的两个MOS管之间,且N5的栅极受控制信号线EN控制;所述存储电路的具体连接方式如下:1. A storage circuit, characterized in that it comprises NMOS transistors N1~N5 and PMOS transistors P0~P1; wherein, N1~N4 and P0~P1 form a 6T-SRAM unit, and N5 is connected to any of the 6T-SRAM units Between two MOS transistors corresponding to a storage node, and the gate of N5 is controlled by the control signal line EN; the specific connection method of the storage circuit is as follows: N1的栅极与N2的漏极、N4的漏极、P1的栅极电连接;N1的漏极与N3的漏极、N5的源极电连接;N1的源极与N2的源极接GND;P2的栅极与P1的漏极、N2的栅极、N5的漏极电连接;P2的漏极与N1的栅极、N2的漏极、N4的漏极、P1的栅极电连接;P1的源极与P2的源极接VDD;N3的栅极接右字线WLR,N4的栅极接左字线WLL,N5的栅极与外部控制信号线EN电连接;N3的源极接位线BLB,N4的源极接位线BL;The gate of N1 is electrically connected to the drain of N2, the drain of N4, and the gate of P1; the drain of N1 is electrically connected to the drain of N3 and the source of N5; the source of N1 is connected to the source of N2 to GND The gate of P2 is electrically connected to the drain of P1, the gate of N2, and the drain of N5; the drain of P2 is electrically connected to the gate of N1, the drain of N2, the drain of N4, and the gate of P1; The source of P1 and P2 are connected to VDD; the gate of N3 is connected to the right word line WLR, the gate of N4 is connected to the left word line WLL, the gate of N5 is electrically connected to the external control signal line EN; the source of N3 is connected to Bit line BLB, the source of N4 is connected to bit line BL; 其中,P2和N2构成反相器,N3、N4构成所述存储电路的传输管;存储节点Q通过N4与位线BL相连,存储节点QB通过N5、N3与位线BLB相连。Wherein, P2 and N2 form an inverter, N3 and N4 form transmission tubes of the storage circuit; the storage node Q is connected to the bit line BL through N4, and the storage node QB is connected to the bit line BLB through N5 and N3. 2.根据权利要求1所述的存储电路,其特征在于,所述存储电路实现SRAM模式包括保持操作、写操作和读操作;所述存储电路执行保持操作时,控制信号线EN保持高电平,左字线WLL、右字线WLR保持低电平,P1、P2、N1、N2、N5构成的锁存结构对存储节点Q、QB的存储数据进行锁存;所述存储电路执行写操作时,控制信号线EN保持高电平,左字线WLL、右字线WLR被拉为高电平,同时将需要写入的数据加载到位线上;所述存储电路执行读操作时,位线BLB预充至高电平,控制信号线EN为低电平,左字线WLL被拉低,右字线WLR保持高电平,经过灵敏放大器SA读取结果。2. The storage circuit according to claim 1, wherein the implementation of the SRAM mode by the storage circuit includes a hold operation, a write operation and a read operation; when the storage circuit performs a hold operation, the control signal line EN maintains a high level , the left word line WLL and the right word line WLR maintain a low level, and the latch structure formed by P1, P2, N1, N2, and N5 latches the stored data of the storage nodes Q and QB; when the storage circuit performs a write operation , the control signal line EN maintains a high level, the left word line WLL and the right word line WLR are pulled to a high level, and at the same time, the data to be written is loaded onto the bit line; when the storage circuit performs a read operation, the bit line BLB Precharge to high level, the control signal line EN is low level, the left word line WLL is pulled low, the right word line WLR remains high level, and the result is read through the sense amplifier SA. 3.一种具有BCAM寻址和逻辑运算功能的存内计算电路,其由多个相同的存储单元构成N×M的阵列形式;其中,N为存储单元的行数,M为存储单元的列数;每行存储单元共享左字线WLL、右字线WLR;每列存储单元共享位线BL、BLB;3. A calculation circuit in memory with BCAM addressing and logical operation functions, which is composed of a plurality of identical memory cells in the form of an N×M array; wherein, N is the number of rows of memory cells, and M is the column of memory cells number; each row of memory cells shares the left word line WLL and the right word line WLR; each column of memory cells shares the bit lines BL and BLB; 其特征在于,所述存储单元采用如权利要求1-2中任意一项所述的存储电路的电路结构,并实现该电路结构的完整功能。It is characterized in that the storage unit adopts the circuit structure of the storage circuit according to any one of claims 1-2, and realizes the complete functions of the circuit structure. 4.根据权利要求3所述的具有BCAM寻址和逻辑运算功能的存内计算电路,其特征在于,所有位线BL、BLB与灵敏放大器一一对应连接;每列存储单元中位线BL或BLB分别作为一个灵敏放大器的一路输入,灵敏放大器的另一路输入参考电压;当BL或BLB的电平高于参考电压,则灵敏放大器输出高电平,否则输出低电平。4. the computing circuit with BCAM addressing and logical operation function according to claim 3, is characterized in that all bit lines BL, BLB are connected with sense amplifiers in one-to-one correspondence; bit line BL or BLB is used as one input of a sense amplifier, and the other input reference voltage of the sense amplifier; when the level of BL or BLB is higher than the reference voltage, the sense amplifier outputs a high level, otherwise it outputs a low level. 5.根据权利要求3所述的具有BCAM寻址和逻辑运算功能的存内计算电路,其特征在于,每列存储单元的位线BL、BLB通过单端灵敏放大器连接在一个与门上;两个单端灵敏放大器的输出端分别作为一个与门的两路输入;当两个灵敏放大器的输出均为高电平,则与门输出高电平,否则输出低电平。5. the calculation circuit in memory with BCAM addressing and logic operation function according to claim 3, is characterized in that, the bit line BL, BLB of every column memory unit is connected on an AND gate by single-ended sense amplifier; The output terminals of the two single-ended sense amplifiers are respectively used as two-way inputs of an AND gate; when the outputs of the two sense amplifiers are both high level, the AND gate outputs high level, otherwise it outputs low level. 6.根据权利要求4或5所述的具有BCAM寻址和逻辑运算功能的存内计算电路,其特征在于,所述存内计算电路执行存内布尔逻辑运算时,位线BLB上连接的灵敏放大器输出端作为执行该运算的结果输出端;所述存内计算电路执行BCAM运算时,与门输出端作为执行该运算的结果输出端;所述存内计算电路执行乘法运算时,位线BLB的放电量为乘法运算的结果。6. according to claim 4 or 5 described computing circuit with BCAM addressing and logic operation function in the storage, it is characterized in that, when the calculation circuit in the storage carries out the boolean logic operation in the storage, the sensitivity connected on the bit line BLB The output terminal of the amplifier is used as the output terminal of the result of performing the operation; when the calculation circuit in the memory performs the BCAM operation, the output terminal of the AND gate is used as the output terminal of the result of performing the operation; when the calculation circuit in the storage performs the multiplication operation, the bit line BLB The discharge capacity is the result of multiplication. 7.根据权利要求6所述的具有BCAM寻址和逻辑运算功能的存内计算电路,其特征在于,所述存内计算电路实现存内布尔逻辑运算的方式如下:7. the calculation circuit with BCAM addressing and logic operation function in the memory according to claim 6, is characterized in that, the mode that the calculation circuit in the memory realizes the Boolean logic operation in the memory is as follows: 将同一列存储单元的左字线WLL及控制信号线EN保持低电平,将所需参与存内布尔逻辑运算的存储单元的右字线WLR置为高电平,其余字线置为低电平;经灵敏放大器将位线BLB上的电压与一个参考电压比较后输出相应的存内布尔逻辑运算结果。Keep the left word line WLL and the control signal line EN of the same column of memory cells at low level, set the right word line WLR of the memory cells that need to participate in the Boolean logic operation in the memory to high level, and set the other word lines to low level level; the sense amplifier compares the voltage on the bit line BLB with a reference voltage and outputs the corresponding in-memory Boolean logic operation result. 8.根据权利要求6所述的具有BCAM寻址和逻辑运算功能的存内计算电路,其特征在于,所述存内计算电路实现BCAM运算的方式如下:8. the calculation circuit with BCAM addressing and logic operation function in the storage according to claim 6, is characterized in that, the mode that the calculation circuit in the storage realizes BCAM operation is as follows: 将同一列存储单元的控制信号线EN保持低电平;将搜索数据对应的电压信号和其相反信号分别通过左字线WLL、右字线WLR输入至预存有待查找数据的存储单元;经两个单端灵敏放大器输及一个与门将表征运算结果的位线BL、BLB的电压信号输出;与门的输出端输出高电平,表示搜索数据与待查找数据匹配;与门的输出端输出低电平,表示搜索数据与待查找数据不匹配。Keep the control signal line EN of the memory cell in the same column at low level; input the voltage signal corresponding to the search data and its opposite signal to the memory cell pre-stored with the data to be searched through the left word line WLL and the right word line WLR respectively; A single-ended sense amplifier input and an AND gate will output the voltage signal of the bit line BL and BLB representing the operation result; the output terminal of the AND gate outputs a high level, indicating that the search data matches the data to be searched; the output terminal of the AND gate outputs a low voltage Ping, indicating that the search data does not match the data to be found. 9.根据权利要求6所述的具有BCAM寻址和逻辑运算功能的存内计算电路,其特征在于,所述存内计算电路实现乘法运算的方式如下:9. the calculation circuit with BCAM addressing and logic operation function in the storage according to claim 6, is characterized in that, the mode that the calculation circuit in the storage realizes multiplication is as follows: 将同一列存储单元的控制信号线EN、左字线WLL保持低电平,将被乘数对应的电压信号通过右字线WLR输入至预存有乘数的存储单元,根据位线BLB的放电量得到所需乘法结果。Keep the control signal line EN and the left word line WLL of the same column of memory cells at low level, and input the voltage signal corresponding to the multiplicand to the memory cell pre-stored with the multiplier through the right word line WLR, according to the discharge capacity of the bit line BLB to get the desired multiplication result. 10.一种存储芯片,其特征在于,其采用如权利要求1-2中任意一项所述的存储电路封装而成;所述存储芯片的引脚包括:10. A memory chip, characterized in that it is packaged by the memory circuit according to any one of claims 1-2; the pins of the memory chip include: 接地引脚,其与PMOS管P1、P2的源极相连;A ground pin, which is connected to the sources of the PMOS transistors P1 and P2; 电源引脚,其与NMOS管N1、N2的源极相连;Power supply pins, which are connected to the sources of NMOS transistors N1 and N2; 第一引脚,其与NMOS管N4的源极相连;The first pin is connected to the source of the NMOS transistor N4; 第二引脚,其与NMOS管N3的源极相连;The second pin is connected to the source of the NMOS transistor N3; 第三引脚,其与NMOS管N4的栅极相连;The third pin is connected to the gate of the NMOS transistor N4; 第四引脚,其与NMOS管N3的栅极相连。The fourth pin is connected to the gate of the NMOS transistor N3.
CN202211499158.9A 2022-11-28 2022-11-28 Memory circuit and memory computing circuit with BCAM addressing and logic operation functions Pending CN115810374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211499158.9A CN115810374A (en) 2022-11-28 2022-11-28 Memory circuit and memory computing circuit with BCAM addressing and logic operation functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211499158.9A CN115810374A (en) 2022-11-28 2022-11-28 Memory circuit and memory computing circuit with BCAM addressing and logic operation functions

Publications (1)

Publication Number Publication Date
CN115810374A true CN115810374A (en) 2023-03-17

Family

ID=85484283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211499158.9A Pending CN115810374A (en) 2022-11-28 2022-11-28 Memory circuit and memory computing circuit with BCAM addressing and logic operation functions

Country Status (1)

Country Link
CN (1) CN115810374A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116913342A (en) * 2023-09-13 2023-10-20 安徽大学 Memory circuit with in-memory Boolean logic operation function, and module and chip thereof
CN117608519A (en) * 2024-01-24 2024-02-27 安徽大学 Signed multiplication and multiply-accumulate operation circuit based on 10T-SRAM
CN117708042A (en) * 2023-12-28 2024-03-15 中科南京智能技术研究院 A unilaterally controlled in-memory computing circuit and memory
CN117746933A (en) * 2023-12-29 2024-03-22 中科南京智能技术研究院 In-memory computing circuit, control method, computing chip and memory
US12112797B1 (en) * 2023-06-13 2024-10-08 Shanghai Jiao Tong University Cross-layer reconfigurable static random access memory (SRAM) based compute-in-memory macro and method for edge intelligence

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12112797B1 (en) * 2023-06-13 2024-10-08 Shanghai Jiao Tong University Cross-layer reconfigurable static random access memory (SRAM) based compute-in-memory macro and method for edge intelligence
CN116913342A (en) * 2023-09-13 2023-10-20 安徽大学 Memory circuit with in-memory Boolean logic operation function, and module and chip thereof
CN116913342B (en) * 2023-09-13 2023-12-01 安徽大学 Storage circuit with in-memory Boolean logic operation function and its modules and chips
CN117708042A (en) * 2023-12-28 2024-03-15 中科南京智能技术研究院 A unilaterally controlled in-memory computing circuit and memory
CN117708042B (en) * 2023-12-28 2024-11-26 中科南京智能技术研究院 A unilaterally controlled in-memory computing circuit and memory
CN117746933A (en) * 2023-12-29 2024-03-22 中科南京智能技术研究院 In-memory computing circuit, control method, computing chip and memory
CN117746933B (en) * 2023-12-29 2024-09-24 中科南京智能技术研究院 In-memory computing circuit, control method, computing chip and memory
CN117608519A (en) * 2024-01-24 2024-02-27 安徽大学 Signed multiplication and multiply-accumulate operation circuit based on 10T-SRAM
CN117608519B (en) * 2024-01-24 2024-04-05 安徽大学 Signed multiplication and multiplication-accumulation circuit based on 10T-SRAM

Similar Documents

Publication Publication Date Title
CN115810374A (en) Memory circuit and memory computing circuit with BCAM addressing and logic operation functions
CN110058839B (en) Circuit structure based on static random access memory internal subtraction method
US7609541B2 (en) Memory cells with lower power consumption during a write operation
CN101154442A (en) Static random access memory macro and dual port static random access memory device
CN103544986B (en) Based on electric charge recycling and the low-power consumption 8 pipe sram chip method for designing of bit line classification
CN110176264B (en) A High-Low-Bit Combining Circuit Structure Based on In-Memory Computing
CN112558919A (en) Memory computing bit unit and memory computing device
CN115588446A (en) A storage operation circuit, an in-memory calculation circuit and a chip thereof
CN111816233A (en) An in-memory computing unit and array
CN110767251B (en) 11T TFET SRAM unit circuit structure with low power consumption and high write margin
CN116364137A (en) An 8T unit with double bit lines on the same side, a logic operation circuit and a CIM chip
CN114360595A (en) Subtraction calculation circuit structure based on row and column bi-direction in 8T SRAM memory
CN116206650A (en) 8T-SRAM unit and operation circuit and chip based on 8T-SRAM unit
CN117079688A (en) A current domain 8TSRAM unit and dynamic adaptive quantization storage and calculation circuit
Rajput et al. Energy efficient 9T SRAM with R/W margin enhanced for beyond Von-Neumann computation
CN115938430A (en) A memory accumulative calculation circuit based on branch current
Gupta et al. Exploration of 9T SRAM cell for in memory computing application
CN114038492B (en) A multi-phase sampling memory calculation circuit
CN114446350A (en) A row-column Boolean operation circuit for in-memory computing
CN118312468B (en) In-memory operation circuit with symbol multiplication and CIM chip
CN112233712B (en) A 6T SRAM storage device, storage system and storage method
CN111899775A (en) An SRAM memory cell circuit that can realize multiple logic functions and BCAM operations
CN116204490A (en) A 7T storage and calculation circuit and multiply-accumulate calculation circuit based on low-voltage technology
CN115831189A (en) The circuit structure and chip of in-memory Boolean logic and multiply-accumulate operation based on 9T-SRAM
CN115035931A (en) Circuit structure, chip and module based on 8T-SRAM unit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination