WO2022178772A1 - Memory refresh method, memory, controller, and storage system - Google Patents

Memory refresh method, memory, controller, and storage system Download PDF

Info

Publication number
WO2022178772A1
WO2022178772A1 PCT/CN2021/077941 CN2021077941W WO2022178772A1 WO 2022178772 A1 WO2022178772 A1 WO 2022178772A1 CN 2021077941 W CN2021077941 W CN 2021077941W WO 2022178772 A1 WO2022178772 A1 WO 2022178772A1
Authority
WO
WIPO (PCT)
Prior art keywords
bank
refresh
refreshed
target
refresh mode
Prior art date
Application number
PCT/CN2021/077941
Other languages
French (fr)
Chinese (zh)
Inventor
罗玉
冯辉宇
汪思君
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2021/077941 priority Critical patent/WO2022178772A1/en
Priority to CN202180094215.2A priority patent/CN116897395A/en
Publication of WO2022178772A1 publication Critical patent/WO2022178772A1/en

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C11/00Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
    • G11C11/21Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements
    • G11C11/34Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices
    • G11C11/40Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors
    • G11C11/401Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors forming cells needing refreshing or charge regeneration, i.e. dynamic cells
    • G11C11/406Management or control of the refreshing or charge-regeneration cycles

Definitions

  • the present application relates to the field of memory refresh technologies, and in particular, to a memory refresh method, a memory, a controller, and a storage system.
  • Capacitive memory is one of the key components in current digital systems because of its low price and high storage density.
  • dynamic random access memory (DRAM) realizes data storage by using the storage function of capacitance to charge.
  • double data rate synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
  • double data rate SDRAM double data rate SDRAM
  • the storage space of the memory is generally configured as N banks (banks) arranged in parallel, where N is an integer greater than or equal to 1.
  • Each bank can be understood as a two-dimensional storage array, in which the horizontal direction is called a row and the vertical direction is called a column.
  • a memory cell in the memory array includes a capacitor, which can store 1 bit of data. Since the charge in the capacitor will be continuously lost with leakage, the data in the capacitor must be periodically read and rewritten to compensate for the lost charge. This operation is also called refresh. That is, DRAM needs to be refreshed periodically to retain the data in RAM, so refresh is an important operation in DRAM.
  • the present application provides a memory refresh method, a memory, a controller and a storage system, which are used to improve the refresh effect of the memory.
  • the present application provides a method for refreshing a memory, which is applied to a controller; the controller is used to control the memory; the storage area of the memory includes at least one bank; the method includes:
  • refresh indication information is generated and sent to the memory; the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed.
  • the bank is refreshed according to the idle state of at least one bank in the storage area, and the read and write delay caused by the interruption of the read and write command by the refresh command can be avoided on the premise of ensuring the refresh, and the read and write commands can be improved. Performance and the efficiency with which the memory executes read and write commands.
  • the determining at least one target bank to be refreshed includes: determining, in at least one bank in an idle state, at least one candidate bank whose number of under-refreshing times reaches a first threshold, wherein the under-refreshing The number of times is used to indicate the number of times that the bank has not been refreshed within the preset refresh duration; the target bank to be refreshed is determined in the at least one candidate bank.
  • At least one candidate bank whose number of under-refreshing times reaches the first threshold is preferentially refreshed, so as to ensure the refresh effect of the memory.
  • the method before determining the target bank to be refreshed in the at least one candidate bank, the method further includes: determining that the storage area satisfies a refresh condition; the refresh condition includes at least one of the following: the at least one The under-refresh count of one bank reaches the first threshold; the at least one bank is in an idle state; the at least one bank satisfies the forced refresh condition.
  • the controller can be made to select the target bank more flexibly, when the under-refresh count of the at least one bank reaches the first threshold; the at least one bank is in an idle state; the at least one bank satisfies the forced refresh condition When at least one of the items is selected, the target bank to be refreshed is determined, so that the memory can minimize the influence of the refreshed bank on the normal reading and writing of the bank.
  • the generating refresh indication information according to the at least one target bank to be refreshed includes: when it is determined that there is a target bank set that satisfies the full bank refresh mode, generating the target bank set Refresh instruction information, the refresh instruction information is used to indicate that the refresh mode of the target bank set is the full bank refresh mode, and the target bank to be refreshed in the target bank set is the target bank in the at least one target bank to be refreshed. one or more.
  • the target bank to be refreshed in the target bank set can be refreshed by using the full-bank refresh mode, avoiding that in the single-bank refresh mode, it is necessary to refresh the transmission for each bank.
  • the refresh command of the corresponding bank greatly reduces the sending of the refresh command and the time delay caused by receiving the refresh command, and reduces the refresh time occupied by the refresh of the entire memory.
  • the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  • the refresh command of the corresponding bank is instructed through the single bank refresh mode or the same bank refresh mode, so that the target bank to be refreshed can be flexibly instructed.
  • the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the method further includes:
  • the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  • the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the method further includes: in the When at least one target bank to be refreshed includes N target banks to be refreshed in addition to the target bank set, it is determined that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode model.
  • the single bank refresh mode or the same bank refresh mode is used to realize the memory-to-idle refresh mode.
  • the target bank in the state is refreshed, which improves the flexibility of refreshing the memory bank.
  • an embodiment of the present application provides a controller.
  • the controller provided by the embodiment of the present application mainly includes a processing circuit and an interface circuit, wherein: the processing circuit is configured to determine at least one bank to be refreshed according to the idle state of at least one bank in the storage area of the memory. a target bank; generate refresh indication information according to the at least one target bank to be refreshed; the interface circuit is configured to send the refresh indication information to the memory, where the refresh indication information is used to control the memory to refresh all Describe at least one target bank to be refreshed.
  • the processing circuit is specifically configured to: determine, in at least one bank in an idle state, at least one candidate bank whose number of under-refreshes reaches a first threshold, wherein the number of under-refreshes is used to indicate The number of times that the bank has not been refreshed within a preset refresh duration; the target bank to be refreshed is determined in the at least one candidate bank.
  • the processing circuit is specifically configured to: before determining the target bank to be refreshed in the at least one candidate bank, determine that the storage area satisfies a refresh condition; the refresh condition includes at least the following: Item 1: the number of under-refreshes of the at least one bank reaches a first threshold; the at least one bank is in an idle state; the at least one bank satisfies the forced refresh condition.
  • the processing circuit when generating the refresh indication information according to the at least one target bank to be refreshed, is specifically configured to: when it is determined that there is a target bank set that satisfies the full bank refresh mode, generate Refresh indication information of the target bank set, where the refresh indication information is used to indicate that the refresh mode of the target bank set is the full bank refresh mode, and the target bank to be refreshed in the target bank set is the at least one to-be-refreshed target bank.
  • the target banks to refresh One or more of the target banks to refresh.
  • the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  • the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the processing circuit is further configured to: When it is determined that there is no target bank set satisfying the all-bank refresh mode in the at least one target bank to be refreshed, it is determined that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  • the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the processing circuit is further configured to: after determining In the at least one target bank to be refreshed, when there are N target banks to be refreshed except the target bank set, it is determined that the refresh mode of the N target banks to be refreshed is a single bank refresh mode or the same bank refresh mode.
  • the memory provided by the embodiments of the present application may include: a control circuit, a refresh circuit, and a storage area, wherein: the storage area includes at least one bank bank; the refresh circuit is configured to refresh the at least one bank; The control circuit is configured to receive refresh indication information sent by the controller, where the refresh indication information is used to indicate at least one target bank to be refreshed in the storage area; the at least one target bank to be refreshed is based on the memory The idle state of at least one bank in the storage area is determined; and according to the refresh indication information, the refresh circuit is controlled to refresh the at least one target bank to be refreshed.
  • the refresh circuit is at least one; the control circuit is specifically configured to respectively control the at least one refresh circuit to refresh at least one target bank to be refreshed respectively.
  • the refresh indication information is used to indicate that the refresh mode of the target bank to be refreshed in the target bank set is the full bank refresh mode; the target bank to be refreshed in the target bank set is the One or more items in at least one target bank to be refreshed; the control circuit is specifically configured to, according to the refresh indication information, control the refresh circuit corresponding to the target bank set to refresh the target bank through a full bank refresh mode The target bank in the collection to be refreshed.
  • the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode;
  • the control circuit is specifically configured to refresh the at least one target bank to be refreshed by controlling the refresh circuit corresponding to the at least one target bank to be refreshed through the single bank refresh mode or the same bank refresh mode according to the refresh instruction information.
  • control circuit is further configured to: when it is determined that in the at least one target bank to be refreshed, there is no target bank set satisfying the full bank refresh mode, determine the at least one target bank to be refreshed
  • the refresh mode of the target bank to be refreshed is the single-bank refresh mode or the same-bank refresh mode.
  • the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the N target banks to be refreshed In determining the at least one target bank to be refreshed, the target banks to be refreshed other than the target bank set;
  • the control circuit is further configured to control the refresh circuit corresponding to the at least one target bank to be refreshed to the N target banks to be refreshed through a single bank refresh mode or a same bank refresh mode according to the refresh instruction information. refresh.
  • the storage system provided by the embodiment of the present application includes a controller and a memory, wherein the controller may determine at least one target bank to be refreshed according to the idle state of at least one bank in the storage area; according to the For at least one target bank to be refreshed, refresh indication information is generated and sent to the memory; the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed.
  • the memory can thus refresh the at least one target bank according to the refresh instruction information.
  • FIG. 1a is a schematic structural diagram of a storage system to which an embodiment of the present application is applicable;
  • Fig. 1b-Fig. 1c are timing diagrams of a refresh method of a memory
  • FIG. 2 is a schematic flowchart of a method for refreshing a memory according to an embodiment of the present application
  • 3a is a schematic time sequence diagram of a method for refreshing a memory according to an embodiment of the present application
  • 3b is a schematic timing diagram of a method for refreshing a memory according to an embodiment of the present application.
  • 3c is a schematic timing diagram of a method for refreshing a memory according to an embodiment of the present application.
  • 3d is a schematic time sequence diagram of a method for refreshing a memory according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a method for refreshing a memory according to an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of a controller according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a memory according to an embodiment of the present application.
  • the refresh operation can include: automatic refresh (Auto Refresh) and self-refresh (Self Refresh).
  • self-refresh is a way for DDR to automatically refresh and maintain data in a low power consumption state in a sleep mode.
  • the automatic refresh is the way to complete the refresh and keep the data through the dynamic controller (Dynamic Memory Controller, DMC) control.
  • DMC Dynamic Memory Controller
  • the controller is used in the computer system to control the data transmission between the CPU and the memory, and the data can be exchanged between the memory and the CPU through the controller.
  • the controller can be used to process the instructions issued by the CPU; it can also be used to process the data read or written by the CPU in the memory; it can also be used to refresh the memory according to the refresh command.
  • the controller may be integrated in the CPU, or may be a separate chip independent of the CPU. Integrating the controller into the CPU can make the path from the CPU to the memory shorter and reduce the data transmission delay between the CPU and the memory.
  • a channel can be understood as a controller and the memory space corresponding to the controller. If a computer system contains multiple channels, these channels are usually identical and independent. Commonly referred to as dual-channel memory, it can mean that the CPU has two completely independent controllers. For example, the data bit width of the controller can be 32bit or 64bit.
  • DIMM is commonly known as DIMM memory stick.
  • the motherboard of the computer system is provided with DIMM slots, each DIMM slot can be inserted with a DIMM memory module, and one channel (channel) can correspond to one or more DIMM slots.
  • DIMMs are implemented by attaching multiple identical memory particles to the same printed circuit board (PCB).
  • Memory particles are the basic units that make up DIMMs.
  • the bit width of a single memory granule can be 4bit, 8bit or 16bit, and multiple memory granules are connected in parallel to form a 32bit or 64bit bit width to meet the bit width requirements of the controller.
  • a library refers to a group of memory particles, which are parallelized so that the data bit width meets the bit width requirement of the controller.
  • RANK is also called physical array bank (physical bank, P-bank).
  • the data bit width of the controller is generally 32bit or 64bit, and the bit width of a single memory particle can be 4bit, 8bit or 16bit. Therefore, multiple memory particles need to be paralleled to form a 32bit or 64bit bit width. Meet the bit width requirements of the controller.
  • a DIMM can contain 1 to 4 RANKs.
  • Bank Group which can be formed by forming multiple banks into a group, and each bank Group can independently read and write data.
  • the DDR4 architecture uses 8n prefetched bank groups, and the memory can include two or four selectable bank groups, so that each bank group of DDR4 memory has independent activation, reading, and writing. Enter and refresh operations. If the memory includes two independent bank groups, which is equivalent to 16-bit data per operation, the prefetch value can be increased to 16n; if the memory includes four independent bank groups, the prefetch value can be increased to 32n.
  • different RANKs are connected to different chip select (CS) signal output pins on the controller, that is, the controller enables different RANKs through different CS signals.
  • CS chip select
  • a controller corresponds to 4 DIMMs, and each DIMM contains 2 RANKs, then the controller outputs 8 CS signals, each CS signal is used to enable a RANK; for another example, a controller corresponds to 4 DIMMs, Each DIMM contains 4 RANKs, then, the controller outputs 16 CS signals, each CS signal is used to enable one RANK.
  • the multiple RANKs share the same set of command lines and the same set of address lines, and the refresh operation of each RANK is performed independently, that is, in the same time period.
  • the controller enables only one CS signal among the multiple CS signals to refresh the RANK enabled by the CS signal.
  • At least one refers to one or more, wherein a plurality of refers to two or more.
  • a plurality may also be understood as “at least two”.
  • “And/or”, which describes the association relationship of the associated objects means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone.
  • the character "/”, unless otherwise specified, generally indicates that the related objects are an "or" relationship.
  • FIG. 1a exemplarily shows a schematic structural diagram of a storage system to which this embodiment of the present application is applicable.
  • the storage system 100 may be an electronic device or an integrated chip with a data storage function.
  • the storage system 100 may be an electronic device such as a mobile phone, a computer, and a smart camera, or a system on chip (SOC), a central processing unit, or a (central processing unit, CPU) and other chips, which are not limited in this embodiment of the present application.
  • SOC system on chip
  • CPU central processing unit
  • the storage system 100 includes a memory 101 and a controller 102 .
  • the controller 102 may include a processing circuit 1021 and an interface circuit 1022 .
  • the processing circuit 1021 may be a logic operation circuit, and the processing circuit 1021 may generate instructions.
  • the interface circuit 1022 may be a control bus interface, and the controller 102 may be connected to the memory 101 through a control bus through the interface circuit 1022 .
  • the interface circuit 1022 can send an instruction to the control circuit 1011 of the memory 101, so as to instruct the control circuit 1011 to complete tasks such as data reading, storage, and refresh.
  • the memory 101 may include a control circuit 1011, one or more refresh circuits (eg, refresh circuit 1, refresh circuit 2, . . . refresh circuit N), and a storage area 1012, where N is an integer greater than or equal to 1.
  • the number of refresh circuits that the memory 101 may include is not limited in this embodiment of the present application.
  • the storage area 1012 may be a two-dimensional storage array composed of a plurality of storage cells. Each storage unit can store 1 bit of data.
  • the memory 101 may be a capacitive memory, for example, the memory 101 may be a DRAM.
  • each storage unit corresponds to at least one capacitor, and each storage unit can realize data storage through the charge stored in the capacitor. For example, for any storage unit, if the capacitor of the storage unit stores charge, the data stored in the storage unit is 1, and if the capacitor of the storage unit does not store charge, the data stored in the storage unit is 0 .
  • the controller 102 Since the electric charge in the capacitor will be continuously lost along with the leakage, the controller 102 needs to refresh the memory 101 periodically. Specifically, the controller 102 may send a refresh command to the control circuit 1011.
  • the refresh command is mostly an auto-refresh command, or an active command and a pre-charge command.
  • the auto-refresh instruction may also be referred to as the refresh instruction.
  • the controller 102 may send the refresh instruction to the memory 101 .
  • the control circuit 1011 After receiving the refresh instruction, the control circuit 1011 will determine the target bank to be refreshed next according to the refresh logic preset in the control circuit 1011 .
  • the control circuit 1011 is internally provided with a refresh counter, which is used to automatically and sequentially generate the row addresses of the target banks to be refreshed. The control circuit 1011 can then complete the refresh of the target bank through the refresh circuit in the memory 101 .
  • the storage area 1012 can be further divided into a plurality of banks.
  • Each bank can be an m ⁇ n two-dimensional storage array, where m is the row number of the two-dimensional storage array, m is a positive integer greater than 1, n is the column number of the two-dimensional storage array, and n is a positive integer greater than 1 . It can be understood that different banks may have the same or different numbers of rows and columns, which are not limited in this embodiment of the present application.
  • the multiple refresh circuits in the memory 101 can respectively perform refresh operations on one or more banks.
  • the N refresh circuits in the memory 101 may refresh the N banks in the storage area 1012 respectively, that is, the N refresh circuits may correspond to the N banks one-to-one, such as refresh circuits. 1 corresponds to bank1, then refresh circuit 1 can refresh bank1.
  • the description will be given by taking the one-to-one correspondence between N refresh circuits and N banks. It should be understood that when there is a one-to-many correspondence between multiple refresh circuits and multiple banks, that is, one refresh circuit can When multiple banks are refreshed, the solutions provided by the embodiments of the present application can also be applied.
  • the control circuit 1011 may send instruction information to the refresh circuits 1 to N to instruct the refresh circuits 1 to N to refresh the banks 1 to N respectively.
  • the refresh circuit 1 can refresh bank1 after receiving the indication information
  • the refresh circuit 2 can refresh bank2 after receiving the indication information, and so on.
  • the refresh module included in the controller can refresh the memory.
  • the memory space corresponding to a controller contains a bank (that is, a channel corresponds to a bank)
  • the refresh operation of each channel in the computer system is performed independently; when the memory space corresponding to a controller contains When there are multiple banks, the refresh operation of each bank is performed independently.
  • the timing sequence of the refresh operation of each channel (channel) can be shown in Figure 1b.
  • the memory space corresponding to the channel (the selected bank) must be in an idle state, that is, there is no data transmission in the memory space corresponding to the channel.
  • the row address refresh cycle (DRAM row refresh cycle time, tRFC) represents the duration of a refresh. That is, after the refresh command is generated, during the time period of tRFC, the controller refreshes the memory space corresponding to the channel, and the memory space corresponding to the channel must be in an idle state at this time.
  • the memory refresh interval represents the average interval between refresh operations. That is to say, for two adjacent refresh operations, the interval between the two (that is, the difference between the time when the second refresh operation is started and the time when the first refresh operation is started) can be less than tREFI, or Can be greater than tFEFI. As long as there are multiple refreshes, the average interval between refresh operations is tFEFI. Specifically, as shown in FIG. 1b, after a refresh is completed, the next refresh can be started immediately (ie, the interval duration of the refresh operation is tRFC); after the start of a refresh, the next refresh can also be performed after an interval of 9tREFI.
  • the memory uses the charge in the capacitor to store data. Since the charge will be continuously lost with the existence of leakage, it needs to be refreshed before the charge is lost to avoid data loss. If the interval between refresh operations is too long, data loss will occur. Therefore, the maximum interval duration of refresh operations specified in the protocol is 9tREFI.
  • one of the simplest implementation methods is to perform a refresh at time T0 with an interval of tREFI, and then perform the next refresh at T0+tREFI, with an interval of tREFI, and then at T0+ 2tREFI time for the next refresh... and so on. That is, the refresh operation is performed periodically, and the period in which the refresh operation is performed is tREFI.
  • the memory space corresponding to the channel is in the process of data transmission within the time period tRFC used for the refresh operation in a certain period, then according to the above mechanism, the memory space needs to stop data transmission and transfer. It is in an idle state, and data transmission is resumed after the refresh is completed. This approach will undoubtedly reduce the efficiency of memory access.
  • the controller 102 needs to send 32 refresh commands (each refresh command refreshes 256 rows) before the memory 101 can be refreshed. Each memory cell is refreshed once.
  • the controller 102 can instruct the memory 101 to complete the refresh through the refresh instruction, this control method is relatively limited and cannot flexibly adapt to different application scenarios of the memory 101 .
  • a refresh postponing mechanism and a pull-in mechanism are introduced.
  • the postponing mechanism is to delay the refresh time. For example, in the above example, if a channel is undergoing data transmission, then it is not necessary to refresh at this time, but to wait until the data transmission is completed before refreshing, so as to avoid the refresh operation affecting memory access. s efficiency.
  • the pulling-in mechanism is refreshed in advance. For example, when a channel is idle, it can be refreshed in advance even if the time since the last refresh is less than tFEFI.
  • the interval of refresh operations is 9tREFI. Since the refresh mechanism needs to ensure that the average interval of refresh operations is tREFI, when the interval is 9tREFI, it can be considered that the channel is under-refreshed, and the number of under-refreshes of this channel is Can be 8 times. Then, in the process of subsequent refresh operations, 8 refresh operations may be performed continuously, so that the average interval duration of the refresh operations is tREFI.
  • the postponing mechanism shown in Figure 1b is an extreme case.
  • the interval of refresh operations can be any time between tRFC and 9tREFI.
  • the refresh operation can be continuously refreshed. Multiple times, or multiple times to make up for the number of insufficient refreshes.
  • the postponing mechanism and the early (pulling-in) mechanism can reduce the impact of the refresh operation in this channel on the memory access efficiency to a certain extent, the postponing (postponing) mechanism and the early (pulling-in) mechanism only For the operation of this channel, it is difficult to realize the overall planning of multiple channels.
  • the DDR protocol has developed from DDR3/LPDDR3 to DDR4/LPDDR4, and has been upgraded to DDR5/LPDDR5 and other protocol versions.
  • the larger capacity of the memory particles the more frequent refresh is required, the smaller the tREFI value, and the longer the execution time tRFC to complete a refresh. Therefore, the impact of automatic refresh on DDR performance is becoming more and more significant, and the timing of automatic refresh and the optimization of refresh banks have also become important considerations for improving DDR performance.
  • automatic refresh can also be divided into multiple modes, for example, all bank refresh mode (All bank auto-refresh, REFab), single bank refresh mode (Per bank auto-refresh, REFpb) and same bank refresh mode ( same bank auto-refresh, REFsb).
  • all bank refresh mode All bank auto-refresh, REFab
  • single bank refresh mode Per bank auto-refresh, REFpb
  • same bank refresh mode same bank auto-refresh, REFsb.
  • the whole bank refresh mode may be a centralized refresh of the whole bank through a fixed cycle.
  • tREFI refresh time
  • the control circuit receives the refresh command, it executes all banks in sequence according to the bank order. refresh. In this method, all banks will be closed each time the refresh is performed, and the read and write commands of the memory are easily interrupted. At this time, the DMC will not be able to schedule the read and write commands of different banks.
  • the postpone function can also be combined with the postpone function to avoid interrupting the normal read and write operations of the DDR by delaying the number of refreshes when there are read and write commands in the bank, and maintain the currently postponed refresh times through the counter.
  • the refresh compensation is performed in the next set.
  • due to the long operation time of the full bank refresh mode it has a great impact on the DDR bandwidth, and also increases the waiting time of the read and write commands in the DMC, which increases the overall read and write delay of the DDR.
  • the single-bank refresh mode refers to the refresh at a fixed interval of tREFI specified by the protocol, and the bank sequence selection for refresh is traversed in a fixed order to complete a round of refresh operations.
  • a refresh command for corresponding bank refresh is issued once, and the control circuit executes the bank refresh after receiving the refresh command for the bank refresh.
  • its tRFC is small, and when the bank is refreshed, the normal reading and writing of other banks can not be affected.
  • the same bank refresh mode is based on the bank group mode, at a fixed interval of tREFI specified by the protocol, and refreshes one bank in each group at the same time, and the refreshed bank sequence selection is traversed in a fixed order to complete a round of refresh operations.
  • the number of refreshes required is also multiplied. That is, when each bank is refreshed, a corresponding refresh command needs to be issued, and a corresponding control circuit is activated, and after the corresponding bank refresh is executed, the refresh state is terminated.
  • the refresh times in the single bank refresh mode and the same bank refresh mode are the refresh times in the full bank refresh mode. 8 times. The overall read and write latency of DDR is still relatively large.
  • REFpb or REFsb selects the bank traversal method in a fixed order, it is easy to cause the bank that is currently executing the read and write command to need to be refreshed, thus interrupting the read and write operation and affecting the performance.
  • the bank that is currently executing the read and write command it may not be able to make full use of the idle time to refresh because the previous bank has not been refreshed.
  • the postpone function it is easy to cause a large number of delays, which makes it difficult to schedule the bank when the number of delays is reissued in a centralized manner. Therefore, the normal read and write operations of the DDR have to be interrupted, reducing the DDR bandwidth and read and write performance.
  • embodiments of the present application provide a controller, a memory, and a refresh method.
  • the controller 102 may indicate to the memory 101 at least one target bank to be refreshed through the refresh indication information. Therefore, the controller 102 may control the refresh operation of the memory 101 more flexibly.
  • the controller 102 has stronger logical judgment capability and can cope with more complex application scenarios. Compared with the current solution, the control circuit 1011 automatically determines the next row that needs to be refreshed.
  • the controller 102 directly indicates at least one bank to be refreshed, which is beneficial to make the refresh operation flexibly adapt to different application scenarios. Reduce the impact of reading and writing on storage space.
  • FIG. 2 exemplarily shows a schematic flowchart of a refresh method provided by an embodiment of the present application. As shown in FIG. 2 , the method mainly includes the following steps:
  • the controller 102 determines at least one target bank to be refreshed according to the idle state of at least one bank in the storage area.
  • the storage area of the memory includes at least one bank. Specifically, at least one target bank to be refreshed can be determined by the processing circuit 1021 in the controller 102 .
  • the controller 102 can flexibly determine the target bank to be refreshed according to the current application scenario. For example, the idle state of at least one bank in the storage area can be determined according to factors such as the access situation of the memory and the storage situation of the memory. The bank and the bank to be refreshed determine the target bank to be refreshed.
  • the controller 102 detects the idle idle state of the bank by optimizing the bank sequence selection mechanism of REFpb, and preferentially selects an idle bank that meets the refresh conditions for refresh, thereby preventing the currently idle bank from being unable to use the idle time period to send refresh due to the fixed order. The impact of reading and writing on storage space.
  • the state of the paired bank should also be considered for the determination of the bank in the idle state. Only when all the banks in the paired bank are idle can it be determined that the bank in the paired bank is in an idle state.
  • the controller 102 can maintain the refresh status of each bank through a one-hot code.
  • the refresh status of the bank can be marked as 1, and when the refresh is not completed, the refresh status of the bank can be marked. marked as 0. Therefore, after a full bank refresh is completed, the refresh status of all banks is marked as zero.
  • the storage area includes 8 banks, the particle capacity is 1GB, and the refresh rate is 0.5X. Its tREFI is 1.952us.
  • the refresh time is shown in Figure 3a, and 8 single bank refreshes need to be completed within the tREFI interval. Therefore, the refresh interval of a single bank can be 1.952/8us.
  • the REFpb refresh command is refreshed according to the bank sequence. For example, in the refresh command queue shown in Figure 3a, the refresh command bank0->bank1->bank2...->bank7 of REFpb is sent in the following order.
  • the bank that needs to be refreshed (for example, bank2) is the same bank as the bank that needs to execute read and write commands.
  • the controller can only schedule read and write commands of other banks except bank2. Commands are suspended, resulting in reduced read and write performance.
  • the controller may determine the target bank to be refreshed according to the currently idle bank and the bank to be refreshed.
  • banks1 to bank8 are occupied by the read and write of bank1 to bank3, that is, the currently idle banks are bank4 to bank8, and the banks to be refreshed include: bank4 to bank7.
  • the controller can Select a bank from bank4 to bank7, for example, bank4, and perform a single-bank refresh. After performing a refresh of a single bank, the bank (eg, bank4) may be marked as refreshed.
  • the target bank to be refreshed can be determined according to the currently idle bank and the bank to be refreshed. For example, bank1 to bank8 are occupied by the read and write of bank4 to bank6. Therefore, the target bank to be refreshed can be determined according to the currently idle banks (bank1 to bank3, bank7 to bank8) and the bank to be refreshed (bank5 to bank7). for bank7.
  • the target bank to be refreshed is determined according to the idle bank and the bank to be refreshed. Therefore, the determined refresh sequence of banks is: bank2 ⁇ bank5 ⁇ bank6 ⁇ bank0 ⁇ bank3 ⁇ bank7 ⁇ bank1 ⁇ bank4.
  • the following uses a specific example to illustrate the efficiency of determining the target bank to be refreshed by using a bank in an idle state.
  • the maximum time from the last refresh of all banks to the next refresh of all banks can be that the memory is within the time interval of 9*tREFI, and the read and write services are not interrupted, causing the memory to trigger a forced refresh, that is, the centralized reissue of all delayed REFpb refreshes
  • the time required for the operation can be determined.
  • the maximum time T_total from the moment when all banks were last completely refreshed to the moment when the forced refresh was completed satisfies:
  • tREFI represents the time required to trigger the forced refresh
  • bank_NUM represents the number of banks in the storage area, where bank_NUM is 8.
  • tRFCpb indicates the minimum delay required to refresh any other BNAK or activate itself after executing a refresh command for a bank.
  • TRFCpb may be a delay for performing a refresh operation of the next bank (for example, a refresh bank1 command) after bank0 is refreshed.
  • TRFCpb may be a delay for the next bank activation operation (activation bank1 command) after bank1 is refreshed. Therefore, (8*bank_NUM-1)*tRFCpb represents the time required to refresh all banks in the single-bank mode.
  • the controller sends (8*bank_NUM) single bank refresh commands.
  • the time from the last refresh of all banks to the next refresh of all banks may be less than or equal to the maximum time T_total.
  • the method of the present application can avoid that the read and write commands are interrupted by the refresh command, resulting in a delay in reading and writing. Therefore, the effective time for the memory to execute the read and write commands only needs to consider the read and write commands that send PREpb. and REFpb refresh commands take bus time. Therefore, within the maximum time T_total, the effective time T_val for the execution of read and write commands can be executed to satisfy:
  • Tcmd_cost is the bus time required to send the PREpb and REFpb commands once.
  • the efficiency coefficient is introduced by considering the bank command scheduling efficiency in the actual scenario and additional overheads such as bank handshake. In some embodiments, the efficiency coefficient may be between 0.5 and 0.7.
  • the execution efficiency of the read and write commands can be effectively improved by 1% to 2% through the method in the present application.
  • the controller may also determine the target bank to be refreshed according to the currently idle bank and the bank to be refreshed in combination with the method of deferring refresh.
  • the read and write operations of the business may cause the delay and reissue of the refresh operation.
  • the counter pstpnd_cnt can be used to count the under-refresh times of the bank, and the under-refresh times can be maintained by the under-refresh times of a single bank, that is, as long as the automatic refresh of one bank is delayed, the count of the counter pstpnd_cnt will be added to the count. 1.
  • the counter is decremented by 1 accordingly.
  • the counter decreases the number of all banks accordingly. In the scenario where there are multiple bank groups, the same bank in different bank groups may be refreshed at the same time.
  • the banks in each group can be marked according to different groups, and when a bank in a group is refreshed , the count of the counter pstpnd_cnt is decremented by 1, and when one bank in the K groups completes the refresh at the same time, the count of the counter pstpnd_cnt is decremented by K.
  • the under-refresh count of the target bank is used to indicate the number of times the target bank has not been refreshed within the preset refresh time.
  • the average interval duration of refresh operations is tREFI.
  • the target bank may not be refreshed first. Since the refresh mechanism needs to ensure that the average interval of refresh operations is tREFI, in this case, the target bank can be said to be under-refreshed. Specifically, the longer the interval from the last refresh operation, the more under-refresh times of the target bank.
  • a target bank completes a refresh operation at time T0, during the time period from T0 to T0+2tREFI, since the target bank has been performing data transmission, there is no such target at the time of T0+2tREFI.
  • the bank is refreshed, and the number of under-refreshes of the memory space is 2 at this time.
  • a target bank completes a refresh operation at time T0, during the time period of T0 ⁇ T0+5tREFI, because the target bank has been processing data Therefore, the target bank is not refreshed at the time of T0+5tREFI, and the number of under-refreshes of the target bank at this time is 5 times.
  • the condition for forcibly refreshing the target bank may be: the number of under-refreshing times of the target bank is greater than or equal to the first threshold. That is, when the number of under-refreshes of the target bank is greater than or equal to the first threshold, the controller determines to forcibly refresh the target bank.
  • the maximum interval between refresh operations is 9tREFI.
  • the interval between refresh operations is too long (ie, there are many under-refresh times, such as 7 or 8 times), the risk of data loss increases. Therefore, when the number of under-refreshing times of the first memory space is greater than or equal to the first threshold, the first memory space can be forcibly refreshed, thereby avoiding the occurrence of data loss.
  • the first threshold may be 7 or 8.
  • the bank that satisfies the refresh condition may be determined as the target bank to be refreshed.
  • the refresh conditions may include at least one of the following: the number of under-refreshes of the at least one bank reaches a first threshold, the at least one bank is in an idle state, and the at least one bank satisfies a forced refresh condition.
  • the controller may determine at least one candidate bank whose number of under-refreshes reaches the first threshold in at least one bank in an idle state, and determine a target bank to be refreshed in the at least one candidate bank.
  • the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4.
  • the currently determined banks to be refreshed include bank1, bank2, bank3 and bank4.
  • the candidate banks include: bank1, bank2, bank3 and bank4.
  • the number of under-refresh of bank1 is 5, the number of under-refresh of bank2 is 6, the number of under-refresh of bank3 is 2 and the number of under-refresh of bank4 is 3.
  • the number of under-refreshes of the storage area is represented by the counter pstpnd_cnt.
  • the currently idle banks include: bank1 and bank2.
  • the under-refresh count of bank1 is less than the first threshold, and the under-refresh count of bank2 is greater than the first threshold. Therefore, the current target bank to be refreshed can be determined as bank2. After the refresh of bank2 is completed, the number of under-refreshes of bank2 may be updated to 5.
  • the target bank to be refreshed can be determined according to the bank in the idle state and the bank whose number of under-refreshes reaches the first threshold.
  • the storage area includes 2 bank groups, and the number of banks in each bank group is 4.
  • bank group1 includes: group1-bank1, group1-bank2, group1-bank3, and group1-bank4.
  • the currently determined banks of group1 to be refreshed include group1-bank1, group1-bank2, group1-bank3 and group1-bank4.
  • the under-refresh count of group1-bank1 is 5, the under-refresh count of group1-bank2 is 6, the under-refresh count of group1-bank3 is 7, and the under-refresh count of group1-bank4 is 8.
  • bank group2 includes: group2-bank1, group2-bank2, group2-bank3 and group2-bank4.
  • the currently determined banks to be refreshed by group2 include group2-bank1, group2-bank2, group2-bank3, and group2-bank4.
  • the under-refresh count of group2-bank1 is 3, the under-refresh count of group2-bank2 is 4, the under-refresh count of group2-bank3 is 7, and the under-refresh count of group2-bank4 is 8.
  • the target banks to be refreshed currently may be determined as group1-bank2, group2-bank3 and group2-bank4.
  • the priority of target banks may also be sorted according to the number of under-refreshes. For example, at this time, you can set the priority of group2-bank4 to be the highest, the priority of group2-bank3 to be medium, and the priority of group1-bank2 to be the lowest. Therefore, the bank with a higher number of under-refreshes is preferentially refreshed, thereby improving the refresh efficiency and preventing the loss of stored data.
  • the refresh execution timing is optimized instead of performing the refresh operation at a fixed tREFI interval. That is, the currently delayed refresh times are maintained through the counter, and then as long as the processing idle state of the bank is detected, the refresh compensation of the bank is triggered, and the idle time is used to insert the refresh to avoid interrupting the normal read and write operations of the DDR, thereby improving the performance of the DDR. .
  • the REFpb refresh command causes the current bank not to be refreshed due to the read and write commands, and accordingly generates the number of under-refreshes of the bank.
  • the REFpb delayed by the bank is reissued. refresh command.
  • the controller sends (8*bank_NUM-N) single bank refresh commands during refresh. .
  • the maximum refresh interval time As shown in Figure 3c, the maximum refresh interval time:
  • T_total 9*tREFI+(8*bank_NUM-1)*0.8*tRFCpb
  • the efficiency coefficient is in the range of 0.5-0.7, the Eff is 89.42%-93.35%, and the efficiency can be improved by 2% compared with the method of sequentially postpond refreshing in the prior art.
  • S202 The controller 102 generates refresh indication information according to the at least one target bank to be refreshed.
  • the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed.
  • refresh indication information may be sent to the memory 101 through the interface circuit 1022 in the controller 102, where the refresh indication information may indicate the above at least one target bank to be refreshed.
  • the controller 102 may also determine whether a target bank set exists in the at least one target bank to be refreshed. Wherein, the target bank in the target bank set belongs to the at least one target bank to be refreshed. Executing the full bank refresh mode through the target bank set can effectively reduce the number of refresh commands sent, thereby improving the performance of the memory.
  • Mode 1 In the at least one target bank to be refreshed, when it is determined that the target bank set satisfies the full bank refresh mode, refresh indication information of the target bank set is generated; the refresh indication information is used to indicate the target bank set
  • the refresh mode is the full bank refresh mode.
  • the refresh indication information of the target bank set may also be used to indicate the number of times the refresh command in the full bank refresh mode is executed.
  • the target bank set includes all banks in the storage area.
  • the target bank set includes all banks in one or more groups in the storage area.
  • the number of banks included in the storage area is 4, including: bank1, bank2, bank3 and bank4.
  • the currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4.
  • the under-refresh count of bank1 is 1
  • the under-refresh count of bank 2 is 2
  • the under-refresh count of bank 3 is 2
  • the under-refresh count of bank 4 is 3.
  • the number of under-refreshes of the storage area is represented by the counter pstpnd_cnt.
  • the target bank set can be determined.
  • the target bank set can perform at least one full bank refresh mode.
  • the number of times of performing the full bank refresh mode may be determined according to the minimum value of the under-refresh times of each bank in the target bank set. In combination with the above example, considering that the number of under-refreshes of bank1 is 1, it can be determined that the target bank set can perform a full-bank refresh mode once.
  • Mode 2 When it is determined that in the at least one target bank to be refreshed, there is no target bank set that satisfies the full bank refresh mode, it is determined that the refresh mode of the at least one target bank to be refreshed is the single-bank refresh mode or the same bank refresh mode refresh mode. That is, the refresh indication information may be used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  • the determined current target bank to be refreshed includes a part of the bank in the storage area.
  • the target bank set includes a subset of banks in one or more groups in the storage area. Considering that the same bank in different groups can be refreshed at the same time, when the same bank in different groups exists in the target bank set, the target bank set does not need to perform full bank refresh. At this time, the refresh mode of the target bank to be refreshed can be changed. Determine the single bank refresh mode, or the same bank refresh mode.
  • the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4.
  • the currently determined at least one target bank to be refreshed includes bank1, bank2 and bank4.
  • the under-refresh count of bank1 is 1
  • the under-refresh count of bank 2 is 2
  • the under-refresh count of bank 4 is 3.
  • the refresh indication information can be used to instruct bank1, bank2 and bank4 to be refreshed in the single bank refresh mode, and the number of times to be refreshed for bank1 is 1, the number of times to be refreshed for bank2 is 2, and the number of times to be refreshed for bank4 is 3.
  • the refresh indication information may include: 6 refresh commands for single bank refresh.
  • the refresh instruction information includes: 1 refresh command to refresh bank1, 2 refresh commands to refresh bank2, and 3 refresh commands to refresh bank4. Each refresh command is used to instruct the corresponding target bank to be refreshed to perform a refresh.
  • the storage area includes 2 bank groups, and the number of banks in each bank group is 4.
  • bank group1 includes: group1-bank1, group1-bank2, group1-bank3, and group1-bank4.
  • the currently determined banks to be refreshed by group1 include group1-bank1 and group1-bank4.
  • the under-refresh count of group1-bank1 is 1 and the under-refresh count of group1-bank4 is 3.
  • bank group2 includes: group2-bank1, group2-bank2, group2-bank3 and group2-bank4.
  • the currently determined banks to be refreshed by group2 include group2-bank2 and group2-bank4.
  • the under-refresh count of group2-bank2 is 4 and the under-refresh count of group2-bank4 is 3.
  • the refresh indication information may be used to instruct group1-bank1 and group1-bank4, and group2-bank2 and group2-bank4 to be refreshed through the single-bank refresh mode.
  • the under-refresh count of group1-bank1 is 1, the under-refresh count of group1-bank4 is 3, the under-refresh count of group2-bank2 is 4, and the under-refresh count of group2-bank4 is 3.
  • the refresh instruction information includes: 1 refresh command to refresh group1-bank1, 4 refresh commands to refresh group2-bank2, 3 refresh commands to refresh group1-bank4, and 3 refresh commands to refresh group2-bank4.
  • the refresh indication information may include: 3 refresh commands for same-bank refresh and 5 refresh commands for single-bank refresh.
  • the refresh command of the same bank refresh is used to instruct the banks 4 in different groups to perform 3 refreshes.
  • the five refresh commands for single-bank refresh are respectively used to instruct group1-bank1 to refresh once, and to instruct group2-bank2 to refresh 4 times.
  • Mode 3 In determining the at least one target bank to be refreshed, when N target banks are included in addition to the target bank set mentioned in Mode 1 above, it is determined that the refresh mode of the N target banks is a single bank Refresh mode or same bank refresh mode. That is, the refresh indication information can also be used to indicate that the refresh modes of the N target banks are the single-bank refresh mode or the same-bank refresh mode.
  • the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4.
  • the currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4.
  • the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 2, the under-refresh count of bank 3 is 2, and the under-refresh count of bank 4 is 3.
  • the refresh instruction information may be used to instruct bank1, bank2, bank3 and bank4 to be refreshed once through the full bank refresh mode.
  • the refresh instruction information can also be used to instruct bank2, bank3 and bank4 to be refreshed in the single bank refresh mode, and the refresh count of bank2 is 1, the refresh count of bank3 is 1, and the refresh count of bank4 is 2.
  • the refresh indication information may include: 1 refresh command for full bank refresh and 4 refresh commands for single bank refresh.
  • the refresh commands for 4 single bank refreshes include: refresh commands for bank2, 1 refresh command for bank3, and 2 refresh commands for bank4. Therefore, at least the time occupied by four refresh commands for single-bank refresh and the delay caused by executing the refresh commands are saved.
  • the controller 102 may determine whether the number of under-refreshes in the storage area exceeds the preset number of refreshed banks, thereby determining a target bank in the target bank set.
  • the preset number of refresh banks may be equal to or less than the second threshold.
  • the refresh times of the target banks in the target bank set is equal to the preset number of refresh banks.
  • the refresh times of the target banks in the target bank set may be less than or equal to the total number of banks in the storage area. Therefore, the refresh times of the target banks included in the refresh command corresponding to the full bank refresh mode corresponding to the target bank set may be less than the number of banks in the storage area. total number of .
  • the refresh times of the target bank to be refreshed corresponding to the target bank set can be determined, so that a refresh command similar to full bank refresh is issued to the target bank in the target bank set to instruct the execution Refresh times of the corresponding target bank in the target bank set.
  • the number of refresh commands sent can be effectively reduced, thereby improving the performance of the memory.
  • the refresh indication information is illustrated in the following manners 4 to 6:
  • Mode 4 In the at least one target bank to be refreshed, the number of under-refreshes of the storage area exceeds the preset number of refreshed banks, so that a target bank set can be determined, and the target bank set is refreshed in a full bank refresh mode , and generate refresh indication information of the target bank set; the refresh indication information is used to indicate that the refresh mode of the target bank set is the full bank refresh mode.
  • the refresh indication information may also be used to indicate the number of times that the refresh command in the full bank refresh mode of the target bank set is executed.
  • the target bank set is determined according to a preset number of refresh banks.
  • the target bank set is used to indicate the target bank and the number of refreshes for each target bank.
  • the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4.
  • the currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4.
  • the under-refresh count of bank1 is 1
  • the under-refresh count of bank 2 is 2
  • the under-refresh count of bank 3 is 3
  • the under-refresh count of bank 4 is 4.
  • the under-refresh count pstpnd_cnt of the storage area is 10.
  • Each target bank set can generate a refresh command corresponding to a full bank refresh.
  • the first target bank set may include: bank1, bank2, bank3 and bank4.
  • the second target bank set can include: bank2, bank3, bank3 and bank4.
  • the refresh instruction information may include 2 refresh commands for full bank refresh.
  • a refresh command of a full bank refresh is used to instruct to refresh the refresh of the target bank in the first target bank set and the corresponding refresh times.
  • the refresh command of one full bank refresh is used to instruct the refresh of the target banks in the second target bank set and the corresponding refresh times.
  • the second threshold corresponding to the target bank set may be correspondingly set according to the number M of banks included in the storage area.
  • the second threshold may be set to be smaller than the number M of banks included in the storage area.
  • Mod(pstpnd_cnt/M) When it is determined that Mod(pstpnd_cnt/M) is greater than the second threshold, the number of times of executing the refresh mode of the whole bank satisfies: Mod(pstpnd_cnt/M)+1.
  • the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4.
  • the currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4.
  • the under-refresh count of bank1 is 4, the under-refresh count of bank 2 is 5, the under-refresh count of bank 3 is 6, and the under-refresh count of bank 4 is 8.
  • the under-refresh count pstpnd_cnt of the storage area is 23. Therefore, it can be determined that Mod(pstpnd_cnt/M) is 3 after the remainder is greater than the second threshold. Therefore, the number of times of executing the refresh mode of the whole bank can be the quotient of Mod(pstpnd_cnt/M) plus 1, which can be 6.
  • Each target bank set can generate a refresh command corresponding to a full bank refresh.
  • a set of 4 target banks may include: bank1, bank2, bank3 and bank4.
  • the fifth target bank set can include: bank2, bank3, bank3 and bank4.
  • the sixth target bank set may include: bank4, bank4, and bank4.
  • the refresh indication information of the target bank set may include 6 refresh commands in the full bank refresh mode.
  • the number of times of executing the refresh mode of the whole bank satisfies: the mod(pstpnd_cnt/M) value after the quotient.
  • the refresh mode of the at least one target bank to be refreshed is the single-bank refresh mode Or the same as bank refresh mode. That is, the refresh indication information is also used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  • the determined current target bank to be refreshed includes a part of the bank in the storage area.
  • the target bank set includes a subset of banks in one or more groups in the storage area. Therefore, it is impossible to determine the target bank set that satisfies the full-bank refresh mode. Therefore, the refresh mode of the target bank to be refreshed currently can be determined as the single-bank refresh mode, or the same-bank refresh mode.
  • the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4.
  • the currently determined at least one target bank to be refreshed includes bank1, bank2 and bank4.
  • the under-refresh count of bank1 is 1
  • the under-refresh count of bank 2 is 1
  • the under-refresh count of bank 4 is 1.
  • the preset number of refresh banks is equal to the number of banks in the storage area, that is, in this example, the preset number of refresh banks is 4. At this time, it can be determined that the number of under-refreshing times of the storage area is 3, and the number of under-refreshing times is less than the preset number of refreshed banks of 4.
  • the refresh indication information may be used to instruct bank1, bank2 and bank4 to be refreshed in a single bank refresh mode, and the number of times to be refreshed for bank1 is 1, the number of times to be refreshed for bank2 is 1, and the number of times to be refreshed for bank4 is 1.
  • the refresh indication information may include: 3 refresh commands for single bank refresh. Each refresh command is used to instruct the corresponding target bank to be refreshed to perform a refresh.
  • the storage area includes 2 bank groups, and the number of banks in each bank group is 4.
  • bank group1 includes: group1-bank1, group1-bank2, group1-bank3, and group1-bank4.
  • the currently determined banks to be refreshed by group1 include group1-bank1 and group1-bank4.
  • the under-refresh count of group1-bank1 is 1 and the under-refresh count of group1-bank4 is 1.
  • bank group2 includes: group2-bank1, group2-bank2, group2-bank3 and group2-bank4.
  • the currently determined banks to be refreshed by group2 include group2-bank2 and group2-bank4.
  • the under-refresh count of group2-bank2 is 1 and the under-refresh count of group2-bank4 is 1.
  • the refresh instruction information can be used to instruct group1-bank1 and group1-bank4, group2-bank2 and group2-bank4 to refresh through the single-bank refresh mode, and the number of times to be refreshed for group1-bank1 is 1, and the waiting times for group1-bank4 to be refreshed is 1.
  • the refresh count is 1, the under-refresh count of group2-bank2 is 1, and the under-refresh count of group2-bank4 is 1.
  • the refresh indication information may include: 1 refresh command for same-bank refresh and 2 refresh commands for single-bank refresh. Among them, the refresh command of the same bank refresh is used to instruct banks 4 in different groups to perform one refresh.
  • the two refresh commands for single-bank refresh are respectively used to instruct group1-bank1 to refresh once, and to instruct group2-bank2 to refresh once.
  • the refresh mode of the N target banks is a single-bank refresh mode or a same-bank refresh mode. That is, the refresh indication information is also used to indicate that the refresh modes of the N target banks are the single-bank refresh mode or the same-bank refresh mode.
  • the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4.
  • the currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4.
  • the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 2, the under-refresh count of bank 3 is 3, and the under-refresh count of bank 4 is 4.
  • the refresh instruction information may include two full bank refresh commands and two single bank refresh commands.
  • one full bank refresh command is used to instruct bank1, bank2, bank3 and bank4 to refresh once through the full bank refresh mode
  • one full bank refresh command is used to instruct bank2, bank3, bank3 and bank4 to pass the full bank refresh mode Refresh 1 time
  • 2 refresh commands for single bank refresh are used to instruct bank4 to refresh 2 times. Therefore, at least the time occupied by the refresh commands for 8 single-bank refresh and the delay caused by the execution of the refresh commands are saved.
  • the target bank set may be determined based on the number of all banks included in the storage area, or may be determined based on the number of partial banks included in the storage area, and the number of preset refresh banks can be set as required to control The number of refreshes of the target bank in the target bank set.
  • the refresh times of the target banks in the target bank set are different.
  • the number of all banks in the memory area can be considered. For example, in the scenario of 8 banks in LPDDR5, the number of banks is 8. Therefore, the refresh times of the target banks in the target bank set is at most 8. For another example, in the scenario of 4bank group4bank in LPDDR5, the number of banks in each group is 4, and the number of all banks in the storage area is 16. Therefore, the number of refreshes of target banks in the target bank set is at most 16.
  • the number of banks in each group can be considered. For example, in the scenario of 4bank group4bank in LPDDR5, the number of banks in each group is 4. Therefore, the number of refreshes of target banks in the target bank set is at most 4.
  • M REFpb operations can be directly equivalent to one REFab operation.
  • the controller sends 8 full bank refresh commands.
  • the effective time T_val for the execution of read and write commands within the maximum refresh interval is:
  • the hybrid refresh method can effectively improve the DDR read and write efficiency compared to the efficiency of only REFpb refresh.
  • the memory 101 refreshes at least one target bank to be refreshed according to the refresh indication information.
  • the control circuit 1011 can control the refresh circuit in the memory according to the refresh instruction information, so as to realize the refresh operation on the above-mentioned at least one target bank to be refreshed.
  • the refresh operation of the target bank set may be initiated according to the target bank set indicated in the refresh instruction information sent by the controller. Specifically, a precharge command may be issued to a target bank in the target bank set, the target bank in the target bank set is closed, and multiple refresh operations of the target bank set are initiated according to the refresh times of the target bank set.
  • the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4.
  • the currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4.
  • the under-refresh count of bank1 is 2
  • the under-refresh count of bank 2 is 2
  • the under-refresh count of bank 3 is 3
  • the under-refresh count of bank 4 is 5.
  • the under-refresh count pstpnd_cnt is 12.
  • the first and second target bank sets can respectively include: bank1, bank2, bank3 and bank4.
  • the third target bank set can include: bank3, bank4, bank4 and bank4. Therefore, when the refresh operation of the first and second target bank sets is performed, a precharge command can be issued to bank1, bank2, bank3 and bank4 to close bank1, bank2, bank3 and bank4. According to the refresh times of the target bank set, 1. Initiate 2 full bank refresh operations of bank1, bank2, bank3 and bank4. When performing the refresh operation of the third target bank set, you can initiate a precharge command to bank3 and bank4, close bank3 and bank4, and initiate a full refresh of bank3, bank4, bank4 and bank4 according to the refresh count of the target bank set is 1. The refresh operation of the bank.
  • the controller may update the maintenance under-refresh count pstpnd_cnt and the refresh status information of the bank.
  • the number of under-refresh times pstpnd_cnt and the refresh status information of the bank can be updated.
  • the under-refresh count pstpnd_cnt can be updated to be 8.
  • the under-refresh count of bank1 is 1
  • the under-refresh count of bank2 is 1
  • the under-refresh count of bank3 is 2
  • the under-refresh count of bank4 is 4.
  • the under-refresh count pstpnd_cnt can be updated to be 4.
  • the under-refresh count of bank1 is 0, the under-refresh count of bank2 is 0, the under-refresh count of bank3 is 1, and the under-refresh count of bank4 is 3.
  • the under-refresh count pstpnd_cnt can be updated to 0.
  • the under-refresh count of bank1 is 0, the under-refresh count of bank2 is 0, the under-refresh count of bank3 is 0, and the under-refresh count of bank4 is 0.
  • the number of under-refreshes pstpnd_cnt when the number of under-refreshes pstpnd_cnt is updated through the refresh mode of the whole bank, the number of refreshes of the bank determined according to the number of refreshes of the whole-bank refresh mode may be greater than the number of under-refreshes, for example, the number of under-refreshes pstpnd_cnt may be 13 ⁇ 1 value in 16, at this time, 4 target bank sets can be determined according to the number of under-refreshes, and each target bank set includes the refresh times of 4 banks.
  • the refresh count of the bank determined according to the refresh count of the full bank refresh mode is 16, which is greater than the under-refresh count pstpnd_cnt. Therefore, it is necessary to update the under-refresh times pstpnd_cnt according to the actual bank refresh times to ensure that pstpnd_cnt does not overflow.
  • the bank in the idle state to be refreshed can be preferentially selected through an algorithm to perform the REFpb operation. For example, when the REFpb operation is performed, a fair polling algorithm may be used to preferentially select an idle bank with an identifier of 0 to be refreshed. After the refresh of the corresponding REFpb is completed, the flag to be refreshed of the bank can be marked as 1, indicating that it has been refreshed.
  • the refresh mode is dynamically selected based on whether the number of delayed refreshes satisfies the refresh condition of the corresponding refresh mode.
  • the specific refresh mode selection is completed, the bank selection and the number of refresh cycles are combined to avoid multiple bank shutdowns and service traffic interruptions as much as possible, thereby improving the DDR bandwidth.
  • the controller 102 may indicate to the memory 101 at least one target bank to be refreshed through the refresh instruction information, and the Combined with the refresh methods of REFab, REFpb and REFsb, REFab, REFpb or REFsb are dynamically selected for refresh, thereby improving the refresh efficiency and the bandwidth of the DDR. Therefore, the controller 102 can control the refresh operation of the memory 101 more flexibly. It can be understood that, compared with the control circuit 1011 , the controller 102 has stronger logical judgment capability and can cope with more complex application scenarios. Compared with the present, the control circuit 1011 sequentially determines the bank to be refreshed next. In this embodiment of the present application, the controller 102 directly instructs at least one bank to be refreshed, which is conducive to enabling the refresh operation to be flexibly adapted to different application scenarios, reducing the The impact of reading and writing on storage space. Specifically include:
  • Step 401 The controller determines the under-refresh count of each bank and the under-refresh count pstpnd_cnt of the storage area.
  • the under-refresh count of the memory area is incremented by 1.
  • the bank when the under-refresh count of the bank is 0, the bank may also be marked as a refreshed state. This enables the controller to delete the refreshed bank when determining the target bank to be refreshed, thereby improving refresh efficiency.
  • the idle state bank marked as the unrefreshed state can be refreshed first, and in the scenario where there is no unrefreshed state bank, it can be further determined whether to mark the bank as the unrefreshed state according to whether the bank has under-refreshed times. This enables banks that perform single-bank refresh mode to be refreshed more evenly.
  • Step 402 The controller judges whether the refresh condition is satisfied according to the under-refresh count of each bank and the under-refresh count pstpnd_cnt of the storage area.
  • Step 403 the controller determines whether there is a target bank set, if yes, executes step 404 , if not, executes step 406 .
  • the currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4.
  • the under-refresh count of bank1 is 1
  • the under-refresh count of bank 2 is 2
  • the under-refresh count of bank 3 is 3
  • the under-refresh count of bank 4 is 4.
  • the first target bank set may include: bank1, bank2, bank3 and bank4, and each bank in the first target bank set is refreshed once.
  • the second target bank set includes: bank2, bank3, bank3 and bank4. Among them, through the full bank refresh mode, bank2 in the second target bank set is refreshed once, bank3 is refreshed twice, and bank4 is refreshed once.
  • only one target bank set may be determined, and it is not necessary to determine all possible target bank sets in the memory.
  • all target bank sets of the storage area are determined, which is not limited here.
  • step 406 may be executed to determine whether there is a target bank for single-bank refresh.
  • Step 404 The controller sends refresh indication information to the memory according to the determined target bank set and the refresh times of the target bank set.
  • the controller when it determines that there are multiple target bank sets, it can select any target bank set from the two determined target bank sets to generate corresponding refresh indication information.
  • the first target bank set can be selected to generate corresponding refresh indication information.
  • the refresh instruction information is used to instruct bank1, bank2, bank3 and bank4 to be refreshed once through the full bank refresh mode.
  • the controller determines that there is one target bank set, it generates refresh instruction information according to the target bank set. For example, when the controller determines that there is a second target bank set, the controller generates refresh instruction information according to the second target bank set, and performs refresh in the full bank refresh mode for the second target bank set.
  • the refresh indication information is used to indicate that the target bank set is refreshed through the full bank refresh mode, and the refresh times of the target bank set.
  • the memory is caused to perform a refresh operation in the full bank refresh mode on the first target set. Among them, it includes: executing the precharge instruction in full bank refresh mode on the target bank in the target bank set, stopping the read and write operations of the target bank, and executing the refresh operation on the target bank in the target bank set.
  • the refresh times of the target bank is based on the target bank. The number of occurrences of the target bank in the bank set is determined.
  • the refresh operations of target banks in the target bank set may be performed sequentially.
  • the target bank set includes: bank1, bank2, bank2, bank3. Then the memory can perform the refresh operations of bank1, bank2, bank2, and bank3 in sequence.
  • the controller determines that the refresh of the target bank set is completed, it can update the under-refresh times of the target banks in the target bank set and the under-refresh times of the storage area.
  • Step 405 When the controller determines that the refresh of the target bank set is completed, it judges whether there are multiple target bank sets. If yes, go back to step 404; if not, go back to step 401.
  • the controller when it determines that there are multiple target bank sets, it can return to step 404 and continue to perform refresh processing on other target bank sets that have not been refreshed according to the processing procedure of step 404 until all target bank sets are refreshed. .
  • the second target bank set when returning to step 404 for execution again, can be selected to generate corresponding refresh instruction information.
  • the refresh instruction information is used to instruct bank2, bank3, bank3 and bank4 to be refreshed once through the full bank refresh mode.
  • Step 404 is performed on the first target bank set and the second target bank set in turn, so that all target bank sets can be refreshed. 8 under-refresh count minus. At this point, the refresh of the target bank set is completed.
  • Step 406 The controller determines the target bank to be refreshed according to the bank in the idle state and the bank marked as the state to be refreshed.
  • the storage area also includes two to-be-refreshed bank4. Therefore, two single-bank refresh commands can also be generated. Among them, two refresh commands for single bank refresh are used to instruct bank4 to be refreshed twice.
  • Step 407 The controller sends refresh instruction information to the control circuit according to the target bank to be refreshed.
  • the refresh indication information is used to indicate that the target bank to be refreshed is refreshed through the single bank refresh mode.
  • the controller determines that the refresh of the target bank to be refreshed is completed, the controller updates the under-refresh count of the target bank to be refreshed and the under-refresh count of the storage area.
  • the two modes are dynamically selected according to the number of times to be refreshed during the refresh process, and multiple REFpbs are replaced by REFab to reduce the number of REFpb operations and avoid frequent REFpb crowding DDR bandwidth.
  • the DDR efficiency is affected.
  • the refresh of idle banks is given priority to avoid normal read and write banks being forced to be closed for refresh.
  • Step 408 The control circuit refreshes the target bank to be refreshed according to the refresh instruction information.
  • Step 409 when the controller determines that the refresh of the target bank to be refreshed is completed, the controller returns to step 401 .
  • the number of under-refreshes of the target bank to be refreshed can be correspondingly reduced, and the number of under-refreshes pstpnd_cnt of the storage area can be correspondingly reduced.
  • the target bank to be refreshed is bank4, and the number of times of refresh completion is 1.
  • the number of under-refreshes in bank4 can be reduced by one time and the number of under-refreshes in the storage area pstpnd_cnt can be correspondingly reduced.
  • the target bank to be refreshed is bank4, and the number of times of refresh completion is 2.
  • the number of under-refreshes in bank4 can be reduced twice and the number of under-refreshes in the storage area pstpnd_cnt can be reduced accordingly.
  • the embodiment of the present application also provides a controller.
  • the controller can be used to implement the refresh method shown in FIG. 2 or FIG. 4 .
  • the controller 500 includes a transceiver unit 501 and a processing unit 502 .
  • the processing unit 502 is configured to determine at least one target bank to be refreshed according to the idle state of at least one bank in the storage area; according to the at least one target bank to be refreshed, generate refresh indication information and send it through the transceiver unit 501 to the memory; the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed.
  • the processing unit 502 is configured to determine, in at least one bank in an idle state, at least one candidate bank whose number of under-refreshes reaches a first threshold, wherein the number of under-refreshes is used to indicate that the bank is in the pre-refresh state. The number of times that the refresh is not performed within the set refresh duration; the target bank to be refreshed is determined in the at least one candidate bank.
  • the processing unit 502 is configured to, before determining the target bank to be refreshed in the at least one candidate bank, is further configured to: determine that the storage area satisfies a refresh condition; the refresh condition includes at least one of the following: Item: the under-refresh count of the at least one bank reaches the first threshold; the at least one bank is in an idle state; the at least one bank satisfies the forced refresh condition.
  • the processing unit 502 is configured to generate refresh indication information of the target bank set when it is determined that there is a target bank set that satisfies the full bank refresh mode, where the refresh indication information is used to indicate the target bank
  • the refresh mode of the set is a full bank refresh mode, and the target bank to be refreshed in the target bank set is one or more of the at least one target bank to be refreshed.
  • the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  • the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the processing unit 502 is configured to determine the at least one refresh mode. In a target bank to be refreshed, when there is no target bank set satisfying the all-bank refresh mode, it is determined that the refresh mode of the at least one target bank to be refreshed is the single-bank refresh mode or the same-bank refresh mode.
  • the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the processing unit 502 is used for at least one When the target banks to be refreshed include N target banks to be refreshed in addition to the target bank set, it is determined that the refresh modes of the N target banks to be refreshed are single-bank refresh mode or same-bank refresh mode.
  • the embodiment of the present application also provides a memory.
  • This storage can be used to perform the refresh method shown in FIG. 2 or FIG. 4 .
  • the memory 600 provided by this embodiment of the present application may include: a control unit 601 , a refresh unit 602 , and a storage unit 603 .
  • the memory 600 may be the memory 101 in FIG. 1a
  • the control unit 601 may be the control circuit 1011 in FIG. 1a
  • the refresh unit 602 may be at least one of the refresh circuits 1-N in FIG. 1a
  • the storage unit 603 It may be at least one (ie, a storage area) of banks 1 to N in FIG. 1a.
  • the storage unit 603 includes at least one library bank
  • the refresh unit 602 is used to refresh the at least one bank;
  • the control unit 601 is configured to receive refresh indication information sent by the controller, where the refresh indication information is used to indicate at least one target bank to be refreshed in the storage unit 603; the at least one target bank to be refreshed is a The idle state of at least one bank in the storage unit 603 of the memory is determined; and according to the refresh indication information, the refresh unit 602 is controlled to refresh the at least one target bank to be refreshed.
  • the refresh unit 602 is at least one; the control unit 601 is specifically configured to respectively control the at least one refresh unit 602 to refresh at least one target bank to be refreshed respectively.
  • the refresh indication information is used to indicate that the refresh mode of the target bank to be refreshed in the target bank set is the full bank refresh mode; the target bank to be refreshed in the target bank set is the One or more items in at least one target bank to be refreshed; the control unit 601 is specifically configured to, according to the refresh instruction information, control the refresh unit 602 corresponding to the target bank set to refresh the The target bank to be refreshed in the target bank set.
  • the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  • the control unit 601 is specifically configured to, according to the refresh indication information, control the refresh unit 602 corresponding to the at least one target bank to be refreshed to refresh the at least one target to be refreshed through a single bank refresh mode or a same bank refresh mode. bank.
  • control unit 601 may further determine that the at least one to-be-refreshed target bank set does not exist in the at least one to-be-refreshed target bank set satisfying the full-bank refresh mode
  • the refresh mode of the target bank is single bank refresh mode or same bank refresh mode.
  • the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the N target banks to be refreshed In determining the at least one target bank to be refreshed, the target bank to be refreshed other than the target bank set; the control unit 601 is also used for, according to the refresh instruction information, through the single bank refresh mode or The refresh unit 602 corresponding to the at least one target bank to be refreshed is controlled in the same bank refresh mode to refresh the N target banks to be refreshed.
  • each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, random access memory (random access memory, RAM), read only memory (read only memory, ROM), magnetic disk or optical disk and other media that can store program codes.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Hardware Design (AREA)
  • Dram (AREA)

Abstract

Disclosed in the present application are a memory refresh method, a memory, a controller, and a storage system. When the memory refresh method is applied to the controller, the controller is used for controlling the memory; a storage area of the memory comprises at least one bank; at least one target bank to be refreshed is determined according to an idle state of at least one bank in the storage area; refresh indication information is generated and sent to the memory according to said at least one target bank; and the refresh indication information is used for controlling the memory to refresh said at least one target bank.

Description

一种存储器的刷新方法、存储器、控制器及存储系统A memory refresh method, memory, controller and storage system 技术领域technical field
本申请涉及存储器刷新技术领域,尤其涉及一种存储器的刷新方法、存储器、控制器及存储系统。The present application relates to the field of memory refresh technologies, and in particular, to a memory refresh method, a memory, a controller, and a storage system.
背景技术Background technique
电容式存储器的价格低廉、存储密度较高,是目前数字系统中关键部件之一。例如,动态随机存取存储器(dynamic random access memory,DRAM),利用电容对电荷的存储功能实现了数据存储。再比如,双倍速率同步动态随机存储器(double data rate SDRAM,DDR SDRAM)以其大容量、高速率和良好的兼容性在许多领域得到了相当广泛的应用。Capacitive memory is one of the key components in current digital systems because of its low price and high storage density. For example, dynamic random access memory (DRAM) realizes data storage by using the storage function of capacitance to charge. For another example, double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM) has been widely used in many fields due to its large capacity, high speed and good compatibility.
具体来说,存储器的存储空间一般会被配置为N个并行排列的库(bank),N为大于或等于1的整数。每一个bank,皆可以理解为一个二维的存储阵列,其中,横向称为行,纵向称为列。存储阵列中的一个存储单元包括一个电容,可以存储1bit数据。由于电容中的电荷会随着漏电而不断流失,因此,电容里的数据必须被定期读取并重新写入,以补偿流失的电荷,这种操作也叫做刷新(refresh)。即DRAM需要周期性不断进行刷新,才能保留住RAM内的数据,因此刷新是DRAM中重要的操作。Specifically, the storage space of the memory is generally configured as N banks (banks) arranged in parallel, where N is an integer greater than or equal to 1. Each bank can be understood as a two-dimensional storage array, in which the horizontal direction is called a row and the vertical direction is called a column. A memory cell in the memory array includes a capacitor, which can store 1 bit of data. Since the charge in the capacitor will be continuously lost with leakage, the data in the capacitor must be periodically read and rewritten to compensate for the lost charge. This operation is also called refresh. That is, DRAM needs to be refreshed periodically to retain the data in RAM, so refresh is an important operation in DRAM.
目前,对存储器进行刷新的技术方案数量有限,尚无法灵活适应不同的应用场景。因此,对存储器进行刷新的技术方案还有待进一步研究。At present, the number of technical solutions for refreshing the memory is limited and cannot be flexibly adapted to different application scenarios. Therefore, the technical solution for refreshing the memory needs to be further studied.
发明内容SUMMARY OF THE INVENTION
本申请提供一种存储器的刷新方法、存储器、控制器及存储系统,用于提高存储器的刷新效果。The present application provides a memory refresh method, a memory, a controller and a storage system, which are used to improve the refresh effect of the memory.
第一方面,本申请提供一种存储器的刷新方法,应用于控制器;所述控制器用于控制存储器;所述存储器的存储区域包括至少一个库bank;所述方法包括:In a first aspect, the present application provides a method for refreshing a memory, which is applied to a controller; the controller is used to control the memory; the storage area of the memory includes at least one bank; the method includes:
根据所述存储区域中的至少一个bank的空闲状态,确定至少一个待刷新的目标bank;Determine at least one target bank to be refreshed according to the idle state of at least one bank in the storage area;
根据所述至少一个待刷新的目标bank,生成刷新指示信息并发送给所述存储器;所述刷新指示信息用于控制所述存储器刷新所述至少一个待刷新的目标bank。According to the at least one target bank to be refreshed, refresh indication information is generated and sent to the memory; the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed.
通过上述方法,根据所述存储区域中的至少一个bank的空闲状态,刷新bank,可以在保证刷新的前提下,避免在读写命令被刷新命令打断所导致的读写的延迟,提高读写性能及存储器执行读写命令的效率。Through the above method, the bank is refreshed according to the idle state of at least one bank in the storage area, and the read and write delay caused by the interruption of the read and write command by the refresh command can be avoided on the premise of ensuring the refresh, and the read and write commands can be improved. Performance and the efficiency with which the memory executes read and write commands.
在一种可能的实现方式中,所述确定至少一个待刷新的目标bank,包括:在空闲状态的至少一个bank中确定欠刷新次数达到第一阈值的至少一个候选bank,其中,所述欠刷新次数用于指示所述bank在预设的刷新时长内未进行刷新的次数;在所述至少一个候选bank中确定待刷新的目标bank。In a possible implementation manner, the determining at least one target bank to be refreshed includes: determining, in at least one bank in an idle state, at least one candidate bank whose number of under-refreshing times reaches a first threshold, wherein the under-refreshing The number of times is used to indicate the number of times that the bank has not been refreshed within the preset refresh duration; the target bank to be refreshed is determined in the at least one candidate bank.
通过上述方法,优先刷新欠刷新次数达到第一阈值的至少一个候选bank,保证存储器的刷新效果。Through the above method, at least one candidate bank whose number of under-refreshing times reaches the first threshold is preferentially refreshed, so as to ensure the refresh effect of the memory.
在一种可能的实现方式中,在所述至少一个候选bank中确定待刷新的目标bank之前,还包括:确定所述存储区域满足刷新条件;所述刷新条件包括以下至少一项:所述至少一 个bank的欠刷新次数达到第一阈值;所述至少一个bank处于空闲状态;所述至少一个bank满足强制刷新条件。In a possible implementation manner, before determining the target bank to be refreshed in the at least one candidate bank, the method further includes: determining that the storage area satisfies a refresh condition; the refresh condition includes at least one of the following: the at least one The under-refresh count of one bank reaches the first threshold; the at least one bank is in an idle state; the at least one bank satisfies the forced refresh condition.
通过上述方法,可以使得控制器更灵活的选择目标bank,在满足所述至少一个bank的欠刷新次数达到第一阈值;所述至少一个bank处于空闲状态;所述至少一个bank满足强制刷新条件中的至少一项时,确定待刷新的目标bank,使得存储器可以尽量减少刷新bank对bank的正常读写的影响。Through the above method, the controller can be made to select the target bank more flexibly, when the under-refresh count of the at least one bank reaches the first threshold; the at least one bank is in an idle state; the at least one bank satisfies the forced refresh condition When at least one of the items is selected, the target bank to be refreshed is determined, so that the memory can minimize the influence of the refreshed bank on the normal reading and writing of the bank.
在一种可能的实现方式中,所述根据所述至少一个待刷新的目标bank,生成刷新指示信息,包括:在确定存在满足全bank刷新模式的目标bank集合时,生成所述目标bank集合的刷新指示信息,所述刷新指示信息用于指示所述目标bank集合的刷新模式为全bank刷新模式,所述目标bank集合中的待刷新的目标bank为所述至少一个待刷新的目标bank中的一项或多项。In a possible implementation manner, the generating refresh indication information according to the at least one target bank to be refreshed includes: when it is determined that there is a target bank set that satisfies the full bank refresh mode, generating the target bank set Refresh instruction information, the refresh instruction information is used to indicate that the refresh mode of the target bank set is the full bank refresh mode, and the target bank to be refreshed in the target bank set is the target bank in the at least one target bank to be refreshed. one or more.
通过上述方法,在存在满足全bank刷新模式的目标bank集合时,可以利用全bank刷新模式,刷新目标bank集合中的待刷新的目标bank,避免单bank刷新模式下,必须针对每个bank刷新发送相应bank的刷新命令,极大的减少了刷新命令的发送及由于接收刷新命令所产生的时延,减少了整个存储器的刷新占用的刷新时间。Through the above method, when there is a target bank set that satisfies the full-bank refresh mode, the target bank to be refreshed in the target bank set can be refreshed by using the full-bank refresh mode, avoiding that in the single-bank refresh mode, it is necessary to refresh the transmission for each bank. The refresh command of the corresponding bank greatly reduces the sending of the refresh command and the time delay caused by receiving the refresh command, and reduces the refresh time occupied by the refresh of the entire memory.
在一种可能的实现方式中,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
通过上述方法,通过单bank刷新模式或同bank刷新模式,指示相应bank的刷新命令,从而,可以灵活的对待刷新的目标bank进行指示。Through the above method, the refresh command of the corresponding bank is instructed through the single bank refresh mode or the same bank refresh mode, so that the target bank to be refreshed can be flexibly instructed.
在一种可能的实现方式中,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;所述方法还包括:In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the method further includes:
在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。When it is determined that there is no target bank set satisfying the all-bank refresh mode in the at least one target bank to be refreshed, it is determined that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
在一种可能的实现方式中,所述刷新指示信息还用于指示所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;所述方法还包括:在所述至少一个待刷新的目标bank中,除所述目标bank集合外,还包括N个待刷新的目标bank时,确定所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the method further includes: in the When at least one target bank to be refreshed includes N target banks to be refreshed in addition to the target bank set, it is determined that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode model.
通过上述方法,结合全bank刷新模式,在所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,通过单bank刷新模式或同bank刷新模式,实现存储器对空闲态的目标bank进行刷新,提高了刷新存储器bank的灵活性。Through the above method, combined with the full bank refresh mode, when there is no target bank set that satisfies the full bank refresh mode in the at least one target bank to be refreshed, the single bank refresh mode or the same bank refresh mode is used to realize the memory-to-idle refresh mode. The target bank in the state is refreshed, which improves the flexibility of refreshing the memory bank.
第二方面,本申请实施例提供一种控制器,第二方面中相应方案的技术效果可以参照第一方面中对应方案可以得到的技术效果,重复之处不予详述。示例性的,本申请实施例所提供的控制器主要包括处理电路和接口电路,其中:所述处理电路,用于根据存储器的存储区域中的至少一个bank的空闲状态,确定至少一个待刷新的目标bank;根据所述至少一个待刷新的目标bank,生成刷新指示信息;所述接口电路,用于向所述存储器发送所述刷新指示信息,所述刷新指示信息用于控制所述存储器刷新所述至少一个待刷新的目标bank。In the second aspect, an embodiment of the present application provides a controller. For the technical effect of the corresponding solution in the second aspect, reference can be made to the technical effect obtained by the corresponding solution in the first aspect, and the repeated parts will not be described in detail. Exemplarily, the controller provided by the embodiment of the present application mainly includes a processing circuit and an interface circuit, wherein: the processing circuit is configured to determine at least one bank to be refreshed according to the idle state of at least one bank in the storage area of the memory. a target bank; generate refresh indication information according to the at least one target bank to be refreshed; the interface circuit is configured to send the refresh indication information to the memory, where the refresh indication information is used to control the memory to refresh all Describe at least one target bank to be refreshed.
在一种可能的实现方式中,所述处理电路,具体用于:在空闲状态的至少一个bank中确定欠刷新次数达到第一阈值的至少一个候选bank,其中,所述欠刷新次数用于指示所 述bank在预设的刷新时长内未进行刷新的次数;在所述至少一个候选bank中确定待刷新的目标bank。In a possible implementation manner, the processing circuit is specifically configured to: determine, in at least one bank in an idle state, at least one candidate bank whose number of under-refreshes reaches a first threshold, wherein the number of under-refreshes is used to indicate The number of times that the bank has not been refreshed within a preset refresh duration; the target bank to be refreshed is determined in the at least one candidate bank.
在一种可能的实现方式中,所述处理电路,具体用于:在所述至少一个候选bank中确定待刷新的目标bank之前,确定所述存储区域满足刷新条件;所述刷新条件包括以下至少一项:所述至少一个bank的欠刷新次数达到第一阈值;所述至少一个bank处于空闲状态;所述至少一个bank满足强制刷新条件。In a possible implementation manner, the processing circuit is specifically configured to: before determining the target bank to be refreshed in the at least one candidate bank, determine that the storage area satisfies a refresh condition; the refresh condition includes at least the following: Item 1: the number of under-refreshes of the at least one bank reaches a first threshold; the at least one bank is in an idle state; the at least one bank satisfies the forced refresh condition.
在一种可能的实现方式中,所述处理电路在根据所述至少一个待刷新的目标bank,生成刷新指示信息时,具体用于:在确定存在满足全bank刷新模式的目标bank集合时,生成所述目标bank集合的刷新指示信息,所述刷新指示信息用于指示所述目标bank集合的刷新模式为全bank刷新模式,所述目标bank集合中的待刷新的目标bank为所述至少一个待刷新的目标bank中的一项或多项。In a possible implementation manner, when generating the refresh indication information according to the at least one target bank to be refreshed, the processing circuit is specifically configured to: when it is determined that there is a target bank set that satisfies the full bank refresh mode, generate Refresh indication information of the target bank set, where the refresh indication information is used to indicate that the refresh mode of the target bank set is the full bank refresh mode, and the target bank to be refreshed in the target bank set is the at least one to-be-refreshed target bank. One or more of the target banks to refresh.
在一种可能的实现方式中,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
在一种可能的实现方式中,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;所述处理电路,还用于:在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the processing circuit is further configured to: When it is determined that there is no target bank set satisfying the all-bank refresh mode in the at least one target bank to be refreshed, it is determined that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
在一种可能的实现方式中,所述刷新指示信息还用于指示N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;所述处理电路,还用于:在确定所述至少一个待刷新的目标bank中,存在除所述目标bank集合外的N个待刷新的目标bank时,确定所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the processing circuit is further configured to: after determining In the at least one target bank to be refreshed, when there are N target banks to be refreshed except the target bank set, it is determined that the refresh mode of the N target banks to be refreshed is a single bank refresh mode or the same bank refresh mode.
第三方面,本申请实施例提供一种存储器,第三方面中相应方案的技术效果可以参照第一方面中对应方案可以得到的技术效果,重复之处不予详述。示例性的,本申请实施例所提供的存储器可以包括:控制电路、刷新电路和存储区域,其中:所述存储区域包括至少一个库bank;所述刷新电路,用于刷新所述至少一个bank;所述控制电路,用于接收控制器发送的刷新指示信息,所述刷新指示信息用于指示所述存储区域中至少一个待刷新的目标bank;所述至少一个待刷新的目标bank为根据存储器的存储区域中的至少一个bank的空闲状态确定的;并根据所述刷新指示信息,控制所述刷新电路刷新所述至少一个待刷新的目标bank。In the third aspect, an embodiment of the present application provides a memory. For the technical effect of the corresponding solution in the third aspect, reference may be made to the technical effect obtained by the corresponding solution in the first aspect, and the repeated parts will not be described in detail. Exemplarily, the memory provided by the embodiments of the present application may include: a control circuit, a refresh circuit, and a storage area, wherein: the storage area includes at least one bank bank; the refresh circuit is configured to refresh the at least one bank; The control circuit is configured to receive refresh indication information sent by the controller, where the refresh indication information is used to indicate at least one target bank to be refreshed in the storage area; the at least one target bank to be refreshed is based on the memory The idle state of at least one bank in the storage area is determined; and according to the refresh indication information, the refresh circuit is controlled to refresh the at least one target bank to be refreshed.
在一种可能的实现方式中,所述刷新电路为至少一个;所述控制电路,具体用于分别控制至少一个刷新电路分别刷新至少一个待刷新的目标bank。In a possible implementation manner, the refresh circuit is at least one; the control circuit is specifically configured to respectively control the at least one refresh circuit to refresh at least one target bank to be refreshed respectively.
在一种可能的实现方式中,所述刷新指示信息用于指示目标bank集合中待刷新的目标bank的刷新模式为全bank刷新模式;所述目标bank集合中的待刷新的目标bank为所述至少一个待刷新的目标bank中的一项或多项;所述控制电路,具体用于根据所述刷新指示信息,通过全bank刷新模式控制所述目标bank集合对应的刷新电路刷新所述目标bank集合中的待刷新的目标bank。In a possible implementation manner, the refresh indication information is used to indicate that the refresh mode of the target bank to be refreshed in the target bank set is the full bank refresh mode; the target bank to be refreshed in the target bank set is the One or more items in at least one target bank to be refreshed; the control circuit is specifically configured to, according to the refresh indication information, control the refresh circuit corresponding to the target bank set to refresh the target bank through a full bank refresh mode The target bank in the collection to be refreshed.
在一种可能的实现方式中,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode;
所述控制电路,具体用于根据所述刷新指示信息,通过单bank刷新模式或同bank刷新模式控制所述至少一个待刷新的目标bank对应的刷新电路刷新所述至少一个待刷新的 目标bank。The control circuit is specifically configured to refresh the at least one target bank to be refreshed by controlling the refresh circuit corresponding to the at least one target bank to be refreshed through the single bank refresh mode or the same bank refresh mode according to the refresh instruction information.
在一种可能的实现方式中,所述控制电路,还用于:在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the control circuit is further configured to: when it is determined that in the at least one target bank to be refreshed, there is no target bank set satisfying the full bank refresh mode, determine the at least one target bank to be refreshed The refresh mode of the target bank to be refreshed is the single-bank refresh mode or the same-bank refresh mode.
在一种可能的实现方式中,所述刷新指示信息还用于指示所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;所述N个待刷新的目标bank是在确定所述至少一个待刷新的目标bank中,除所述目标bank集合外的待刷新的目标bank;In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the N target banks to be refreshed In determining the at least one target bank to be refreshed, the target banks to be refreshed other than the target bank set;
所述控制电路,还用于根据所述刷新指示信息,通过单bank刷新模式或同bank刷新模式控制所述至少一个待刷新的目标bank对应的刷新电路对所述N个待刷新的目标bank进行刷新。The control circuit is further configured to control the refresh circuit corresponding to the at least one target bank to be refreshed to the N target banks to be refreshed through a single bank refresh mode or a same bank refresh mode according to the refresh instruction information. refresh.
第四方面,本申请实施例提供一种存储系统,第五方面中相应方案的技术效果可以参照第一方面中对应方案可以得到的技术效果,重复之处不予详述。示例性的,本申请实施例所提供的存储系统包括控制器和存储器,其中,控制器可以根据所述存储区域中的至少一个bank的空闲状态,确定至少一个待刷新的目标bank;根据所述至少一个待刷新的目标bank,生成刷新指示信息并发送给所述存储器;所述刷新指示信息用于控制所述存储器刷新所述至少一个待刷新的目标bank。存储器从而可以根据刷新指示信息,刷新上述至少一个目标bank。In the fourth aspect, an embodiment of the present application provides a storage system. For the technical effect of the corresponding solution in the fifth aspect, reference can be made to the technical effect obtained by the corresponding solution in the first aspect, and the repeated parts will not be described in detail. Exemplarily, the storage system provided by the embodiment of the present application includes a controller and a memory, wherein the controller may determine at least one target bank to be refreshed according to the idle state of at least one bank in the storage area; according to the For at least one target bank to be refreshed, refresh indication information is generated and sent to the memory; the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed. The memory can thus refresh the at least one target bank according to the refresh instruction information.
本申请的这些方面或其它方面在以下实施例的描述中会更加简明易懂。These and other aspects of the present application will be more clearly understood in the description of the following embodiments.
附图说明Description of drawings
图1a为本申请实施例适用的一种存储系统结构示意图;FIG. 1a is a schematic structural diagram of a storage system to which an embodiment of the present application is applicable;
图1b-图1c为一种存储器的刷新方法的时序示意图;Fig. 1b-Fig. 1c are timing diagrams of a refresh method of a memory;
图2为本申请实施例提供的一种存储器的刷新方法的流程示意图;2 is a schematic flowchart of a method for refreshing a memory according to an embodiment of the present application;
图3a为本申请实施例提供的一种存储器的刷新方法的时序示意图;3a is a schematic time sequence diagram of a method for refreshing a memory according to an embodiment of the present application;
图3b为本申请实施例提供的一种存储器的刷新方法的时序示意图;3b is a schematic timing diagram of a method for refreshing a memory according to an embodiment of the present application;
图3c为本申请实施例提供的一种存储器的刷新方法的时序示意图;3c is a schematic timing diagram of a method for refreshing a memory according to an embodiment of the present application;
图3d为本申请实施例提供的一种存储器的刷新方法的时序示意图;3d is a schematic time sequence diagram of a method for refreshing a memory according to an embodiment of the present application;
图4为本申请实施例提供的一种存储器的刷新方法的流程示意图;4 is a schematic flowchart of a method for refreshing a memory according to an embodiment of the present application;
图5为本申请实施例提供的一种控制器的结构示意图;FIG. 5 is a schematic structural diagram of a controller according to an embodiment of the present application;
图6为本申请实施例提供的一种存储器的结构示意图。FIG. 6 is a schematic structural diagram of a memory according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请实施例进行详细描述。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
下面先对本申请实施例涉及的概念进行解释。The concepts involved in the embodiments of the present application are explained below first.
刷新操作可以包括:自动刷新(Auto Refresh)和自刷新(Self Refresh)两种。其中,自刷新是DDR在休眠模式低功耗状态下的自动进行刷新保持数据的方式。而自动刷新则是通过动态控制器(Dynamic Memory Controller,DMC)控制完成刷新保持数据的方式。The refresh operation can include: automatic refresh (Auto Refresh) and self-refresh (Self Refresh). Among them, self-refresh is a way for DDR to automatically refresh and maintain data in a low power consumption state in a sleep mode. The automatic refresh is the way to complete the refresh and keep the data through the dynamic controller (Dynamic Memory Controller, DMC) control.
控制器在计算机系统中用于控制CPU与内存之间的数据传输,通过控制器可以使内存与CPU之间交换数据。控制器可以用于对CPU发出的指令进行处理;还可以用于对CPU 读取或写入内存中的数据进行处理;还可以用于根据刷新命令对内存进行刷新。需要说明的是,本申请实施例中,控制器可以整合在CPU中,也可以是独立于CPU的单独芯片。将控制器整合在CPU中,可以使CPU到内存的路径更短,降低CPU与内存之间的数据传输延迟。The controller is used in the computer system to control the data transmission between the CPU and the memory, and the data can be exchanged between the memory and the CPU through the controller. The controller can be used to process the instructions issued by the CPU; it can also be used to process the data read or written by the CPU in the memory; it can also be used to refresh the memory according to the refresh command. It should be noted that, in this embodiment of the present application, the controller may be integrated in the CPU, or may be a separate chip independent of the CPU. Integrating the controller into the CPU can make the path from the CPU to the memory shorter and reduce the data transmission delay between the CPU and the memory.
通道(channel)可以理解为一个控制器以及该控制器对应的内存空间。如果计算机系统中包含多个通道(channel),这些通道(channel)通常是完全相同且独立的。通常所说的双通道内存,可以是指CPU有两个完全独立的控制器。例如,控制器的数据位宽可以为32bit或64bit。A channel can be understood as a controller and the memory space corresponding to the controller. If a computer system contains multiple channels, these channels are usually identical and independent. Commonly referred to as dual-channel memory, it can mean that the CPU has two completely independent controllers. For example, the data bit width of the controller can be 32bit or 64bit.
DIMM即俗称的DIMM内存条。计算机系统的主板上设有DIMM插槽,每个DIMM插槽上可以插一根DIMM内存条,而一个通道(channel)可以对应一个或多个DIMM插槽。DIMM是由多个相同的内存颗粒贴在同一个印刷电路板(printed circuit board,PCB)上实现的。DIMM is commonly known as DIMM memory stick. The motherboard of the computer system is provided with DIMM slots, each DIMM slot can be inserted with a DIMM memory module, and one channel (channel) can correspond to one or more DIMM slots. DIMMs are implemented by attaching multiple identical memory particles to the same printed circuit board (PCB).
内存颗粒(chip)是组成DIMM的基本单元。单颗内存颗粒的位宽可以是4bit、8bit或者16bit,多颗内存颗粒并行起来组成32bit或64bit的位宽,来满足控制器的位宽要求。Memory particles (chips) are the basic units that make up DIMMs. The bit width of a single memory granule can be 4bit, 8bit or 16bit, and multiple memory granules are connected in parallel to form a 32bit or 64bit bit width to meet the bit width requirements of the controller.
库(RANK),指的是一组内存颗粒,这组内存颗粒并行从而使得数据位宽满足控制器的位宽要求。RANK也叫物理阵列库bank(physical bank,P-bank)。如前文所述,控制器的数据位宽一般是32bit或64bit,而单颗内存颗粒的位宽可以是4bit、8bit或者16bit,因此需要多颗内存颗粒并行起来组成32bit或64bit的位宽,来满足控制器的位宽要求。例如,控制器的数据位宽是64bit,内存颗粒的位宽是8bit,则8颗内存颗粒组成一个RANK;同理,控制器的数据位宽是64bit,内存颗粒的位宽是16bit,则4颗内存颗粒组成一个RANK。通常,一个DIMM可以包含1~4个RANK。A library (RANK) refers to a group of memory particles, which are parallelized so that the data bit width meets the bit width requirement of the controller. RANK is also called physical array bank (physical bank, P-bank). As mentioned above, the data bit width of the controller is generally 32bit or 64bit, and the bit width of a single memory particle can be 4bit, 8bit or 16bit. Therefore, multiple memory particles need to be paralleled to form a 32bit or 64bit bit width. Meet the bit width requirements of the controller. For example, if the data bit width of the controller is 64 bits, and the bit width of the memory particles is 8 bits, then 8 memory particles form a RANK; similarly, if the data bit width of the controller is 64 bits, and the bit width of the memory particles is 16 bits, then 4 Memory particles form a RANK. Usually, a DIMM can contain 1 to 4 RANKs.
bank Group,可以是将多个bank形成一个组,每个bank Group可以独立读写数据。例如,DDR4架构上采用了8n预取的bank Group分组,存储器可以包括使用两个或者四个可选择的bank Group分组,使得DDR4内存的每个bank Group分组都有独立的激活、读取、写入和刷新操作。如果存储器内部包括两个独立的bank Group,相当于每次操作16bit的数据,预取值可以提高到16n,如果存储器内部包括四个独立的bank Group,则预取值提高到32n。Bank Group, which can be formed by forming multiple banks into a group, and each bank Group can independently read and write data. For example, the DDR4 architecture uses 8n prefetched bank groups, and the memory can include two or four selectable bank groups, so that each bank group of DDR4 memory has independent activation, reading, and writing. Enter and refresh operations. If the memory includes two independent bank groups, which is equivalent to 16-bit data per operation, the prefetch value can be increased to 16n; if the memory includes four independent bank groups, the prefetch value can be increased to 32n.
在实际实现时,不同的RANK连接到控制器上的不同的片选(chip select,CS)信号输出管脚,即,控制器通过不同的CS信号使能不同的RANK。例如,一个控制器对应4个DIMM,每个DIMM包含2个RANK,那么,控制器输出8个CS信号,每个CS信号用于使能一个RANK;再比如,一个控制器对应4个DIMM,每个DIMM包含4个RANK,那么,控制器输出16个CS信号,每个CS信号用于使能一个RANK。In actual implementation, different RANKs are connected to different chip select (CS) signal output pins on the controller, that is, the controller enables different RANKs through different CS signals. For example, a controller corresponds to 4 DIMMs, and each DIMM contains 2 RANKs, then the controller outputs 8 CS signals, each CS signal is used to enable a RANK; for another example, a controller corresponds to 4 DIMMs, Each DIMM contains 4 RANKs, then, the controller outputs 16 CS signals, each CS signal is used to enable one RANK.
需要说明的是,当一个控制器对应的内存空间中包含多个RANK时,多个RANK共用同一组命令线和同一组地址线,每个RANK的刷新操作是独立进行的,即在同一时间段内,控制器仅使能多个CS信号中的一个CS信号,来刷新该CS信号使能的RANK。It should be noted that when the memory space corresponding to a controller contains multiple RANKs, the multiple RANKs share the same set of command lines and the same set of address lines, and the refresh operation of each RANK is performed independently, that is, in the same time period. Inside, the controller enables only one CS signal among the multiple CS signals to refresh the RANK enabled by the CS signal.
在本申请的描述中“至少一个”是指一个或多个,其中,多个是指两个或两个以上。鉴于此,本发明实施例中也可以将“多个”理解为“至少两个”。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,字符“/”,如无特殊说明,一般表示前后关联对象是一种“或”的关系。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等 词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。In the description of this application, "at least one" refers to one or more, wherein a plurality of refers to two or more. In view of this, in the embodiment of the present invention, "a plurality" may also be understood as "at least two". "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/", unless otherwise specified, generally indicates that the related objects are an "or" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing the description, and should not be understood as indicating or implying relative importance, nor should it be understood as indicating or implied order.
图1a示例性示出了本申请实施例可以适用的一种存储系统结构示意图。该存储系统100可以是具备数据存储功能的电子设备或集成芯片,例如,存储系统100可以是手机、电脑、智能相机等电子设备,也可以是片上系统(system on chip,SOC)、中央处理器(central processing unit,CPU)等芯片,本申请实施例对此并不多作限制。FIG. 1a exemplarily shows a schematic structural diagram of a storage system to which this embodiment of the present application is applicable. The storage system 100 may be an electronic device or an integrated chip with a data storage function. For example, the storage system 100 may be an electronic device such as a mobile phone, a computer, and a smart camera, or a system on chip (SOC), a central processing unit, or a (central processing unit, CPU) and other chips, which are not limited in this embodiment of the present application.
如图1a所示,存储系统100包括存储器101和控制器102。其中,控制器102可以包括处理电路1021和接口电路1022。示例性的,处理电路1021可以是逻辑运算电路,处理电路1021可以生成指令。接口电路1022可以是控制总线接口,控制器102可以通过接口电路1022与存储器101之间通过控制总线连接。接口电路1022可以向存储器101的控制电路1011发送指令,从而可以指示控制电路1011完成数据读取、存储及刷新等任务。As shown in FIG. 1 a , the storage system 100 includes a memory 101 and a controller 102 . The controller 102 may include a processing circuit 1021 and an interface circuit 1022 . Exemplarily, the processing circuit 1021 may be a logic operation circuit, and the processing circuit 1021 may generate instructions. The interface circuit 1022 may be a control bus interface, and the controller 102 may be connected to the memory 101 through a control bus through the interface circuit 1022 . The interface circuit 1022 can send an instruction to the control circuit 1011 of the memory 101, so as to instruct the control circuit 1011 to complete tasks such as data reading, storage, and refresh.
一般来说,存储器101可以包括控制电路1011、一个或多个刷新电路(例如刷新电路1、刷新电路2…..刷新电路N)和存储区域1012,其中N为大于等于1的整数。存储器101可以包括的刷新电路的数量,本申请实施例对此不作限制。In general, the memory 101 may include a control circuit 1011, one or more refresh circuits (eg, refresh circuit 1, refresh circuit 2, . . . refresh circuit N), and a storage area 1012, where N is an integer greater than or equal to 1. The number of refresh circuits that the memory 101 may include is not limited in this embodiment of the present application.
存储区域1012可以是由多个存储单元构成的二维存储阵列。每个存储单元可以存储1bit数据。在本申请实施例中,存储器101可以为电容式存储器,例如,存储器101可以为DRAM。在此情况下,每个存储单元对应有至少一个电容,每个存储单元可以通过电容中存储的电荷实现数据存储。例如,针对任一存储单元,若该存储单元的电容存储有电荷,则该存储单元所存储的数据为1,若该存储单元的电容未存储有电荷,则该存储单元所存储的数据为0。The storage area 1012 may be a two-dimensional storage array composed of a plurality of storage cells. Each storage unit can store 1 bit of data. In this embodiment of the present application, the memory 101 may be a capacitive memory, for example, the memory 101 may be a DRAM. In this case, each storage unit corresponds to at least one capacitor, and each storage unit can realize data storage through the charge stored in the capacitor. For example, for any storage unit, if the capacitor of the storage unit stores charge, the data stored in the storage unit is 1, and if the capacitor of the storage unit does not store charge, the data stored in the storage unit is 0 .
由于电容中的电荷会随着漏电而不断流失,因此,控制器102需要定期刷新存储器101。具体来说,控制器102可以向控制电路1011发送刷新命令,目前,该刷新命令多为自动刷新(auto-refresh)指令,或者激活(active)指令和预充电(pre-charge)指令等。其中,auto-refresh指令也可以简称为refresh指令。Since the electric charge in the capacitor will be continuously lost along with the leakage, the controller 102 needs to refresh the memory 101 periodically. Specifically, the controller 102 may send a refresh command to the control circuit 1011. Currently, the refresh command is mostly an auto-refresh command, or an active command and a pre-charge command. Among them, the auto-refresh instruction may also be referred to as the refresh instruction.
以refresh指令为例,控制器102可以向存储器101发送refresh指令。控制电路1011在接收到refresh指令后,将会根据控制电路1011内部预设的刷新逻辑,确定接下来需要刷新的目标bank。例如,控制电路1011内部设置有刷新计数器,用于自动的依次生成待刷新的目标bank的行地址。控制电路1011进而可以通过存储器101中的刷新电路完成对目标bank的刷新。Taking the refresh instruction as an example, the controller 102 may send the refresh instruction to the memory 101 . After receiving the refresh instruction, the control circuit 1011 will determine the target bank to be refreshed next according to the refresh logic preset in the control circuit 1011 . For example, the control circuit 1011 is internally provided with a refresh counter, which is used to automatically and sequentially generate the row addresses of the target banks to be refreshed. The control circuit 1011 can then complete the refresh of the target bank through the refresh circuit in the memory 101 .
一般来说,如图1a所示,存储区域1012还可以进一步分为多个bank。每个bank皆可以为m×n的二维存储阵列,m为二维存储阵列的行数,m为大于1的正整数,n为二维存储阵列的列数,n为大于1的正整数。可以理解,不同的bank可以具有相同或不同行数和列数,本申请实施例对此并不多作限制。Generally speaking, as shown in FIG. 1a, the storage area 1012 can be further divided into a plurality of banks. Each bank can be an m×n two-dimensional storage array, where m is the row number of the two-dimensional storage array, m is a positive integer greater than 1, n is the column number of the two-dimensional storage array, and n is a positive integer greater than 1 . It can be understood that different banks may have the same or different numbers of rows and columns, which are not limited in this embodiment of the present application.
存储器101中的多个刷新电路,可以分别执行对一个或多个bank的刷新操作。示例性的,如图1a所示,存储器101中的N个刷新电路可以分别刷新存储区域1012中的N个bank,也就是说,N个刷新电路可以与N个bank一一对应,如刷新电路1与bank1对应,则刷新电路1可以刷新bank1。接下来,以N个刷新电路可以与N个bank一一对应为例进行说明,应理解,当多个刷新电路与多个bank之间为一对多的对应关系时,也即一个刷新电路可以刷新多个bank时,同样可以适用本申请实施例提供的方案。The multiple refresh circuits in the memory 101 can respectively perform refresh operations on one or more banks. Exemplarily, as shown in FIG. 1a , the N refresh circuits in the memory 101 may refresh the N banks in the storage area 1012 respectively, that is, the N refresh circuits may correspond to the N banks one-to-one, such as refresh circuits. 1 corresponds to bank1, then refresh circuit 1 can refresh bank1. Next, the description will be given by taking the one-to-one correspondence between N refresh circuits and N banks. It should be understood that when there is a one-to-many correspondence between multiple refresh circuits and multiple banks, that is, one refresh circuit can When multiple banks are refreshed, the solutions provided by the embodiments of the present application can also be applied.
控制电路1011在确定了目标bank之后,可以向刷新电路1至N发送指示信息,以指 示刷新电路1至N分别刷新bank1至N。具体来说,刷新电路1在接收到指示信息后,可以刷新bank1,刷新电路2在接收到指示信息后,可以刷新bank2,等等。After determining the target bank, the control circuit 1011 may send instruction information to the refresh circuits 1 to N to instruct the refresh circuits 1 to N to refresh the banks 1 to N respectively. Specifically, the refresh circuit 1 can refresh bank1 after receiving the indication information, the refresh circuit 2 can refresh bank2 after receiving the indication information, and so on.
如前文所述,控制器中包含的刷新模块可以对内存进行刷新。当一个控制器对应的内存空间中包含一个bank时(即一个通道对应一个bank),计算机系统中的每个通道(channel)的刷新操作是独立进行的;当一个控制器对应的内存空间中包含多个bank时,每个bank的刷新操作是独立进行的。以一个控制器对应的内存空间中包含一个bank为例,每个通道(channel)的刷新操作的时序可以如图1b所示。As mentioned earlier, the refresh module included in the controller can refresh the memory. When the memory space corresponding to a controller contains a bank (that is, a channel corresponds to a bank), the refresh operation of each channel in the computer system is performed independently; when the memory space corresponding to a controller contains When there are multiple banks, the refresh operation of each bank is performed independently. Taking a memory space corresponding to a controller including a bank as an example, the timing sequence of the refresh operation of each channel (channel) can be shown in Figure 1b.
在刷新开始时,即针对选中bank中的所有存储体进行自动刷新过程中,该通道对应的内存空间(选中的bank)必须处于空闲状态,即该通道对应的内存空间中没有数据传输。通过行地址刷新周期和内存刷新时间间隔,可以表示刷新的特征信息。其中,行地址刷新周期(DRAM row refresh cycle time,tRFC)代表一次刷新的持续时长。即刷新命令产生后,在tRFC这一时间段里,控制器对该通道对应的内存空间进行刷新,此时该通道对应的内存空间必须处于空闲状态。At the beginning of the refresh, that is, during the automatic refresh process for all memory banks in the selected bank, the memory space corresponding to the channel (the selected bank) must be in an idle state, that is, there is no data transmission in the memory space corresponding to the channel. Through the row address refresh period and the memory refresh time interval, the characteristic information of the refresh can be represented. Among them, the row address refresh cycle (DRAM row refresh cycle time, tRFC) represents the duration of a refresh. That is, after the refresh command is generated, during the time period of tRFC, the controller refreshes the memory space corresponding to the channel, and the memory space corresponding to the channel must be in an idle state at this time.
内存刷新时间间隔(DRAM refresh interval,tREFI)代表刷新操作的平均间隔时长。也就是说,对于相邻的某两次刷新操作来说,二者的间隔时长(即开始进行第二次刷新操作的时间与开始进行第一次刷新操作的时间之差)可以小于tREFI,也可以大于tFEFI。只要多次刷新后,刷新操作的平均间隔时长为tFEFI即可。具体地,如图1b所示,在一次刷新结束之后,可以立即开始下一次刷新(即刷新操作的间隔时长为tRFC);在一次刷新开始之后,也可以间隔9tREFI后再进行下一次刷新。The memory refresh interval (DRAM refresh interval, tREFI) represents the average interval between refresh operations. That is to say, for two adjacent refresh operations, the interval between the two (that is, the difference between the time when the second refresh operation is started and the time when the first refresh operation is started) can be less than tREFI, or Can be greater than tFEFI. As long as there are multiple refreshes, the average interval between refresh operations is tFEFI. Specifically, as shown in FIG. 1b, after a refresh is completed, the next refresh can be started immediately (ie, the interval duration of the refresh operation is tRFC); after the start of a refresh, the next refresh can also be performed after an interval of 9tREFI.
存储器利用电容里的电荷存储数据,由于电荷会随着漏电现象的存在而不断流失,因此需要在丢失电荷前进行刷新,避免数据丢失。若刷新操作的间隔时长过长,会造成数据丢失。因此,协议中规定刷新操作的最大间隔时长为9tREFI。The memory uses the charge in the capacitor to store data. Since the charge will be continuously lost with the existence of leakage, it needs to be refreshed before the charge is lost to avoid data loss. If the interval between refresh operations is too long, data loss will occur. Therefore, the maximum interval duration of refresh operations specified in the protocol is 9tREFI.
为了保证刷新操作的平均间隔时长为tREFI,一种最为简单的实现方式是:在T0时刻进行一次刷新,间隔时长tREFI,然后在T0+tREFI时刻进行下一次刷新,间隔时长tREFI,然后在T0+2tREFI时刻进行下一次刷新……,以此类推。也就是说,周期性地进行刷新操作,进行刷新操作的周期为tREFI。但是,在具体实现过程中,如果在某个周期内用于进行刷新操作的时间段tRFC内,该通道对应的内存空间正在进行数据传输,那么按照上述机制,该内存空间需要停止数据传输、转为空闲状态,在刷新完成后再恢复数据传输。这样的做法无疑会降低内存访问的效率。In order to ensure that the average interval of refresh operations is tREFI, one of the simplest implementation methods is to perform a refresh at time T0 with an interval of tREFI, and then perform the next refresh at T0+tREFI, with an interval of tREFI, and then at T0+ 2tREFI time for the next refresh... and so on. That is, the refresh operation is performed periodically, and the period in which the refresh operation is performed is tREFI. However, in the specific implementation process, if the memory space corresponding to the channel is in the process of data transmission within the time period tRFC used for the refresh operation in a certain period, then according to the above mechanism, the memory space needs to stop data transmission and transfer. It is in an idle state, and data transmission is resumed after the refresh is completed. This approach will undoubtedly reduce the efficiency of memory access.
需要指出的是,在目前的刷新操作中,假设每个bank皆包括8192行存储单元,则控制器102需要发送32个refresh指令(每个refresh指令刷新256行),才可以使存储器101中的每一个存储单元皆被刷新一次。虽然目前控制器102可以通过refresh指令指示存储器101完成刷新,但该控制方式较为局限,无法灵活适应存储器101的不同的应用场景。It should be pointed out that, in the current refresh operation, assuming that each bank includes 8192 rows of storage units, the controller 102 needs to send 32 refresh commands (each refresh command refreshes 256 rows) before the memory 101 can be refreshed. Each memory cell is refreshed once. Although currently the controller 102 can instruct the memory 101 to complete the refresh through the refresh instruction, this control method is relatively limited and cannot flexibly adapt to different application scenarios of the memory 101 .
因此,为了使得刷新机制更加灵活、提高内存访问的效率,引入了刷新的推迟(postponing)机制和提前(pulling-in)机制。postponing机制即推迟刷新的时间,例如,在上面的示例中,若某通道正在进行数据传输,那么此时可不必进行刷新,而是等到数据传输结束后再进行刷新,从而避免刷新操作影响内存访问的效率。同样地,pulling-in机制即提前进行刷新,例如某个通道处于空闲状态时,即使距离上次刷新的时间不足tFEFI,也可以提前进行刷新。Therefore, in order to make the refresh mechanism more flexible and improve the efficiency of memory access, a refresh postponing mechanism and a pull-in mechanism are introduced. The postponing mechanism is to delay the refresh time. For example, in the above example, if a channel is undergoing data transmission, then it is not necessary to refresh at this time, but to wait until the data transmission is completed before refreshing, so as to avoid the refresh operation affecting memory access. s efficiency. Similarly, the pulling-in mechanism is refreshed in advance. For example, when a channel is idle, it can be refreshed in advance even if the time since the last refresh is less than tFEFI.
下面以推迟(postponing)机制为例进行简要说明。如图1b所示,为postponing机制 的一种时序示意图。图1b中,刷新操作的间隔时长为9tREFI,由于刷新机制中需要保证刷新操作的平均间隔时长为tREFI,因此在间隔时长为9tREFI的情况下,可以认为该通道欠刷新,该通道的欠刷新次数可以为8次。然后,在后续进行刷新操作的过程中,可以连续进行8次刷新操作,从而使得刷新操作的平均间隔时长为tREFI。The following is a brief description of the postponing mechanism as an example. As shown in Figure 1b, it is a timing diagram of the postponing mechanism. In Figure 1b, the interval of refresh operations is 9tREFI. Since the refresh mechanism needs to ensure that the average interval of refresh operations is tREFI, when the interval is 9tREFI, it can be considered that the channel is under-refreshed, and the number of under-refreshes of this channel is Can be 8 times. Then, in the process of subsequent refresh operations, 8 refresh operations may be performed continuously, so that the average interval duration of the refresh operations is tREFI.
当然,图1b所示的postponing机制为一种极端情况,实际实现时,刷新操作的间隔时长可以为tRFC~9tREFI之间的任意时长,在后续弥补前面postponing造成的欠刷新次数时,可以连续刷新多次,也可以分多次弥补欠刷新次数。Of course, the postponing mechanism shown in Figure 1b is an extreme case. In actual implementation, the interval of refresh operations can be any time between tRFC and 9tREFI. When the number of under-refreshes caused by the previous postponing is compensated, the refresh operation can be continuously refreshed. Multiple times, or multiple times to make up for the number of insufficient refreshes.
虽然推迟(postponing)机制和提前(pulling-in)机制可以在一定程度上降低本通道中的刷新操作对内存访问效率的影响,但是由于推迟(postponing)机制和提前(pulling-in)机制仅仅是针对本通道的操作,难以实现多个通道的统筹。Although the postponing mechanism and the early (pulling-in) mechanism can reduce the impact of the refresh operation in this channel on the memory access efficiency to a certain extent, the postponing (postponing) mechanism and the early (pulling-in) mechanism only For the operation of this channel, it is difficult to realize the overall planning of multiple channels.
采用上述推迟(postponing)机制和提前(pulling-in)机制难以兼顾到多个通道的内存访问需求,若系统中的任一通道处于刷新状态,内存地址的访问均可能出现短暂的断流现象。因此,现有技术中的刷新处理方案,由于多个通道的刷新操作独立进行,出现系统断流现象的概率较大,影响内存访问的效率。It is difficult to take into account the memory access requirements of multiple channels by using the above-mentioned postponing mechanism and pulling-in mechanism. If any channel in the system is in the refresh state, the access to the memory address may be temporarily interrupted. Therefore, in the refresh processing solution in the prior art, since the refresh operations of multiple channels are performed independently, the probability of system interruption is high, which affects the efficiency of memory access.
随着对容量、功耗和速度的更高要求,DDR协议从DDR3/LPDDR3发展到DDR4/LPDDR4,到DDR5/LPDDR5等协议版本的升级。随着内存颗粒的容量越大,就越需要频繁刷新,tREFI值越小,而完成一次刷新的执行时间tRFC越长。因此,自动刷新对DDR性能的影响越来越显著,对自动刷新的时机选择和刷新bank的优化也成为提升DDR性能的重要考虑。在一些实施例中,自动刷新还可以分多种模式,例如,全bank刷新模式(All bank auto-refresh,REFab)、单bank刷新模式(Per bank auto-refresh,REFpb)和同bank刷新模式(same bank auto-refresh,REFsb)。With higher requirements for capacity, power consumption and speed, the DDR protocol has developed from DDR3/LPDDR3 to DDR4/LPDDR4, and has been upgraded to DDR5/LPDDR5 and other protocol versions. With the larger capacity of the memory particles, the more frequent refresh is required, the smaller the tREFI value, and the longer the execution time tRFC to complete a refresh. Therefore, the impact of automatic refresh on DDR performance is becoming more and more significant, and the timing of automatic refresh and the optimization of refresh banks have also become important considerations for improving DDR performance. In some embodiments, automatic refresh can also be divided into multiple modes, for example, all bank refresh mode (All bank auto-refresh, REFab), single bank refresh mode (Per bank auto-refresh, REFpb) and same bank refresh mode ( same bank auto-refresh, REFsb).
其中,全bank刷新模式,可以是通过固定周期进行全bank的集中刷新。如图1c所示,即计数刷新时间(tREFI),在确定刷新时间到达时,就下发一次全bank刷新的刷新命令,控制电路接收到该刷新命令后,按照bank的顺序,依次执行所有bank的刷新。该方法由于每次执行刷新都将关闭所有的bank,存储器的读写命令容易被打断,此时DMC中将无法进行不同bank读写命令的调度。可选的,还可以结合postpone功能,在遇到bank中存在读写命令时,通过推迟刷新次数,避免打断DDR的正常读写操作,通过计数器维护当前已推迟的刷新次数,在存储器空闲状态下集中进行刷新补偿。但是,由于全bank刷新模式的操作时间较长,对DDR带宽有较大影响,也会增加读写命令在DMC中的等待时间,使DDR的整体读写延时增大。Among them, the whole bank refresh mode may be a centralized refresh of the whole bank through a fixed cycle. As shown in Figure 1c, that is, counting the refresh time (tREFI), when the refresh time is determined to arrive, a refresh command for the whole bank refresh is issued. After the control circuit receives the refresh command, it executes all banks in sequence according to the bank order. refresh. In this method, all banks will be closed each time the refresh is performed, and the read and write commands of the memory are easily interrupted. At this time, the DMC will not be able to schedule the read and write commands of different banks. Optionally, it can also be combined with the postpone function to avoid interrupting the normal read and write operations of the DDR by delaying the number of refreshes when there are read and write commands in the bank, and maintain the currently postponed refresh times through the counter. The refresh compensation is performed in the next set. However, due to the long operation time of the full bank refresh mode, it has a great impact on the DDR bandwidth, and also increases the waiting time of the read and write commands in the DMC, which increases the overall read and write delay of the DDR.
单bank刷新模式,指的是按协议规定的tREFI固定间隔进行刷新,且刷新的bank顺序选择按固定次序依次遍历完成一轮刷新操作。在确定刷新时间到达时,按照bank的顺序,下发一次相应bank刷新的刷新命令,控制电路接收到该bank刷新的刷新命令后,执行该bank的刷新。在单bank刷新模式下,其tRFC较小,而且在刷新该bank时,可以不影响其他bank的正常读写。The single-bank refresh mode refers to the refresh at a fixed interval of tREFI specified by the protocol, and the bank sequence selection for refresh is traversed in a fixed order to complete a round of refresh operations. When it is determined that the refresh time arrives, according to the sequence of the banks, a refresh command for corresponding bank refresh is issued once, and the control circuit executes the bank refresh after receiving the refresh command for the bank refresh. In the single-bank refresh mode, its tRFC is small, and when the bank is refreshed, the normal reading and writing of other banks can not be affected.
同bank刷新模式,是基于bank group模式下,按协议规定的tREFI固定间隔,同时对每组中的一个bank进行刷新,且刷新的bank顺序选择按固定次序依次遍历完成一轮刷新操作。The same bank refresh mode is based on the bank group mode, at a fixed interval of tREFI specified by the protocol, and refreshes one bank in each group at the same time, and the refreshed bank sequence selection is traversed in a fixed order to complete a round of refresh operations.
在单bank刷新模式和同bank刷新模式下,虽然每次只关闭单个bank或多组中的单个bank,但需要的刷新次数也成倍增加。即在每个bank刷新时,都需要下发相应的刷新命令, 并激活相应的控制电路,执行相应bank刷新后,再结束刷新状态。尤其是使用bank数较多的DDR颗粒(例如,如图1c所示,bank数为8)时,采用单bank刷新模式和同bank刷新模式下的刷新次数是采用全bank刷新模式下的刷新次数的8倍。DDR的整体读写延时仍然较大。In the single-bank refresh mode and the same-bank refresh mode, although only a single bank or a single bank in multiple groups is closed at a time, the number of refreshes required is also multiplied. That is, when each bank is refreshed, a corresponding refresh command needs to be issued, and a corresponding control circuit is activated, and after the corresponding bank refresh is executed, the refresh state is terminated. Especially when using DDR chips with a large number of banks (for example, as shown in Figure 1c, the number of banks is 8), the refresh times in the single bank refresh mode and the same bank refresh mode are the refresh times in the full bank refresh mode. 8 times. The overall read and write latency of DDR is still relatively large.
另外,由于REFpb或REFsb采用固定次序选择bank遍历的方式,容易造成当前正在执行读写命令的bank恰好需要进行刷新,从而打断读写操作影响性能。同时若有其他处于idle空闲的待刷新bank,可能由于前序bank未刷新而无法充分利用空闲(idle)时间进行刷新。此时,结合postpone功能,也容易导致出现推迟次数较多,导致集中补发推迟次数时bank的调度困难,从而不得不打断DDR的正常读写操作,降低DDR带宽及读写性能。In addition, because REFpb or REFsb selects the bank traversal method in a fixed order, it is easy to cause the bank that is currently executing the read and write command to need to be refreshed, thus interrupting the read and write operation and affecting the performance. At the same time, if there are other idle banks to be refreshed, it may not be able to make full use of the idle time to refresh because the previous bank has not been refreshed. At this time, combined with the postpone function, it is easy to cause a large number of delays, which makes it difficult to schedule the bank when the number of delays is reissued in a centralized manner. Therefore, the normal read and write operations of the DDR have to be interrupted, reducing the DDR bandwidth and read and write performance.
有鉴于此,本申请实施例提供一种控制器、存储器及刷新方法。在本申请实施例中,控制器102可以通过刷新指示信息向存储器101指示至少一个待刷新的目标bank,因此,控制器102可以更加灵活地控制存储器101的刷新操作。可以理解,控制器102相较于控制电路1011,具有更强的逻辑判断能力,可以应对更为复杂的应用场景。相较于目前的方案,由控制电路1011自行确定接下来需要刷新的行,本申请实施例通过控制器102直接指示待刷新的至少一个bank,有利于使刷新操作能够灵活适应不同的应用场景,降低对存储空间的读写的影响。In view of this, embodiments of the present application provide a controller, a memory, and a refresh method. In this embodiment of the present application, the controller 102 may indicate to the memory 101 at least one target bank to be refreshed through the refresh indication information. Therefore, the controller 102 may control the refresh operation of the memory 101 more flexibly. It can be understood that, compared with the control circuit 1011 , the controller 102 has stronger logical judgment capability and can cope with more complex application scenarios. Compared with the current solution, the control circuit 1011 automatically determines the next row that needs to be refreshed. In this embodiment of the present application, the controller 102 directly indicates at least one bank to be refreshed, which is beneficial to make the refresh operation flexibly adapt to different application scenarios. Reduce the impact of reading and writing on storage space.
图2示例性示出了本申请实施例所提供的一种刷新方法流程示意图,如图2所示,该方法主要包括以下步骤:FIG. 2 exemplarily shows a schematic flowchart of a refresh method provided by an embodiment of the present application. As shown in FIG. 2 , the method mainly includes the following steps:
S201:控制器102根据所述存储区域中的至少一个bank的空闲状态,确定至少一个待刷新的目标bank。S201: The controller 102 determines at least one target bank to be refreshed according to the idle state of at least one bank in the storage area.
其中,所述存储器的存储区域包括至少一个bank。具体来说,可以由控制器102中的处理电路1021确定至少一个待刷新的目标bank。Wherein, the storage area of the memory includes at least one bank. Specifically, at least one target bank to be refreshed can be determined by the processing circuit 1021 in the controller 102 .
控制器102可以根据当前的应用场景灵活确定待刷新的目标bank,例如,可以根据存储器的访问情况、存储器的存储情况等因素确定存储区域中的至少一个bank的空闲状态,从而,根据空闲状态的bank及待刷新的bank,确定待刷新的目标bank。控制器102通过优化REFpb的bank顺序选择机制,检测bank的空闲idle状态,优先选择满足刷新条件的空闲bank进行刷新,从而避免当前空闲的bank因固定排序靠后而无法利用空闲时段发送刷新,降低对存储空间的读写的影响。The controller 102 can flexibly determine the target bank to be refreshed according to the current application scenario. For example, the idle state of at least one bank in the storage area can be determined according to factors such as the access situation of the memory and the storage situation of the memory. The bank and the bank to be refreshed determine the target bank to be refreshed. The controller 102 detects the idle idle state of the bank by optimizing the bank sequence selection mechanism of REFpb, and preferentially selects an idle bank that meets the refresh conditions for refresh, thereby preventing the currently idle bank from being unable to use the idle time period to send refresh due to the fixed order. The impact of reading and writing on storage space.
需要说明的是,在LPDDR5中8bank下,对空闲状态的bank的确定,还要考虑配对的bank的状态。在配对的bank中的所有bank都空闲时,才可以确定为配对的bank中的bank为空闲状态。It should be noted that under 8 banks in LPDDR5, the state of the paired bank should also be considered for the determination of the bank in the idle state. Only when all the banks in the paired bank are idle can it be determined that the bank in the paired bank is in an idle state.
在一些实施例中,控制器102可以通过独热码维护各个bank的刷新状态,在完成刷新时,可以将该bank的刷新状态标记为1,在未完成刷新时,可以将该bank的刷新状态标记为0。因此,在完成一次全bank的刷新后,所有bank的刷新状态全部都标记为零。In some embodiments, the controller 102 can maintain the refresh status of each bank through a one-hot code. When the refresh is completed, the refresh status of the bank can be marked as 1, and when the refresh is not completed, the refresh status of the bank can be marked. marked as 0. Therefore, after a full bank refresh is completed, the refresh status of all banks is marked as zero.
以LPDDR4,存储区域包括8个bank,颗粒容量1GB,刷新速率0.5X为例。其tREFI为1.952us。根据DDR协议auto-refresh的规定,REFpb模式在刷新操作未被读写操作中断的理想情况下,刷新的时间如图3a所示,在tREFI间隔内需要完成8次单bank刷新。因此,单bank的刷新时间间隔可以为1.952/8us。现有技术中,REFpb刷新命令是按照bank顺序来刷新的。例如,如图3a所示的刷新命令队列中,按照以下顺序发送REFpb的刷新 命令bank0->bank1->bank2…->bank7。8次REFbp的刷新为一个周期,在此过程中,可能出现当前需要刷新的bank(例如,bank2)与需要执行读写命令的bank为同一个bank,导致控制器只能调度除bank2之外的其他bank的读写命令,而基于调度bank2的读写命令的后续命令都将暂停,导致读写性能降低。Taking LPDDR4 as an example, the storage area includes 8 banks, the particle capacity is 1GB, and the refresh rate is 0.5X. Its tREFI is 1.952us. According to the provisions of the DDR protocol auto-refresh, in the ideal case that the refresh operation is not interrupted by the read and write operations in the REFpb mode, the refresh time is shown in Figure 3a, and 8 single bank refreshes need to be completed within the tREFI interval. Therefore, the refresh interval of a single bank can be 1.952/8us. In the prior art, the REFpb refresh command is refreshed according to the bank sequence. For example, in the refresh command queue shown in Figure 3a, the refresh command bank0->bank1->bank2...->bank7 of REFpb is sent in the following order. Eight refreshes of REFbp are one cycle. During this process, there may be current The bank that needs to be refreshed (for example, bank2) is the same bank as the bank that needs to execute read and write commands. As a result, the controller can only schedule read and write commands of other banks except bank2. Commands are suspended, resulting in reduced read and write performance.
示例一,控制器可以根据当前空闲的bank和待刷新的bank,确定待刷新的目标bank。Example 1, the controller may determine the target bank to be refreshed according to the currently idle bank and the bank to be refreshed.
假设在tREFI的一个单bank的刷新时间间隔内,bank1~bank8中存在bank1~bank3的读写的占用,即当前空闲的bank为bank4~bank8,待刷新的bank包括:bank4~bank7,控制器可以在bank4~bank7中选择一个bank,例如,bank4,执行单bank的刷新。在执行完成单bank的刷新后,可以将该bank(例如,bank4)标记为已刷新状态。在下一个单bank的刷新时间间隔内,可以根据当前空闲的bank和待刷新的bank,确定待刷新的目标bank。例如,bank1~bank8中存在bank4~bank6的读写的占用,因此,可以根据当前空闲的bank(bank1~bank3,bank7~bank8)和待刷新的bank(bank5~bank7),确定待刷新的目标bank为bank7。Assume that within the refresh time interval of a single bank in tREFI, banks1 to bank8 are occupied by the read and write of bank1 to bank3, that is, the currently idle banks are bank4 to bank8, and the banks to be refreshed include: bank4 to bank7. The controller can Select a bank from bank4 to bank7, for example, bank4, and perform a single-bank refresh. After performing a refresh of a single bank, the bank (eg, bank4) may be marked as refreshed. In the refresh time interval of the next single bank, the target bank to be refreshed can be determined according to the currently idle bank and the bank to be refreshed. For example, bank1 to bank8 are occupied by the read and write of bank4 to bank6. Therefore, the target bank to be refreshed can be determined according to the currently idle banks (bank1 to bank3, bank7 to bank8) and the bank to be refreshed (bank5 to bank7). for bank7.
如图3a所示的基于bank的空闲态的刷新命令队列中,一个tREFI周期内的每个单bank刷新时间间隔内,根据空闲的bank和待刷新的bank,确定待刷新的目标bank。从而,确定出的bank的刷新顺序为:bank2→bank5→bank6→bank0→bank3→bank7→bank1→bank4。In the bank-based idle state refresh command queue shown in Figure 3a, within each single bank refresh time interval within a tREFI cycle, the target bank to be refreshed is determined according to the idle bank and the bank to be refreshed. Therefore, the determined refresh sequence of banks is: bank2→bank5→bank6→bank0→bank3→bank7→bank1→bank4.
下面以一个具体的例子说明利用空闲状态的bank确定待刷新的目标bank的效率。The following uses a specific example to illustrate the efficiency of determining the target bank to be refreshed by using a bank in an idle state.
考虑距上一次所有bank刷新到下一次所有bank刷新的最大时间可以是存储器在9*tREFI的时间间隔内,读写业务不中断,导致存储器触发强制刷新,即集中补发被推迟的所有REFpb刷新操作所需的时间。在该场景下,可以确定出最大的刷新所有bank的时间间隔。如图3b所示。因此,距上一次完整刷新所有bank的时刻到完成强制刷新的时刻之间的最大时间T_total满足:Consider that the maximum time from the last refresh of all banks to the next refresh of all banks can be that the memory is within the time interval of 9*tREFI, and the read and write services are not interrupted, causing the memory to trigger a forced refresh, that is, the centralized reissue of all delayed REFpb refreshes The time required for the operation. In this scenario, the maximum time interval for refreshing all banks can be determined. As shown in Figure 3b. Therefore, the maximum time T_total from the moment when all banks were last completely refreshed to the moment when the forced refresh was completed satisfies:
T_total=9*tREFI+(8*bank_NUM-1)*tRFCpb=9*1952+(8*8-1)*90=23238nsT_total=9*tREFI+(8*bank_NUM-1)*tRFCpb=9*1952+(8*8-1)*90=23238ns
其中,9*tREFI表示触发强制刷新所需的时间,bank_NUM表示存储区域中的bank的数量,此处bank_NUM为8。tRFCpb表示从执行对某个bank刷新命令后,对任意一个其他BNAK刷新或者对其本身激活之前所需要的最小延迟。例如,TRFCpb可以为刷新bank0后,进行下一个bank的刷新操作(例如,刷新bank1命令)的延时。再比如,TRFCpb可以为刷新bank1后,进行下一次激活bank的操作(激活bank1命令)的延时。因此,(8*bank_NUM-1)*tRFCpb表示执行单bank模式下,将所有bank全部刷新完毕所需的时间。其中,控制器发送了(8*bank_NUM)个单bank刷新命令。Among them, 9*tREFI represents the time required to trigger the forced refresh, and bank_NUM represents the number of banks in the storage area, where bank_NUM is 8. tRFCpb indicates the minimum delay required to refresh any other BNAK or activate itself after executing a refresh command for a bank. For example, TRFCpb may be a delay for performing a refresh operation of the next bank (for example, a refresh bank1 command) after bank0 is refreshed. For another example, TRFCpb may be a delay for the next bank activation operation (activation bank1 command) after bank1 is refreshed. Therefore, (8*bank_NUM-1)*tRFCpb represents the time required to refresh all banks in the single-bank mode. Among them, the controller sends (8*bank_NUM) single bank refresh commands.
因此,距上一次所有bank刷新到下一次所有bank刷新的时间可以小于或等于最大时间T_total。Therefore, the time from the last refresh of all banks to the next refresh of all banks may be less than or equal to the maximum time T_total.
考虑在最大时间内,通过本申请的方法,可以避免在读写命令被刷新命令打断,导致读写存在延迟,因此,存储器执行读写命令执行的有效时间仅需考虑发送PREpb的读写命令和REFpb的刷新命令需要花费总线时间。因此,在最大时间T_total内可以执行读写命令执行的有效时间T_val满足:Considering that within the maximum time, the method of the present application can avoid that the read and write commands are interrupted by the refresh command, resulting in a delay in reading and writing. Therefore, the effective time for the memory to execute the read and write commands only needs to consider the read and write commands that send PREpb. and REFpb refresh commands take bus time. Therefore, within the maximum time T_total, the effective time T_val for the execution of read and write commands can be executed to satisfy:
T_val=9*tREFI+[(8*bank_NUM-1)*tRFCpb-(8*bank_NUM)*Tcmd_cost]*效率系数=9*1952+(63*90-63*4)*效率系数T_val=9*tREFI+[(8*bank_NUM-1)*tRFCpb-(8*bank_NUM)*Tcmd_cost]*efficiency coefficient=9*1952+(63*90-63*4)*efficiency coefficient
其中,Tcmd_cost为单次发送PREpb和REFpb命令需要花费的总线时间。Among them, Tcmd_cost is the bus time required to send the PREpb and REFpb commands once.
在LPDDR4中,通道数为4,因此,Tcmd_cost可以表示为4nCLK。效率系数是考虑实际场景的bank命令调度效率和bank的握手等额外开销引入的,在一些实施例中,效率系数可以在0.5-0.7之间。In LPDDR4, the number of channels is 4, so Tcmd_cost can be expressed as 4nCLK. The efficiency coefficient is introduced by considering the bank command scheduling efficiency in the actual scenario and additional overheads such as bank handshake. In some embodiments, the efficiency coefficient may be between 0.5 and 0.7.
因此,在刷新间隔的最大时间T_total内,存储器读写命令的执行效率满足:Therefore, within the maximum time T_total of the refresh interval, the execution efficiency of the memory read and write commands satisfies:
Eff=T_val/T_totalEff=T_val/T_total
在效率系数为0.5-0.7范围时,在T_total内读写命令的执行效率Eff为87.25%-91.92%。When the efficiency coefficient is in the range of 0.5-0.7, the execution efficiency Eff of read and write commands within T_total is 87.25%-91.92%.
在该最大时间场景下,REFpb对读写命令的执行效率的影响大约在8%左右。In this maximum time scenario, the impact of REFpb on the execution efficiency of read and write commands is about 8%.
为表示利用空闲状态的bank确定待刷新的目标bank的效率,而不是按照顺序对bank进行刷新。Determine the efficiency of the target bank to be refreshed for the bank that represents the use of the idle state, instead of refreshing the banks in sequence.
此时,假设按照顺序对bank进行刷新,有20%的几率刚好REFpb刷新导致无法调度出有效的读写命令,通过本申请中的方法,读写命令的执行效率可以有效提升8%*20%=1.6%。在其他场景的仿真中,例如基于真实读写路径的方式,通过本申请中的方法,读写命令的执行效率可以有效提升1%~2%。At this time, assuming that the bank is refreshed in sequence, there is a 20% chance that the REFpb refresh will just make it impossible to schedule effective read and write commands. By the method in this application, the execution efficiency of the read and write commands can be effectively improved by 8%*20% = 1.6%. In the simulation of other scenarios, for example, based on the real read and write path, the execution efficiency of the read and write commands can be effectively improved by 1% to 2% through the method in the present application.
示例二,控制器还可以结合推迟刷新的方式,根据当前空闲的bank和待刷新的bank,确定待刷新的目标bank。In example 2, the controller may also determine the target bank to be refreshed according to the currently idle bank and the bank to be refreshed in combination with the method of deferring refresh.
例如,在正常业务流量场景下,业务的读写操作可能导致刷新操作的推迟和补发。For example, in the normal business traffic scenario, the read and write operations of the business may cause the delay and reissue of the refresh operation.
本申请中,可以通过计数器pstpnd_cnt,统计bank的欠刷新次数,该欠刷新次数可以是以单bank的欠刷新次数进行维护的,即只要有一个bank的自动刷新推迟,则该计数器pstpnd_cnt的计数加1。在一个bank的自动刷新完成时,该计数器相应减1。相应的,在一次全bank的自动刷新完成时,该计数器相应减少所有bank的数量。在存在多个bank group的场景下,可能出现不同bank group中的相同bank同时进行刷新的场景,此时,可以根据不同group标记每个group中的bank,在一个group中的一个bank完成刷新时,该计数器pstpnd_cnt的计数减1,在K个group中的一个bank同时完成刷新时,该计数器pstpnd_cnt的计数减K。In this application, the counter pstpnd_cnt can be used to count the under-refresh times of the bank, and the under-refresh times can be maintained by the under-refresh times of a single bank, that is, as long as the automatic refresh of one bank is delayed, the count of the counter pstpnd_cnt will be added to the count. 1. When the automatic refresh of a bank is completed, the counter is decremented by 1 accordingly. Correspondingly, when an automatic refresh of all banks is completed, the counter decreases the number of all banks accordingly. In the scenario where there are multiple bank groups, the same bank in different bank groups may be refreshed at the same time. At this time, the banks in each group can be marked according to different groups, and when a bank in a group is refreshed , the count of the counter pstpnd_cnt is decremented by 1, and when one bank in the K groups completes the refresh at the same time, the count of the counter pstpnd_cnt is decremented by K.
其中,目标bank的欠刷新次数用于指示目标bank在预设的刷新时间未进行刷新的次数。如图1c的刷新操作时序所示,刷新操作的平均间隔时长为tREFI。在距离上次刷新操作的时长等于tREFI时,若某个目标bank正在进行数据传输,则该目标bank可以先不进行刷新。由于刷新机制中需要保证刷新操作的平均间隔时长为tREFI,因此在这种情况下,可以称该目标bank欠刷新。具体地,距离上次刷新操作的间隔时长越长,该目标bank的欠刷新次数越多。The under-refresh count of the target bank is used to indicate the number of times the target bank has not been refreshed within the preset refresh time. As shown in the refresh operation timing sequence of Fig. 1c, the average interval duration of refresh operations is tREFI. When the duration from the last refresh operation is equal to tREFI, if a target bank is performing data transmission, the target bank may not be refreshed first. Since the refresh mechanism needs to ensure that the average interval of refresh operations is tREFI, in this case, the target bank can be said to be under-refreshed. Specifically, the longer the interval from the last refresh operation, the more under-refresh times of the target bank.
示例性地,假设某个目标bank在T0时刻完成一次刷新操作,在T0~T0+2tREFI这一时间段内,由于该目标bank一直在进行数据传输,因此在T0+2tREFI时刻并没有对该目标bank进行刷新,此时该内存空间的欠刷新次数为2次;假设某个目标bank在T0时刻完成一次刷新操作,在T0~T0+5tREFI这一时间段内,由于该目标bank一直在进行数据传输,因此在T0+5tREFI时刻并没有对该目标bank进行刷新,此时该目标bank的欠刷新次数为5次。Exemplarily, assuming that a target bank completes a refresh operation at time T0, during the time period from T0 to T0+2tREFI, since the target bank has been performing data transmission, there is no such target at the time of T0+2tREFI. The bank is refreshed, and the number of under-refreshes of the memory space is 2 at this time. Suppose a target bank completes a refresh operation at time T0, during the time period of T0~T0+5tREFI, because the target bank has been processing data Therefore, the target bank is not refreshed at the time of T0+5tREFI, and the number of under-refreshes of the target bank at this time is 5 times.
其中,目标bank进行强制刷新的条件可以是:目标bank的欠刷新次数大于或等于第一阈值。即,目标bank的欠刷新次数大于或等于第一阈值时,控制器确定对目标bank进行强制刷新。刷新操作的最大间隔时长为9tREFI。当刷新操作的间隔时长过长(即欠刷新 次数较多,例如7次或8次)时,会增加数据丢失的风险。因此,可以在第一内存空间的欠刷新次数大于或等于第一阈值时,对第一内存空间进行强制刷新,进而避免数据丢失的情况出现。示例性地,第一阈值可以是7或8。Wherein, the condition for forcibly refreshing the target bank may be: the number of under-refreshing times of the target bank is greater than or equal to the first threshold. That is, when the number of under-refreshes of the target bank is greater than or equal to the first threshold, the controller determines to forcibly refresh the target bank. The maximum interval between refresh operations is 9tREFI. When the interval between refresh operations is too long (ie, there are many under-refresh times, such as 7 or 8 times), the risk of data loss increases. Therefore, when the number of under-refreshing times of the first memory space is greater than or equal to the first threshold, the first memory space can be forcibly refreshed, thereby avoiding the occurrence of data loss. Illustratively, the first threshold may be 7 or 8.
因此,在该场景下,可以在确定存储区域中的bank满足刷新条件后,将满足刷新条件的bank确定为待刷新的目标bank。所述刷新条件可以包括以下至少一项:所述至少一个bank的欠刷新次数达到第一阈值、所述至少一个bank处于空闲状态、所述至少一个bank满足强制刷新条件。Therefore, in this scenario, after it is determined that the bank in the storage area satisfies the refresh condition, the bank that satisfies the refresh condition may be determined as the target bank to be refreshed. The refresh conditions may include at least one of the following: the number of under-refreshes of the at least one bank reaches a first threshold, the at least one bank is in an idle state, and the at least one bank satisfies a forced refresh condition.
在一些实施例中,控制器可以在空闲状态的至少一个bank中确定欠刷新次数达到第一阈值的至少一个候选bank,在所述至少一个候选bank中确定待刷新的目标bank。In some embodiments, the controller may determine at least one candidate bank whose number of under-refreshes reaches the first threshold in at least one bank in an idle state, and determine a target bank to be refreshed in the at least one candidate bank.
举例来说,存储区域包括的bank的数量为4,存储区域包括:bank1,bank2,bank3和bank4。当前确定的待刷新的bank包括bank1,bank2,bank3和bank4。此时,可以确定候选bank包括:bank1,bank2,bank3和bank4。且bank1的欠刷新次数为5,bank2的欠刷新次数为6,bank3的欠刷新次数为2和bank4的欠刷新次数为3。存储区域的欠刷新次数通过计数器pstpnd_cnt表示。For example, the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4. The currently determined banks to be refreshed include bank1, bank2, bank3 and bank4. At this point, it can be determined that the candidate banks include: bank1, bank2, bank3 and bank4. And the number of under-refresh of bank1 is 5, the number of under-refresh of bank2 is 6, the number of under-refresh of bank3 is 2 and the number of under-refresh of bank4 is 3. The number of under-refreshes of the storage area is represented by the counter pstpnd_cnt.
以第一阈值可以设置为6为例,考虑当前空闲的bank包括:bank1和bank2。在空闲的bank中,bank1的欠刷新次数小于第一阈值,bank2的欠刷新次数大于第一阈值。因此,可以将当前待刷新的目标bank确定为bank2。在bank2的刷新完成后,可以将bank2的欠刷新次数更新为5。Taking the first threshold value as 6 as an example, consider that the currently idle banks include: bank1 and bank2. In an idle bank, the under-refresh count of bank1 is less than the first threshold, and the under-refresh count of bank2 is greater than the first threshold. Therefore, the current target bank to be refreshed can be determined as bank2. After the refresh of bank2 is completed, the number of under-refreshes of bank2 may be updated to 5.
考虑存在bank group的场景,此时,可以针对多个group中的每个group,根据空闲状态的bank及欠刷新次数达到第一阈值的bank,确定待刷新的目标bank。Consider the scenario where there is a bank group. At this time, for each group in multiple groups, the target bank to be refreshed can be determined according to the bank in the idle state and the bank whose number of under-refreshes reaches the first threshold.
再比如,存储区域包括2个bank group,每个bank group中的bank数量为4,例如,bank group1包括:group1-bank1,group1-bank2,group1-bank3和group1-bank4。当前确定的group1待刷新的bank包括group1-bank1,group1-bank2,group1-bank3和group1-bank4。且group1-bank1的欠刷新次数为5,group1-bank2的欠刷新次数为6,group1-bank3的欠刷新次数为7和group1-bank4的欠刷新次数为8。bank group2包括:group2-bank1,group2-bank2,group2-bank3和group2-bank4。当前确定的group2待刷新的bank包括group2-bank1,group2-bank2,group2-bank3和group2-bank4。且group2-bank1的欠刷新次数为3,group2-bank2的欠刷新次数为4,group2-bank3的欠刷新次数为7和group2-bank4的欠刷新次数为8。For another example, the storage area includes 2 bank groups, and the number of banks in each bank group is 4. For example, bank group1 includes: group1-bank1, group1-bank2, group1-bank3, and group1-bank4. The currently determined banks of group1 to be refreshed include group1-bank1, group1-bank2, group1-bank3 and group1-bank4. The under-refresh count of group1-bank1 is 5, the under-refresh count of group1-bank2 is 6, the under-refresh count of group1-bank3 is 7, and the under-refresh count of group1-bank4 is 8. bank group2 includes: group2-bank1, group2-bank2, group2-bank3 and group2-bank4. The currently determined banks to be refreshed by group2 include group2-bank1, group2-bank2, group2-bank3, and group2-bank4. And the under-refresh count of group2-bank1 is 3, the under-refresh count of group2-bank2 is 4, the under-refresh count of group2-bank3 is 7, and the under-refresh count of group2-bank4 is 8.
以第一阈值可以设置为6为例,可以将当前待刷新的目标bank确定为group1-bank2,group2-bank3和group2-bank4。可选的,还可以根据欠刷新次数对目标bank进行优先级的排序。例如,此时可以设置group2-bank4的优先级最高,group2-bank3的优先级中等,group1-bank2最低。从而,优先刷新欠刷新次数较高的bank,提高刷新效率,防止存储数据丢失。Taking the first threshold value as 6 as an example, the target banks to be refreshed currently may be determined as group1-bank2, group2-bank3 and group2-bank4. Optionally, the priority of target banks may also be sorted according to the number of under-refreshes. For example, at this time, you can set the priority of group2-bank4 to be the highest, the priority of group2-bank3 to be medium, and the priority of group1-bank2 to be the lowest. Therefore, the bank with a higher number of under-refreshes is preferentially refreshed, thereby improving the refresh efficiency and preventing the loss of stored data.
通过上述方法,结合postpone,通过优化刷新执行时机,而非在固定的tREFI间隔进行刷新操作。即先通过计数器维护当前已推迟的刷新次数,然后只要检测到bank的处理空闲状态,触发bank的刷新补偿,利用空闲时间插空进行刷新,避免打断DDR的正常读写操作,从而提高DDR性能。Through the above method, combined with postpone, the refresh execution timing is optimized instead of performing the refresh operation at a fixed tREFI interval. That is, the currently delayed refresh times are maintained through the counter, and then as long as the processing idle state of the bank is detected, the refresh compensation of the bank is triggered, and the idle time is used to insert the refresh to avoid interrupting the normal read and write operations of the DDR, thereby improving the performance of the DDR. .
再考虑另一种场景,在单bank刷新模式下,REFpb刷新命令由于读写命令导致当前bank不刷新,并相应生成bank的欠刷新次数,在该bank空闲状态下,补发该bank推迟 的REFpb刷新命令。此时,仍假设bank在空闲状态下补发20%的REFpb刷新命令,例如,补发N个REFpb刷新命令,因此,控制器在刷新时发送了(8*bank_NUM-N)个单bank刷新命令。如图3c中,刷新间隔最大时间:Consider another scenario. In the single bank refresh mode, the REFpb refresh command causes the current bank not to be refreshed due to the read and write commands, and accordingly generates the number of under-refreshes of the bank. In the idle state of the bank, the REFpb delayed by the bank is reissued. refresh command. At this time, it is still assumed that the bank reissues 20% of the REFpb refresh commands in the idle state. For example, N REFpb refresh commands are reissued. Therefore, the controller sends (8*bank_NUM-N) single bank refresh commands during refresh. . As shown in Figure 3c, the maximum refresh interval time:
T_total=9*tREFI+(8*bank_NUM-1)*0.8*tRFCpbT_total=9*tREFI+(8*bank_NUM-1)*0.8*tRFCpb
=9*1952+(8*8-1)*0.8*90=22068ns=9*1952+(8*8-1)*0.8*90=22068ns
在T_total内读写命令执行的有效时间T_val为:The effective time T_val for the execution of read and write commands within T_total is:
T_val=9*tREFI+[(8*bank_NUM-1)*tRFCpb-(8*bank_NUM)*Tcmd_cost]*0.8*效率系数=9*1952+(63*90-63*4)*0.8*效率系数T_val=9*tREFI+[(8*bank_NUM-1)*tRFCpb-(8*bank_NUM)*Tcmd_cost]*0.8*efficiency factor=9*1952+(63*90-63*4)*0.8*efficiency factor
在效率系数为0.5-0.7范围时,Eff为89.42%-93.35%,效率对比现有技术中按顺序postpond刷新的方式可以提升2%。When the efficiency coefficient is in the range of 0.5-0.7, the Eff is 89.42%-93.35%, and the efficiency can be improved by 2% compared with the method of sequentially postpond refreshing in the prior art.
S202:控制器102根据所述至少一个待刷新的目标bank,生成刷新指示信息。S202: The controller 102 generates refresh indication information according to the at least one target bank to be refreshed.
其中,在一些实施例中,所述刷新指示信息用于控制所述存储器刷新所述至少一个待刷新的目标bank。具体来说,可以通过控制器102中的接口电路1022,向存储器101发送刷新指示信息,该刷新指示信息可以指示上述至少一个待刷新的目标bank。Wherein, in some embodiments, the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed. Specifically, refresh indication information may be sent to the memory 101 through the interface circuit 1022 in the controller 102, where the refresh indication information may indicate the above at least one target bank to be refreshed.
考虑到单bank刷新模式需要发送的刷新命令较多,在需要刷新的bank较多时,容易造成存储器性能的下降。基于此,在另一些实施例中,控制器102也可以判断在所述至少一个待刷新的目标bank中,是否存在目标bank集合。其中,目标bank集合中的目标bank属于所述至少一个待刷新的目标bank。通过目标bank集合执行全bank刷新模式,可以有效的减少发送刷新命令的数量,从而提升存储器的性能。Considering that the single bank refresh mode needs to send more refresh commands, when there are many banks to be refreshed, it is easy to cause the performance of the memory to decrease. Based on this, in other embodiments, the controller 102 may also determine whether a target bank set exists in the at least one target bank to be refreshed. Wherein, the target bank in the target bank set belongs to the at least one target bank to be refreshed. Executing the full bank refresh mode through the target bank set can effectively reduce the number of refresh commands sent, thereby improving the performance of the memory.
在本申请实施例中,刷新指示信息至少存在以下三种可能的实现方式:In this embodiment of the present application, there are at least the following three possible implementation manners for refreshing the indication information:
方式一:在所述至少一个待刷新的目标bank中,确定目标bank集合满足全bank刷新模式时,生成所述目标bank集合的刷新指示信息;所述刷新指示信息用于指示所述目标bank集合的刷新模式为全bank刷新模式。可选的,所述目标bank集合的刷新指示信息还可以用于指示执行全bank刷新模式的刷新命令的次数。Mode 1: In the at least one target bank to be refreshed, when it is determined that the target bank set satisfies the full bank refresh mode, refresh indication information of the target bank set is generated; the refresh indication information is used to indicate the target bank set The refresh mode is the full bank refresh mode. Optionally, the refresh indication information of the target bank set may also be used to indicate the number of times the refresh command in the full bank refresh mode is executed.
在一些实施例中,目标bank集合包括存储区域中的所有bank。或者,目标bank集合包括存储区中的一个或多个group中的所有bank。In some embodiments, the target bank set includes all banks in the storage area. Alternatively, the target bank set includes all banks in one or more groups in the storage area.
例如,存储区域包括的bank数量为4,包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2,bank3和bank4。且,bank1的欠刷新次数为1,bank2的欠刷新次数为2,bank3的欠刷新次数为2和bank4的欠刷新次数为3。存储区域的欠刷新次数通过计数器pstpnd_cnt表示。For example, the number of banks included in the storage area is 4, including: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4. Furthermore, the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 2, the under-refresh count of bank 3 is 2, and the under-refresh count of bank 4 is 3. The number of under-refreshes of the storage area is represented by the counter pstpnd_cnt.
因此,可以确定出目标bank集合。在确定存在目标bank集合时,可以确定目标bank集合可以执行至少一次全bank的刷新模式。在一些实施例中,执行全bank的刷新模式的次数可以根据目标bank集合中的每个bank的欠刷新次数的最小值确定。结合上述例子,考虑到bank1的欠刷新次数为1,因此,可以确定目标bank集合可以执行一次全bank的刷新模式。Therefore, the target bank set can be determined. When it is determined that the target bank set exists, it can be determined that the target bank set can perform at least one full bank refresh mode. In some embodiments, the number of times of performing the full bank refresh mode may be determined according to the minimum value of the under-refresh times of each bank in the target bank set. In combination with the above example, considering that the number of under-refreshes of bank1 is 1, it can be determined that the target bank set can perform a full-bank refresh mode once.
方式二:在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。即所述刷新指示信息可以用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。Mode 2: When it is determined that in the at least one target bank to be refreshed, there is no target bank set that satisfies the full bank refresh mode, it is determined that the refresh mode of the at least one target bank to be refreshed is the single-bank refresh mode or the same bank refresh mode refresh mode. That is, the refresh indication information may be used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
在一些实施例中,确定出的当前的待刷新的目标bank包括存储区域中的部分bank。 或者,目标bank集合包括存储区中的一个或多个group中的部分bank。考虑到可以同时刷新不同group中的相同bank,在目标bank集合中,存在不同group中的相同bank时,目标bank集合无需进行全bank刷新,此时,可以将当前待刷新的目标bank的刷新模式确定为单bank刷新模式,或同bank刷新模式。In some embodiments, the determined current target bank to be refreshed includes a part of the bank in the storage area. Alternatively, the target bank set includes a subset of banks in one or more groups in the storage area. Considering that the same bank in different groups can be refreshed at the same time, when the same bank in different groups exists in the target bank set, the target bank set does not need to perform full bank refresh. At this time, the refresh mode of the target bank to be refreshed can be changed. Determine the single bank refresh mode, or the same bank refresh mode.
举例来说,存储区域包括的bank数量为4,存储区域包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2和bank4。且,bank1的欠刷新次数为1,bank2的欠刷新次数为2和bank4的欠刷新次数为3。For example, the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2 and bank4. In addition, the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 2, and the under-refresh count of bank 4 is 3.
此时,刷新指示信息可以用于指示bank1,bank2和bank4通过单bank刷新模式进行刷新,且,bank1的待刷新次数为1,bank2的待刷新次数为2和bank4的待刷新次数为3。在一些实施例中,刷新指示信息可以包括:6个单bank刷新的刷新命令。例如,刷新指示信息包括:1个刷新bank1的刷新命令,2个刷新bank2的刷新命令,3个刷新bank4的刷新命令。每个刷新命令用于指示相应待刷新的目标bank执行一次刷新。At this time, the refresh indication information can be used to instruct bank1, bank2 and bank4 to be refreshed in the single bank refresh mode, and the number of times to be refreshed for bank1 is 1, the number of times to be refreshed for bank2 is 2, and the number of times to be refreshed for bank4 is 3. In some embodiments, the refresh indication information may include: 6 refresh commands for single bank refresh. For example, the refresh instruction information includes: 1 refresh command to refresh bank1, 2 refresh commands to refresh bank2, and 3 refresh commands to refresh bank4. Each refresh command is used to instruct the corresponding target bank to be refreshed to perform a refresh.
再比如,存储区域包括2个bank group,每个bank group中的bank数量为4,例如,bank group1包括:group1-bank1,group1-bank2,group1-bank3和group1-bank4。当前确定的group1待刷新的bank包括group1-bank1和group1-bank4。且group1-bank1的欠刷新次数为1和group1-bank4的欠刷新次数为3。bank group2包括:group2-bank1,group2-bank2,group2-bank3和group2-bank4。当前确定的group2待刷新的bank包括group2-bank2和group2-bank4。且group2-bank2的欠刷新次数为4和group2-bank4的欠刷新次数为3。For another example, the storage area includes 2 bank groups, and the number of banks in each bank group is 4. For example, bank group1 includes: group1-bank1, group1-bank2, group1-bank3, and group1-bank4. The currently determined banks to be refreshed by group1 include group1-bank1 and group1-bank4. And the under-refresh count of group1-bank1 is 1 and the under-refresh count of group1-bank4 is 3. bank group2 includes: group2-bank1, group2-bank2, group2-bank3 and group2-bank4. The currently determined banks to be refreshed by group2 include group2-bank2 and group2-bank4. And the under-refresh count of group2-bank2 is 4 and the under-refresh count of group2-bank4 is 3.
此时,刷新指示信息可以用于指示group1-bank1和group1-bank4、group2-bank2和group2-bank4通过单bank刷新模式进行刷新。其中,group1-bank1的欠刷新次数为1,group1-bank4的欠刷新次数为3,group2-bank2的欠刷新次数为4和group2-bank4的欠刷新次数为3。例如,刷新指示信息包括:1个刷新group1-bank1的刷新命令,4个刷新group2-bank2的刷新命令,3个刷新group1-bank4的刷新命令和3个刷新group2-bank4的刷新命令。At this time, the refresh indication information may be used to instruct group1-bank1 and group1-bank4, and group2-bank2 and group2-bank4 to be refreshed through the single-bank refresh mode. The under-refresh count of group1-bank1 is 1, the under-refresh count of group1-bank4 is 3, the under-refresh count of group2-bank2 is 4, and the under-refresh count of group2-bank4 is 3. For example, the refresh instruction information includes: 1 refresh command to refresh group1-bank1, 4 refresh commands to refresh group2-bank2, 3 refresh commands to refresh group1-bank4, and 3 refresh commands to refresh group2-bank4.
在一些实施例中,刷新指示信息可以包括:3个同bank刷新的刷新命令和5个单bank刷新的刷新命令。其中,同bank刷新的刷新命令用于指示不同group中的bank4执行3次刷新。5个单bank刷新的刷新命令分别用于指示group1-bank1刷新1次,及指示group2-bank2的刷新4次。In some embodiments, the refresh indication information may include: 3 refresh commands for same-bank refresh and 5 refresh commands for single-bank refresh. Among them, the refresh command of the same bank refresh is used to instruct the banks 4 in different groups to perform 3 refreshes. The five refresh commands for single-bank refresh are respectively used to instruct group1-bank1 to refresh once, and to instruct group2-bank2 to refresh 4 times.
方式三:在确定所述至少一个待刷新的目标bank中,除上述方式一中提及的目标bank集合外,还包括N个目标bank时,确定所述N个目标bank的刷新模式为单bank刷新模式或同bank刷新模式。即所述刷新指示信息还可以用于指示所述N个目标bank的刷新模式为单bank刷新模式或同bank刷新模式。Mode 3: In determining the at least one target bank to be refreshed, when N target banks are included in addition to the target bank set mentioned in Mode 1 above, it is determined that the refresh mode of the N target banks is a single bank Refresh mode or same bank refresh mode. That is, the refresh indication information can also be used to indicate that the refresh modes of the N target banks are the single-bank refresh mode or the same-bank refresh mode.
举例来说,存储区域包括的bank数量为4,存储区域包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2,bank3和bank4。且,bank1的欠刷新次数为1,bank2的欠刷新次数为2,bank3的欠刷新次数为2和bank4的欠刷新次数为3。For example, the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4. Furthermore, the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 2, the under-refresh count of bank 3 is 2, and the under-refresh count of bank 4 is 3.
此时,刷新指示信息可以用于指示bank1,bank2,bank3和bank4通过全bank刷新模式刷新1次。另外,刷新指示信息还可以用于指示bank2,bank3和bank4通过单bank刷新模式进行刷新,且,bank2的刷新次数为1,bank3的刷新次数为1和bank4的刷新次数为2。在一些实施例中,刷新指示信息可以包括:1个全bank刷新的刷新命令,4个单bank 刷新的刷新命令。其中,4个单bank刷新的刷新命令包括:bank2的刷新命令,1个bank3的刷新命令,2个bank4的刷新命令。从而,至少节省了4个单bank刷新的刷新命令所占用的时间及执行刷新命令所导致的延迟。At this time, the refresh instruction information may be used to instruct bank1, bank2, bank3 and bank4 to be refreshed once through the full bank refresh mode. In addition, the refresh instruction information can also be used to instruct bank2, bank3 and bank4 to be refreshed in the single bank refresh mode, and the refresh count of bank2 is 1, the refresh count of bank3 is 1, and the refresh count of bank4 is 2. In some embodiments, the refresh indication information may include: 1 refresh command for full bank refresh and 4 refresh commands for single bank refresh. Among them, the refresh commands for 4 single bank refreshes include: refresh commands for bank2, 1 refresh command for bank3, and 2 refresh commands for bank4. Therefore, at least the time occupied by four refresh commands for single-bank refresh and the delay caused by executing the refresh commands are saved.
基于此,在另一些实施例中,控制器102可以判断在所述存储区域的欠刷新次数是否超过预设刷新bank的数量,从而,确定目标bank集合中的目标bank。其中,该预设刷新bank的数量可以等于或小于第二阈值。目标bank集合中的目标bank的刷新次数等于该预设刷新bank的数量。目标bank集合中的目标bank的刷新次数可以小于或等于存储区域中bank的总数量,从而,对应目标bank集合对应的全bank刷新模式的刷新命令包括的目标bank的刷新次数可以小于存储区域中bank的总数量。Based on this, in other embodiments, the controller 102 may determine whether the number of under-refreshes in the storage area exceeds the preset number of refreshed banks, thereby determining a target bank in the target bank set. Wherein, the preset number of refresh banks may be equal to or less than the second threshold. The refresh times of the target banks in the target bank set is equal to the preset number of refresh banks. The refresh times of the target banks in the target bank set may be less than or equal to the total number of banks in the storage area. Therefore, the refresh times of the target banks included in the refresh command corresponding to the full bank refresh mode corresponding to the target bank set may be less than the number of banks in the storage area. total number of .
根据预设刷新bank的数量,可以确定出目标bank集合对应的待刷新的目标bank的刷新次数,从而,对目标bank集合中的目标bank下发一次类似全bank刷新的刷新命令,用于指示执行目标bank集合中对应的目标bank的刷新次数。相比基于每个bank都下发1次单bank刷新的刷新命令,可以有效的减少发送刷新命令的数量,从而提升存储器的性能。According to the preset number of refresh banks, the refresh times of the target bank to be refreshed corresponding to the target bank set can be determined, so that a refresh command similar to full bank refresh is issued to the target bank in the target bank set to instruct the execution Refresh times of the corresponding target bank in the target bank set. Compared with the refresh command based on which each bank is refreshed once for a single bank, the number of refresh commands sent can be effectively reduced, thereby improving the performance of the memory.
在该实施例中,刷新指示信息通过以下方式四至方式六举例说明:In this embodiment, the refresh indication information is illustrated in the following manners 4 to 6:
方式四:在所述至少一个待刷新的目标bank中,所述存储区域的欠刷新次数超过预设刷新bank的数量,从而可以确定目标bank集合,且该目标bank集合采用全bank刷新模式进行刷新,并生成所述目标bank集合的刷新指示信息;所述刷新指示信息用于指示所述目标bank集合的刷新模式为全bank刷新模式。Mode 4: In the at least one target bank to be refreshed, the number of under-refreshes of the storage area exceeds the preset number of refreshed banks, so that a target bank set can be determined, and the target bank set is refreshed in a full bank refresh mode , and generate refresh indication information of the target bank set; the refresh indication information is used to indicate that the refresh mode of the target bank set is the full bank refresh mode.
可选的,所述刷新指示信息还可以用于指示执行目标bank集合的全bank刷新模式的刷新命令的次数。Optionally, the refresh indication information may also be used to indicate the number of times that the refresh command in the full bank refresh mode of the target bank set is executed.
在一些实施例中,目标bank集合为根据预设刷新bank的数量确定的。目标bank集合用于指示目标bank及每个目标bank的刷新次数。In some embodiments, the target bank set is determined according to a preset number of refresh banks. The target bank set is used to indicate the target bank and the number of refreshes for each target bank.
例如,存储区域包括的bank数量为4,存储区域包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2,bank3和bank4。且,bank1的欠刷新次数为1,bank2的欠刷新次数为2,bank3的欠刷新次数为3和bank4的欠刷新次数为4。存储区域的欠刷新次数pstpnd_cnt为10。For example, the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4. Furthermore, the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 2, the under-refresh count of bank 3 is 3, and the under-refresh count of bank 4 is 4. The under-refresh count pstpnd_cnt of the storage area is 10.
可以根据存储区域的欠刷新次数和存储区域包括的bank数量M,确定执行全bank的刷新模式的次数。例如,执行全bank的刷新模式的次数可以满足:Mod(pstpnd_cnt/M)=2。The number of times to execute the refresh mode of the entire bank can be determined according to the number of under-refreshes of the storage area and the number M of banks included in the storage area. For example, the number of times of executing the refresh mode of the whole bank may satisfy: Mod(pstpnd_cnt/M)=2.
因此,可以确定出2个目标bank集合。每个目标bank集合可以对应生成1个全bank刷新的刷新命令。例如,第1个目标bank集合可以包括:bank1,bank2,bank3和bank4。第2个目标bank集合可以包括:bank2,bank3,bank3和bank4。Therefore, two target bank sets can be determined. Each target bank set can generate a refresh command corresponding to a full bank refresh. For example, the first target bank set may include: bank1, bank2, bank3 and bank4. The second target bank set can include: bank2, bank3, bank3 and bank4.
从而,刷新指示信息可以包括2个全bank刷新的刷新命令。其中,1个全bank刷新的刷新命令用于指示刷新第1个目标bank集合中的目标bank的刷新及相应的刷新次数。1个全bank刷新的刷新命令用于指示刷新第2个目标bank集合中的目标bank的刷新及相应的刷新次数。Therefore, the refresh instruction information may include 2 refresh commands for full bank refresh. Among them, a refresh command of a full bank refresh is used to instruct to refresh the refresh of the target bank in the first target bank set and the corresponding refresh times. The refresh command of one full bank refresh is used to instruct the refresh of the target banks in the second target bank set and the corresponding refresh times.
再比如,还可以根据存储区域包括的bank数量M,相应设置目标bank集合对应的第二阈值。比如,可以设置该第二阈值小于存储区域包括的bank数量M。此时,执行全bank的刷新模式的次数可以通过以下方式确定。For another example, the second threshold corresponding to the target bank set may be correspondingly set according to the number M of banks included in the storage area. For example, the second threshold may be set to be smaller than the number M of banks included in the storage area. At this time, the number of times to execute the refresh mode of the whole bank can be determined in the following manner.
在确定Mod(pstpnd_cnt/M)大于第二阈值时,则执行全bank的刷新模式的次数满足:Mod(pstpnd_cnt/M)+1。When it is determined that Mod(pstpnd_cnt/M) is greater than the second threshold, the number of times of executing the refresh mode of the whole bank satisfies: Mod(pstpnd_cnt/M)+1.
举例来说,以第二阈值为2为例,存储区域包括的bank数量为4,存储区域包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2,bank3和bank4。且,bank1的欠刷新次数为4,bank2的欠刷新次数为5,bank3的欠刷新次数为6和bank4的欠刷新次数为8。存储区域的欠刷新次数pstpnd_cnt为23。因此,可以确定出:Mod(pstpnd_cnt/M)取余后为3大于第二阈值,因此,执行全bank的刷新模式的次数可以为Mod(pstpnd_cnt/M)的商加1,即可以为6。For example, taking the second threshold value of 2 as an example, the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4. In addition, the under-refresh count of bank1 is 4, the under-refresh count of bank 2 is 5, the under-refresh count of bank 3 is 6, and the under-refresh count of bank 4 is 8. The under-refresh count pstpnd_cnt of the storage area is 23. Therefore, it can be determined that Mod(pstpnd_cnt/M) is 3 after the remainder is greater than the second threshold. Therefore, the number of times of executing the refresh mode of the whole bank can be the quotient of Mod(pstpnd_cnt/M) plus 1, which can be 6.
从而,可以确定出6个目标bank集合。每个目标bank集合可以对应生成1个全bank刷新的刷新命令。例如,4个目标bank集合可以包括:bank1,bank2,bank3和bank4。第5个目标bank集合可以包括:bank2,bank3,bank3和bank4。第6个目标bank集合可以包括:bank4,bank4,和bank4。Thus, 6 target bank sets can be determined. Each target bank set can generate a refresh command corresponding to a full bank refresh. For example, a set of 4 target banks may include: bank1, bank2, bank3 and bank4. The fifth target bank set can include: bank2, bank3, bank3 and bank4. The sixth target bank set may include: bank4, bank4, and bank4.
可选的,所述目标bank集合的刷新指示信息可以包括6次全bank刷新模式的刷新命令。Optionally, the refresh indication information of the target bank set may include 6 refresh commands in the full bank refresh mode.
在确定Mod(pstpnd_cnt/M)取余后的值小于或等于第二阈值时,则执行全bank的刷新模式的次数满足:Mod(pstpnd_cnt/M)取商后的值。When it is determined that the modulo value of Mod(pstpnd_cnt/M) is less than or equal to the second threshold, the number of times of executing the refresh mode of the whole bank satisfies: the mod(pstpnd_cnt/M) value after the quotient.
方式五way five
在确定存储区域的欠刷新次数小于预设刷新bank的数量,从而可以确定不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。即所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。When it is determined that the number of under-refreshes in the storage area is less than the preset number of refreshed banks, so that it can be determined that there is no target bank set that satisfies the full-bank refresh mode, it is determined that the refresh mode of the at least one target bank to be refreshed is the single-bank refresh mode Or the same as bank refresh mode. That is, the refresh indication information is also used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
在一些实施例中,确定出的当前的待刷新的目标bank包括存储区域中的部分bank。或者,目标bank集合包括存储区中的一个或多个group中的部分bank。因此,无法确定出满足全bank刷新模式的目标bank集合,因此,可以将当前待刷新的目标bank的刷新模式确定为单bank刷新模式,或同bank刷新模式。In some embodiments, the determined current target bank to be refreshed includes a part of the bank in the storage area. Alternatively, the target bank set includes a subset of banks in one or more groups in the storage area. Therefore, it is impossible to determine the target bank set that satisfies the full-bank refresh mode. Therefore, the refresh mode of the target bank to be refreshed currently can be determined as the single-bank refresh mode, or the same-bank refresh mode.
举例来说,存储区域包括的bank数量为4,存储区域包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2和bank4。且,bank1的欠刷新次数为1,bank2的欠刷新次数为1和bank4的欠刷新次数为1。以预设刷新bank的数量等于存储区域的bank的数量,即在该示例中,预设刷新bank的数量为4。此时,可以确定存储区域的欠刷新次数为3,该欠刷新次数小于预设刷新bank的数量4。For example, the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2 and bank4. In addition, the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 1, and the under-refresh count of bank 4 is 1. The preset number of refresh banks is equal to the number of banks in the storage area, that is, in this example, the preset number of refresh banks is 4. At this time, it can be determined that the number of under-refreshing times of the storage area is 3, and the number of under-refreshing times is less than the preset number of refreshed banks of 4.
因此,可以确定目标bank的刷新模式为单bank刷新模式或同bank刷新模式。刷新指示信息可以用于指示bank1,bank2和bank4通过单bank刷新模式进行刷新,且,bank1的待刷新次数为1,bank2的待刷新次数为1和bank4的待刷新次数为1。在一些实施例中,刷新指示信息可以包括:3个单bank刷新的刷新命令。每个刷新命令用于指示相应待刷新的目标bank执行一次刷新。Therefore, it can be determined that the refresh mode of the target bank is the single-bank refresh mode or the same-bank refresh mode. The refresh indication information may be used to instruct bank1, bank2 and bank4 to be refreshed in a single bank refresh mode, and the number of times to be refreshed for bank1 is 1, the number of times to be refreshed for bank2 is 1, and the number of times to be refreshed for bank4 is 1. In some embodiments, the refresh indication information may include: 3 refresh commands for single bank refresh. Each refresh command is used to instruct the corresponding target bank to be refreshed to perform a refresh.
再比如,存储区域包括2个bank group,每个bank group中的bank数量为4,例如,bank group1包括:group1-bank1,group1-bank2,group1-bank3和group1-bank4。当前确定的group1待刷新的bank包括group1-bank1和group1-bank4。且group1-bank1的欠刷新次数为1和group1-bank4的欠刷新次数为1。bank group2包括:group2-bank1,group2-bank2,group2-bank3和group2-bank4。当前确定的group2待刷新的bank包括group2-bank2和group2-bank4。且group2-bank2的欠刷新次数为1和group2-bank4的欠刷新次数为1。For another example, the storage area includes 2 bank groups, and the number of banks in each bank group is 4. For example, bank group1 includes: group1-bank1, group1-bank2, group1-bank3, and group1-bank4. The currently determined banks to be refreshed by group1 include group1-bank1 and group1-bank4. And the under-refresh count of group1-bank1 is 1 and the under-refresh count of group1-bank4 is 1. bank group2 includes: group2-bank1, group2-bank2, group2-bank3 and group2-bank4. The currently determined banks to be refreshed by group2 include group2-bank2 and group2-bank4. And the under-refresh count of group2-bank2 is 1 and the under-refresh count of group2-bank4 is 1.
此时,刷新指示信息可以用于指示group1-bank1和group1-bank4、group2-bank2和 group2-bank4通过单bank刷新模式进行刷新,且,group1-bank1的待刷新次数为1,group1-bank4的待刷新次数为1,group2-bank2的欠刷新次数为1和group2-bank4的欠刷新次数为1。在一些实施例中,刷新指示信息可以包括:1个同bank刷新的刷新命令和2个单bank刷新的刷新命令。其中,同bank刷新的刷新命令用于指示不同group中的bank4执行1次刷新。2个单bank刷新的刷新命令分别用于指示group1-bank1刷新1次,及指示group2-bank2的刷新1次。In this case, the refresh instruction information can be used to instruct group1-bank1 and group1-bank4, group2-bank2 and group2-bank4 to refresh through the single-bank refresh mode, and the number of times to be refreshed for group1-bank1 is 1, and the waiting times for group1-bank4 to be refreshed is 1. The refresh count is 1, the under-refresh count of group2-bank2 is 1, and the under-refresh count of group2-bank4 is 1. In some embodiments, the refresh indication information may include: 1 refresh command for same-bank refresh and 2 refresh commands for single-bank refresh. Among them, the refresh command of the same bank refresh is used to instruct banks 4 in different groups to perform one refresh. The two refresh commands for single-bank refresh are respectively used to instruct group1-bank1 to refresh once, and to instruct group2-bank2 to refresh once.
方式六way six
在确定所述至少一个待刷新的目标bank中,除所述目标bank集合外,还包括N个目标bank时,确定所述N个目标bank的刷新模式为单bank刷新模式或同bank刷新模式。即所述刷新指示信息还用于指示所述N个目标bank的刷新模式为单bank刷新模式或同bank刷新模式。When determining that the at least one target bank to be refreshed includes N target banks in addition to the target bank set, it is determined that the refresh mode of the N target banks is a single-bank refresh mode or a same-bank refresh mode. That is, the refresh indication information is also used to indicate that the refresh modes of the N target banks are the single-bank refresh mode or the same-bank refresh mode.
举例来说,存储区域包括的bank数量为4,存储区域包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2,bank3和bank4。且,bank1的欠刷新次数为1,bank2的欠刷新次数为2,bank3的欠刷新次数为3和bank4的欠刷新次数为4。For example, the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4. Furthermore, the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 2, the under-refresh count of bank 3 is 3, and the under-refresh count of bank 4 is 4.
此时,可以确定2个目标bank集合。除这2个目标bank集合之外,还包括bank4的2次刷新。因此,刷新指示信息可以包括2个全bank的刷新命令,及2个单bank的刷新命令。其中,1个全bank的刷新命令用于指示bank1,bank2,bank3和bank4通过全bank刷新模式刷新1次,1个全bank的刷新命令用于指示bank2,bank3,bank3和bank4通过全bank刷新模式刷新1次,2个单bank刷新的刷新命令用于指示bank4刷新2次。从而,至少节省了8个单bank刷新的刷新命令所占用的时间及执行刷新命令所导致的延迟。At this point, two target bank sets can be determined. In addition to these 2 target bank sets, 2 refreshes of bank4 are also included. Therefore, the refresh instruction information may include two full bank refresh commands and two single bank refresh commands. Among them, one full bank refresh command is used to instruct bank1, bank2, bank3 and bank4 to refresh once through the full bank refresh mode, and one full bank refresh command is used to instruct bank2, bank3, bank3 and bank4 to pass the full bank refresh mode Refresh 1 time, 2 refresh commands for single bank refresh are used to instruct bank4 to refresh 2 times. Therefore, at least the time occupied by the refresh commands for 8 single-bank refresh and the delay caused by the execution of the refresh commands are saved.
需要说明的是,目标bank集合可以是基于存储区域包括的所有bank的数量确定的,还可以是基于存储区域包括的部分bank的数量确定的,可以根据需要设置预设刷新bank的数量,来控制目标bank集合中目标bank的刷新次数。It should be noted that the target bank set may be determined based on the number of all banks included in the storage area, or may be determined based on the number of partial banks included in the storage area, and the number of preset refresh banks can be set as required to control The number of refreshes of the target bank in the target bank set.
再比如,针对不同协议的特殊刷新方式下,如REFsb或LPDDR5的REFpb,目标bank集合中目标bank的刷新次数不同。For another example, under special refresh modes for different protocols, such as REFsb or REFpb of LPDDR5, the refresh times of the target banks in the target bank set are different.
在考虑将单bank的刷新模式转换为全bank的刷新模式时,可以考虑存储区中所有bank的数量。例如,在LPDDR5中8bank的场景下,bank的数量为8,因此,目标bank集合中的目标bank的刷新次数最多为8。再比如,在LPDDR5中4bank group4bank的场景下,每个group的bank的数量为4,存储区中所有bank的数量为16。因此,目标bank集合中的目标bank的刷新次数最多为16。When considering the conversion from the single-bank refresh mode to the full-bank refresh mode, the number of all banks in the memory area can be considered. For example, in the scenario of 8 banks in LPDDR5, the number of banks is 8. Therefore, the refresh times of the target banks in the target bank set is at most 8. For another example, in the scenario of 4bank group4bank in LPDDR5, the number of banks in each group is 4, and the number of all banks in the storage area is 16. Therefore, the number of refreshes of target banks in the target bank set is at most 16.
在考虑将同bank的刷新模式转换为全bank的刷新模式时,可以只考虑每个group中bank的数量。比如,在LPDDR5中4bank group4bank的场景下,每个group的bank的数量为4。因此,目标bank集合中的目标bank的刷新次数最多为4。When considering converting the refresh mode of the same bank to the refresh mode of the whole bank, only the number of banks in each group can be considered. For example, in the scenario of 4bank group4bank in LPDDR5, the number of banks in each group is 4. Therefore, the number of refreshes of target banks in the target bank set is at most 4.
结合上述postpone场景下,假设采用REFpb模式和REFab模式的混合刷新,则可以直接将M个REFpb等价为1个REFab操作,下面以M为8为例,如图3d所示。Combined with the above postpone scenario, assuming that the mixed refresh of REFpb mode and REFab mode is adopted, M REFpb operations can be directly equivalent to one REFab operation. The following takes M as 8 as an example, as shown in Figure 3d.
由上述可知,刷新间隔的最大时间满足:It can be seen from the above that the maximum time of the refresh interval satisfies:
T_total=9*tREFI+(8-1)*tRFCab=9*1952+7*180=18828nsT_total=9*tREFI+(8-1)*tRFCab=9*1952+7*180=18828ns
其中,控制器发送8个全bank刷新命令。Among them, the controller sends 8 full bank refresh commands.
在刷新间隔最大时间内读写命令执行的有效时间T_val为:The effective time T_val for the execution of read and write commands within the maximum refresh interval is:
T_val=9*tREFI=9*1952=17568nsT_val=9*tREFI=9*1952=17568ns
在刷新间隔的最大时间T_total内,存储器读写命令的执行效率Eff满足:Within the maximum time T_total of the refresh interval, the execution efficiency Eff of the memory read and write commands satisfies:
Eff=T_val/T_total=17568/18828=93.3%Eff=T_val/T_total=17568/18828=93.3%
可以看出,在大量推迟刷新操作需要补发的场景下,混合刷新的方式,相比只有REFpb刷新的效率,可以有效提高DDR读写效率。It can be seen that in the scenario where a large number of delayed refresh operations need to be reissued, the hybrid refresh method can effectively improve the DDR read and write efficiency compared to the efficiency of only REFpb refresh.
S203:存储器101根据刷新指示信息,刷新至少一个待刷新的目标bank。具体来说,可以由控制电路1011根据刷新指示信息,控制存储器中的刷新电路,实现对上述至少一个待刷新的目标bank的刷新操作。S203: The memory 101 refreshes at least one target bank to be refreshed according to the refresh indication information. Specifically, the control circuit 1011 can control the refresh circuit in the memory according to the refresh instruction information, so as to realize the refresh operation on the above-mentioned at least one target bank to be refreshed.
在实施全bank刷新模式下的刷新方式时,可以根据控制器下发的刷新指示信息中指示的目标bank集合,发起目标bank集合的刷新操作。具体的,可以向目标bank集合中的目标bank发起预充电命令,关闭目标bank集合中的目标bank,根据目标bank集合的刷新次数,发起多次目标bank集合的刷新操作。When implementing the refresh mode in the full bank refresh mode, the refresh operation of the target bank set may be initiated according to the target bank set indicated in the refresh instruction information sent by the controller. Specifically, a precharge command may be issued to a target bank in the target bank set, the target bank in the target bank set is closed, and multiple refresh operations of the target bank set are initiated according to the refresh times of the target bank set.
例如,存储区域包括的bank数量为4,存储区域包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2,bank3和bank4。且,bank1的欠刷新次数为2,bank2的欠刷新次数为2,bank3的欠刷新次数为3和bank4的欠刷新次数为5。欠刷新次数pstpnd_cnt为12。For example, the number of banks included in the storage area is 4, and the storage area includes: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4. In addition, the under-refresh count of bank1 is 2, the under-refresh count of bank 2 is 2, the under-refresh count of bank 3 is 3, and the under-refresh count of bank 4 is 5. The under-refresh count pstpnd_cnt is 12.
可以确定3个目标bank集合。第1个和第2个目标bank集合可以分别包括:bank1,bank2,bank3和bank4。第3个目标bank集合可以包括:bank3,bank4,bank4和bank4。因此,在执行第1个和第2个目标bank集合的刷新操作时,可以向bank1,bank2,bank3和bank4发起预充电命令,关闭bank1,bank2,bank3和bank4,根据目标bank集合的刷新次数为1,发起2次bank1,bank2,bank3和bank4的全bank的刷新操作。在执行第3个目标bank集合的刷新操作时,可以向bank3和bank4发起预充电命令,关闭bank3和bank4,根据目标bank集合的刷新次数为1,发起1次bank3,bank4,bank4和bank4的全bank的刷新操作。Three target bank sets can be determined. The first and second target bank sets can respectively include: bank1, bank2, bank3 and bank4. The third target bank set can include: bank3, bank4, bank4 and bank4. Therefore, when the refresh operation of the first and second target bank sets is performed, a precharge command can be issued to bank1, bank2, bank3 and bank4 to close bank1, bank2, bank3 and bank4. According to the refresh times of the target bank set, 1. Initiate 2 full bank refresh operations of bank1, bank2, bank3 and bank4. When performing the refresh operation of the third target bank set, you can initiate a precharge command to bank3 and bank4, close bank3 and bank4, and initiate a full refresh of bank3, bank4, bank4 and bank4 according to the refresh count of the target bank set is 1. The refresh operation of the bank.
可选的,在完成刷新操作后,控制器可以更新维护的欠刷新次数pstpnd_cnt和bank的刷新状态信息。Optionally, after completing the refresh operation, the controller may update the maintenance under-refresh count pstpnd_cnt and the refresh status information of the bank.
结合上述例子,在完成一次全bank刷新操作后,可以更新一次欠刷新次数pstpnd_cnt和bank的刷新状态信息。例如,在完成第1个目标bank集合的刷新操作后,可以更新欠刷新次数pstpnd_cnt为8。bank1的欠刷新次数为1,bank2的欠刷新次数为1,bank3的欠刷新次数为2和bank4的欠刷新次数为4。在完成第2个目标bank集合的刷新操作后,可以更新欠刷新次数pstpnd_cnt为4。bank1的欠刷新次数为0,bank2的欠刷新次数为0,bank3的欠刷新次数为1和bank4的欠刷新次数为3。在完成第3个目标bank集合的刷新操作后,可以更新欠刷新次数pstpnd_cnt为0。bank1的欠刷新次数为0,bank2的欠刷新次数为0,bank3的欠刷新次数为0和bank4的欠刷新次数为0。Combining the above example, after a full bank refresh operation is completed, the number of under-refresh times pstpnd_cnt and the refresh status information of the bank can be updated. For example, after the refresh operation of the first target bank set is completed, the under-refresh count pstpnd_cnt can be updated to be 8. The under-refresh count of bank1 is 1, the under-refresh count of bank2 is 1, the under-refresh count of bank3 is 2, and the under-refresh count of bank4 is 4. After the refresh operation of the second target bank set is completed, the under-refresh count pstpnd_cnt can be updated to be 4. The under-refresh count of bank1 is 0, the under-refresh count of bank2 is 0, the under-refresh count of bank3 is 1, and the under-refresh count of bank4 is 3. After the refresh operation of the third target bank set is completed, the under-refresh count pstpnd_cnt can be updated to 0. The under-refresh count of bank1 is 0, the under-refresh count of bank2 is 0, the under-refresh count of bank3 is 0, and the under-refresh count of bank4 is 0.
需要说明的是,在通过全bank的刷新模式对欠刷新次数pstpnd_cnt更新时,根据全bank刷新模式的刷新次数确定的bank的刷新次数可能大于欠刷新次数,例如,欠刷新次数pstpnd_cnt可能为13~16中的1个值,此时可以根据欠刷新次数确定出4个目标bank集合,每个目标bank集合包括4个bank的刷新次数。根据全bank刷新模式的刷新次数确定的bank的刷新次数为16,大于欠刷新次数pstpnd_cnt。因此,需根据实际bank的刷新 次数对欠刷新次数pstpnd_cnt更新,保证pstpnd_cnt不溢出。It should be noted that when the number of under-refreshes pstpnd_cnt is updated through the refresh mode of the whole bank, the number of refreshes of the bank determined according to the number of refreshes of the whole-bank refresh mode may be greater than the number of under-refreshes, for example, the number of under-refreshes pstpnd_cnt may be 13~ 1 value in 16, at this time, 4 target bank sets can be determined according to the number of under-refreshes, and each target bank set includes the refresh times of 4 banks. The refresh count of the bank determined according to the refresh count of the full bank refresh mode is 16, which is greater than the under-refresh count pstpnd_cnt. Therefore, it is necessary to update the under-refresh times pstpnd_cnt according to the actual bank refresh times to ensure that pstpnd_cnt does not overflow.
在实施单bank刷新模式下的刷新方式时,可以通过算法优先选择待刷新的空闲状态的bank执行REFpb操作。例如,在执行REFpb操作时,可以通过公平轮询算法优先选择待刷新的标识为0的空闲bank进行。完成对应REFpb的刷新后,可以将该bank的待刷新的标识标记为1,表示已刷新。When implementing the refresh mode in the single-bank refresh mode, the bank in the idle state to be refreshed can be preferentially selected through an algorithm to perform the REFpb operation. For example, when the REFpb operation is performed, a fair polling algorithm may be used to preferentially select an idle bank with an identifier of 0 to be refreshed. After the refresh of the corresponding REFpb is completed, the flag to be refreshed of the bank can be marked as 1, indicating that it has been refreshed.
通过上述方法,在选择自动刷新模式时,利用推迟刷新次数是否满足相应刷新模式的刷新条件来动态的选择刷新模式。同时在完成具体刷新模式选择时,通过结合bank的选择和刷新循环的次数来尽量避免多次的bank关闭和业务流量断流等情况,从而提升DDR带宽。Through the above method, when the automatic refresh mode is selected, the refresh mode is dynamically selected based on whether the number of delayed refreshes satisfies the refresh condition of the corresponding refresh mode. At the same time, when the specific refresh mode selection is completed, the bank selection and the number of refresh cycles are combined to avoid multiple bank shutdowns and service traffic interruptions as much as possible, thereby improving the DDR bandwidth.
下面以具体的示例举例说明本申请提供的一种刷新方法,如图4所示,在本申请实施例中,控制器102可以通过刷新指示信息向存储器101指示至少一个待刷新的目标bank,通过结合REFab、REFpb和REFsb的刷新方式,动态的择优选择REFab、REFpb或REFsb进行刷新,从而提高刷新效率,提高DDR的带宽。因此,控制器102可以更加灵活地控制存储器101的刷新操作。可以理解,控制器102相较于控制电路1011,具有更强的逻辑判断能力,可以应对更为复杂的应用场景。相较于目前,由控制电路1011按顺序确定接下来需要刷新的bank,本申请实施例通过控制器102直接指示待刷新的至少一个bank,有利于使刷新操作能够灵活适应不同的应用场景,降低对存储空间的读写的影响。具体包括:The following uses a specific example to illustrate a refresh method provided by the present application. As shown in FIG. 4 , in this embodiment of the present application, the controller 102 may indicate to the memory 101 at least one target bank to be refreshed through the refresh instruction information, and the Combined with the refresh methods of REFab, REFpb and REFsb, REFab, REFpb or REFsb are dynamically selected for refresh, thereby improving the refresh efficiency and the bandwidth of the DDR. Therefore, the controller 102 can control the refresh operation of the memory 101 more flexibly. It can be understood that, compared with the control circuit 1011 , the controller 102 has stronger logical judgment capability and can cope with more complex application scenarios. Compared with the present, the control circuit 1011 sequentially determines the bank to be refreshed next. In this embodiment of the present application, the controller 102 directly instructs at least one bank to be refreshed, which is conducive to enabling the refresh operation to be flexibly adapted to different application scenarios, reducing the The impact of reading and writing on storage space. Specifically include:
步骤401:控制器确定各bank的欠刷新次数及存储区域的欠刷新次数pstpnd_cnt。Step 401: The controller determines the under-refresh count of each bank and the under-refresh count pstpnd_cnt of the storage area.
例如,当tREFI计时器计到tREFI_pb时,存储区域的欠刷新次数加1。For example, when the tREFI timer reaches tREFI_pb, the under-refresh count of the memory area is incremented by 1.
当完成一次目标bank集合对应的全刷新模式的刷新时,减少目标bank集合中目标bank的刷新数量的欠刷新次数。When a refresh in the full refresh mode corresponding to the target bank set is completed, the under-refresh times of the refresh quantity of the target banks in the target bank set is reduced.
当完成一次单bank刷新时,减少1次欠刷新次数。When a single bank refresh is completed, the number of under-refreshes is reduced by 1.
可选的,在该bank的欠刷新次数为0时,还可以将该bank标记为已刷新状态。使得控制器在确定待刷新的目标bank时,将已刷新的bank删除,提高刷新效率。Optionally, when the under-refresh count of the bank is 0, the bank may also be marked as a refreshed state. This enables the controller to delete the refreshed bank when determining the target bank to be refreshed, thereby improving refresh efficiency.
或者,在bank执行完一次刷新后,即标记bank为已刷新状态,而未进行刷新的bank则标记为未刷新状态。从而,可以将标记为未刷新状态的空闲状态的bank优先进行刷新,在没有未刷新状态bank的场景下,可以进一步根据bank是否存在欠刷新次数,确定是否将bank标记为未刷新状态。使得执行单bank刷新模式的bank可以更均衡的被刷新。Alternatively, after a bank has been refreshed once, the bank is marked as a refreshed state, and a bank that has not been refreshed is marked as an unrefreshed state. Therefore, the idle state bank marked as the unrefreshed state can be refreshed first, and in the scenario where there is no unrefreshed state bank, it can be further determined whether to mark the bank as the unrefreshed state according to whether the bank has under-refreshed times. This enables banks that perform single-bank refresh mode to be refreshed more evenly.
步骤402:控制器根据各bank的欠刷新次数及存储区域的欠刷新次数pstpnd_cnt判断是否满足刷新条件,若是,则执行步骤403,若否,则返回执行步骤402。Step 402 : The controller judges whether the refresh condition is satisfied according to the under-refresh count of each bank and the under-refresh count pstpnd_cnt of the storage area.
其中,刷新条件可以参考S202中的实施方式,在此不再赘述。For the refresh condition, reference may be made to the implementation in S202, which will not be repeated here.
步骤403:控制器确定是否存在目标bank集合,若是,则执行步骤404,若否,则执行步骤406。Step 403 : the controller determines whether there is a target bank set, if yes, executes step 404 , if not, executes step 406 .
例如,在确定存储区域包括:bank1,bank2,bank3和bank4。当前确定的至少一个待刷新的目标bank包括bank1,bank2,bank3和bank4。且,bank1的欠刷新次数为1,bank2的欠刷新次数为2,bank3的欠刷新次数为3和bank4的欠刷新次数为4。此时,可以确定2个目标bank集合。第1个目标bank集合可以包括:bank1,bank2,bank3和bank4、且第1个目标bank集合中的每个bank刷新1次。第2个目标bank集合包括:bank2,bank3,bank3和bank4。其中,通过全bank刷新模式,实现第2个目标bank集合中的bank2刷新1次,bank3刷新2次,bank4刷新1次。For example, determine the storage area including: bank1, bank2, bank3 and bank4. The currently determined at least one target bank to be refreshed includes bank1, bank2, bank3 and bank4. Furthermore, the under-refresh count of bank1 is 1, the under-refresh count of bank 2 is 2, the under-refresh count of bank 3 is 3, and the under-refresh count of bank 4 is 4. At this point, two target bank sets can be determined. The first target bank set may include: bank1, bank2, bank3 and bank4, and each bank in the first target bank set is refreshed once. The second target bank set includes: bank2, bank3, bank3 and bank4. Among them, through the full bank refresh mode, bank2 in the second target bank set is refreshed once, bank3 is refreshed twice, and bank4 is refreshed once.
在该步骤中,也可以是仅确定1个目标bank集合即可,无需将存储器可能的所有目标bank集合全部确定出来。或者,确定出存储区域的所有目标bank集合,在此不做限定。In this step, only one target bank set may be determined, and it is not necessary to determine all possible target bank sets in the memory. Alternatively, all target bank sets of the storage area are determined, which is not limited here.
在控制器确定不存在目标bank集合时,可以执行步骤406,确定是否存在单bank刷新的目标bank。When the controller determines that the target bank set does not exist, step 406 may be executed to determine whether there is a target bank for single-bank refresh.
步骤404:控制器根据确定的目标bank集合及目标bank集合的刷新次数,向存储器发送刷新指示信息。Step 404: The controller sends refresh indication information to the memory according to the determined target bank set and the refresh times of the target bank set.
结合上述例子,在控制器确定目标bank集合存在多个时,可以在确定的2个目标bank集合中,选择任一个目标bank集合,生成相应的刷新指示信息。例如,可以选择第1个目标bank集合,生成相应的刷新指示信息。该刷新指示信息用于指示bank1,bank2,bank3和bank4通过全bank刷新模式刷新1次。In combination with the above example, when the controller determines that there are multiple target bank sets, it can select any target bank set from the two determined target bank sets to generate corresponding refresh indication information. For example, the first target bank set can be selected to generate corresponding refresh indication information. The refresh instruction information is used to instruct bank1, bank2, bank3 and bank4 to be refreshed once through the full bank refresh mode.
再比如,在控制器确定存在1个目标bank集合时,根据该目标bank集合,生成刷新指示信息。例如,在控制器确定存在第2个目标bank集合时,控制器根据第2个目标bank集合,生成刷新指示信息,并对该第2个目标bank集合执行全bank刷新模式的刷新。For another example, when the controller determines that there is one target bank set, it generates refresh instruction information according to the target bank set. For example, when the controller determines that there is a second target bank set, the controller generates refresh instruction information according to the second target bank set, and performs refresh in the full bank refresh mode for the second target bank set.
该刷新指示信息用于指示目标bank集合通过全bank刷新模式进行刷新,及目标bank集合的刷新次数。使得存储器对第一目标集合执行全bank刷新模式的刷新操作。其中,包括:对目标bank集合中的目标bank执行全bank刷新模式的预充电指令,停止目标bank的读写操作,并对目标bank集合中的目标bank执行刷新操作,目标bank的刷新次数根据目标bank集合中目标bank出现的次数确定。The refresh indication information is used to indicate that the target bank set is refreshed through the full bank refresh mode, and the refresh times of the target bank set. The memory is caused to perform a refresh operation in the full bank refresh mode on the first target set. Among them, it includes: executing the precharge instruction in full bank refresh mode on the target bank in the target bank set, stopping the read and write operations of the target bank, and executing the refresh operation on the target bank in the target bank set. The refresh times of the target bank is based on the target bank. The number of occurrences of the target bank in the bank set is determined.
在一些实施例中,可以依次执行目标bank集合中的目标bank的刷新操作。例如,目标bank集合包括:bank1,bank2,bank2,bank3。则存储器可以依次执行bank1,bank2,bank2,bank3的刷新操作。In some embodiments, the refresh operations of target banks in the target bank set may be performed sequentially. For example, the target bank set includes: bank1, bank2, bank2, bank3. Then the memory can perform the refresh operations of bank1, bank2, bank2, and bank3 in sequence.
控制器确定目标bank集合刷新完成时,可以更新目标bank集合中的目标bank的欠刷新次数,及存储区域的欠刷新次数。When the controller determines that the refresh of the target bank set is completed, it can update the under-refresh times of the target banks in the target bank set and the under-refresh times of the storage area.
步骤405:控制器确定目标bank集合刷新完成时,判断是否存在多个目标bank集合。若是,则返回步骤404,若否,则返回执行步骤401。Step 405: When the controller determines that the refresh of the target bank set is completed, it judges whether there are multiple target bank sets. If yes, go back to step 404; if not, go back to step 401.
结合上述例子,在控制器确定目标bank集合存在多个时,可以返回步骤404,继续对其他未刷新的目标bank集合按照步骤404的处理过程执行刷新处理,直至将所有的目标bank集合全部刷新完。例如,在步骤404先选择第1个目标bank集合刷新完成时,再次返回至步骤404执行时,可以选择第2个目标bank集合,生成相应的刷新指示信息。该刷新指示信息用于指示bank2,bank3,bank3和bank4通过全bank刷新模式刷新1次。依次对第1个目标bank集合和第2个目标bank集合执行步骤404,可以实现将所有的目标bank集合刷新完成,此时,可以再返回至步骤401,将相应的2个目标bank集合对应的8次欠刷新次数减去。至此,完成目标bank集合的刷新。In combination with the above example, when the controller determines that there are multiple target bank sets, it can return to step 404 and continue to perform refresh processing on other target bank sets that have not been refreshed according to the processing procedure of step 404 until all target bank sets are refreshed. . For example, when the first target bank set is selected in step 404 and the refresh is completed, when returning to step 404 for execution again, the second target bank set can be selected to generate corresponding refresh instruction information. The refresh instruction information is used to instruct bank2, bank3, bank3 and bank4 to be refreshed once through the full bank refresh mode. Step 404 is performed on the first target bank set and the second target bank set in turn, so that all target bank sets can be refreshed. 8 under-refresh count minus. At this point, the refresh of the target bank set is completed.
步骤406:控制器根据空闲状态下的bank和标记为待刷新状态的bank,确定待刷新的目标bank。Step 406: The controller determines the target bank to be refreshed according to the bank in the idle state and the bank marked as the state to be refreshed.
结合上述例子,存储区除这2个目标bank集合之外,还包括bank4的2次待刷新。因此,还可以生成2个单bank的刷新命令。其中,2个单bank刷新的刷新命令用于指示对bank4刷新2次。Combining the above example, in addition to the two target bank sets, the storage area also includes two to-be-refreshed bank4. Therefore, two single-bank refresh commands can also be generated. Among them, two refresh commands for single bank refresh are used to instruct bank4 to be refreshed twice.
步骤407:控制器根据待刷新的目标bank,向控制电路发送刷新指示信息。Step 407: The controller sends refresh instruction information to the control circuit according to the target bank to be refreshed.
其中,该刷新指示信息用于指示对待刷新的目标bank通过单bank刷新模式进行刷新。Wherein, the refresh indication information is used to indicate that the target bank to be refreshed is refreshed through the single bank refresh mode.
控制器确定待刷新的目标bank刷新完成时,更新待刷新的目标bank的欠刷新次数,及存储区域的欠刷新次数。When the controller determines that the refresh of the target bank to be refreshed is completed, the controller updates the under-refresh count of the target bank to be refreshed and the under-refresh count of the storage area.
通过混合REFab和REFpb两种刷新模式,在刷新过程中根据待刷新次数动态的选择两种模式,通过REFab来替代多次REFpb从而减少REFpb的操作次数,避免频繁的REFpb挤占DDR带宽,在大流量数据读写的场景下影响DDR效率。同时通过优化REFpb中bank的选择,优先进行空闲bank的刷新,避免正常读写的bank被强制关闭进行刷新。By mixing the two refresh modes of REFab and REFpb, the two modes are dynamically selected according to the number of times to be refreshed during the refresh process, and multiple REFpbs are replaced by REFab to reduce the number of REFpb operations and avoid frequent REFpb crowding DDR bandwidth. In the scenario of data read and write, the DDR efficiency is affected. At the same time, by optimizing the selection of banks in REFpb, the refresh of idle banks is given priority to avoid normal read and write banks being forced to be closed for refresh.
步骤408:控制电路根据刷新指示信息,对待刷新的目标bank进行刷新。Step 408: The control circuit refreshes the target bank to be refreshed according to the refresh instruction information.
步骤409:控制器确定待刷新的目标bank刷新完成时,返回步骤401。Step 409 : when the controller determines that the refresh of the target bank to be refreshed is completed, the controller returns to step 401 .
在返回步骤401时,可以根据完成刷新的待刷新的目标bank,相应减少该待刷新的目标bank的欠刷新次数,及相应减少存储区域的欠刷新次数pstpnd_cnt。例如,待刷新的目标bank为bank4,且刷新完成的次数为1,此时,可以减少bank4中1次欠刷新次数及相应减少存储区域1次欠刷新次数pstpnd_cnt。例如,待刷新的目标bank为bank4,且刷新完成的次数为2,此时,可以减少bank4中2次欠刷新次数及相应减少存储区域2次欠刷新次数pstpnd_cnt。When returning to step 401, according to the target bank to be refreshed that has been refreshed, the number of under-refreshes of the target bank to be refreshed can be correspondingly reduced, and the number of under-refreshes pstpnd_cnt of the storage area can be correspondingly reduced. For example, the target bank to be refreshed is bank4, and the number of times of refresh completion is 1. In this case, the number of under-refreshes in bank4 can be reduced by one time and the number of under-refreshes in the storage area pstpnd_cnt can be correspondingly reduced. For example, the target bank to be refreshed is bank4, and the number of times of refresh completion is 2. In this case, the number of under-refreshes in bank4 can be reduced twice and the number of under-refreshes in the storage area pstpnd_cnt can be reduced accordingly.
本申请实施例还提供一种控制器。该控制器可用于执行图2或图4所示的刷新方法。参见图5,该控制器500包括收发单元501和处理单元502。The embodiment of the present application also provides a controller. The controller can be used to implement the refresh method shown in FIG. 2 or FIG. 4 . Referring to FIG. 5 , the controller 500 includes a transceiver unit 501 and a processing unit 502 .
处理单元502,用于根据所述存储区域中的至少一个bank的空闲状态,确定至少一个待刷新的目标bank;根据所述至少一个待刷新的目标bank,生成刷新指示信息并通过收发单元501发送给所述存储器;所述刷新指示信息用于控制所述存储器刷新所述至少一个待刷新的目标bank。The processing unit 502 is configured to determine at least one target bank to be refreshed according to the idle state of at least one bank in the storage area; according to the at least one target bank to be refreshed, generate refresh indication information and send it through the transceiver unit 501 to the memory; the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed.
一种可能的实现方式,处理单元502,用于在空闲状态的至少一个bank中确定欠刷新次数达到第一阈值的至少一个候选bank,其中,所述欠刷新次数用于指示所述bank在预设的刷新时长内未进行刷新的次数;在所述至少一个候选bank中确定待刷新的目标bank。In a possible implementation manner, the processing unit 502 is configured to determine, in at least one bank in an idle state, at least one candidate bank whose number of under-refreshes reaches a first threshold, wherein the number of under-refreshes is used to indicate that the bank is in the pre-refresh state. The number of times that the refresh is not performed within the set refresh duration; the target bank to be refreshed is determined in the at least one candidate bank.
一种可能的实现方式,处理单元502,用于在所述至少一个候选bank中确定待刷新的目标bank之前,还用于:确定所述存储区域满足刷新条件;所述刷新条件包括以下至少一项:所述至少一个bank的欠刷新次数达到第一阈值;所述至少一个bank处于空闲状态;所述至少一个bank满足强制刷新条件。A possible implementation manner, the processing unit 502 is configured to, before determining the target bank to be refreshed in the at least one candidate bank, is further configured to: determine that the storage area satisfies a refresh condition; the refresh condition includes at least one of the following: Item: the under-refresh count of the at least one bank reaches the first threshold; the at least one bank is in an idle state; the at least one bank satisfies the forced refresh condition.
一种可能的实现方式,处理单元502,用于在确定存在满足全bank刷新模式的目标bank集合时,生成所述目标bank集合的刷新指示信息,所述刷新指示信息用于指示所述目标bank集合的刷新模式为全bank刷新模式,所述目标bank集合中的待刷新的目标bank为所述至少一个待刷新的目标bank中的一项或多项。A possible implementation manner, the processing unit 502 is configured to generate refresh indication information of the target bank set when it is determined that there is a target bank set that satisfies the full bank refresh mode, where the refresh indication information is used to indicate the target bank The refresh mode of the set is a full bank refresh mode, and the target bank to be refreshed in the target bank set is one or more of the at least one target bank to be refreshed.
一种可能的实现方式,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
一种可能的实现方式,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;处理单元502,用于在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。A possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the processing unit 502 is configured to determine the at least one refresh mode. In a target bank to be refreshed, when there is no target bank set satisfying the all-bank refresh mode, it is determined that the refresh mode of the at least one target bank to be refreshed is the single-bank refresh mode or the same-bank refresh mode.
一种可能的实现方式,所述刷新指示信息还用于指示所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;处理单元502,用于在所述至少一个待刷新的目标bank中,除所述目标bank集合外,还包括N个待刷新的目标bank时,确定 所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。A possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the processing unit 502 is used for at least one When the target banks to be refreshed include N target banks to be refreshed in addition to the target bank set, it is determined that the refresh modes of the N target banks to be refreshed are single-bank refresh mode or same-bank refresh mode.
本申请实施例还提供一种存储器。该存储可用于执行图2或图4所示的刷新方法。参见图6,本申请实施例所提供的存储器600可以包括:控制单元601、刷新单元602和存储单元603。示例性的,存储器600可以是图1a中的存储器101,控制单元601可以是图1a中的控制电路1011,刷新单元602可以是图1a中的刷新电路1~N中的至少一个,存储单元603可以是图1a中的bank1~N中的至少一个(即存储区域)。其中:所述存储单元603包括至少一个库bank;刷新单元602,用于刷新所述至少一个bank;The embodiment of the present application also provides a memory. This storage can be used to perform the refresh method shown in FIG. 2 or FIG. 4 . Referring to FIG. 6 , the memory 600 provided by this embodiment of the present application may include: a control unit 601 , a refresh unit 602 , and a storage unit 603 . Exemplarily, the memory 600 may be the memory 101 in FIG. 1a, the control unit 601 may be the control circuit 1011 in FIG. 1a, the refresh unit 602 may be at least one of the refresh circuits 1-N in FIG. 1a, the storage unit 603 It may be at least one (ie, a storage area) of banks 1 to N in FIG. 1a. Wherein: the storage unit 603 includes at least one library bank; the refresh unit 602 is used to refresh the at least one bank;
所述控制单元601,用于接收控制器发送的刷新指示信息,所述刷新指示信息用于指示所述存储单元603中至少一个待刷新的目标bank;所述至少一个待刷新的目标bank为根据存储器的存储单元603中的至少一个bank的空闲状态确定的;并根据所述刷新指示信息,控制所述刷新单元602刷新所述至少一个待刷新的目标bank。The control unit 601 is configured to receive refresh indication information sent by the controller, where the refresh indication information is used to indicate at least one target bank to be refreshed in the storage unit 603; the at least one target bank to be refreshed is a The idle state of at least one bank in the storage unit 603 of the memory is determined; and according to the refresh indication information, the refresh unit 602 is controlled to refresh the at least one target bank to be refreshed.
在一种可能的实现方式中,所述刷新单元602为至少一个;所述控制单元601,具体用于分别控制至少一个刷新单元602分别刷新至少一个待刷新的目标bank。In a possible implementation manner, the refresh unit 602 is at least one; the control unit 601 is specifically configured to respectively control the at least one refresh unit 602 to refresh at least one target bank to be refreshed respectively.
在一种可能的实现方式中,所述刷新指示信息用于指示目标bank集合中待刷新的目标bank的刷新模式为全bank刷新模式;所述目标bank集合中的待刷新的目标bank为所述至少一个待刷新的目标bank中的一项或多项;所述控制单元601,具体用于根据所述刷新指示信息,通过全bank刷新模式控制所述目标bank集合对应的刷新单元602刷新所述目标bank集合中的待刷新的目标bank。在一种可能的实现方式中,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the refresh indication information is used to indicate that the refresh mode of the target bank to be refreshed in the target bank set is the full bank refresh mode; the target bank to be refreshed in the target bank set is the One or more items in at least one target bank to be refreshed; the control unit 601 is specifically configured to, according to the refresh instruction information, control the refresh unit 602 corresponding to the target bank set to refresh the The target bank to be refreshed in the target bank set. In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
所述控制单元601,具体用于根据所述刷新指示信息,通过单bank刷新模式或同bank刷新模式控制所述至少一个待刷新的目标bank对应的刷新单元602刷新所述至少一个待刷新的目标bank。The control unit 601 is specifically configured to, according to the refresh indication information, control the refresh unit 602 corresponding to the at least one target bank to be refreshed to refresh the at least one target to be refreshed through a single bank refresh mode or a same bank refresh mode. bank.
在一种可能的实现方式中,所述控制单元601,还可以在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。In a possible implementation manner, the control unit 601 may further determine that the at least one to-be-refreshed target bank set does not exist in the at least one to-be-refreshed target bank set satisfying the full-bank refresh mode The refresh mode of the target bank is single bank refresh mode or same bank refresh mode.
在一种可能的实现方式中,所述刷新指示信息还用于指示所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;所述N个待刷新的目标bank是在确定所述至少一个待刷新的目标bank中,除所述目标bank集合外的待刷新的目标bank;所述控制单元601,还用于根据所述刷新指示信息,通过单bank刷新模式或同bank刷新模式控制所述至少一个待刷新的目标bank对应的刷新单元602对所述N个待刷新的目标bank进行刷新。In a possible implementation manner, the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; the N target banks to be refreshed In determining the at least one target bank to be refreshed, the target bank to be refreshed other than the target bank set; the control unit 601 is also used for, according to the refresh instruction information, through the single bank refresh mode or The refresh unit 602 corresponding to the at least one target bank to be refreshed is controlled in the same bank refresh mode to refresh the N target banks to be refreshed.
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。在本申请的实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and other division methods may be used in actual implementation. Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个 实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、随机存取存储器(random access memory,RAM)、只读存储器(read only memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, random access memory (random access memory, RAM), read only memory (read only memory, ROM), magnetic disk or optical disk and other media that can store program codes.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (21)

  1. 一种存储器的刷新方法,其特征在于,应用于控制器;所述控制器用于控制存储器;所述存储器的存储区域包括至少一个库bank;所述方法包括:A method for refreshing a memory, characterized in that it is applied to a controller; the controller is used to control the memory; the storage area of the memory includes at least one bank; the method includes:
    根据所述存储区域中的至少一个bank的空闲状态,确定至少一个待刷新的目标bank;Determine at least one target bank to be refreshed according to the idle state of at least one bank in the storage area;
    根据所述至少一个待刷新的目标bank,生成刷新指示信息并发送给所述存储器;所述刷新指示信息用于控制所述存储器刷新所述至少一个待刷新的目标bank。According to the at least one target bank to be refreshed, refresh indication information is generated and sent to the memory; the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed.
  2. 根据权利要求1所述的方法,其特征在于,所述确定至少一个待刷新的目标bank,包括:The method according to claim 1, wherein the determining at least one target bank to be refreshed comprises:
    在空闲状态的至少一个bank中确定欠刷新次数达到第一阈值的至少一个候选bank,其中,所述欠刷新次数用于指示所述bank在预设的刷新时长内未进行刷新的次数;Determine at least one candidate bank whose under-refresh count reaches a first threshold in at least one bank in an idle state, wherein the under-refresh count is used to indicate the number of times the bank has not been refreshed within a preset refresh duration;
    在所述至少一个候选bank中确定待刷新的目标bank。A target bank to be refreshed is determined in the at least one candidate bank.
  3. 根据权利要求2所述的方法,其特征在于,所述在所述至少一个候选bank中确定待刷新的目标bank之前,还包括:The method according to claim 2, wherein before determining the target bank to be refreshed in the at least one candidate bank, the method further comprises:
    确定所述存储区域满足刷新条件;determining that the storage area satisfies the refresh condition;
    所述刷新条件包括以下至少一项:The refresh condition includes at least one of the following:
    所述至少一个bank的欠刷新次数达到第一阈值;The under-refresh count of the at least one bank reaches a first threshold;
    所述至少一个bank处于空闲状态;the at least one bank is in an idle state;
    所述至少一个bank满足强制刷新条件。The at least one bank satisfies the forced refresh condition.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述至少一个待刷新的目标bank,生成刷新指示信息,包括:The method according to any one of claims 1-3, wherein the generating refresh indication information according to the at least one target bank to be refreshed comprises:
    在确定存在满足全bank刷新模式的目标bank集合时,生成所述目标bank集合的刷新指示信息,所述刷新指示信息用于指示所述目标bank集合的刷新模式为全bank刷新模式,所述目标bank集合中的待刷新的目标bank为所述至少一个待刷新的目标bank中的一项或多项。When it is determined that there is a target bank set that satisfies the full bank refresh mode, refresh indication information of the target bank set is generated, where the refresh indication information is used to indicate that the refresh mode of the target bank set is the full bank refresh mode, and the target bank The target bank to be refreshed in the bank set is one or more items of the at least one target bank to be refreshed.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。The method according to any one of claims 1-4, wherein the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;The method according to any one of claims 1-4, wherein the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode;
    所述方法还包括:The method also includes:
    在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。When it is determined that there is no target bank set satisfying the all-bank refresh mode in the at least one target bank to be refreshed, it is determined that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  7. 根据权利要求4所述的方法,其特征在于,所述刷新指示信息还用于指示所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;The method according to claim 4, wherein the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode;
    所述方法还包括:The method also includes:
    在所述至少一个待刷新的目标bank中,除所述目标bank集合外,还包括N个待刷新的目标bank时,确定所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。When the at least one target bank to be refreshed includes N target banks to be refreshed in addition to the target bank set, it is determined that the refresh modes of the N target banks to be refreshed are single bank refresh mode or Same as bank refresh mode.
  8. 一种控制器,其特征在于,其特征在于,包括处理电路和接口电路,其中:A controller, characterized in that it includes a processing circuit and an interface circuit, wherein:
    所述处理电路,用于根据存储器的存储区域中的至少一个bank的空闲状态,确定至少一个待刷新的目标bank;根据所述至少一个待刷新的目标bank,生成刷新指示信息;The processing circuit is configured to determine at least one target bank to be refreshed according to the idle state of at least one bank in the storage area of the memory; generate refresh indication information according to the at least one target bank to be refreshed;
    所述接口电路,用于向所述存储器发送所述刷新指示信息,所述刷新指示信息用于控制所述存储器刷新所述至少一个待刷新的目标bank。The interface circuit is configured to send the refresh indication information to the memory, where the refresh indication information is used to control the memory to refresh the at least one target bank to be refreshed.
  9. 根据权利要求8所述的控制器,其特征在于,所述处理电路,具体用于:The controller according to claim 8, wherein the processing circuit is specifically used for:
    在空闲状态的至少一个bank中确定欠刷新次数达到第一阈值的至少一个候选bank,其中,所述欠刷新次数用于指示所述bank在预设的刷新时长内未进行刷新的次数;Determine at least one candidate bank whose under-refresh count reaches a first threshold in at least one bank in an idle state, wherein the under-refresh count is used to indicate the number of times the bank has not been refreshed within a preset refresh duration;
    在所述至少一个候选bank中确定待刷新的目标bank。A target bank to be refreshed is determined in the at least one candidate bank.
  10. 根据权利要求9所述的控制器,其特征在于,所述处理电路,具体用于:The controller according to claim 9, wherein the processing circuit is specifically used for:
    在所述至少一个候选bank中确定待刷新的目标bank之前,确定所述存储区域满足刷新条件;Before determining the target bank to be refreshed in the at least one candidate bank, determine that the storage area satisfies the refresh condition;
    所述刷新条件包括以下至少一项:The refresh condition includes at least one of the following:
    所述至少一个bank的欠刷新次数达到第一阈值;The under-refresh count of the at least one bank reaches a first threshold;
    所述至少一个bank处于空闲状态;the at least one bank is in an idle state;
    所述至少一个bank满足强制刷新条件。The at least one bank satisfies the forced refresh condition.
  11. 根据权利要求8-10任一项所述的控制器,其特征在于,所述处理电路在根据所述至少一个待刷新的目标bank,生成刷新指示信息时,具体用于:The controller according to any one of claims 8-10, wherein when generating the refresh indication information according to the at least one target bank to be refreshed, the processing circuit is specifically configured to:
    在确定存在满足全bank刷新模式的目标bank集合时,生成所述目标bank集合的刷新指示信息,所述刷新指示信息用于指示所述目标bank集合的刷新模式为全bank刷新模式,所述目标bank集合中的待刷新的目标bank为所述至少一个待刷新的目标bank中的一项或多项。When it is determined that there is a target bank set that satisfies the full bank refresh mode, refresh indication information of the target bank set is generated, where the refresh indication information is used to indicate that the refresh mode of the target bank set is the full bank refresh mode, and the target bank The target bank to be refreshed in the bank set is one or more items of the at least one target bank to be refreshed.
  12. 根据权利要求8-11任一项所述的控制器,其特征在于,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。The controller according to any one of claims 8-11, wherein the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode .
  13. 根据权利要求8-11任一项所述的控制器,其特征在于,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;The controller according to any one of claims 8-11, wherein the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode ;
    所述处理电路,还用于:The processing circuit is also used for:
    在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。When it is determined that there is no target bank set satisfying the all-bank refresh mode in the at least one target bank to be refreshed, it is determined that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  14. 根据权利要求11所述的控制器,其特征在于,所述刷新指示信息还用于指示N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;The controller according to claim 11, wherein the refresh instruction information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode;
    所述处理电路,还用于:The processing circuit is also used for:
    在确定所述至少一个待刷新的目标bank中,存在除所述目标bank集合外的N个待刷新的目标bank时,确定所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。When it is determined that there are N target banks to be refreshed other than the target bank set in the at least one target bank to be refreshed, it is determined that the refresh modes of the N target banks to be refreshed are single bank refresh mode or Same as bank refresh mode.
  15. 一种存储器,其特征在于,包括控制电路、刷新电路和存储区域,其中:A memory is characterized by comprising a control circuit, a refresh circuit and a storage area, wherein:
    所述存储区域包括至少一个库bank;the storage area includes at least one bank;
    所述刷新电路,用于刷新所述至少一个bank;the refresh circuit for refreshing the at least one bank;
    所述控制电路,用于接收控制器发送的刷新指示信息,所述刷新指示信息用于指示所 述存储区域中至少一个待刷新的目标bank;所述至少一个待刷新的目标bank为根据存储器的存储区域中的至少一个bank的空闲状态确定的;并根据所述刷新指示信息,控制所述刷新电路刷新所述至少一个待刷新的目标bank。The control circuit is configured to receive refresh indication information sent by the controller, where the refresh indication information is used to indicate at least one target bank to be refreshed in the storage area; the at least one target bank to be refreshed is based on the memory The idle state of at least one bank in the storage area is determined; and according to the refresh indication information, the refresh circuit is controlled to refresh the at least one target bank to be refreshed.
  16. 根据权利要求15所述的存储器,其特征在于,所述刷新电路为至少一个;The memory according to claim 15, wherein the refresh circuit is at least one;
    所述控制电路,具体用于分别控制至少一个刷新电路分别刷新至少一个待刷新的目标bank。The control circuit is specifically configured to respectively control at least one refresh circuit to refresh at least one target bank to be refreshed respectively.
  17. 根据权利要求15-16任一项所述的存储器,其特征在于,所述刷新指示信息用于指示目标bank集合中待刷新的目标bank的刷新模式为全bank刷新模式;所述目标bank集合中的待刷新的目标bank为所述至少一个待刷新的目标bank中的一项或多项;The memory according to any one of claims 15-16, wherein the refresh indication information is used to indicate that the refresh mode of the target bank to be refreshed in the target bank set is a full bank refresh mode; The target bank to be refreshed is one or more of the at least one target bank to be refreshed;
    所述控制电路,具体用于根据所述刷新指示信息,通过全bank刷新模式控制所述目标bank集合对应的刷新电路刷新所述目标bank集合中的待刷新的目标bank。The control circuit is specifically configured to, according to the refresh instruction information, control the refresh circuit corresponding to the target bank set to refresh the target bank to be refreshed in the target bank set through a full bank refresh mode.
  18. 根据权利要求15-17任一项所述的存储器,其特征在于,所述刷新指示信息还用于指示所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;The memory according to any one of claims 15-17, wherein the refresh indication information is further used to indicate that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode;
    所述控制电路,具体用于根据所述刷新指示信息,通过单bank刷新模式或同bank刷新模式控制所述至少一个待刷新的目标bank对应的刷新电路刷新所述至少一个待刷新的目标bank。The control circuit is specifically configured to control the refresh circuit corresponding to the at least one target bank to be refreshed to refresh the at least one target bank to be refreshed through the single bank refresh mode or the same bank refresh mode according to the refresh instruction information.
  19. 根据权利要求18所述的存储器,其特征在于,所述控制电路,还用于:The memory according to claim 18, wherein the control circuit is further configured to:
    在确定所述至少一个待刷新的目标bank中,不存在满足全bank刷新模式的目标bank集合时,确定所述至少一个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式。When it is determined that there is no target bank set satisfying the all-bank refresh mode in the at least one target bank to be refreshed, it is determined that the refresh mode of the at least one target bank to be refreshed is a single-bank refresh mode or a same-bank refresh mode.
  20. 根据权利要求17所述的存储器,其特征在于,所述刷新指示信息还用于指示所述N个待刷新的目标bank的刷新模式为单bank刷新模式或同bank刷新模式;所述N个待刷新的目标bank是在确定所述至少一个待刷新的目标bank中,除所述目标bank集合外的待刷新的目标bank;The memory according to claim 17, wherein the refresh indication information is further used to indicate that the refresh mode of the N target banks to be refreshed is a single-bank refresh mode or a same-bank refresh mode; The target bank to be refreshed is the target bank to be refreshed other than the set of target banks in determining the at least one target bank to be refreshed;
    所述控制电路,还用于根据所述刷新指示信息,通过单bank刷新模式或同bank刷新模式控制所述至少一个待刷新的目标bank对应的刷新电路对所述N个待刷新的目标bank进行刷新。The control circuit is further configured to control the refresh circuit corresponding to the at least one target bank to be refreshed to the N target banks to be refreshed through a single bank refresh mode or a same bank refresh mode according to the refresh instruction information. refresh.
  21. 一种存储系统,其特征在于,包括如权利要求8-14任一项所述的控制器,和如权利要求15-20任一项所述的存储器。A storage system, characterized by comprising the controller according to any one of claims 8-14, and the memory according to any one of claims 15-20.
PCT/CN2021/077941 2021-02-25 2021-02-25 Memory refresh method, memory, controller, and storage system WO2022178772A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/077941 WO2022178772A1 (en) 2021-02-25 2021-02-25 Memory refresh method, memory, controller, and storage system
CN202180094215.2A CN116897395A (en) 2021-02-25 2021-02-25 Memory refreshing method, memory, controller and memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/077941 WO2022178772A1 (en) 2021-02-25 2021-02-25 Memory refresh method, memory, controller, and storage system

Publications (1)

Publication Number Publication Date
WO2022178772A1 true WO2022178772A1 (en) 2022-09-01

Family

ID=83047673

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/077941 WO2022178772A1 (en) 2021-02-25 2021-02-25 Memory refresh method, memory, controller, and storage system

Country Status (2)

Country Link
CN (1) CN116897395A (en)
WO (1) WO2022178772A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117393013B (en) * 2023-12-09 2024-04-09 深圳星云智联科技有限公司 Efficient DDR control method and related device in statistical application

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104505117A (en) * 2014-12-30 2015-04-08 华中科技大学 Dynamic memory refreshing method and refreshing controller
US20170062073A1 (en) * 2015-08-31 2017-03-02 Keysight Technologies, Inc. Method and system for analyzing a refresh rate of a volatile memory device
CN107527648A (en) * 2017-09-04 2017-12-29 珠海市杰理科技股份有限公司 The method for refreshing and system of memory
US20180314591A1 (en) * 2015-12-08 2018-11-01 Nvidia Corporation Controller-based memory scrub for drams with internal error-correcting code (ecc) bits contemporaneously during auto refresh or by using masked write commands
CN110945589A (en) * 2017-08-02 2020-03-31 高通股份有限公司 Partial refresh techniques for saving memory refresh power

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104505117A (en) * 2014-12-30 2015-04-08 华中科技大学 Dynamic memory refreshing method and refreshing controller
US20170062073A1 (en) * 2015-08-31 2017-03-02 Keysight Technologies, Inc. Method and system for analyzing a refresh rate of a volatile memory device
US20180314591A1 (en) * 2015-12-08 2018-11-01 Nvidia Corporation Controller-based memory scrub for drams with internal error-correcting code (ecc) bits contemporaneously during auto refresh or by using masked write commands
CN110945589A (en) * 2017-08-02 2020-03-31 高通股份有限公司 Partial refresh techniques for saving memory refresh power
CN107527648A (en) * 2017-09-04 2017-12-29 珠海市杰理科技股份有限公司 The method for refreshing and system of memory

Also Published As

Publication number Publication date
CN116897395A (en) 2023-10-17

Similar Documents

Publication Publication Date Title
JP6169658B2 (en) Directed automatic refresh synchronization
EP3005128B1 (en) Separate memory controllers to access data in memory
CN103915110B (en) A kind of controller of the method for refreshing of volatile memory and the volatile memory of correlation
US10522207B2 (en) Performance of additional refresh operations during self-refresh mode
US7353329B2 (en) Memory buffer device integrating refresh logic
KR100870478B1 (en) Method and system for providing independent bank refresh for volatile memories
CN101465158B (en) Semiconductor memory, memory system, and memory access control method
CN105378847A (en) DRAM sub-array level autonomic refresh memory controller optimization
US20040128433A1 (en) Refresh port for a dynamic memory
CN110546707B (en) Memory refreshing technology and computer system
CN104981872A (en) A memory system
CN110520929B (en) Memory refreshing method and device and computer system
CN103959388B (en) Method for scheduling memory refresh operations including power states
CN103927268A (en) Storage access method and device
US10446215B1 (en) System and method for adaptively optimized refresh of memory
EP0588250A2 (en) PSRAM refresh controller
CN102339261B (en) A kind of DDR2SDRAM controller
WO2022178772A1 (en) Memory refresh method, memory, controller, and storage system
WO2019141050A1 (en) Refreshing method, apparatus and system, and memory controller
WO2022155970A1 (en) Memory control method and memory control apparatus
US20020136079A1 (en) Semiconductor memory device and information processing system
CN111158585B (en) Memory controller refreshing optimization method, device, equipment and storage medium
CN110097898B (en) Page size aware scheduling method and non-transitory computer readable recording medium
CN102073604B (en) Method, device and system for controlling read and write of synchronous dynamic memory
CN113946435A (en) Memory management technology and computer system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21927211

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180094215.2

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21927211

Country of ref document: EP

Kind code of ref document: A1