Refresh circuit and refresh method, memory and storage system
By obtaining the access address based on preset conditions determined by the counting unit and random numbers, and calculating and executing the row hammer refresh operation, the problem of inaccurate row hammering and victim row refresh in volatile memory is solved, thereby improving the reliability and security of data storage.
Patent Information
- Application Number
- CN202210531246.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-05-16
AI Technical Summary
In volatile memory devices, the refresh operations of hammer rows and victim rows are prone to inaccuracy and are vulnerable to external program attacks, leading to data loss.
The counting unit responds to the row hammer refresh command to count, uses random numbers to determine preset conditions, obtains the access address within the sampling period that meets the conditions, calculates the row hammer address, and executes the row hammer refresh operation through the refresh unit to increase the randomness and accuracy of the sampling address.
This improves the accuracy and sampling reliability of row hammer addresses, reduces the risk of external program attacks, and ensures the data integrity of storage units.
Smart Images

Figure CN117116319B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of semiconductor technology, and to, but is not limited to, a refresh circuit and refresh method, a memory and a storage system. Background Technology
[0002] Semiconductor memory devices used for storing data can be divided into volatile memory devices and non-volatile memory devices. Volatile memory devices, such as Dynamic Random Access Memory (DRAM), are configured to store data by charging or discharging capacitors in the memory cells, and the stored data is lost when power is off. Non-volatile memory devices, such as flash memory, retain the stored data even when power is off. Volatile memory devices are widely used as main memory in various devices, while non-volatile memory devices are widely used in various electronic devices such as computers and mobile devices to store program code and / or data.
[0003] In volatile storage devices, the charge stored in a memory cell can be lost due to leakage current, thus requiring recharging to maintain the charge in the cell. This recharging is called a refresh operation. Furthermore, if a word line (WL) frequently transitions between the active (Act) and pre-charge (Pre) states (i.e., is accessed frequently), that word line can be called a hammered line. On the other hand, word lines physically adjacent to the hammered line (often called victim lines) are also affected by parasitic currents, resulting in faster loss of stored charge. Therefore, an additional refresh operation, called row hammer refresh (RHR), needs to be performed on the victim lines adjacent to the hammered line before the regular refresh operation.
[0004] Therefore, the study of refresh operations and row hammer refresh operations of volatile memory devices is of great significance. Summary of the Invention
[0005] In view of this, embodiments of this application provide a refresh circuit and refresh method, a memory and a storage system.
[0006] In a first aspect, embodiments of this application provide a refresh circuit, the refresh circuit comprising: a counting unit, configured to respond to a row hammer refresh command and begin counting a first count value; a sampling unit, connected to the counting unit, configured to acquire the access address of each access instruction within a sampling period in which the first count value satisfies a preset condition; wherein the preset condition is a numerical range determined by at least one random number; a calculation unit, connected to the sampling unit, configured to determine a row hammer address from the access addresses based on the number of access addresses acquired within the sampling period; and a refresh unit, connected to the calculation unit, configured to perform a row hammer refresh operation on the memory cell coupled to the address line adjacent to the row hammer address.
[0007] In some embodiments, the counting unit includes a random number unit for obtaining the at least one random number in response to a row hammer refresh command.
[0008] In some embodiments, the random number unit includes: a first random unit, configured to perform a first random operation and, in response to the received row hammer refresh command, use the random value generated by the first random operation as a first random number.
[0009] In some embodiments, the first random number is less than the maximum count value of the first random unit; the random number unit further includes: a second random unit connected to the first random unit, used to perform a second random operation and, in response to the received row hammer refresh command, use the random value generated by the second random operation as the second random number; wherein, the maximum count value of the second random unit is the difference between the maximum count value of the first random unit and the first random number.
[0010] In some embodiments, the preset condition includes a first preset condition; the first preset condition is: satisfying that the first count value is greater than or equal to the first random number and less than the numerical range of the sum of the first random number and the second random number.
[0011] In some embodiments, the sampling unit is used to obtain the access address of each access instruction based on the first preset condition when the row hammer refresh command satisfies the first sequence condition; wherein, the first sequence condition is: the odd-numbered row hammer refresh command starting from a preset time.
[0012] In some embodiments, the preset condition includes a second preset condition; the second preset condition is: satisfying that the first count value is greater than or equal to zero and less than the numerical range of the first random number.
[0013] In some embodiments, the sampling unit is used to obtain the access address of each access instruction based on the second preset condition when the row hammer refresh command satisfies the second sequence condition; wherein, the second sequence condition is: the even-numbered row hammer refresh command starting from a preset time.
[0014] In some embodiments, the sampling unit includes: a pulse generation module, configured to generate a sampling pulse according to a received access instruction during a sampling period in which the first count value meets a preset condition; and an address sampling module, connected to the pulse generation module and a preset register; the address sampling module is configured to store the access address of the access instruction into the preset register based on the sampling pulse.
[0015] In some embodiments, the access command includes an activation command and a precharge command; the pulse generation module is specifically configured to: respond to the activation command by setting a preset sampling signal to a first level; wherein the preset initial state of the sampling signal is a second level; and respond to the precharge command by resetting the sampling signal to the second level to form the sampling pulse.
[0016] In some embodiments, the address sampling module is specifically used to: in response to a jumping edge where the sampling signal switches from the first level to the second level, store the access address of the access instruction in the preset register.
[0017] In some embodiments, the calculation unit is specifically used to: determine the number of each access address based on at least one access address stored in the preset register; and determine the access addresses whose number is greater than or equal to the preset number as the row hammer address.
[0018] In some embodiments, the calculation unit includes: a preset comparison circuit, configured to receive any two access addresses stored in the preset register and output a comparison result; wherein the comparison result indicates whether the two input access addresses are the same; and a preset selection circuit connected to the preset comparison circuit; the preset selection circuit is configured to receive each access address and the comparison result of the preset comparison circuit for each access address, and output access addresses with a number greater than or equal to a preset number based on the comparison result; wherein the access addresses output by the preset selection circuit are the row hammer addresses.
[0019] Secondly, embodiments of this application provide a refresh method, the refresh method comprising: responding to a row hammer refresh command, starting to count a first count value; within a sampling period in which the first count value satisfies a preset condition, acquiring the access address of each access instruction; wherein the preset condition is: a numerical range determined according to at least one random number; determining a row hammer address from the access addresses based on the number of each access address acquired within the sampling period; and performing a row hammer refresh operation on the memory cells coupled to the address lines adjacent to the row hammer address.
[0020] In some embodiments, the refresh method further includes: in response to a row hammer refresh command, obtaining the at least one random number.
[0021] This application also provides a memory and a storage system, wherein the memory includes:
[0022] Storage cell array;
[0023] The peripheral circuitry is coupled to the memory cell array; the peripheral circuitry includes the refresh circuitry described in the above embodiments.
[0024] The storage system includes:
[0025] The memory includes the refresh circuit described in the above embodiments;
[0026] A controller is coupled to the memory; the controller is used to control the memory.
[0027] This application provides a refresh circuit and refresh method, a memory and a storage system. The refresh circuit uses random numbers to determine preset conditions and acquires access addresses within a sampling period when a first count value meets the preset conditions. This increases the randomness of the sampled addresses and reduces the risk of attacks from external programs. Furthermore, a calculation unit calculates the number of occurrences of each access address acquired within the sampling period and determines the row hammer address. Finally, a refresh unit performs a row hammer refresh operation on the victim rows adjacent to the row hammer address, thus improving the reliability of random sampling and the accuracy of the row hammer address. Attached Figure Description
[0028] Figure 1 A timing diagram of a row hammer refresh operation provided for an embodiment of this application;
[0029] Figure 2 A schematic diagram of a refresh circuit provided in an embodiment of this application;
[0030] Figure 3A A schematic diagram of a first random unit provided in an embodiment of this application;
[0031] Figure 3B A schematic diagram of a counting unit provided in an embodiment of this application;
[0032] Figure 3C A schematic diagram of a second random unit provided in an embodiment of this application;
[0033] Figure 3D A partial schematic diagram of a refresh circuit provided in an embodiment of this application;
[0034] Figure 4A A schematic diagram of a sampling unit provided in an embodiment of this application;
[0035] Figure 4B A schematic diagram of yet another sampling unit provided in an embodiment of this application;
[0036] Figure 5A A timing diagram based on preset conditions is provided for an embodiment of this application;
[0037] Figure 5B Another timing diagram based on preset conditions is provided for embodiments of this application;
[0038] Figure 6 A schematic diagram of a preset register provided for an embodiment of this application;
[0039] Figure 7A A schematic diagram of a preset comparison circuit provided in an embodiment of this application;
[0040] Figure 7B A schematic diagram of a partial preset selection circuit provided in an embodiment of this application;
[0041] Figure 7C A schematic diagram of yet another partial preset selection circuit provided in an embodiment of this application;
[0042] Figure 7D A schematic diagram of a preset selection circuit provided in an embodiment of this application;
[0043] Figure 8 A flowchart illustrating a refresh method provided in an embodiment of this application;
[0044] Figure 9 This is a schematic diagram of a memory and storage system provided in an embodiment of this application. Detailed Implementation
[0045] To facilitate understanding of this application, exemplary embodiments disclosed herein will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the specific embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of the disclosure of this application to those skilled in the art.
[0046] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of this application. However, it will be apparent to those skilled in the art that this application can be practiced without one or more of these details. In some embodiments, to avoid confusion with this application, some technical features well-known in the art are not described; that is, not all features of the actual embodiments may be described herein, nor well-known functions and structures may be described in detail.
[0047] Generally, terms can be understood, at least in part, from their use in context. For example, depending at least in part on the context, the term “one or more” as used herein can be used to describe any feature, structure, or characteristic in a singular sense, or it can be used to describe a combination of features, structures, or characteristics in a plural sense. Similarly, terms such as “a” or “above” can also be understood to convey either a singular or a plural usage, depending at least in part on the context. Furthermore, the use of “based on” can be understood to not necessarily convey an exclusive set of factors, and can alternatively allow for the presence of additional factors that are not necessarily explicitly described, again depending at least in part on the context.
[0048] Unless otherwise defined, the terminology used herein is intended only to describe particular embodiments and is not intended to limit the scope of this application. When used herein, the singular forms “a,” “an,” and “the above / the” are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising” and / or “including,” when used in this specification, identify the presence of features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups. When used herein, the term “and / or” includes any and all combinations of the associated listed items.
[0049] To fully understand this application, detailed steps and structures will be presented in the following description to illustrate the technical solution of this application. Preferred embodiments of this application are described in detail below; however, in addition to these detailed descriptions, this application may have other implementation methods.
[0050] In this embodiment, the row hammer effect refers to the phenomenon where continuously executing (e.g., tens of thousands of) activation-precharge commands on a single word address line (hammered row) affects the charge of the memory cells corresponding to physically adjacent address lines (victimized rows), leading to erroneous storage. The row hammer refresh operation refreshes the address lines near the hammered row after the volatile memory device has been operating for a period of time to ensure data integrity.
[0051] Figure 1 A timing diagram of a row hammer refresh operation is shown.
[0052] Reference Figure 1 As shown, the refresh circuit can perform row hammer refresh operations at a certain period, and between two row hammer refresh commands, there are multiple activation-precharge operations. The activation operation here refers to: when an external command signal indicates an activation command, the command decoder generates a corresponding activation signal, and the address buffer responds to the activation signal by using the external address as the row address; further, the row decoder identifies the word line to be accessed based on the aforementioned row address. Similarly, the precharge operation refers to: when an external command signal indicates a precharge command, the command decoder generates a corresponding precharge signal, and the address buffer responds to the precharge signal by using the external address as the column address; further, the column decoder identifies the bit line to be accessed based on the aforementioned column address. Therefore, the addressing of memory cells in volatile memory devices can be realized through the above activation-precharge operations.
[0053] For example, refer to Figure 1 As shown, between the two row refresh commands, address line a performed four activation-precharge operations, and address line b performed one activation-precharge operation. It should be noted that when the memory is attacked by malicious programs such as viruses, a certain recurring address line (e.g., address line a mentioned above) will be accessed in concentrated bursts. The access frequency of address line b is much lower than that of address line a; therefore, address line b can be considered a regularly accessed address line.
[0054] In some embodiments, a fixed time interval between two row hammer refresh commands can be selected as the sampling time to determine the hammered row. For example, sampling operations can be performed at the first, third, fifth, and seventh times in response to the row hammer refresh command. For instance, if the occurrence frequency of address line a is highest at the above four fixed times, i.e., address line a is the hammered row, then a row hammer refresh operation can be performed on the affected row adjacent to address line a. However, since address line a is attacked by an external program, such regular sampling or access operations are easily circumvented by the external program, thus failing to refresh the affected row and causing data loss in the memory unit. On the other hand, if the occurrence frequency of address line b is highest at the above four fixed times, i.e., address line b is the hammered row, then a row hammer refresh operation can be performed on the affected row adjacent to address line b. However, since address line b can be a regular address line, the selection of the hammered row may be incorrect, thus preventing the row hammer refresh operation from being performed on the correct affected row.
[0055] Therefore, the selection of sampling addresses should be random, so that the more address lines appearing after random sampling, the higher the accuracy of identifying the hammer row. It should also be noted that during the above sampling of address lines, the row address corresponding to the activation operation is the word line address; therefore, the determination of the hammer row is based on the sampling operation of the activation address.
[0056] Reference Figure 2 As shown, this application embodiment provides a refresh circuit, including: a counting unit 10, used to respond to a row hammer refresh command RHR and start counting a first count value x; a sampling unit 20, connected to the counting unit 10, used to obtain the access address of each access instruction within a sampling period when the first count value x meets a preset condition; wherein, the preset condition is: a numerical range determined according to at least one random number; a calculation unit 30, connected to the sampling unit 20, used to determine the row hammer address from the access addresses according to the number of access addresses obtained within the sampling period; and a refresh unit 40, connected to the calculation unit 30, used to perform a row hammer refresh operation on the memory cells coupled to the address lines adjacent to the row hammer address.
[0057] It should be noted that the refresh circuit involved in the embodiments of this application can be used in DRAM or other volatile memory devices that require refresh and row hammer refresh operations. The refresh circuit can be located in the peripheral circuitry of the memory device, as part of the peripheral circuitry of the memory device, or in a controller outside the memory device, or in other devices such as a host device connected to the memory. The volatile memory device includes a memory cell array and peripheral circuitry coupled to the memory cell array. The peripheral circuitry can include any suitable analog, digital, and mixed-signal circuitry to apply electrical signals to each target memory cell and sense electrical signals from each target memory cell to read the operation of the memory cell array. In some embodiments, the peripheral circuitry can include various types of circuits and electronic components formed using metal-oxide-semiconductor (MOS) technology.
[0058] For example, the peripheral circuit may also include interfaces, control logic, registers, voltage generators, buffers, sense amplifiers, row decoders, column decoders, bit line drivers, word line drivers, and data buses. It is understood that the counting unit 10, sampling unit 20, calculation unit 30, refresh unit 40, and other units or modules in the embodiments of this application may be composed of one or more of the above-mentioned circuits and electronic components to achieve the corresponding functions.
[0059] The counting unit 10 may consist of an interface, a ring oscillator, a clock signal generator, a counter, or other electronic components. Exemplarily, the interface may receive an external hammer refresh command RHR, and the counting unit 10 may respond to the hammer refresh command RHR by causing the counter to perform a counting operation. This counting operation can be implemented using a ring oscillator and a counter, and the count value generated by the counter can be used as the aforementioned first count value x. Alternatively, in this embodiment, the first count value x may be a preset value, and the counter begins counting after the counting unit 10 is powered on, so that the first count value x accumulates within the counter's cycle. It should be noted that the counter's cycle refers to the time required for the count value to accumulate from 0 to the counter's maximum value. In some embodiments, after the first count value x accumulates from 0 to the counter's maximum value within the counter's cycle, it is automatically reset to 0, and a new cycle of counting begins. In other embodiments, when the counting unit 10 receives the row hammer refresh command RHR, it can also reset the first count value x, that is, in response to the row hammer refresh command RHR, the first count value x is restarted from 0.
[0060] The sampling unit 20 can be composed of an interface, registers, or other electronic components. For example, the sampling unit 20 can be connected to the counting unit 10, receiving electrical signals generated by the counting unit 10 via an input interface, and performing sampling operations. The electrical signals here can be pulse signals or command instructions. Furthermore, the sampling unit 20 can obtain the access addresses corresponding to each external access instruction based on the sampling time when the first count value x meets preset conditions.
[0061] It should be noted that the judgment operation on whether the first count value x meets the preset condition can be performed in the counting unit 10 or in other circuit structures. For example, the preset condition is a numerical range that can be determined based on at least one random number generated by the counting unit 10 or other circuit structures. For instance, when at least one random number is generated by the counting unit 10, the judgment operation can be completed in the counting unit 10, and the sampling time or sampling command can be output to the sampling unit 20. When at least one random number is generated by other circuit structures (e.g., a memory controller), the first count value x is first transmitted to the other circuit structure, and then the judgment on whether the preset condition is met is performed. Afterwards, the other circuit structure transmits the judgment result to the sampling unit 20 in the form of a command signal.
[0062] In this embodiment, the row hammer refresh command RHR is transmitted to the counting unit to count the first count value x. The access command is transmitted to the sampling unit 20, so that the sampling unit 20 performs a sampling operation on the access address contained in the access command. It is understood that when the access command is transmitted in the refresh circuit, it includes not only the command itself but also the address corresponding to the command. Therefore, the execution module can respond to the command information in the access command and sample the corresponding access address. Here, the sampled access address can be temporarily stored in a register or buffer.
[0063] The calculation unit 30 can be composed of an interface, a comparator, a register, or other electronic components. For example, the calculation unit 30 can be connected to the sampling unit 20. When the first count value x meets a preset condition, the sampling unit 20 sends an operation instruction to the calculation unit 30. The calculation unit 30 responds to the instruction to calculate the number of each access address and determines the row hammer address based on the number. It should be noted that the sampled access addresses can be stored in the sampling unit 20 first, and then transmitted to the calculation unit 30. In other embodiments, the sampled access addresses can also be directly stored in the registers of the calculation unit 30. This facilitates the calculation unit 30 in obtaining information from each access address in a distributed manner, improving calculation efficiency and reducing data transmission pressure.
[0064] On the other hand, the number of each access address can be determined by a comparator. For example, any two access addresses can be compared to determine the recurring addresses, and then, based on the comparator's output, the access address with the highest number, or whose number is greater than or equal to a preset number, can be selected as the aforementioned row hammer address. This application's embodiments are not limited to using a comparator to determine the number of access addresses; the use of other components for obtaining the number of each access address, such as a counter, should also fall within the scope of protection of this application.
[0065] The refresh unit 40 can be composed of a voltage generator, a row driver, or other electronic components. For example, the refresh unit 40 can be connected to the computing unit 30. In response to the row hammer address confirmed by the computing unit 30, the refresh unit 40 can generate a corresponding refresh command and refresh voltage, and transmit the victim row with a physical location adjacent to the row hammer address to the row driver. The row driver uses the refresh voltage to perform a refresh operation on the victim row, thereby completing the aforementioned row hammer refresh operation. It should be noted that the aforementioned refresh operation refers to refreshing the memory cells coupled within the victim row. Specifically, by applying a refresh voltage to the gate corresponding to the memory cell, the data stored in the memory cell can be temporarily stored in a buffer or bit line, and then rewritten from the buffer or bit line back into the memory cell, thereby completing the refresh operation.
[0066] In this embodiment, the memory can use random numbers to determine preset conditions and acquire access addresses within a sampling period when the first count value meets the preset conditions. This increases the randomness of the sampled addresses and reduces the risk of attacks from external programs. Furthermore, a calculation unit calculates the number of occurrences of each access address acquired within the sampling period and determines the row hammer address. Finally, a refresh unit performs a row hammer refresh operation on the victim rows adjacent to the row hammer address. This improves the reliability of random sampling and the accuracy of the row hammer address.
[0067] In some embodiments, the counting unit 10 includes a random number unit for obtaining at least one random number in response to a row hammer refresh command RHR.
[0068] In embodiments of this application, at least one random number can be generated by a random number unit in the counting unit. Exemplarily, the random number unit may include a ring oscillator, a counter, or other electronic components. The counter can perform a counting operation based on the number of periodic pulse signals generated by the ring oscillator, and in the state where the random number unit responds to the row hammer refresh command RHR, it obtains the count value at the current moment as a random number.
[0069] It should be noted that the above-mentioned random number unit may include multiple counters or ring oscillators to generate multiple random numbers in response to the row hammer refresh command RHR, and the multiple random numbers may be generated synchronously or sequentially and influence each other.
[0070] Specifically, in some embodiments, reference is made to Figure 3A As shown, the random number unit includes: a first random unit 110, used to perform a first random operation and respond to the received row hammer refresh command RHR, using the random value generated by the first random operation as the first random number a.
[0071] In this embodiment, the first random unit 110 can perform a first random operation using the aforementioned ring oscillator (not shown in the figure) and counter a. The first random operation here refers to generating corresponding random values at different times using the counter. For example, before the arrival of the hammer refresh command RHR, counter a and the ring oscillator perform the first random operation; at the moment the first random unit 110 responds to the received hammer refresh command RHR, the hammer refresh command RHR can be applied to register a, so that the random value generated by the counter at that moment is temporarily stored in register a as the first random number a, and further output from the first random unit 110. It should be noted that the value range of the first random number a is from zero to the maximum count value n of counter a. If the value of the counter is greater than the maximum count value n before the arrival of the hammer refresh command RHR, the count value will be reset to zero, and counting will restart.
[0072] On the other hand, the first random number a generated by the first random unit 110 can be output and used to determine the preset conditions at the current time, thereby further determining whether the first count value x meets the preset conditions.
[0073] In this embodiment, temporarily storing the first random number 'a' in register 'a' reduces the risk of data loss and increases the reliability of the device. It is understood that... Figure 3A Only one circuit structure diagram of the first random unit 110 is shown. The first random unit 110 in this application can also perform the first random operation and output the corresponding first random number a through other circuit structures or electronic components.
[0074] In some embodiments, refer to Figure 3B As shown, the first random number a is less than the maximum count value n of the first random unit 110; the random number unit further includes: a second random unit 120, connected to the first random unit 110, used to perform a second random operation, and in response to the received row hammer refresh command RHR, to use the random value generated by the second random operation as the second random number b; wherein, the maximum count value of the second random unit 120 is the difference (na) between the maximum count value n of the first random unit 110 and the first random number a.
[0075] It should be noted that, Figure 3BA counting module 11 is also shown, which is used to start counting a first count value x in response to a row hammer refresh command RHR.
[0076] In this embodiment of the application, the random number unit may further include a second random unit 120. Exemplarily, the input terminal of the second random unit 120 may be connected to the output terminal of the first random unit 110, so that the first random number a can be used as the input parameter of the second random unit 120 to influence the second random operation.
[0077] Similarly, the second random operation can also be performed by a ring oscillator and a counter. In this embodiment, the first random number 'a' can be a parameter affecting the maximum count value of the counter, that is, the maximum count value corresponding to the second random unit 120 is the difference between the maximum count value n of the first random unit 110 and the first random number 'a'. For example, if the maximum count value of counter 'a' in the first random unit 110 is n, then the maximum count value corresponding to the counter in the second random unit 120 is (na). Thus, the value range of the first random number 'a' is zero to n, while the value range of the second random number 'b' is zero to (na). In other words, the second random number 'b' is determined based on the first random number 'a', which increases randomness and thus improves the accuracy of the row hammer address.
[0078] Figure 3C A schematic diagram of the internal circuitry of a second random unit 120 is shown.
[0079] Specifically, the first random number 'a' is transmitted from the first random unit 110 to the accumulation module of the second random unit 120. This accumulation module performs an accumulation operation based on the difference (na) between the maximum count value 'n' of the first random unit 110 and the first random number 'a', outputting the value (n-a+1). The counter b and the ring oscillator perform a second random operation to generate the second random number 'b'. Before the row hammer refresh command RHR arrives, the second random number 'b' is transmitted to the input of the comparator and compared with (n-a+1) to determine if it exceeds the maximum count value of the second random unit 120. If b < (n-a+1), the comparator outputs 1, allowing the counter b to continue counting; if b >= (n-a+1), the comparator outputs 0, and the counter b resets the second random number 'b'. Furthermore, when the row hammer refresh command RHR arrives, the register b can respond to the command and use the random value generated at that moment as the second random number 'b'.
[0080] On the other hand, the second random number b generated by the second random unit 120 can be output and used to determine the preset conditions at the current time, thereby further determining whether the first count value x meets the preset conditions. (Refer to...) Figure 3AAs shown, in this embodiment of the application, the preset conditions can be determined solely by the first random number a; refer to Figure 3B As shown, embodiments of this application can also output a first random number 'a' and a second random number 'b', and determine preset conditions based on the values of the two random numbers. It is understood that in other embodiments, more than two random numbers can be generated to determine the preset conditions, and these random numbers can influence each other, thereby increasing the randomness of the sampling period and improving the accuracy of the hammer address.
[0081] In some embodiments, the preset conditions include a first preset condition; the first preset condition is: satisfying the numerical range of the first count value x being greater than or equal to the first random number a and less than the sum of the first random number a and the second random number b.
[0082] For example, embodiments of this application may determine the first preset condition based on a first random number a and a second random number b. Specifically, refer to... Figure 3D As shown, the first random number a and the second random number b generated by the counting unit 10 can be transmitted to the counting module 11 within the counting unit 10. The counting module 11 is also used to determine a first preset condition based on the first random number a and the second random number b. Further, the counting module 11 is also used to determine whether the first count value x satisfies the first preset condition and output the corresponding sampling instruction (including sampling time and sampling signal, etc.) to the sampling module 20.
[0083] Specifically, the counting module 11 can first determine the first preset condition based on the first random number a and the second random number b: a value range greater than or equal to a and less than (a+b). Further, the counting module 11 may include a comparator, a data selector, or other electronic components to determine whether the first count value x is within the aforementioned value range. If the first count value x satisfies the first preset condition, the corresponding sampling time and sampling signal are transmitted to the sampling unit 20 to obtain the access addresses of each access instruction for the corresponding time period; if the first count value x does not satisfy the first preset condition, the counting module 11 may not transmit sampling instructions or may transmit sampling prohibition instructions to the sampling unit 20. It should be noted that the first count value x is accumulated by a counter within the first time period. If the first count value x consistently satisfies the preset condition within the first time period, the first time period can be determined as the aforementioned sampling period. In other embodiments, the sampling period can also be recorded using a clock generator in the counting module 11.
[0084] It should be noted that the counter in the counting module 11 is used to count the first count value x, and the period of the counter can be denoted as the first period. If the period of the hammer refresh command RHR in this embodiment is too small, it may cause the count value obtained by the first random operation to be reset in response to the next incoming hammer refresh command RHR before counting to a. Therefore, the period of the hammer refresh command RHR involved in this embodiment should be greater than n times the first period, where n is the maximum count value corresponding to the first random operation. In some other embodiments, the period of the hammer refresh command RHR can be less than (n+1) times the first period, which can reduce the power consumption of the device.
[0085] In this embodiment, the first preset condition is determined by two random numbers, and the range of the second random number b is determined based on the first random number a. This can further improve the reliability of random sampling and the accuracy of the row hammer address.
[0086] In some embodiments, the preset conditions include a second preset condition; the second preset condition is: satisfying that the first count value x is greater than or equal to zero and less than the numerical range of the first random number a.
[0087] For example, embodiments of this application may also determine the second preset condition based solely on the first random number 'a'. Specifically, refer to... Figure 3D As shown, only the first random unit 110 generates a first random number a and transmits it to the counting module 11. The counting module 11 is also used to determine the second preset condition based on the first random number a. Further, the counting module 11 is also used to determine whether the first count value x satisfies the second preset condition and output the corresponding instruction signal to the sampling module 20.
[0088] Specifically, the counting module 11 can first determine the second preset condition based on the first random number a: a range of values greater than or equal to 0 and less than a. Similarly, the counting module 11 can use a comparator, a data selector, or other electronic components to determine whether the first count value x is within the aforementioned range.
[0089] The embodiments of this application determine the second preset condition by using a random number, which can reduce device losses and save costs.
[0090] It should be noted that the embodiments of this application may choose to apply either the first preset condition or the second preset condition based on the actual application scenario. For example, the second preset condition may be used first to determine the row hammer address, which can save costs. If the accuracy of the row hammer address is problematic, the first preset condition may be used to determine the row hammer address, thereby improving accuracy and reliability.
[0091] In some embodiments, the sampling unit 20 is used to obtain the access address of each access instruction based on a first preset condition when the row hammer refresh command RHR satisfies a first sequence condition; wherein, the first sequence condition is: the odd-numbered row hammer refresh command RHR starting from a preset time.
[0092] In some embodiments, the sampling unit 20 is used to obtain the access address of each access instruction based on a second preset condition when the row hammer refresh command satisfies the second sequence condition; wherein the second sequence condition is: the even-numbered row hammer refresh command RHR starting from a preset time.
[0093] In this embodiment, the refresh circuit can perform a row hammer refresh operation starting at a preset time after power-on, and the corresponding row hammer refresh command RHR is generated by an external controller or an internal logic control unit. Therefore, the row hammer refresh command RHR starting from the preset time can be divided into an odd-numbered command or an even-numbered command. It is understood that the above-mentioned preset time needs to be determined according to the actual usage of the refresh circuit. For example, when the refresh circuit has a load balancing module, the probability of concentrated access to a certain address line is reduced, so the interval between the preset time and the power-on time is longer; if there is a concentrated access operation in the refresh circuit, the row hammer refresh operation needs to be performed, and the interval between the preset time and the power-on time is shorter.
[0094] Specifically, in response to the first row hammer refresh command RHR starting at a preset time, the access address of each access instruction can be obtained using the first preset condition; further, in response to the second row hammer refresh command RHR starting at a preset time, the access address of each access instruction can be obtained using the second preset condition; similarly, in response to the third row hammer refresh command RHR starting at a preset time, the access address of each access instruction can be obtained again using the first preset condition.
[0095] It should be noted that the first and second sequence conditions described above are merely examples. In other embodiments, the access address of each access instruction can also be obtained using the second preset condition in response to the odd-numbered row refresh command (RHR). Alternatively, the preset conditions can be randomly selected in a random sequence to obtain the access address of each access instruction.
[0096] Therefore, the embodiments of this application can further increase randomness based on the parity of the row hammer refresh command RHR relative to a preset time, thereby improving the reliability of random sampling and the accuracy of the row hammer address.
[0097] In some embodiments, refer to Figure 4AAs shown, the sampling unit 20 includes: a pulse generation module 210, used to generate a sampling pulse according to the received access instruction during the sampling period when the first count value x meets the preset condition; an address sampling module 220, connected to the pulse generation module 210 and the preset register 230; the address sampling module 220 is used to store the access address of the access instruction into the preset register 230 based on the sampling pulse.
[0098] In this embodiment, the pulse generation module 210 may include a comparator, a selector, or a clock generator, etc., to generate sampling pulses available inside the sampling unit 20 according to the sampling instructions provided by the counting unit 10.
[0099] For example, during the sampling time, multiple access commands can be applied to the pulse generation module 210. (Refer to...) Figure 4A As shown, after the sampling command is transmitted to the pulse generation module 210, it can generate sampling pulses suitable for the next stage circuit in response to the access command. It is understood that the counting unit will continuously send multiple sampling commands under preset conditions. Based on this, if the pulse generation circuit 210 continuously receives access commands, the pulse generation module 210 will generate multiple consecutive sampling pulses. The address sampling module 220 can receive these sampling pulses and obtain the address corresponding to the access command. The access command may include a command section and an address section. The pulse generation module 210 can use the command section as an excitation signal, and the address sampling module 220 can extract the address from the address section.
[0100] Furthermore, in response to the sampling pulse, the address sampling module 220 can store the access address in the preset register 230. It should be noted that the preset register 230 here can be a register array composed of multiple registers, or a shift register or other electronic components that can store multiple addresses separately.
[0101] In some embodiments, the access instruction includes: an activation command Act and a precharge command Pre; the pulse generation module 230 is specifically configured to: respond to the activation command Act by setting a preset sampling signal to a first level; wherein the preset initial state of the sampling signal is a second level; and respond to the precharge command Pre by resetting the sampling signal to the second level to form a sampling pulse.
[0102] It should be noted that, Figure 1 Multiple activation-precharge operations are illustrated. The activation operation refers to responding to the activation command Act by using an external address as a row address, and the row decoder confirms the word line to be accessed based on the row address. The precharge operation refers to responding to the precharge command Pre by using an external address as a column address, and the column decoder confirms the bit line to be accessed based on the column address. In this embodiment, what actually needs to be confirmed is the row hammer address, i.e., the word line address of the hammered row.
[0103] Figure 4B A schematic diagram of a pulse generation module 210 is shown. Here, the pulse generation module 210 can correspond to multiple different memory banks. The sampling signal can serve as an enable signal for the memory banks to drive different memory banks to perform sampling operations. It is understood that the multiple different memory banks can be enabled simultaneously for synchronous operation, or they can be enabled in a preset order according to actual needs.
[0104] For example, the sampling signal transmitted from the counting unit 10 to the pulse generation module 210 can be preset to a low level, i.e., the second level mentioned above; further, in response to the activation command Act, the low level can be converted to a high level, i.e., the first level mentioned above; similarly, in response to the precharge command Pre, the high level can be converted back to a low level, thereby forming a sampling pulse.
[0105] In other embodiments, the initial state of the sampling signal can also be a first level, i.e., a high level. Thus, in response to the activation command Act, the high level can be switched to a low level; and in response to the precharge command Pre, the low level can be switched back to a high level, thereby forming a sampling pulse. It is understood that the methods for generating sampling pulses are not limited to the two methods described above.
[0106] In some embodiments, the address sampling module 220 is specifically used to: in response to a jumping edge where the sampling signal switches from a first level to a second level, store the access address corresponding to the access instruction in a preset register 230. It should be noted that in some embodiments, the stored access address actually refers to the row address where the storage unit is located; in other embodiments, the stored access address refers to the specific address of the storage unit.
[0107] Taking obtaining the specific address of a memory cell as an example, the access row address of the access instruction can be obtained when responding to the activation command Act, and the access column address of the access instruction can be obtained when responding to the precharge command Pre. In this way, the address access operation can be performed on the jumping edge of the sampling signal.
[0108] Illustratively, the initial state of the sampling signal is the second level. When responding to the activation command Act, the sampling signal switches to the first level, and at this time, a row address fetch operation can be performed. Further, when responding to the precharge command Pre, the sampling signal switches from the first level back to the second level, and at this time, a row address storage operation can be performed, that is, the accessed row address is stored in the preset register 230. It can be understood that the row address fetch operation may also be performed only in response to the activation command Act, and the response to the precharge command Pre is not used to perform the column address fetch operation, but only used to generate a sampling pulse. Generating a sampling pulse based on the response to the precharge Pre is beneficial to ensure that when the address sampling module 220 performs sampling, the access command is an address read / write command rather than a refresh command.
[0109] In other embodiments, the accessed row address may also be stored in the preset register 230 in response to a transition edge of the sampling signal switching from the second level to the first level, or the operation of storing in the preset register 230 may be performed during the level duration after responding to the activation command Act. The embodiments of the present application are not limited to the above methods for storing accessed addresses.
[0110] Illustratively, Figure 5A and Figure 5B show timing diagrams of sampling operations based on a first preset condition and a second preset condition, where the first random number a=4 and the second random number b=2.
[0111] Specifically, referring to Figure 5A shown in the figure, taking the first count value x satisfying the second preset condition as an example, the second preset condition here is: 0<x<=a. When the counting unit 10 responds to the row hammer refresh signal RHR, it resets the first count value x and starts counting. At this time, the first count value x satisfies the second preset condition, and the initial state of the sampling signal is a high level. At time t0, the sampling signal responds to the activation command Act of an external access instruction, switching from the high level to a low level. At this time, the pulse generation module 210 generates a sampling sub-pulse in response to this transition edge, so that the address sampling module 220 obtains the address corresponding to the current activation command Act, and subsequently stores the address in the preset register 230 at the transition edge from the low level to the high level. In this way, the operation of sampling an address is completed. The sampling unit 20 may further include a corresponding counter to count sampling periods.
[0112] It should be noted that Figure 5A the first random number a=4 and the second random number b=2 shown in the figure, when responding to the row hammer refresh signal RHR, are respectively represented by Figure 3A the register a shown in the figure and Figure 3Cshown is obtained by the register b, and is a constant within the period of the row hammer refresh signal RHR. After the time t3, the first count value x will no longer meet the second preset condition, and four access addresses: address 0, address 1, address 2 and address 3 can be randomly obtained during the sampling period.
[0113] Referring to Figure 5B shown, taking the first count value x meeting a first preset condition as an example, the first preset condition here is: a<x<=(a+b). When the counting unit 10 responds to the row hammer refresh signal RHR, the first count value x is reset and counting starts. At this time, the first count value x meets the first preset condition, and the initial state of the sampling signal is a high level. At time t4, the sampling signal responds to an activation command Act of an external access instruction, and switches from the high level to a low level. At this time, the pulse generation module 210 responds to a jump edge to generate a sampling sub-pulse, so that the address sampling module 220 obtains an address corresponding to the current activation command Act, and stores the address in the preset register 230 at a subsequent jump edge from the low level to the high level. After time t5, the first count value x will no longer meet the first preset condition, and two access addresses: address 4 and address 5 can be randomly obtained during the sampling period.
[0114] In some embodiments, the calculation unit 30 is specifically configured to: determine the number of each access address according to at least one access address stored in the preset register 230; and determine an access address whose number is greater than or equal to a preset number as a row hammer address.
[0115] Figure 6 shows a schematic structural diagram of a preset register 230.
[0116] Referring to Figure 6 shown, the preset register 230 in the embodiment of the present application is a shift register formed by four D flip-flops. The shift register can be divided into two groups: an address shift register and a number shift register. The address shift register is configured to store a sampling address, an input terminal thereof receives each access address obtained by the address sampling module 220, a clock input terminal includes a sampling pulse 1 generated under the first preset condition and a sampling pulse 2 generated under the second preset condition, and further includes a reset signal input terminal. Taking Figure 5A the sampling pulse shown as an example, the sampling pulse is connected to a sampling pulse 2 input terminal of the address shift register, and sequentially shifts and stores the address 0, the address 1, the address 2, and the address 4, and outputs a first-in squeezed-out address at a corresponding output terminal thereof.
[0117] On the other hand, the count shift register is used to record the number of addresses stored in the shift register. This allows for different comparison results to be output based on different numbers of valid addresses. Its input is high-level to drive the shift register to perform related operations. For example, when the address shift register stores only one address, the output of address count 1 is 1, and the other outputs are 0; when the address shift register stores two addresses, the output of address count 2 is 1, and the others are 0.
[0118] It is understood that the number of D flip-flops in the shift registers in this application embodiment can be increased or decreased according to the number of access addresses that need to be registered, that is, adjusted based on the number of sampled data from the hammer row. In other embodiments, other registers can also be used to implement the above function. The two sets of shift registers in this application embodiment can not only store addresses, but also store the number of addresses, which can be used to determine the number of each access address.
[0119] In this embodiment, the calculation unit 30 can determine an access address as a row hammer address when the number of access addresses is greater than or equal to a preset number. It is understood that the preset number can be determined based on the number of sampled access addresses.
[0120] For example, if the number of sampled access addresses is 4, the preset number can be set to 2. Thus, if any of the 4 valid addresses has 2 or more access addresses, it can be considered a centrally accessed address and thus identified as a hammer address. In other embodiments, when the number of sampled access addresses is large, multiple addresses exceeding the preset number can be identified as hammer addresses. The preset number can be determined based on the number of sampled addresses or randomly within a certain range. In other words, embodiments of this application can further increase randomness by setting the preset number, thereby improving the accuracy and reliability of the hammer address.
[0121] In some embodiments, refer to Figures 7A to 7D As shown, the calculation unit 30 includes: a preset comparison circuit 310, used to receive any two access addresses stored in the preset register 230 and output a comparison result; wherein the comparison result is used to indicate whether the two input access addresses are the same; a preset selection circuit 320, connected to the preset comparison circuit 310; the preset selection circuit 320 is used to receive each access address and the comparison result of the preset comparison circuit 310 for each access address, and output access addresses with a number greater than or equal to a preset number according to the comparison result; wherein the access addresses output by the preset selection circuit 320 are row hammer addresses.
[0122] Reference Figure 7AAs shown, a preset comparison circuit 310 is illustrated. This preset comparison circuit 310 can perform pairwise comparisons on the four addresses (address 0, address 1, address 2, and address 3) stored in the preset register 230 and output the corresponding comparison results. For example, the comparator can be an XOR circuit, so that it can output 0 when the two input addresses are the same. For instance, when address 0 and address 1 are the same, the result at the comparator's output terminal is eq01 = 0; when address 0 and address 2, and address 0 and address 3 are different, the result at the comparator's output terminal is eq02 = 1, eq03 = 1. It is understood that the above-described preset comparison circuit 310 can also be implemented using other electronic components or circuits capable of performing comparison functions.
[0123] Reference Figure 7B The diagram illustrates a partial selection circuit 321 within a preset selection circuit 320. This partial selection circuit 321 can consist of multiple data selectors and multiple NAND gates. The inputs of the data selectors are connected to the access address output by the preset register 230 or the output of another data selector, and the selection terminals of the data selectors are used to connect to multiple comparison results from the aforementioned preset comparison circuit 310. For example, when the preset register 230 includes four valid addresses: address 0, address 1, address 2, and address 3, the partial selection circuit 321 can be used to output the row hammer address.
[0124] Specifically, the two inputs of data selector 320a are connected to address 0 and the output of data selector 320b, respectively. The selection terminal of data selector 320a is connected to the output of a NAND gate. The inputs of the NAND gate include the comparison results related to address 0 in the preset comparison circuit 310: eq01, eq02, and eq03. For example, when any comparison result of eq01, eq02, or eq03 is 0, the output of the NAND gate is 1, and data selector 320a outputs address 0 as the row hammer address. It should be noted that if any comparison result of eq01, eq02, or eq03 is 0, it means that address 0 has the same access address as address 1, address 2, or address 3. In this case, with four valid addresses, the preset number can be set to 2, thereby confirming address 0 as the centrally accessed address, i.e., the row hammer address.
[0125] On the other hand, when eq01, eq02, and eq03 are all non-zero, it means that address 0 is not equal to address 1, address 2, or address 3. Therefore, the selection input of data selector 320a is 0, and the local selection circuit 321 determines the row hammer address based on the output of data selector 320b. Specifically, the NAND gate corresponding to the selection input of data selector 320b is connected to the comparison results related to address 1: eq12 and eq13. When either eq12 or eq13 is 0, the output of the NAND gate is 1, and data selector 320b outputs address 1. Furthermore, data selector 320a also outputs address 1 as the row hammer address. Here, if either eq12 or eq13 is 0, it indicates that address 1 stores the same access address as address 2 or address 3. Thus, with four valid addresses, address 1 can be determined as the access address with the most occurrences, i.e., the row hammer address.
[0126] Furthermore, when eq12 and eq13 are not 0, it indicates that address 1 is not equal to address 2 and address 3. In this case, if the comparison result of address 2 and address 3, eq23, is equal to 0, then address 2 and address 3 are equal, and output address 2 as the row hammer address. If the comparison result of address 2 and address 3, eq23, is equal to 1, then address 2 and address 3 are also not equal, meaning that all four valid addresses are not equal. It should be noted that when all four valid addresses are not equal, any address can be selected for row hammer refresh. For example, based on the local selection circuit, when all four addresses are not equal, output address 2 is used as the row hammer address. In other embodiments, row hammer refresh operation can be omitted to save device power consumption, and address 2 can also be output as the row hammer address according to the local selection circuit 321.
[0127] Reference Figure 7C As shown, a partial selection circuit 322 of a preset selection circuit 320 is illustrated. Similarly, the partial selection circuit 322 can be composed of a data selector 320c and a NAND gate. When the preset register 230 includes any two or three valid addresses: address 0, address 1, address 2, and address 3, the partial selection circuit 322 can be used to output the row hammer address.
[0128] Specifically, taking addresses 0, 1, and 2 as valid addresses as an example, the two inputs of data selector 320c are connected to addresses 0 and 1 respectively. The selection terminal of data selector 320c is connected to the output of a NAND gate. The input of the NAND gate includes the comparison results related to address 0 in the preset comparison circuit 310: eq01 and eq02. For example, when either eq01 or eq02 is 0, the output of the NAND gate is 1, and data selector 320c outputs address 0 as the row hammer address. Since address 0 shares the same access address as address 1 or address 2, in the case of three valid addresses, the preset number can be set to 2, thereby confirming address 0 as the centrally accessed address, i.e., the row hammer address.
[0129] On the other hand, when eq01 and eq02 are not 0, it means that address 0 is not equal to address 1 and address 2. In this case, if the comparison result of address 1 and address 2, eq12, is equal to 0, then address 2 and address 3 are equal, and address 1 can be output as the row hammer address. If the comparison result of address 1 and address 2, eq12, is equal to 1, then address 2 and address 3 are also not equal, that is, the above three valid addresses are not equal.
[0130] Specifically, taking address 0 and address 1 as valid addresses as an example, we only need to output the corresponding row hammer address based on the comparison result of eq01. For example, eq01 = 0 means that address 0 and address 1 are equal, so we can output address 0 or address 1 as the row hammer address; eq01 = 1 means that 0 and address 1 are not equal, so we don't need to output the row hammer address, or we can output address 1 as the row hammer address.
[0131] Reference Figure 7D The diagram shows a schematic of the preset selection circuit 320 in an embodiment of this application. The preset selection circuit 320 includes a local selection circuit 321 and a local selection circuit 322. The output Total4<16:0> of the local selection circuit 321 is used as the input of the data selector 320d, and the output Total23<16:0> of the local selection circuit 322 is used as the input of the data selector 320e.
[0132] Specifically, the input terminal of data selector 320d is connected to the output terminal Total4<16:0> of local selection circuit 321 and the output terminal of data selector 320e, and the selection terminal of data selector 320d is connected to address number 4. Here, refer to Figure 6 As shown, if the output of address number 4 is 1, it means that the preset register stores 4 valid addresses. Then the addresses output by the preset selection circuit 320 and the local selection circuit 321 at the output terminal Total4<16:0> are the same.
[0133] On the other hand, if the output of address number 3 or address number 2 is 1, it indicates that the preset register stores three or two valid addresses. In this case, the addresses output by data selector 320e and the local selection circuit 322 (Total23<16:0>) are the same, and the row hammer address is further output through the output of data selector 320d. Furthermore, if address number 1 is 1 and all other address numbers are 0, it indicates that the preset register only stores address 0. In this case, the row hammer address may not be output, or address 0 may be directly output as the row hammer address.
[0134] It is understandable that the above appendix Figure 6 To be continued Figure 7D Only the structure of the four-bit shift register and the corresponding preset comparison circuit 310 and preset selection circuit 320 is shown. In this embodiment, more bits of shift register or other register circuits can be set to realize the confirmation of the row hammer address, which can further improve the randomness and the accuracy of the row hammer address.
[0135] Reference Figure 8 As shown, this application embodiment also provides a refresh method, including: step S801, responding to a row hammer refresh command, starting to count a first count value; step S802, within a sampling period when the first count value meets a preset condition, obtaining the access address of each access instruction; wherein, the preset condition is: a numerical range determined according to at least one random number; step S803, determining the row hammer address from the access addresses according to the number of each access address obtained within the sampling period; step S804, performing a row hammer refresh operation on the memory cells coupled to the address lines adjacent to the row hammer address.
[0136] It should be noted that the above refresh method can be implemented through logic control circuits in the memory or through a memory controller coupled to the memory. The following explanation will use logic control circuits as an example.
[0137] In step S801, the memory's logic control circuit can respond to the row hammer refresh command and drive the counter to count the first count value. This counting operation can be implemented using a ring oscillator and a counter, and the count value generated by the counter can be used as the aforementioned first count value. Alternatively, before receiving the row hammer refresh command, the first count value can accumulate from 0 to the maximum value of the counter within its cycle, then automatically reset to 0 and begin a new cycle of counting. After responding to the row hammer refresh command, the first count value can also be reset, i.e., it restarts counting from 0.
[0138] In step S802, the memory input / output (I / O) circuit can receive various access instructions, which include command and address signals. The command signal is stored in the command register, and the address signal is stored in the address register. On the other hand, the memory can generate random numbers using electronic components such as a ring oscillator or a counter, and latch these random numbers. Upon responding to a row hammer refresh command, the logic control circuit can compare the aforementioned first count value with the random number determined by the random number, and output the corresponding sampling pulse when the condition is met, thereby obtaining the access address of each access instruction from the address register.
[0139] In step S803, the logic control circuit in the memory may include electronic components such as comparators to compare whether the access addresses stored in the registers are equal, thereby determining the number of each access address. For example, any two access addresses can be compared to determine whether they are repeated addresses, and then the access address with the largest number, or with a number greater than or equal to a preset number, can be selected as the aforementioned row hammer address based on the output result of the comparator.
[0140] In step S804, the logic control circuit can perform a row hammer refresh operation on the memory cells coupled to the address lines adjacent to the row hammer address, based on the row hammer address, the driving voltage generator, and the row decoder circuit structure. Specifically, the logic control circuit generates a corresponding refresh instruction for the voltage generator and the address register. The voltage generator generates a corresponding refresh voltage, and the address register transmits the victim row with the adjacent physical location of the row hammer address to the row driver. Finally, the victim row is refreshed using the refresh voltage. It should be noted that the above refresh operation refers to refreshing the memory cells coupled within the victim row, that is, applying a refresh voltage to the gate of the corresponding memory cell.
[0141] The refresh method provided in this application uses random numbers to determine preset conditions and obtains access addresses within a sampling period when the first count value meets the preset conditions. This increases the randomness of the sampled addresses and reduces the risk of attacks by external programs. Furthermore, the number of occurrences of each access address obtained within the sampling period is calculated, and the row hammer address is determined. Finally, a row hammer refresh operation is performed on the victim rows adjacent to the row hammer address based on the row hammer address. This improves the reliability of random sampling and the accuracy of the row hammer address.
[0142] In some embodiments, the refresh method further includes: obtaining at least one random number in response to a row hammer refresh command.
[0143] In this embodiment, the preset condition requires at least one random number to be determined, which can be obtained by a logic control circuit. Exemplarily, the logic control circuit may also include a ring oscillator, a counter, or other electronic components. The counter can perform random counting operations based on the periodic pulse signal generated by the ring oscillator, and in the state where the random number unit responds to the row hammer refresh command, the counter can obtain the random value at the current moment as the random number. Thus, multiple counters and ring oscillators can be used to obtain multiple random numbers.
[0144] In other embodiments, at least one random number may also be generated by the memory controller and provided to the memory.
[0145] Reference Figure 9 As shown in the embodiments of this application, a memory 910 and a storage system 900 are also provided. The memory 910 includes: a storage cell array; peripheral circuitry coupled to the storage cell array; and a refresh circuit shown in the above embodiments. The storage system 900 includes: the memory 910; and a controller 920 coupled to the memory 910. The controller 920 is used to control the memory 910.
[0146] In the embodiments of this application, the memory 910 may be a semiconductor memory including but not limited to NAND flash memory, vertical NAND flash memory, NOR flash memory, dynamic random access memory (DRAM), ferroelectric random access memory (FRAM), magnetic random access memory (MRAM), phase change random access memory (PCRAM), resistive random access memory (RRAM), or nano random access memory (NRAM), etc.
[0147] On the other hand, the controller 920 can be coupled to the memory 910 through multiple interfaces and can control operations such as reading, erasing, and programming of the memory 910. In some embodiments, the controller 920 can be designed to operate in low duty cycle environments, such as secure digital cards (SD cards), compact flash memory (CF cards), or universal serial bus (USB) flash drives, or for use in electronic devices such as personal calculators, digital cameras, or mobile phones. In other embodiments, the controller 2100 can also be designed to operate in high duty cycle environments, such as solid-state drives (SSDs) or embedded multimedia cards (eMMCs), and the SSD or eMMC can be used as data storage for mobile devices such as smartphones, tablets, and laptops, as well as enterprise storage arrays.
[0148] In some embodiments, the controller 920 can manage data in the memory 910 and communicate with a host. Exemplarily, the controller 920 can be configured to control operations such as reading, erasing, and programming of the memory 910; it can also be configured to manage various functions relating to data stored or to be stored in the memory 910, including but not limited to bad block management, garbage collection, logical-to-physical address translation, wear leveling, etc.; and it can also be configured to process error correction codes (ECC) relating to data read from or written to the memory 910.
[0149] In other embodiments, controller 920 may also perform any other suitable functions, such as formatting memory 910, or communicating with external devices (e.g., a host) according to a specific communication protocol. Exemplarily, controller 920 may communicate with external devices via at least one of a variety of interface protocols, such as USB, MMC, Peripheral Component Interconnect (PCI), PCI-E, Advanced Technology Attachment (ATA), Serial ATA, Parallel ATA, Small Computer Small Interface (SCSI), Enhanced Small Disk Interface (ESDI), Integrated Drive Electronics (IDE), or Firewire, etc.
[0150] It should be noted that the features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0151] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the above claims.
Claims
1. A refresh circuit, characterized in that, The refresh circuit includes: A counting unit is used to respond to a hammer refresh command and start counting a first count value; the first count value is the number of periodic pulse signals generated by the ring oscillator within the counting unit; wherein, the counting unit includes a random number unit, which is used to respond to the hammer refresh command and obtain a first random number and a second random number; A sampling unit, connected to the counting unit, is used to obtain the access address of each access instruction within a sampling period in which the first count value meets a preset condition; wherein, the preset condition includes a first preset condition; the first preset condition is: satisfying a numerical range in which the first count value is greater than or equal to the first random number and less than the sum of the first random number and the second random number; the sampling period is a continuous numerical range in which the first count value always meets the preset condition; A calculation unit, connected to the sampling unit, is used to determine the row hammer address from the access addresses based on the number of each access address obtained during the sampling period. A refresh unit, connected to the computing unit, is used to perform a row hammer refresh operation on the memory cell coupled to the address line adjacent to the row hammer address.
2. The refresh circuit according to claim 1, characterized in that, The random number unit includes: The first random unit is configured to perform a first random operation and respond to the received row hammer refresh command, using the random value generated by the first random operation as the first random number.
3. The refresh circuit according to claim 2, characterized in that, The first random number is less than the maximum count value of the first random unit; The random number unit further includes: The second random unit, connected to the first random unit, is used to perform a second random operation and respond to the received row hammer refresh command, using the random value generated by the second random operation as the second random number; wherein, the maximum count value of the second random unit is the difference between the maximum count value of the first random unit and the first random number.
4. The refresh circuit according to claim 1, characterized in that, The sampling unit is used to obtain the access address of each access instruction based on the first preset condition when the row hammer refresh command satisfies the first sequence condition; wherein, the first sequence condition is: the odd-numbered row hammer refresh command starting from a preset time.
5. The refresh circuit according to claim 2, characterized in that, The preset conditions include a second preset condition; the second preset condition is: The first count value is greater than or equal to zero and less than the value range of the first random number.
6. The refresh circuit according to claim 5, characterized in that, The sampling unit is used to obtain the access address of each access instruction based on the second preset condition when the row hammer refresh command satisfies the second sequence condition; wherein, the second sequence condition is: the even-numbered row hammer refresh command starting from the preset time.
7. The refresh circuit according to any one of claims 1-6, characterized in that, The sampling unit includes: The pulse generation module is used to generate a sampling pulse according to the received access instruction during the sampling period when the first count value meets the preset conditions; The address sampling module is connected to the pulse generation module and the preset register; the address sampling module is used to store the access address of the access instruction into the preset register based on the sampling pulse.
8. The refresh circuit according to claim 7, characterized in that, The access instructions include: an activation command and a precharge command; The pulse generation module is specifically used to: respond to the activation command by setting a preset sampling signal to a first level; wherein the preset initial state of the sampling signal is a second level; and In response to the precharge command, the sampling signal is reset to the second level to form the sampling pulse.
9. The refresh circuit according to claim 8, characterized in that, The address sampling module is specifically used to: in response to the jumping edge of the sampling signal switching from the first level to the second level, store the access address of the access instruction into the preset register.
10. The refresh circuit according to claim 7, characterized in that, The calculation unit is specifically used to: determine the number of each access address based on at least one access address stored in the preset register; and determine the access addresses whose number is greater than or equal to the preset number as the row hammer address.
11. The refresh circuit according to claim 10, characterized in that, The computing unit includes: A preset comparison circuit is used to receive any two access addresses stored in the preset register and output a comparison result; wherein, the comparison result is used to indicate whether the two input access addresses are the same; A preset selection circuit is connected to the preset comparison circuit; the preset selection circuit is used to receive each access address and the comparison result of the preset comparison circuit for each access address, and output an access address with a number greater than or equal to a preset number according to the comparison result; wherein, the access address output by the preset selection circuit is the row hammer address.
12. A refresh method, characterized in that, The refresh method includes: In response to the hammer refresh command, counting of the first count value begins; the first count value is the number of periodic pulse signals generated by the ring oscillator in the counting unit; In response to the row hammer refresh command, obtain a first random number and a second random number; Within a sampling period in which the first count value meets a preset condition, the access address of each access instruction is obtained; wherein, the preset condition includes a first preset condition; the first preset condition is: satisfying the numerical range in which the first count value is greater than or equal to the first random number and less than the sum of the first random number and the second random number; the sampling period is a continuous numerical range in which the first count value always meets the preset condition; Based on the number of each access address obtained during the sampling period, determine the row hammer address from the access addresses; A row hammer refresh operation is performed on the memory cell coupled to the address line adjacent to the row hammer address.
13. A memory, characterized in that, The memory includes: Storage cell array; Peripheral circuitry is coupled to the memory cell array; the peripheral circuitry includes the refresh circuitry as described in any one of claims 1-11.
14. A storage system, characterized in that, The storage system includes: The memory includes the refresh circuit as described in any one of claims 1-11; A controller is coupled to the memory; the controller is used to control the memory.
Citation Information
Patent Citations
Refresh control circuit and memory
CN112767983A
Refresh circuit and memory
CN114420181A
