Memory controller, method for controlling memory controller, and program
The memory controller optimizes command issuance by managing access requests and delaying memory switching, enhancing memory usage efficiency by minimizing inefficiencies in data bus usage.
Patent Information
- Application Number
- JP2023075815
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-05-01
- Publication Date
- 2024-11-14
- Estimated Expiration
- 2043-05-01
AI Technical Summary
Existing memory controllers experience inefficiencies due to gaps in data bus usage caused by timing constraints and memory switching, leading to reduced memory usage efficiency when there are no immediate memory access requests.
A memory controller with a holding circuit and control circuit that manages access requests, selectively issuing commands to avoid memory switching by delaying selection to a different memory for a predetermined period after a previous command, ensuring efficient data transfer.
This approach suppresses decreases in memory usage efficiency by minimizing memory switching penalties and optimizing command issuance.
Smart Images

Figure 2024160614000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a memory controller, a control method and a program for the memory controller, and more particularly to a technique for selecting an arbitrary memory access request from a plurality of memory access requests connected to a DRAM and issuing a command. [Background technology]
[0002] Dynamic Random Access Memory (DRAM) is generally used as the main memory of computer systems. As computer systems become more sophisticated and powerful, the performance requirements for DRAM are increasing, and various memory controller methods have been proposed to maximize DRAM performance.
[0003] When a memory controller issues read / write commands to multiple memories that share data and switches between them, the interval between read / write commands to different memories must satisfy timing constraints that define how to prevent collisions between shared signals. This can cause gaps in the data bus, reducing memory utilization efficiency.
[0004] Patent Document 1 discloses that a memory controller arbitrates a plurality of memory access requests so as to reduce the number of times the memory is switched, thereby suppressing a decrease in memory utilization efficiency. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Patent No. 3235578 Summary of the Invention [Problem to be solved by the invention]
[0006] However, Patent Document 1 does not mention behavior when there is no longer a memory access request to the memory for which a read / write command was issued immediately before. When selecting a memory access request to a memory different from the immediately preceding memory, it is necessary to wait until a period has passed since the immediately preceding read / write command during which a read / write command to a different memory cannot be issued before issuing the read / write command for the selected memory access request. During this period, even if the memory controller receives a memory access request to the memory for which a read / write command was issued immediately before, the memory will be switched by the read / write command of the already selected memory access request, resulting in reduced memory utilization efficiency.
[0007] The present invention has been made in view of the above-mentioned problems, and has an object to provide a technique for suppressing a decrease in memory utilization efficiency. [Means for solving the problem]
[0008] To achieve the above object, one aspect of the present invention provides a memory controller comprising: A memory controller that issues commands to access multiple memories that share a data signal, a holding circuit for holding a read and / or write access request; a control circuit that selects an arbitrary access request from the access requests held in the holding circuit and issues a read command and / or a write command; The control circuit is characterized by controlling so that access requests held in the holding circuit to a memory other than the memory to which the most recent read command and / or write command was issued are not selected for a predetermined period after the issuance of the most recent read command and / or write command. [Effects of the Invention]
[0009] According to the present invention, it is possible to suppress a decrease in memory utilization efficiency. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 2 is a configuration diagram of a memory controller according to an embodiment of the present invention. [Figure 2] FIG. 2 is a configuration diagram of an access holding circuit entry according to an embodiment of the present invention. [Figure 3] FIG. 2 is a configuration diagram of a read / write control circuit according to an embodiment of the present invention. [Figure 4] FIG. 2 is a diagram showing a first example of an operation for selecting a memory access request according to an embodiment of the present invention. [Figure 5] FIG. 10 is a diagram showing a second example of an operation for selecting a memory access request in the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the scope of the claimed invention. Although multiple features are described in the embodiments, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same reference numerals are used to designate the same or similar components, and redundant explanations will be omitted.
[0012] FIG. 1 is a configuration diagram of a memory controller 100 according to this embodiment. The memory controller 100 is connected to a DRAM 110 consisting of multiple banks and a bus master 120. The DRAM 110 is configured with two memory devices (memory 0 and memory 1), and memory 0 and memory 1 share a data signal. In this embodiment, the data signal is shared by two DRAMs, but the number of DRAMs sharing the data signal is not limited to two and may be three or more. The bus master 120 transmits a memory access request including address information and write data to the memory controller 100. The memory controller 100 generates a DRAM command based on the memory access request received from the bus master 120 and transmits it to one of the multiple DRAMs 110. The memory controller 100 also transfers data between the DRAMs 110 based on the transmitted DRAM command.
[0013] The memory controller 100 includes an access holding circuit 101 , a read / write control circuit 102 , a page control circuit 103 , a bank state management circuit 104 , and a command selector 105 .
[0014] First, the access retention circuit 101 will be described. The access retention circuit 101 is a buffer that holds multiple memory access requests. The access retention circuit 101 is configured with m (m>=2) entries, where m may be any number. FIG. 2 is a configuration diagram of an access retention circuit entry 1011 in this embodiment. In this embodiment, the access retention circuit 101 has m access retention circuit entries 1011 shown in FIG. 2. As shown in FIG. 2, the access retention circuit entry 1011 has fields for access type, target memory, target bank, target page, target column, and number of remaining read / write commands. The access retention circuit 101 converts memory access requests received from the bus master 120 to correspond to each field and holds them. The information stored in each field is as follows:
[0015] (a) Access Type field Indicates the access type of the memory access request stored in the entry WRITE Memory access request is a write (write data) READ Memory access request is a read (data read) (b) Target memory field Indicates the memory to be accessed by the memory access request stored in the entry (c) Target bank field The bank address accessed by the memory access request stored in the entry (d) Target page field The page address accessed by the memory access request stored in the entry (e) Target column field The first column address accessed by the memory access request stored in the entry (f) Remaining read / write command count field The number of remaining DRAM read / write commands to be executed by the memory access requests stored in the entry When a memory access request is stored in the access holding circuit 101, it is stored in the entry following the end of the stored memory access request. When a memory access request is read from the access holding circuit 101, it can be read from any entry.
[0016] Next, the entry control signal input to the access holding circuit 101 will be described. The entry control signal includes an entry number field, a delete field, and an update field. If the delete field is set to 1, the access holding circuit 101 deletes the entry indicated by the entry number field. If the update field is set to 1, the access holding circuit 101 updates the column field of the entry indicated by the entry number field to the first column address accessed by the next DRAM command. In addition, the access holding circuit 101 updates the remaining read / write command count field to a value subtracted by 1.
[0017] Next, the read / write control circuit 102 will be described. The read / write control circuit 102 can refer to all memory access requests stored in the access holding circuit 101. The read / write control circuit 102 selects an arbitrary memory access request from among the memory access requests stored in the access holding circuit 101, for which the page to be accessed is open and no command issuance wait due to memory switching occurs. Whether the page to be accessed by the memory access request is open can be determined from the target memory field, target bank field, and target page field of the access holding circuit entry 1011 and the bank status generated by the bank status management circuit 104. The read / write control circuit 102 then generates a read command or a write command from the selected memory access request and outputs them to the command selector 105. In this embodiment, the read / write control circuit 102 has a function for selecting a memory access request so that a read command and a write command are issued consecutively in order to reduce the read / write switching penalty.
[0018] Next, a procedure for the read / write control circuit 102 to generate an entry control signal will be described. When the last read command or write command executed by a memory access request is issued, processing of the corresponding memory access request is completed. Therefore, the read / write control circuit 102 generates an entry control signal to delete the corresponding entry from the access holding circuit 101. On the other hand, when a read command or write command that is not the last is issued, the read / write control circuit 102 generates an entry control signal to update the corresponding entry in the access holding circuit 101. However, when the last read command or write command is issued, there is no need to update the corresponding entry. Whether the issued read command or write command is the last can be determined by whether the remaining read / write command number field of the access holding circuit entry 1011 is 1.
[0019] Next, the page control circuit 103 will be described. The page control circuit 103 can refer to all memory access requests stored in the access retention circuit 101. Inputs to the page control circuit 103 are the memory access requests stored in the access retention circuit 101 and the bank states output by the bank state management circuit 104. The page control circuit 103 generates a page control command such as an active command or a precharge command based on the memory access requests stored in the access retention circuit 101 and the bank states output by the bank state management circuit 104. Then, the page control circuit 103 outputs the generated page control command to the command selector 105.
[0020] Next, the bank state management circuit 104 will be described. The bank state management circuit 104 updates the bank state based on the command issuance state input from the command selector 105. The command issuance state includes the type of command issued to the DRAM 110, and information about the memory, bank, and page to which the command was issued. The bank state includes whether a page is open for each bank constituting the DRAM 110, and the address of the open page.
[0021] Finally, the command selector 105 will be described. The command selector 105 selects one of the read / write command input from the read / write control circuit 102 and the page control command input from the page control circuit 103, and issues the selected command to the DRAM 110. Although not described in this embodiment, a refresh command or the like may also be selected. The command selector 105 also outputs the command type of the command issued to the DRAM 110 and the command issuance status consisting of the memory, bank, and page to which the command was issued, to the read / write control circuit 102 and the bank status management circuit 104.
[0022] 3 is a configuration diagram of the read / write control circuit 102 in this embodiment. The read / write control circuit 102 includes a page open determination circuit 1051, a priority access type determination circuit 1052, a memory switching determination circuit 1053, a memory access request selection circuit 1054, a timer 1055, and a timer 1056. The timer 1055 corresponds to memory 0 of the multiple DRAMs 110, and the timer 1056 corresponds to memory 1.
[0023] The page open determination circuit 1051 determines, based on the bank state, whether or not the target bank of the target memory has the target page open for each memory access request stored in the access holding circuit 101. The page open determination circuit 1051 outputs only memory access requests whose target page is open among the memory access requests stored in the access holding circuit 101 to the priority access type determination circuit 1052, and masks the other memory access requests.
[0024] The priority access type determination circuit 1052 determines whether the access type of each memory access request output by the page open determination circuit 1051 corresponds to the priority access type. The priority access type is generated by the priority access type determination circuit 1052 based on the memory access request and bank status stored in the access holding circuit 101, and indicates whether a read command or a write command is to be issued with priority during the period. The priority access type determination circuit 1052 outputs only memory access requests that correspond to the priority access type among the memory access requests output by the page open determination circuit 1051 to the memory switching determination circuit 1053, and masks the other memory access requests.
[0025] When the command issuance status output from the command selector 105 indicates the issuance of a read command to a memory other than memory 0, the timer 1055 sets a period during which a read command cannot be issued to a different memory after the issuance of a read command to a memory. Furthermore, when the command issuance status output from the command selector 105 indicates the issuance of a write command to a memory other than memory 0, the timer 1055 sets a period during which a write command cannot be issued to a different memory after the issuance of a write command to a memory. Unless the timer is set, the value of the timer 1055 is decremented over time and stops at 0. In this embodiment, the timer is set to a period during which a read command or write command cannot be issued to a different memory after the issuance of a read command or write command to a memory, but this is not limited to this. The period during which a read command or write command cannot be issued to a different memory after the issuance of a read command or write command to a memory may be increased or decreased, thereby adjusting the relationship between the frequency of memory switching and the waiting time for memory access requests.
[0026] The timer 1056 sets the timer when the command issued from the command selector 105 is a read command or a write command to a memory other than the memory 1, and otherwise decrements the timer as time passes. Other behavior is the same as that of the timer 1055.
[0027] The memory switching determination circuit 1053 determines whether or not a timing constraint wait is required for memory switching for each memory access request output by the priority access type determination circuit 1052. Whether or not a timing constraint wait is required for memory switching for a memory access request can be determined by whether or not the value of a timer corresponding to the target memory of the memory access request is other than 0. If the target memory of the memory access request is memory 0, the memory switching determination circuit 1053 references the value of the timer 1055 for memory 0. If the target memory of the memory access request is memory 1, the memory switching determination circuit 1053 references the value of the timer 1056 for memory 1. Of the memory access requests output by the priority access type determination circuit 1052, the memory switching determination circuit 1053 outputs to the memory access request selection circuit 1054 only those memory access requests that do not result in a command issuance wait due to memory switching. Then, the memory access requests that result in a command issuance wait are masked.
[0028] The memory access request selection circuit 1054 selects an arbitrary memory access request from the memory access requests output by the memory switching determination circuit 1053. Then, the memory access request selection circuit 1054 generates a read command or a write command for the selected memory access request and outputs it to the command selector 105.
[0029] <Operation> 4 and 5 are diagrams showing an example of operation of memory access request selection in this embodiment. These operation examples are based on the premise that the priority access type is read, and that the target bank of the target memory has the target page open for the memory access request held in the access holding circuit 101. The timing constraints and the states of the memory access requests held in the access holding circuit 101 are shown in the diagrams. For example, the timing constraint is tCCD=2 cycles, and the period during which a read command cannot be issued to a different memory is 6 cycles. For ease of explanation, each memory access request held in the access holding circuit 101 is assigned an identifier, such as memory access request 0 to 2.
[0030] 4 is a diagram showing an operational example 1 of memory access request selection in this embodiment. At time T1, the access holding circuit 101 holds memory access request 0 (access type: READ, target memory: 0, number of remaining read / write commands: 2) and memory access request 1 (access type: READ, target memory: 1, number of remaining read / write commands: 1). At T1, the read / write control circuit 102 can select either memory access request 0 or memory access request 1, but in this operational example, it issues a read command for memory access request 0, which was received first. As a result, the timer 1056 for memory 1 sets a period during which a read command cannot be issued to a different memory after a read command has been issued to a certain memory, and starts decrementing.
[0031] At time T3, the access holding circuit 101 holds memory access request 0 (access type: READ, target memory: 0, number of remaining read / write commands: 1) and memory access request 1 (access type: READ, target memory: 1, number of remaining read / write commands: 1). At T3, the value of the timer 1056 for memory 1 is 5, which is not 0, so memory access request 1 is masked and the read / write control circuit 102 selects memory access request 0.
[0032] At times T4 and T5, the access holding circuit 101 holds only memory access request 1 (access type: READ, target memory: 1, number of remaining read / write commands: 1). However, the value of the timer 1056 is 6 (T4) and 5 (T5), and since the value is not 0, memory access request 1 is masked, and therefore the read / write control circuit 102 does not select the memory access request.
[0033] At time T6, the access holding circuit 101 holds memory access request 1 (access type: READ, target memory: 1, number of remaining read / write commands: 1) and memory access request 21 (access type: READ, target memory: 0, number of remaining read / write commands: 2). That is, at T6, memory access request 2 to memory 0 is stored in the access holding circuit 101. The value of the timer 1056 is 4 (T6), and since the value is not 0, memory access request 1 is masked, and the read / write control circuit 102 selects memory access request 2. Then, at T15, after a predetermined period (6 cycles) during which it is no longer possible to issue a read command to a different memory has elapsed, the value of the timer 1056 becomes 0, the masking of memory access request 1 is released, and the read / write control circuit 102 selects memory access request 1.
[0034] 5 is a diagram showing an operation example 2 of memory access request selection in this embodiment. This is different from operation example 1 in that memory access request 2 to memory 0 is not stored in the access holding circuit 101 at T6.
[0035] At T1, the read / write control circuit 102 can select either memory access request 0 or memory access request 1, but in this operation example, it issues a read command for the previously received memory access request 0. As a result, the timer 1056 for memory 1 sets a period during which a read command cannot be issued to a different memory after a read command to a certain memory has been issued, and starts decrementing.
[0036] At T3, the value of the timer 1056 is 5, and since the value is not 0, memory access request 1 is masked, and the read / write control circuit 102 selects memory access request 0. From T4 to T9, only memory access request 1 is held in the access holding circuit 101. However, since the timer 1056 is not 0, memory access request 1 is masked, and the read / write control circuit 102 does not select the memory access request. Then, at T10, after a predetermined period (6 cycles) from T4 to T9 during which it is not possible to issue a read command to a different memory has passed, the value of the timer 1056 becomes 0, the masking of memory access request 1 is released, and the read / write control circuit 102 selects memory access request 1.
[0037] 4 and 5, the embodiment has been described using a read command as an example, but the same applies to a write command. For example, in the above example, the timer sets a period during which a read command cannot be issued to a different memory after a read command is issued, and then starts decrementing. Similarly, the timer may set a period during which a write command cannot be issued to a different memory after a write command is issued, and then start decrementing.
[0038] As explained above, even if there are no more memory access requests to the memory for which the read / write command was issued immediately before, the system is configured not to select a memory access request that requires waiting for command issuance due to memory switching, thereby making it possible to suppress a decrease in memory utilization efficiency.
[0039] The disclosure of this specification includes the following memory controller, memory controller control method, and program.
[0040] (Item 1) A memory controller that issues commands to access multiple memories that share a data signal, a holding circuit for holding a read and / or write access request; a control circuit that selects an arbitrary access request from the access requests held in the holding circuit and issues a read command and / or a write command; The control circuit controls the memory controller so that, among the access requests held in the holding circuit, access requests to a memory other than the memory to which the immediately preceding read command and / or write command was issued are not selected for a predetermined period of time after the issuance of the immediately preceding read command and / or write command.
[0041] (Item 2) The memory controller described in item 1 is characterized in that the specified period is a specified period during which, if a read command has been issued immediately before, a read command cannot be issued to a memory other than the memory to which the immediately preceding read command was issued.
[0042] (Item 3) The memory controller described in item 1 or 2, characterized in that the specified period is a specified period during which, if a write command has been issued immediately before, a write command cannot be issued to a memory other than the memory to which the immediately preceding write command was issued.
[0043] (Item 4) The memory controller described in any one of items 1 to 3 is characterized in that the control circuit selects an access request based on a priority access type that indicates whether a read command or a write command should be issued first.
[0044] (Item 5) The memory controller described in any one of items 1 to 4 is characterized in that it further comprises a first determination circuit that determines whether a target bank of a target memory has a target page open for each memory access request stored in the holding circuit, and outputs a memory access request in which the target page is open.
[0045] (Item 6) The memory controller described in item 5 is characterized in that it further comprises a second determination circuit that outputs a memory access request corresponding to a priority access type that indicates whether a read command or a write command is to be issued preferentially among the memory access requests output by the first determination circuit.
[0046] (Item 7) The memory controller according to item 6, further comprising a third determination circuit that outputs a memory access request, among the memory access requests output by the second determination circuit, that does not result in a command issuance wait due to memory switching.
[0047] (Item 8) The memory controller described in item 7 further comprises a request selection circuit that selects an arbitrary memory access request from the memory access requests output by the third determination circuit, and generates and outputs a read command or a write command for the selected memory access request.
[0048] (Item 9) The memory controller described in any one of items 1 to 8 is characterized in that, after the predetermined period has elapsed, the control circuit can select an access request to a memory other than the memory to which the read command and / or write command was issued immediately before.
[0049] (Item 10) 10. The memory controller according to any one of items 1 to 9, further comprising a timer that sets a period during which a read command cannot be issued to a different memory after the read command is issued and starts decrementing.
[0050] (Item 11) 11. The memory controller according to any one of items 1 to 10, further comprising a timer that sets a period during which a write command cannot be issued to a different memory after the write command is issued and starts decrementing.
[0051] (Item 12) A control method for a memory controller that issues commands to access multiple memories that share a data signal, the memory controller comprising: a holding circuit that holds read and / or write access requests; and a control circuit that selects an arbitrary access request from the access requests held in the holding circuit and issues a read command and / or a write command, the control method comprising: A control method for a memory controller, comprising a step of controlling so that access requests held in the holding circuit to a memory other than the memory to which the immediately preceding read command and / or write command was issued are not selected for a predetermined period of time after the issuance of the immediately preceding read command and / or write command.
[0052] (Item 13) A program for causing a computer to function as the memory controller according to any one of items 1 to 11.
[0053] (Other embodiments) The present invention can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program.The present invention can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.
[0054] The invention is not limited to the above-described embodiments, and various changes and modifications can be made without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]
[0055] 100: Memory controller, 101: Access holding circuit, 102: Read / write control circuit, 103: Page control circuit, 104: Bank state management circuit, 105: Command selector, 110: DRAM, 120: Bus master, 1011: Access holding circuit entry, 1051: Page open determination circuit, 1052: Priority access type determination circuit, 1053: Memory switching determination circuit, 1054: Memory access request selection circuit, 1055: Timer (for memory 0), 1056: Timer (for memory 1)
Claims
1. A memory controller that issues commands to access multiple memories that share a data signal, a holding circuit for holding a read and / or write access request; a control circuit that selects an arbitrary access request from the access requests held in the holding circuit and issues a read command and / or a write command; The control circuit controls access requests held in the holding circuit not to select access requests to a memory other than the memory to which the most recent read command and / or write command was issued for a predetermined period of time after the issuance of the most recent read command and / or write command.
2. 2. The memory controller according to claim 1, wherein the predetermined period is a period during which, if a read command has been issued immediately before, a read command cannot be issued to a memory other than the memory to which the immediately preceding read command was issued.
3. 2. The memory controller according to claim 1, wherein the specified period is a specified period during which, if a write command has been issued immediately before, a write command cannot be issued to a memory other than the memory to which the immediately preceding write command was issued.
4. 2. The memory controller according to claim 1, wherein the control circuit selects an access request based on a priority access type indicating whether a read command or a write command is to be issued with priority.
5. 2. The memory controller according to claim 1, further comprising a first determination circuit that determines, for each memory access request stored in the holding circuit, whether a target bank of a target memory has a target page open, and outputs a memory access request in which the target page is open.
6. 6. The memory controller according to claim 5, further comprising a second determination circuit that outputs a memory access request corresponding to a priority access type that indicates whether a read command or a write command is to be issued with priority among the memory access requests output by the first determination circuit.
7. 7. The memory controller according to claim 6, further comprising a third determination circuit that outputs a memory access request that does not cause a command issuance wait due to memory switching, among the memory access requests output by the second determination circuit.
8. 8. The memory controller according to claim 7, further comprising a request selection circuit that selects an arbitrary memory access request from the memory access requests output by the third determination circuit, and generates and outputs a read command or a write command for the selected memory access request.
9. 2. The memory controller according to claim 1, wherein, after the predetermined period has elapsed, the control circuit is capable of selecting an access request to a memory other than the memory to which the read command and / or write command was issued immediately before.
10. 2. The memory controller according to claim 1, further comprising a timer that sets a period during which a read command cannot be issued to a different memory after the read command is issued, and starts decrementing the period.
11. 2. The memory controller according to claim 1, further comprising a timer that sets a period during which a write command cannot be issued to a different memory after the write command is issued, and starts decrementing the period.
12. A control method for a memory controller that issues commands to access a plurality of memories that share a data signal, the memory controller comprising: a holding circuit that holds read and / or write access requests; and a control circuit that selects an arbitrary access request from the access requests held in the holding circuit and issues a read command and / or a write command, the control method comprising the steps of: A control method for a memory controller, comprising a step of controlling so that access requests held in the holding circuit, to a memory other than the memory to which a read command and / or write command was issued immediately before, are not selected for a predetermined period of time after the issuance of the immediately preceding read command and / or write command.
13. A program for causing a computer to function as the memory controller according to any one of claims 1 to 11.
Citation Information
Patent Citations
Memory controller, storage device, information processing system and control method therefor
JP2016095734A
Memory controller and control method thereof
JP2022118548A
Memory access control method
JP3235578B2
