MEMORY CONTROL CIRCUIT AND METHOD FOR CONTROLLING THE SAME

The memory control circuit addresses DRAM performance issues by managing bank states and prioritizing read/write commands to mitigate page mistakes, enhancing processing efficiency.

JP7621132B2Active Publication Date: 2025-01-24CANON KK
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
JP2021026640
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-02-22
Publication Date
2025-01-24
Estimated Expiration
2041-02-22

AI Technical Summary

Technical Problem

Existing DRAM performance deterioration is not adequately addressed by current technologies due to page mistakes and switching between read and write operations, as highlighted by Patent Document 1, which fails to consider the impact of page mistakes on performance.

Method used

A memory control circuit that manages multiple banks, determines access types, and prioritizes read or write commands based on bank status and page mistakes to minimize performance degradation.

Benefits of technology

The proposed solution effectively reduces performance deterioration by optimizing command prioritization, thereby completing processing faster than conventional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007621132000001
    Figure 0007621132000001
  • Figure 0007621132000002
    Figure 0007621132000002
  • Figure 0007621132000003
    Figure 0007621132000003
Patent Text Reader

Abstract

To prevent a reduction in performance due to switching between read and write and page errors.SOLUTION: A memory control circuit accessing a memory including a plurality of banks comprises: holding means that holds an access request from an external circuit; management means that manages the state of the plurality of banks; determination means that, based on the access type of the access request held in the holding means and the state of the plurality of banks, determines for which of a read access type or a write access type a command is issued preferentially; and issuing means that issues a command for an access request corresponding to the access type determined to be issued preferentially.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a memory control circuit for accessing a memory. [Background technology]

[0002] DRAM is generally used as the main memory of computer systems. As computer systems become more sophisticated and powerful, the performance requirements for DRAM are increasing, and there is a demand to maximize the performance of DRAM.

[0003] The main causes of DRAM performance degradation are page misses and switching between read and write. Patent Document 1 discloses a method for suppressing performance degradation caused by switching between read and write, in which read or write is set as a priority command, and the priority command is switched after all priority commands have been removed from the command queue. [Prior art documents] [Patent documents]

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

[0005] However, Patent Document 1 does not take into consideration performance degradation due to page misses in the DRAM, and therefore cannot suppress performance degradation in the DRAM when there are many page misses in commands that correspond to priority commands.

[0006] The present invention has been made in consideration of such problems, and has an object to provide a technique for suppressing performance degradation due to switching between read and write and page misses. [Means for solving the problem]

[0007] In order to solve the above problems, a memory control circuit according to the present invention has the following configuration. That is, a memory control circuit that accesses a memory including a plurality of banks includes: a holding means for holding an access request from an external circuit; a management means for managing the states of the plurality of banks; R a determining means for determining whether a command of an access type, read or write, should be issued with priority; an issuing means for issuing a command of an access request corresponding to an access type determined by the determining means to be prioritized among the access requests held in the holding means; Equipped with 、 The determining means is When only a read access request is held in the holding means, the read request is given priority; When only a write access request is held in the holding means, the write is given priority; When both read and write access requests are held in the holding means, if there is an access that has already opened a page with the access type previously determined to be prioritized by the determining means, the priority access type is not changed, and if there is no such access, the priority access type is changed. . Effect of the Invention

[0008] According to the present invention, it is possible to provide a technique for suppressing performance degradation due to switching between read and write and due to page misses. [Brief description of the drawings]

[0009] [Figure 1] FIG. 2 is a diagram showing a configuration of a memory control circuit according to the first and second embodiments. [Diagram 2] 11 is a flowchart of a priority command determination process in the first embodiment. [Diagram 3] 4 is a timing diagram illustrating the operation of the memory control circuit. [Figure 4] 13 is a flowchart of a priority command determination process according to the second embodiment. [Diagram 5] 4 is a timing diagram illustrating the operation of the memory control circuit. [Figure 6] FIG. 13 is a diagram showing a configuration of a memory control circuit according to third and fourth embodiments. [Figure 7]13 is a flowchart showing a priority command determination process according to the third embodiment. [Figure 8] 13 is a flowchart showing a priority command determination process according to the fourth embodiment. [Figure 9] FIG. 13 is a diagram illustrating an example of the shortest command issuing interval. [Figure 10] FIG. 1 is a timing diagram illustrating the operation of a memory control circuit (prior art). [Figure 11] FIG. 1 is a timing diagram illustrating the operation of a memory control circuit (prior art). 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 circuit according to the present invention, a memory control circuit that suppresses a performance degradation due to the occurrence of a page miss or switching between read and write will be described below as an example.

[0012] <Configuration of memory control circuit> 1 is a diagram showing a configuration of a memory control circuit 100 according to the first embodiment. The memory control circuit 100 is a circuit that issues an access command to a memory based on an access input received from an external circuit.

[0013] The access holding circuit 110 holds a plurality of access requests received from an external circuit. The bank control circuit 120 includes an active selection circuit 121, a precharge selection circuit 122, and a bank state management circuit 123.

[0014] The active selection circuit 121 determines which of the accesses held by the access holding circuit 110 should activate a bank and issues an active (ACT) command. The precharge selection circuit 122 determines which of the accesses held by the access holding circuit 110 should precharge a bank and issues a precharge (PRE) command. The bank state management circuit 123 monitors the issuance of active and precharge commands to manage the state of the bank.

[0015] The read / write control circuit 130 includes a priority command management circuit 131 and a read / write selection circuit 132 .

[0016] The priority command management circuit 131 uses the bank status managed by the bank status management circuit 123 to determine whether to prioritize the issuance of a command of either access type, read or write. Hereinafter, the access type for which command issuance is prioritized is called a priority command. Details will be described later with reference to FIG. 2. The read / write control circuit 132 determines the access (read or write) corresponding to the access type indicated by the priority command from the accesses held by the access holding circuit 110, and issues a read (RD) command or a write (WR) command.

[0017] <Operation of memory control circuit> 2 is a flowchart for determining a priority command in the first embodiment. Specifically, it shows the operation of the priority command management circuit 131 to determine a priority command. The priority command management circuit 131 determines a priority command in accordance with this flowchart every cycle. Also, when there is no access to the access holding circuit 110, a read is set as the priority command.

[0018] In J101 to J103, the priority command management circuit 131 judges whether or not there is a read and / or write command in the access holding circuit 110. If there is neither a read nor a write command (YES in J101), "read" is set as the priority command (S132). If there is only a read (YES in J102), "read" is set as the priority command (S132). If there is only a write (YES in J103), "write" is set as the priority command (S131).

[0019] If there are both read and write commands (NO in J103), it is determined whether the current priority command is a read or a write command (J100). Note that the current priority command is the access type (read or write) that was determined to be prioritized in the previous cycle.

[0020] If the priority command is "read" (YES in J100), it is determined whether there is an access with the same direction as the priority command ("read" in this case) and the target page already open.If the priority command is "write" (NO in J100), it is determined whether there is an access with the same direction as the priority command ("write" in this case) and the target page already open.

[0021] If there is a corresponding access, the priority command is not changed (S111, S121), and if there is no corresponding access, the priority command is changed (S112, S122).

[0022] Fig. 3 is a timing diagram for explaining the operation of the memory control circuit 100. Fig. 9 is a diagram showing an example of a pre-specified minimum issuance interval between each command. For example, when read commands are issued consecutively, a minimum of four cycles must be provided between the first read command and the second read command.

[0023] Here, the access holding circuit 110 holds three accesses, which are represented as access 0, access 1, and access 2. Each access includes the bank, page, read / write, and number of times. Note that the number of times is decremented each time a read or write command is issued.

[0024] Here, the number of banks is two, and the bank states managed by the bank state management circuit 123 are represented as bank state 0 and bank state 1. Each bank state includes "open / closed, page (if open)" as its contents.

[0025] Furthermore, the command issued by the active selection circuit 121, the precharge selection circuit 122, and the read / write selection circuit 132 to bank 0 is represented as command 0, and the command issued by the active selection circuit 121, the precharge selection circuit 122, and the read / write selection circuit 132 to bank 1 is represented as command 1.

[0026] At T0, bank 0 is closed and bank 1 has page 1 open. At T1, a read command is issued to bank 1 for access 2, and the number of accesses 2 is decremented. At T2, an active command is issued to bank 0 for access 0, and bank state 0 changes to open.

[0027] At T5 and T9, a read command is issued again to bank 1 for access 2, and access 2 is completed and deleted from the access holding circuit 110. At T9, the priority command management circuit 131 changes the priority command to a write because access 1 has a page miss but the page is open and there is no read.

[0028] At T13, a precharge command to bank 1 for access 1 is issued and bank state 1 changes to closed. At T20, a write command to bank 0 for access 0 is issued and the number of access 0 is decremented. At T21, an active command to bank 1 for access 1 is issued and bank state 1 changes to open.

[0029] At T24, T28, and T32, a write command is issued to bank 0 again for access 0, which is completed and removed from the access holding circuit 110. At T32, the priority command management circuit 131 changes the priority command to a read since there is no write to the page open.

[0030] At T43, a read command is issued to bank 1 for access 1, which is completed and removed from the access holding circuit 110.

[0031] <Effects> Fig. 10 is a timing diagram for explaining the operation of a memory control circuit in the conventional technology. Specifically, it shows the operation of the memory control circuit in the conventional technology for an access similar to the access in Fig. 3. In the conventional technology, a write is executed after all reads are executed, so the last write is executed at T52. That is, in the first embodiment, the last read is executed at T43, so it can be seen that the process can be completed earlier than in the conventional technology.

[0032] As described above, according to the first embodiment, the priority command is determined taking into consideration the state of the bank. This makes it possible to suppress performance degradation due to page misses. In particular, if the current priority command can suppress performance degradation due to page misses, the priority command is not switched. On the other hand, if the current priority command cannot suppress performance degradation due to page misses, the priority command is switched.

[0033] Second embodiment In the second embodiment, a mode will be described in which the priority command is determined by further considering the presence or absence of a bank in which a page miss occurs. Note that the configuration of the memory control circuit is the same as that of the first embodiment (FIG. 1), and therefore the description will be omitted.

[0034] <Operation of memory control circuit> 4 is a flowchart for determining a priority command in the second embodiment. Specifically, it shows the operation of the priority command management circuit 131 to determine a priority command. The priority command management circuit 131 determines a priority command in accordance with this flowchart every cycle. Also, when there is no access to the access holding circuit 110, "read" is set as the priority command.

[0035] In steps J201 to J203, the priority command management circuit 131 determines whether or not there is a read and / or write command in the access holding circuit 110. If there is neither a read nor a write command (YES in J201), "read" is set as the priority command (S232). If there is only a read (YES in J202), "read" is set as the priority command (S232). If there is only a write (YES in J203), "write" is set as the priority command (S231).

[0036] If there are both reads and writes (NO in J203), it is determined whether the priority command is a read or a write (J200).

[0037] If the priority command is "read" (YES in J200), it is determined whether or not there is a bank that is experiencing a page miss (J210). If there is a bank that is experiencing a page miss, proceed to J211, and if not, the priority command is not changed (S213). In J211, it is determined whether the time required to execute all of the same directions (here, "read") as the priority command for which the page is open is greater than or equal to the page miss time. If it is greater (or the same) (YES in J211), the priority command is not changed (S211). On the other hand, if it is less than the page miss time (NO in J211), the priority command is changed to "write" (S212).

[0038] If the priority command is "write" (NO in J200), it is determined whether or not there is a bank that is experiencing a page miss (J220). If there is a bank that is experiencing a page miss, proceed to J221, and if not, do not change the priority command (S223). In J221, it is determined whether the time it takes to execute all of the same directions (here, "write") as the priority command for which the page is open is greater than the page miss time. If it is greater (or the same) (YES in J221), do not change the priority command (S221). On the other hand, if it is less (NO in J221), change the priority command to "read" (S222).

[0039] 5 is a timing chart for explaining the operation of the memory control circuit 100. It is assumed that the shortest command issuing interval is the same as in the first embodiment (FIG. 9).

[0040] Here, there are four accesses held by the access holding circuit 110, which are represented as access 0, access 1, access 2, and access 3. Each access includes the bank, page, read / write, and number of times as its contents. Note that the number of times is decremented each time a read or write command is issued.

[0041] Here, the number of banks is three, and the bank states managed by the bank state management circuit 123 are represented as bank state 0, bank state 1, and bank state 2. Each bank state includes "open / closed, page (if open)" as its contents.

[0042] Furthermore, the command issued by the active selection circuit 121, the precharge selection circuit 122, and the read / write selection circuit 132 to bank 0 is represented as command 0, the command to bank 1 as command 1, and the command to bank 2 as command 2.

[0043] At T0, bank 0 is closed, bank 1 has page 1 open, and bank 2 is closed. At T1, a read command is issued to bank 1 for access 2, and the number of accesses 2 is decremented. At T2, an active command is issued to bank 2 for access 3, and bank state 2 changes to open. At T4, an active command is issued to bank 0 for access 0, and bank state 0 changes to open.

[0044] At T5 and T9, a read command is issued again to bank 1 for access 2, and access 2 is completed and deleted from the access holding circuit 110. At T9, the priority command management circuit 131 determines that access 3 is a read with a page open, but that the number of reads is not sufficient to satisfy the page miss time of bank 1, and changes the priority command to a write. The page miss time means the time until the next read becomes possible.

[0045] At T13, a precharge command to bank 1 for access 1 is issued and bank state 1 changes to closed. At T20, a write command to bank 0 for access 0 is issued and the number of access 0 is decremented. At T21, an active command to bank 1 for access 1 is issued and bank state 1 changes to open.

[0046] At T24 and T28, a write command to bank 0 for access 0 is issued again, which is completed and deleted from the access holding circuit 110. At T28, the priority command management circuit 131 changes the priority command to a read since there is no more write. At T39, a read command to bank 1 for access 1 is issued, which is completed and deleted from the access holding circuit 110. At T43, a read command to bank 2 for access 3 is issued, which is completed and deleted from the access holding circuit 110.

[0047] <Effects> Fig. 11 is a timing diagram for explaining the operation of a memory control circuit in the conventional technology. Specifically, it shows the operation of the memory control circuit in the conventional technology for an access similar to the access in Fig. 5. In the conventional technology, a write is executed after all reads are executed, so the last write is executed at T49. That is, in the second embodiment, the last read is executed at T43, so it can be seen that the process can be completed earlier than in the conventional technology.

[0048] As described above, according to the second embodiment, the priority command is determined taking into account the state of the bank, thereby making it possible to suppress performance degradation due to page misses.

[0049] Third embodiment As a third embodiment of the memory control circuit according to the present invention, a memory control circuit that suppresses performance degradation due to page misses and switching between read and write will be described below. In particular, it differs from the first embodiment in that it also takes into account the states of the write data buffer and the read data buffer.

[0050] <Configuration of memory control circuit> 6 is a diagram showing a configuration of a memory control circuit 200 according to the third embodiment. The memory control circuit 200 is a circuit that issues an access command to a memory based on an access input received from an external circuit. The memory control circuit 200 has a write data buffer 210 and a read data buffer 220 added to the memory control circuit 100 of the first embodiment.

[0051] The write data buffer 210 is a write buffer used when data input from an external circuit is written to a memory (not shown). On the other hand, the read data buffer 220 is a read buffer used when an external circuit reads data from a memory (not shown). The priority command control circuit 231 determines a priority command taking into account the states of these buffers.

[0052] <Operation of memory control circuit> Fig. 7 is a flowchart of a priority command determination process in the third embodiment. Specifically, the flowchart shows the operation of the priority command management circuit 231 to determine a priority command. The flowchart in Fig. 7 corresponds to the flowchart in the first embodiment (Fig. 2) to which J300 and J400 have been added.

[0053] If the priority command is "read" (YES in J100) and there is a read with a page open (YES in J110), proceed to J300. In J300, if the usage of the read data buffer is equal to or greater than the threshold (YES in J300), the priority command management circuit 231 changes the priority command to "write" (S112).

[0054] If the priority command is "write" (NO in J100) and there is no write open on the page (NO in J120), the process proceeds to J400. In J400, if the usage of the write data buffer is equal to or greater than the threshold (YES in J400), the priority command management circuit 231 does not change the priority command (S121).

[0055] As described above, according to the third embodiment, while taking into consideration the bank state, when the read data buffer is equal to or greater than the threshold, it is possible to not prioritize "read". Also, when the write data buffer is equal to or greater than the threshold, it is possible to prioritize "write". This makes it possible to further suppress performance degradation due to page misses.

[0056] (Fourth embodiment) In the fourth embodiment, a mode will be described in which the priority command is determined by further considering the presence or absence of a bank during a page miss. Note that the configuration of the memory control circuit is the same as that of the third embodiment (FIG. 6), and therefore the description will be omitted.

[0057] <Operation of memory control circuit> Fig. 8 is a flowchart of a priority command determination process in the fourth embodiment. Specifically, the process shows an operation of the priority command management circuit 231 determining a priority command. The flowchart in Fig. 8 corresponds to the flowchart in the second embodiment (Fig. 4) to which J300 and J400 have been added.

[0058] If the priority command is "read" (YES in J200) and the time to execute all reads for which the page is open is greater than the page miss time of the bank during the page miss (YES in J211), proceed to J300. In J300, the priority command management circuit 231 changes the priority command to "write" (S212) if the usage of the read data buffer is greater than or equal to the threshold (YES in J300).

[0059] If the priority command is "write" (NO in J200) and the time to execute all writes for which the page is open is less than the page miss time of the bank during the page miss (NO in J221), proceed to J400. In J400, if the usage of the write data buffer is equal to or greater than the threshold (YES in J400), the priority command management circuit 231 does not change the priority command (S221).

[0060] As described above, according to the fourth embodiment, while taking into consideration the bank state, when the read data buffer is equal to or greater than the threshold, it is possible to not prioritize "read". Also, when the write data buffer is equal to or greater than the threshold, it is possible to prioritize "write". This makes it possible to further suppress performance degradation due to page misses.

[0061] (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.

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

[0063] 100 memory control circuit; 110 access holding circuit; 120 bank control circuit; 121 active selection circuit; 122 precharge selection circuit; 123 bank state management circuit; 130 read / write control circuit; 131 priority command management circuit; 132 read / write selection circuit

Claims

1. A memory control circuit for accessing a memory including a plurality of banks, comprising: a holding means for holding an access request from an external circuit; a management means for managing the states of the plurality of banks; a determination means for determining whether a command of a read access type or a write access type should be issued with priority; an issuing means for issuing a command of an access request corresponding to an access type determined by the determining means to be prioritized among the access requests held in the holding means; Equipped with The determining means is When only a read access request is held in the holding means, the read request is given priority; When only a write access request is held in the holding means, the write is given priority; When both read and write access requests are held in the holding means, if there is an access that has already opened a page with the access type previously determined to be prioritized, the priority access type is not changed, and if there is no such access, the priority access type is changed. A memory control circuit comprising:

2. Further provided is a bank control means for issuing an active or precharge command.

2. The memory control circuit according to claim 1 .

3. The minimum interval between each command, read, write, active, and precharge, is specified in advance.

3. The memory control circuit according to claim 2.

4. the management means further manages, for each of the plurality of banks, a page miss time until a read or write command can be issued to a certain bank when a page miss occurs in the certain bank, based on the shortest issue interval; The determining means is When only a read access request is held in the holding means, the read request is given priority; When only a write access request is held in the holding means, the write is given priority; If both read and write access requests are held in the holding means and there is no bank in which a page miss has occurred, the priority access type is not changed, When both read and write access requests are held in the holding means and a bank in which a page miss has occurred exists, if the time required to execute all access requests of the same type as the access that has already opened the page among the access requests held in the holding means is equal to or longer than the page miss time, the priority access type is not changed, and if the time required is less than the page miss time, the priority access type is changed.

4. The memory control circuit according to claim 3.

5. The determining means maintains the priority access type as write access regardless of the state of the bank when the access type previously determined to be prioritized is write access and the usage amount of the data write buffer for the memory is equal to or greater than a threshold value.

5. The memory control circuit according to claim 1, wherein the first and second inputs are connected to a first bus.

6. The determining means changes the access type to be prioritized to a write access type when the access type previously determined to be prioritized is a read access type and the usage amount of the buffer for reading data from the memory is equal to or greater than a threshold value.

6. The memory control circuit according to claim 1, wherein the memory control circuit comprises: a first input / output terminal;

7. A method for controlling a memory control circuit that accesses a memory including a plurality of banks, comprising the steps of: The memory control circuit includes a holding unit that holds an access request from an external circuit, and a management unit that manages states of the plurality of banks, and the control method includes: a determining step of determining whether to give priority to a command of a read access type or a write access type; an issuing step of issuing a command of an access request corresponding to the access type determined to be prioritized in the determining step among the access requests held in the holding means; Including, In the determining step, When only a read access request is held in the holding means, the read request is given priority; When only a write access request is held in the holding means, the write is given priority; When both read and write access requests are held in the holding means, if there is an access that has already opened a page with the access type previously determined to be prioritized, the priority access type is not changed, and if there is no such access, the priority access type is changed. A control method comprising:

Citation Information

Patent Citations

  • Memory control device

    JP2002132572A

  • Using the page tag register to track the state of physical pages in the memory device

    JP2002530743A

  • Request arbitration device and memory controller

    JP2008287528A

  • Preferred method for executing commands in memory

    JP2008522289A

  • A system, device, and method for changing the order of memory accesses.

    JP2011505032A