Content addressable storage device and content addressable storage controller
By designing content addressable storage devices and controllers in memory, using the combination of address registers, counter circuits and address comparison circuits, the accurate counting of each address information in the memory is achieved, and the accurate counting of the existing technology is solved. Problem, improving the reliability and security of the memory.
Patent Information
- Application Number
- CN202310755495.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2043-06-21
AI Technical Summary
At this stage, it is impossible to accurately count the address information in the memory, which affects the reliability and security of the memory, especially in the case of a row hammer attack.
A content addressable storage device and controller are designed to realize the accurate counting of the matching and mismatch of the input address and the storage address through the combination of N address registers, counter circuits and address comparison circuits, including when the input is input. The count value is increased when the address matches the storage address, the count value is reset or reduced when it does not match, and the address information is accurately counted when the address register is not full or full.
Accurate counting of each address information in the memory is realized, preventing the counting result from exceeding the range, improving the recognition accuracy of the row hammer attack address and the reliability of the memory, and reducing the impact of the noise address.
Smart Images

Figure CN119229928A_ABST
Abstract
Description
Background Art
[0002] In the development process of semiconductor technology, memories such as dynamic random access memory (DRAM) often involve various address information.
[0003] However, it is currently not possible to count address information.
[0004] Therefore, how to accurately count each address information in the memory has become a technical problem that needs to be solved urgently.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The present disclosure provides a content addressable storage device and a content addressable storage controller, which at least to a certain extent overcome the problem in the related art that it is impossible to accurately count each address information in the memory.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to one aspect of the present disclosure, there is provided a content addressable storage device, comprising:
[0009] N address registers, each used to store different address information, where N is an arbitrary positive integer;
[0010] N counter circuits correspond to the N address registers one by one and are respectively used to store the count values of the corresponding address registers;
[0011] N address comparison circuits correspond to N address registers one by one, and each address comparison circuit is used to match the input address with the address information stored in its corresponding address register;
[0012] When the input address matches the address information stored in one of the address registers, the count value of the counter circuit corresponding to the address register increases;
[0013] When the input address does not match the address information stored in the N address registers, and the N address registers all store address information, the first counter circuit and its corresponding first address register are reset, the first address register stores the input address, the first counter circuit increases its count value, and other unreset counter circuits decrease their count values, wherein the first counter circuit is a counter to be reset determined among the N counter circuits based on the count value;
[0014] When the input address does not match the address information stored in the N address registers and there is a second address register, the input address is stored in the second address register and the count value of the corresponding second counter circuit is increased. The second address register is an address register among the N address registers that does not store address information.
[0015] In one embodiment, when the input address does not match the address information stored in the N address registers and the N address registers all store address information, the target counter circuit whose count value is less than or equal to the preset number threshold is the first counter circuit, wherein the resetting of the first address register corresponding to the target counter circuit is used to clear the stored noise address;
[0016] When the input address does not match the address information stored in the N address registers, the N address registers all store address information, and there is no target counter circuit, one of the counter circuits with the smallest count value is used as the first counter circuit.
[0017] In one embodiment, the count value is M-bit binary data, the i-th counter circuit includes M-level counting units, wherein the j-th level counting unit is used to record the j-th bit of the M-bit binary data, i is any positive integer less than or equal to N, M is any positive integer, and j is any positive integer less than or equal to M;
[0018] When increasing the count value of the i-th counter circuit, the M-level counting unit is used to add 1 to the original count value to obtain the increased count value;
[0019] And, when reducing the count value of the i-th counter circuit, the M-stage counting unit is used to store the reduced count value obtained by reducing the original count value by 1.
[0020] In one embodiment, the j-th stage counting unit includes a j-th stage DFF flip-flop among M stages of DFF flip-flops.
[0021] wherein the inverting output terminal of the j-th level DFF trigger is connected to the trigger terminal of the j+1-th level DFF trigger, the j-th level DFF trigger is used to switch the recorded data between 0 and 1 according to the received trigger signal, and when the recorded data is switched from 1 to 0, send a trigger signal to the j+1-th level DFF trigger, wherein the trigger terminal of the first level DFF trigger is connected to the output terminal of the i-th address comparison circuit, and is used to switch between 0 and 1 when the i-th address comparison circuit outputs a first counting signal, wherein the i-th address comparison circuit outputs the first counting signal when the input address matches the address information stored in the i-th address register;
[0022] And, the j-th level DFF trigger includes a reset terminal and a set terminal, and the j-th level DFF trigger is further used to: receive the j-th bit of the first reset signal through the reset terminal, and receive the j-th bit of the first set signal through the set terminal, and adjust the recorded data to the j-th bit binary data of the reduced count value according to the j-th bit of the first reset signal and the j-th bit of the first set signal,
[0023] The first reset signal and the first set signal are generated by the content addressable storage controller and are used to adjust the numerical value stored in the M-level counting unit to the reduced counting value.
[0024] In one embodiment, the device further includes N status query circuits, and the N status query circuits correspond one-to-one to the N address registers.
[0025] Among them, the i-th state query circuit is used to output a first state signal representing that the i-th address register is in a storage state when the i-th address register stores address information; and to output a second state signal representing that the i-th address register is in an idle state when the i-th address register does not store address information.
[0026] In one embodiment, the first state signal includes: a first level signal of an idle state bit and / or a second level signal of a storage state bit;
[0027] The second state signal includes: a third level signal of an idle state bit and / or a fourth level signal of a storage state bit.
[0028] In one embodiment, the i-th state query circuit includes an SR trigger and a NOT gate unit.
[0029] The set input terminal of the SR trigger is used to receive the second set signal, the reset input terminal of the SR trigger is used to receive the second reset signal, and the output terminal of the SR trigger is used to output the level signal of the idle state bit.
[0030] The input end of the NOT gate unit is connected to the output end of the SR trigger, and the output end of the NOT gate unit is used to output the level signal of the storage status bit.
[0031] Among them, when the i-th address register stores address information, the i-th SR trigger receives a second set signal corresponding to a first level state, so that the i-th SR trigger outputs a first level signal of an idle state bit; and, when the i-th address register does not store address information, the i-th SR trigger receives a second reset signal corresponding to a second level state, so that the i-th SR trigger outputs a third level signal of the idle state bit.
[0032] In one embodiment, the input address includes a P bit,
[0033] Wherein, the i-th address comparison circuit comprises:
[0034] P address comparison units, wherein the kth address comparison unit is used to output a first level signal when the kth bit of the address information stored in the ith address register is the same as the kth bit of the input address; wherein P is any positive integer, and k is any positive integer less than or equal to P;
[0035] A signal processing unit is connected to the P address comparison units and is used to generate a first counting signal when receiving the first level signals output by each of the P address comparison units. The first counting signal is used to indicate that the input address matches the address information stored in the i-th address register.
[0036] In one embodiment, the input address is a row address of an access physical row sent by a chip controller;
[0037] Each address register includes a first input terminal and a first output terminal, the first input terminal is connected to the chip controller and is used to obtain a row address; the first output terminal is used to output the stored address information;
[0038] Each address comparison circuit includes a second input terminal, a third input terminal and a second output terminal, wherein the second input terminal is connected to the chip controller and is used to obtain a row address for accessing a physical row; the third input terminal is connected to a first output terminal of an address register corresponding thereto; the second output terminal is connected to a fourth input terminal of a counter circuit corresponding thereto and is used to provide a first counting signal to the fourth input terminal when the row address matches the address information stored in the address register corresponding thereto;
[0039] Each counter circuit includes a fourth input terminal and a fifth output terminal. The fifth output terminal is connected to the row hammer attack controller and is used to provide the count value stored in the counter circuit to the row hammer attack controller, so that the row hammer attack controller recognizes the address information stored in the address register corresponding to the counter circuit as the row hammer attack address when the count value is greater than or equal to a preset row hammer threshold.
[0040] According to another aspect of the present disclosure, a content addressable storage controller is provided, which is used to control the above-mentioned content addressable storage device, including:
[0041] a count value processing circuit connected to the output ends of the N counter circuits, for obtaining count values of the N address registers; and when the input address does not match the address information stored in the N address registers, and the N address registers all store address information, determining the first address register according to the count values of the N address registers;
[0042] The control circuit is used for resetting the first counter circuit, updating the count value of the reset first counter circuit, and controlling other unreset counter circuits to reduce their count values.
[0043] The content addressable storage device and content addressable storage controller provided by the embodiments of the present disclosure, for any counter circuit, the address counting module can increase the count value of the address counting circuit when the corresponding address comparison circuit determines that the input address matches the stored address information, so as to realize the correct counting of the input address stored in the address register. Also, when all address registers store address information and the input address does not match the stored address information, the first address register to be reset can be determined in the N address registers, the count value of the counter circuit corresponding to the first address register is reset and re-counted, and the count value of other unreset counter circuits is reduced, thereby ensuring the counting accuracy while avoiding the influence of the counting result of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy. Also, since the second address register is an address register that does not store address information, when the input address does not match the stored address information and there is an idle second address register, the input address can be stored in the second address register to accurately count the newly appeared input address. Accordingly, the technical solution provided by the embodiment of the present disclosure can accurately count the input addresses stored in the address registers and the new input addresses not stored in the address registers when the N address registers are not full of addresses. Moreover, when the N address registers are full of addresses, the technical solution can ensure the counting accuracy while avoiding the influence of the counting results of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy, thereby realizing accurate counting of each address information in the memory.
[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0046] Figure 1 A system architecture diagram of a CAM storage system provided by an embodiment of the present disclosure is shown;
[0047] Figure 2A schematic diagram of the structure of a CAM storage device provided by an embodiment of the present disclosure is shown;
[0048] Figure 3 A schematic diagram of the structure of an exemplary address register provided by an embodiment of the present disclosure is shown;
[0049] Figure 4 A schematic structural diagram of an exemplary counter circuit provided by an embodiment of the present disclosure is shown;
[0050] Figure 5 A schematic diagram of the structure of an address comparison circuit provided by an embodiment of the present disclosure is shown;
[0051] Figure 6 A schematic diagram showing the structure of an exemplary address comparison circuit provided by an embodiment of the present disclosure is shown;
[0052] Figure 7 A schematic diagram showing the structure of another exemplary address comparison circuit provided by an embodiment of the present disclosure is shown;
[0053] Figure 8 A counting logic diagram of an exemplary CAM storage device provided by an embodiment of the present disclosure is shown;
[0054] Fig. 9 Another exemplary counting logic diagram of a CAM storage device provided by an embodiment of the present disclosure is shown;
[0055] Fig.10 A counting logic schematic diagram of another exemplary CAM storage device provided by an embodiment of the present disclosure is shown;
[0056] Fig.11 A counting logic schematic diagram of another exemplary CAM storage device provided by an embodiment of the present disclosure is shown;
[0057] Fig.12 A schematic diagram showing the structure of another CAM storage device provided by an embodiment of the present disclosure is shown;
[0058] Fig.13 A counting logic diagram of an exemplary CAM storage device provided by an embodiment of the present disclosure is shown;
[0059] Fig.14 A schematic diagram showing the structure of another exemplary state query circuit provided by an embodiment of the present disclosure is shown;
[0060] Fig.15 A counting logic schematic diagram of another exemplary CAM storage device provided by an embodiment of the present disclosure is shown;
[0061] Fig.16A schematic diagram showing the structure of an exemplary CAM storage device provided by an embodiment of the present disclosure is shown;
[0062] Fig.17 A schematic diagram of the structure of a CAM storage controller provided by an embodiment of the present disclosure is shown;
[0063] Fig.18 A schematic diagram of a flow chart of an address counting method provided by an embodiment of the present disclosure is shown;
[0064] Fig.19 A schematic flow chart of an exemplary address counting method provided by an embodiment of the present disclosure is shown;
[0065] Fig. 20 A flow chart of an address counting control method provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0066] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0067] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0068] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0069] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0070] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0071] In various scenarios in the field of semiconductor technology, it is often necessary to use the count value of address information to solve problems in various scenarios.
[0072] Taking the row hammer attack scenario as an example, over the past few decades, with the evolution of memory processes such as DRAM, the chip size of memories such as DRAM has gradually shrunk to reduce manufacturing costs. However, the threat posed by chip size to chip reliability is mainly reflected in the following two aspects. First, as the capacitor size of the memory cell decreases, the noise margin of the memory cell gradually decreases. Second, as the distance between adjacent memory cells gradually decreases, the memory cell becomes more susceptible to electromagnetic coupling and produces unpredictable field effects. Under the threats of the above two aspects, existing memory technology inevitably produces a new problem called the row hammer attack. Since the row hammer attack affects the reliability and security of memories such as DRAM, how to identify the row hammer attack address has become a technical problem that needs to be solved urgently.
[0073] The inventor has found through research that when the number of accesses to the row hammer attack address of the attack row reaches the row hammer threshold, data corruption will occur. Therefore, the number of accesses to each physical row can be counted, and the physical row with an access number greater than the row hammer threshold can be accurately identified as the attack row, and the physical address of the attack row can be identified as the row hammer attack address. In this solution, since the number of accesses to the physical row affects the recognition accuracy of the row hammer attack address, accordingly, how to accurately count the number of accesses to address information such as the physical row address becomes the key to accurately identifying the attack row.
[0074] In summary, a technical solution is needed that can accurately count address information in a memory.
[0075] Based on this, the embodiments of the present disclosure provide a content-addressable storage device and a content-addressable storage controller, which can be applied to the address information counting scenario. Optionally, it can be applied to the recognition scenario of the row hammer attack address. Through the embodiments of the present disclosure, when the N address registers are not full of addresses, the input addresses stored in the address registers and the new input addresses not stored in the address registers can be accurately counted, and when the N address registers are full of addresses, while ensuring the counting accuracy, it is possible to avoid the counting results of each counter circuit being too large and exceeding the counting range of the address counting module, thereby achieving accurate counting of each address information in the memory.
[0076] Before introducing the technical solutions provided by the embodiments of the present disclosure, in order to facilitate understanding, the technical terms involved in the embodiments of the present disclosure are first explained.
[0077] (1) Row Hammer attack, that is, when a physical row in the chip is frequently accessed, the capacitors in the adjacent rows may lose data due to excessive charge loss before the refresh signal arrives. Specifically, it refers to the frequent access of the attack row within a refresh window time, causing the charge loss of the storage cells in the adjacent victim row.
[0078] (2) Row hammer attack address, i.e., the physical address of the attack row. In the disclosed embodiment, the row address to be detected whose access times reach a preset row hammer threshold can be used as the row hammer attack address to refresh the attack row and victim row corresponding to the row hammer attack address.
[0079] (3) Content-addressable memory (CAM), a memory that is addressed by content, is a special type of random access memory (RAM). Its main working mechanism is to automatically and simultaneously compare an input data item with all the data items stored in the CAM, determine whether the input data item matches the data items stored in the CAM, and output the matching information corresponding to the data item.
[0080] After introducing the above technical terms, in order to facilitate overall understanding, before starting to introduce the technical solutions provided by the embodiments of the present disclosure, the CAM storage system involved in the embodiments of the present disclosure will be described below.
[0081] Figure 1 FIG. 2 shows a system architecture diagram of a CAM storage system provided by an embodiment of the present disclosure. Figure 1 As shown, the CAM storage system may include a CAM storage device 10 and a CAM storage controller 20 .
[0082] The CAM storage device 10 is used to store different input addresses and count the number of inputs of each input address. Figure 1 In order to count the address information in the chip, the CAM storage device 10 can be connected to the chip controller 30 so as to obtain the input address from the chip controller 30.
[0083] The CAM memory controller 20 is connected to the CAM memory device 10 and is used to control each counter circuit in the CAM memory device 10 to reduce its count value. Exemplarily, the CAM memory controller 20 is used to send the reduced count value to other counters that have not been reset, so that other counters that have not been reset are reset to the reduced count value, when all N address registers store address information and the input address does not match the address information stored in the N address registers.
[0084] Optionally, the embodiment of the present disclosure may also provide a row hammer attack control system, which may include the above-mentioned CAM storage system and a row hammer attack controller. The row hammer attack controller may be connected to the CAM storage device 10, and the row hammer attack controller may be connected to the CAM storage controller 20. Exemplarily, the row hammer attack controller may obtain the number of accesses to each physical row from the CAM storage device 10, and identify the physical row address whose number of accesses is greater than or equal to a preset row hammer threshold as a row hammer attack address.
[0085] After introducing the CAM storage system provided by the embodiment of the present disclosure, the CAM storage device 10 and the CAM storage controller 20 are described one by one.
[0086] Figure 2 FIG. 2 shows a schematic diagram of the structure of a CAM storage device provided by an embodiment of the present disclosure. Figure 2 As shown, the CAM memory device 20 may include N address registers 111 to 11N, N counter circuits 121 to 12N, and N address comparison circuits 131 to 13N, wherein N is any positive integer.
[0087] The N address registers 111 to 11N are respectively used to store different address information. Exemplarily, each address register can store address information when it stores address information. And, when it does not store address information, it remains in an idle state. Exemplarily, the first address register can store address A1, the second address register can store address A2, ..., and the Nth address register can store address AN.
[0088] The address information may be an address that needs to be counted. Exemplarily, it may be an address in binary format. For example, it may include P bits of binary data. P may be any positive integer, such as 17. It should be noted that P may be set to other values according to the actual chip situation and specific chip requirements, and no specific limitation is imposed on this. In one embodiment, in order to accurately count the input address, the address information may be an input address input into the CAM storage device at a previous moment. In another embodiment, in order to accurately count a specific address, the address information may be a pre-set specific address.
[0089] In one embodiment, when the address information includes P bits, each address register may include P latches. The kth latch is used to store the kth bit of the address information. Each latch may be an edge trigger or a level trigger, which is not specifically limited. Exemplarily, when the rising edge of the clock signal arrives, each latch may store the data provided by the input terminal. And the latched data may be read through the output terminal of each latch.
[0090] In one example, Figure 3 FIG. 2 shows a schematic diagram of the structure of an exemplary address register provided by an embodiment of the present disclosure. Figure 3 As shown, the i-th address register 11i may include P latches L1 to LP. Wherein, i may be any positive integer less than or equal to N. For each latch, it may include an input terminal D, a clock signal input terminal CK, an output terminal Q, and an inverting output terminal / Q. In a specific example, each latch may include a P-type metal-oxide semiconductor field effect transistor (P Metal Oxide Semiconductor, PMOS) and / or an N-type metal-oxide semiconductor field effect transistor (NMetal Oxide Semiconductor, NMOS). For example, PMOS and / or NMOS with a smaller W / L (width-to-length ratio) (for example, less than a preset width-to-length ratio threshold, wherein the preset width-to-length ratio threshold can be set according to actual conditions or specific requirements) may be selected. It should be noted that, compared with a standard cell (StandCell), a latch composed of a PMOS and / or NMOS with a smaller W / L can save more area resources while ensuring functionality.
[0091] For example, when the clock signal at the clock signal input terminal CK is at a rising edge, each latch is triggered by the rising edge of the clock signal to output the data at the input terminal D to the output terminal Q. For the address information RA stored in the i-th address register 11i <p-1:0>, the input terminal D of latch L1 outputs the address information RA <p-1:0>1st RA <0> And output RA_CAM through the output terminal Q <0> , the input terminal D of latch L2 outputs the second bit RA <1> And output RA_CAM through the output terminal Q <1> , ..., the input terminal D of the latch LP outputs the Pth bit RA <p-1>And output RA_CAM through the output terminal Q <p-1>.
[0092] It should be noted that the address register may also be implemented as other circuits, functional modules or devices having address information storage functions, and there is no specific limitation on this.
[0093] In one embodiment, the output end of each address register is also connected to the address output end, so as to output the stored address information from the address output end. For example, the address information N*RA_CAM stored in the N address registers 111 to 11N can be output from the address output end.<P-1:0> , for example 6*RA_CAM<16:0>.
[0094] After introducing the address register, we will continue to explain the counter circuit.
[0095] For the N counter circuits 121 to 12N, they correspond one-to-one with the N address registers 111 to 11N, and are respectively used to store the count values of the corresponding address registers. Exemplarily, the first counter circuit 121 corresponds to the first address register 111. For example, the first counter circuit 121 is used to store the count value of the first address register 111; the second counter circuit 122 corresponds to the second address register 112, and the second counter circuit 122 is used to store the count value of the second address register 112; ...; the Nth counter circuit 12N corresponds to the Nth address register 11N, and the Nth counter circuit 12N is used to store the count value of the Nth address register 11N.
[0096] The count value of each address register can be used to represent the number of times the input address is the address information stored in the address register. In some embodiments, each count value can be M-bit binary data in binary format, that is, it can be a binary string RA_CNT composed of M data "1" or "0". <m-1:0>, M is any positive integer. Accordingly, the count value of each address register can be in the range of 0 to 2M-1.
[0097] In one example, in the counting scenario of the row hammer attack address, in order to accurately count the row hammer attack address and reduce the counter cost, M can be set to 6. For example, the count value can be expressed as RA_CNT<5:0>. It should be noted that the value of M can also be set to other values according to the specific counting scenario and specific counting requirements, and there is no limitation on this.
[0098] In some embodiments, when the count value includes M-bit binary data, the i-th counter circuit includes M-stage counting units, and i is any positive integer less than or equal to N. That is, any counter circuit may include M-stage counting units.
[0099] The j-th level counting unit in each counter circuit is used to record the j-th bit of M-bit binary data, where j is any positive integer less than or equal to M. Exemplarily, for each counter circuit, the first-level counting unit is used to record the first bit of the count value, the second-level counting unit is used to record the second bit of the count value; ...; the M-th level counting unit is used to record the M-th bit of the count value.
[0100] When increasing the count value of the i-th counter circuit, the M-level counting unit is used to add 1 to the original count value to obtain the increased count value. For example, if the original count value is "111000", the increased count value may be "111001".
[0101] And, when reducing the count value of the i-th counter circuit, the M-stage counting unit is used to store the reduced count value obtained by reducing the original count value by 1. Exemplarily, the reduced count value can be obtained by the CAM storage controller reducing the count value before reduction by 1. Exemplarily, if the original count value is "111000", the CAM storage controller can reduce it by 1 to obtain "110111", and store "110111" in the counter circuit.
[0102] Exemplarily, the jth level counting unit in the M-level counting unit is used to store the jth bit in the reduced count value. For example, if the reduced count value is "110111", the 1st-3rd, 5th-6th level counting units are used to store data "1", and the 4th level counting unit is used to store data "0".
[0103] Through the counter circuit provided in this embodiment, the M-bit binary data of the count value can be respectively stored through the M-level counting units of each counter circuit, and when the count value is increased, the original count value of the counter circuit can be added by 1, and when the count value is reduced, the original count value can be subtracted by 1 and then stored in the counter circuit. The address can be added and subtracted flexibly and accurately, thereby improving the accurate counting of address information.
[0104] In one example, the i-th counter circuit includes M-stage DFF triggers, and the j-th stage counting unit includes the j-th stage DFF trigger among the M-stage DFF triggers. Figure 4 FIG. 2 shows a schematic diagram of the structure of an exemplary counter circuit provided by an embodiment of the present disclosure. Figure 4 As shown, the i-th counter circuit 12i may include M-level DFF triggers D1 to DM. In a specific example, the DFF trigger may be composed of PMOS and / or NMOS. For example, PMOS and / or NMOS with a smaller W / L (width-to-length ratio) (for example, less than a preset width-to-length ratio threshold, where the preset width-to-length ratio threshold may be set according to actual conditions or specific requirements) may be selected. It should be noted that, compared with a standard cell (Stand Cell), a DFF trigger composed of a PMOS and / or NMOS with a smaller W / L can save more area resources while ensuring functionality.
[0105] Among them, the inverting output end of the j-th level DFF trigger is connected to the trigger end of the j+1-th level DFF trigger, and the j-th level DFF trigger is used to switch the recorded data between 0 and 1 according to the received trigger signal, and when the recorded data switches from 1 to 0, send a trigger signal to the j+1-th level DFF trigger, wherein the trigger end of the first-level DFF trigger is connected to the output end of the ith address comparison circuit, and is used to switch between 0 and 1 when the ith address comparison circuit outputs the first counting signal. Among them, the ith address comparison circuit outputs a first counting signal when the input address matches the address information stored in the ith address register. Exemplarily, the first counting signal can be set to a high-level signal or a low-level signal according to actual conditions and specific scenarios. For example, the first counting signal can be a high-level signal. In a specific example, continue to refer to Figure 4 , the trigger end of the first-level DFF trigger D1 is connected to the output end of the address comparison module 13i, and is used to receive the first counting signal match_bit (such as a high-level signal) output by the address comparison module 13i, and the first counting signal match_bit is used as the trigger signal of the first-level DFF trigger D1; the inverting output end / Q of the first-level DFF trigger D1 is connected to the trigger end of the second-level DFF trigger D2, and is used to send a trigger signal (such as a high-level signal) to the second-level DFF trigger; ...; the inverting output end / Q of the M-th-level DFF trigger DM is connected to the trigger end of the M-1-th-level DFF trigger DM-1. Among them, when each level of DFF trigger receives a trigger signal, the stored data can be switched from "0" to "1", or from "1" to "0". And, when the stored data is switched from "1" to "0", the inverting output end / Q of the DFF trigger of this level outputs a high-level signal as the trigger signal of the next level DFF trigger.
[0106] Furthermore, the value stored in the M-level counting unit can be adjusted to the reduced count value through the first reset signal and the first set signal generated by the content addressable storage controller. Accordingly, the j-th level DFF trigger includes a reset terminal and a set terminal, and the j-th level DFF trigger is also used to: receive the j-th bit of the first reset signal through the reset terminal, and receive the j-th bit of the first set signal through the set terminal, and adjust the recorded data to the j-th bit binary data of the reduced count value according to the j-th bit of the first reset signal and the j-th bit of the first set signal. In a specific example, continue to refer to Figure 4 , each level of DFF trigger may include a reset terminal CLR and a set terminal SET. When the j-th bit of the DFF trigger of this level needs to be set to "1", a second level signal (such as a high level signal) may be applied to its set terminal SET, and when the j-th bit of the DFF trigger needs to be reset to "0", a second level signal may be applied to its reset terminal CLR.
[0107] Optionally, continue to see Figure 4 The i-th counter circuit 12i can receive the set signal SET provided by the CAM storage controller <m-1:0>, where the set signal SET <m-1:0>The jth bit in is used to set the jth level DFF trigger. And, the set signal SET <m-1:0>The reset signal of the i-th counter circuit 12i is obtained by negation, wherein the j-th bit of the reset signal is used to reset the j-th level DFF trigger. <m-1:0>The first SET <0> Used to set the first-stage DFF flip-flop, SET the first bit <0> After inversion, the first bit of the reset signal is obtained. The first bit of the reset signal is used to reset the first-stage DFF flip-flop; the set signal SET <m-1:0>The second SET <1> Used to set the second-stage DFF flip-flop, for the second bit SET <1> After inversion, the second bit of the reset signal is obtained. The second bit of the reset signal is used to reset the second-stage DFF flip-flop; the set signal SET <m-1:0>The Mth bit SET <m-1>Used to set the M-th level DFF trigger, and the M-th bit SET <m-1>After inversion, the Mth bit of the reset signal is obtained, and the Mth bit of the reset signal is used to reset the Mth stage DFF flip-flop.
[0108] Through the M-level DFF trigger provided by this embodiment, by connecting the inverting output terminal / Q of the previous-level trigger of the M-level DFF trigger to the trigger terminal of the next-level trigger, when the value stored in the previous-level trigger is "0", the stored value can be increased to 1 in response to the trigger signal; and, when the previous-level trigger is switched from 1 to 0, the next-level trigger can be controlled to switch between 0 and 1, thereby realizing the carry of the count value. When the address comparison circuit outputs the first counting signal to the first-level DFF trigger, it can be counted by +1 on the basis of the original count value through the coordinated counting of the M-level DFF trigger, thereby realizing the accumulation of the count value. And, by sending the set signal and reset signal corresponding to the reduced count value to the M-level trigger, the count value can be subtracted. Therefore, through the M-level DFF trigger of the embodiment of the present disclosure, the counting functions of accumulation and subtraction can be realized, and the counting accuracy of the address information is improved.
[0109] Also, it should be noted that, since the DFF trigger has the characteristics of simple structure and small area, it can reduce the cost and area of the CAM storage device, facilitate integration and save cost.
[0110] It should be noted that the M-level counting unit in the embodiment of the present disclosure may also be implemented as other devices with counting functions, and there is no specific limitation on this.
[0111] Furthermore, it should be noted that the counter circuit provided in the embodiments of the present disclosure may also be implemented as other devices, circuits or chips with counting functions, etc., without any specific limitation thereto.
[0112] In one embodiment, the output end of each counter circuit is also connected to the output end of each level of DFF trigger, so as to output the stored count value from the output end of each level of DFF trigger. For example, the count value N*RA_CNT stored by the N counter circuits 121 to 12N can be output from the output end of each level of DFF trigger. <m-1:0>, for example 6*RA_CNT<5:0>.
[0113] After introducing the counter circuit, we will continue to explain the address comparison circuit.
[0114] The N address comparison circuits 131 to 13N correspond to the N address registers 111 to 11N one by one, and each address comparison circuit is used to match the input address with the address information stored in the corresponding address register. Exemplarily, the first address comparison circuit 131 corresponds to the first address register 111, and is used to match the input address with the address A1 stored in the first address register; the second address comparison circuit 132 corresponds to the second address register 112, and is used to match the input address with the address A2; ...; the Nth address comparison circuit 13N corresponds to the Nth address register 11N, and is used to match the input address with the address AN.
[0115] Exemplarily, for each address comparator, when the input address is consistent with the address information stored in the corresponding address register, it can be determined that the two match; similarly, when the input address is inconsistent with the address information stored in the address register, it can be determined that the two do not match.
[0116] In one embodiment, Figure 5 FIG. 2 shows a schematic diagram of the structure of an address comparison circuit provided by an embodiment of the present disclosure. Figure 5 As shown, the i-th address comparison circuit 13i includes: P address comparison units 13i1 and a signal processing unit 13i2.
[0117] The kth address comparison unit 13i1 is used to compare the address information RA_CAM stored in the i-th address register. <p-1:0>The kth RA_CAM <k-1>With input address RA <p-1:0>The kth RA <k-1>In the same case, a first level signal is output. Wherein, P is any positive integer, and k is any positive integer less than or equal to P. Exemplarily, the first level signal can be a low level signal or a high level signal, which can be set according to specific circumstances and actual needs, and no specific limitation is made to this. For example, the first level signal can be a low level signal.
[0118] In one example, Figure 6 FIG. 2 shows a schematic diagram of an exemplary address comparison circuit provided by an embodiment of the present disclosure. Figure 6 As shown, the address comparison unit 13i1 includes an XOR gate XOR_1. The kth XOR gate XOR_1 includes a first input terminal X11, a second input terminal X12 and an output terminal Y1. The first input terminal X11 is used to receive the address information RA_CAM stored in the i-th address register. <p-1:0>The kth RA_CAM <k-1>The second input terminal X12 is used to receive the input address RA <p-1:0>The kth RA <k-1>, the output terminal Y1 is used to store the kth bit of the address information RA_CAM <k-1>The kth bit RA of the input address <k-1>When the first level signal is matched, the first level signal is output, wherein the first level signal is a low level signal.
[0119] In this example, since the XOR gate can output a low level when the two input terminals are the same, and output a high level when the two input terminals are different, accordingly, the kth bit RA_CAM of the address information is input to the two input terminals of each XOR gate. <k-1>The kth bit RA of the input address <k-1>If the two are the same, the output terminal of the XOR gate outputs a low level signal, and if the two are different, the output terminal of the XOR gate outputs a high level signal. Therefore, according to the logic function of the XOR gate, it is possible to accurately judge whether the same bit data of the input address and the stored address information are the same, thereby improving the judgment accuracy of whether the input address and the stored address information are the same, and thus improving the counting accuracy.
[0120] It should be noted that the XOR gate has the characteristics of simple structure and small area, which can reduce the manufacturing cost and occupied area of the CAM storage device.
[0121] In another example, Figure 7 FIG. 2 shows a schematic diagram of another exemplary address comparison circuit provided by an embodiment of the present disclosure. Figure 7 As shown, the address comparison unit 13i1 includes an XOR gate XOR_2 and a NOT gate NOT_1.
[0122] like Figure 7 As shown, the kth XOR gate XOR_2 includes a third input terminal X31, a fourth input terminal X32 and an output terminal Y3. The third input terminal X31 is used to receive the address information RA_CAM stored in the i-th address register. <p-1:0>The kth RA_CAM <k-1>The fourth input terminal X32 is used to receive the input address RA <p-1:0>The kth RA <k-1>The output terminal Y3 is connected to the input terminal X41 of the NOT gate NOT_1, and the output terminal Y4 of the NOT gate NOT_1 is used to store the kth bit RA_CAM of the address information. <k-1>The kth bit RA of the input address <k-1>When the first level signal is matched, the first level signal is output. The first level signal is a high level signal.
[0123] In this example, since the XOR gate can output a low level when the two input terminals are the same, and output a high level when the two input terminals are different, accordingly, the kth bit RA_CAM of the address information is input to the two input terminals of each XOR gate. <k-1>The kth bit RA of the input address <k-1>When the two are the same, the output end of the XOR gate outputs a low level signal, and outputs a high level first level signal after being inverted by the NOT gate. And if the two are different, the output end of the XOR gate outputs a high level signal, and outputs a low level signal after being inverted by the NOT gate. Therefore, it is possible to accurately judge whether the same bit data of the input address and the stored address information are the same based on the logical function of the XOR gate and the NOT gate, thereby improving the judgment accuracy of whether the input address is the same as the stored address information, and thus improving the counting accuracy. And it should be noted that the XOR gate and the NOT gate have the characteristics of simple structure and small area, which can reduce the manufacturing cost and occupied area of the CAM storage device.
[0124] It should be noted that the address comparison unit 13i1 can also be set as a device, circuit or functional module that can generate an output signal according to whether the signals at the first input terminal and the second input terminal are the same. For example, it can be implemented as a comparator, etc., and there is no specific limitation on this.
[0125] After the address comparison unit 13i1 has been introduced, the signal processing unit 13i2 will be described.
[0126] Continue to see Figure 5 The signal processing unit 13i2 is connected to the P address comparison units 13i1, and is used to generate a first counting signal match_bit when receiving the first level signals output by each of the P address comparison units. The first counting signal match_bit is used to represent the input address RA <p-1:0>The address information stored in the i-th address register RA_CAM <p-1:0>Match.
[0127] In one example, when the first level signal is at a low level, for example, when the address comparison unit 13i1 includes an XOR gate XOR_1, see Figure 6 The signal processing unit 13i2 may include a NOR gate NOR_1. Multiple input terminals X21 to X2P of the NOR gate are connected one-to-one with the output terminals of the P XOR gates XOR_1. The output terminal Y2 of the NOR gate is used to output a high-level first counting signal when the multiple input terminals X21 to X2P all receive low-level signals.
[0128] In this example, since each address comparison unit will output a low-level signal when the input address is the same as the stored address information, and since the NOR gate can output a high-level signal when multiple input terminals receive low-level signals, correspondingly, a high-level first counting signal can be generated when each address comparison unit outputs a low-level signal by means of the logic function of the NOR gate. Thus, when the input address is the same as the stored address information, the first counting signal can be sent to accumulate the original counting value, thereby improving the cumulative counting accuracy of the CAM storage device. It should also be noted that the NOR gate has the characteristics of simple structure and small area, which can reduce the manufacturing cost and occupied area of the CAM storage device.
[0129] In another example, when the first level signal is at a high level, continue to refer to Figure 7 , the signal processing unit 13i2 may include an AND gate AND_1. The AND gate AND_1 includes P input terminals X51 to X5P and an output terminal Y5. The P input terminals X51 to X5P are connected to the output terminals Y4 of the P NOT gates in a one-to-one correspondence, and the output terminal Y5 is used to output the first counting signal match_bit when the P input terminals X51 to X5P all receive the first level signal of the high level.
[0130] In this example, since the AND gate can output a high-level signal when high levels are input to multiple input terminals, accordingly, when each address comparison unit outputs a high-level signal when the input address is the same as the stored address information, a high-level first counting signal can be generated through the AND gate.
[0131] It should be noted that the AND gate has the characteristics of simple structure and small area, which can reduce the manufacturing cost and occupied area of the CAM storage device.
[0132] It should be noted that the signal processing unit 13i2 can also be set as a device, circuit or functional module that can generate an output signal according to whether the signals at the first input terminal and the second input terminal are the same. For example, it can be implemented as a comparator, etc., and there is no specific limitation on this.
[0133] After introducing the components of the CAM storage device 20, the CAM storage device 20 is further described in combination with three matching situations between address information and input addresses.
[0134] In the first matching situation, when the input address matches the address information stored in one of the address registers, the count value of the counter circuit corresponding to the address register increases.
[0135] For example, Figure 8 FIG. 2 shows a counting logic diagram of an exemplary CAM storage device provided by an embodiment of the present disclosure. Figure 8 As shown, taking the CAM storage device including 6 address registers, which respectively store address A1-address A6 as an example, if the input address is address A4, the count value of the 4th counter circuit corresponding to the 4th address register can be increased by 1 from the original count value "111000" to obtain a new count value "111001", and the count values of other counter circuits remain unchanged.
[0136] In the second matching situation, when the input address does not match the address information stored in the N address registers, and the N address registers all store address information, the first counter circuit and its corresponding first address register are reset. Also, the first address register stores the input address, the first counter circuit updates its count value, and other unreset counter circuits reduce their count values. Among them, the first counter circuit is a counter to be reset determined in the N counter circuits based on the count value. The first counter circuit can be exemplarily, when the first address register is reset, the address information stored therein can be cleared. Exemplarily, when the first counter circuit is reset, its count value can be updated to an initial value, and the initial value can be binary data corresponding to the value 0 or binary data corresponding to the value 1, without specific limitation.
[0137] For example, Fig. 9 FIG. 2 shows another exemplary counting logic diagram of a CAM storage device provided by an embodiment of the present disclosure. Fig. 9 As shown, continuing with the previous example, when the input address is address A7, since the six address registers have stored addresses A1 to A6, if the fifth counter circuit (i.e., the count value "000001" corresponding to storage address 5) is determined to be the first counter circuit, the address register corresponding to it, i.e., the fifth address register, can be reset, i.e., address A5 in the fifth address register is cleared, and the count value of the fifth counter circuit is reset to "000000". Then, address A7 can be written to the fifth counter circuit, and the count value of the fifth counter circuit is updated to "000001".
[0138] Furthermore, the count values of the counter circuits corresponding to the remaining five address registers except the fifth address register may be reduced by 1.
[0139] The first counter is described in detail as follows.
[0140] In one embodiment, the first counter may be a counter circuit corresponding to a first address register storing a noisy address.
[0141] For example, when the input address does not match the address information stored in the N address registers and the N address registers all store address information, the target counter circuit whose count value is less than or equal to the preset number threshold is the first counter circuit. The reset of the first address register corresponding to the target counter circuit is used to clear the stored noise address. Exemplarily, the preset number threshold can be set according to actual conditions and specific needs, such as 1, etc., and there is no specific limitation on this.
[0142] For example, when the preset number of times threshold is 1, continue to refer to Fig. 9 , since the count value of address A5 is less than or equal to 1, address A5 can be determined as a noise address, and the 5th address register and the 5th counter circuit are reset, and the input address A7 and the count value of input address A7 are written.
[0143] Through this embodiment, when the address register of the CAM storage device is full of address information, useless noise addresses can be discarded, and the position of the address register can be reserved for valid address information, thereby improving the accuracy and efficiency of address counting. Also, when discarding noise addresses, in order to avoid the influence of noise addresses on the count value of the stored address information, the count value of the remaining address information is reduced by 1, so that the influence of noise addresses on the counting result can be avoided, thereby improving the address counting accuracy. Furthermore, in the recognition scenario of row hammer attack addresses, by discarding row hammer noise addresses, row hammer noise addresses can be screened out in advance during subsequent row hammer attack address recognition, ensuring that row hammer attack addresses can be recognized based on valid address information and access at this time. And the counting accuracy of the number of accesses to each physical row address is improved, and the row hammer noise recognition accuracy and recognition efficiency are improved.
[0144] In another embodiment, in the absence of a target counting circuit, the first counter may be a counter circuit having a minimum count value.
[0145] For example, when the input address does not match the address information stored in the N address registers, the N address registers all store address information, and there is no target counter circuit, one of the counter circuits with the smallest count value is used as the first counter circuit.
[0146] For example, Fig.10 FIG. 2 shows another exemplary counting logic diagram of a CAM storage device provided by an embodiment of the present disclosure. Fig.10 As shown, since the count values of addresses A1-A7 are all greater than 1, addresses A1-A7 are not noise addresses. At this time, since the count value of address A4 is the smallest, the address register storing address A4 (the 4th address register) and the count value of the counter circuit (the 4th counter circuit) corresponding to address A4 can be reset.
[0147] Through this embodiment, the address register and counter circuit of the address information with the smallest count value can be reset when there is no noise address. Since the smallest count value indicates that the address information has not been input for a long time within the preset time period, the address information that has not been input for a long time can be cleared through this embodiment to avoid its waste of address register resources. And, it is possible to count the address information input at a high frequency, thereby improving the counting accuracy and counting reliability. Further, in the identification scenario of the row hammer attack address, the smallest count value indicates that the access frequency of the address information within the preset time length is low, and by clearing it, it is possible to prevent the low-frequency address from wasting resources of the CAM storage device. And since the access frequency of the physical row address determines the probability of it being a row hammer attack address, by clearing the physical row address with a low access frequency, it is possible to count the physical row address with a high access frequency, so that when the resources of the CAM storage device are limited, the row hammer attack address can be identified in the physical row address with a high probability of the row hammer attack address, thereby improving the identification accuracy of the row hammer attack address.
[0148] It should be noted that the first counter circuit may also be determined by other reset conditions related to the count value, and there is no specific limitation on this.
[0149] In the third matching situation, when the input address does not match the address information stored in the N address registers and there is a second address register, the input address is stored in the second address register and the count value of the second counter circuit corresponding to it is updated. The second address register is an address register in the N address registers that does not store address information. Optionally, when there are multiple second address registers, the input address can be stored in the order of the second address registers.
[0150] For example, Fig.11 FIG. 2 shows another exemplary counting logic diagram of a CAM storage device provided by an embodiment of the present disclosure. Fig.11 As shown, when neither the 5th address register nor the 6th address register stores address information, that is, both are in an idle state, the input address A5 can be stored in the 5th address register, and the count value of the 5th counter circuit (that is, the second counter circuit) can be updated to "000001".
[0151] The CAM storage device provided by the embodiment of the present disclosure, for any counter circuit, the address counting module can increase the count value of the address counting circuit when the corresponding address comparison circuit determines that the input address matches the stored address information, thereby realizing the correct counting of the input address stored in the address register. Also, when all address registers store address information and the input address does not match the stored address information, the first address register to be reset can be determined in the N address registers, the count value of the counter circuit corresponding to the first address register is reset and re-counted, and the count value of other unreset counter circuits is reduced, thereby ensuring the counting accuracy while avoiding the influence of the counting result of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy. Also, since the second address register is an address register that does not store address information, when the input address does not match the stored address information and there is an idle second address register, the input address can be stored in the second address register to accurately count the newly appeared input address. Accordingly, the technical solution provided by the embodiment of the present disclosure can accurately count the input addresses stored in the address registers and the new input addresses not stored in the address registers when the N address registers are not full of addresses. Moreover, when the N address registers are full of addresses, the technical solution can ensure the counting accuracy while avoiding the influence of the counting results of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy, thereby realizing accurate counting of each address information in the memory.
[0152] Optionally, in a row hammer attack address identification scenario, by resetting the first counter circuit and the first address register, the retained address can be a row address with a high access frequency, that is, a row hammer attack address, and a refresh operation can be performed on the retained row address.
[0153] In some embodiments, in order to accurately identify the row hammer attack address, the input address may be a row address of the access physical row sent by the chip controller.
[0154] Correspondingly, for each address register, taking the i-th address register 11i as an example, the address register 11i includes a first input terminal and a first output terminal. The first input terminal is connected to the chip controller and is used to obtain the row address of the access physical row sent by the chip controller. The first output terminal is used to output the stored address information Ai. Exemplarily, the address register may also include a clock signal input terminal, and when the clock signal is received at a rising edge, the row address received at the first input terminal may be stored.
[0155] For each address comparison circuit 13i, taking the i-th address comparison circuit 13i as an example, the address comparison circuit 13i includes a second input terminal, a third input terminal, and a second output terminal. The second input terminal is connected to the chip controller for obtaining the row address of the accessed physical row. The third input terminal is connected to the first output terminal of the corresponding address register (address register 11i). The second output terminal is connected to the fourth input terminal of the corresponding counter circuit (counter circuit 12i), and is used to provide a first counting signal to the fourth input terminal when the row address of the accessed physical row matches the address information Ai stored in the address register 11i.
[0156] For each counter circuit, taking the i-th counter circuit 12i as an example, the counter circuit 12 includes a fourth input terminal and a fifth output terminal, and the fifth output terminal is connected to the row hammer attack controller, and is used to provide the count value stored in the counter circuit to the row hammer attack controller, so that the row hammer attack controller recognizes the address information Ai stored in the address register 11i as the row hammer attack address when the count value is greater than or equal to the preset row hammer threshold.
[0157] Through this embodiment, the number of accesses to the row address of the physical row can be accurately counted, and based on the high-accuracy access number, it can be accurately detected whether the stored row address to be detected is a row hammer attack address, thereby improving the recognition accuracy of the row hammer attack address.
[0158] Based on the same inventive concept, Fig.12 A schematic structural diagram of another CAM storage device provided in an embodiment of the present disclosure is shown. Fig.12 and Fig.11 The difference is that the CAM memory device may further include N status query circuits 141 to 14N.
[0159] The N state query circuits 141-14N correspond one-to-one to the N address registers 111-11N. For example, the state query circuit 141 corresponds to the address register 111, the state query circuit 142 corresponds to the address register 112, ..., and the state query circuit 14N corresponds to the address register 11N.
[0160] The i-th state query circuit 14i is used to output a first state signal indicating that the i-th address register is in a storage state when the i-th address register 11i stores address information Ai, and to output a second state signal indicating that the i-th address register 11i is in an idle state when the i-th address register 11i does not store address information Ai.
[0161] In some embodiments, different levels of at least one bit may be used to represent the first state signal and the second state signal respectively.
[0162] In one example, the state of the address register can be represented by an idle state bit OP and a storage state bit LO. Fig.13 FIG. 2 shows a counting logic diagram of an exemplary CAM storage device provided by an embodiment of the present disclosure. Fig.13 As shown, the first state signal includes: a first level signal of the idle state bit OP and a second level signal of the storage state bit LO. The second state signal includes: a third level signal of the idle state bit OP and a fourth level signal of the storage state bit LO. Exemplarily, one of the first level signal and the third level signal is a high level signal, and the other is a low level signal. Exemplarily, one of the second level signal and the fourth level signal is a high level signal, and the other is a low level signal.
[0163] The idle state bit OP is used to indicate whether the address register is in an idle state. Optionally, when the idle state bit OP is a high level signal, it indicates that the address register stores an address. Correspondingly, when the idle state bit OP is a low level signal, it indicates that the address register is in an idle state.
[0164] And, the storage state bit LO is used to indicate whether the address register is in a storage state. Optionally, when the storage state bit LO is a low level signal, it indicates that the address register stores an address. Correspondingly, when the storage state bit LO is a high level signal, it indicates that the address register is in an idle state.
[0165] In another example, the state of the address register can be represented by the idle state bit OP. Accordingly, the first state signal includes a high level signal of the idle state bit OP. The second state signal includes a low level signal of the idle state bit OP.
[0166] In yet another example, the state of the address register may be represented by a storage state bit LO. Accordingly, the first state signal includes a low level signal of the storage state bit LO. The second state signal includes a high level signal of the storage state bit LO.
[0167] In the above multiple examples, the state query circuit can accurately characterize whether each address register stores an address through the level of the idle state bit and / or the storage state bit, and then can determine the state of each address register according to the idle state bit and / or the storage state bit of the state query circuit during the address counting process to perform different counting methods. For example, when it is determined according to the idle state bit and / or the storage state bit that N address registers all store address information and the input address is inconsistent with each address information, the first counter circuit is reset. For another example, when it is determined according to the idle state bit and / or the storage state bit that the input address does not match the stored address information and there is an idle address register, the input address is stored in the idle address register, etc. Therefore, correct and efficient address counting can be performed, and the counting accuracy and counting efficiency are improved.
[0168] It should be noted that the first state signal and the second state signal may also be implemented as other bits, and there is no specific limitation on this.
[0169] After introducing the first state signal and the second state signal, the specific structure of the state query circuit will be described next.
[0170] In one example, Fig.14 A structural schematic diagram of another exemplary status query circuit provided by an embodiment of the present disclosure is shown.
[0171] like Fig.14 As shown, the second set signal CAM_RST <n-1:0>The N SR flip-flops SR1 are set, and the second reset signal CLK_LA <n-1:0>Reset the N SR flip-flops SR1.
[0172] For example, for any state query circuit, take the i-th state query circuit 14i as an example, the state query circuit 14i includes a SR trigger SR1 and a NOT gate unit NOT_2.
[0173] The set input terminal / S of the SR trigger SR1 is used to receive the second set signal CAM_RST The reset input terminal / R of the SR trigger SR1 is used to receive the second reset signal CLK_LA The output terminal Q of the SR flip-flop SR1 is used to output the level signal ST_OPEN of the idle state bit .
[0174] The input end of the NOT gate unit NOT_2 is connected to the output end Q of the SR trigger SR1, and the output end of the NOT gate unit NOT_2 is used to output the level signal ST_LOCK of the storage status bit. .
[0175] Wherein, when the i-th address register 11i stores address information Ai, the i-th SR trigger receives a second set signal corresponding to the first level state, so that the i-th SR trigger outputs a first level signal of the idle state bit; and, when the i-th address register 11i does not store address information, the i-th SR trigger receives a second reset signal corresponding to the second level state, so that the i-th SR trigger outputs a third level signal of the idle state bit. Exemplarily, the first level state can be a high level state or a low level state, for example, a low level state. In another exemplary embodiment, the second level state can be a high level state or a low level state, for example, a low level state.
[0176] In this embodiment, when any address register stores address information, a low-level second set signal can be provided to the set input terminal / S of the SR trigger SR1 corresponding to the address register, at this time / S=0, and the output terminal Q can be set to 1, at this time, the storage state bit of the output terminal Q corresponds to a high-level signal. And, when the address of any address register is cleared, a low-level second reset signal can be provided to the reset input terminal / R of the SR trigger SR1 corresponding to the address register, at this time / R=0, and the output terminal Q can be reset to 0, at this time, the storage state bit of the output terminal Q corresponds to a low-level signal. Thus, in the disclosed embodiment, when the address register stores address information or clears address information, the second reset signal and the second set signal can be used to reset or set the SR trigger, and the level of the SR trigger output terminal Q can be controlled, so that the level of the SR trigger output terminal Q can accurately represent whether the address register stores an address, thereby improving the counting accuracy.
[0177] It should be noted that, since the SR trigger has the characteristics of simple structure and small area, it can reduce the cost and area of the CAM storage device, facilitate integration and save cost.
[0178] In another example, the state query circuit 14i includes an SR trigger SR1, and the output terminal Q of the SR trigger SR1 is used to output the level signal ST_OPEN of the idle state bit. The inverting output terminal / Q of the SR flip-flop SR1 is used to output the level signal ST_LOCK of the storage status bit .
[0179] In one example, in order to improve the accuracy of the storage state recorded by the state query circuit, the second reset signal of the state query circuit 14i can be used as the clock signal of the i-th address register 11i. Fig.14 , the second reset signal CLK_LA <n-1:0>The second reset signal CLK_LA can be output to the clock signal input terminal CK of each address register through line B1. <0> The clock signal input terminal CK output to the address register 111, the second reset signal CLK_LA <1> The clock signal input terminal CK, ..., output to the address register 112, the second reset signal CLK_LA <n-1>Output to the clock signal input terminal CK of the address register 11N.
[0180] In this example, by using the same signal as the second reset signal of the status query circuit and the clock signal of the address register, the status query circuit can be controlled to be modified to the first status signal while the address register is writing the address, so that the status signal output by the status query circuit can accurately represent whether the address register is idle or stores address information.
[0181] After introducing the specific structure of the status query circuit, the function of the status query circuit will be described next.
[0182] Fig.15 FIG. 2 shows another exemplary counting logic diagram of a CAM storage device provided by an embodiment of the present disclosure. Fig.15 As shown, the data "10" in the state query circuits 141-143 corresponds to the first state signal, indicating that the address registers 111-113 store addresses A1-A3 respectively. The data "01" in the state query circuits 144-146 corresponds to the second state signal, indicating that the address registers 114-116 are in an idle state. At this time, when it can be determined according to the second state signal that the fourth address register 114 is in an idle state, the input address A4 can be stored in the fourth address register 114. And after the storage is completed, the state value of the fourth state query circuit 144 is changed from "01" to "10".
[0183] After introducing the status query circuit, for ease of understanding, the CAM storage device provided by the embodiment of the present disclosure is described below with an example.
[0184] Fig.16 FIG. 2 shows a schematic diagram of the structure of an exemplary CAM storage device provided by an embodiment of the present disclosure. Fig.16 As shown, the CAM storage device may include 6 state query circuits SR1. Among them, the 6 state query circuits SR1 can be set or reset under the control of the second set signal CAM_RST<5:0> and the second reset signal CLK_LA<5:0>. And, the 6 state query circuits SR1 can output the level signal ST_OPEN<5:0> of the idle state bit to indicate whether the address register corresponding to each state query circuit is in an idle state. And, the level signal ST_LOCK<5:0> of the storage state bit can be output through the NOT gate to indicate whether the address register corresponding to each state query circuit is in a storage state. Optionally, the second reset signal CLK_LA<5:0> can also be output to the clock signal input terminal CK of each latch to serve as the clock signal of each latch. For example, continue to refer to Fig.13 , the idle state bit can be represented as OP, and the storage state bit can be represented as LO.
[0185] And, the CAM storage device may include 6 groups of corresponding address registers and address comparison circuits. Among them, a group of address registers may include 17 latches, which are used to store one bit of address information respectively. Specifically, the input end of each address register is used to receive the input address RA<16:0> sent by the chip controller. Each address comparison circuit is used to compare the input address RA<16:0> sent by the chip controller with the address information RA_CAM<16:0> stored in the corresponding address register. If the two are the same, 1 is output, that is, match_bit=1. If the two are not the same, 0 is output, that is, match_bit=0. Exemplarily, the address information 6*RA_CAM<16:0> stored in each address register can also be provided to the outside through the output terminal. Exemplarily, continue to refer to Fig.13 , the address information stored in each address register can be expressed as RA_DLUT<16:0>.
[0186] Furthermore, the CAM storage device may further include 6 counter circuits, wherein each counter circuit may include 6 DFF flip-flops, which may implement counting functions of adding 1 and subtracting 1. If the received match_bit=1, the count value of the corresponding counter circuit is increased by 1. Furthermore, if each address register stores address information, when new address information is input, the count value subtracts 1. Exemplarily, the count value 6*RA_CNT<5:0> stored in each counter circuit may also be provided to the outside through the output terminal. Exemplarily, continue to refer to Fig.13 , the count value stored in each counter circuit can be expressed as RA_CNT<5:0>, and the counter circuit has the functions of +1 and -1.
[0187] Through the above examples, a dedicated CAM storage device is provided, which can complete the functions of address register status query, address storage, and address counting. Further, the dedicated CAM storage device can be applied to the row hammer attack architecture in advanced process DRAM, which can accurately capture the row hammer attack address and occupy less resources.
[0188] Based on the same inventive concept, an embodiment of the present disclosure also provides a CAM storage controller. Fig.17 A schematic structural diagram of a CAM storage controller provided by an embodiment of the present disclosure is shown.
[0189] like Fig.17 As shown, the CAM memory controller 1700 may include a count value processing circuit 1710 and a control circuit 1720 .
[0190] The count value processing circuit 1710 is connected to the output ends of the N counter circuits, and is used to obtain the count values of the N address registers; and when the input address does not match the address information stored in the N address registers, and the N address registers all store address information, determine the first address register according to the count values of the N address registers.
[0191] The control circuit 1720 is used to reset the first counter circuit, update the count value of the reset first counter circuit, and control other unreset counter circuits to reduce their count values.
[0192] In some embodiments, the CAM memory controller 1700 may include a memory status detection circuit.
[0193] The storage state detection circuit is connected to the N state query circuits and is used to detect whether the N address registers all store address information according to the state signals output by the N state query circuits.
[0194] In some embodiments, the count value processing circuit 1710 is specifically used for:
[0195] In the case that there is a target counter circuit whose count value is less than or equal to the preset number threshold among the N counter circuits, the address information stored in the address register corresponding to the target counter circuit is determined as the row hammer attack noise address, and the address register corresponding to the target counter circuit is determined as the first address register;
[0196] When the count values of the N counter circuits are all greater than the preset number threshold, one of the counter circuits with the smallest count value is used as the first counter circuit.
[0197] In some embodiments, the count value is M-bit binary data, the i-th counter circuit includes M-level counting units, wherein the j-th level counting unit is used to record the j-th bit of the M-bit binary data, i is any positive integer less than or equal to N, M is any positive integer, and j is any positive integer less than or equal to M;
[0198] The CAM memory controller 1700 may include a counter control circuit.
[0199] The counter control circuit is specifically used for:
[0200] Obtaining count values of other counter circuits that have not been reset;
[0201] For each count value of the counter circuit that has not been reset, the count value is subtracted by 1 to obtain a reduced count value, and a first reset signal and a first set signal corresponding to the reduced count value are generated, wherein when the j-th bit of the reduced count value is 0, the j-th bit of the first reset signal is 1; when the j-th bit of the reduced count value is 1, the j-th bit of the first set signal is 1.
[0202] The CAM storage controller provided by the embodiment of the present disclosure can determine the first address register to be reset among N address registers, reset and re-count the count value of the counter circuit corresponding to the first address register, and reduce the count values of other counter circuits that have not been reset, when all address registers store address information and the input address does not match the stored address information, thereby ensuring the counting accuracy while avoiding the counting results of each counter circuit being too large and exceeding the counting range of the address counting module, which affects the counting accuracy.
[0203] Based on the same inventive concept, the embodiment of the present disclosure provides an address counting method, which can be executed by a CAM storage device. The CAM storage device can refer to the relevant description of the above part of the embodiment of the present disclosure, which will not be repeated here.
[0204] Fig.18 A flow chart of an address counting method provided by an embodiment of the present disclosure is shown. Fig.18 As shown, the address counting method provided in the embodiment of the present disclosure includes the following steps S1810 to S1840.
[0205] S1810, each address comparison circuit matches the input address with the address information stored in its corresponding address register.
[0206] S1820, when the input address matches the address information stored in one of the address registers, the count value of the counter circuit corresponding to the address register increases.
[0207] S1830, when the input address does not match the address information stored in the N address registers, and the N address registers all store address information, the first counter circuit and its corresponding first address register are reset, the first address register stores the input address, the first counter circuit increases its count value, and other unreset counter circuits decrease their count values. The first counter circuit is a counter to be reset determined among the N counter circuits based on the count value.
[0208] S1840, when the input address does not match the address information stored in the N address registers and there is a second address register, the input address is stored in the second address register and the count value of the second counter circuit corresponding to the second address register is updated. The second address register is an address register in the N address registers that does not store address information.
[0209] In some embodiments, S1830 includes:
[0210] When the input address does not match the address information stored in the N address registers and the N address registers all store address information, the target counter circuit whose count value is less than or equal to the preset number threshold is the first counter circuit, wherein resetting the first address register corresponding to the target counter circuit is used to clear the stored noise address.
[0211] When the input address does not match the address information stored in the N address registers, the N address registers all store address information, and there is no target counter circuit, one of the counter circuits with the smallest count value is used as the first counter circuit.
[0212] There is no address register storing address information among the N address registers.
[0213] In some embodiments, the count value is M-bit binary data, the i-th counter circuit includes M-level counting units, wherein the j-th level counting unit is used to record the j-th bit of the M-bit binary data, i is any positive integer less than or equal to N, M is any positive integer, and j is any positive integer less than or equal to M;
[0214] When the count value of the i-th counter circuit is increased, the M-level counting unit adds 1 to the original count value to obtain the increased count value;
[0215] And, when the count value of the i-th counter circuit is reduced, the M-stage counting unit stores the reduced count value,
[0216] The count value after reduction is obtained by the content addressable storage controller subtracting 1 from the count value before reduction.
[0217] In some embodiments, the address counting method also includes: when the i-th address register stores address information, the i-th state query circuit outputs a first state signal used to characterize that the i-th address register is in a storage state; and, when the i-th address register does not store address information, outputs a second state signal used to characterize that the i-th address register is in an idle state.
[0218] In some embodiments, the first state signal includes: a high level signal of an idle state bit and / or a low level signal of a storage state bit;
[0219] The second state signal includes: a low level signal of an idle state bit and / or a high level signal of a storage state bit.
[0220] In some embodiments, the i-th state query circuit includes an SR trigger and a NOT gate unit,
[0221] The set input terminal of the SR trigger is used to receive the second set signal, the reset input terminal of the SR trigger is used to receive the second reset signal, and the output terminal of the SR trigger is used to output the level signal of the idle state bit.
[0222] The input end of the NOT gate unit is connected to the output end of the SR trigger, and the output end of the NOT gate unit is used to output the level signal of the storage status bit.
[0223] Among them, when the i-th address register stores address information, the i-th SR trigger receives a second set signal corresponding to a low level state, so that the i-th SR trigger outputs a high level signal of the idle state bit; and, when the i-th address register does not store address information, the i-th SR trigger receives a second set signal corresponding to a low level state, so that the i-th SR trigger outputs a low level signal of the idle state bit.
[0224] In some embodiments, the input address includes P bits, wherein the i-th address comparison circuit includes: P address comparison units and a signal processing unit.
[0225] S1810 includes: the kth address comparison unit outputs a first level signal when the kth bit of the address information stored in the i-th address register is the same as the kth bit of the input address. Wherein, P is any positive integer, and k is any positive integer less than or equal to P. And, the signal processing unit generates a first counting signal when receiving the first level signals output by each of the P address comparison units. Wherein, the first counting signal is used to indicate that the input address matches the address information stored in the i-th address register.
[0226] In some embodiments, the input address is a row address for accessing a physical row sent by a chip controller.
[0227] S1810 includes: the second input terminal of each address comparison circuit obtains a row address for accessing a physical row from the chip controller. The second output terminal provides a first counting signal to the fourth input terminal when the row address matches the address information stored in the corresponding address register.
[0228] Furthermore, the address counting method further includes: each counter circuit provides the count value stored in the counter circuit to the row hammer attack controller, so that when the count value is greater than or equal to a preset row hammer threshold, the row hammer attack controller identifies the address information stored in the address register corresponding to the counter circuit as a row hammer attack address.
[0229] The address counting method provided by the embodiment of the present disclosure, for any counter circuit, the address counting module can increase the count value of the address counting circuit when the corresponding address comparison circuit determines that the input address matches the stored address information, so as to realize the correct counting of the input address stored in the address register. Also, in the case where all address registers store address information and the input address does not match the stored address information, the first address register to be reset can be determined in the N address registers, the count value of the counter circuit corresponding to the first address register is reset and re-counted, and the count value of other unreset counter circuits is reduced, thereby ensuring the counting accuracy while avoiding the influence of the counting result of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy. Also, since the second address register is an address register that does not store address information, when the input address does not match the stored address information and there is an idle second address register, the input address can be stored in the second address register to accurately count the newly appeared input address. Accordingly, the technical solution provided by the embodiment of the present disclosure can accurately count the input addresses stored in the address registers and the new input addresses not stored in the address registers when the N address registers are not full of addresses. Moreover, when the N address registers are full of addresses, the technical solution can ensure the counting accuracy while avoiding the influence of the counting results of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy, thereby realizing accurate counting of each address information in the memory.
[0230] It should be noted that Fig.18 The address counting method 1800 shown can be implemented by Figures 2 to 16 One or more components of the device shown are executed and implemented Figures 2 to 16 The various processes and effects in the illustrated device embodiment are not described in detail here.
[0231] In order to facilitate an overall understanding of the address counting method provided by the embodiment of the present disclosure, an example is used to illustrate it.
[0232] In one example, Fig.19 FIG. 1 is a flow chart of an exemplary address counting method provided by an embodiment of the present disclosure. Fig.19 As shown, the address counting method provided by the embodiment of the present disclosure includes S1901 to S1915.
[0233] S1901, the CAM storage device is initialized. Exemplarily, during initialization, the CAM may be completely empty. For example, the status signal output by the status query circuit indicates that each address register is in an idle state. Each address register stores an initial address value, such as the initial address value RA<16:0>=17'b1FFFF, that is, the initial address value may include 17 1s. Each counter circuit stores an initial count value, such as the initial count value CNT=6'b0, that is, 6 0s are stored.
[0234] S1902, loading address information. Exemplarily, in the initialization phase, the address stream data (input address) sent by the chip controller (such as DRAM controller) can be loaded into the CAM storage device in sequence according to the first-in-first-out principle.
[0235] S1903, determine whether a sampling flag is received. If the determination result is yes, execute S1904, if the determination result is no, execute S1910. Exemplarily, the sampling flag may be sent by the CAM storage controller.
[0236] S1904, determine whether the input address matches each address information i. If the determination result is yes, execute S1905, if the determination result is no, it indicates that the input address does not match the address stored in the address register, and continue to execute S1905.
[0237] S1905, add 1 to the count value Cnti corresponding to the address information i.
[0238] S1906, determine whether there is an address register with OP=1 or LO=0 (i.e., determine whether the OP output by the state query circuit corresponding to each address register is 1 or LO is 0). If the determination result is yes, execute S1908, if the determination result is no, continue to execute S1907.
[0239] S1907: discard the input address.
[0240] S1908, store the address information into the idle address register n1.
[0241] S1909, increase the count value of address register n1 from 0 to 1.
[0242] S1910, determine whether a discarding flag is received. If the judgment result is yes, execute S19011. Exemplarily, if the judgment result is no, it can be determined whether a row hammer attack refresh RHR flag is received. The RHR flag is used to indicate the use of each count value to identify the row hammer attack row, and / or to perform a refresh operation on the row hammer attack row.
[0243] S1911, determine whether there is an idle address register. If the determination result is yes, execute S1912, if the determination result is no, execute S1913.
[0244] S1912, store the input address.
[0245] S1913, determine whether there is an address register n2 whose count value cnt is less than or equal to 1. If the determination result is yes, execute S1914, if the determination result is no, execute S1915.
[0246] S1914, the address information of the address register n2 is discarded as a noise address and stored in the input address, and the count values of the other address registers except the address register n2 are reduced by 1.
[0247] S1915, discard the address information of the address register n3 with the smallest count value and store it into the input address, and reduce the count values of the other address registers except the address register n2 by 1.
[0248] Based on the same inventive concept, the embodiment of the present disclosure provides a method for controlling address counting, which can be executed by a CAM storage controller. The CAM storage controller can refer to the relevant description of the above part of the embodiment of the present disclosure, which will not be repeated here.
[0249] Fig. 20 A flow chart of a method for controlling address counting provided by an embodiment of the present disclosure is shown. Fig. 20 As shown, the address counting control method provided in the embodiment of the present disclosure includes the following steps S2010 to S2030.
[0250] S2010, the count value processing circuit obtains the count values of N address registers.
[0251] S2020: When the input address does not match the address information stored in the N address registers, and the N address registers all store address information, determine the first address register according to the count values of the N address registers.
[0252] S2030, the control circuit 1720 resets the first counter circuit, updates the count value of the reset first counter circuit, and controls other unreset counter circuits to reduce their count values.
[0253] In some embodiments, the address counting control method further includes: a storage status detection circuit detects whether all the N address registers store address information according to status signals output by the N status query circuits.
[0254] In some embodiments, S2020 may include:
[0255] In the case that there is a target counter circuit whose count value is less than or equal to the preset number threshold among the N counter circuits, the address information stored in the address register corresponding to the target counter circuit is determined as the row hammer attack noise address, and the address register corresponding to the target counter circuit is determined as the first address register;
[0256] When the count values of the N counter circuits are all greater than the preset number threshold, one of the counter circuits with the smallest count value is used as the first counter circuit.
[0257] In some embodiments, the count value is M-bit binary data, the i-th counter circuit includes M-level counting units, wherein the j-th level counting unit is used to record the j-th bit of the M-bit binary data, i is any positive integer less than or equal to N, M is any positive integer, and j is any positive integer less than or equal to M;
[0258] The control method of address counting also includes:
[0259] Obtaining count values of other counter circuits that have not been reset;
[0260] For each count value of the counter circuit that has not been reset, the count value is subtracted by 1 to obtain a reduced count value, and a first reset signal and a first set signal corresponding to the reduced count value are generated, wherein when the j-th bit of the reduced count value is 0, the j-th bit of the first reset signal is 1; when the j-th bit of the reduced count value is 1, the j-th bit of the first set signal is 1.
[0261] The address counting control method provided by the embodiment of the present disclosure can determine the first address register to be reset among N address registers when all address registers store address information and the input address does not match the stored address information, reset and re-count the count value of the counter circuit corresponding to the first address register, and reduce the count values of other counter circuits that have not been reset, thereby ensuring the counting accuracy while avoiding the counting results of each counter circuit being too large and exceeding the counting range of the address counting module, which affects the counting accuracy.
[0262] It should be noted that Fig. 20 The address count control method shown can be controlled by Fig.18 One or more components of the device shown are executed and implemented Fig.18 The various processes and effects in the illustrated device embodiment are not described in detail here.
[0263] Based on the same inventive concept, a memory is also provided in the embodiment of the present disclosure. The memory may include a storage module and a CAM storage device.
[0264] The storage module may include a plurality of storage arrays (banks).
[0265] And the CAM storage device provided by any of the above embodiments of the present disclosure. The specific content of the CAM storage device can be found in the above embodiments of the present disclosure. Figure 2-Figure 16 The relevant description is omitted here.
[0266] Exemplarily, the memory of the embodiment of the present disclosure may be any one of the dynamic random access memories such as the fourth generation double data rate synchronous dynamic random access memory (DDR4 SDRAM), the fourth generation low power double data rate synchronous dynamic random access memory (LPDDR4 SDRAM), the fifth generation double data rate synchronous dynamic random access memory (DDR5 SDRAM), the fifth generation low power double data rate synchronous dynamic random access memory (LPDDR5 SDRAM), etc., without specific limitation. It should be noted that the memory may also be other memory besides the dynamic random access memory, without specific limitation.
[0267] In some embodiments, the memory may further include a CAM storage controller. The specific contents of the CAM storage controller may refer to the above-mentioned embodiments of the present disclosure in conjunction with Fig.17 The relevant description is omitted here.
[0268] The memory provided by the embodiment of the present disclosure, for any counter circuit, the address counting module can increase the count value of the address counting circuit when the corresponding address comparison circuit determines that the input address matches the stored address information, thereby realizing the correct counting of the input address stored in the address register. Also, in the case where all address registers store address information and the input address does not match the stored address information, the first address register to be reset can be determined in the N address registers, the count value of the counter circuit corresponding to the first address register is reset and re-counted, and the count value of other unreset counter circuits is reduced, thereby ensuring the counting accuracy while avoiding the influence of the counting result of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy. Also, since the second address register is an address register that does not store address information, when the input address does not match the stored address information and there is an idle second address register, the input address can be stored in the second address register to accurately count the newly appeared input address. Accordingly, the technical solution provided by the embodiment of the present disclosure can accurately count the input addresses stored in the address registers and the new input addresses not stored in the address registers when the N address registers are not full of addresses. Moreover, when the N address registers are full of addresses, the technical solution can ensure the counting accuracy while avoiding the influence of the counting results of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy, thereby realizing accurate counting of each address information in the memory.
[0269] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present disclosure. The electronic device may include a memory provided by any of the above embodiments of the present disclosure. The specific content of the memory can refer to the relevant description of the above part of the embodiment of the present disclosure, which will not be repeated here.
[0270] Among them, the electronic device of the embodiment of the present disclosure may be an electronic device loaded with a memory. Exemplarily, the electronic device may be a mobile terminal, a computer, a server, a virtual reality device, an Internet of Things device, etc.
[0271] In the electronic device provided by the embodiment of the present disclosure, for any counter circuit, the address counting module can increase the count value of the address counting circuit when the corresponding address comparison circuit determines that the input address matches the stored address information, thereby realizing the correct counting of the input address stored in the address register. Also, in the case where all address registers store address information and the input address does not match the stored address information, the first address register to be reset can be determined in the N address registers, the count value of the counter circuit corresponding to the first address register is reset and re-counted, and the count value of other unreset counter circuits is reduced, thereby ensuring the counting accuracy while avoiding the influence of the counting result of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy. Also, since the second address register is an address register that does not store address information, when the input address does not match the stored address information and there is an idle second address register, the input address can be stored in the second address register to accurately count the newly appeared input address. Accordingly, the technical solution provided by the embodiment of the present disclosure can accurately count the input addresses stored in the address registers and the new input addresses not stored in the address registers when the N address registers are not full of addresses. Moreover, when the N address registers are full of addresses, the technical solution can ensure the counting accuracy while avoiding the influence of the counting results of each counter circuit being too large and exceeding the counting range of the address counting module on the counting accuracy, thereby realizing accurate counting of each address information in the memory.
[0272] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0273] It should be clear that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. The method embodiment is described relatively simply, and the relevant parts refer to the description part of the system embodiment. The present disclosure is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present disclosure. In addition, for the sake of brevity, a detailed description of known method technologies is omitted here.
[0274] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some ports, devices or units, which can be electrical, mechanical or other forms.
[0275] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0276] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0277] The above are only specific implementation methods of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be covered by the protection scope of the present disclosure.
[0278] Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims. The present disclosure is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A content addressable storage device, characterized in that: include: N address registers, each used to store different address information, where N is an arbitrary positive integer; N counter circuits, corresponding one to one with the N address registers, and respectively used to store the count values of the address registers corresponding to them; N address comparison circuits, corresponding one to one with the N address registers, each of the address comparison circuits being used to match an input address with the address information stored in its corresponding address register; in When the input address matches the address information stored in one of the address registers, the count value of the counter circuit corresponding to the address register increases; When the input address does not match the address information stored in the N address registers, and the N address registers all store address information, the first counter circuit and its corresponding first address register are reset, the first address register stores the input address, the first counter circuit increases its count value, and the other unreset counter circuits decrease their count values, wherein the first counter circuit is a counter to be reset determined among the N counter circuits based on the count value; When the input address does not match the address information stored in the N address registers and there is a second address register, the input address is stored in the second address register and the count value of the corresponding second counter circuit is increased. The second address register is an address register among the N address registers that does not store address information.
2. The device according to claim 1, characterized in that When the input address does not match the address information stored in the N address registers and the N address registers all store address information, the target counter circuit whose count value is less than or equal to the preset number threshold is the first counter circuit, wherein the resetting of the first address register corresponding to the target counter circuit is used to clear the stored noise address; When the input address does not match the address information stored in the N address registers, the N address registers all store address information, and the target counter circuit does not exist, one of the counter circuits with the smallest count value is used as the first counter circuit.
3. The device according to claim 1, characterized in that The count value is M-bit binary data, the i-th counter circuit includes M-level counting units, wherein the j-th counting unit is used to record the j-th bit of the M-bit binary data, i is any positive integer less than or equal to N, M is any positive integer, and j is any positive integer less than or equal to M; Wherein, when increasing the count value of the i-th counter circuit, the M-stage counting unit is used to add 1 to the original count value to obtain the increased count value; Furthermore, when reducing the count value of the i-th counter circuit, the M-stage counting unit is used to store the reduced count value obtained by subtracting 1 from the original count value.
4. The device according to claim 3, characterized in that The j-th stage counting unit includes a j-th stage DFF trigger among M-stage DFF triggers, wherein the inverting output terminal of the j-th level DFF trigger is connected to the trigger terminal of the j+1-th level DFF trigger, the j-th level DFF trigger is used to switch the recorded data between 0 and 1 according to the received trigger signal, and when the recorded data is switched from 1 to 0, send a trigger signal to the j+1-th level DFF trigger, wherein the trigger terminal of the first level DFF trigger is connected to the output terminal of the i-th address comparison circuit, and is used to switch between 0 and 1 when the i-th address comparison circuit outputs a first counting signal, wherein the i-th address comparison circuit outputs the first counting signal when the input address matches the address information stored in the i-th address register; And, the j-th level DFF trigger includes a reset terminal and a set terminal, and the j-th level DFF trigger is further used to: receive the j-th bit of the first reset signal through the reset terminal, and receive the j-th bit of the first set signal through the set terminal, and adjust the recorded data to the j-th bit binary data of the reduced count value according to the j-th bit of the first reset signal and the j-th bit of the first set signal, The first reset signal and the first set signal are generated by a content addressable storage controller and are used to adjust the numerical value stored in the M-level counting unit to the reduced counting value.
5. The device according to claim 1, characterized in that The device further includes N state query circuits, and the N state query circuits correspond one-to-one to the N address registers. Among them, the i-th state query circuit is used to output a first state signal representing that the i-th address register is in a storage state when the i-th address register stores the address information; and to output a second state signal representing that the i-th address register is in an idle state when the i-th address register does not store the address information.
6. The device according to claim 5, characterized in that The first state signal includes: a first level signal of an idle state bit and / or a second level signal of a storage state bit; The second state signal includes: a third level signal of the idle state bit and / or a fourth level signal of the storage state bit.
7. The device according to claim 6, characterized in that The i-th state query circuit includes an SR trigger and a NOT gate unit. The set input terminal of the SR trigger is used to receive a second set signal, the reset input terminal of the SR trigger is used to receive a second reset signal, and the output terminal of the SR trigger is used to output a level signal of the idle state bit. The input end of the NOT gate unit is connected to the output end of the SR trigger, and the output end of the NOT gate unit is used to output the level signal of the storage state bit. Among them, when the i-th address register stores the address information, the i-th SR trigger receives the second set signal corresponding to the first level state, so that the i-th SR trigger outputs the first level signal of the idle state bit; and, when the i-th address register does not store the address information, the i-th SR trigger receives the second reset signal corresponding to the second level state, so that the i-th SR trigger outputs the third level signal of the idle state bit.
8. The device according to claim 1, characterized in that The input address includes a P bit, Wherein, the i-th address comparison circuit comprises: P address comparison units, wherein the kth address comparison unit is used to output a first level signal when the kth bit of the address information stored in the ith address register is the same as the kth bit of the input address; wherein P is any positive integer, and k is any positive integer less than or equal to P; A signal processing unit, the signal processing unit is connected to the P address comparison units, and is used to generate a first counting signal when receiving a first level signal output by each of the P address comparison units, wherein the first counting signal is used to indicate that the input address matches the address information stored in the i-th address register.
9. The device according to claim 1, characterized in that The input address is a row address of a physical row to be accessed sent by a chip controller; Each of the address registers comprises a first input terminal and a first output terminal, wherein the first input terminal is connected to the chip controller and is used to obtain the row address; and the first output terminal is used to output the stored address information; Each of the address comparison circuits comprises a second input terminal, a third input terminal and a second output terminal, wherein the second input terminal is connected to the chip controller and is used to obtain the row address of the accessed physical row; The third input terminal is connected to the first output terminal of the corresponding address register; the second output terminal is connected to the fourth input terminal of the corresponding counter circuit, and is used to provide a first counting signal to the fourth input terminal when the row address matches the address information stored in the corresponding address register; Each of the counter circuits includes a fourth input terminal and a fifth output terminal. The fifth output terminal is connected to the row hammer attack controller and is used to provide the row hammer attack controller with the count value stored in the counter circuit, so that the row hammer attack controller recognizes the address information stored in the address register corresponding to the counter circuit as a row hammer attack address when the count value is greater than or equal to a preset row hammer threshold.
10. A content addressable storage controller, characterized in that: The controller is used to control the content addressable storage device according to any one of claims 1 to 9, and the controller comprises: a count value processing circuit connected to the output ends of the N counter circuits, and configured to obtain count values of the N address registers; and when the input address does not match the address information stored in the N address registers, and the N address registers all store address information, determine the first address register according to the count values of the N address registers; The control circuit is used to reset the first counter circuit, update the count value of the reset first counter circuit, and control other unreset counter circuits to reduce their count values.
Citation Information
Patent Citations
Apparatuses and methods for lossy row access counting
CN112420100A
Semiconductor device having cam that stores address signals
CN113557570A
Apparatus and methods for refreshing memory
US10170174B1
DRAM Adjacent Row Disturb Mitigation
US20170117030A1