The double data rate fifth-generation synchronous dynamic random-access memory (DDR5 SDRAM) is a high-bandwidth computer memory.
DDR5 generally includes two types of refresh commands: an all-bank refresh command and a same-bank refresh command. The same-bank refresh command only refreshes one bank at a time. The all-bank refresh command refreshes all-banks at a time. Thus, the counting methods for specific refresh times are also different.
At present, the refresh method suitable for one type of refresh command cannot satisfy the refresh method of DDR5. Therefore, determination of a unified counting circuit suitable for DDR5 has become an existing urgent problem to be solved.
The present disclosure relates to the technical field of integrated circuits, and specifically relates to a refresh address counting circuit, a refresh address counting method, a refresh address read-write circuit, and an electronic device.
According to a first aspect of the present disclosure, a refresh address counting circuit is provided. The circuit includes: a self-oscillating clock generation circuit configured to generate, upon acquiring a refresh signal, a self-oscillating clock signal based on at least one bank activation signal in each of refresh cycles; a self-oscillating mask circuit configured to generate a self-oscillating mask signal under a preset refresh command; and a refresh address counter configured to count refresh addresses based on the self-oscillating clock signal and the self-oscillating mask signal and to output a self-oscillating refresh address.
According to the second aspect of the present disclosure, a refresh address counting method is provided, which is used for the above refresh address counting circuit, the method includes: a self-oscillating clock signal is generated by a self-oscillating clock generation circuit based on at least one bank activation signal in each of refresh cycles upon acquiring a refresh signal; a self-oscillating mask signal is generated by a self-oscillating mask circuit under a preset refresh command; and refresh addresses are counted by a refresh address counter based on the self-oscillating clock signal and the self-oscillating mask signal and a self-oscillating refresh address is output by the refresh address counter.
According to the third aspect of the present disclosure, a refresh address read-write circuit is provided, which includes a latch circuit, a decoder, a reading circuit, and the above refresh address counting circuit, where an output terminal of the refresh address counting circuit is connected to an input terminal of the latch circuit, an output terminal of the latch circuit is connected to an input terminal of the decoder, and an output terminal of the decoder is connected to the reading circuit.
According to the fourth aspect of the present disclosure, an electronic device is provided, which includes multiple banks; and a bank control circuit provided with the above refresh address counting circuit.
Exemplary embodiments will be more comprehensively described with reference to the drawings. However, the exemplary embodiments may be implemented in a variety of forms, and should not be understood to be limited to the examples set forth herein. Rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and so that the concept of the exemplary embodiments is comprehensively communicated to those who are skilled in the art. The features, structures, or characteristics described may be incorporated in one or more embodiments by using any suitable means. In the following description, numerous specific details are presented to provide a sufficient understanding of the embodiments of the present disclosure. However, a person skilled in the art will be aware that the technical solutions of the present disclosure may be implemented by omitted one or more of the specific details, or by using other methods, components, devices, steps, and the like. In other situations, known technical solutions are not shown or described in detail so as not to detract the main points and obscure various aspects of the present disclosure.
Furthermore, the drawings are merely schematic representations of the present disclosure and are not necessarily drawn to scale. The same reference marks in the drawings denote the same or similar parts, and therefore repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily have to correspond to physically or logically separate entities. These functional entities may be implemented as software, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and/or processor devices and/or microcontroller devices.
The flowchart shown in the drawings is for illustrative purposes only and does not necessarily include all steps. For example, some steps may also be separated, while some steps may be combined or partially combined, and thus the actual execution order may vary according to actual situations. In addition, all of the terms “first”, “second”, and “third” below are for purposes of distinction only and should not be used as limitations on the content of the present disclosure.
DDR4 is the abbreviation for the fourth-generation DDR SDRAM. DDR5 is the abbreviation for the fifth-generation DDR SDRAM. DDR SDRAM is an abbreviation for double data rate SDRAM, while SDRAM is an abbreviation for synchronous dynamic random access memory, and a synchronization object is a system clock frequency. Thus, in combination, DDR4 is a fourth-generation double data rate synchronous dynamic random-access memory, and DDR5 is a fifth-generation double data rate synchronous dynamic random-access memory. From DDR4 to DDR5, a refresh instruction changes from a single refresh command to an all-bank refresh command REFab and a same-bank refresh command REFsb.
For DDR5, multiple refresh modes (REF Modes) are typically included, including a normal refresh mode (Normal 1×), a double-rate normal refresh mode (Normal 2×), a double fine-grained refresh mode (FGR 2×), etc.
With reference to
As shown in
With reference to
It should be noted that one refresh interval is present between two adjacent REFab commands in
With reference to
Since the refresh command of DDR5 and the refresh command of DDR4 are different, and a different counting manner is used in a refresh mode switching process in DDR5, the counting manner applicable to DDR4 thus cannot meet the requirements of DDR5.
In view of this, an exemplary embodiment of the present disclosure provides a refresh address counting circuit, and the refresh address counting circuit is mainly used in DDR5. With reference to
The self-oscillating clock generation circuit 420 may be configured to generate, upon acquiring a refresh signal, a self-oscillating clock signal based on at least one bank activation signal in each of refresh cycles. With reference to
The self-oscillating mask circuit 440 may be configured to generate a self-oscillating mask signal under a preset refresh command. In an exemplary embodiment of the present disclosure, the preset refresh command may be the above same-bank refresh command REFsb, the all-bank refresh command REFab, and may also be a self-refresh command SREF. For example, in one refresh cycle, the self-oscillating mask signal OSC_MASK generated by the self-oscillating mask circuit 440 may be used to mask the self-oscillating clock signal OSC_CLK_Pre.
In an actual application, all banks are refreshed under an all-bank refresh command REFab or a self-refresh command SREF, which is equivalent to one refresh cycle, and therefore, as shown in
However, multiple same-bank refresh commands REFsb are typically generated in one refresh cycle. Therefore, as shown in
In an exemplary embodiment of the present disclosure, the above self-oscillating clock signal OSC_CLK_Pre and self-oscillating mask signal OSC_MASK are both steady and sustained oscillations that are self-generated without any externally applied excitation signals. Therefore, self-oscillation is added to the names of the self-oscillating clock signal OSC_CLK_Pre and the self-oscillating mask signal OSC_MASK as an indication.
In the refresh address counting circuit provided in an exemplary embodiment of the present disclosure, the refresh address counter 460 may be configured to count refresh addresses based on the self-oscillating clock signal OSC_CLK_Pre and the self-oscillating mask signal OSC_MASK and to output a self-oscillating refresh address OSC_RA. That is, the refresh address counter 460 counts the refresh addresses based on a result of masking of the self-oscillating clock signal OSC_CLK_Pre performed by the self-oscillating mask signal OSC_MASK.
In an exemplary embodiment of the present disclosure, in addition to the self-oscillating clock signal OSC_CLK_Pre being masked by means of the self-oscillating mask signal OSC_MASK in one refresh cycle so as to count refresh addresses as described above, there are also the situations that are shown in
Specifically, in the exemplary embodiment of the present disclosure, with reference to
Once a mask sub-signal is generated, if the mask sub-signal needs to be turned off, then the all-bank refresh mask sub-circuit 441 may be used to turn off the mask sub-signal and to generate a non-mask sub-signal when a system reset signal RST is generated or when a cycle refresh command REF2 is received in the next refresh cycle, so that after the refresh address is masked in a first refresh cycle, the mask is released in a second refresh cycle, so as to ensure that the final refresh address is an even address.
In addition, the all-bank refresh mask sub-circuit 441 may be further configured to generate the non-mask sub-signal in the normal refresh mode Normal 1× upon reception of the all-bank refresh command REFab when the lowest bit of the current refresh address is an even number Even, so as to maintain the normal counting of refresh addresses, so that the refresh address generated after refreshing has ended is still an even address.
On the basis of the above functional description, provided in an exemplary embodiment of the present disclosure is a circuit structure of the all-bank refresh mask sub-circuit 441. With reference to
An input terminal of the first NAND gate 820 is configured to receive a normal refresh mode Normal 1× command, the lowest bit odd signal REF Count of the current refresh address, and the all-bank refresh command REFab, and an output terminal of the first NAND gate 820 is connected to the set terminal of the first latch 830. When three input signals of the first NAND gate are all high level, that is, when the all-bank refresh command is received in the normal refresh mode and the lowest bit of the current refresh address is an odd signal, the first NAND gate 820 outputs a low level.
Under the action of the low level output by the first NAND gate 820 and the high level output by the first NOR gate 810, the output terminal of the first latch 830 outputs a low level. However, if at least one of the system reset signal RST and the cycle refresh command REF2 is a high level, the output terminal of the first latch 830 outputs a high level.
In addition, since the output terminal of the first latch 830 is connected to an input terminal of the first NOT gate 840, the output terminal of the first NOT gate 840 outputs the self-oscillating mask signal OSC_MASK. When the first latch 830 outputs a low level, the self-oscillating mask signal OSC_MASK is a high level, i.e., the self-oscillating mask signal OSC_MASK is a mask sub-signal in this case, which is equivalent to the all-bank refresh mask sub-circuit 441 outputting a mask sub-signal when an all-bank refresh command is received in the normal refresh mode and the lowest bit of a current refresh address is an odd signal. When the first latch 830 outputs a high level, the self-oscillating mask signal OSC_MASK is a low level, i.e., the self-oscillating mask signal OSC_MASK is a non-mask sub-signal in this case, which is equivalent to the mask sub-signal being turned off and the non-mask sub-signal being generated when the system reset signal RST is generated or the cycle refresh command REF2 is received.
It should be noted that the above all-bank refresh mask sub-circuit 441 is provided when the high level is valid, and in situations in which the low level is valid, a corresponding inverter is provided. No further details will be described herein.
In an exemplary embodiment of the present disclosure, the same-bank refresh mask sub-circuit 442 may be configured to generate the mask sub-signal upon reception of a same-bank refresh command REFsb before all the banks are refreshed. Therefore, in one refresh cycle, even if a same-bank refresh command is received, the self-oscillating clock signal OSC_CLK_Pre is still masked by means of the self-oscillating mask signal OSC_MASK, so as to achieve the purpose of counting refresh addresses only after all the banks are refreshed.
With reference to
The bank refresh counter 910 may be configured to obtain a refresh state of each of the banks, and generate a refresh cycle signal after each bank has been refreshed once. The self-oscillating mask signal generator 930 may be configured to generate the mask sub-signal or the non-mask sub-signal based on the refresh state of each bank. The reset signal generator 920 may be configured to generate a reset signal based on the all-bank refresh command, the self-refresh command, the system reset signal, and the refresh cycle signal. The reset signal resets the bank refresh counter to generate the non-mask sub-signal.
A circuit structure of the bank refresh counter 910, the reset signal generator 920, and the self-oscillating mask signal generator 930 are described below by using an example in which the high level is valid.
In an exemplary embodiment of the present disclosure, with reference to FIG. the bank refresh counter 910 includes multiple XOR gates 911, multiple first AND gates 912, multiple counters 913, and a second AND gate 914. Each of the multiple XOR gates 911 is configured to receive a preset bank address BA1, BA2, BA3, or BA4 (
An output terminal of each of the multiple counters 913 is provided with an inverter 915. Each of the multiple inverters 915 outputs the refresh state. Each XOR gate 911 corresponds to a respective first AND gate 912, a respective counter 913, and a respective inverter 915. A group of the XOR gates 911, first AND gates 912, counters 913, and inverters 915 output the refresh state of one bank and outputs, for example, a high level when the bank is refreshed. When four banks are all refreshed, each of the four inverters 915 outputs a high level. At this case, this means that each bank is refreshed once.
After the refresh state of each bank is determined, the refresh state can be received by the second AND gate 914. Specifically, an input terminal of the second AND gate 914 is connected to output terminals of the multiple inverters 915, and an output terminal of the second AND gate 914 is configured to output a refresh cycle signal REF_1CYCLE. When each of the multiple inverters 915 outputs a high level, the refresh cycle signal REF_1CYCLE output by the second AND gate 914 is a high level.
In an exemplary embodiment of the present disclosure, with reference to
By means of the self-oscillating mask signal generator 930, when the refresh cycle signal REF_1CYCLE is a low level, it is indicated that one refresh cycle is not completed, and at this time, under the action of the same-bank refresh command REFsb, the output self-oscillating mask signal OSC_MASK is a high level, that is, a mask sub-signal is output. When the refresh cycle signal REF_1CYCLE is a high level, it is indicated that one refresh cycle is completed, and at this time, under the action of the same-bank refresh command REFsb, the output self-oscillating mask signal OSC_MASK is a low level, that is, a non-mask sub-signal is output.
In an exemplary embodiment of the present disclosure, with reference to
It can be seen on the basis of the above description that the all-bank refresh mask sub-circuit 441 is configured to generate a mask sub-signal under an all-bank refresh command, and the same-bank refresh mask sub-circuit 442 is configured to generate a mask sub-signal under a same-bank refresh command. The all-bank refresh mask sub-circuit 441 and the same-bank refresh mask sub-circuit 442 relate to different commands. Therefore, in the exemplary embodiment of the present disclosure, the all-bank refresh mask sub-circuit 441 and the same-bank refresh mask sub-circuit 442 are connected in parallel.
In addition, with reference to
In addition, in the exemplary embodiment of the present invention, when the self-oscillating mask signal OSC_MASK output by the self-oscillating mask circuit 440 masks the self-oscillating clock signal OSC_CLK_Pre output by the self-oscillating clock generation circuit 420, a third AND gate 480 in
Assuming that enabling is performed at a high level, an inverter needs to be further provided so as to invert the self-oscillating mask signal OSC_MASK output by the self-oscillating mask circuit 440, as shown in
In an actual application, the refresh address counter 460 may include multiple counting circuits. Each of the counting circuits is configured to perform counting based on the self-oscillating clock signal OSC_CLK_Pre that is output by the third AND gate 480 and that is not masked. The counting circuit may include devices such as counters, etc., which will not be specifically defined by the exemplary embodiment of the present disclosure.
In the exemplary embodiment of the present disclosure, with reference to
In an exemplary embodiment of the present disclosure, the edge generation circuit 1410 may include a third NAND gate, a fourth NAND gate, a third NOT gate, a fourth NOT gate, and a first delayer. An input terminal of the third NAND gate is configured to receive the refresh cycle signal and the bank activation signal. An input terminal of the fourth NAND gate is connected to an output terminal of the third NAND gate. An input terminal of the third NOT gate is connected to the output terminal of the third NAND gate. An output terminal of the third NOT gate is connected to the input terminal of the fourth NAND gate. The first delayer is further provided between the output terminal of the third NOT gate and the input terminal of the fourth NAND gate. An output terminal of the fourth NAND gates is connected to an input terminal of the fourth NOT gate. An output terminal of the fourth NOT gate is configured to output the falling edge information of the bank activation signal. The delay circuit 1420 may include a second delayer. An input terminal of the second delayer is connected to the output terminal of the fourth NOT gates, and an output terminal of the second delayer is configured to output the self-oscillating clock signal OSC_CLK_Pre. Herein, the structure of the edge generation circuit 1410 and the delay circuit 1420 is only exemplary, and a different structural form may be configured according to actual requirements, which is not specially defined by the exemplary embodiment of the present disclosure.
In conclusion, the refresh address counting circuit provided in the exemplary embodiment of the present disclosure generates a self-oscillating mask signal by the self-oscillating mask circuit, which can mask the self-oscillating clock signal generated by the bank activation signal according to an actual situation, and can eventually perform the refresh address counting based on the masked self-oscillating clock signal, so as to meet different requirements for different refresh commands in DDR5. In addition, the refresh address counting circuit can also enable refresh address counting to be performed in a refresh mode switching process. Functional requirements for different refresh modes and refresh instructions in DDR5 can be met by means of a single circuit structure, thereby improving the compatibility of the counting circuit.
Also provided in an exemplary embodiment of the present disclosure is a refresh address counting method. With reference to
In operation S152, self-oscillating clock signal is generated by a self-oscillating clock generation circuit based on at least one bank activation signal in each of refresh cycles, upon acquiring a refresh signal;
In operation S154, a self-oscillating mask signal is generated by a self-oscillating mask circuit under a preset refresh command; and
In operation S156, refresh addresses are counted by a refresh address counter based on the self-oscillating clock signal and the self-oscillating mask signal, and a self-oscillating refresh address is output.
Specific details of the operations in the above refresh address counting method have been described in detail in the corresponding refresh address counting circuit, and thus will not be described herein again.
Also provided in an exemplary embodiment of the present disclosure is a refresh address read-write circuit. With reference to
In an exemplary embodiment of the present disclosure, the latch circuit 1610 includes a multiplexer 1611 and a latch 1612. An input terminal of the multiplexer 1611 is configured to receive a self-oscillating refresh address OSC_RA and activation address ACT_RA from the refresh address counting circuit 400, and a control terminal of the multiplexer 1611 is configured to receive a refresh cycle signal REF_1CYCLE. An output terminal of the multiplexer 1611 is connected to an input terminal of the latch 1612, and an output terminal of the latch 1612 is connected to the decoder 1620. The multiplexer 1611 is configured to, under the control of the refresh cycle signal REF_1CYCLE, select and output the activation address ACT_RA before one cycle of refreshing is completed, and to select and output the self-oscillating refresh address OSC_RA after one cycle of refreshing is completed. The address selected and output by the multiplexer 1611 is latched by the latch 1612.
In addition, the specific structural form of the refresh address counting circuit 400 has been described in detail in the above embodiment, and thus will not be further described herein.
Also provided in an exemplary embodiment of the present disclosure is an electronic device. The electronic device may include multiple banks and a bank control circuit. The bank control circuit is provided with the above refresh address counting circuit. The specific structural details of the refresh address counting circuit have been described in detail in the above embodiment, and thus will not be further described herein.
The above embodiment may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by using a software program, the above embodiment may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer commands. When a computer program command is loaded and executed on a computer, the processes or functions according to the embodiments of the present disclosure are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer command may be stored in a computer readable storage medium, or transmitted from a computer readable storage medium to another computer readable storage medium. The computer readable storage medium may be any available medium that a computer can access, or may be a data storage device that includes one or more servers, data centers, and the like, that can be integrated with media. The available media may be magnetic media (e.g., a floppy disk, a hard disk, or a magnetic tape), optical media (e.g., a DVD), semiconductor media (e.g., a solid state disk (SSD)) or the like. In the embodiments of the present disclosure, the computer may include the foregoing devices.
Although the present disclosure is described herein with reference to various embodiments, during implementation of the present disclosure that is set forth, a person skilled in the art may understand and implement other variations of the embodiments of the present disclosure by examining the drawings, the description, and the appended claims. In the claims, the term “comprising” does not exclude other components or steps, and “a” or “an” does not exclude plural scenarios. A single processor or other unit may implement several functions recited in the claims. Certain measures are set forth in dependent claims which are different from each other, but this does not mean that these measures cannot be combined to achieve good effects.
While the present disclosure is described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made to the present disclosure without departing from the spirit and scope thereof. Accordingly, the present description and drawings are merely exemplary illustrations of the present disclosure as defined by the appended claims, and are to be considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present disclosure. It is obvious that various modifications and variations of the present disclosure may be made by a person skilled in the art without departing from the spirit and scope of the present disclosure. Therefore, if such modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and equivalent technology thereof, then the present disclosure is also intended to include such modifications and variations.
Number | Date | Country | Kind |
---|---|---|---|
202110935931.0 | Aug 2021 | CN | national |
This application is a continuation of International Application No. PCT/CN2022/090625, filed on Apr. 29, 2022, which claims priority of Chinese patent application No. 202110935931.0, filed on Aug. 16, 2021. The disclosures of International Application No. PCT/CN2022/090625 and Chinese patent application No. 202110935931.0 are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2022/090625 | Apr 2022 | US |
Child | 18454104 | US |