Refresh control circuit and memory
By designing the refresh control circuit in the memory and using the counting circuit and indicator circuit to determine the refresh request, the problem of row hammer vulnerability is solved, effective RH protection is achieved when the refresh management function is turned off, simplifying the design and saving circuit area.
Patent Information
- Application Number
- CN202310436851.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2024-10-29
AI Technical Summary
As memory size shrinks and integration increases, interference between adjacent memory cells leads to row hammering vulnerabilities, and it is difficult for existing technologies to effectively prevent erroneous flipping of memory cell data, especially when the refresh management function is turned off.
A refresh control circuit is designed, including a control circuit, a counting circuit and an indication circuit. By receiving address command signals and indication signals, it determines whether to execute a full block or same block refresh request, and outputs when the count result reaches the preset range. Valid or invalid indication signal to achieve RH protection operation.
When the refresh management function is turned off, the RH protection frequency can be flexibly adjusted to ensure that the memory can still effectively prevent data flipping when the refresh management function is turned off, simplifying the RH protection design and saving circuit area.
Smart Images

Figure CN118866037A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to memory technology, and in particular to a refresh control circuit and a memory. Background Art
[0002] With the development of memory technology, memories are widely used in various fields. For example, dynamic random access memory (DRAM) is widely used.
[0003] In practical applications, as the size of memory becomes smaller and smaller and the integration becomes higher and higher, interference between adjacent memory cells may cause row hammer (RH) vulnerability. Specifically, RH vulnerability means that when a certain memory cell of the memory is repeatedly read and written, it may cause the data in other memory cells to flip. Therefore, it is necessary to provide an effective refresh control scheme to control the execution of RH protection operations, such as refresh management (RFM) refresh, to avoid erroneous flipping of memory cells in the memory. Summary of the invention
[0004] Embodiments of the present application provide a refresh control circuit and a memory.
[0005] According to some embodiments, the first aspect of the present application provides a refresh control circuit, including: a control circuit, a counting circuit and an indication circuit; the control circuit is connected to the output end of the indication circuit, and is used for, when the refresh management function is turned off, if the indication circuit currently outputs an invalid indication signal, then outputting a full-block regular refresh request or a same-block regular refresh request according to the received address command signal; if the indication circuit currently outputs a valid indication signal, then outputting a full-block refresh management refresh request or a same-block refresh management refresh request according to the received address command signal; the counting circuit is connected to the output end of the control circuit, and is used for counting the cumulative number of times the control circuit continuously outputs the same-block regular refresh request and the same-block refresh management refresh request, and outputting the counting result; and, in response to the current counting result reaching a set upper limit value, or the control circuit outputting a full-block regular refresh request or a full-block refresh management refresh request, performing a reset and restarting the counting; the indication circuit is connected to the output end of the counting circuit, and is used for outputting a valid indication signal if the current counting result is within a preset range, otherwise, outputting an invalid indication signal.
[0006] In some embodiments, the control circuit is also used to output a full-block regular refresh request, a same-block regular refresh request, a full-block refresh management refresh request, or a same-block refresh management refresh request according to a received address command signal when the refresh management function is turned on; wherein the address command information includes a first address command and a second address command; wherein different level states of the first address command respectively represent a regular refresh type and a refresh management refresh type, and different level states of the second address command respectively represent a full-block refresh type and a same-block refresh type.
[0007] In some embodiments, the control circuit includes: a first control sub-circuit, receiving a mode register instruction, a first address command and an indication signal, for detecting whether the refresh management function is turned on according to the mode register instruction, and outputting a first signal in combination with the first address command and the indication signal; wherein, if the refresh management function is turned on, a first signal consistent with the first address command is output; if the refresh management function is turned off, a first signal representing a conventional refresh type is output in response to a currently invalid indication signal, and a first signal representing a refresh management refresh type is output in response to a currently valid indication signal; a transmission circuit, receiving a second address command, for delaying the second address command for a predetermined period of time and then outputting it as a second signal; a decoding circuit, connected to the first control sub-circuit and the transmission circuit, for receiving the first signal and the second signal, and in response to the refresh instruction, outputting a corresponding type of refresh request according to the level state of the first signal and the second signal.
[0008] In some embodiments, the first control subcircuit includes: a first NOT gate, a first NAND gate, a second NOT gate, a second NAND gate and a first AND gate; the first input end of the first NAND gate receives an indication signal; the input end of the first NOT gate receives a mode register instruction, the output end of the first NOT gate is connected to the second input end of the first NAND gate, and the output end of the first NAND gate is connected to the first input end of the first AND gate; the first input end of the second NAND gate receives the mode register instruction; the input end of the second NOT gate receives a first address command, the output end of the second NOT gate is connected to the second input end of the second NAND gate, and the output end of the second NAND gate is connected to the second input end of the first AND gate; the output end of the first AND gate is used to output a first signal; wherein, a high level of the mode register instruction indicates that the refresh management function is turned on, and a low level of the mode register instruction indicates that the refresh management function is turned off; a high level of the indication signal indicates that the indication signal is valid, and a low level of the indication signal indicates that the indication signal is invalid.
[0009] In some embodiments, the transmission circuit includes: an even number of third NOT gates connected in series and a first buffer; the input end of the first third NOT gate receives the second address command, the output end of the last third NOT gate is connected to the input end of the first buffer, and the output end of the first buffer is used to output the second signal.
[0010] In some embodiments, the decoding circuit includes: a first trigger, the input end of the first trigger receives the first signal, the in-phase output end of the first trigger is used to output the first sub-signal, the in-phase output end of the first trigger is used to output the second sub-signal, and the clock end of the first trigger receives the refresh instruction; a second trigger, the input end of the second trigger receives the second signal, the in-phase output end of the second trigger is used to output the third sub-signal, the in-phase output end of the second trigger is used to output the fourth sub-signal, and the clock end of the second trigger receives the refresh instruction; a second buffer, the input end of the second buffer receives the refresh instruction, and the second buffer is used to delay the refresh instruction and then output it; a first multi-input AND gate, the input ends of the first multi-input AND gate are respectively connected to the second sub-signal The first multi-input AND gate is used to output a full-block refresh management refresh request; the second multi-input AND gate, the input ends of the second multi-input AND gate are respectively connected to the first sub-signal, the fourth sub-signal and the output end of the second buffer, and the second multi-input AND gate is used to output a full-block regular refresh request; the third multi-input AND gate, the input ends of the third multi-input AND gate are respectively connected to the first sub-signal, the third sub-signal and the output end of the second buffer, and the third multi-input AND gate is used to output a same-block regular refresh request; the fourth multi-input AND gate, the input ends of the fourth multi-input AND gate are respectively connected to the second sub-signal, the third sub-signal and the output end of the second buffer, and the fourth multi-input AND gate is used to output a same-block refresh management refresh request.
[0011] In some embodiments, the counting circuit includes: a counting clock circuit, a reset circuit and a multi-stage third flip-flop corresponding to the binary bit; the counting clock circuit is connected to the control circuit, and is used to output the counting clock when a regular refresh request for the same block is received, or when the current indication signal is valid and a refresh management refresh request for the same block is received; the clock end of the first-stage third flip-flop is connected to the output end of the counting clock circuit, and the clock ends of other third flip-flops are connected to the inverting output end of the third flip-flop of the previous stage; the input end of each third flip-flop is connected to the inverting output end of the third flip-flop, and the value output by the in-phase output end of each stage of the third flip-flop constitutes the output of the counting circuit, which is a binary representation of the counting result; the input end of the reset circuit is connected to the output end of the control circuit and the multi-stage third flip-flop, and is used to output a reset signal when a regular refresh request for the entire block or a refresh management refresh request for the entire block is received, or when the counting result is an upper limit value; the output end of the reset circuit is connected to the reset end of each stage of the third flip-flop.
[0012] In some embodiments, the counting clock circuit includes: a second AND gate and a first OR gate; the first input end of the first OR gate receives a regular refresh request for the same block, the second input end of the first OR gate is connected to the output end of the second AND gate, the output end of the first OR gate serves as the output end of the counting clock circuit, and is connected to the clock end of the first-stage third trigger; the first input end of the second AND gate receives a refresh management refresh request for the same block, and the second input end of the second AND gate receives an indication signal.
[0013] In some embodiments, the reset circuit includes: a second OR gate, a third OR gate and a fifth multi-input AND gate; the first input end of the second OR gate receives a full block refresh management refresh request, and the second input end of the second OR gate receives a full block regular refresh request; the fifth multi-input AND gate has multiple input ends for receiving multiple first input signals and performing AND logic operations; the multiple first input signals correspond to multiple bits of the upper limit value, if any bit in the upper limit value is a high level, the corresponding first input signal is the corresponding bit of the counting result, if any bit in the upper limit value is a low level, the corresponding first input signal is the inverted signal of the corresponding bit of the counting result; the first input end of the third OR gate is connected to the output end of the second OR gate, the second input end of the third OR gate is connected to the output end of the fifth multi-input AND gate, and the output end of the third OR gate is used to output a reset signal.
[0014] In some embodiments, the preset range is 16 to 20.
[0015] In some embodiments, the indication circuit includes: a sixth multi-input AND gate, the sixth multi-input AND gate having multiple input terminals, respectively receiving the inverted signal of the 1st bit, the inverted signal of the 2nd bit, the signal of the 3rd bit, the inverted signal of the 4th bit and the signal of the 5th bit in the current counting result; a seventh multi-input AND gate, the seventh multi-input AND gate having multiple input terminals, respectively receiving the inverted signal of the 3rd bit, the inverted signal of the 4th bit and the signal of the 5th bit in the current counting result; a fourth OR gate, the first input terminal of the fourth OR gate is connected to the output terminal of the sixth multi-input AND gate, the second input terminal of the fourth OR gate is connected to the output terminal of the seventh multi-input AND gate, and the output terminal of the fourth OR gate is used to output an indication signal.
[0016] According to some embodiments, the second aspect of the present application provides a memory, including: a row hammer refresh operation module and a refresh control circuit as in the previous example; the row hammer refresh operation module is connected to the refresh control circuit, and is used to perform a row hammer refresh in response to a same-block refresh management refresh request output by the refresh control circuit.
[0017] The refresh control circuit and memory provided in the embodiment of the present application include a control circuit, a counting circuit and an indication circuit. When the refresh management function is turned off, the control circuit determines whether to perform a regular refresh or an RFM refresh based on whether the indication signal is valid, wherein whether the indication signal is valid is determined by the indication circuit based on the counting result of the cumulative number of consecutive outputs of the same-block regular refresh request and the same-block refresh management refresh request by the counting circuit. In the above scheme, when the refresh management function is turned off, according to the state of the indication signal, the corresponding type of refresh request is output based on the received address command signal, so that the RH protection operation can still be implemented when the refresh management function is turned off. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description, are used to explain the principles of the embodiments of the present application.
[0019] Figure 1 An example diagram of a memory architecture according to an embodiment;
[0020] Figure 2 A structural diagram of a storage unit according to an embodiment of the present invention;
[0021] Figure 3 An example situation where hammering occurs;
[0022] Figure 4 is a structural schematic diagram of an exemplary refresh control circuit;
[0023] Figure 5 is a structural example diagram of an exemplary control circuit;
[0024] Figure 6 is a structural example diagram of a first control subcircuit of an example;
[0025] Figure 7 is a structural example diagram of an exemplary control circuit;
[0026] Figure 8 is a structural example diagram of an exemplary decoding circuit;
[0027] Fig. 9 is a structural example diagram of an exemplary counting circuit;
[0028] Fig.10 is a structural example diagram of an exemplary reset circuit;
[0029] Fig.11 is a structural example diagram of an exemplary indicating circuit;
[0030] Fig.12 A refresh request counter for an example;
[0031] Fig.13 A diagram showing an example structure of a memory device.
[0032] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0033] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application.
[0034] The terms "including" and "having" in this application are used to express an open-ended inclusive meaning, and mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms "first" and "second" are used only as marks or distinctions, and are not intended to limit the order or quantity of their objects. In addition, the different elements and regions in the drawings are only schematically shown, and are therefore not limited to the sizes or distances shown in the drawings.
[0035] The technical solution is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0036] The technical solution is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.
[0037] Figure 1 FIG. 1 is an example diagram of a memory architecture shown in an embodiment, such as Figure 1 As shown, taking DRAM as an example, it includes data input / output buffer, row decoder, column decoder, sense amplifier and storage array. Among them, the data input / output buffer belongs to the peripheral area circuit, and the sense amplifier, row decoder, column decoder and storage array belong to the array area circuit. The storage array is mainly composed of word lines, bit lines and storage cells. The word lines in the storage array extend in the row direction, and the bit lines in the storage array extend in the column direction. The intersection of the word lines and the bit lines is the storage cell of the storage array.
[0038] Each storage unit is used to store one bit of data. Figure 2 As shown, Figure 2 This is a structural example diagram of a memory cell according to an embodiment, and the memory cell is mainly composed of a transistor switch M and a capacitor C. The capacitor is used to store data, and the transistor switch is used to turn off or on according to the selected state.
[0039] A certain storage cell can be activated by controlling the word line and the bit line to access the storage cell. Take the read scenario as an example: when the data in the storage cell needs to be read, the word line of the row where the storage cell is located can be selected through the row decoder, and accordingly, the transistor M in the diagram is turned on, and the state of the capacitor C at this time can be sensed by sensing and amplifying the bit line signal. For example, if the bit data stored in the storage cell is 1, then after the transistor M is turned on, 1 will be read from the bit line of the storage cell, and vice versa. In addition, take the write scenario as an example: when bit data needs to be written to a certain storage cell, such as writing 1. The word line of the row where the storage cell is located can be selected through the row decoder, and the corresponding transistor M in the diagram is turned on, and by setting the logic level of the bit line to 1, the capacitor C is charged, that is, 1 is written to the storage cell. Conversely, if 0 is to be written, the logic level of the bit line is set to 0, so that the capacitor C is discharged, that is, 0 is written to the storage cell.
[0040] Combined with the above, it can be seen that when the processor needs to read data from the memory, it will first activate the row address where the data is located, read the row of data under the row address into the sense amplifier, and then activate the column address where the data is located, read the data under the column address from the sense amplifier and feed it back to the processor. At the same time, in order to ensure that data is not lost due to data reading, after reading the data, the data in the sense amplifier needs to be written back to the storage unit. In recent years, with the higher demand for computer storage in production and life, equipment manufacturers hope to store more data without changing the size of the circuit board area. Therefore, the density of the storage unit can only be made larger and larger, and the interval between adjacent storage units is getting smaller and smaller, which may cause mutual interference between each other. For example, if the number of read and write times for the same address is large enough, it may cause the bits of adjacent rows to flip, that is, the originally stored 0 becomes 1, or the originally stored 1 becomes 0.
[0041] Further integration Figure 3 For example, Figure 3 For example, a hammer strike occurs when Figure 3As shown in the figure, when an attacker hammers a specific row of the memory, such as hammering the row filled with shade in the figure, the data in the memory cells near the row may be flipped. This is because, with the increasing manufacturing precision of DRAM, the components are getting smaller and smaller at the physical level, and electromagnetic interference is prone to occur between adjacent memory cells. This situation makes it possible for reading and writing a single area of the memory to interfere with adjacent areas, causing current to flow into or out of adjacent memory cells. If a large number of reads and writes are repeated, it is possible to change the data in adjacent memory cells. For example, in the adjacent row of the row filled with shade in the figure, that is, the affected row (Victim Row), part of the data in the adjacent row is flipped, such as the data in the third and fifth columns, which is flipped from 1 to 0.
[0042] In response to the above phenomenon, in some example solutions, a special row hammer protection (RH protection) solution is configured. Specifically, the memory monitors the number of times a row is activated, and when the number reaches the set value, the rows near the row are refreshed. Taking the double rate synchronous dynamic random access memory (DDR) as an example, in order to better protect data and achieve RH protection, DDR5 / LPDDR5 introduces a refresh management function (RFM feature). Simply put, when the refresh management function is turned on, the central processing unit (CPU) will send some additional refresh commands to the DRAM after detecting that a certain storage block (bank) of the DRAM has received too many activation commands, namely, refresh management refresh requests (RFM refresh requests). The corresponding DRAM responds to the refresh management refresh request and performs the additional refresh required for RH protection, namely, refresh management refresh (RFM refresh). Among them, the refresh management refresh request is further divided into the full block refresh management refresh request (RFMAB) and the same block refresh management refresh request (RFM SB). The difference between the two is whether the refresh object is all storage blocks (Bank) of all storage groups (Bank Group) or a certain storage block of all storage groups.
[0043] In practical applications, you can choose to set whether the refresh management function is turned on. However, regardless of whether the refresh management function is turned on, considering the security and stability of the data, the memory should perform RH protection. Some aspects of the embodiments of the present application involve the above considerations. The following is an example introduction of the solution in combination with some embodiments.
[0044] Figure 4 FIG. 1 is a schematic diagram of a refresh control circuit as an example. Figure 4 As shown, the refresh control circuit includes: a control circuit 11, a counting circuit 12 and an indication circuit 13;
[0045] The control circuit 11 is connected to the output end of the indication circuit 13, and is used for outputting a full-block normal refresh request (REF AB request) or a same-block normal refresh request (REF SB request) according to the received address command signal CA<…> if the indication circuit 13 currently outputs an invalid indication signal FLAG when the refresh management function is turned off, and outputting a full-block refresh management refresh request (RFMAB request) or a same-block refresh management refresh request (RFM SB request) according to the received address command signal CA<…> if the indication circuit 13 currently outputs a valid indication signal FLAG;
[0046] The counting circuit 12 is connected to the output end of the control circuit 11, and is used to count the cumulative number of times the control circuit 11 continuously outputs the REF SB request and the RFM SB request, and output the counting result; and, in response to the current counting result reaching the set upper limit value, or the control circuit 11 outputs the REF AB request or the RFM AB request, perform a reset and restart the counting;
[0047] The indication circuit 13 is connected to the output end of the counting circuit 12 and is used for outputting a valid indication signal FLAG if the current counting result is within a preset range, and outputting an invalid indication signal FLAG otherwise.
[0048] In practical applications, the circuit provided in this embodiment can be applied to various memories. As an example, it can be applied to, including but not limited to, double data rate synchronous dynamic random access memory (DDR for short).
[0049] Among them, the REF request is used to request the memory to perform a regular refresh. The regular refresh mentioned here includes the refresh that the memory needs to perform in order to achieve normal retention of data. Specifically, combined with the working principle of the aforementioned memory, it can be known that data storage is actually achieved by storing a certain charge on the capacitor in the storage unit. For example, the presence of charge on the capacitor indicates that the stored data is 1, and the absence of charge indicates that the stored data is 0. In practical applications, since the charge on the capacitor will be lost over time, in order to retain the stored data, it is set to replenish the charge of the capacitor in each storage unit of the memory at intervals to maintain the charge on the capacitor in a state corresponding to the data stored in the storage unit. This process is called regular refresh. The specific processing process of regular refresh includes reading out the stored data and rewriting it.
[0050] According to the refresh granularity, REF refresh further includes REF AB refresh and REF SB refresh. Similarly, the difference between the two is whether the object of the regular refresh is all the storage blocks of all storage groups or a certain storage block of all storage groups. It can be seen that the granularity of the same block refresh, such as the same block regular refresh and the same block refresh management refresh, is smaller than the full block refresh, such as the full block regular refresh and the full block refresh management refresh.
[0051] Combined with the scenario example: When the refresh management function (RFM) is turned off, the memory first performs a normal refresh, that is, the control circuit 11 outputs a REF AB request or a REF SB request according to the address command signal CA<…>. At the same time, the counting circuit 12 counts the number of consecutive executions of REF SB refresh. When the number of consecutive executions of REF SB refresh is within a preset range, the indication circuit 13 outputs a valid indication signal FLAG; accordingly, when the indication signal FLAG is valid, the control circuit 11 outputs an RFM AB request or an RFM SB request according to the address command signal CA<…>. At the same time, the counting circuit 12 continues to accumulate the number of consecutive executions of RFM SB refresh based on the previous counting result of the consecutive execution of REF SB refresh, until the counting result reaches the set upper limit value, and then resets to 0. Accordingly, the indication circuit 13 outputs an invalid indication signal FLAG, and the memory performs a normal refresh again.
[0052] In combination with the above scheme, the frequency of RFM SB refresh can be flexibly adjusted when the refresh management function is turned off. For example, taking the example of executing a group of same-block refresh management refresh after every four groups of same-block regular refreshes, the starting value of the preset range can be set to the sum of the number of four groups of same-block regular refreshes. Taking the example of each group of same-block regular refreshes including four same-block regular refreshes, it can be seen that the total number of refreshes of the four groups of same-block regular refreshes is 16, so the starting value of the preset range can be set to 16. The end value of the preset range can be set according to the number of refreshes required for each group of same-block refresh management refreshes. For example, if each group of same-block refresh management refreshes is also set to include four same-block refresh management refreshes, the end value of the preset range can be set to 20. That is, in one example, the preset range is 16 to 20. Correspondingly, when the counting result is 16 to 20, the indication circuit 13 outputs a valid indication signal. Furthermore, an upper limit value can be set as needed, so that after the refresh management refresh of the same block is completed, the counting result is reset, the counting circuit 12 is controlled to enter the next round of counting, and the corresponding indication circuit 13 outputs an invalid indication signal again, and the memory performs a regular refresh of the entire block or the same block according to the received address command signal. In combination with the above example, the upper limit value can be set to 20.
[0053] In combination with the above scheme, when the refresh management function is turned off, the RFM SB refresh can be timely executed according to the flexibly adjustable RH protection frequency based on the actual refresh situation of the memory, so that when the refresh management function is turned off, the RH protection can still be timely and effectively implemented. In addition, the scheme of this embodiment cleverly uses the circuit originally used to generate the RFM SB request. When the RFM function is turned off, the circuit is reused to generate a refresh request for RH protection, that is, a set of RH control circuits can be shared for REF SB and RFM SB, and there is no need to design a dedicated circuit specifically for RH protection, thereby further greatly simplifying the design difficulty and complexity of RH and saving circuit area.
[0054] In another case, when the refresh management function is turned on, the refresh control circuit can also respond to the address command information sent by the processor, parse the address command signal, and perform the corresponding refresh. That is, in one example, the control circuit 11 is also used to output a REF AB request, a REF SB request, a RFM AB request, or a RFM SB request according to the received address command signal CA<…> when the refresh management function is turned on;
[0055] Among them, the address command information includes a first address command and a second address command; among them, different level states of the first address command respectively represent a regular refresh type and a refresh management refresh type, and different level states of the second address command respectively represent a full block refresh type and a same block refresh type.
[0056] In one example, the first address command is CA9, and the second address command is CA10. As an example, the mapping relationship between the address command and the refresh type is shown in Table 1. Table 1 is an example of address commands corresponding to different refresh types, where H represents a high level, L represents a low level, V represents an arbitrary value, and RIR is the Refresh Interval Rate Indicator, which is used to indicate whether REF CMD is sent at a frequency of one or two times. The values of the remaining parameters can refer to the relevant technology. Referring to Table 1, when a refresh needs to be performed, the chip select (Chip Select, referred to as CS) signal is in a low level state (L), and the states of the address commands CA0 to CA5 are shown in Table 1, indicating that a refresh is required. Among them, CA9 and CA10 are used to indicate the type of refresh, CA9 is in different level states to indicate whether this refresh is a regular refresh or a refresh management refresh, and CA10 is in different level states to indicate whether this refresh is a full block refresh or a same block refresh. In one example, combined with the example in the table below, CA9 can be set to a low level to indicate an RFM refresh, and not a low level to indicate a REF refresh; CA10 can be set to a low level to indicate a full block refresh, and a high level to indicate a same block refresh. Therefore, based on the status of CA9 and CA10 in the currently received address command signal, the refresh type of this refresh can be determined. For example, when CA9 is at a low level and CA10 is at a high level, it means that the type of this refresh is an RFM refresh of the same block. In addition, as shown in Table 1, CA6 and CA7 are used for same block refresh (such as RFM SB refresh or REFSB refresh) to indicate the Bank that needs to be refreshed. Combined with the example in the table below, assuming that the high level is valid, when CA6 is at a high level and CA7 is at a low level in the received address command information, it means that the Bank that needs to be refreshed in the same block is BA0. Among them, the signal of CA8 can be any value.
[0057] Table 1
[0058]
[0059] By parsing the address command signal, the specific type of refresh can be determined and the corresponding refresh request can be output, so that when the refresh management function is turned on, the memory responds to the instructions issued by the processor and executes the corresponding type of refresh, thereby realizing RH protection when the refresh management function is turned on.
[0060] The control circuit outputs a corresponding type of refresh request in response to the address command signal according to whether the current refresh management function is turned on and whether the indication signal is valid, and the specific implementation circuit is not limited. In one example, Figure 5 FIG. 1 is a structural example diagram of an exemplary control circuit, such as Figure 5 As shown, the control circuit 11 includes:
[0061] The first control sub-circuit 21 receives the mode register instruction MRS<…>, the first address command CA9 and the indication signal FLAG, and is used to detect whether the refresh management function is turned on according to the mode register instruction MRS<…>, and output a first signal in combination with the first address command CA9 and the indication signal FLAG; wherein, if the refresh management function is turned on, a first signal consistent with the first address command CA9 is output; if the refresh management function is turned off, a first signal representing a normal refresh type is output in response to the currently invalid indication signal FLAG, and a first signal representing a refresh management refresh type is output in response to the currently valid indication signal FLAG;
[0062] The transmission circuit 22 receives the second address command CA10, and is used to delay the second address command CA10 for a predetermined time and then output it as a second signal;
[0063] The decoding circuit 23 is connected to the first control subcircuit 21 and the transmission circuit 22, and is used to receive the first signal and the second signal, and in response to the refresh instruction REF CMD, output a corresponding type of refresh request according to the level states of the first signal and the second signal.
[0064] The refresh request includes but is not limited to REF AB request, REF SB request, RFM AB request and RFM SB request. It should be noted that the first address command is CA9 and the second address command is CA10 in the figure. This is only an example. In actual applications, the first address command and the second address command can be determined according to the memory type and model, and can also be other address command signals. Whether the refresh management function is enabled can be determined by reading the data in the mode register. For example, in the mode register MRS58 <0> Different values are defined in the refresh management function to indicate whether the refresh management function is enabled. In actual applications, whether the refresh management function is enabled can be preset by the memory manufacturer. For example, when the refresh management function is disabled, <0> Write 0 to MRS58 when the refresh management function is turned on. <0> Write 1 in the MRS58. <0> The data read from the refresh management function determines whether the refresh management function is enabled.
[0065] It can be understood that when the refresh management function is turned on, the memory responds to the RFM command issued by the processor, executes RFM refresh, and implements RH protection. Therefore, the first control subcircuit 21 can directly transmit the received first address command to the decoding circuit 23 for decoding. Specifically, in this example, when the refresh management function is turned on, the first control subcircuit 21 outputs a first signal that is consistent with the level state of the first address command. That is, "consistent" in this article refers to the consistency of the level state, and does not limit the signals to be exactly the same in timing, because in actual applications, the delays generated during signal generation and transmission also need to be considered. Combined with Figure 5 The structure of the first control subcircuit 21 is that when the refresh management function is turned on, if the CA9 received by the first control subcircuit 21 is at a high level, the first signal output is a high level signal, otherwise, the first signal is a low level signal. At this time, the first control subcircuit 21 actually plays the role of signal transmission. When the refresh management function is turned off, the processor will not indicate the RFM refresh required for RH protection to the memory, so the first control subcircuit 21 will output the first signal according to whether the indication signal FLAG generated by the indication circuit 13 based on the counting result of the counting circuit 12 is valid. Specifically, when there is no need to perform RFM refresh, the indication signal FLAG is in an invalid state, and the first control subcircuit 21 outputs the first signal representing the conventional refresh type, for example, the level state of the first signal is a high level at this time. However, when it is necessary to perform RFM refresh, the indication circuit 13 will output a valid indication signal FLAG, and accordingly, the first control subcircuit 21 will output the first signal representing the refresh management refresh type in response to the valid indication signal FLAG, for example, the level state of the first signal is a low level at this time. That is to say, the regular refresh this time is replaced by a refresh management refresh through the above operation, so that the decoding circuit outputs an RFM refresh request based on the first signal, thereby realizing RH protection when the refresh management function is turned off.
[0066] Specifically, the second address command is used to characterize whether the refresh object is the entire block or the same block, and does not affect whether the current refresh is a regular refresh or a refresh management refresh, so the transmission circuit 22 only needs to transmit the second address command to the decoding circuit 23. Considering the timing matching between the first signal and the second signal, a transmission circuit is set on the transmission path of the second signal to delay the second address command for a certain period of time and then output it to the decoding circuit 23 as the second signal. As an example, the delay parameter of the transmission circuit can be determined according to the timing delay between the first signal and the first address command to match the timing between the first signal and the second signal, so as to avoid the subsequent decoding circuit outputting an erroneous decoding result due to the mismatch of the input signal timing, thereby improving the accuracy of the refresh control.
[0067] The implementation circuits of the first control subcircuit, the transmission circuit and the decoding circuit are not limited. As an example, Figure 6 FIG. 1 is a structural diagram of an exemplary first control subcircuit, such as Figure 6 As shown, the first control subcircuit 21 includes: a first NOT gate 211, a first NAND gate 212, a second NOT gate 213, a second NAND gate 214 and a first AND gate 215;
[0068] The first input end of the first NAND gate 212 receives the indication signal FLAG; the input end of the first NOT gate 211 receives the mode register instruction MRS<…>, the output end of the first NOT gate 211 is connected to the second input end of the first NAND gate 212, and the output end of the first NAND gate 212 is connected to the first input end of the first AND gate 215;
[0069] The first input terminal of the second NAND gate 214 receives the mode register instruction MRS<…>; the input terminal of the second NAND gate 213 receives the first address command CA9, the output terminal of the second NAND gate 213 is connected to the second input terminal of the second NAND gate 214, and the output terminal of the second NAND gate 214 is connected to the second input terminal of the first AND gate 215;
[0070] The output end of the first AND gate 215 is used to output a first signal; wherein, the mode register instruction MRS<…> is a high level indicating that the refresh management function is turned on, and the mode register instruction MRS<…> is a low level indicating that the refresh management function is turned off; the indication signal FLAG is a high level indicating that the indication signal is valid, and the indication signal FLAG is a low level indicating that the indication signal is invalid.
[0071] Specifically, the first control subcircuit 21 plays a transmission role when the refresh management function is turned on, that is, the output level state is consistent with the first address command. When the refresh management function is turned off, if the indication signal is invalid, the output level state represents the first signal of the conventional refresh type; if the indication signal is valid, the output level state represents the first signal of the refresh management refresh type.
[0072] Combination Figure 6The structure of , when the refresh management function is turned on, that is, MRS<…> is 1, MRS<…> passes through the inversion of the first NOT gate 211 (the level state is 0) and reaches the second input terminal of the first NAND gate 212. Since the input of the second input terminal of the first NAND gate 212 is 0, the input signal of the first input terminal, that is, the indication signal is shielded, and no matter whether the level state of the indication signal is 1 or 0, the first NAND gate 212 outputs 1, that is, at this time, the first input terminal of the first AND gate is 1, and the level state of the first signal depends on the level state at the second input terminal of the first AND gate. At this time, the refresh management function is turned on, MRS<…> is 1, that is, at the first input terminal of the second NAND gate 214 is 1, so the level state at the first input terminal of the second NAND gate 214, that is, the level state of the first address command CA9 can be reflected to the output of the second NAND gate. For example, if the first address command is 1, then after the second NOT gate 213 is inverted, 0 is obtained, the second input terminal of the second NAND gate 214 is 0, and the first signal output after the second NAND gate 214 performs the NAND operation is 1, which is consistent with the level state of the first address command CA9. On the contrary, if the first address command CA9 is 0, then after the second NOT gate 213 is inverted, 1 is obtained, the second input terminal of the second NAND gate 214 is 1, and the first signal output after the second NAND gate 214 performs the NAND operation is 0, which is still consistent with the level state of the first address command CA9.
[0073] Still combined Figure 6In the structure, when the refresh management function is turned off, that is, MRS<…> is 0, MRS<…> passes through the inversion of the first NOT gate 211 (the level state is 1) and reaches the second input terminal of the first NAND gate 212. Since the input of the second input terminal of the first NAND gate 212 is 1, the input signal of the first input terminal, that is, the level state of the indication signal FLAG, can be reflected in the output of the first NAND gate 212. For example, if the indication signal is invalid (0), the first input terminal of the first NAND gate 212 is 0, and the first NAND gate 212 outputs 1 after performing an AND operation. For the second NAND gate 214, the signal at the first input terminal, that is, the MRS<…> signal, is 0, so the second NAND gate 214 outputs 1, and accordingly, the first AND gate 215 performs an AND operation on the input signal and outputs the first signal as 1. It should be noted that, in the above example, although the first address command is shielded at the second NAND gate 214, it can be understood that when the refresh management function is turned off, the refresh indicated by the processor is a regular refresh. Therefore, in combination with the example of Table 1 above, it can be seen that the first address command is not 0, for example, it is 1, so the first AND gate 215 outputs a first signal of 1, and the level states of the two are consistent. For another example, if the indication signal is valid (1), the first input end of the first NAND gate 212 is 1, and MRS<…> is 1 after the inversion of the first NAND gate 211, that is, the second input end of the first NAND gate 212 is 1, and the first NAND gate 212 outputs 0 after performing the NAND operation, and reaches the first input end of the first AND gate 215. At this time, the signal at the second input end of the first AND gate 215, that is, the signal output by the second NAND gate 214 is shielded, and the first AND gate 215 outputs 0, indicating the refresh management refresh type. It should be noted that when decoding based on the first signal and the second signal, the decoding circuit 23 may refer to the mapping relationship between the first address command and the second address command and the refresh type. For example, decoding may still be performed with reference to Table 1. That is to say, in essence, in this example, when the refresh management function is turned off and the indication signal is valid, the level state of the first address command is modified and replaced and then input to the decoding circuit, so that the modified and replaced signal represents the refresh management refresh. Accordingly, the decoding circuit outputs an RFM type refresh request to implement RH protection. The scheme of this embodiment reuses the circuit that generates the RFM SB request. When the RFM function is turned off, a refresh request for RH protection is generated. There is no need to design a dedicated circuit specifically for RH protection, thereby further simplifying the design difficulty and complexity of RH and saving circuit area.
[0074] Specifically, the transmission circuit 22 delays the second address command and transmits it to the decoding circuit as the second signal to match the timing of the first signal and the second signal. Figure 7 FIG. 1 is a structural example diagram of an exemplary control circuit, such as Figure 7As shown in , the transmission circuit 22 includes: an even number of third NOT gates 221 and a first buffer 222 connected in series; the input end of the first third NOT gate 221 receives the second address command CA10, and the output end of the last third NOT gate 221 is connected to the input end of the first buffer 222, and the output end of the first buffer 222 is used to output the second signal. Among them, the number of third NOT gates can be determined according to the required delay, and the figure takes two third NOT gates as an example. In this example, the transmission circuit is composed of a NOT gate and a buffer to match the timing of the first signal and the second signal, and is implemented by conventional devices, which can further simplify the circuit and process and reduce costs.
[0075] In one example, Figure 8 FIG. 1 is a structural diagram of an exemplary decoding circuit, such as Figure 8 As shown in , the decoding circuit 23 includes:
[0076] A first flip-flop 231, an input terminal of the first flip-flop 231 receives a first signal, a non-inverting output terminal of the first flip-flop 231 is used to output a first sub-signal CA9T, an inverting output terminal of the first flip-flop 231 is used to output a second sub-signal CA9B, and a clock terminal of the first flip-flop 231 receives a refresh instruction REF CMD;
[0077] A second flip-flop 232, an input terminal of the second flip-flop 232 receives the second signal, a non-inverting output terminal of the second flip-flop 232 is used to output a third sub-signal CA10T, an inverting output terminal of the second flip-flop 232 is used to output a fourth sub-signal CA10B, and a clock terminal of the second flip-flop receives a refresh instruction REF CMD;
[0078] A second buffer 233, where an input end of the second buffer 233 receives a refresh command REF CMD, and the second buffer 233 is used to delay and output the refresh command REF CMD;
[0079] a first multi-input AND gate 234, wherein input terminals of the first multi-input AND gate 234 are respectively connected to the second sub-signal CA9B, the fourth sub-signal CA10B and the output terminal of the second buffer 233, and the first multi-input AND gate 234 is used to output an RFM AB request;
[0080] a second multi-input AND gate 235, wherein input terminals of the second multi-input AND gate 235 are respectively connected to the first sub-signal CA9T, the fourth sub-signal CA10B and the output terminal of the second buffer 233, and the second multi-input AND gate 235 is used to output a REF AB request;
[0081] a third multi-input AND gate 236, wherein input terminals of the third multi-input AND gate 236 are respectively connected to the first sub-signal CA9T, the third sub-signal CA10T and the output terminal of the second buffer 233, and the third multi-input AND gate 236 is used to output a REF SB request;
[0082] The fourth multi-input AND gate 237 has its input terminals connected to the second sub-signal CA9B, the third sub-signal CA10T and the output terminal of the second buffer 233 respectively. The fourth multi-input AND gate 236 is used to output the RFM SB request.
[0083] Specifically, the figure combines the first address command as CA9 and the second address command as CA10 for example. In this example, corresponding multi-input AND gates are set for each type of refresh, for example, the first multi-input AND gate corresponds to RFM AB refresh, the second multi-input AND gate corresponds to REF AB refresh, the third multi-input AND gate corresponds to REF SB refresh, and the fourth multi-input AND gate corresponds to RFM SB refresh. The input of each multi-input AND gate can be determined according to the signal level state corresponding to the refresh type corresponding to itself, and the signal level state can be determined with reference to the mapping relationship shown in Table 1. For example, the signal representing RFM AB refresh (composed of CA9 and CA10 in Table 1) is 00, the signal representing REF AB refresh is 10, the signal representing REF SB refresh is 11, and the signal representing RFM SB refresh is 01. The decoding circuit 23 outputs the corresponding refresh request according to the signal composed of the current first signal and the second signal. For example, when the first signal is 1 and the second signal is 0, the first sub-signal is 1, the second sub-signal is 0, the third sub-signal is 0, and the fourth sub-signal is 1. Correspondingly, for the first multi-input AND gate, its input signals are the second sub-signal and the fourth sub-signal, i.e., 0 and 1. After AND operation by the first multi-input AND gate, the output is 0, indicating that this refresh is not a full-block refresh management refresh request RFM AB; for the second multi-input AND gate, its input signals include the first sub-signal and the fourth sub-signal, i.e., 1 and 1. After AND operation by the second multi-input AND gate, the output is 1, i.e., a valid full-block regular refresh request REF AB is output.
[0084] Among them, the delay parameter of the second buffer 233 can be determined based on the delay of the first trigger 231 and the second trigger 232 to match the timing between the signals input to each multi-input AND gate to avoid output errors caused by timing misalignment. It should be noted that the decoding circuit works in response to the refresh instruction, that is, the decoding circuit samples the information of the first signal and the second signal in response to the refresh instruction, and the sampled information and the refresh instruction after delay matching are transmitted to each multi-input AND gate for operation to avoid decoding errors caused by inconsistent timing.
[0085] In this example, the decoding circuit is composed of a trigger, a buffer, and a multi-input AND gate, so as to accurately output the corresponding refresh request according to the first signal and the second signal, realize RH protection, and is implemented by conventional devices, which can further simplify the circuit and process and reduce costs.
[0086] Specifically, the indication signal is used to indicate whether the control circuit performs RFM refresh when the refresh management function is turned off. That is to say, the frequency of occurrence of the valid indication signal determines the frequency of RFM refresh, and the length of the effective time window of a single indication signal determines the number of times the RFM refresh is performed continuously each time. As an example, in actual applications, taking into account the type and standard of the memory, for example, based on relevant standards, every 4 RFM SB refresh requests are defined as a group, and by outputting a group of requests, the refresh of all banks of the memory is completed, thereby completing an RFM SB refresh of the memory. Therefore, in order to ensure the regularity and integrity of the instructions, the number of times the RFM refresh is performed continuously each time is set to 4 times, and one group of refreshes in every 5 groups of REF SB refreshes is replaced with an RFM SB refresh. In one example, the last group of refreshes in every 5 groups of REF SB refreshes is replaced with an RFM SB refresh, that is, the group of refreshes after every 4 groups of REF SB refreshes is an RFM SB refresh.
[0087] In order to output the RFMSB request in time according to the refresh strategy, a counting method is used to indicate when to switch to the RFMSB request. In one example, Fig. 9 FIG. 1 is a structural example diagram of an exemplary counting circuit, such as Fig. 9 As shown, the counting circuit 12 includes: a counting clock circuit 31, a reset circuit 32 and a multi-stage third trigger 33 corresponding to a binary bit;
[0088] The counting clock circuit 31 is connected to the control circuit 11, and is used to output the counting clock CK when a REF SB request is received, or when the current indication signal FLAG is valid and a RFM SB request is received;
[0089] The clock terminal of the first-stage third flip-flop 33 is connected to the output terminal of the counting clock circuit 31, and the clock terminals of other third flip-flops 33 are connected to the inverting output terminals of the third flip-flops 33 of the previous stage; the input terminal of each third flip-flop 33 is connected to the inverting output terminal of the third flip-flop 33, and the value CNT<…> outputted by the in-phase output terminal of each stage of the third flip-flop 33 constitutes the output of the counting circuit 12, which is a binary representation of the counting result;
[0090] The input end of the reset circuit 32 is connected to the output end of the control circuit 11 and the multi-stage third trigger 33, and is used to output a reset signal when a REF AB request or an RFM AB request is received, or when the counting result is an upper limit value; the output end of the reset circuit 32 is connected to the reset end of each stage of the third trigger 33.
[0091] The number of third triggers 33 can be determined according to the upper limit value of the count. For example, when the upper limit value is 20, the corresponding binary representation contains five bits, and five third triggers can be set accordingly. Optionally, six third triggers can also be set. In the figure, five levels of third triggers are set as an example. The results output by the in-phase output terminal of each third trigger are CNT <0> ~CNT <4> , forming a binary representation of the counting result, and the results output by the inverting output terminal of each third trigger are CNTB respectively. <0> ~CNTB <4> . Specifically, the counting clock circuit 31 is used to provide the counting clock CK. In order to realize the frequency of the aforementioned memory performing RFM SB refresh and the number of requests in each group of RFM SB requests, the counting clock outputs the counting clock only when receiving the REF SB request and the RFM SB request to instruct each third trigger to perform cumulative counting. In other words, the count value output by the counting clock circuit 31 reflects the number of REF SB refreshes and RFM SB refreshes. In combination with the foregoing, in order to ensure the integrity of the CMD command and to ensure that the memory can accurately identify which 4 REF SB refresh requests are a group of requests, during the counting process, if a full block refresh request is received, such as an RFM AB request or a REF AB request, the counting is interrupted and the counting is reset, such as returning to zero.
[0092] Take the example of executing one set of RFM SB refresh for every 4 sets of REF SB refreshes: when the refresh management function is turned off, MRS<…> is 0. In combination with the above example, it can be seen that the first address command is shielded, and a normal refresh is performed initially. Therefore, for example, the first control subcircuit 21 keeps outputting 1. Whether the refresh is for the entire block or the same block depends on the second address command. In short, the initial refresh may be a REF SB refresh or a REF AB refresh. When the REF SB refresh has not been performed, the count results of the REF SB refresh and the RFM SB refresh are 0, which is not within the range of 16 to 20. The indication circuit outputs an invalid indication signal, that is, the FLAG is 0 at this time. If the processor instructs to perform REF SB refresh, the control circuit 11 can output a REF SB request after decoding the address command signal. Correspondingly, the counting clock circuit 31 responds to the control circuit 11 outputting a REF SB request and outputs a pulse signal as the counting clock CK. Each third trigger counts, and so on, until 16 REFSB refreshes are performed continuously, that is, when the counting result is 16, the indication circuit 13 starts to output a valid indication signal. In the above counting process, the counting result represents the number of REF SB refreshes currently being performed continuously. During the above counting period, as long as the control circuit 11 outputs a REF AB request, the count will be reset.
[0093] After the indication circuit 13 outputs a valid indication signal, the control circuit 11 outputs an RFM AB request or an RFM SB request according to the second address command. If the control circuit 11 outputs an RFM AB request, considering that the refresh range of RFM AB is wider, there is no need to perform RFM SB refresh, so the execution count is reset, and accordingly, the indication circuit 13 outputs an invalid indication signal again, and no longer performs RFM SB refresh. If the control circuit 11 outputs an RFM SB request, the counting clock circuit 31 will output a counting clock in response to the request, and accordingly, the third trigger 33 accumulates the current RFM SB refresh, that is, the counting result is updated from 16 plus 1 to 17, and so on, until a group of RFM SB requests are executed, that is, 4 consecutive RFM SB refreshes are executed, the counting result is updated to 20, and the upper limit value 20 is reached, then the reset circuit 32 resets the third trigger 33, the counting result is reset to 0, the indication circuit 13 outputs an invalid indication signal, and the memory starts regular refresh again, and this cycle is repeated.
[0094] In one example, if Fig. 9As shown, the counting clock circuit 31 includes: a second AND gate 311 and a first OR gate 312; the first input end of the first OR gate 312 receives a REF SB request, the second input end of the first OR gate 312 is connected to the output end of the second AND gate 311, and the output end of the first OR gate 312 is connected to the clock end of the first-stage third trigger 33 as the output end of the counting clock circuit 31; the first input end of the second AND gate 311 receives an RFM SB request, and the second input end of the second AND gate 311 receives an indication signal FLAG. Through this example, a counting clock circuit is formed based on an AND gate and an OR gate, thereby providing a counting clock for counting the number of refresh times of the same block, and is implemented by conventional devices, which can further simplify the circuit and process and reduce costs.
[0095] To achieve the reset in the aforementioned situation, in one example, Fig.10 FIG. 1 is a structural diagram of an exemplary reset circuit, as shown in FIG. Fig.10 As shown, the reset circuit 32 includes: a second OR gate 321, a third OR gate 322 and a fifth multi-input AND gate 323;
[0096] The first input terminal of the second OR gate 321 receives the RFM AB request, and the second input terminal of the second OR gate 321 receives the REFAB request;
[0097] The fifth multi-input AND gate 323 has multiple input terminals, and is used to receive multiple first input signals and perform AND logic operations; the multiple first input signals correspond to multiple bits of the upper limit value, and if any bit in the upper limit value is a high level, the corresponding first input signal is the corresponding bit of the counting result, and if any bit in the upper limit value is a low level, the corresponding first input signal is the inverted signal of the corresponding bit of the counting result;
[0098] A first input terminal of the third OR gate 322 is connected to the output terminal of the second OR gate 321 , a second input terminal of the third OR gate 322 is connected to the output terminal of the fifth multi-input AND gate 323 , and an output terminal of the third OR gate 322 is used to output a reset signal.
[0099] It should be noted that the signal input to the fifth multi-input AND gate 323 in the figure is taken as an example with an upper limit value of 20. The figure is only an example and does not exclude other possible implementation methods. For example, the upper limit value can also be set to other values. Specifically, the first input signal input to the fifth multi-input AND gate 323 in the figure is based on each CNT corresponding to the counting result. <4> ~CNT <0> For example, the upper limit value is 20, and its binary representation is 10100. Specifically, the fifth bit of the upper limit value is 1, so the corresponding first input signal is CNT <4> ; The 4th bit of the upper limit value is 0, so the corresponding first input signal is CNT <3> (to 0) the inverted signal CNTB <3> ; The third bit of the upper limit value is 1, so the corresponding first input signal is CNT <2> ; Similarly, the other two first input signals are CNT <1> and CNT <0> Based on the above, it can be known that only when the data composed of the output results of each third trigger is 10100, the fifth multi-input AND gate 323 outputs a valid reset signal, that is, 1, so that when the counting result is the upper limit value, the counting reset is performed in time.
[0100] The counting circuit of the above example includes a counting clock circuit, a reset circuit and a multi-stage trigger, so as to accurately count the consecutive refresh times of REFSB refresh and REFSB refresh, and reset in time when the counting result reaches the upper limit value, and reset in time when the full block refresh is detected during the counting process, so as to provide accurate counting results for the indication circuit.
[0101] Accordingly, the indication circuit 13 outputs an indication signal based on the counting result. In one example, Fig.11 FIG. 1 is a structural example diagram of an exemplary indicating circuit, such as Fig.11 As shown, the indicating circuit 13 includes:
[0102] A sixth multi-input AND gate 41, the sixth multi-input AND gate 41 has a plurality of input terminals, which respectively receive the inverted signal of the first bit, the inverted signal of the second bit, the signal of the third bit, the inverted signal of the fourth bit, and the signal of the fifth bit in the current counting result;
[0103] A seventh multi-input AND gate 42, the seventh multi-input AND gate 42 has a plurality of input terminals, which respectively receive the inverted signal of the third bit, the inverted signal of the fourth bit, and the signal of the fifth bit in the current counting result;
[0104] A fourth OR gate 43, a first input terminal of the fourth OR gate 43 is connected to the output terminal of the sixth multi-input AND gate 41, a second input terminal of the fourth OR gate 43 is connected to the output terminal of the seventh multi-input AND gate 42, and an output terminal of the fourth OR gate 43 is used to output an indication signal FLAG.
[0105] Combined with the example in the figure, the first digit of the counting result is CNT <0> , the second position is CNT <1> , the third position is CNT <2> , the 4th position is CNT <3> , the 5th is CNT <4> . Taking the current count result as 15 as an example, the corresponding CNT <4> ~CNT <0> is 01111, and accordingly, the inverted signal of the 3rd bit, the inverted signal of the 4th bit, and the signal of the 5th bit in the counting result received by the seventh multi-input AND gate 42 are all 0, so the seventh multi-input AND gate 42 outputs 0, and the corresponding third AND gate 44 outputs 0. At the same time, the inverted signal of the 1st bit, the inverted signal of the 2nd bit, the inverted signal of the 4th bit, and the signal of the 5th bit in the counting result received by the sixth multi-input AND gate 41 are all 0, so the sixth multi-input AND gate 41 outputs 0. Correspondingly, the indication signal output by the fourth OR gate 43 is 0, indicating that the indication signal is invalid.
[0106] Let's take the example of counting results falling into the preset range: for example, if the counting result is 16, the corresponding CNT <4> ~CNT <0> is 10000. The CNT <2> is 0, and the other inputs are 1, so the sixth multi-input AND gate 41 outputs 0. The seventh multi-input AND gate 42 receives the inverted signal CNTB of the third bit in the counting result. <2> , the 4th bit inverted signal CNTB <3> and the 5th signal CNT <4> are all 1, so the seventh multi-input AND gate 42 outputs 1. Correspondingly, the fourth OR gate 43 outputs 1, indicating that the indication signal is valid; for example, the counting result is 17, the corresponding CNT <4> ~CNT <0> is 10001. The signal CNT of the third bit in the counting result received by the sixth multi-input AND gate 41 is <2> is 0, and the other inputs are 1, so the sixth multi-input AND gate 41 outputs 0. The seventh multi-input AND gate 42 receives the inverted signal CNTB of the third bit in the counting result. <2> , the 4th bit inverted signal CNTB <3> and the 5th signal CNT <4> are all 1, so the seventh multi-input AND gate 42 outputs 1. Correspondingly, the fourth OR gate 43 outputs 1, indicating that the indication signal is valid. Similarly, compared with the case where the counting result is 17, the difference is that when the counting result is 18, CNT <1> ~CNT <0> When the count is 10 and the result is 19, CNT <1> ~CNT <0> is 11, but no matter which value the count result is from 17 to 19, the CNTB received by the seventh multi-input AND gate <2> 、CNTB <3> and CNT <4> The seventh multi-input AND gate 42 always outputs 1. At this time, for the sixth multi-input AND gate 41, when the counting result is any value between 17 and 19, CNT <2> is always 0, so the sixth multi-input AND gate 41 always outputs 0. When the counting result is 20, the corresponding CNT <4> ~CNT <0> is 10100, that is, the CNT <4> 、CNTB <3> 、CNT <2> 、CNTB <1> 、CNTB <0> are all 1, so the sixth multi-input AND gate 41 outputs 1. At this time, due to CNTB <2> is 0, so the seventh multi-input AND gate 42 outputs 0. In the above case, the indication circuit 13 keeps outputting 1, that is, outputting a valid FLAG. It should be noted that, in combination with the above example, when the counting result is 20, the reset circuit 32 will be triggered to reset the count. It can be understood that after the counting result is reset to 00000, the indication circuit 13 will output an invalid FLAG, and the memory will perform regular refresh and re-counting again.
[0107] Through the indication circuit of the above example, when the current counting result is within the preset range, an effective indication signal can be output in time. Moreover, the indication circuit is implemented by conventional devices such as AND gates and OR gates, which can further simplify the circuit and process and reduce costs.
[0108] It should be noted that the division of the structural modules in this embodiment is only an example, and other division or combination methods are not excluded. For example, in practical applications, the counting circuit and the indicating circuit can also be taken as a whole, for example, packaged into a single chip. Fig.12 For example, Fig.12 is an exemplary refresh request counter, used to output the aforementioned indication signal FLAG.
[0109] The refresh control circuit provided in this embodiment includes a control circuit, a counting circuit and an indication circuit. When the refresh management function is turned off, the control circuit determines whether to perform a regular refresh or an RFM refresh based on whether the indication signal is valid, wherein whether the indication signal is valid is determined by the indication circuit based on the counting result of the cumulative number of consecutive outputs of the same-block regular refresh request and the same-block refresh management refresh request by the counting circuit. In the above scheme, when the refresh management function is turned off, according to the state of the indication signal, a refresh request of a corresponding type is output based on the received address command signal, so that the RH protection operation can still be implemented when the refresh management function is turned off.
[0110] Embodiment 2
[0111] Fig.13 A structural example diagram of a memory is shown as follows: Fig.13 As shown, the memory includes: a row hammer refresh operation module 51 and a refresh control circuit 52 as any of the above examples;
[0112] The row hammer refresh operation module 51 is connected to the refresh control circuit 52 and is used to perform a row hammer refresh in response to an RFM SB request output by the refresh control circuit 52 .
[0113] In combination with the scheme of the aforementioned embodiment, DRAM is taken as an example: Based on the aforementioned scheme, when the refresh management function of the memory is turned on, the refresh control circuit 51 outputs a corresponding refresh request according to the instruction issued by the processor, so that the memory performs a corresponding type of refresh according to the refresh request, thereby realizing RH protection. When the refresh management function of the memory is turned off, the refresh control circuit 51 switches the REF SB refresh request issued by the processor to an RFM SB refresh request according to the set RFM SB refresh cycle and the number of continuous refreshes in each cycle, thereby realizing RH protection. In addition, in the scheme of this embodiment, the circuit originally used to generate the RFM SB request is cleverly utilized. When the RFM function is turned off, the circuit is reused to generate a refresh request for RH protection, that is, a set of RH control circuits can be shared for REF SB and RFM SB, and there is no need to design a dedicated circuit specifically for RH protection, thereby further greatly simplifying the design difficulty and complexity of RH and saving circuit area.
[0114] In the memory provided in this embodiment, the refresh control circuit includes a control circuit, a counting circuit and an indication circuit. When the refresh management function is turned off, the control circuit determines whether to perform a regular refresh or an RFM refresh based on whether the indication signal is valid, wherein whether the indication signal is valid is determined by the indication circuit based on the counting result of the cumulative number of consecutive outputs of the same-block regular refresh request and the same-block refresh management refresh request by the counting circuit. In the above scheme, when the refresh management function is turned off, according to the state of the indication signal, a corresponding type of refresh request is output based on the received address command signal, so that the RH protection operation can still be implemented when the refresh management function is turned off.
[0115] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only.
[0116] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A refresh control circuit, characterized in that: include: Control circuit, counting circuit and indication circuit; The control circuit is connected to the output end of the indication circuit, and is used for, when the refresh management function is turned off, if the indication circuit currently outputs an invalid indication signal, then outputting a full-block regular refresh request or a same-block regular refresh request according to the received address command signal; if the indication circuit currently outputs a valid indication signal, then outputting a full-block refresh management refresh request or a same-block refresh management refresh request according to the received address command signal; The counting circuit is connected to the output end of the control circuit, and is used to count the cumulative number of times the control circuit continuously outputs the same-block regular refresh request and the same-block refresh management refresh request, and output the counting result; and, in response to the current counting result reaching a set upper limit value, or the control circuit outputting a full-block regular refresh request or a full-block refresh management refresh request, performing a reset and restarting the counting; The indication circuit is connected to the output end of the counting circuit, and is used for outputting the valid indication signal if the current counting result is within a preset range, and outputting the invalid indication signal otherwise.
2. The refresh control circuit according to claim 1, characterized in that: The control circuit is further configured to output a full-block regular refresh request, a same-block regular refresh request, a full-block refresh management refresh request, or a same-block refresh management refresh request according to a received address command signal when the refresh management function is enabled; Among them, the address command information includes a first address command and a second address command; wherein, different level states of the first address command respectively represent a conventional refresh type and a refresh management refresh type, and different level states of the second address command respectively represent a full block refresh type and a same block refresh type.
3. The refresh control circuit according to claim 2, characterized in that: The control circuit comprises: a first control subcircuit, receiving a mode register instruction, the first address command and the indication signal, for detecting whether the refresh management function is turned on according to the mode register instruction, and outputting a first signal in combination with the first address command and the indication signal; wherein, if the refresh management function is turned on, a first signal consistent with the first address command is output; if the refresh management function is turned off, a first signal representing a regular refresh type is output in response to a currently invalid indication signal, and a first signal representing a refresh management refresh type is output in response to a currently valid indication signal; a transmission circuit, receiving the second address command, and configured to delay the second address command for a predetermined time and then output the second address command as a second signal; A decoding circuit is connected to the first control subcircuit and the transmission circuit, and is used to receive the first signal and the second signal, and in response to a refresh instruction, output a corresponding type of refresh request according to the level status of the first signal and the second signal.
4. The refresh control circuit according to claim 3, characterized in that: The first control subcircuit includes: a first NOT gate, a first NAND gate, a second NOT gate, a second NAND gate and a first AND gate; The first input end of the first NAND gate receives the indication signal; the input end of the first NAND gate receives the mode register instruction, the output end of the first NAND gate is connected to the second input end of the first NAND gate, and the output end of the first NAND gate is connected to the first input end of the first AND gate; The first input end of the second NAND gate receives the mode register instruction; the input end of the second NAND gate receives the first address command, the output end of the second NAND gate is connected to the second input end of the second NAND gate, and the output end of the second NAND gate is connected to the second input end of the first AND gate; The output end of the first AND gate is used to output the first signal; wherein, the high level of the mode register instruction indicates that the refresh management function is turned on, and the low level of the mode register instruction indicates that the refresh management function is turned off; the high level of the indication signal indicates that the indication signal is valid, and the low level of the indication signal indicates that the indication signal is invalid.
5. The refresh control circuit according to claim 3, characterized in that: The transmission circuit comprises: an even number of third NOT gates and a first buffer connected in series; An input end of the first third NOT gate receives the second address command, an output end of the last third NOT gate is connected to an input end of the first buffer, and an output end of the first buffer is used to output the second signal.
6. The refresh control circuit according to claim 3, characterized in that: The decoding circuit comprises: a first trigger, wherein an input terminal of the first trigger receives the first signal, a non-inverting output terminal of the first trigger is used to output a first sub-signal, an inverting output terminal of the first trigger is used to output a second sub-signal, and a clock terminal of the first trigger receives the refresh instruction; a second trigger, wherein an input terminal of the second trigger receives the second signal, a non-inverting output terminal of the second trigger is used to output a third sub-signal, an inverting output terminal of the second trigger is used to output a fourth sub-signal, and a clock terminal of the second trigger receives the refresh instruction; A second buffer, an input end of the second buffer receives the refresh instruction, and the second buffer is used to output the refresh instruction after delaying; a first multi-input AND gate, wherein input ends of the first multi-input AND gate are respectively connected to the second sub-signal, the fourth sub-signal and an output end of the second buffer, and the first multi-input AND gate is used to output a full-block refresh management refresh request; a second multi-input AND gate, wherein input ends of the second multi-input AND gate are respectively connected to the first sub-signal, the fourth sub-signal and an output end of the second buffer, and the second multi-input AND gate is used to output a full-block regular refresh request; a third multi-input AND gate, wherein input ends of the third multi-input AND gate are respectively connected to the first sub-signal, the third sub-signal and the output end of the second buffer, and the third multi-input AND gate is used to output a same-block regular refresh request; A fourth multi-input AND gate, wherein the input ends of the fourth multi-input AND gate are respectively connected to the second sub-signal, the third sub-signal and the output end of the second buffer, and the fourth multi-input AND gate is used to output a refresh request for the refresh management of the same block.
7. The refresh control circuit according to claim 1, characterized in that: The counting circuit comprises: a counting clock circuit, a reset circuit and a multi-stage third trigger corresponding to a binary bit; The counting clock circuit is connected to the control circuit and is used to output a counting clock when receiving the same-block regular refresh request or when the current indication signal is valid and the same-block refresh management refresh request is received; The clock end of the first-stage third flip-flop is connected to the output end of the counting clock circuit, and the clock ends of other third flip-flops are connected to the inverting output end of the third flip-flop of the previous stage; the input end of each third flip-flop is connected to the inverting output end of the third flip-flop, and the value output by the in-phase output end of each stage of the third flip-flop constitutes the output of the counting circuit, which is a binary representation of the counting result; The input end of the reset circuit is connected to the output end of the control circuit and the multi-stage third trigger, and is used to output a reset signal when the full-block regular refresh request or the full-block refresh management refresh request is received, or when the counting result is the upper limit value; the output end of the reset circuit is connected to the reset end of each stage of the third trigger.
8. The refresh control circuit according to claim 7, characterized in that: The counting clock circuit comprises: a second AND gate and a first OR gate; The first input end of the first OR gate receives the same block regular refresh request, the second input end of the first OR gate is connected to the output end of the second AND gate, and the output end of the first OR gate is used as the output end of the counting clock circuit and is connected to the clock end of the first-stage third flip-flop; The first input terminal of the second AND gate receives the same-block refresh management refresh request, and the second input terminal of the second AND gate receives the indication signal.
9. The refresh control circuit according to claim 7, characterized in that: The reset circuit comprises: a second OR gate, a third OR gate and a fifth multi-input AND gate; The first input end of the second OR gate receives the full block refresh management refresh request, and the second input end of the second OR gate receives the full block regular refresh request; The fifth multi-input AND gate has multiple input terminals for receiving multiple first input signals and performing AND logic operations; the multiple first input signals correspond to multiple bits of the upper limit value, if any bit of the upper limit value is a high level, the corresponding first input signal is the corresponding bit of the counting result, if any bit of the upper limit value is a low level, the corresponding first input signal is the inverted signal of the corresponding bit of the counting result; The first input terminal of the third OR gate is connected to the output terminal of the second OR gate, the second input terminal of the third OR gate is connected to the output terminal of the fifth multi-input AND gate, and the output terminal of the third OR gate is used to output the reset signal.
10. The refresh control circuit according to any one of claims 1 to 9, characterized in that: The preset range is 16 to 20.
11. The refresh control circuit according to claim 10, characterized in that: The indicating circuit comprises: a sixth multi-input AND gate having a plurality of input terminals, and receiving the inverted signal of the first bit, the inverted signal of the second bit, the signal of the third bit, the inverted signal of the fourth bit, and the signal of the fifth bit in the current counting result respectively; a seventh multi-input AND gate, wherein the seventh multi-input AND gate has a plurality of input terminals, and receives the inverted signal of the third bit, the inverted signal of the fourth bit, and the signal of the fifth bit in the current counting result respectively; A fourth OR gate, wherein the first input terminal of the fourth OR gate is connected to the output terminal of the sixth multi-input AND gate, the second input terminal of the fourth OR gate is connected to the output terminal of the seventh multi-input AND gate, and the output terminal of the fourth OR gate is used to output the indication signal.
12. A memory, characterized in that: include: A row hammer refresh operation module and a refresh control circuit as claimed in any one of claims 1 to 11; The row hammer refresh operation module is connected to the refresh control circuit and is used to execute row hammer refresh in response to the same-block refresh management refresh request output by the refresh control circuit.
