Refreshing method and device of memory, electronic equipment and storage medium
By splitting the refresh time of SDRAM, reducing the number of self-refreshing times and kernel access conflicts, the problems of EMIF interface occupation and dynamic power consumption during the SDRAM self-refreshing process are solved, and more efficient memory management is achieved.
Patent Information
- Application Number
- CN202410967268.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
SDRAM frequently occupies the EMIF interface during self-refreshing, resulting in conflicts with kernel access, increasing the complexity of the controller, and frequent level flips increase dynamic power consumption.
The memory refresh time is split through pre-set splitting rules, reducing the number of self-refreshing times, and refreshing according to the split time interval when the memory is idle, reducing kernel access conflicts and dynamic power consumption.
It effectively reduces the number of self-refreshing times and dynamic power consumption, reduces the complexity of the controller, avoids frequent level flips, and improves the stability and efficiency of the system.
Smart Images

Figure CN118942505A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a memory refresh method, device, electronic device and storage medium. Background Art
[0002] EMIF (External Memory Interface) is an external memory interface, that is, CPU / DMA can communicate with external memory through EMIF interface, where the external memory includes at least SDRAM memory. SDRAM is synchronous and controlled by the synchronization controller in EMIF. SDRAM has many commands and is relatively complex as a whole. SDRAM will frequently occupy the EMIF interface when executing self-refresh instructions. At the same time, the kernel can also access the memory through EMIF. In this way, the self-refresh process and kernel access will conflict, increasing the complexity of the controller. Summary of the invention
[0003] The purpose of some embodiments of the present application is to provide a memory refresh method, device, electronic device and storage medium. Through the technical solution of the embodiments of the present application, a first time for refreshing the memory is obtained; the first time is split according to a preset splitting rule to determine a second time corresponding to the splitting rule; when the memory is idle, a preset number of rows in the memory are refreshed according to the second time. The present application splits the time for refreshing the entire memory according to a preset splitting rule to obtain a split second time, and then when the memory is idle, the memory is refreshed according to the time interval of the split second time. In this way, the number of self-refreshes can be reduced, and at the same time, dynamic power consumption can be reduced, thereby reducing conflicts with the kernel accessing EMIF and reducing the complexity of the controller.
[0004] In a first aspect, some embodiments of the present application provide a memory refresh method, including:
[0005] Get the first time to refresh the memory;
[0006] Splitting the first time according to a preset splitting rule, and determining a second time corresponding to the splitting rule;
[0007] When the memory is idle, a preset number of rows in the memory are refreshed according to the second time, wherein the preset number of rows is determined according to the splitting rule.
[0008] Some embodiments of the present application split the time for refreshing the entire memory according to a preset splitting rule to obtain a second time after the split, and then refresh the memory according to the time interval of the second time after the split when the memory is idle. In this way, the number of self-refreshes can be reduced, and at the same time, dynamic power consumption can be reduced, thereby reducing conflicts with the kernel accessing EMIF and reducing the complexity of the controller.
[0009] Optionally, when the memory is idle, refreshing a preset number of rows in the memory according to the second time includes:
[0010] Get the first row number of the memory;
[0011] Splitting the first row quantity according to the preset splitting quantity, and determining the second row quantity corresponding to the first row quantity;
[0012] At every second time interval, the rows in the memory corresponding to the second number of rows are refreshed.
[0013] Some embodiments of the present application split all rows of the memory by a preset split number to obtain a second number of rows, and then refresh the rows corresponding to the second number of rows according to a second time interval, thereby reducing the number of refreshes and reducing conflicts with kernel access.
[0014] Optionally, splitting the first time according to a preset splitting rule and determining a second time corresponding to the splitting rule includes:
[0015] The first time is split according to a preset split number or preset refresh position information to determine a second time corresponding to the split rule, wherein the preset split rule at least includes a preset split number or preset refresh position information.
[0016] Some embodiments of the present application split the rows in the memory through pre-set splitting rules. The rows can be split according to the number of rows or the row positions, so that there is no need to refresh each row one by one. The split rows can be refreshed simultaneously to reduce the number of refreshes.
[0017] Optionally, the method further comprises:
[0018] According to the second time, the number of inversions of the level signal corresponding to the second time is determined.
[0019] Some embodiments of the present application reduce the number of refreshes and thus the number of flips by splitting the rows of the memory, thereby avoiding frequent level flips of the memory and reducing dynamic power consumption.
[0020] Optionally, determining the number of flipping times of the level signal corresponding to the second time according to the second time includes:
[0021] Determining an initial flipping number according to the number of the first row of the memory;
[0022] The number of inversions of the level signal corresponding to the second time is determined according to the initial number of inversions and the second number of rows.
[0023] Some embodiments of the present application reduce the number of refreshes and thus the number of flips by splitting the rows of the memory, thereby avoiding frequent level flips of the memory and reducing dynamic power consumption.
[0024] In a second aspect, some embodiments of the present application provide a memory refresh device, including:
[0025] An acquisition module, used for acquiring the first time of refreshing the memory;
[0026] A splitting module, used to split the first time according to a preset splitting rule, and determine a second time corresponding to the splitting rule;
[0027] A refresh module is used to refresh a preset number of rows in the memory according to the second time when the memory is idle, wherein the preset number of rows is determined according to the splitting rule.
[0028] Some embodiments of the present application split the time for refreshing the entire memory according to a preset splitting rule to obtain a second time after the split, and then refresh the memory according to the time interval of the second time after the split when the memory is idle. In this way, the number of self-refreshes can be reduced, and at the same time, dynamic power consumption can be reduced, thereby reducing conflicts with the kernel accessing EMIF and reducing the complexity of the controller.
[0029] Optionally, the refresh module is used to:
[0030] Get the first row number of the memory;
[0031] Splitting the first row quantity according to the preset splitting quantity, and determining the second row quantity corresponding to the first row quantity;
[0032] At every second time interval, the rows in the memory corresponding to the second number of rows are refreshed.
[0033] Some embodiments of the present application split all rows of the memory by a preset split number to obtain a second number of rows, and then refresh the rows corresponding to the second number of rows according to a second time interval, thereby reducing the number of refreshes and reducing conflicts with kernel access.
[0034] Optionally, the splitting module is used to:
[0035] The first time is split according to a preset split number or preset refresh position information to determine a second time corresponding to the split rule, wherein the preset split rule at least includes a preset split number or preset refresh position information.
[0036] Some embodiments of the present application split the rows in the memory through pre-set splitting rules. The rows can be split according to the number of rows or the row positions, so that there is no need to refresh each row one by one. The split rows can be refreshed simultaneously to reduce the number of refreshes.
[0037] Optionally, the splitting module is further used for:
[0038] According to the second time, the number of inversions of the level signal corresponding to the second time is determined.
[0039] Some embodiments of the present application reduce the number of refreshes and thus the number of flips by splitting the rows of the memory, thereby avoiding frequent level flips of the memory and reducing dynamic power consumption.
[0040] Optionally, the splitting module is further used for:
[0041] Determining an initial flipping number according to the number of the first row of the memory;
[0042] The number of inversions of the level signal corresponding to the second time is determined according to the initial number of inversions and the second number of rows.
[0043] Some embodiments of the present application reduce the number of refreshes and thus the number of flips by splitting the rows of the memory, thereby avoiding frequent level flips of the memory and reducing dynamic power consumption.
[0044] In a third aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the memory refresh method as described in any embodiment of the first aspect can be implemented.
[0045] In a fourth aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the memory refresh method as described in any embodiment of the first aspect.
[0046] In a fifth aspect, some embodiments of the present application provide a computer program product, comprising a computer program, wherein the computer program, when executed by a processor, can implement the memory refresh method as described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of a flow chart of a memory refresh method provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of a process flow of a kernel accessing a memory provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of memory self-refresh in the prior art;
[0051] Figure 4 A schematic diagram of the internal interface timing sequence for automatic refresh provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of memory self-refresh provided by an embodiment of the present application;
[0053] Figure 6 A schematic diagram of level flipping provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of the structure of a memory refresh device provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.
[0057] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0058] EMIF (External Memory Interface) is an external memory interface, that is, CPU / DMA can communicate with external memory through EMIF interface, wherein the external memory includes at least SDRAM memory, SDRAM is synchronous and is controlled by a synchronization controller in EMIF, SDRAM commands are relatively large and the overall complexity is relatively large, SDRAM will frequently occupy EMIF interface when executing self-refresh instructions, and at the same time, the kernel can also access the memory through EMIF, so that the self-refresh process and kernel access will conflict, increasing the complexity of the controller, in view of this, some embodiments of the present application provide a memory refresh method, the method comprising obtaining a first memory refresh instruction for the memory, A time; according to a preset splitting rule, the first time is split to determine a second time corresponding to the splitting rule; when the memory is idle, a preset number of rows in the memory are refreshed according to the second time, wherein the preset number of rows is determined according to the splitting rule. The present application splits the time for refreshing the entire memory according to the preset splitting rule to obtain the split second time, and then when the memory is idle, the memory is refreshed according to the time interval of the split second time. In this way, the number of self-refreshes can be reduced, and at the same time, the dynamic power consumption can be reduced, thereby reducing the conflict with the kernel accessing EMIF and reducing the complexity of the controller.
[0059] like Figure 1 As shown, an embodiment of the present application provides a memory refresh method, the method comprising:
[0060] S101, obtaining the first time of refreshing the memory;
[0061] Specifically, the terminal device is equipped with a CPU, an EMIF interface, and a memory. The CPU accesses the memory by calling the EMIF interface. For the memory, the memory needs to perform a self-refresh operation. In this way, the CPU accesses the memory by calling the EMIF interface and the self-refresh of the memory will affect each other. At this time, arbitration of the priority of the operation command is required, which increases the complexity of the controller. The CPU will frequently occupy the EMIF interface through the self-refresh command, especially the self-refresh command. The embodiment of the present application provides a way to optimize the EMIF operation by controlling the SDRAM command.
[0062] like Figure 2 As shown, SDRAM (synchronous dynamic random-access memory) is synchronous dynamic random access memory. Synchronous means that the memory needs to synchronize the clock to work, and the sending and transmission of internal commands are based on it. Dynamic means that the storage array needs to be constantly refreshed to ensure that data is not lost. Random means that data is freely specified The address is used for data reading and writing.
[0063] SDRAM has the advantages of large storage space, fast read and write speed and relatively low price, which makes it stand firm in the storage industry and is widely used in computers. With the continuous development of the times and the continuous updating of technology, SDRAM has been used for decades, and the product update has gone through five generations, namely: the first generation SDR SDRAM, the second generation DDR SDRAM, the third generation DDR2 SDRAM, the fourth generation DDR3 SDRAM, and the fifth generation, DDR4 SDRAM (SDR is the abbreviation of Single Data Rate; DDR is the abbreviation of Double Data Rate).
[0064] The first generation of SDRAM uses a single-ended clock signal. The second, third, and fourth generations use differential clock signals as synchronization clocks to reduce interference because of their faster operating frequencies.
[0065] Due to the characteristics of the internal capacitors of SDRAM, the charge of the capacitors will be lost over time, and the data stored in the capacitors will be changed. Therefore, SDRAM must be refreshed to compensate for the charge lost by the capacitors. Generally, all rows of SDRAM can be refreshed every 64ms. The above refresh is a type of SDRAM command. There are other commands for accessing EMIF. Such uninterrupted refresh of SDRAM is likely to conflict with other EMIF access commands. In addition, frequent changes in the interface level flipping will increase the dynamic power consumption of EMIF.
[0066] Most SDRAM controllers now use a refresh cycle of 64ms / total number of rows. If the total number of rows is n, the refresh cycle is 64ms / n, and continuous refresh is performed. Figure 3 This will cause the EMIF signal to frequently flip its level, thereby increasing the dynamic power consumption of the EMIF. In addition, the CPU / DMA may initiate SDRAM, SRAM, and Nor Flash access to the EMIF at any time, so the self-refresh command may conflict with the core's command to access the EMIF, that is, the self-refresh command and the core's access to the EMIF will affect each other. At this time, arbitration of the operation command priority is required, which increases the complexity of the controller. Figure 3This is a schematic diagram of all refresh commands in 64ms: Figure 4 This is the internal interface timing diagram for automatic refresh.
[0067] In the embodiment of the present application, the terminal device obtains the time required to refresh the memory, that is, the first time.
[0068] S102, splitting the first time according to a preset splitting rule, and determining a second time corresponding to the splitting rule;
[0069] Specifically, a splitting rule is pre-stored on the terminal device, and the pre-set splitting rule at least includes a pre-set splitting number or pre-set refresh position information, and the first time is split to obtain a second time corresponding to the splitting rule.
[0070] Exemplarily, the terminal device divides all the rows in the memory into 4 equal parts, that is, divides the first time into 4 equal parts, and the time of each part is the second time.
[0071] The first time may also be split according to certain rules, for example, the first time is refreshed every 2ms, the second time is refreshed every 4ms, and so on.
[0072] It is also possible to set the memory to be refreshed at a preset position, and calculate the second time according to the refresh position and the first time.
[0073] S103. When the memory is idle, refresh a preset number of rows in the memory according to a second time, wherein the preset number of rows is determined according to the splitting rule.
[0074] Specifically, when the memory is idle, the memory is refreshed at every second time interval.
[0075] Some embodiments of the present application split the time for refreshing the entire memory according to a preset splitting rule to obtain a second time after the split, and then refresh the memory according to the time interval of the second time after the split when the memory is idle. In this way, the number of self-refreshes can be reduced, and at the same time, dynamic power consumption can be reduced, thereby reducing conflicts with the kernel accessing EMIF and reducing the complexity of the controller.
[0076] Another embodiment of the present application further supplements the memory refresh method provided in the above embodiment.
[0077] Optionally, when the memory is idle, refreshing a preset number of rows in the memory according to the second time includes:
[0078] Get the first row number of the memory;
[0079] Split the first row quantity according to the preset split quantity, and determine the second row quantity corresponding to the first row quantity;
[0080] At every second time interval, the rows corresponding to the second number of rows in the memory are refreshed.
[0081] Exemplarily, the self-refresh command only needs to refresh all rows within every 64ms. If the total number of rows of the memory is 4096, the 4096 rows can be divided into 4 parts in the embodiment of the present application, that is, each part is 4096 / 4=1024 rows, and the 64ms is divided into 4 parts, each part is 16ms, that is, the second time is 16ms, that is, 1024 rows are refreshed at the same time every 16ms. In this way, only 4 refreshes are required to reduce conflicts with kernel access.
[0082] Some embodiments of the present application split all rows of the memory by a preset split number to obtain a second number of rows, and then refresh the rows corresponding to the second number of rows according to a second time interval, thereby reducing the number of refreshes and reducing conflicts with kernel access.
[0083] Optionally, splitting the first time according to a preset splitting rule and determining a second time corresponding to the splitting rule includes:
[0084] The first time is split according to a preset split number or preset refresh position information to determine a second time corresponding to the split rule, wherein the preset split rule at least includes a preset split number or preset refresh position information.
[0085] In the embodiment of the present application, the self-refresh command only needs to refresh all rows within every 64ms. It is not necessary to refresh according to the cycle of every 64ms / total number of rows. All rows can be refreshed at a fixed time of every 64ms and when the EMIF is not in operation. The time used for one refresh is about 90ns. The time for refreshing all rows is 90ns*total number of rows. If the total number of rows is 4096, then the total refresh time is 90ns*4096=368640ns=0.369ms; if 0.369ms is a bit long, the 4096 rows can be divided into 4 parts, 8 parts, 16 parts, 32 parts, etc. In short, centralized refresh is performed at a fixed time of every 64ms and when no EMIF is accessed, thereby reducing the number of conflicts between the kernel accessing the EMIF and the SDRAM self-refresh. If the EMIF is currently running other accesses, the centralized self-refresh command is immediately executed after the other accesses are completed.
[0086] Some embodiments of the present application split the rows in the memory through pre-set splitting rules. The rows can be split according to the number of rows or the row positions, so that there is no need to refresh each row one by one. The split rows can be refreshed simultaneously to reduce the number of refreshes.
[0087] Optionally, the method further comprises:
[0088] According to the second time, the number of inversions of the level signal corresponding to the second time is determined.
[0089] Some embodiments of the present application reduce the number of refreshes and thus the number of flips by splitting the rows of the memory, thereby avoiding frequent level flips of the memory and reducing dynamic power consumption.
[0090] Optionally, determining, according to the second time, the number of flipping times of the level signal corresponding to the second time includes:
[0091] According to the number of the first row of the memory, determine the initial flipping number;
[0092] The flipping number of the level signal corresponding to the second time is determined according to the initial flipping number and the second row number.
[0093] For example, the reason for the reduction of signal flipping is briefly described by taking the busy signal of automatic refresh as an example. If the busy signal will flip 2*N (number of rows) times according to the previous scheme, if each automatic refresh will be 32 rows in a row, then the number of busy signal flipping is 2*N / 32=N / 16, which is also reduced by 32 times. For details, please see Figure 6 .
[0094] Traditional SDRAM self-refresh commands perform automatic refresh once every 64ms / N cycles, so the number of conflicts with CPU / DMA access may be N times, where N is the total number of SDRAM rows.
[0095] In the embodiment of the present application, the rows in the memory are no longer refreshed row by row, but are refreshed collectively, that is, multiple rows in the SDRAM are refreshed collectively continuously, thereby reducing the number of access conflicts with the CPU / DMA. Assuming 32 consecutive automatic refreshes, the number of access conflicts can be reduced by about 32 times. From the perspective of power consumption, the internal control signals of the memory do not need to be switched frequently, thereby reducing dynamic power consumption.
[0096] Some embodiments of the present application reduce the number of refreshes and thus the number of flips by splitting the rows of the memory, thereby avoiding frequent level flips of the memory and reducing dynamic power consumption.
[0097] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.
[0098] Another embodiment of the present application provides a memory refresh device, which is used to execute the memory refresh method provided by the above embodiment.
[0099] like Figure 7 , which is a schematic diagram of the structure of a memory refresh device provided in an embodiment of the present application. The memory refresh device includes an acquisition module 701, a splitting module 702 and a refresh module 703, wherein:
[0100] The acquisition module 701 is used to acquire the first time of refreshing the memory;
[0101] The splitting module 702 is used to split the first time according to a preset splitting rule and determine a second time corresponding to the splitting rule;
[0102] The refresh module 703 is used to refresh a preset number of rows in the memory according to a second time when the memory is idle, wherein the preset number of rows is determined according to the splitting rule.
[0103] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0104] Some embodiments of the present application split the time for refreshing the entire memory according to a preset splitting rule to obtain a second time after the split, and then refresh the memory according to the time interval of the second time after the split when the memory is idle. In this way, the number of self-refreshes can be reduced, and at the same time, dynamic power consumption can be reduced, thereby reducing conflicts with the kernel accessing EMIF and reducing the complexity of the controller.
[0105] Another embodiment of the present application further supplements the memory refresh device provided in the above embodiment.
[0106] Optionally, the refresh module is used to:
[0107] Get the first row number of the memory;
[0108] Split the first row quantity according to the preset split quantity, and determine the second row quantity corresponding to the first row quantity;
[0109] At every second time interval, the rows corresponding to the second number of rows in the memory are refreshed.
[0110] Some embodiments of the present application split all rows of the memory by a preset split number to obtain a second number of rows, and then refresh the rows corresponding to the second number of rows according to a second time interval, thereby reducing the number of refreshes and reducing conflicts with kernel access.
[0111] Optionally, the split module is used to:
[0112] The first time is split according to a preset split number or preset refresh position information to determine a second time corresponding to the split rule, wherein the preset split rule at least includes a preset split number or preset refresh position information.
[0113] Some embodiments of the present application split the rows in the memory through pre-set splitting rules. The rows can be split according to the number of rows or the row positions, so that there is no need to refresh each row one by one. The split rows can be refreshed simultaneously to reduce the number of refreshes.
[0114] Optionally, the split module is also used to:
[0115] According to the second time, the number of inversions of the level signal corresponding to the second time is determined.
[0116] Some embodiments of the present application reduce the number of refreshes and thus the number of flips by splitting the rows of the memory, thereby avoiding frequent level flips of the memory and reducing dynamic power consumption.
[0117] Optionally, the split module is also used to:
[0118] According to the number of the first row of the memory, determine the initial flipping number;
[0119] The flipping number of the level signal corresponding to the second time is determined according to the initial flipping number and the second row number.
[0120] Some embodiments of the present application reduce the number of refreshes and thus the number of flips by splitting the rows of the memory, thereby avoiding frequent level flips of the memory and reducing dynamic power consumption.
[0121] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0122] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.
[0123] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the operation of the method corresponding to any embodiment of the memory refresh method provided in the above embodiments can be implemented.
[0124] An embodiment of the present application further provides a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations of the method corresponding to any embodiment of the memory refresh method provided in the above embodiments.
[0125] like Figure 8 As shown, some embodiments of the present application provide an electronic device 800, which includes: a memory 810, a processor 820, and a computer program stored in the memory 810 and executable on the processor 820, wherein the processor 820 can implement any embodiment of the method of refreshing the memory as described above when reading the program from the memory 810 through a bus 830 and executing the program.
[0126] Processor 820 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 820 can be a microprocessor.
[0127] The memory 810 may be used to store instructions executed by the processor 820 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 820 of the disclosed embodiment may be used to execute instructions in the memory 810 to implement the method shown above. The memory 810 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.
[0128] The above are only embodiments of the present application and are not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0129] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0130] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A memory refresh method, characterized in that: The method comprises: Get the first time to refresh the memory; Splitting the first time according to a preset splitting rule, and determining a second time corresponding to the splitting rule; When the memory is idle, a preset number of rows in the memory are refreshed according to the second time, wherein the preset number of rows is determined according to the splitting rule.
2. The memory refresh method according to claim 1, characterized in that: When the memory is idle, refreshing a preset number of rows in the memory according to the second time includes: Get the first row number of the memory; Splitting the first row quantity according to the preset splitting quantity, and determining the second row quantity corresponding to the first row quantity; At every second time interval, the rows in the memory corresponding to the second number of rows are refreshed.
3. The memory refresh method according to claim 1, characterized in that: The step of splitting the first time according to a preset splitting rule and determining a second time corresponding to the splitting rule includes: The first time is split according to a preset split number or preset refresh position information to determine a second time corresponding to the split rule, wherein the preset split rule at least includes a preset split number or preset refresh position information.
4. The memory refresh method according to claim 2, characterized in that: The method further comprises: According to the second time, the number of inversions of the level signal corresponding to the second time is determined.
5. The memory refresh method according to claim 4, characterized in that: The step of determining the number of flipping times of the level signal corresponding to the second time according to the second time includes: Determining an initial flipping number according to the number of the first row of the memory; The number of inversions of the level signal corresponding to the second time is determined according to the initial number of inversions and the second number of rows.
6. A memory refresh device, characterized in that: The device comprises: An acquisition module, used for acquiring the first time of refreshing the memory; A splitting module, used to split the first time according to a preset splitting rule, and determine a second time corresponding to the splitting rule; A refresh module is used to refresh a preset number of rows in the memory according to the second time when the memory is idle, wherein the preset number of rows is determined according to the splitting rule.
7. The memory refresh device according to claim 6, characterized in that: The refresh module is used for: Get the first row number of the memory; Splitting the first row quantity according to the preset splitting quantity, and determining the second row quantity corresponding to the first row quantity; At every second time interval, the rows in the memory corresponding to the second number of rows are refreshed.
8. The memory refresh device according to claim 6, characterized in that: The splitting module is used for: The first time is split according to a preset split number or preset refresh position information to determine a second time corresponding to the split rule, wherein the preset split rule at least includes a preset split number or preset refresh position information.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor can implement the memory refresh method as claimed in any one of claims 1 to 5 when executing the program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the program, when executed by a processor, can implement the memory refresh method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Refreshing circuit and refreshing method for dynamic random access memory, and proof-of-work chip
CN114388025A
Refurbishing method and device of random memorizer
CN1971759A
Method and apparatus for refreshing memory
KR1020160026445A
Memory logic for controlling refresh operations
US20060104141A1
Method of Managing Data of Storage Devices Responsive to Temperature
US20160365138A1
