MEMORY CONTROL DEVICE AND METHOD FOR CONTROLLING THE SAME

The memory control device optimizes DRAM access by generating bank-specified refresh requests based on access patterns, reducing performance degradation by avoiding overlaps between refresh and access operations.

JP7536431B2Active Publication Date: 2024-08-20CANON KK
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2019171855
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2019-09-20
Publication Date
2024-08-20
Estimated Expiration
2039-09-20

AI Technical Summary

Technical Problem

In DRAM systems, the refresh execution time often exceeds the minimum time required for memory access, leading to potential overlaps between refresh operations and memory access, which can degrade performance.

Method used

A memory control device that generates bank-specified refresh requests based on the number of accesses to each bank, prioritizing refreshes to avoid overlaps and optimize memory access efficiency by adjusting the timing of refresh and access commands.

Benefits of technology

This approach enables more efficient memory access by minimizing performance degradation due to refresh operations, ensuring that memory access and refresh operations do not overlap, thereby enhancing overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007536431000008
    Figure 0007536431000008
  • Figure 0007536431000011
    Figure 0007536431000011
  • Figure 0007536431000020
    Figure 0007536431000020
Patent Text Reader

Abstract

To allow more efficient memory access.SOLUTION: A memory control unit controlling access to a DRAM consisting of a plurality of banks has: first generation means that generates access commands in response to an access request for the DRAM and stores the command in a buffer; second generation means that generates a refresh request of bank designation for the DRAM; and issuing means that issues a DRAM command to the DRAM based on the access commands stored in the buffer and the refresh request generated by the second generation means. The second generation means determines a bank that performs the refresh request based on the access time to the banks of the DRAM with the one or more access commands stored in the buffer.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to memory access control, and more particularly to control relating to refreshing of a DRAM. [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 DRAM bank by bank. Also, the LPDDR4 standard added a function to specify a refresh bank in the bank-by-bank refresh. Patent Document 1 discloses a method for refreshing a bank that is not accessed while accessing memory in a memory controller that controls a memory consisting of multiple memory areas. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2002-50176 A Summary of the Invention [Problem to be solved by the invention]

[0005] However, in DRAM, the time required to execute a refresh is longer than the shortest time required for a memory access. Therefore, even if the start timing of a memory access and the start timing of a refresh are synchronized as in the method of Patent Document 1, there is a possibility that the refresh will not end when the memory access ends. As a result, if the bank that has not yet finished refreshing is the same as the bank for the next memory access, the memory access will be delayed, resulting in a decrease in memory access performance.

[0006] The present invention has been made in view of the above problems, and has an object to provide a technique that enables more efficient memory access. [Means for solving the problem]

[0007] In order to solve the above problems, the memory control device according to the present invention has the following configuration. That is, the memory control device controls access to a DRAM composed of a plurality of banks, a first generating means for generating an access command in response to 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; having The second generating means generates a buffer size based on the number of accesses to each bank of the DRAM by the one or more access commands stored in the buffer, A bank that has more accesses than another bank. The bank making the refresh request To Make a decision. Effect of the Invention

[0008] According to the present invention, it is possible to provide a technique that enables 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 a first embodiment; [Figure 4] FIG. 13 is a diagram illustrating an example of an access command in row address units. [Diagram 5] FIG. 13 is a diagram illustrating an example of an access pattern. [Figure 6] FIG. 4 is a diagram illustrating a method for extracting refresh candidates in the first embodiment. [Figure 7] FIG. 13 is a diagram for explaining constraints on bank-specified refresh. [Figure 8] FIG. 13 illustrates an example of a refresh management table. [Figure 9] FIG. 13 is a diagram illustrating a refresh status counter. [Figure 10] 13 is a flowchart of generating a refresh request. [Figure 11] FIG. 13 is a diagram illustrating a configuration of a DRAM control device according to a second embodiment. [Figure 12] 11 is a diagram illustrating a configuration of an access pattern storage unit. FIG. [Figure 13] 13 is a flowchart of a process executed by an access pattern candidate generating unit. [Figure 14] 11 is a diagram illustrating the relationship between an access command and an access pattern candidate. FIG. [Figure 15] 13 is a flowchart of a process executed by a recording control unit. [Figure 16] 11 is a diagram illustrating information recorded in an access pattern buffer. FIG. [Figure 17] FIG. 11 is a diagram illustrating a method for extracting refresh candidates in the second embodiment. [Figure 18] 13 is a flowchart of refresh extraction in the second embodiment. [Figure 19]FIG. 13 is a diagram illustrating a configuration of a DRAM control device according to a third embodiment. [Figure 20] 13 is a flowchart of refresh request generation in the third embodiment. [Figure 21] FIG. 13 is a diagram illustrating a method for determining a refresh candidate in the third embodiment. [Figure 22] 13 is a flowchart of access command issuance order control in the third 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) As a first embodiment of a memory control device according to the present invention, a DRAM control device that controls access to a DRAM conforming to the LPDDR4 standard will be described below as an example.

[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 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 (I / F) 302 receives a memory access request issued by an initiator, converts the request into an access command in row addresses that designates an area called a page of the DRAM 301 , and transmits the command to a command storage unit 303 .

[0018] 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 the command transmission is prepared, 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 rearranged for the purpose of improving the efficiency of DRAM access and realizing memory access requests according to the urgency. The rearrangement may also be realized by changing the storage order of the access commands in the buffer.

[0019] The access pattern generation unit 305 monitors the access commands stored in the command storage unit 303, predicts memory accesses that the DRAM control device 300 will make to the DRAM 301, and generates access patterns. The access patterns will be described later with reference to FIG.

[0020] The refresh timer 306 is a timer that counts the lapse of an average refresh period, and notifies the refresh generator 307 of the lapse of the average refresh period.

[0021] The refresh generation unit 307 generates a bank-specified refresh request in accordance with the average refresh period information notified by the refresh timer 306 and the access pattern generated by the access pattern generation unit 305 , and notifies the command issue unit 304 of the request.

[0022] 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. Also, the command issuing unit 304 generates a refresh command for refreshing the DRAM 301 in response to the refresh request in bank units generated by the refresh generating unit 307. Also, the command issuing unit 304 adjusts the issuing timing of the DRAM access command and the refresh command, and issues the DRAM command to the DRAM 301.

[0023] FIG. 4 is a diagram showing an example of an access command in row address units stored in the command storage unit. The access command includes a command 401, a bank 402, a row address 403, a column address 404, a transfer length 405, and a transfer ID 406. The command 401 indicates whether the access command is a read or write command. The transfer ID 406 is information added when the initiator issues a memory access request. In the following, the row address 403 and the column address 404 are collectively referred to as address information. The command storage unit stores access commands in row address units. Therefore, by analyzing the information stored in the command storage unit, memory access can be predicted.

[0024] FIG. 5 is a diagram showing an example of an access pattern generated by the access pattern generation unit. The access pattern generation unit predicts the access time of each bank from the command, address information, and transfer length of the access command stored in the command storage unit. The access pattern indicates the access order of the banks to be accessed and the access time at which each bank is accessed. The access pattern shown in FIG. 5 indicates that bank 0 is accessed in the following order: time T0 to bank 3, time T1 to bank 2, time T2 to bank 1, and time T3 to bank 1. The access time varies depending on the current state of the DRAM, and by taking into account the state of each bank of the DRAM, it is possible to predict the access time with higher accuracy.

[0025] <Device Operation> FIG. 6 is a diagram for explaining a method for extracting refresh candidates in the first embodiment. Here, a method for extracting refresh candidates from a generated access pattern in a DRAM having an 8-bank configuration (bank 0 to bank 7) is shown. In FIG. 6, the numbers shown in the access pattern indicate the bank to be accessed. Also, the width shown in the access pattern indicates the time period for access. For example, the access pattern in FIG. 6(A) indicates that after accessing bank 0, bank 2, bank 1...bank 7 in that order with the same access time period, bank 0 is accessed for a longer time period.

[0026] In the access pattern shown in Figure 6(A), if a refresh is issued at the timing indicated by the diagonal lines, the memory access and refresh times will overlap in all banks from bank 0 to bank 7. Therefore, the start timing of the transfer for the bank that issued the refresh at this timing must be delayed until time 600 when the refresh is completed, which will degrade memory access performance. Therefore, there is no refresh candidate in the state of Figure 6(A).

[0027] Figure 6(B) shows the state after the time has elapsed from the time in Figure 6(A) until the transfer of the first bank 0 is completed. As in Figure 6(A), since memory accesses to all banks overlap during the refresh time, there are also "none" refresh candidates in the state of Figure 6(B).

[0028] Figure 6(C) shows the state after time has passed from the time in Figure 6(B) until the transfer of the first bank 2 is completed. Since the transfer of bank 2 does not occur at the timing shown by the diagonal lines in Figure 6(C), there is no impact on memory access performance even if a refresh command for bank 2 is issued within that refresh time. Therefore, the refresh candidate in the state of Figure 6(C) is "bank 2."

[0029] Fig. 6(D) shows a state where there are multiple refresh candidates. In Fig. 6(D), the only two memory accesses that occur during the refresh time are bank 7 and bank 0, and all six banks, "bank 1" to "bank 6," are refresh candidates.

[0030] FIG. 6(E) shows a state in which the access pattern within the refresh time has not been determined. In FIG. 6(E), it can be seen that in the first half of the refresh period, accesses to bank 7, bank 6, and bank 5 occur. On the other hand, memory access after the transfer of bank 5 is completed has not been determined. If no memory access occurs during the period from the end of the transfer of bank 5 to the end of the refresh, there is no effect on the transfer performance even if a refresh is issued to a bank other than banks 5, 6, and 7. However, if a memory access request for the same bank as the bank that issued the refresh is received before the time 601 at which the refresh ends, the DRAM access is made to wait until the time 601 at which the refresh ends. Therefore, the refresh candidates in FIG. 6(E) are five banks, "bank 0" to "bank 4," for which no access occurs within the refresh time. However, since the memory access within the refresh time has not been determined, there is a possibility that the access pattern will be updated by receiving a memory access request from bank 0 to bank 4 after the refresh is issued. Therefore, in such a case, whether or not to issue a refresh is switched depending on whether the refresh issuance status is an advanced refresh state or a delayed refresh state.

[0031] FIG. 7 is a diagram explaining the constraints of bank-specified refresh in LPDDR4. Although bank-specified refresh is possible in LPDDR4, 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 700). However, if the same bank is refreshed twice consecutively in this way, the next refresh will be eight times later (timing 701) at the earliest.

[0032] FIG. 8 is a diagram showing an example of a refresh management table. The refresh management table is used to satisfy the constraints of the bank-specified refresh of the LPDDR4 described above. As shown in FIG. 8, 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.

[0033] Fig. 9 is a diagram explaining the refresh status counter of the refresh generator. The refresh status counter is a counter for detecting whether the refresh issuance status for the DRAM is an advanced refresh status or a delayed refresh status. As shown in Fig. 9, the refresh status counter is configured to count up when a refresh command is issued to the DRAM and to count down when a refresh period has elapsed. That is, when the counter value indicates a positive value, it is in the advanced refresh status, and when the counter value indicates a negative value, it is in the delayed refresh status.

[0034] 10 is a flowchart of the refresh request generation executed by the refresh request generator 10. This flow is started when no refresh is currently being executed.

[0035] In S1000, the refresh generation unit 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 S1001. This is because the number of advance refreshes is determined by the DRAM specifications, and if the number of advance refreshes is equal to or greater than the predetermined number, the refresh must be stopped. As described above, the refresh generation unit recognizes whether the current refresh issuance status is an advance refresh status or a delayed refresh status using the refresh status counter.

[0036] In S1001, the refresh generation unit determines whether the number of delayed refresh operations is equal to or greater than a predetermined number, and if it is equal to or greater than the predetermined number, proceeds to S1002, and if it is less than the predetermined number, proceeds to S1004. This is because the number of delayed refresh operations is also determined by the DRAM specifications.

[0037] In S1002, the refresh generation unit determines a refresh bank and stores the determined bank as a forced refresh execution bank. When determining the refresh bank, the refresh management table described in Fig. 8 is checked, and one bank is selected from among the banks for which the flag is not set (flag = 0). Then, in S1003, a refresh request for the determined bank is generated.

[0038] If the number of delayed refreshes is less than the predetermined number (No in S1001), there is no need to issue a refresh command quickly, and it is sufficient to issue a refresh command as long as it does not affect memory access.

[0039] In S1004, the refresh generation unit checks the access pattern described with reference to Fig. 6 and determines whether the access pattern within the refresh period is known. If the access pattern within the refresh period is unknown, the process proceeds to S1005, and if the access pattern is known, the process proceeds to S1009.

[0040] In S1005, the refresh generation unit checks whether or not the state is an advanced refresh state. This is because it is necessary to consider the case where a memory access request to a bank in which a refresh is being executed is received after issuing a refresh. If the state is an advanced refresh state, a refresh request is not generated. On the other hand, if the state is a delayed refresh state, the process proceeds to S1006.

[0041] In S1006, the refresh request generator checks whether or not there is a refresh candidate as described in Fig. 6. If there is a refresh candidate, the process proceeds to S1007, and if there is no refresh candidate (if there is no bank with flag = 0), the refresh request generator does not generate a refresh request.

[0042] In S1007, the refresh generation unit determines a refresh bank, and in S1008, the refresh generation unit generates a refresh request for the determined bank. In this case, the refresh candidate must be a bank for which no flag is set (flag=0) as determined by checking the refresh management table described in FIG. 8. Here, when determining a refresh bank from multiple refresh candidates, a bank to which a forced refresh has been issued in a delayed refresh state may be given priority. This is to avoid issuing a forced refresh to the same bank again by giving priority to refreshing a bank to which a forced refresh has been issued in the past, and to prevent memory access to a specific bank from being affected by the refresh.

[0043] If the access pattern within the refresh period is known (Yes in S1004), there is no need to change the processing depending on whether it is early refresh or delayed refresh.

[0044] In S1009, the refresh request generator checks whether or not there is a refresh candidate. If there is a refresh candidate, the process proceeds to S1010, and if there is no refresh candidate (if there is no bank with flag=0), the refresh request generator does not generate a refresh request.

[0045] In S1010, the refresh generator determines a refresh bank, and in S1011, the refresh generator generates a refresh request for the determined bank. The refresh candidate in this case must also be a bank for which no flag is set (flag=0) as determined by checking the refresh management table described in Fig. 8. Also, here, when determining a refresh bank from multiple refresh candidates, a bank for which a forced refresh has been issued in a delayed refresh state may be given priority.

[0046] As described above, according to the first embodiment, a refresh candidate bank is determined so that the memory access bank and the refresh bank do not overlap, and a bank-specific refresh is performed. This configuration enables more efficient memory access and suppresses degradation of memory access performance caused by refresh.

[0047] Second embodiment In the second embodiment, another method for determining a refresh candidate will be described. Specifically, a form will be described in which a refresh candidate for each time period is determined based on an access pattern, and a bank to which refresh is given priority is determined.

[0048] <Device configuration> 11 is a diagram showing the configuration of a DRAM control device 1100 according to the second embodiment. The DRAM control device 1100 is similar to the first embodiment (FIG. 3), but differs mainly in that it includes an access pattern storage unit 1106 instead of the access pattern generation unit 305, and that a refresh generation unit 1107 acquires information from a command storage unit 1103.

[0049] The access pattern storage unit 1106 monitors the access commands stored in the command storage unit 1103, and extracts and stores repeatedly occurring access patterns.

[0050] The refresh generation unit 1107 generates a refresh request. Specifically, the refresh request is generated by comparing the average refresh period notified by the refresh timer 1105, the access pattern stored in the access pattern storage unit 1106, and the access command stored in the command storage unit 1103.

[0051] That is, in the second embodiment, the refresh candidate generator 1107 further uses the access pattern stored in the access pattern storage unit 1106 to determine the refresh candidate.

[0052] 12 is a diagram for explaining the configuration of the access pattern storage unit 1106. The access pattern storage unit 1106 has an access pattern candidate generation unit 1200 and an access pattern recording unit 1206. The access pattern candidate generation unit 1200 monitors the command storage unit and generates access pattern candidates. In addition, the access pattern recording unit 1206 receives the access pattern candidates generated by the access pattern candidate generation unit 1200 and records the access patterns.

[0053] The access pattern candidate generation unit 1200 is composed of an access pattern candidate control unit 1201 and an access pattern candidate buffer 1202. The access pattern candidate buffer 1202 has N recording areas. Each recording area stores a transfer ID 1203, an access command 1204, and a counter 1205. The counter 1205 is a down counter that measures the time since the transfer of the recorded transfer ID was interrupted.

[0054] The access pattern recording unit 1206 is made up of a recording control unit 1207 and an access pattern buffer 1208. The access pattern buffer 1208 has M recording areas. Each recording area stores a transfer ID 1209, an access pattern match flag 1210, and an access pattern 1211.

[0055] <Device Operation> Fig. 13 is a flowchart of the process executed by the access pattern candidate generating unit 1200. Fig. 13(A) shows a flow for determining an access pattern candidate buffer for storing an access pattern candidate. Fig. 13(B) is a diagram for explaining a recording operation into a recording area of ​​the access pattern candidate buffer 1202 when a recording start command is issued.

[0056] In S1300, the access pattern candidate control unit 1201 first checks whether there is any free space in the buffer. If there is no free space in the buffer, it repeatedly checks and waits until there is free space. When there is free space in the buffer, the process proceeds to S1301. In S1301, the access pattern candidate control unit 1201 judges whether the transfer ID has changed. If the transfer ID has not changed, it repeatedly judges and waits until it has changed. If the transfer ID has changed, the process proceeds to S1302. In S1302, the access pattern candidate control unit 1201 selects a buffer in which to record the access command. In S1303, the access pattern candidate control unit 1201 instructs the selected recording area to start recording.

[0057] In S1350, when the access pattern candidate buffer 1202 receives an instruction to start recording an access command, it records the transfer ID of the first access that occurs. In S1351, the access pattern candidate buffer 1202 sequentially records the access commands that occur. Recording of the access command continues as long as the access of the recorded transfer ID is not interrupted. Here, the bank to be accessed, whether it is a read or write, and the transfer length of the transfer that occurs are recorded. In S1352, the access pattern candidate buffer 1202 judges whether the access of the recorded transfer ID is interrupted. If it is interrupted, proceed to S1353, and if it is not interrupted, return to S1351 and continue recording. Here, the state where "the access of the recorded transfer ID is interrupted" includes two cases: "when it is switched to an access of a different transfer ID" and "when the access is no longer available."

[0058] In S1353, the access pattern candidate buffer 1202 records that the access of the recorded transfer ID has been interrupted. In S1354, the access pattern candidate buffer 1202 resets the down counter and starts counting down.

[0059] In S1355, the access pattern candidate buffer 1202 stops recording the access command when the count value of the down counter reaches 0, and proceeds to S1357. If the transfer of the recorded transfer ID is resumed before the count value of the down counter reaches 0 (Yes in S1356), the process returns to recording the access (S1351).

[0060] In S1357, the access pattern candidate buffer 1202 stops recording the access commands and starts generating access pattern candidates. First, it is determined whether the recorded access commands include repetitions of the same access command. If the same access command is repeated, the process proceeds to S1358, and if not, the process proceeds to S1359. In S1358, the access pattern candidate buffer 1202 extracts the repeatedly occurring access command. In S1359, the access pattern candidate buffer 1202 extracts up to the last access command that occurs for the recorded transfer ID.

[0061] In S1360, the access pattern candidate buffer 1202 judges whether or not the sequence consisting of one or more extracted access commands is an access pattern candidate. If it is judged that the refresh to be executed simultaneously with the access cannot be judged, for example, when the access time corresponding to the extracted sequence is short, it judges that it is not an access pattern candidate. If it is judged that it is an access pattern candidate, the process proceeds to S1362, and if it is judged that it is not an access pattern candidate, the process proceeds to S1361. In S1361, the access pattern candidate buffer 1202 clears the recorded information as there is no access pattern candidate, and ends. In S1362, the access pattern candidate buffer 1202 determines the extracted sequence as an access pattern candidate, clears the recorded information, and ends.

[0062] Figure 14 is a diagram explaining the relationship between recorded access commands and access pattern candidates. When the sequence of access commands shown in Figure 14(A) is recorded, no repetition of access commands occurs, so the sequence portion obtained by deleting the last recorded portion "where access is interrupted" is set as the access pattern candidate. When the sequence of access commands shown in Figure 14(B) is recorded, repetition of access commands occurs, so this repetitive sequence portion is set as the access pattern candidate.

[0063] FIG. 15 is a flowchart of the process executed by the recording control unit 1207.

[0064] In S1500, the recording control unit 1207 converts the sequence of access commands included in the access pattern candidate into the access pattern format before storing the determined access pattern candidate in the access pattern buffer 1208. Each access command included in the sequence is recorded in the access command format described with reference to FIG. 4. That is, the access command includes a command (information indicating whether it is a read or write), a bank, a transfer length, and a transfer ID. In addition, "access of the recorded transfer ID is interrupted" is also recorded. Therefore, using these pieces of information, the sequence of access commands included in the access pattern candidate is converted into the access pattern format. As will be described later with reference to FIG. 16, the access pattern includes information on the bank to be accessed, the access time, and the timing of "access interruption". The format of the access pattern shown here is an example, and other formats may be used. For example, it is also possible to improve the accuracy of the access pattern by further considering address information.

[0065] In S1501, the recording control unit 1207 checks whether the access pattern of the transfer ID of the newly generated access pattern candidate has been recorded in the access pattern buffer 1208. If it has been recorded (a matching transfer ID has already been recorded), the process proceeds to S1502, and if it has not been recorded, the process proceeds to S1506.

[0066] In S1502, the recording control unit 1207 compares the recorded access pattern with the access pattern obtained by the conversion in S1500. In S1503, the recording control unit 1207 judges whether the two access patterns match. If they match, the process proceeds to S1504, and if they do not match, the process proceeds to S1505. In S1504, the recording control unit 1207 sets an access pattern match flag (flag=1) and ends. In this way, the access pattern match flag indicates that the recorded access pattern has occurred multiple times. On the other hand, in S1505, the recording control unit 1207 erases the access pattern of the corresponding transfer ID and ends without recording the access pattern obtained by the conversion in S1500.

[0067] In S1506, the recording control unit 1207 checks whether there is free space in the access pattern buffer. If there is free space, the process proceeds to S1508, and if there is no free space, the process proceeds to S1507. In S1507, the recording control unit 1207 determines the recording area to be erased and erases the data in the recording area. For example, among the recorded access patterns, an access pattern in which the number of uninterrupted accesses recorded is relatively short is erased. In S1508, the recording control unit 1207 records the access pattern in the recording area and ends the process. When recording the access pattern, the access pattern match flag is not set (flag=0).

[0068] 16 is a diagram explaining information recorded in the access pattern buffer 1208. As shown in the figure, the stored information includes a transfer ID 1600, an access pattern match flag 1602, and an access pattern 1601. As described above, the access pattern 1601 includes information on the bank to be accessed, the access time, and the timing at which "access (of the corresponding transfer ID) is interrupted." When extracting refresh candidates, only the access patterns of transfer IDs for which the access pattern match flag is set (flag=1) are used.

[0069] 16 is an example, and a pattern match counter may be used instead of the access pattern match flag. For example, the pattern match counter is cleared when an access pattern is recorded, and counts up when the access pattern obtained by conversion matches a recorded access pattern. In this case, it becomes possible to control the use of an access pattern that has occurred a predetermined number of times to extract refresh candidates. Also, when there is no free space in the recording area of ​​the access pattern buffer, it is necessary to select a recorded recording area and erase data, but it becomes possible to control the selection of an access pattern with a small count value of the pattern match counter.

[0070] 17 is a diagram for explaining a method of extracting refresh candidates in the second embodiment. The recorded access pattern includes the access pattern for the entire period from the start to the end of the transfer of the corresponding transfer ID. The refresh generation unit 1107 recognizes how far the recorded access pattern has progressed by monitoring the command storage unit 1103. In the second embodiment, since it is possible to generate access patterns of a longer duration compared to the first embodiment, a bank that is given priority for refresh (hereinafter, "refresh priority") is determined from the refresh candidates for the multiple refreshes that will be issued in the future.

[0071] The access pattern shown in FIG. 17 indicates an "access pattern that will occur in the future" that is generated by deleting accesses that have already been executed from the access pattern recorded in the access pattern recording area.

[0072] First, refresh candidates that do not overlap with memory access are determined. Here, the access pattern is divided by the refresh time, and refresh candidates for each time period are generated. If the access of the recorded transfer ID is interrupted, no subsequent refresh candidates are generated. As long as the access of the recorded transfer ID is not interrupted, access occurring at the next refresh time is confirmed and refresh candidates continue to be generated. Therefore, in FIG. 17, refresh candidates 1700 to 1702 are generated (refresh candidate 1704 is "none").

[0073] Next, refresh-priority banks 1703 are determined from the refresh candidates 1700. These are generated by excluding banks that may be able to be refreshed at a later time even if the refresh is postponed. Of the banks included in the refresh candidates 1700, banks 4, 5, and 6 may be able to be refreshed at the next time, and banks 0, 1, and 2 may be able to be refreshed at the time after that. Therefore, banks 3 and 7, which are refresh candidates only at the first refresh time, are determined to be refresh-priority banks.

[0074] FIG. 18 is a flowchart of the refresh extraction in the second embodiment.

[0075] In S1800, the refresh generation unit 1107 initializes a parameter N (N=0). The parameter N is a parameter for indicating each time period as shown in FIG. 17. The width of each time period corresponds to the refresh time. In S1801, the refresh generation unit 1107 checks whether there is access information up to the refresh time. If no access information up to the refresh time is recorded or if access to the recorded transfer ID will cease before the refresh time (No in S1801), proceed to S1802. If there is access information up to the refresh time, proceed to S1803. In S1802, the refresh generation unit 1107 determines that there is no refresh candidate or refresh priority, and ends the process.

[0076] In S1803, the refresh generator 1107 checks the bank that will be accessed in the (N+1)th time period (N×refresh time to (N+1)×refresh time). For example, in the example of Fig. 17, in the first loop (S1803 to S1806), it is determined that there is an access to bank 0 in the first time period (the time one refresh time after time 0).

[0077] In S1804, the refresh command generator 1107 determines the non-accessed banks as refresh candidates for the (N+1)th time period. For example, in the example of Fig. 17, in the first loop, seven banks 1 to 7 are determined as refresh candidates in the first time period.

[0078] In S1805, the refresh generation unit 1107 increments the parameter N (adds 1). In S1806, the refresh generation unit 1107 checks whether there is access information in the next time period. That is, it checks whether access is interrupted. If there is access information in the next time period, the process returns to S1803 and a refresh candidate for the next time period is determined. In this manner, while incrementing the parameter N, the process repeats the determination of a refresh candidate as long as there is access of the recorded transfer ID without interruption of transfer of other IDs. For example, in the example of FIG. 17, in the first and second loops, there is access information in the subsequent time period, so the process proceeds to the next loop, but in the third loop, there is no access information in the subsequent time period, so the process proceeds to S1807.

[0079] In S1807, the refresh generator 1107 determines a refresh-prioritized bank based on the refresh candidates determined for each time period, and ends the process. For example, in the example of Fig. 17, banks 3 and 7 are determined as refresh-prioritized banks based on the refresh candidates in three time periods. Note that, when determining a refresh-prioritized bank from only one refresh candidate, the refresh candidate and the refresh priority may be the same.

[0080] As described above, according to the second embodiment, a refresh bank is selected from the refresh candidates, as in the first embodiment. In particular, in the second embodiment, a refresh-prioritized bank is selected based on the refresh candidates for each time period, and a refresh bank is selected from the refresh-prioritized banks. This configuration enables more efficient memory access and makes it possible to suppress degradation of memory access performance caused by refresh.

[0081] In the above description, the access patterns to be set in the access pattern buffer are generated from the access pattern candidates generated by the access pattern candidate generation unit 1200. However, the user may directly set the access pattern buffer using other methods, for example, a method such as register access.

[0082] In the above explanation, the recurring access pattern is recorded in association with the transfer ID, and a refresh candidate bank is determined in which the memory access bank and the refresh bank do not overlap. However, if the same access request is always made for each transfer ID, an access pattern is generated, but it is also possible that a different access request occurs for the transfer ID. In that case, it is possible to address this by placing external logic between the initiator and the DRAM control device that converts the transfer ID so that a different transfer ID is generated for each access request.

[0083] Also, by adding information on the access pattern stored in association with the transfer ID, two types of access patterns may be recorded for the same transfer ID. For example, when two types of access requests are issued with the same transfer ID, if the addresses accessed first are different, the address of the first access request is recorded. This makes it possible to distinguish and manage two types of access patterns for the same transfer ID.

[0084] Also, when the transfer of the recorded transfer ID starts, the refresh candidate may not be determined immediately, but may be determined after a certain period of time has elapsed since the transfer is in accordance with the recorded access pattern. This makes it possible to prevent the memory access bank from overlapping with the refresh bank when an access other than the recorded access pattern occurs.

[0085] Third embodiment In the third embodiment, another method for determining refresh candidates will be described. Specifically, a form will be described in which a bank to be given priority for refresh is determined based on the total number of read commands and write commands for each bank. Also, a form will be described in which a method for controlling the issuance order of memory access requests is switched depending on whether a bank-specified refresh is being executed or not.

[0086] <Device configuration> 19 is a diagram showing the configuration of a DRAM control device 1900 according to the third embodiment. The DRAM control device 1100 is similar to the first embodiment (FIG. 3), but differs mainly in that the access pattern generation unit 305 is not present and that a refresh generation unit 1906 acquires information from a command storage unit 1903. In addition, the command storage unit 1903 is configured to be able to check communication between the refresh generation unit 1906 and a command issue unit 1904.

[0087] The command storage unit 1903 is configured to monitor the refresh request generated by the refresh generation unit 1906 and the refresh response notified by the command issue unit 1904, and recognize the bank in which the refresh is being executed. The command storage unit 1903 has a buffer that holds a plurality of access commands generated by the bus I / F 1902. The command storage unit 1903 controls the order of issuing commands according to the state of the DRAM 1901 including the execution status of the refresh and the urgency of the memory access request. When the access command is stored in the buffer, the command storage unit 1903 notifies the command issue unit 1904 that the access command is ready, and transmits the access command to the command issue unit 1904 according to the response of the command issue unit 1904.

[0088] The refresh request generator 1906 generates a refresh request. Specifically, the refresh request generator 1906 generates a bank-specified refresh request in accordance with the average refresh period notified by the refresh timer 1905 and the access command stored in the command storage unit 1903.

[0089] The command issuing unit 1904 receives an access command in row address units from the command storage unit 1903 and transmits a response. From the received access command in row address units, the command issuing unit 1904 generates a DRAM access command for accessing the DRAM 1901. In addition, in response to a refresh request in bank units generated by the refresh generation unit 1906, the command issuing unit 1904 generates a refresh command for refreshing the DRAM 1901. In addition, the command issuing unit 1904 adjusts the timing of issuing the DRAM access command and the refresh command, and issues the DRAM command to the DRAM 301. When the command issuing unit 1904 issues a refresh command, it transmits a refresh response to the refresh generation unit 1906.

[0090] <Device Operation> Fig. 20 is a flowchart of refresh request generation in the third embodiment. This flow is started when a refresh is not currently being executed. The refresh generation unit 1906 recognizes whether the current refresh issuance status is an advanced refresh status or a delayed refresh status by the refresh status counter described in Fig. 9.

[0091] In S2000, the refresh generation unit judges whether the number of prior refresh operations 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 prior refresh operations falls below the predetermined number, the process proceeds to S2001.

[0092] In S2001, the refresh generation unit calculates the total number of read commands and write commands to be issued for each bank from the address information and burst length information of the access commands stored in the command storage unit. In other words, it calculates the number of accesses to each bank by the access commands (read commands and write commands).

[0093] In S2002, the refresh generation unit determines refresh candidates. More specifically, the refresh candidates are determined based on the total number of read commands and write commands to banks other than the target bank, calculated for each bank.

[0094] In S2003, the refresh generation unit determines whether or not there is a refresh candidate. If there is a refresh candidate, the process proceeds to S2007. If there is no refresh candidate, the process proceeds to S2004 since it is necessary to determine whether to wait for a refresh to be issued or to issue a refresh.

[0095] In S2004, the refresh generation unit judges whether the delayed refresh count is equal to or greater than a predetermined count. This is because the delayed refresh count is determined by the DRAM specifications. If the delayed refresh count is equal to or greater than the predetermined count, the process proceeds to S2005. If the delayed refresh count is less than the predetermined count, there is no need to issue a refresh command urgently, and the process ends without generating a refresh request.

[0096] In S2005, the refresh generation unit determines a refresh bank and stores the determined bank as a forced refresh execution bank. When determining the refresh bank, the refresh management table described in FIG. 8 is checked, and one bank is selected from among the banks for which the flag is not set (flag=0).

[0097] In S2006, the refresh generation unit generates a refresh request for the refresh bank, notifies the command issuing unit, and waits for a response before terminating the process.

[0098] In S2007, the refresh generation unit judges whether the refresh candidate is refreshable or not. This judgment is made based on whether the bank has no flag set (flag=0) by checking the refresh management table described in Fig. 8. If the bank is refreshable, the process proceeds to S2008, and if the bank is not refreshable, the process proceeds to S2004 to judge whether a delayed refresh needs to be issued.

[0099] In S2008, the refresh generation unit determines a refresh bank. Note that a bank to which a forced refresh command has been issued in a delayed refresh state may be given priority. This is to avoid issuing a forced refresh command to the same bank again by giving priority to refreshing a bank to which a forced refresh command has been issued in the past, and to suppress memory access to a specific bank from being affected by the refresh.

[0100] In S2009, the refresh generation unit generates a refresh request for the refresh bank, notifies the command issuing unit, and waits for a response before terminating the process.

[0101] FIG. 21 is a diagram illustrating a method for determining a refresh candidate in the third embodiment.

[0102] The refresh generation unit calculates, for each bank, a total number 2101 of read commands and write commands from the address information and burst length information of the access command stored in the command storage unit. Similarly, for each bank, it calculates a total number 2102 of read commands and write commands for other banks. In the example of FIG. 21, the total number of read commands and write commands accessing banks other than bank 0 (i.e., banks 1 to 7) is "54". Finally, the refresh generation unit determines the refresh priority 2103.

[0103] For example, assume that while a certain bank is being refreshed, the number of read commands and write commands that can be issued in parallel to other banks is "50." In this case, if a bank with a total number of read commands and write commands to other banks exceeding 50 is designated as a refresh bank, it becomes possible to issue read commands and write commands to the other banks continuously in parallel with the refresh. In other words, it is possible to suppress degradation of memory access performance during refresh. Therefore, banks with a number of read commands and write commands to other banks exceeding 50 are candidates for refresh.

[0104] Also, when there are multiple refresh candidates (banks with a total number of commands exceeding 50), the bank with the greater number of read commands and write commands to other banks has a higher priority. In the example of FIG. 21, among the refresh candidates, "Bank 2" has the highest priority because it has the greatest total number of read commands and write commands to other banks. Also, among the refresh candidates, "Bank 3" has a lower priority because it has the smallest total number. Banks 1, 4, and 7 are not refresh candidates because there is a possibility that they will issue all read and write commands that can be issued during the refresh and will not be able to issue read or write commands until the refresh is completed.

[0105] When the command storage buffer 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 candidates for refresh.

[0106] 22 is a flowchart of access command issuance order control in the third embodiment. Some DRAM control devices have a function of changing the order of received memory access requests. This is 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 the third embodiment, the method of controlling the issuance order of memory access requests is switched depending on whether a bank-specified refresh is being executed. This flow is started when the command issuing unit 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.

[0107] In S2200, the command storage unit monitors the refresh requests and responses from the refresh generation unit and the command issue unit to determine whether a bank-specified refresh is being executed. If a bank-specified refresh is being executed, the process proceeds to S2201, and if a bank-specified refresh is not being executed, the process proceeds to S2202.

[0108] In S2201, the command storage unit controls the command issue unit to control the order of access commands issued so as to prioritize memory access requests to banks other than the refresh bank. In other words, the command storage unit controls the command issue unit not to output memory access requests to the refresh bank. In S2202, the command storage unit controls the command issue unit to control the order of access commands issued so as to target all memory access requests.

[0109] In controlling the order in which access commands are issued, priority is given to memory access requests that do not degrade memory access performance, but priority may also be given to memory access requests with high urgency.

[0110] As described above, according to the third embodiment, a bank that does not affect memory access is selected 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 degradation of memory access performance caused by refresh.

[0111] (Other Examples) The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a 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 implements one or more of the functions.

[0112] 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]

[0113] 300 DRAM control device; 301 DRAM; 302 bus interface; 303 command storage unit; 304 command issuing unit; 305 access pattern generating unit; 306 refresh timer; 307 refresh generating unit

Claims

1. A memory control device for controlling access to a DRAM configured with a plurality of banks, comprising: a first generating means for generating an access command in response to 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; having The second generating means determines, based on the number of accesses to each bank of the DRAM by the one or more access commands stored in the buffer, a bank having another bank with a higher number of accesses as the bank for which the refresh request is to be made. A memory control device comprising:

2. The second generating means calculates the number of accesses to each bank of the DRAM by one or more access commands stored in the buffer, calculates the total number of accesses to banks other than the target bank for each bank, and determines a bank whose total number exceeds a predetermined number as a candidate bank for performing the refresh request.

2. The memory control device according to claim 1 .

3. When there are a plurality of candidate banks, the second generation means sets a higher priority for issuing a refresh request to a bank having a larger total number.

3. The memory control device according to claim 2.

4. The predetermined number of times is the number of commands that can be issued in parallel to other banks when a refresh is executed.

4. The memory control device according to claim 2 or 3.

5. The buffer is configured to be able to identify a bank currently being refreshed in the DRAM; The buffer is configured not to output an access command for a bank currently undergoing refresh among the access commands stored in the buffer.

5. The memory control device according to claim 2, wherein the memory control device further comprises:

6. The buffer confirms communication between the second generating means and the issuing means to confirm a bank currently performing refresh in the DRAM.

6. The memory control device according to claim 5.

7. The second generating means, when no access command is stored in the buffer, sets all banks as the candidates.

7. The memory control device according to claim 2, wherein the memory control device further comprises:

8. A method for controlling access to a memory control device that includes a plurality of banks, the method comprising the steps of: a first generation step of generating an access command in response to an access request for 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; Including, In the second generation step, a bank having a higher number of accesses to each bank of the DRAM by one or more access commands stored in the buffer is determined as a bank to which the refresh request is to be made based on the number of accesses to each bank of the DRAM by one or more access commands stored in the buffer. A control method comprising:

Citation Information

Patent Citations

  • Refresh method of memory and memory controller for it

    JP1998003785A

  • Memory control apparatus and memory control method

    JP1998011964A

  • Semiconductor device, its refreshing method, memory system, and electronic equipment

    JP2002050176A

  • Smart in-module refresh for dram

    US20160307619A1

  • Memory controller, memory system managing refresh operation and operating method of the memory controller

    US20170228175A1