Memory control device and memory control method
The memory control device optimizes DRAM access by prioritizing refresh operations based on command attributes, addressing inefficiencies in existing DRAM refresh control methods to maintain high-priority memory access performance.
Patent Information
- Application Number
- JP2023066619
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2024-10-25
AI Technical Summary
Existing DRAM refresh control methods do not consider memory access prioritization, leading to situations where high-priority memory accesses are delayed due to coinciding with refresh operations, potentially failing to meet latency requirements.
A memory control device that generates and manages DRAM commands and refresh requests, prioritizing bank-specific refreshes based on access command attributes such as priority and dependency, ensuring efficient memory access by avoiding conflicts between refresh and high-priority operations.
Enhances memory access efficiency by minimizing performance degradation from refresh operations, particularly for high-priority memory accesses, by strategically scheduling refreshes to align with lower-priority or non-dependent operations.
Smart Images

Figure 2024152432000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a memory control device and a memory control method. [Background technology]
[0002] DRAM (Dynamic Random Access Memory) is widely used as the main memory device in computer systems. As computer systems become faster and more sophisticated, the demand for DRAM access performance continues to grow, and DRAMs that operate at higher speeds are being developed. However, DRAMs are memory devices that require refreshing (memory retention operation) to continue to hold data. In DRAMs up to the DDR2 standard, all banks were refreshed simultaneously on a regular basis, and memory access was prohibited during the refresh, which was one of the causes of reduced memory access performance.
[0003] In order to suppress the degradation of memory access performance due to refresh, the LPDDR2 standard added a function to refresh on a bank-by-bank basis of DRAM. Also, the LPDDR4 standard added a function to specify a refresh bank in the bank-by-bank refresh. Patent Document 1 discloses a configuration in which a memory controller that controls a memory having multiple banks selects a bank according to the state of memory access to the bank and performs refresh. According to Patent Document 1, the degradation of memory access efficiency due to refresh is reduced or prevented. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent Publication No. 2021-047829 Summary of the Invention [Problem to be solved by the invention]
[0005] The refresh control method disclosed in Patent Document 1 does not consider memory accesses prioritized by an initiator. Therefore, there may be cases where a bank of a memory access that should be executed with priority over other memory accesses coincides with a bank that needs to be refreshed. As a result, the memory access that should be executed with priority may be kept waiting, and latency requirements may not be met.
[0006] The present invention has been made in view of the above problems, and has an object to provide a technique for controlling the issuance of refresh requests so as to enable more efficient memory access. [Means for solving the problem]
[0007] In order to solve the above problems, a memory control device according to one aspect of the present invention has the following configuration: A memory control device for controlling access to a DRAM having a plurality of banks, comprising: a first generating means for generating an access command from an access request to the DRAM and storing the access command in a buffer; a second generating means for generating a bank-specific refresh request for the DRAM; an issuing means for issuing a DRAM command to the DRAM based on the access command stored in the buffer and the refresh request generated by the second generating means; The second generating means determines a bank to which the refresh request is to be made from among the remaining banks excluding a bank selected based on attribute information attached to the access request from the plurality of banks. Effect of the Invention
[0008] According to the present invention, the issuance of refresh requests is controlled so as to enable more efficient memory access. [Brief description of the drawings]
[0009] [Figure 1] FIG. 2 is a diagram for explaining refresh issuance for a DRAM. [Diagram 2] FIG. 13 is a diagram for explaining a bank-specified refresh; [Diagram 3] 1 is a diagram showing a configuration of a DRAM control device according to the present invention; [Figure 4] FIG. 13 is a diagram illustrating an example of an access command. [Diagram 5] FIG. 13 is a diagram for explaining constraints on bank-specified refresh. [Figure 6] FIG. 13 illustrates an example of a refresh management table. [Figure 7] FIG. 13 is a diagram illustrating a refresh status counter. [Figure 8] 13 is a flowchart of generating a refresh request. [Figure 9] 4A to 4C are diagrams illustrating a method for determining a refresh candidate according to the first embodiment. [Figure 10] 13 is a flowchart of control of the issuance order of access commands. [Figure 11] 13A and 13B are diagrams illustrating a method for determining refresh candidates according to the second embodiment. [Figure 12] FIG. 13 is a diagram illustrating a method for determining a refresh candidate according to the third embodiment. [Figure 13] FIG. 13 is a diagram illustrating a configuration of a DRAM control device according to a fourth embodiment. [Figure 14] FIG. 13 is a diagram illustrating a method for determining a refresh candidate according to the fourth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, the embodiments will be described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe a number of features, not all of these features are essential to the invention, and the features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicated descriptions are omitted.
[0011] First Embodiment In the following embodiments, a DRAM control device that controls access to a DRAM conforming to the LPDDR4 standard will be described as an example of a memory control device.
[0012] <DRAMのリフレッシュ> First, the refresh operation required for DRAM to continue to hold data will be described. Figure 1 is a diagram for explaining the issuance of refresh for DRAM.
[0013] DRAM can retain data by refreshing once at the average refresh interval defined in the specifications, such as average refresh issuance 100. DRAM refresh and memory access use a common command signal. In addition, there are many timing constraints on issuing commands other than refresh, so it is difficult to always refresh at the average refresh interval.
[0014] The DRAM also allows refreshes to be issued earlier than the average refresh issuance timing, as in refresh advance issuance 101. It also allows refreshes to be issued later than the average refresh issuance timing, as in refresh delayed issuance 102. The number of refreshes that may be issued earlier and the number of refreshes that may be issued later are determined by the specifications, and the DRAM control device can change the refresh issuance timing within this allowable range.
[0015] FIG. 2 is a diagram for explaining a bank-specified refresh. FIG. 2(A) shows a refresh that specifies bank 0. In a bank-specified refresh, while the specified bank is being refreshed, other banks can perform memory access for read and write operations. On the other hand, as shown in FIG. 2(B), memory access to a bank that is being refreshed is not possible. Therefore, when a memory access request occurs to a refresh bank, the memory access must wait for the completion of the refresh before proceeding (arrow 200). In this way, a bank-specified refresh allows memory access to another bank while a certain bank is being refreshed. However, in order to utilize the memory bandwidth more efficiently, it is necessary to control the refresh and memory access banks so that they do not overlap.
[0016] <Device configuration> 3 is a diagram showing an example of the configuration of a DRAM control device according to the first embodiment. A DRAM control device 300 issues a DRAM command to a DRAM 301 in response to a memory access request issued by an initiator (not shown).
[0017] A bus interface (hereinafter, bus I / F) 302 receives a memory access request issued by an initiator, converts the request into an access command in row address units that designates an area called a page of the DRAM 301, and transmits the request to a command storage unit 303. The command storage unit 303 has a buffer that holds a plurality of access commands generated by the bus I / F 302. When an access command is stored in the buffer, the command storage unit 303 notifies the command issuing unit 304 that command transmission is ready, and transmits the access command to the command issuing unit 304 in response to a response from the command issuing unit 304. Note that the order of received memory access requests may be changed in order to improve the efficiency of DRAM access and to realize memory access requests according to the urgency of the request. The change may also be realized by changing the order in which the access commands are stored in the buffer.
[0018] Priority information determination unit 305 monitors priority information of access commands stored in command storage unit 303, and notifies refresh generation unit 307 of the priority information. The priority information of access commands will be described later with reference to FIG. 4. Refresh timer 306 is a timer that counts the lapse of an average refresh period, and notifies refresh generation unit 307 of the lapse of the average refresh period. Based on information received from priority information determination unit 305 and refresh timer 306, refresh generation unit 307 generates a bank-specified refresh request, and notifies command issue unit 304 of the request.
[0019] The command issuing unit 304 generates a DRAM access command for accessing the DRAM 301 from the access command in row address units received from the command storage unit 303. The command issuing unit 304 also generates a refresh command for refreshing the DRAM 301 in response to a refresh request in bank units generated by the refresh generating unit 307. The command issuing unit 304 also adjusts the timing of issuing the DRAM access command and the refresh command, and issues a DRAM command (access command or refresh command) to the DRAM 301.
[0020] FIG. 4 is a diagram showing an example of an access command in row address units stored in the command storage unit 303. The access command includes an access type 401, a bank 402, a row address 403, a column address 404, a transfer length 405, a transfer ID 406, and a priority value 407. The access type 401 indicates whether the type of the access command is read or write. The bank 402 indicates a bank to be accessed by the access command. The row address 403 and the column address 404 indicate a row address and a column address to be accessed by the access command. In the following, the row address 403 and the column address 404 are collectively referred to as address information. The transfer length 405 indicates the length of data to be read from the DRAM 301 or written to the DRAM 301 by memory access, and is also called a burst length. Generally, 16 bursts (2 bytes per burst) are transferred per one access command. Therefore, if the transfer length 405 is "16", it indicates that 16 bursts are transferred, and if it is "64", it indicates that 64 bursts are transferred.
[0021] The transfer ID 406 and the priority value 407 are information added when an initiator (not shown) issues a memory access request. For example, when an initiator executes multiple tasks and issues memory access for each task, adding a different transfer ID for each task makes it possible to recognize the relationship between the memory access and the task. The command storage unit 303 stores access commands in row address units generated by the bus I / F 302. The priority value 407 indicates the priority of the memory access request by a numerical value such as 1, 2, 3, etc. In this example, the higher the numerical value, the higher the priority.
[0022] <Device Operation> FIG. 5 is a diagram explaining the constraints of bank-specified refresh in LPDDR4. Although LPDDR4 allows bank-specified refresh, there are constraints on the order of banks to be specified. In LPDDR4, the bank to be refreshed can be specified, but each bank must be refreshed evenly. Therefore, there is a constraint that each bank cannot issue a second refresh unless all banks are refreshed once. In an 8-bank DRAM, when focusing on a certain bank, the shortest time that the same bank can be refreshed is two consecutive times (timing 500). However, if the same bank is refreshed twice consecutively in this way, the next refresh will be eight times later (timing 501) at the earliest.
[0023] FIG. 6 is a diagram showing an example of a refresh management table. The refresh management table is used to satisfy the constraints of the above-mentioned LPDDR4 bank-specified refresh. As shown in FIG. 6, when a refresh is issued for a certain bank, the flag of the bank is set (flag=1), and the next refresh bank is selected from the banks whose flags are not set (flag=0). Note that when a refresh is issued to all banks and the flags of all banks are set (flag=1), the flags of all banks are reset, and a refresh can be issued to all banks.
[0024] FIG. 7 is a diagram for explaining the refresh state counter possessed by the refresh generator 307. The refresh state counter is a counter for detecting whether the refresh issuance status for the DRAM is an advanced refresh state or a delayed refresh state. The horizontal axis of FIG. 7 indicates the passage of time toward the right. As time passes, an up arrow indicates the timing when a refresh command is issued to the DRAM 301, and a down arrow indicates the timing when the periodic time for issuing a refresh has elapsed. The vertical axis of FIG. 7 indicates the manner in which the count value of the refresh state counter changes over time. The refresh state counter is configured to count up when a refresh command is issued to the DRAM, and count down when the refresh period has elapsed. Therefore, when the counter value indicates a positive value, it is in an advanced refresh state, and when the counter value indicates a negative value, it is in a delayed refresh state.
[0025] 8 is a flowchart showing a process of generating a refresh request executed by the refresh request generator 307. In order to select a bank to be refreshed without degrading the performance of memory access, the refresh generator 307 narrows down the banks that are candidates for the refresh target by referring to the attribute information attached to the memory access. In the processing example described below, the refresh generator 307 obtains the number of commands for each bank based on the access command stored in the command storage unit 303, and selects a bank as a refresh candidate based on the obtained number of commands. Then, the refresh generator 307 further narrows down the refresh candidates based on the attribute information (e.g., a priority value) attached to the access command.
[0026] In S800, the refresh generation unit 307 judges whether the number of advance refreshes is equal to or greater than a predetermined number, and if it is equal to or greater than the predetermined number, repeats the judgment. If the number of advance refreshes falls below the predetermined number, the process proceeds to S801. This is because the DRAM specifications stipulate that the number of advance refreshes must be less than a predetermined number, and if the number of advance refreshes is equal to or greater than the predetermined number, it is necessary to stop the refresh. As described above, the refresh generation unit 307 recognizes whether the current refresh issuance status is an advance refresh state or a delayed refresh state, based on the refresh state counter. If the counter value of the refresh state counter is a positive value, the counter value is used as the number of advance refreshes.
[0027] S801 to S803 are an example of a process for the refresh generator 307 to determine a refresh candidate. In S801, the refresh generator 307 selects a bank (refresh candidate) to be refreshed based on the number of DRAM commands for each bank, and determines the priority order. More specifically, the refresh generator 307 calculates the total number of commands for each bank from the address information and transfer length information of the access command stored in the command storage unit 303. The number of commands is a number obtained by considering the transfer length of the access command, and will be described in detail later. The refresh generator 307 selects a bank as a refresh candidate based on the number of commands obtained from this calculation, and determines the priority order. The selection of the refresh candidate and the determination of the priority order based on the number of commands will be described later with reference to FIG. 9.
[0028] In S802, the refresh generation unit 307 determines a refresh excluded bank from among the banks (banks with priority levels) selected as refresh candidates in S801 based on the priority value of the access command. The priority value is as described in Fig. 4, and is obtained by the priority information determination unit 305 and notified to the refresh generation unit 307. In this embodiment, an example will be described in which a bank accessed by an access command with a priority level of 2 or more is set as a refresh excluded bank.
[0029] In S803, the refresh generation unit 307 determines refresh candidates. More specifically, the refresh generation unit 307 determines the remaining banks, excluding the banks determined as refresh excluded banks in S802, from among the refresh candidates (banks with priority order) selected in S801, as refresh candidates. The refresh generation unit 307 sets priorities for the determined refresh candidate banks according to the priorities determined in S801. In this way, the refresh generation unit 307 determines refresh candidates based on the total number of read commands and write commands for each bank, the total number of read commands and write commands for banks other than the target bank, and the priority value. A specific example of the above processes in S801 to S803 will be described later with reference to FIG. 9.
[0030] In S804, the refresh generation unit 307 determines whether or not there is a refresh candidate. If it is determined that there is a refresh candidate (YES in S804), the process proceeds to S808. On the other hand, if it is determined that there is no refresh candidate (NO in S804), the process proceeds to S805 because it is necessary to wait for a refresh to be issued or to determine whether or not to issue a refresh.
[0031] In S805, the refresh generation unit 307 determines whether the number of delayed refreshes is equal to or greater than a predetermined number by referring to the refresh state counter. This is because the number of delayed refreshes is determined by the DRAM specifications. If the counter value of the refresh state counter is a negative value, the counter value is used as the number of delayed refreshes. If it is determined that the number of delayed refreshes is equal to or greater than the predetermined number (YES in S805), the process proceeds to S806. On the other hand, if it is determined that the number of delayed refreshes is less than the predetermined number (NO in S805), there is no need to rush the issuance of a refresh command, so the refresh generation unit 307 ends the process without generating a refresh request.
[0032] In S806, the refresh generation unit 307 determines a refresh bank. The refresh generation unit 307 checks the refresh management table described in FIG. 6, selects one bank from among the banks whose flags are not set (flag=0), and determines it as the refresh bank. In S807, the refresh generation unit 307 generates a refresh request for the refresh bank, notifies the command issue unit 304 of this, and waits for a response from the command issue unit 304. When the command issue unit 304 accepts the refresh request, it notifies the refresh generation unit 307 of the response to the refresh request, and issues a refresh command for the refresh bank. The refresh generation unit 307 ends this process in response to the notification of the response from the command issue unit 304.
[0033] In S808, the refresh generation unit 307 judges whether the refresh candidates are refreshable. That is, the refresh generation unit 307 checks the refresh management table described in FIG. 6, and judges that the refresh candidates of the banks in which the flag is not set (flag=0) among the refresh candidates determined in S803 are refreshable. If there is one or more refresh candidates judged to be refreshable (YES in S808), the process proceeds to S809. On the other hand, if there is no refresh candidate judged to be refreshable, that is, if it is judged that refresh is not possible for all refresh candidates (NO in S808), the process proceeds to S805 to judge whether it is necessary to issue a delayed refresh. The process from S805 onwards is as described above.
[0034] In S809, the refresh generation unit 307 determines a refresh bank to be refreshed from among the refresh candidates determined to be refreshable in S808. For example, the refresh candidate with the highest priority assigned to the refresh candidates may be determined as the refresh bank. In S810, the refresh generation unit 307 generates a refresh request for the refresh bank determined in S809, notifies the command issue unit 304, and waits for a response from the command issue unit 304. The process of S810 is the same as that of S807. When the refresh generation unit 307 receives a response from the command issue unit 304, it ends this process.
[0035] FIG. 9 is a diagram for explaining a specific example of a method of determining refresh candidates by the refresh generation unit 307 (processing of S801 to S803). The refresh generation unit 307 calculates, for each bank, a total number 902 of read commands and write commands from address information and transfer length information of the access command stored in the command storage unit 303. In addition, the refresh generation unit 307 calculates, for each bank, a total number 903 of read commands and write commands of other banks. For example, in the example of FIG. 9, the total number 902 of read commands and write commands accessing bank 0 is "5", and the total number 903 of read commands and write commands accessing other banks (other than bank 0 (i.e., banks 1 to 7)) is "54". The total number 902 and the total number 903 are the total numbers of read and write commands, and the transfer length of the access command is reflected in the number of commands. In this embodiment, one access command has 16 bursts (2 bytes / burst), and for example, one access command with a transfer length of 64 bursts is counted as four commands (64 / 16=4). That is, an access command with a transfer length of 16 has one command count, and an access command with a transfer length of 64 has four commands. The command count corresponds to the time required to execute the access command.
[0036] The refresh generation unit 307 selects a refresh candidate and determines a priority order 904 based on the total number 903. In this embodiment, a bank whose total number 903 is equal to or greater than a predetermined number is selected as a refresh candidate. For example, assume that the number of read commands and write commands that can be issued to other banks in parallel during the execution of a refresh of a certain bank is N. In this case, if a bank whose total number 903 of read commands and write commands to other banks is equal to or greater than N is selected as a refresh bank, it becomes possible to issue read commands and write commands to other banks in parallel with the refresh. In other words, it is possible to suppress the deterioration of memory access performance due to the refresh. Therefore, a bank whose total number 903 of read commands and write commands to other banks is equal to or greater than N is selected as a refresh candidate. In this example, the predetermined number N=50, and a bank whose total number 903 of commands to other banks is equal to or greater than "50" is selected as a refresh candidate.
[0037] Furthermore, the refresh candidates (banks whose total number of commands to other banks 903 is "N=50" or more) are assigned priority 904 in descending order of the total number of commands to other banks 903. In the example of FIG. 9, among the refresh candidates, "bank 2" which has the largest total number of commands to other banks 903 has the highest priority. Among the refresh candidates, "bank 3" which has the smallest total number 903 has the lowest priority. Note that banks 1, 4, and 7 whose total number 903 is less than "50" are not selected as refresh candidates, and no priority 904 is assigned to these banks. This is because if these banks are refreshed, all read commands and write commands that can be issued to other banks will be issued during the refresh, and it may become impossible to issue read commands and write commands until the refresh is completed.
[0038] On the other hand, the priority information determination unit 305 checks the priority values in the command storage unit 303, and notifies the refresh generation unit 307 of the priority value of the access command for each bank. The refresh generation unit 307 holds the priority value notified by the priority information determination unit 305 as the priority value 901. Note that the priority value 901 for bank 0 is "1, 3" because the commands for bank 0 include a command with a priority value of 1 and a command with a priority value of 3. Note that the priority information determination unit 305 may notify the refresh generation unit 307 of only the maximum priority value of the access commands for each bank. In that case, in the priority value 901 in FIG. 9, the priority value for bank 0 is "3" and the priority value for bank 7 is "1".
[0039] The refresh generation unit 307 excludes from the refresh candidates any bank accessed by an access command having a priority value 901 equal to or greater than the threshold. In this example, an example will be described in which the priority value threshold for excluding banks from refresh candidates is set to "2". In the example of FIG. 9, banks 0 and 5 contain access commands with a priority value of 2 or greater. Therefore, banks 0 and 5 are excluded from the refresh candidates (excluded banks 905). Through the above process, the refresh generation unit 307 ultimately assigns the highest refresh priorities to "bank 2", "bank 6", and "bank 3" in that order, and sets these banks as the final refresh candidates (refresh priority 906).
[0040] When the buffer of command storage unit 303 becomes empty, there is no memory access, and therefore there is no need to consider degradation of memory access performance due to refresh, so all banks are made refresh candidates. Also, no degradation of memory access performance occurs no matter which of the three banks, bank 2, bank 3, and bank 5, a refresh is issued to. Therefore, it is not necessary to set refresh priority 906.
[0041] FIG. 10 is a flowchart of access command issue order control in the DRAM control device 300. The DRAM control device 300 can have a function of changing the order of received memory access requests (issue order control function). This issue order control function can be used for the purpose of improving the efficiency of DRAM access and for the purpose of realizing memory access requests according to the urgency. Therefore, in this embodiment, the control method of the issue order of memory access requests is switched depending on whether or not a bank-specified refresh is being executed. The process in FIG. 10 is started when the command issuing unit 304 is notified that an access command has been stored and when the state of the DRAM has changed due to the issuance of a DRAM command.
[0042] In S1000, command storage unit 303 determines whether a bank-specified refresh is being executed by monitoring the refresh request and response between refresh generation unit 307 and command issue unit 304. Of course, the method of determining whether a bank-specified refresh is being executed is not limited to this, and command storage unit 303 may determine whether a bank-specified refresh is being executed based on the state of command issue unit 304. If it is determined that a bank-specified refresh is being executed (YES in S1000), the process proceeds to S1001, and if it is determined that a bank-specified refresh is not being executed (NO in S1000), the process proceeds to S1002.
[0043] In S1001, the command storage unit 303 controls the access command issuing order control so that memory access requests to banks other than the refresh bank are given priority. For example, the command storage unit 303 controls so that memory access requests to a bank (refresh bank) undergoing refresh are not output to the command issuing unit 304. More specifically, the command storage unit 303 excludes access commands that target a bank undergoing refresh from the issue order control. In S1002, the command storage unit 303 controls the issue order of all memory access requests in the access command issuing order control. Note that, in the access command issuing order control, a memory access request that does not reduce memory access performance is given priority, but a memory access request with a high priority value may be given priority. Note that it is clear that the issue order control described with reference to FIG. 10 can also be applied to the following second to fourth embodiments.
[0044] As described above, according to the first embodiment, a bank is selected so as not to affect memory accesses with a priority value equal to or greater than a threshold, and a bank-specific refresh is performed. Also, the order of memory access requests is changed depending on the refresh execution status. This configuration enables more efficient memory access and makes it possible to suppress the degradation of performance of memory accesses with high priority values due to refresh.
[0045] <Second embodiment> In the first embodiment, the refresh generation unit 307 excludes banks accessed by access commands having a priority value equal to or greater than a threshold value from the refresh candidates to determine the bank to be refreshed. In the second embodiment, a configuration will be described in which the refresh generation unit 307 excludes banks accessed by an access command having the maximum priority value in the command storage unit 303 from the refresh candidates. The configuration of the DRAM control device 300 and the processing by the refresh generation unit 307 according to the second embodiment are the same as those in the first embodiment (FIGS. 3 and 8).
[0046] FIG. 11 is a diagram for explaining the refresh candidate determination process (S801 to S803, S809) of the refresh generator 307 according to the second embodiment. In the second embodiment, the refresh priority 904 is determined based on the total number 903 of read commands and write commands to other banks, as in the first embodiment. However, in the second embodiment, the bank that is the access target of the access command with the maximum value is excluded from the refresh candidates. Referring to the priority value 901 in the example of FIG. 11, the access command that accesses bank 0 includes an access command with the priority value 3, which is the maximum priority value. Therefore, as shown in the excluded bank 905, bank 0 is excluded from the refresh candidates. As a result, the refresh priority of "bank 2", which is not accessed by the access command with the maximum priority value, becomes the highest, followed by "bank 5", "bank 6", and "bank 3" in that order (refresh priority 906).
[0047] As described above, the priority value 901 of bank 0 in Fig. 11 is "2", and while it is a bank to be excluded in the first embodiment (Fig. 10), it is not a bank to be excluded in the second embodiment. Note that if there are multiple banks that include an access command with the highest priority value, those banks are excluded from the refresh candidates. For example, in Fig. 11, if the priority value 901 of bank 0 is "1, 2", banks 0 and 5 have the highest priority value (=2), and banks 0 and 5 are excluded from the refresh candidates.
[0048] As described above, according to the second embodiment, a bank-specified refresh is performed on a bank that does not affect the memory access with the highest priority value in the command storage unit 303. This configuration makes it possible to suppress a decrease in performance of the memory access with the highest priority value due to the refresh operation, enabling efficient memory access. Note that, as in the first embodiment, the refresh priority 906 may be omitted.
[0049] <Third embodiment> In the first and second embodiments, a method in which the refresh generation unit 307 determines a refresh candidate by using a priority value of an access command is described. In the third embodiment, a method in which the refresh generation unit 307 determines a refresh candidate by excluding a bank accessed by an access command having a specific transfer ID is described. The configuration of the DRAM control device 300 and the processing by the refresh generation unit 307 according to the third embodiment are similar to those of the first embodiment (FIGS. 3 and 8).
[0050] FIG. 12 is a diagram for explaining a method of determining refresh candidates (S801 to S803, S809) of the refresh generator 307 in the third embodiment. In the third embodiment, a case will be described in which a refresh is issued excluding a bank accessed by an access command with ID=1 as an example. In the third embodiment, the refresh priority 904 is determined based on the total number 903 of read commands and write commands to other banks, as in the first and second embodiments. Also, referring to the column of transfer ID 1201 in the example of FIG. 12, an access command with transfer ID=1 is included in bank 0. Therefore, the refresh generator 307 excludes bank 0 from the refresh candidates (excluded bank 905). Finally, the refresh priority 906 of "bank 2" which is not accessed by the access command with transfer ID=1 and has the highest refresh priority 904 calculated from the total number 903 of read commands and write commands to other banks becomes the highest. Thereafter, the refresh candidates are determined in the order of priority (refresh priority 906) of "bank 5", "bank 6" and "bank 3".
[0051] As described above, according to the third embodiment, the refresh generation unit 307 selects a bank that does not affect memory access having a specific transfer ID in the command storage unit 303, and performs a bank-specified refresh. That is, the refresh is executed so that memory access to a specific transfer destination is prioritized. Note that, although the third embodiment has been described with respect to a case where one type of transfer ID is excluded from the refresh candidates, it is clear that multiple types of transfer IDs may be excluded from the refresh candidates. Also, similar to the first embodiment, the refresh priority 906 may be omitted.
[0052] <Fourth embodiment> In the fourth embodiment, a method of determining a refresh candidate by the refresh generator 307 in the case where there is a dependency between access commands and an access command that is accessed before an access command having the maximum priority value exists will be described.
[0053] <Device configuration> 13 is a block diagram showing a configuration example of a DRAM control device according to the fourth embodiment. The same reference numbers are used for components having the same functions as those in the first embodiment (FIG. 3). A dependency determination unit 1301 monitors the access commands stored in the command storage unit 303, and notifies the refresh generation unit 307 of banks to be excluded from refresh candidates. It also notifies the command issue unit 304 of information on the access commands that are in a dependent relationship.
[0054] The dependency of the access commands will be described with reference to FIG. 4. In this embodiment, the access commands that need to maintain the access order are called the dependent access commands. First, an example of a method for identifying the dependent access commands will be described. FIG. 4 is a diagram showing an example of the access commands stored in the command storage unit 303 in row address units. A transfer ID is added to each access command. Therefore, it is possible to recognize the dependency of the access commands by analyzing the information stored in the command storage unit 303. For example, the access commands having the same transfer ID 406 may be determined as the dependent access commands (dotted line 409). In addition, the access commands having the same transfer ID 406 and access type 401 may be determined as the dependent access commands (dotted line 408). In this embodiment, a case will be described where the access commands having the same transfer ID 406 and access type 401 (access commands shown by the dotted line 408) are determined as the dependent access commands.
[0055] The command issuing unit 304 receives information about dependent access commands from the dependency determining unit 1301, and issues access commands so that the order of issuance of the dependent access commands is the order in which they were received.
[0056] FIG. 14 is a diagram for explaining a method of determining refresh candidates in the fourth embodiment (the processes of S801 to S803 and S809 in FIG. 8). The refresh generation unit 307 determines refresh priority 904 based on the total number 903 of read commands and write commands to other banks, as in the other embodiments. As in the second embodiment, the refresh generation unit 307 excludes a bank having an access command with the maximum priority value notified from the priority information determination unit 305 from the refresh candidates. In this example, bank 0 is excluded from the refresh candidates. Note that a bank with a priority value equal to or greater than a predetermined value may be excluded as in the first embodiment, or a bank having an access command with a specific transfer ID may be excluded as in the third embodiment.
[0057] The dependency determination unit 1301 checks the access type and transfer ID 1401 of the access command, identifies banks having access commands in a dependent relationship, and notifies the refresh generation unit 307. Since the dependent access commands need to be issued while maintaining the order in which they were received, the refresh generation unit 307 further determines excluded banks based on the notified dependency relationship.
[0058] In the example of FIG. 14, bank 0 and bank 5 include access commands with an access type of read and a transfer ID of 0, and the dependency determining unit 1301 determines that the access commands of bank 0 and bank 5 are dependent on each other. Also, referring to the access command reception order 1402, the access command to bank 5 is earlier. Therefore, when bank 0 having the highest priority value is determined as an excluded bank, the refresh generating unit 307 also excludes bank 5 having an access command that is dependent on the access command of bank 0 from the refresh candidates (excluded bank 905). Finally, "bank 2" which has no dependency and has the largest total number of read commands and write commands to other banks becomes the refresh candidate with the highest priority. Then, "bank 6" and "bank 3" are determined as refresh candidates (refresh priority 906). Note that in the example of FIG. 14, priority is given to the refresh candidates of bank 2, bank 3, and bank 6, but no degradation in memory access performance occurs regardless of which of these three banks is issued a refresh. Therefore, priority does not need to be given to the refresh candidates of bank 2, bank 3, and bank 6.
[0059] In the above, the process (second embodiment) of selecting a bank accessed by an access command having the maximum priority value as an excluded bank is used, but the present invention is not limited to this. For example, the process (first embodiment) of selecting a bank accessed by an access command having a priority value equal to or greater than a predetermined value as an excluded bank, or the process (third embodiment) of selecting a bank accessed by an access command having a predetermined transfer ID as an excluded bank may be used. In addition, the above takes into consideration the order of reception of the dependent access commands, but the present invention is not limited to this. For example, a bank having an access command that is dependent on the access command of the excluded bank selected based on the priority value may be excluded regardless of the order of reception of the dependent access commands. In addition, a further determination based on the dependent relationship is performed on the bank determined to be excluded based on the priority value, but the present invention is not limited to this. For example, all banks accessed by the dependent access commands may be added to the excluded banks selected by the methods of the first to third embodiments.
[0060] When the buffer of the command storage unit 303 becomes empty, there is no memory access, so there is no need to consider the degradation of memory access performance due to refresh, and all banks are candidates for refresh.
[0061] As described above, according to the fourth embodiment, banks accessed by access commands having a dependency relationship with an access command that accesses a bank excluded from the refresh candidates based on the priority value or the like are also excluded from the refresh candidates. For example, banks accessed by access commands that need to be issued earlier than an access command that accesses a bank excluded from the refresh candidates based on the priority value or the like are also excluded from the refresh candidates. In this way, by performing refresh while avoiding banks accessed by access commands having a dependency relationship, for example, the effect of refresh issuance on an access command with the highest priority value is reduced.
[0062] In this embodiment, the refresh candidate determination method has been described in which a refresh candidate is excluded from the refresh candidates, but a refresh candidate exclusion method other than this determination method can also be applied.
[0063] The disclosure of this specification includes the following memory control device and control method for the memory control device. (Item 1) A memory control device for controlling access to a DRAM having a plurality of banks, comprising: a first generating means for generating an access command from an access request to the DRAM and storing the access command in a buffer; a second generating means for generating a bank-specific refresh request for the DRAM; an issuing means for issuing a DRAM command to the DRAM based on the access command stored in the buffer and the refresh request generated by the second generating means; The memory control device is characterized in that the second generation means determines a bank to which the refresh request is to be made from among the remaining banks excluding a bank selected based on attribute information attached to the access request from the plurality of banks. (Item 2) The memory control device described in item 1, characterized in that the second generation means selects a refresh candidate bank based on the number of commands for each of the multiple banks, selects an excluded bank to be excluded from the refresh candidates based on the attribute information, and determines a bank to perform the refresh request from the remaining banks excluding the excluded bank from the refresh candidate banks. (Item 3) The memory control device according to item 2, characterized in that the second generation means selects, for each of the plurality of banks, a bank for which the total number of commands to banks other than the target bank is equal to or greater than a predetermined number as the refresh candidate bank. (Item 4) the attribute information includes information indicating a priority of an access request; 4. The memory control device according to item 2 or 3, wherein the second generating means determines the excluded bank based on the priority. (Item 5) The memory control device according to item 4, characterized in that the second generation means determines, as the excluded bank, a bank accessed by an access command stored in the buffer whose priority is equal to or higher than a threshold. (Item 6) 5. The memory control device according to item 4, wherein the second generation means determines the bank to be excluded from the list of access commands stored in the buffer that has the highest priority. (Item 7) the attribute information includes a transfer ID that indicates a task that uses data transferred by an access command; 4. The memory control device according to item 2 or 3, wherein the second generating means determines the excluded bank based on the transfer ID. (Item 8) The memory control device according to item 7, characterized in that the second generation means determines, as the excluded bank, a bank accessed by an access command stored in the buffer whose transfer ID is a predetermined value. (Item 9) The second generating means is Identifying access commands that need to maintain an issue order as dependent access commands based on the attribute information; 8. The memory control device according to any one of items 4 to 7, further excluding banks accessed by the access commands having the dependency relationship to determine the bank for which the refresh request is to be made. (Item 10) 10. The memory control device according to item 9, characterized in that when a first access command and a second access command issued prior to the first access command are in the dependent relationship and the first access command accesses the excluded bank, the second generation means also selects the bank accessed by the second access command as the excluded bank. (Item 11) The memory control device according to item 9 or 10, characterized in that the second generation means identifies a plurality of access commands that are of the same type for reading and writing and transfer data used for the same task as the set of dependent commands. (Item 12) a control unit for controlling an issuance order of the access commands stored in the buffer; 12. The memory control device according to any one of items 1 to 11, wherein the control means excludes access commands that access a bank undergoing refresh from the control of the issuance order. (Item 13) A memory control method for controlling access to a DRAM having a plurality of banks by a memory control device, comprising: a first generation step of generating an access command from an access request to the DRAM and storing the access command in a buffer; a second generating step of generating a bank-specific refresh request for the DRAM; an issuing step of issuing a DRAM command to the DRAM based on the access command stored in the buffer and the refresh request generated by the second generating step; A memory control method characterized in that in the second generation step, a bank to which the refresh request is to be made is determined from among the remaining banks excluding a bank selected based on attribute information attached to the access request from the plurality of banks.
[0064] The invention is not limited to the above-described embodiments, and various modifications and variations are possible 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]
[0065] 300 DRAM control device; 301 DRAM; 302 bus interface; 303 command storage unit; 304 command issuing unit; 305 priority information determination unit; 306 refresh timer; 307 refresh generation unit; 1301 dependency determination unit
Claims
1. A memory control device for controlling access to a DRAM having a plurality of banks, comprising: a first generating means for generating an access command from an access request to the DRAM and storing the access command in a buffer; a second generating means for generating a bank-specified refresh request for the DRAM; an issuing means for issuing a DRAM command to the DRAM based on the access command stored in the buffer and the refresh request generated by the second generating means, The memory control device is characterized in that the second generation means determines a bank to which the refresh request is to be made from among the remaining banks excluding a bank selected based on attribute information attached to the access request from the plurality of banks.
2. 2. The memory control device according to claim 1, wherein the second generation means selects a bank as a refresh candidate based on the number of commands for each of the plurality of banks, selects an excluded bank to be excluded from the refresh candidates based on the attribute information, and determines a bank to perform the refresh request from the remaining banks excluding the excluded bank from the refresh candidate banks.
3. 3. The memory control device according to claim 2, wherein the second generating means selects, for each of the plurality of banks, a bank for which a total number of commands to banks other than a target bank is equal to or greater than a predetermined number as the refresh candidate bank.
4. the attribute information includes information indicating a priority of an access request; 3. The memory control device according to claim 2, wherein said second generating means determines said excluded bank based on said priority.
5. 5. The memory control device according to claim 4, wherein the second generating means determines, as the excluded bank, a bank that is accessed by an access command having a priority equal to or higher than a threshold among the access commands stored in the buffer.
6. 5. The memory control device according to claim 4, wherein the second generating means determines, as the excluded bank, a bank accessed by an access command having the highest priority among the access commands stored in the buffer.
7. the attribute information includes a transfer ID that indicates a task that uses data transferred by an access command; 3. The memory control device according to claim 2, wherein said second generating means determines said excluded bank based on said transfer ID.
8. 8. The memory control device according to claim 7, wherein the second generating means determines, as the excluded bank, a bank accessed by an access command having a transfer ID of a predetermined value among the access commands stored in the buffer.
9. The second generating means is Identifying access commands that need to maintain an issue order as dependent access commands based on the attribute information; 5. The memory control device according to claim 4, further excluding banks accessed by the access commands having the dependent relationship to determine the bank for which the refresh request is to be made.
10. 10. The memory control device according to claim 9, wherein when a first access command and a second access command issued prior to the first access command are in the dependent relationship and the first access command accesses the excluded bank, the second generation means selects the bank accessed by the second access command as the excluded bank as well.
11. 10. The memory control device according to claim 9, wherein the second generating means identifies a plurality of access commands that are of the same type for read and write and transfer data used for the same task as the set of dependent commands.
12. a control unit for controlling an issuance order of the access commands stored in the buffer; 2. The memory control device according to claim 1, wherein said control means excludes from the control of the issuing order an access command that accesses a bank currently undergoing refresh.
13. A memory control method for controlling access to a DRAM having a plurality of banks by a memory control device, comprising: a first generation step of generating an access command from an access request to the DRAM and storing the access command in a buffer; a second generating step of generating a bank-specific refresh request for the DRAM; an issuing step of issuing a DRAM command to the DRAM based on the access command stored in the buffer and the refresh request generated by the second generating step; A memory control method characterized in that, in the second generation step, a bank to which the refresh request is to be made is determined from among the remaining banks excluding a bank selected based on attribute information attached to the access request from the plurality of banks.
Citation Information
Patent Citations
Memory control unit and control method for the same
JP2021047829A
Cited By
Memory controller and method of controlling memory controller
JP2026056893A
