A memory controller system and memory scheduling method for storage device
By using linked list control modules in the memory controller system for write merging and read capture, the problem of insufficient performance and power consumption of memory controller system in the prior art is solved, and more efficient memory access and lower power are achieved Consumption.
Patent Information
- Application Number
- CN202110007968.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-09-28
- Filing Date
- 2021-01-05
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-01-05
AI Technical Summary
Existing memory controller systems need to maintain age-based matrices and fixed read/write command queue allocations, fail to effectively convert memory cycles, and process read and write commands independently, resulting in insufficient performance and power consumption.
Using a memory controller system based on the linked list control module, the memory controller system is implemented by creating linked list headers and comparing command dependencies to realize write merge and read capture, and supports controller-based cache and atomic operations, allowing read and write cycles between read and write cycles. Seamless conversion, reducing command processing when dependency hits.
Improves memory access performance, reduces the number of read/write commands to DRAM, reduces round-trip latency, optimizes memory traffic, and enhances system performance and power efficiency.
Smart Images

Figure CN114281723B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the technical field of memory management, and in particular to a memory controller and a memory scheduling method of a storage device. Background Art
[0002] In the prior art, when designing a computing system, improving performance and reducing power consumption are two common goals that must be emphasized. Since the system's main memory is one of the key resources required for program operation, it plays an important role in both system performance and power consumption. The performance of the main memory depends on the way it accesses its contents. The access scheduler of the memory controller decides which command to issue in each dynamic random access memory (DRAM) clock cycle based on the memory access scheduling strategy adopted.
[0003] According to the existing access strategy, DRAM operations are scheduled in a way that reduces the latency and power consumption of the DRAM. Some examples of these are listed in the following prior art references:
[0004] US20100153636A1 discloses a control system for memory access, which includes a system memory access command buffer, a memory access command parallel processor, a DRAM command controller and a read data buffer. The system memory access command buffer stores multiple system memory access commands. The memory access command parallel processor is connected to the system memory access command buffer, and is used to extract the system memory access command and decode it into multiple DRAM access commands, store the DRAM access command in the DRAM library command FIFO, and perform priority setting according to the DRAM library priority table. The DRAM command controller is connected to the memory access command parallel processor and the DRAM, and is used to receive the DRAM access command and send the control command to the DRAM. The read data buffer is connected to the DRAM command controller and the system bus, and is used to store the read data and rearrange the sequence of the read data.
[0005] US20060090044A1 discloses a memory controller that optimizes the execution of read / modify / write (RMW) commands by breaking down the RMW commands into separate and unique read and write commands that do not need to be executed together and only need to be executed in the proper order. In the most preferred embodiment, a separate RMW queue is used in the controller in conjunction with the read queue and the write queue. In other embodiments, the controller places the read and write portions of the RMW in the read and write queues, but wherein the write queue has a dependency indicator associated with the RMW write commands in the write queue to ensure that the controller maintains the proper execution order. In an embodiment, the memory controller can convert the RMW commands into read and write commands in the proper execution order to maintain data consistency.
[0006] The aforementioned references aim to provide improved memory controller architectures. However, they still have many limitations and deficiencies. For example, the memory controllers in the aforementioned references must maintain an age-based matrix or a fixed read / write command queue allocation in order to arbitrate DRAM bandwidth through an age-based scheduling strategy. In addition, the aforementioned references process read and write commands independently without the ability to convert memory cycles.
[0007] Therefore, there is still a need for a memory controller system that can overcome the above problems and shortcomings. Summary of the invention
[0008] The following brief summary of the invention provides a basic understanding of some aspects of the invention. This brief summary is not an extensive overview of the invention, and its sole purpose is to present some concepts of the invention in a simplified form as a prelude to the more detailed description that follows.
[0009] An object of the present invention is to provide a memory controller system that implements age- and priority-based scheduling without maintaining an age-based matrix.
[0010] Another object of the present invention is to provide a memory controller system that allows seamless transitions between read and write cycles to support write merging and read snarfing to improve performance.
[0011] Yet another object of the present invention is to provide a memory controller system that supports controller-based caching to improve performance.
[0012] Another object of the present invention is to provide a memory controller system that supports controller-based atomic operations.
[0013] Another object of the present invention is to provide a memory scheduling method for a storage device.
[0014] Accordingly, these objectives can be achieved by following the teachings of the present invention. The present invention relates to a memory controller system for a storage device, comprising: a scheduling module; a data buffer module, wherein the data buffer module comprises a write data unit, a read data unit and a snarf data first-in-first-out buffer for storing data transmitted to or received from the storage device; a global sequencing buffer module, which comprises a read command buffer, a read-write command buffer and a read-merge command buffer for buffering multiple existing commands; and a linked list control module for receiving and processing a first command including a write command or a read command; wherein the linked list control module creates at least one linked list based on a scheduling dependency. The linked list control module is used to trigger a write merge program or a read capture program, process the first command and the existing command to form a next command, load the next command into the global sequencing buffer module, organize the data associated with the next command in the data buffer module, and schedule the next command by the scheduling module so as to retrieve and transmit the data associated with the next command from the data buffer module.
[0015] The present invention also relates to a method for memory scheduling of a storage device, the method comprising the following steps: receiving a first command by a linked list control module; determining whether the first command is a write command or a read command; comparing the first command with an existing command cached in the global sequencing buffer module to determine whether the first command is a dependency hit; if the first command is a dependency hit, triggering a write merge program or a read capture program, processing the first command with the existing command to form a next command, loading the next command into the global sequencing buffer module, organizing data associated with the next command in a data buffer module, and scheduling the next command by a scheduling module to retrieve and transmit data associated with the next command from the data buffer module.
[0016] The present invention also relates to a method for memory scheduling write commands of a storage device, the method comprising the following steps: receiving a first write command by a linked list control module; comparing the first write command with an existing write command cached in the global sequencing buffer module to determine whether the first write command is a dependency hit; if the first write command is a dependency hit, triggering a write merge process to process the first write command and the existing write command to form a next write command; loading the next write command into the global sequencing buffer module, and organizing the write data associated with the next write command in the data buffer module; and scheduling the next write command by a scheduling module to retrieve and transmit the write data associated with the next write command from the data buffer module.
[0017] The present invention also relates to a method for memory scheduling read commands of a storage device, the method comprising the following steps: receiving a first read command by a linked list control module; and comparing the first read command with the existing read command and the existing write command cached in a global sequencing buffer module to determine whether the first read command is a dependency hit; if the first read command is a dependency hit, triggering a read capture program, processing the first read command with the existing read command or the existing write command to form a next read command, loading the next read command into the global sequencing buffer module, organizing data associated with the next read command in the data buffer module, and scheduling the next read command by a scheduling module to retrieve and transmit the read data or write data associated with the next read command from the data buffer module.
[0018] The present invention also relates to a method for performing atomic operations on a storage device, the method comprising the following steps: receiving atomic access by a linked list control module; obtaining read data associated with the atomic access from the storage device and placing it in a data modifier; storing the atomic data associated with the atomic access in the data modifier; modifying the obtained read data according to the atomic data in the data modifier; and organizing the modified data in a write data buffer.
[0019] The present invention also relates to a method for executing data caching of a storage device, the method comprising the following steps: receiving a command by a linked list control module; and determining whether the command is a cache hit; if the command is a read command, triggering a read capture program to capture cache data associated with the read command in a data buffer module, and scheduling the read command by a scheduling module so as to retrieve and transmit cache data related to the read command from the data buffer module; if the command is a write command, triggering a write merge process to merge cache data associated with the write command in the data buffer module, and scheduling the write command by the scheduling module so as to retrieve and transmit cache data associated with the write command from the data buffer module.
[0020] The foregoing and other objects, features, aspects and advantages of the present invention will become more readily understood in conjunction with the detailed description provided herein below, with appropriate reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to understand the above-mentioned features of the present invention in detail, a more specific description of the present invention briefly summarized above can be drawn through embodiments, some of which are shown in the accompanying drawings. However, it should be noted that the accompanying drawings only show typical embodiments of the present invention and are therefore not to be construed as limiting the scope of the present invention, because the present invention may allow other equivalent embodiments.
[0022] These and other features, benefits and advantages of the present invention will become apparent by reference to the following drawings, like reference numerals referring to like structures throughout the views, wherein:
[0023] Figure 1 is a block diagram of a memory controller system for a storage device according to an embodiment of the present invention;
[0024] Figure 2 A method for memory scheduling of a storage device according to an embodiment of the present invention is shown;
[0025] Figure 3 A method for memory scheduling write commands for a storage device according to an embodiment of the present invention is shown;
[0026] Figure 4 A method for memory scheduling read commands for a storage device according to an embodiment of the present invention is shown;
[0027] Figure 5 A method for performing atomic operations on a storage device according to an embodiment of the present invention is shown;
[0028] Figure 6A method for performing data caching of a storage device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0029] As required, detailed embodiments of the present invention are disclosed herein. However, it should be understood that the disclosed embodiments are merely examples of the present invention, which can be implemented in various forms. Therefore, the specific structural and functional details disclosed herein should not be interpreted as restrictive, but only as the basis of the claims. It should be understood that the drawings and their detailed description are not intended to limit the present invention to the specific forms disclosed, on the contrary, the present invention will cover all modifications, equivalent forms and alternative forms within the scope of the present invention defined by the claims. In the terms used throughout this application, the word "may" means the meaning of permission (i.e., it means that it is possible), rather than the mandatory meaning (i.e., it must). Similarly, the word "include, including, include" means including but not limited to. In addition, unless otherwise specified, the word "a, an" means "at least one", and the word "plurality" means one or more. In the case of using abbreviations or technical terms, they represent the commonly recognized meanings in the technical field.
[0030] Hereinafter, the present invention is described with reference to the accompanying drawings by various embodiments, wherein the reference numerals used in the accompanying drawings correspond to similar elements throughout the specification. However, the present invention can be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, the embodiments provided make this disclosure sufficient and complete, and will fully convey the scope of the present invention to those skilled in the art. In the following detailed description, numerical values and ranges are provided for various aspects of the described embodiments. These numerical values and ranges should only be considered as examples, and are not intended to limit the scope of the claims. In addition, many materials are identified as being suitable for various aspects of implementation. These materials will be considered exemplary, and are not intended to limit the scope of the present invention.
[0031] Now refer to Figures 1 to 6 The accompanying drawings are shown to describe the invention in more detail.
[0032] Reference Figure 1The present invention relates to a memory controller system (100) for a storage device, comprising: a scheduling module (8); a data buffer module (2), comprising a write data unit (22), a read data unit (24) and a capture data first-in-first-out buffer (26), for storing data transmitted to or received from a memory; a global sequencing buffer module (4), comprising a read command buffer (5), a read-write command buffer (6) and a read-merge command buffer (7), for buffering a plurality of existing commands; and a linked list control module (3), for receiving and processing a first command including a write command or a read command; wherein the linked list The control module (3) creates at least one linked list header based on the scheduling dependency relationship, and compares the first command with the existing commands cached in the global sequencing buffer module (4) to determine whether the first command is a dependency hit; if the first command is a dependency hit, the linked list control module (3) is used to trigger a write merge process or a read capture process, process the first command and the existing command to form a next command, and load the next command into the global sequencing buffer module (4), sort out the data associated with the next command in the data buffer module (2), and schedule the next command by the scheduling module (8) so as to retrieve and transmit the data associated with the next command from the data buffer module (2).
[0033] According to an embodiment of the present invention, a memory controller system (100) is configured to act as a liaison between a processor and a storage device. The storage device may be a dynamic random access memory (DRAM), or may be implemented using other storage technologies. In addition, DRAM standards include, but are not limited to, high bandwidth memory (HBM) standards, double data rate (DDR) standards, and low power double data rate (LPDDR) standards. Similarly, it is easy to understand that DRAM standards include, but are not limited to, different generations of the above standards, such as HBM3 and DDR5.
[0034] According to an embodiment of the present invention, the communication interface (1) is an Advanced eXtensible Interface (AXI).
[0035] According to an embodiment of the present invention, the memory interface (11) is a DDR PHY interface (DFI) for transmitting commands and data to and from a storage device or a DRAM device via a memory PHY.
[0036] According to an embodiment of the present invention, the linked list control module (3) constructs a linked list based on dependency relationships (eg, same library access) to allow pre-scheduled age information to be stored in the linked list.
[0037] According to an embodiment of the present invention, the data buffer module (2) refers to a memory that temporarily stores data when the data is moved from one place to another. For example, the data buffer module (2) includes a static random access memory (SRAM). The SRAM can be a simple dual-port SRAM or a true dual-port SRAM.
[0038] According to an embodiment of the present invention, the linked list control module (3) includes a cache matching unit (32). The cache matching unit (32) can be a cache lookup table or a merge identification table, which acts as a register for storing the identification of each command. The register allows comparison between the identification of the new command and the identification of the existing command. When the lookup hits, the linked list control module (3) can mark the new command to merge or capture the cache entry it hits. The command refers to a read command or a write command. The cache matching unit (32) includes a linked list creation logic to build a linked list based on addressing dependencies and / or DRAM resource dependencies.
[0039] According to an embodiment of the present invention, the linked list control module (3) creates dependencies for input commands or new commands to allow the relative age, priority and / or access order of commands or memory accesses to be maintained. For example, read / write commands with scheduling dependencies are linked into a multi-layer linked list, which includes a linked list header, which is the earliest memory access or command to the same memory / storage bank before being terminated by the global sequencing buffer module (4). There may be multiple linked list headers in the linked list control module (3), for example, one for each DRAM bank, and the linked list headers can be linked together based on the relative age of different linked list headers. This helps to retain relative age information for scheduling, where the linked list header is always the earliest memory access or command, which is independent of any newer memory access or command with the same dependency on the same memory / storage resource (e.g., the same DRAM bank). Once disabled in the global sequencing buffer module (4), the read / write commands can be considered to be globally sequenced and subsequent scheduling of read / write commands to the DRAM can be completed in any order, thereby allowing the memory controller system (100) to schedule the read / write commands in a manner that best utilizes the DRAM bandwidth while complying with the timing constraints of the DRAM memory.
[0040] According to an embodiment of the present invention, a dependency hit occurs when a new command and an existing command go to the same address.
[0041] According to an embodiment of the present invention, the read-write command buffer (6) can independently process read or write cycles. For example, the read-write command buffer (6) can process read commands during high memory read traffic. Similarly, the read-write command buffer (6) can be dynamically reallocated to process write commands during low memory read traffic.
[0042] According to an embodiment of the present invention, the data buffer module (2) further comprises a write data and strobe FIFO buffer (27) and a write strobe buffer (28) to control the write data and buffer bytes using strobe.
[0043] According to an embodiment of the present invention, the write data unit (22) includes a write data controller (22a) and a write data buffer (22b) for identifying a write command and retrieving write data from the write data buffer (22b).
[0044] According to an embodiment of the present invention, the read data unit (24) includes a read data controller (24a) and a read data buffer (24b) for identifying a read command and retrieving read data from the read data buffer (24b).
[0045] According to an embodiment of the present invention, the scheduling module (8) includes an arbiter (9) and a read-merge arbiter (10) operating in parallel. This is because the read merge command from the read-merge arbiter (10) does not enter the storage device or DRAM device, but only circulates in the memory controller system (100).
[0046] According to an embodiment of the present invention, a memory controller system (100) is scalable to support caching, thereby improving performance by maintaining data cache using a configurable cache and allocation scheme. For example, by converting a read data buffer (24b) and a write data buffer (22b) into a single set-associative cache that supports both read and write data, the memory controller (100) is scalable. With a single set-associative cache, a cache tag array can be maintained in a linked list control module (3), and a dependency check handler in the linked list control module (3) can be used to look up the tag array and manage cache eviction. Since the cache storage is larger and has more modes, the probability of cache hits is increased, resulting in higher write merging and read capture probabilities. Accordingly, access to storage devices can be reduced.
[0047] According to an embodiment of the present invention, the data buffer module (2) further includes a data modifier and a data arbitrator to support atomic operations of the memory controller system (100).
[0048] refer to Figure 2The present invention also relates to a memory scheduling method (200) for a storage device, the method comprising the following steps: receiving a first command by a linked list control module (3); determining whether the first command is a write command or a read command; comparing the first command with an existing command cached in a global sequencing buffer module (4) to determine whether the first command is a dependency hit. If the first command is a dependency hit, a write merge program or a read capture program is triggered to process the first command with the existing command to form a next command, load the next command into the global sequencing buffer module (4), organize data associated with the next command in a data buffer module (2), and schedule the next command by a scheduling module (8) to retrieve and transmit data associated with the next command from the data buffer module (2).
[0049] According to an embodiment of the present invention, if the first command is a write command, a write-merge process is triggered.
[0050] According to an embodiment of the present invention, if the first command is a read command, a read merge process is triggered.
[0051] Reference Figure 3 The present invention also relates to a method (200a) for scheduling write commands in memory of a storage device, the method (200a) comprising the following steps: receiving a first write command by a linked list control module (3); comparing the first write command with an existing write command cached in a global sequencing buffer module (4) to determine whether the first write command is a dependency hit. If the first write command is a dependency hit, a write merge process is triggered to process the first write command with the existing write command to form a next write command, and the next write command is loaded into the global sequencing buffer module (4). The write data associated with the next write command is sorted in the data buffer module (2), and the next write command is scheduled by the scheduling module (8) to retrieve and transmit the write data associated with the next write command from the data buffer module (2).
[0052] According to an embodiment of the present invention, the first write command is associated with write data, and the write data is received by the data buffer module (2).
[0053] According to an embodiment of the present invention, the write data is received by a write data and strobe first-in first-out buffer (27) of a data buffer module (2).
[0054] According to an embodiment of the present invention, the step of processing the first command with the existing write command includes: discarding the first write command; merging the first write command into the existing write command to form a next write command; and determining an identifier of the existing write command.
[0055] According to an embodiment of the present invention, the step of arranging write data associated with a next write command in a data buffer module (2) comprises the following steps: receiving a signal of a next write command and receiving an identifier of an existing write command from a linked list control module (3); loading the write data from a write data and strobe first-in-first-out buffer (27) into a write data buffer (22b) in the data buffer module (2); and merging a new strobe with an existing strobe into a write strobe buffer (28).
[0056] According to an embodiment of the present invention, the step of retrieving and transmitting write data associated with the next write command includes the following steps: using the identifier of the existing write command to retrieve the write data associated with the next write command; verifying the identifier of the existing write command in the linked list control module (3); and transmitting the write data associated with the next write command from the data buffer module (2).
[0057] Reference Figure 4 The present invention also relates to a method (200b) for scheduling memory read commands of a storage device, the method (200b) comprising the following steps: receiving a first read command by a linked list control module (3); comparing the first read command with an existing read command and an existing write command cached in a global sequencing buffer module (4) to determine whether the first read command is a dependency hit. If the first read command is a dependency hit, triggering a read capture program, processing the first read command with an existing read command or an existing write command to form a next read command, and loading the next read command into the global sequencing buffer module (4). Arranging captured data associated with the next read command in a data buffer module (2), and scheduling the next read command by a scheduling module (8) to retrieve and transmit captured data associated with the next read command from the data buffer module (2), wherein the captured data includes read data or write data.
[0058] According to an embodiment of the present invention, the step of processing a first read command with an existing read command or an existing write command includes: determining whether the first read command is to capture write data or to capture read data; using the first read command as the next read command; and determining an identifier of the existing read command or the existing write command.
[0059] According to an embodiment of the present invention, if the first read command is to capture write data, the step of arranging the captured data associated with the next read command in the data buffer module (2) includes the following steps: receiving a signal of the next read command and receiving an identifier of an existing write command from a linked list control module (3); loading the captured write data from a write data buffer (22b) into a capture data first-in-first-out buffer (26) in the data buffer module (2); and loading the captured write data from the capture data first-in-first-out buffer (26) into a read data buffer (24b) in the data buffer module (2).
[0060] According to an embodiment of the present invention, if the first read command is to capture read data, the step of arranging the captured data associated with the next read command in the data buffer module (2) includes the following steps: receiving a signal of the next read command and an identifier of the existing read command from the linked list control module (3); arranging the captured read data in the read data buffer (24b) of the data buffer module (2).
[0061] Reference Figure 5 The present invention also relates to a method (300) for performing atomic operations on a storage device, the method comprising the following steps: receiving an atomic access by a linked list control module (3); obtaining read data associated with the atomic access from the storage device and placing it in a data modifier; storing the atomic data associated with the atomic access in the data modifier; modifying the obtained read data according to the atomic data in the data modifier; and arranging the modified data in a write data buffer (22b).
[0062] refer to Figure 6 The present invention also relates to a method (400) for executing data caching of a storage device, the method comprising the following steps: receiving a command by a linked list control module (3); determining whether the command is a cache hit. If the command is a read command, a read capture program is triggered to capture cache data associated with the read command in the data buffer module (2), and the scheduling module (8) schedules the read command so as to obtain and transmit the cache data associated with the read command from the data buffer module (2). If the command is a write command, a write merge process is triggered to merge the cache data associated with the write command into the data buffer module (2), and the scheduling module (8) schedules the write command so as to retrieve and transmit the cache data associated with the write command from the data buffer module (2).
[0063] Hereinafter, examples of the present invention will be provided for more detailed description. It should be understood that the examples described below are not intended to limit the scope of the present invention.
[0064] Examples
[0065] Write merge process
[0066] The user issues a new write command and corresponding write data to the memory controller system (100) through the AXI interface. The new write command enters the linked list control module (3), and the write data enters the write data and strobe FIFO buffer (27). Thereafter, the linked list control module (3) checks whether the new write command has a dependency hit on the existing write command in the read-write command buffer (6). If there is a dependency hit, where the new write command and one of the existing commands go to the same address, a write merge process will be triggered. The new write command will be merged into the read-write command buffer (6). The linked list control module (3) notifies the write data and strobe FIFO buffer (27) of the write merge process together with the identification of the matching existing command. Subsequently, the new write data will be popped out of the write data and strobe FIFO buffer (27) and loaded into the existing write data position of the write data buffer (22b). The strobe will be used to control the buffer byte enable to overwrite a specific byte. The strobe for the new write data will be merged into the existing write strobe position of the write strobe buffer (28), which is implemented using a register / flip-flop. The merged write command can then be scheduled by the arbiter (9). The merged write command may not be scheduled to the storage device immediately. The merged write command can continue to be merged with future write commands to the same address. After the merged write command is sent to the DFI interface, the above-mentioned identifier will be used to retrieve the merged write data and send it to the DFI interface with an appropriate delay. The above-mentioned identifier is then returned to the linked list control module (3) and checked whether the identifier can be released for reuse based on the cache policy. For example, if there is a cache hit, the above-mentioned ID cannot be released.
[0067] Write merge scenario
[0068] If an existing full write is followed by a new full write where all byte enable strobes are asserted, the new write data will overwrite the existing write data and no changes will be made to the existing write command.
[0069] If an existing full write is followed by a new partial write where not all byte enable strobes are asserted, the new partial write data will overwrite specific bytes of the existing write data based on the new partial write strobes. No changes will be made to the existing write command.
[0070] If an existing partial write is followed by a new full write and a read-modify operation occurs before the write-merge process, the new write data will overwrite the modified write data. The existing partial write command will be converted to a full write command. A read-modify operation occurs when the memory controller system (100) performs a read operation from an associated address and uses a strobe to perform a data merge with the corresponding write data.
[0071] If an existing partial write is followed by a new full write, and a read-modify operation occurs after the write-merge process, the new write data will overwrite the existing write data, and then a read-modify operation will occur using the new strobe information (there will be no modify operation because the new strobe will indicate a full write). The existing partial write command will be converted to a full write command.
[0072] If an existing partial write is followed by a new partial write, and a read-modify operation occurs before the write-merge process, the new partial write data will overwrite the existing write data based on the new partial write strobe. No changes will be made to the existing write command.
[0073] If an existing partial write is followed by a new partial write, and a read-modify operation occurs after the write-merge process, the new partial write data will overwrite the existing write data based on the new partial write strobe, and then the read-modify operation will be performed using the new strobe information. No changes will be made to the existing write command.
[0074] Reading capture process
[0075] The user issues a new read command to the memory controller system (100) via the AXI interface. Thereafter, the linked list control module (3) checks whether the new read command has a dependency hit on an existing write command in the read-write command buffer (6) and an existing read command in the read command buffer (5). If there is a dependency hit and one of the new read command and the existing command goes to the same address, a read capture process is triggered. Subsequently, the new read command is discarded and a new read capture command is created in the read-merge command buffer (7). Then, the read-merge arbiter (10) schedules the read capture command.
[0076] If the read capture command is related to write data capture, the write data controller (22a) is notified of the occurrence of the read capture command and its identifier. The data is retrieved from the write data buffer (22b). The data is then loaded into the capture data first-in-first-out buffer (26). When the read data buffer write port is idle, the data is transferred to the read data buffer (24b). Finally, the read data is returned to the AXI interface. The above identifier is returned to the linked list control module (3), and it is checked whether the identifier can be released for reuse according to the cache policy. For example, if there is a cache hit, the above identifier cannot be released.
[0077] If the read command is related to read data capture, the read data controller (24a) is notified that a read capture command and its identifier have occurred. Data is captured from the read data buffer (24b). Thereafter, when the captured data in the read data buffer (24b) is available, the captured data is returned to the AXI interface. The identifier is then returned to the linked list control module (3) and a check is made based on the cache policy whether the identifier can be released for reuse. For example, if there is a cache hit, the identifier cannot be released.
[0078] Data caching process
[0079] The cache control logic will pre-select eviction candidates for each tag. The eviction policy is configurable. Examples of the eviction policy include, but are not limited to, First In First Out (FIFO) and Least Recently Used (LRU). If the cache has an empty entry (cold cache), the empty entry is always selected as the eviction candidate. The cache can use all local SRAM devices or a merged SRAM buffer between the read data buffer and the write data buffer as a complete cache.
[0080] When a user issues a new command to the memory controller system (100) via the AXI interface, the linked list control module (3) will check for cache hits. If the new command is a write command and there is a free slot in the cache, the identifier and address of the write data are stored in the cache and the write data is stored. If the new command is a write command and the address matches an existing slot in the cache, the write command will be merged into the cache entry.
[0081] If the new command is a read command, the read capture process is triggered and the read command captures the existing cache data.
[0082] Atomic Operation Process
[0083] The user issues an atomic access to the memory controller system (100) via the AXI interface. The atomic access is stored in the read-write command buffer (6). The atomic access flow is similar to the read-modify-write (RMW) flow. For example, the atomic access will first issue a read command to obtain the read data from the DRAM to the data modifier. The atomic data will also be retrieved from the write data buffer (22b) and stored in the data modifier. Thereafter, the acquired read data will be modified according to atomic operations, which include but are not limited to increment, decrement, bit shift, Boolean operations (AND, OR, NOT, XOR) and memory swaps. Thereafter, the modified data is written to the write data buffer (22b), and the read-write command buffer (6) will be notified that the modified data is ready. Then, the atomic access will issue a write command to the DRAM location. Depending on the atomic access requirements, the data before or after modification can be returned to the user via the AXI interface. For example, a memory swap will return the pre-modified data.
[0084] The above-mentioned memory controller system (100) overcomes the problems and shortcomings of existing memory controller systems. In the present invention, write merging and read capture capabilities reduce the number of read / write commands issued to DRAM, thereby reserving command bandwidth for other commands. In addition, the read capture capability can reduce round-trip latency because data retrieval is performed from local SRAM rather than from DRAM memory. Similarly, in the present invention, data can be quickly retrieved and returned through a controller-based cache to improve performance. In addition, the controller-based atomic operations in the present invention enhance system performance and power by reducing memory traffic between shared memory and the memory controller system (100). In addition, the read-write command buffer (6) in the present invention can flexibly handle read or write cycles to allow the memory controller (100) to optimize memory traffic.
[0085] The exemplary embodiments described above are shown with certain features, but the scope of the present invention may also include various other features.
[0086] Various modifications to these embodiments will be apparent to those skilled in the art through the description and drawings. The principles associated with the various embodiments described herein may be applied to other embodiments. Therefore, the description of the invention is not intended to be limited to the embodiments associated with the attached drawings. Figure 1 The present invention is not limited to the embodiments shown, but provides the broadest scope consistent with the principles and novel and inventive features disclosed or suggested herein. Therefore, all alternatives, modifications and changes made according to the present invention fall within the scope of the present invention and the appended claims.
[0087] It should be appreciated that reference to any prior art publication herein is not an admission that the publication forms part of the common general knowledge in the art.
Claims
1. A memory controller system (100) for a storage device, comprising: Scheduling module (8); It is characterized in that A data buffer module (2), comprising a write data unit (22), a read data unit (24) and a capture data first-in-first-out buffer (26), for storing data transmitted to or received from a storage device; the data buffer module (2) also comprises a write data and strobe first-in-first-out buffer (27) and a write strobe buffer (28) for controlling write data and buffer bytes using strobe; A global sequencing buffer module (4), comprising a read command buffer (5), a read-write command buffer (6) and a read-merge command buffer (7), for buffering a plurality of existing commands; and A linked list control module (3), used for receiving and processing a first command, wherein the first command includes a write command or a read command; The linked list control module (3) determines whether the first command is a dependency hit by comparing the first command with existing commands cached in the global sequencing buffer module (4); If the first command is a dependency hit, the linked list control module (3) is used to trigger a write merge program or a read capture program, process the first command and the existing command to form a next command, load the next command into the global sequencing buffer module (4), sort the data associated with the next command in the data buffer module (2), and schedule the next command by the scheduling module (8) so as to retrieve and transmit the data associated with the next command from the data buffer module (2); When the linked list control module (3) receives a write command, the write command includes a first write command; and Comparing the first write command with an existing write command cached in a global sequencing buffer module (4) to determine whether the first write command is a dependency hit; If the first write command is a dependency hit, a write merge process is triggered, the first write command is processed with the existing write command to form a next write command, the next write command is loaded into the global sequencing buffer module (4), the write data associated with the next write command is sorted in the data buffer module (2), and the next write command is scheduled by a scheduling module (8) so as to retrieve and transmit the write data associated with the next write command from the data buffer module (2); The step of arranging the write data associated with the next write command in the data buffer module (2) comprises the following steps: receiving a signal of the next write command and receiving an identifier of the existing write command from the linked list control module (3); Loading the write data from the write data and strobe FIFO buffer (27) into a write data buffer (22b) in the data buffer module (2); and The new strobe is merged with the existing strobe in the write strobe buffer (28).
2. The memory controller system (100) according to claim 1, characterized in that: The linked list control module (3) constructs a linked list based on the dependency relationship to allow the pre-scheduled age information to be stored in the linked list.
3. The memory controller system (100) according to claim 1, characterized in that: The write data unit (22) includes a write data controller (22a) and a write data buffer (22b) for identifying the write command and retrieving write data from the write data buffer (22b).
4. The memory controller system (100) according to claim 1, characterized in that: The read data unit (24) includes a read data controller (24a) and a read data buffer (24b) for identifying the read command and retrieving read data from the read data buffer (24b).
5. The memory controller system (100) according to claim 1, characterized in that: The scheduling module (8) includes an arbitrator (9) and a read-merge arbitrator (10) operating in parallel.
6. The memory controller system (100) according to claim 1, characterized in that: The data buffer module (2) also includes a data modifier and a data arbitrator to support the atomic operation of the memory controller system (100).
7. The memory controller system (100) according to claim 1, characterized in that: The linked list control module (3) comprises a cache matching unit (32).
8. The memory controller system (100) according to claim 7, characterized in that: The cache matching unit (32) includes a linked list creation logic to construct a linked list based on addressing dependency and / or DRAM resource dependency.
9. A method (200) for memory scheduling of a storage device, the method (200) comprising the following steps: The linked list control module (3) receives a first command; determining whether the first command is a write command or a read command; as well as Comparing the first command with existing commands buffered in a global sequencing buffer module (4) to determine whether the first command is a dependency hit; If the first command is a dependency hit, a write merge program or a read capture program is triggered, the first command is processed with the existing command to form a next command, the next command is loaded into the global sequencing buffer module (4), data associated with the next command is sorted in the data buffer module (2), and the next command is scheduled by a scheduling module (8) to retrieve and transmit data associated with the next command from the data buffer module (2); When the linked list control module (3) receives a write command, the write command includes a first write command; and Comparing the first write command with an existing write command cached in a global sequencing buffer module (4) to determine whether the first write command is a dependency hit; If the first write command is a dependency hit, a write merge process is triggered, the first write command is processed with the existing write command to form a next write command, the next write command is loaded into the global sequencing buffer module (4), the write data associated with the next write command is sorted in the data buffer module (2), and the next write command is scheduled by a scheduling module (8) so as to retrieve and transmit the write data associated with the next write command from the data buffer module (2); The step of arranging the write data associated with the next write command in the data buffer module (2) comprises the following steps: Receiving the signal of the next write command and the identifier of the existing write command from the linked list control module (3); Loading the write data from the write data and strobe FIFO buffer (27) into a write data buffer (22b) in the data buffer module (2); and The new strobe is merged with the existing strobe in the write strobe buffer (28).
10. The method (200) according to claim 9, characterized in that: If the first command is a write command, the write-merge procedure is triggered.
11. The method (200) according to claim 9, characterized in that: If the first command is a read command, the read capture procedure is triggered.
12. A method (200a) for scheduling a memory write command of a storage device, the method (200a) comprising the following steps: The linked list control module (3) receives a first write command; as well as Comparing the first write command with an existing write command cached in a global sequencing buffer module (4) to determine whether the first write command is a dependency hit; If the first write command is a dependency hit, a write merge process is triggered, the first write command is processed with the existing write command to form a next write command, the next write command is loaded into the global sequencing buffer module (4), the write data associated with the next write command is sorted in the data buffer module (2), and the next write command is scheduled by a scheduling module (8) so as to retrieve and transmit the write data associated with the next write command from the data buffer module (2); The step of arranging the write data associated with the next write command in the data buffer module (2) comprises the following steps: Receiving the signal of the next write command and the identifier of the existing write command from the linked list control module (3); Loading the write data from the write data and strobe FIFO buffer (27) into a write data buffer (22b) in the data buffer module (2); and The new strobe is merged with the existing strobe in the write strobe buffer (28).
13. The method (200a) according to claim 12, characterized in that: The first write command is associated with write data, and the write data is received by the data buffer module (2).
14. The method (200a) according to claim 13, characterized in that: The write data is received by the write data and strobe first-in first-out buffer (27) of the data buffer module (2).
15. The method (200a) according to claim 12, characterized in that: The step of processing the first write command and the existing write command comprises: discarding the first write command; merging the first write command into the existing write command to form the next write command; and An identification of the existing write command is determined.
16. The method (200a) according to any one of claims 12 to 15, characterized in that The step of retrieving and transmitting said write data associated with said next write command comprises the following steps: retrieving the write data associated with the next write command using the identification of the existing write command; Verifying the identifier of the existing write command in the linked list control module (3); and The write data associated with the next write command is transmitted from the data buffer module (2).
17. A method (200b) for scheduling a memory read command of a storage device, the method (200b) comprising the following steps: The linked list control module (3) receives a first read command; as well as Comparing the first read command with existing read commands and existing write commands cached in a global sequencing buffer module (4) to determine whether the first read command is a dependency hit; If the first read command is a dependency hit, a read capture process is triggered, the first read command is processed with an existing read command or an existing write command to form a next read command, and the next read command is loaded into the global sequencing buffer module (4), the captured data associated with the next read command is sorted in the data buffer module (2), and the next read command is scheduled by a scheduling module (8) to retrieve and transmit the captured data associated with the next read command from the data buffer module (2); wherein the captured data includes read data or write data; The step of processing the first read command with an existing read command or an existing write command comprises: determining whether the first read command is to capture write data or to capture read data; Using the first read command as the next read command; and determining an identification of an existing read command or an existing write command; If the first read command is to capture write data, the step of collating the captured data associated with the next read command in the data buffer module (2) comprises the following steps: Receiving the signal of the next read command and the identification of the existing write command from the linked list control module (3); Loading the captured write data from the write data buffer (22b) into a capture data first-in-first-out buffer (26) in the data buffer module (2); and Loading the captured write data from the capture data first-in-first-out buffer (26) into a read data buffer (24b) in the data buffer module (2); If the first read command is to capture read data, the step of arranging the captured data associated with the next read command in the data buffer module (2) comprises the following steps: receiving a signal of the next read command and an identifier of the existing read command from the linked list control module (3); and The captured read data is sorted in the read data buffer (24b) of the data buffer module (2).
