A dynamic data allocation method for multi-channel LPDDR storage management
Through the dynamic data allocation method, LPDDR memory status is monitored and data allocation is adjusted, solving the problems of uneven data distribution and power consumption optimization in multi-channel LPDDR memory systems, achieving efficient resource utilization and system stability, and extending equipment life.
Patent Information
- Application Number
- CN202411123797.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-16
AI Technical Summary
In multi-channel LPDDR memory systems, there are uneven data distribution, power optimization difficulties, and the lack of effective damage or performance degradation management mechanisms, resulting in overall performance degradation and data integrity issues.
Adopting a dynamic data allocation method, the status judgment module monitors the LPDDR memory status, the data arbitration module adjusts data allocation, and the channel control module redistributes the load to achieve dynamic adjustment and resource optimization.
Improves memory utilization, reduces power consumption, extends device battery life, and ensures high data reliability and system stability.
Smart Images

Figure CN118642668B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer storage, and in particular to a dynamic data allocation method for multi-channel LPDDR storage management. Background Art
[0002] With the rapid development of information technology, electronic devices have higher and higher requirements for memory performance. They have strict requirements on memory capacity, speed and power consumption. LPDDR (Low Power Double Data Rate) memory has been widely used in these devices due to its low power consumption and high data transmission rate.
[0003] LPDDR memory is usually configured with dual channels, which can provide high data throughput, but it also brings some challenges. For example, in a multi-channel LPDDR memory system, data distribution may be uneven, causing some channels to be overloaded while other channels are idle, affecting overall performance. At the same time, as the use time increases, some LPDDR memories may experience performance degradation or damage, affecting data integrity and system stability.
[0004] For a storage system composed of multiple LPDDRs, although the LPDDR memory itself has low power consumption characteristics, how to further optimize energy consumption when multiple channels work in parallel is still a difficult problem.
[0005] The existing technology usually adopts static data allocation strategies when dealing with these problems. These strategies cannot be flexibly adjusted when the memory state changes, resulting in low resource utilization efficiency. In addition, for damaged or degraded LPDDR memory, the existing technology lacks an effective management mechanism to timely adjust data allocation or extinguish useless channels to prevent data loss and improve system stability. Summary of the invention
[0006] In order to overcome the deficiencies of the above technologies, the present invention provides a dynamic data allocation method for multi-channel LPDDR storage management, which improves memory utilization and ensures performance while reducing power consumption and extending device battery life.
[0007] The technical solution adopted by the present invention to overcome the technical problems is:
[0008] A dynamic data allocation method for multi-channel LPDDR storage management includes a plurality of dual-channel LPDDR memories and a DDR controller connected to each LPDDR memory, and also includes a DRAM controller connected to each DDR controller, wherein the DRAM controller is composed of a channel control module, a state judgment module, and a data arbitration module. The data allocation method is as follows:
[0009] S1. The status judgment module monitors whether the LPDDR memory is damaged or idle. If so, the status judgment module marks the LPDDR memory as needing to be closed and sends the closing indication flag to the data arbitration module and the channel control module;
[0010] S2 status determination module monitors the load of the LPDDR memory, if the load is unbalanced, the status determination module sends a load imbalance signal to the channel control module;
[0011] S3. When the data arbitration module receives the need to close the indication flag sent by the status judgment module, it stops sending data to the LPDDR memory marked as closed and no longer receives data from the LPDDR memory;
[0012] S4. The channel control module controls the channel of the LPDDR memory according to the closing indication flag and the load imbalance signal sent by the status judgment module.
[0013] Furthermore, the DDR controller and the LPDDR memory are connected to each other via a physical layer PHY and a data channel DFI.
[0014] Furthermore, in step S1, if the hit rate of a LPDDR memory is lower than a preset threshold A, the LPDDR memory is damaged; if the remaining storage space of a LPDDR memory does not change after the memory access task is completed and is greater than a preset threshold B when there is no memory access task, the LPDDR memory is in an idle state.
[0015] Furthermore, the preset threshold value A is 35%, and the preset threshold value B is 95%.
[0016] Furthermore, in step S2, if the load of the LPDDR memory with the highest load is more than twice the load of the LPDDR memory with the lowest load or the load of an LPDDR memory is in a fully loaded state, it is determined that the load is unbalanced.
[0017] Furthermore, the data arbitration module receives a signal from the SoC, and selects a corresponding LPDDR memory for storage according to a sequence number flag of the SoC signal.
[0018] Furthermore, when the SoC needs to read data, the data arbitration module reads the data in the corresponding LPDDR memory according to the sequence number flag sent by the SoC.
[0019] Furthermore, the serial number flag bit of the nth LPDDR memory marked as closed is idx(n). The serial number flag bit idx(n+1) of the n+1th LPDDR memory is calculated by the formula idx(n+1)=idx(n)+E(n), where E(n) is the enable signal for turning on or off the nth LPDDR memory. The data arbitration module puts the data that needs to be put into the nth LPDDR memory into the n+1th LPDDR memory.
[0020] Furthermore, in step S4, after the channel control module receives the load imbalance signal, the channel control module sends a signal to the LPDDR memory with the highest load or the fully loaded LPDDR memory. After receiving the signal, the LPDDR memory sends the data to the data arbitration module, and the data arbitration module sends the data to the idle LPDDR memory for storage.
[0021] Further, in step S4, after the channel control module receives the shutdown indication flag sent by the state judgment module, the channel control module sets the enable signal of the corresponding LPDDR memory to 0.
[0022] The beneficial effects of the present invention are: while realizing large bit width, large bandwidth and large capacity through parallel linking, multiple LPDDR dynamic data allocation is realized. Through real-time monitoring and dynamic adjustment of the LPDDR multi-channel storage system, high reliability of data storage is ensured, resource allocation is optimized, and the overall performance of the system is improved, while energy consumption is reduced and the service life of the memory is extended. The adaptability and flexibility of this method provide an efficient solution for the ever-changing data storage needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a structural diagram of a DRAM controller of the present invention;
[0024] Figure 2 It is a system structure diagram of the present invention. DETAILED DESCRIPTION
[0025] The following is combined with Figure 1 , Attachment Figure 2 The preferred embodiments of the present invention are described in detail so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0026] In the description of the present invention, it should be noted that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0027] The terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0028] A dynamic data allocation method for multi-channel LPDDR storage management includes a plurality of dual-channel LPDDR memories and a DDR controller connected to each LPDDR memory, and also includes a DRAM controller connected to each DDR controller, as shown in the attached Figure 1 As shown, the DRAM controller consists of a channel control module, a state judgment module, and a data arbitration module. The data allocation method is:
[0029] S1. The status judgment module monitors whether the LPDDR memory is in a damaged or idle state. If so, the status judgment module marks the LPDDR memory as needing to be shut down, and sends a shutdown indication flag to the data arbitration module and the channel control module.
[0030] S2. The state judgment module monitors the load of the LPDDR memory. If the load is unbalanced, the state judgment module sends a load unbalance signal to the channel control module.
[0031] S3. When the data arbitration module receives the shutdown indication flag sent by the status judgment module, it stops sending data to the LPDDR memory marked as closed and no longer receives data from the LPDDR memory, which helps to ensure data integrity and prevents data from being written to damaged or degraded memory. The data arbitration module is responsible for managing data flow and ensuring effective distribution of data between LPDDR memories.
[0032] S4. The channel control module controls the channel of the LPDDR memory according to the need to close indication flag and load imbalance signal sent by the state judgment module. When receiving the load imbalance signal, the channel control module will send a control signal to migrate the data in the LPDDR memory with tight resources to the idle LPDDR memory.
[0033] The dynamic allocation mechanism can dynamically adjust channel allocation according to the actual system load and data access mode. This dynamic allocation mechanism can not only improve memory utilization, but also reduce power consumption while ensuring performance, thereby extending the battery life of the device. By monitoring the status of the LPDDR memory in real time and dynamically adjusting data allocation, storage efficiency and system reliability can be improved. At the same time, by identifying and extinguishing damaged or idle channels, data integrity is guaranteed and power consumption during system operation is reduced.
[0034] The present invention adopts a parallel link mode as a multi-channel connection mode. The multi-channel architecture is a memory design method in which a memory controller communicates with a memory module through multiple independent channels. Each channel has its own command / address bus and data bus, and can independently perform memory access operations. This design allows the system to process multiple memory requests simultaneously, thereby improving performance and flexibility, and can significantly improve data transfer rates and overall system performance.
[0035] For a single LPDDR chip with dual channels, it can be understood as consisting of two DRAMs. The parallel connection uses the same CA line and chip select line, but the data line corresponds to an independent data channel. In this connection mode, all DRAMs (or independent channels in LPDDR) receive the same command and address, open the same page, and access the same data column, but the data in each DRAM is different and will be sent through their own independent data lines. This method is selected because it allows two independent data transmissions to be carried out simultaneously, which can achieve the effect of widening the bit width and increasing the bandwidth.
[0036] Tightly integrating the DDR controller with DRAM can form an efficient parallel connection system architecture, using the physical layer (PHY) and data channel (DFI) to achieve fast data transmission, ensuring wide memory compatibility and high performance. This design not only improves data bit width and data transmission rate, but also optimizes power consumption, suitable for various application requirements.
[0037] The parallel connection, with its large bandwidth, can support high-speed data transmission and meet the stringent requirements of the system when processing large amounts of data. By sharing the command / address bus, the two memory modules can receive instructions at the same time, and the independent data bus design allows them to send data in parallel, greatly improving data throughput.
[0038] In addition, the large bit width provided by this connection method further enhances the system's data processing capabilities, allowing each memory access to load more data, which is particularly important when performing complex calculations and graphics-intensive applications. At the same time, the large-capacity memory configuration ensures that the system can store more information, providing sufficient space for running memory-intensive applications, and ensuring the stability and reliability of the system when processing large-scale data sets.
[0039] In one embodiment of the present invention, the DDR controller and the LPDDR memory are connected to each other via a physical layer PHY and a data channel DFI.
[0040] The state judgment module is a key component of the dynamic data allocation system, which is responsible for monitoring and evaluating the state of the LPDDR memory. The state judgment module receives state indicators uploaded by the LPDDR controller, such as hit rate, access delay, remaining storage space, etc., and determines whether the memory is in a damaged or idle state by analyzing these states. Specifically, in one embodiment of the present invention, if the hit rate of an LPDDR memory is lower than the preset threshold A in step S1, it means that the access delay has increased significantly, which may indicate that the memory is damaged or the performance has decreased, then the LPDDR memory is damaged, and if the remaining storage space of an LPDDR memory does not change after the memory access task is completed and is greater than the preset threshold B when there is no memory access task, then the LPDDR memory is in an idle state. Once it is judged to be damaged or idle, the state judgment module will mark the LPDDR as needing to be closed, and notify the data arbitration and channel control module.
[0041] In this embodiment, preferably, the preset threshold value A is 35%, and the preset threshold value B is 95%.
[0042] The state judgment module is also responsible for monitoring the load of all LPDDR memories to ensure the balance of data distribution. Specifically, in one embodiment of the present invention, if the load of the LPDDR memory with the highest load is more than twice the load of the LPDDR memory with the lowest load or the load of an LPDDR memory is fully loaded in step S2, it is determined that the load is unbalanced. This indicates that there is a load imbalance. The state judgment module sends a signal to the channel control module, indicating that data needs to be redistributed to achieve load balance.
[0043] In one embodiment of the present invention, the data arbitration module receives a signal from the SoC, and selects a corresponding LPDDR memory for storage according to a sequence number flag of the SoC signal.
[0044] In one embodiment of the present invention, when the SoC needs to read data, the data arbitration module reads the data in the corresponding LPDDR memory according to the sequence number flag sent by the SoC.
[0045] It is worth noting that, in order to facilitate the arbitration of the data arbitration module, there is a set of special flags in the state control signal, which are used to record the sequence number of the current LPDDR, recorded as the sequence number flag. The default value of the sequence number flag is the sequence number value of the LPDDR memory. In one embodiment of the present invention, the sequence number flag of the nth LPDDR memory marked as closed is idx(n). , the sequence number flag idx(n+1) of the n+1th LPDDR memory is calculated by the formula idx(n+1)=idx(n)+E(n), where E(n) is the enable signal for turning on or off the nth LPDDR memory, and the data arbitration module puts the data that needs to be put into the nth LPDDR memory into the n+1th LPDDR memory. That is, if a certain LPDDR memory is extinguished, the enable signal is set to zero. According to the formula, it can be found that for the extinguished LPDDR path, the sequence number flag will not be changed, that is, the next memory will inherit the sequence number flag of the extinguished memory. Therefore, in this way, during data arbitration, if the data needs to be put into the original LPDDR memory, it will be stored in the next LPDDR memory, realizing the function of skipping the extinguished path.
[0046] In one embodiment of the present invention, after the channel control module receives the load imbalance signal in step S4, the channel control module sends a signal to the LPDDR memory with the highest load or the fully loaded LPDDR memory, and the LPDDR memory sends the data to the data arbitration module after receiving the signal, and the data arbitration module sends the data to the idle LPDDR memory for storage, thereby ensuring that the data is evenly distributed among all LPDDR memories, thereby improving the overall storage efficiency and performance.
[0047] In one embodiment of the present invention, after the channel control module receives the shutdown indication flag sent by the state judgment module in step S4, the channel control module sets the enable signal of the corresponding LPDDR memory to 0, thereby turning off the channel. This can not only achieve the purpose of reducing power consumption, but also help prevent data loss.
[0048] As attached Figure 2 As shown in the figure, taking a 4-way parallel dual-channel LPDDR storage architecture as an example, each LPDDR memory is divided into two channels (i.e., two DRAMs), and their data channels are independent of each other and share a command / address channel. Therefore, at any time, the two channels in an LPDDR receive the same command and operate on different data at the same address. The data of the DDR controller is sent to the physical layer through the DFI interface, and the controller's signal is sent to the DRAM after being processed by the physical layer timing. The process of DRAM sending data to the controller is similar and will not be repeated.
[0049] When one of the LPDDR paths is damaged or idle, such as Figure 2 The second LPDDR in the memory is damaged, which is manifested by a serious drop in hit rate to below the threshold and a significant increase in access latency. At this time, its state parameters are returned to the DRAM controller. After being judged by the internal state judgment module of the controller, a signal flag is sent to the channel control and data arbitration. After receiving the signal, the channel control module sets the enable signal corresponding to the second LPDDR to 0, extinguishes it, and the next memory integrates its sequence flag. At this time, the data arbitration module no longer sends or receives data to this channel. For LPDDR channels that have been idle for a long time, they will also be extinguished in this way to save energy consumption of the entire system.
[0050] According to the state parameters transmitted back to the controller, after the judgment of the state judgment module, if there is a load imbalance, the data is dynamically allocated. The controller sends the control module to the lower level, and the control bus sends it to the two groups of channels ready to perform dynamic allocation. After the channel receives the control signal, one channel sends the data to the data arbitration module in the DRAM controller, and after arbitration, it is sent to the other channel, thereby realizing the dynamic allocation of data.
[0051] It is worth noting that: (1) The dynamic allocation of data needs to give way to normal memory access operations, that is, the dynamic allocation priority should be lower than the system's memory access operations to ensure data integrity. (2) If the load on all channels is high and balanced, and there are idle channels (non-damaged channels) that can be opened, the controller reactivates the idle channels and re-load balances the entire system, thereby reducing the load pressure on a single LPDDR channel.
[0052] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A dynamic data allocation method for multi-channel LPDDR storage management, comprising a plurality of dual-channel LPDDR memories and a DDR controller connected to each LPDDR memory, characterized in that: It also includes a DRAM controller connected to each DDR controller. The DRAM controller is composed of a channel control module, a state judgment module, and a data arbitration module. The data allocation method is: S1. The status judgment module monitors whether the LPDDR memory is damaged or idle. If so, the status judgment module marks the LPDDR memory as needing to be closed and sends the closing indication flag to the data arbitration module and the channel control module; S2 status determination module monitors the load of the LPDDR memory, if the load is unbalanced, the status determination module sends a load imbalance signal to the channel control module; S3. When the data arbitration module receives the need to close the indication flag sent by the status judgment module, it stops sending data to the LPDDR memory marked as closed and no longer receives data from the LPDDR memory; S4. The channel control module controls the LPDDR memory channel according to the need to close the indicator flag and the load imbalance signal sent by the status judgment module; In step S4, after the channel control module receives the load imbalance signal, the channel control module sends a signal to the LPDDR memory with the highest load or the fully loaded LPDDR memory. After receiving the signal, the LPDDR memory sends the data to the data arbitration module, and the data arbitration module sends the data to the idle LPDDR memory for storage; In step S4, after the channel control module receives the shutdown indication flag sent by the state judgment module, the channel control module sets the enable signal of the corresponding LPDDR memory to 0.
2. The dynamic data allocation method for multi-channel LPDDR storage management according to claim 1, characterized in that: The DDR controller and the LPDDR memory are connected to each other through the physical layer PHY and the data channel DFI.
3. The dynamic data allocation method for multi-channel LPDDR storage management according to claim 1, characterized in that: In step S1, if the hit rate of a LPDDR memory is lower than a preset threshold value A, the LPDDR memory is damaged; if the remaining storage space of a LPDDR memory does not change after the memory access task is completed and is greater than a preset threshold value B when there is no memory access task, the LPDDR memory is in an idle state.
4. The dynamic data allocation method for multi-channel LPDDR storage management according to claim 3, characterized in that: The preset threshold A is 35%, and the preset threshold B is 95%.
5. The dynamic data allocation method for multi-channel LPDDR storage management according to claim 1, characterized in that: In step S2, if the load of the LPDDR memory with the highest load is more than twice the load of the LPDDR memory with the lowest load or the load of one LPDDR memory is in a fully loaded state, it is determined that the load is unbalanced.
6. The dynamic data allocation method for multi-channel LPDDR storage management according to claim 1, characterized in that: The data arbitration module receives a signal from the SoC and selects a corresponding LPDDR memory for storage according to a sequence number flag of the SoC signal.
7. The dynamic data allocation method for multi-channel LPDDR storage management according to claim 6, characterized in that: When the SoC needs to read data, the data arbitration module reads the data in the corresponding LPDDR memory according to the sequence number flag sent by the SoC.
8. The dynamic data allocation method for multi-channel LPDDR storage management according to claim 6, characterized in that: The serial number flag of the nth LPDDR memory marked as closed is idx(n). The serial number flag bit idx(n+1) of the n+1th LPDDR memory is calculated by the formula idx(n+1)=idx(n)+E(n), where E(n) is the enable signal for turning on or off the nth LPDDR memory. The data arbitration module puts the data that needs to be put into the nth LPDDR memory into the n+1th LPDDR memory.
Citation Information
Patent Citations
Memory device specific self-refresh entry and exit
CN107533509A
System-on-chip memory context recovery and boot time reduction by reducing double data rate memory training
CN114868111A
