Memory controller and control method therefor

The memory controller addresses complexity and timing issues by synchronizing command issuance with a slower clock, ensuring efficient operation across varying numbers of masters, banks, and frequencies.

JP2024123694APending Publication Date: 2024-09-12CANON KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023031315
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

Existing memory controllers face challenges with increased complexity and timing convergence issues as the number of masters and banks grow, and higher operating frequencies require design changes.

Method used

A memory controller that synchronizes command issuance with a slower clock to manage multiple memory accesses, using retention, generation, determination, and selection mechanisms to ensure timely and efficient command output while adhering to timing constraints.

Benefits of technology

The solution enhances the memory controller's resilience to increased masters, banks, and frequencies without requiring design changes, improving timing convergence and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024123694000001
    Figure 2024123694000001
Patent Text Reader

Abstract

To provide a memory controller that is robust against at least any of an increase in the number of masters, an increase in the number of banks, and an increase in the operating frequency of a memory.SOLUTION: A memory controller has a holding portion for holding a plurality of memory accesses to a memory that operates with a first clock. The memory controller generates a plurality of command requests for causing the memory to operate on the basis of the plurality of memory accesses held by the holding portion, determines, in synchronization with a second clock slower than the first clock, whether or not a plurality of commands corresponding to the plurality of command requests are issuable, on the basis of a constraint on issue timings that are respectively set for the plurality of commands, selects, in synchronization with the second clock, one command to be issued to the memory from among commands that have been determined to be issuable; and outputs the selected one command to the memory in synchronization with the first clock.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 controller and a control method thereof. [Background technology]

[0002] DRAM is generally used as the main memory device of computer systems. As computer systems become more sophisticated and performant, the performance requirements for DRAM are increasing, and it is necessary to maximize the performance of DRAM. DRAM is composed of multiple banks, and a waiting time occurs when activating or precharging a page, which reduces the access efficiency. Patent Document 1 discloses a scheduling technique for improving the performance of DRAM shared by multiple masters, taking into account such characteristics. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent Application No. 2008-030108 Summary of the Invention [Problem to be solved by the invention]

[0004] However, the scheduling circuit disclosed in Patent Document 1 depends on the number of masters (the number of initiators) and the number of banks, and as the number of masters increases, the wiring and timing convergence of the preceding arbiter (inter-master arbitration unit) deteriorates. Also, as the number of banks increases, the number of preceding arbiters (inter-master arbitration units) increases, the circuit scale increases, and the wiring and timing convergence of the succeeding arbiter (inter-bank arbitration circuit) deteriorates. Therefore, when using a memory with a faster operating frequency, a design change is required.

[0005] One aspect of the present invention provides a memory controller that is tolerant to at least one of an increase in the number of masters, an increase in the number of banks, and an increase in the operating frequency of the memory. [Means for solving the problem]

[0006] A memory controller according to an aspect of the present invention includes the following configuration: A holding means for holding a plurality of memory accesses to a memory operated by a first clock; a generating means for generating a plurality of command requests for operating the memory based on the plurality of memory accesses; a determination means for determining whether or not a plurality of commands corresponding to the plurality of command requests can be issued based on constraints on issuance timing set for each of the plurality of commands in synchronization with a second clock slower than the first clock; a selection means for selecting, in synchronization with the second clock, one command to be issued to the memory from among the commands that are determined by the determination means to be issuable; and an output means for outputting the selected one command to the memory in synchronization with the first clock. Effect of the Invention

[0007] According to the present invention, a memory controller that is tolerant to at least one of an increase in the number of masters, an increase in the number of banks, and an increase in the operating frequency of the memory is provided. [Brief description of the drawings]

[0008] [Figure 1] FIG. 2 is a block diagram showing a configuration example of a memory controller according to the first embodiment. [Diagram 2] 4 is a timing chart showing an example of the operation of the memory controller according to the first embodiment. [Diagram 3] 1A is a diagram showing an example of command timing constraints, FIG. 1B is a diagram showing an example of a memory access holding state in a holding circuit, and FIG. 1C is a diagram showing an example of a state in a bank state management circuit. [Figure 4] 5 is a flowchart illustrating the operation of the determination circuit according to the first embodiment. [Diagram 5]FIG. 4 is a timing chart showing an example of the operation of the determination circuit according to the first embodiment. [Figure 6] FIG. 4 is a timing chart showing an example of the operation of the determination circuit according to the first embodiment. [Figure 7] FIG. 11 is a timing chart showing an example of the operation of the memory controller according to the second embodiment. [Figure 8] FIG. 11 is a timing chart showing an example of the operation of the memory controller according to the third embodiment. [Figure 9] 10 is a flowchart illustrating the operation of a determination circuit according to a third embodiment. [Figure 10] FIG. 11 is a timing chart showing an example of the operation of the determination circuit according to the third embodiment. [Figure 11] FIG. 11 is a timing chart showing an example of the operation of the determination circuit according to the third embodiment. [Figure 12] FIG. 11 is a timing chart showing an example of the operation of the determination circuit according to the third embodiment. [Figure 13] FIG. 11 is a timing chart showing an example of the operation of the determination circuit according to the third embodiment. [Figure 14] FIG. 13 is a timing chart showing an example of the operation of the memory controller according to the fourth embodiment. [Figure 15] FIG. 13 is a timing chart showing an example of the operation of the memory controller according to the fifth embodiment. [Figure 16] FIG. 13 is a timing chart showing an example of the operation of the memory controller according to the sixth embodiment. [Figure 17] FIG. 23 is a timing chart showing an example of the operation of the memory controller according to the seventh embodiment. [Figure 18] FIG. 23 is a timing chart showing an example of the operation of the memory controller according to the eighth embodiment. [Figure 19] FIG. 23 is a block diagram showing a configuration example of a memory controller according to a ninth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] 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.

[0010] First Embodiment In the following embodiment, a memory controller having a scheduling function for commands issued to a memory will be described.

[0011] 1 is a block diagram showing an example of the configuration of a memory controller 101 according to the first embodiment. The memory controller 101 generates a command for accessing a memory 900 consisting of multiple banks, and issues the command to the memory 900. The memory 900 operates in synchronization with a predetermined clock (hereinafter, clock 1). A holding circuit 201 holds multiple memory accesses to the memory 900 issued from multiple masters (not shown). A bank state management circuit 601 manages the state of each bank of the memory 900 (for example, whether the bank is in an Open state or a Closed state is managed).

[0012] An ACT request generating circuit 301, a PRE request generating circuit 302, and an RD / WR request generating circuit 303 generate (assert) a plurality of command requests for operating the memory 900 based on a plurality of memory accesses held in the holding circuit 201. The ACT request generating circuit 301 generates an activate command request (hereinafter, ACT request) based on the memory accesses held in the holding circuit 201 and the state of each bank indicated by the bank state management circuit 601. The PRE request generating circuit 302 generates a precharge command request (hereinafter, PRE request) based on the memory accesses held in the holding circuit 201 and the state of each bank indicated by the bank state management circuit 601. The RD / WR request generating circuit 303 generates a read command request (hereinafter, RD request) or a write command request (hereinafter, WR request) based on the memory accesses held in the holding circuit 201 and the state of each bank indicated by the bank state management circuit 601. Each of the ACT request, PRE request, RD request, and WR request includes information indicating a bank to be accessed (target bank).

[0013] The determination circuit 701 determines whether or not a command requested by a command request generated by the ACT request generation circuit 301, the PRE request generation circuit 302, and the RD / WR request generation circuit 303 can be issued based on the constraints of issuance timing set for each command. The determination circuit 701 provides the determination result to the selection circuit 401 in synchronization with a clock 2 that is slower than a clock 1 used by the memory 900. The determination circuit 701 also generates information (hereinafter, referred to as phase information) indicating in which cycle of multiple cycles of the first clock present within one cycle of the second clock the command can be issued for each command.

[0014] The selection circuit 401 selects one command to be issued to the memory 900 from among the commands that are determined by the determination circuit 701 to be issuable, in synchronization with the clock 2. That is, the selection circuit 401 selects a command to be output to the memory 900 from among the commands corresponding to the generated ACT request, PRE request, and RD / WR request, in synchronization with the clock 2, based on the determination result by the determination circuit 701 and phase information. The selection circuit 401 presents the selected command to the output circuit 501 together with phase information indicating in which cycle of the first clock the selected command is to be issued. The output circuit 501 outputs the command to the memory 900 in synchronization with the clock 1 according to the command selected by the selection circuit 401 and the associated phase information.

[0015] FIG. 2 is a timing chart showing an example of the operation of the memory controller 101 according to the first embodiment having the above configuration. In this embodiment, the operating frequency of the clock 1 used in the memory 900 is assumed to be twice the operating frequency of the clock 2 used in the judgment circuit 701 and the selection circuit 401. Therefore, there are two cycles of the clock 1 in one cycle of the clock 2. Also, FIG. 3(a) shows the constraint on the issuance timing between commands in this example. In this example, the constraint on the issuance timing indicates the interval required from the issuance of a command to the issuance of the next command in cycles, and is hereinafter referred to as the cycle constraint. According to this cycle constraint, four or more cycles must be left between the issuance of two consecutive RD commands. Also, four or more cycles must be left between the issuance of two consecutive WR commands. Nine or more cycles must be left between the issuance of an RD command and the issuance of a WR command. Five or more cycles must be left between the issuance of an ACT command and the issuance of a WR command to the same bank. Five or more cycles must be left between the issuance of an RD command and the issuance of a PRE command to the same bank. It is necessary to wait at least five cycles between issuing a PRE command and issuing an ACT command to the same bank.

[0016] FIG. 3(b) is a diagram for explaining the holding of memory accesses by the holding circuit 201. As shown in FIG. 3(b), the holding circuit 201 can hold, for example, four memory accesses. FIG. 3(b) illustrates a state in which three memory accesses are held. The memory access of index 0 is WR, which is a memory access to page 0x0 of bank 1. The memory access of index 1 is RD, which is a memory access to page 0x0 of bank 0. The memory access of index 2 is WR, which is a memory access to page 0x1 of bank 2. It is assumed that one memory access (RD, WR) executes two RDs or two WRs to the memory 900, respectively.

[0017] In the following, the bank state management circuit 601 will be described as starting operation from state 621 in Fig. 3(c). In state 621, bank 0 is in a state where page 0x0 is open. bank 1 is in a state where no page is open. bank 2 is in a state where page 0x0 is open. bank 3 is in a state where no page is open. When page 0x0 of bank 1 is opened in this state, the state transitions from state 621 to state 622, and when bank 2 is closed, the state transitions to state 623.

[0018] The determination circuit 701 determines whether or not each command requested by the ACT request generation circuit 301, the PRE request generation circuit 302, and the RD / WR request generation circuit 303 can be issued, and in what phase the command can be issued, by the process shown in the flowchart of FIG. 4. The operation of the flowchart of FIG. 4 will be described below using an example from when an ACT command is issued to when a WR command is issued. When an ACT command is followed by a WR command, the two commands must be issued with an interval of 5 cycles or more due to the cycle constraint shown in FIG. 3(a). The process shown in FIG. 4 is executed by the determination circuit 701 in synchronization with the clock 2 (for example, executed at the timings of T0, T2, T4, . . . in FIG. 2). The determination circuit 701 determines whether or not a command can be issued and in what phase, so as to minimize the command output interval while satisfying the constraints on the issue timing.

[0019] The determination circuit 701 determines whether a trigger command (ACT command in this example) has been selected (S401). If it is determined that an ACT command has been issued (YES in S401), the determination circuit 701 determines which phase has been specified for that trigger command (S402). In this example, since the operating frequency of clock 1 is twice that of clock 2, there are two cycles of clock 1 in one cycle of clock 2, and these are called phases 0 and 1. If the determination circuit 701 determines that the ACT command and phase 0 have been selected, the determination circuit 701 sets a value obtained by subtracting 2 from the command interval specified by the cycle constraint in the counter. In this example, since the command interval specified by the cycle constraint is 5 cycles, 5-2=3 is set in the counter. By setting "command interval-2" in the counter when the ACT command and phase 0 have been selected, it becomes possible to issue the next command (WR command) in the shortest time under the constraint of the command interval. On the other hand, if the decision circuit 701 decides that an ACT command and phase 1 have been selected, the decision circuit 701 sets the counter to a value obtained by subtracting 1 from the command interval specified by the cycle constraint (S404). In this example, since the command interval is 5 cycles, 5-1=4 is set as the counter value. By setting the counter to "command interval-1" when a trigger command is issued in phase 1, it becomes possible to issue the next WR command in the shortest time possible, under the constraint of the command interval.

[0020] If a trigger command has not been selected (NO in S401), the process proceeds to S405. The decision circuit 701 decides whether the counter value is 2 or more (S405). If the counter value is 2 or more (YES in S405), the decision circuit 701 sets the counter to the counter value -2 (S406), and if the counter value is less than 2 (NO in S405), the decision circuit 701 sets the counter to 0 (S407).

[0021] Next, the decision circuit 701 checks the counter value and branches the process depending on the counter value (S411). If the counter value is 0, the decision circuit 701 decides that the command following the trigger command can be issued in phase 0 and phase 1 (S412). If the counter value is 1, the decision circuit 701 decides that this command cannot be issued in phase 0 but can be issued in phase 1 (S413). If the counter value is 2 or more, the decision circuit 701 decides that this command cannot be issued in either phase 0 or phase 1 (S414).

[0022] FIG. 5 is a timing diagram showing the output timing of the determination result (WR command phase 0 issuance OK and WR command phase 1 issuance OK) by the determination circuit 701 on whether or not to issue a WR command when the ACT command / phase 0 is selected. Assume that the selection circuit 401 selects the ACT command to be issued in phase 0 at T2. Hereinafter, this will be described as ACT command / phase 0. At T4, the determination circuit 701 detects the selection of the ACT command / phase 0 and sets the counter value to 3 (YES in S401, "phase 0" in S402, S403). In this example, since the cycle constraint between the ACT command and the WR command is 5 cycles, "3", which is the value obtained by subtracting 2 from 5, is set in the counter. Since the counter value is 3 at this point, it is not permitted to issue a WR command in either phase 0 or phase 1 of the cycle (S411, S414). Thereafter, at T6, the determination circuit 701 outputs that the WR command cannot be issued in phase 0 and can be issued in phase 1 (S413) because the counter value becomes 1 (S406). In response to this determination result, the selection circuit 401 selects the WR command / phase 1 at T6. In response to this selection, the output circuit 501 outputs the WR command to the memory 900 at timing T8 by clock 1. Thus, as shown in Fig. 5, an ACT command is output at T3 (phase 0) of clock 1, and a WR command is output at T8 (phase 1). Therefore, the interval between these commands is 5 cycles, and the cycle constraint is satisfied.

[0023] FIG. 6 is a timing diagram showing the output timing of the determination result of whether or not the WR command can be issued in each phase when the ACT command / phase 1 is selected as the trigger command. Assume that the selection circuit 401 selects the ACT command / phase 1 at T2. The determination circuit 701 detects the selection of the ACT command / phase 1 at T4 and sets the counter value to 4 (YES at S401, “phase 1” at S402, S404). In this example, the counter value is set to “4”, which is the value obtained by subtracting 1 from the cycle constraint of 5 cycles between the ACT command and the WR command. Since the counter value is 4 at this point, the issuance of the WR command is not permitted in either phase 0 or phase 1. Since the counter value of the determination circuit 701 is also 2 at T6, the issuance of the WR command is not permitted in either phase 0 or phase 1. Thereafter, since the counter value of the determination circuit 701 becomes 0 at T8 (S406), the determination circuit 701 determines that the WR command can be issued in either phase 0 or phase 1 (S412). In response to this determination, the selection circuit 401 selects the WR command / phase 0 at T8. In response to this selection, the output circuit 501 outputs the WR command to the memory 900 at T9 (phase 0) of clock 1. Through the above operations, an ACT command is output at T4 (phase 1), and a WR command is output at T9 (phase 0), as shown in Fig. 6. Therefore, the output interval between these commands is 5 cycles, and the cycle constraint is satisfied.

[0024] The selection circuit 401 selects commands from among commands that can be issued in any of phases 0 to 1, in accordance with a preset priority order for a preset command type. For example, the selection circuit 401 selects commands in the priority order of RD / WR command, ACT command, and PRE command. If an RD command and a WR command are available for issuance and exist, either the RD command or the WR command may be given priority. If it is determined that the same command can be issued in both phases 0 and 1, the selection circuit 401 selects the earlier phase (phase 0).

[0025] Returning to FIG. 2, the operation of the memory controller 101 of this embodiment will be described. At T2, the ACT request generation circuit 301 asserts an ACT request with a target bank of 1 in order to open bank 1 for the memory access of index 0 (FIG. 3(b)). Also, the PRE request generation circuit 302 asserts a PRE request with a target bank of 2 in order to close bank 2 prior to the memory access of index 2 (FIG. 3(b)). Furthermore, the RD / WR request generation circuit 303 asserts an RD request with a target bank of 0 for the first RD for the memory access of index 1 (bank 0 is assumed to be in an open state). Note that it is assumed that issuance is permitted for these three commands in both phases 0 and 1 at the time of T2. Therefore, the selection circuit 401 selects an RD command / phase 0 from among the ACT command, PRE command, and RD command in the above-mentioned priority order. At T3, the output circuit 501 outputs the RD command selected by the selection circuit 401 to the memory 900.

[0026] At T4, the ACT request generation circuit 301 continues to assert an ACT request to open bank 1 for the memory access of index 0. The PRE request generation circuit 302 continues to assert a PRE request to close bank 2 for the memory access of index 2. The RD / WR request generation circuit 303 asserts an RD request for the second RD for the memory access of index 1. Since the RD command was selected in phase 0 at T2, the determination circuit 701 determines that the RD command cannot be issued at the time point of T4. As a result, the selection circuit 401 cannot select the RD command at T4, and selects the ACT command / phase 0 according to the above-mentioned priority order. As a result, the output circuit 501 outputs the ACT command to the memory 900 at T5.

[0027] At T6, the ACT request generation circuit 301 deasserts the ACT request because the memory access that requires the issuance of the ACT command is not held in the holding circuit 201. The PRE request generation circuit 302 continues to assert the PRE request for closing bank 2 for the memory access of index 2. The RD / WR request generation circuit 303 continues to assert the RD request for the second RD for the memory access of index 1. At T6, the judgment circuit 701 judges that the second RD command can be issued in both phases 0 and 1. Therefore, the selection circuit 401 prioritizes the RD command over the PRE command according to a preset priority order, and selects the RD command / phase 0. As a result, the output circuit 501 outputs the RD command to the memory 900 at T7.

[0028] At T8, the PRE request generation circuit 302 continues to assert a PRE request for closing bank 2 for the memory access of index 2. The RD / WR request generation circuit 303 asserts a WR request for the first WR for the memory access of index 0. Since the RD command / phase 0 was selected at T6, the determination circuit 701 does not permit issuance of a WR command at the time point of T8. Therefore, the only command that can be issued at the time point of T8 is the PRE command, and the selection circuit 401 selects the PRE command / phase 0. As a result, the output circuit 501 outputs the PRE command to the memory 900 at T9.

[0029] At T10, the ACT request generation circuit 301 asserts an ACT request to open bank 2 for memory access of index 2. The PRE request generation circuit 302 asserts a PRE request for bank 0 because there is no longer any access to page 0x0 of bank 0. The RD / WR request generation circuit 303 continues to assert a WR request for the first WR for memory access of index 0. Since it was selected to issue an RD command in phase 0 at T6, the decision circuit 701 does not permit issuance of a WR command in either phase 0 or phase 1. Furthermore, since a PRE command / phase 0 to bank 2 was selected at T8, the decision circuit 701 does not permit issuance of an ACT command to bank 2 in either phase 0 or phase 1. Furthermore, since a RD command / phase 0 to bank 0 was selected at T6, the decision circuit 701 determines that a PRE command to bank 0 can be issued in phase 1. As a result, the only command permitted to be issued at T10 is a PRE command to bank 0 in phase 1, and the selection circuit 401 selects this PRE command / phase 1. As a result, the output circuit 501 outputs a PRE command to bank 0 to the memory 900 at T12.

[0030] At T12, the ACT request generation circuit 301 continues to assert an ACT request for opening bank 2 for the memory access of index 2. The RD / WR request generation circuit 303 continues to assert a WR request for the first WR for the memory access of index 0. Since the RD command / phase 0 was selected at T6, the decision circuit 701 does not permit issuance of a WR command at the point of time of T12. On the other hand, since the PRE command / phase 0 to bank 2 was selected at T6, the decision circuit 701 permits issuance of an ACT command in phase 1 to bank 2. The selection circuit 401 selects the PRE command / phase 1 to bank 2, which is permitted to be issued. As a result, the output circuit 501 outputs an ACT command to the memory 900 at T14.

[0031] At T14, the RD / WR request generation circuit 303 continues to assert a WR request for the first WR for the memory access of index 0. At T6, since the RD command / phase 0 is selected, the determination circuit 701 determines that the WR command can be issued in phase 1. The selection circuit 401 selects the WR command / phase 1 that has been determined to be issuable. As a result, the output circuit 501 outputs the WR command to the memory 900 at T16.

[0032] At T16, the RD / WR request generation circuit 303 asserts a WR request for the second WR for the memory access of index 0. Since the WR command / phase 1 was selected at T14, the determination circuit 701 does not permit issuance of the WR command. As a result, there is no command permitted to be issued, and the selection circuit 401 does not select any command. At T18, the RD / WR request generation circuit 303 continues to assert a WR request for the second WR for the memory access of index 0. Since the WR command / phase 1 was selected by the selection circuit 401 at T14, the determination circuit 701 determines that the WR command can be issued in phase 1. In response to this determination, the selection circuit 401 selects the WR command / phase 1. The output circuit 501 outputs the WR command to the memory 900 at T20.

[0033] In the above, in the first embodiment, the selection circuit 401 has been described as issuing a command in a phase in which the command can be issued to the memory 900 at the fastest, among the information indicating whether the command can be issued in each phase generated by the determination circuit 701. However, the selection circuit 401 may issue a command in another phase, as long as the other phase is a phase in which the command can be issued, among the information indicating whether the command can be issued in each phase generated by the determination circuit 701. Furthermore, the selection circuit 401 may output a phase in which command issuance is prohibited.

[0034] As described above, according to the first embodiment, a command to be output from a command request generated in accordance with a memory access held in the holding circuit 201 is selected in synchronization with a clock slower than the memory clock, and the phase of the clock that outputs the command is controlled. This makes it possible to improve timing convergence while appropriately controlling the command interval in accordance with cycle constraints.

[0035] In the embodiment, the selection circuit 401 selects a command in the order of priority: RD / WR command, ACT command, and PRE command, but the present disclosure is not limited to this.

[0036] <Second embodiment> In the first embodiment, the phase is determined so that a command can be issued at the shortest command interval while satisfying the cycle constraint. In the second embodiment, a configuration will be described in which a command is issued to the memory 900 by fixing the phase to a predetermined cycle among the cycles (phases) of the clock 1 present in one cycle of the clock 2.

[0037] FIG. 7 is a timing diagram showing an example of the operation of the memory controller 101 according to the second embodiment. The second embodiment is different from the first embodiment in that the selection circuit 401 selects only commands that can be issued in phase 0. For example, such control can be performed by the selection circuit 401 selecting one command according to priority from among commands that are permitted to be issued in phase 0 by the determination circuit 701. Alternatively, the determination circuit 701 may determine that only commands that can be issued in phase 0 are permitted to be issued. In that case, for example, in the flowchart of FIG. 4, it is sufficient to determine that the command is permitted to be issued only when the counter value is 0 in S411, and not permit issuance in other cases. Note that, although the second embodiment has been described with respect to a configuration in which a command is issued only in phase 0, the present invention is not limited thereto, and any configuration that limits the phase may be used. For example, a command may be selected so that the command is issued only in phase 1.

[0038] By selecting a command only in a fixed phase, the implementation of the decision circuit 701, the selection circuit 401, and the output circuit 501 can be simplified, and the timing convergence can be improved.

[0039] <Third embodiment> In the first and second embodiments, a case is exemplified in which the operating frequency of clock 1 is twice that of clock 2, and two cycles (two phases) of clock 1 exist in one cycle of clock 2. However, the present disclosure is not limited to this, and it is sufficient that clock 1 has an operating frequency N times that of clock 2 (N is a natural number). In this case, the phase information indicates cycles that permit or prohibit command output among the 0th to N-1th cycles of clock 1 that exist in one cycle of clock 2. In the third embodiment, a case is described in which the operating frequency of clock 1 is four times that of clock 2 (N=4), and four cycles (four phases) of clock 1 exist in one cycle of clock 2.

[0040] FIG. 8 is a timing diagram showing an example of the operation of the memory controller 101 according to the third embodiment. The configuration of the memory controller 101 of the third embodiment is similar to that of the first embodiment, but as described above, the operating frequency of the clock 1 used in the memory 900 is four times the operating frequency of the clock 2 used in the memory controller 101. The timing constraints between commands are similar to those of the first embodiment (FIG. 3(a)). Also, it is assumed that the memory access held in the holding circuit 201 is similar to that of the first embodiment (FIG. 3(b)), and the bank state management circuit 601 also starts operation from state 621, as in the first embodiment (FIG. 3(c)).

[0041] 9 is a flow chart for explaining the operation of the determination circuit 701 according to the third embodiment. The determination circuit 701 judges in which phase a command can be issued according to the flow shown in FIG. 9. The operation of the determination circuit 701 will be explained below using an example from when an ACT command is selected until issuance of a WR command is permitted. The process shown in FIG. 9 is executed in synchronization with clock 2.

[0042] First, the determination circuit 701 determines whether an ACT command has been selected as a trigger command (S901). If it is determined that an ACT command has been selected (YES in S901), the determination circuit 701 determines the phase selected for the trigger command (S902) and branches the process according to the determination result. In S903 to S906, a value designated according to each determination result is set in the counter. That is, if the determination circuit 701 determines that the selected phase is phase 0, it sets the counter to a value obtained by subtracting 4 from the value of the command interval (in this example, 5-4=1) (S903). Similarly, if the determination circuit 701 determines that the selected phase is phase 1, it sets the counter to a value obtained by subtracting 3 from the value of the command interval (in this example, 5-3=2) (S904). Also, if the determination circuit 701 determines that the selected phase is phase 2, it sets the counter to a value obtained by subtracting 2 from the value of the command interval (in this example, 5-2=3) (S905). Furthermore, if the decision circuit 701 determines that the selected phase is phase 3, it sets the value obtained by subtracting 1 from the command interval (5-1=4 in this example) in the counter (S906).

[0043] If a trigger command has not been issued (NO in S901), the decision circuit 701 decides whether the counter value is 4 or greater (S907). If it is decided that the counter value is 4 or greater (YES in S907), the decision circuit 701 sets the counter to a value obtained by subtracting 4 from the counter value (S908). On the other hand, if it is decided that the counter value is less than 4 (NO in S907), the decision circuit 701 sets the counter to 0 (S909).

[0044] Next, the decision circuit 701 checks the counter value and branches the process according to the checked counter value (S911). If the counter value is 0, the decision circuit 701 determines that the command can be issued in phase 0 to phase 3 (S912). If the counter value is 1, the decision circuit 701 determines that the command can be issued in phase 1 to phase 3, but cannot be issued in phase 0 (S913). If the counter value is 2, the decision circuit 701 determines that the command can be issued in phase 2 to phase 3, but cannot be issued in phase 0 to phase 1 (S914). If the counter value is 3, the decision circuit 701 determines that the command can be issued in phase 3, but cannot be issued in phase 0 to 2 (S915). If the counter value is 4 or more, the decision circuit 701 determines that the command cannot be issued in phase 0 to phase 3 (cannot be issued in all phases) (S915).

[0045] 10 is a timing diagram showing the output timing of the determination result of whether or not the WR command can be issued by the determination circuit 701 when the ACT command / phase 0 is selected at T0. When the ACT command / phase 0 is selected at T0, the determination circuit 701 sets the counter to 1 at T4 (S903). As a result, the determination circuit 701 determines that the WR command cannot be issued in phase 0, but can be issued in phases 1 to 3 (S913). When the selection circuit 401 selects the WR command / phase 1 in response to this determination result, the output circuit 501 outputs the WR command to the memory 900 at T6 (phase 1) of clock 1. According to the above operation, the ACT command / phase 0 is selected at T0, so that the ACT command is issued at T1, and the WR command is issued at T6, with an interval of 5 cycles between these commands.

[0046] 11 is a timing diagram showing the output timing of the determination result of whether or not the WR command can be issued by the determination circuit 701 when the ACT command / phase 1 is selected at T0. When the ACT command / phase 1 is selected at T0, the determination circuit 701 sets the counter value to 2 at T4 (S904). As a result, the determination circuit 701 determines that the WR command cannot be issued from phase 0 to phase 1, but can be issued from phase 2 to phase 3 (S914). When the selection circuit 401 selects the WR command / phase 2 in response to this determination, the output circuit 501 issues a WR command at T7 (phase 2) of clock 1. According to the above operation, the ACT command / phase 1 is selected at T0, so that the ACT command is issued at T2 and the WR command is issued at T7, and the interval between these commands is 5 cycles.

[0047] 12 is a timing diagram showing the output timing of the determination result of whether or not the WR command can be issued by the determination circuit 701 when the ACT command / phase 2 is selected at T0. When the ACT command / phase 2 is selected at T0, the determination circuit 701 sets the counter to 3 at T4 (S905). As a result, the determination circuit 701 determines that the WR command cannot be issued in phases 0 to 2, but can be issued in phase 3 (S915). When the selection circuit 401 selects the WR command / phase 3 in response to this determination result, the output circuit 501 outputs the WR command at T8 (phase 2) of the clock. According to the above operation, the ACT command / phase 2 is selected at T0, so that the ACT command is issued at T3, and the WR command is issued at T8, so that the interval between these commands is 5 cycles.

[0048] FIG. 13 is a timing diagram showing the output timing of the determination result of whether or not the WR command can be issued by the determination circuit 701 when the ACT command / phase 3 is selected at T0. When the ACT command / phase 3 is selected at T0, the determination circuit 701 sets the counter to 4 at T4 (S905). At this point, the determination circuit 701 determines that the WR command cannot be issued from phase 0 to phase 3. Then, at T8, 4 is subtracted from the counter value and the counter is set to 0 (S908), so the determination circuit 701 determines that the WR command can be issued from phase 0 to phase 3 (S912). At T8, when the selection circuit 401 selects the WR command / phase 0 in response to this determination result, the output circuit 501 outputs the WR command at T9 (phase 0) of clock 1. According to the above operation, the ACT command (phase 3) is selected at T0, so that the ACT command is issued at T4 and the WR command is issued at T9, and the interval between these commands is 5 cycles.

[0049] The selection circuit 401 selects commands in the following order of priority: RD / WR command, ACT command, and PRE command from among commands that can be issued from any of phases 0 to 3. If it is determined that the same command can be issued in multiple phases, the selection circuit 401 selects the command in the earliest phase.

[0050] Returning to FIG. 8, an example of the operation of the memory controller 101 according to the second embodiment will be described. At T4, the ACT request generation circuit 301 asserts an ACT request to open bank 1 for memory access with index 0. The PRE request generation circuit 302 asserts a PRE request to close bank 2 for memory access with index 2. The RD / WR request generation circuit 303 asserts an RD request for the first RD for memory access with index 1. Assume that issuance is permitted in phases 0 to 3 for these three commands at the time of T4. As in the first embodiment, when there are two or more phases (cycles) that are permitted for issuance, the selection circuit 401 adopts the phase with the earliest order. Therefore, the selection circuit 401 selects an RD command / phase 0 from among the ACT command, PRE command, and RD command in the above-mentioned priority order. In response to this selection, the output circuit 501 outputs an RD command to the memory 900 at T5.

[0051] At T8, the ACT request generation circuit 301 continues to assert an ACT request for opening bank 1 for the memory access of index 0. The PRE request generation circuit 302 continues to assert a PRE request for closing bank 2 for the memory access of index 2. The RD / WR request generation circuit 303 asserts an RD request for the second RD for the memory access of index 1. Since the RD command / phase 0 was selected at T4, at the time point of T8, the judgment circuit 701 judges that the RD command can be issued in phases 0 to 3. Therefore, the selection circuit 401 selects the RD command (phase 0) according to the priority order described above. As a result, at T9, the output circuit 501 outputs the (second) RD command to the memory 900.

[0052] At T12, the ACT request generation circuit 301 continues to assert an ACT request for opening bank 1 in response to memory access of index 0. The PRE request generation circuit 302 continues to assert a PRE request for closing bank 2 in response to memory access of index 2. The RD / WR request generation circuit 303 deasserts the RD / WR request since there is no memory access to the open bank. At this point, the commands that are determined to be issuable are the ACT command (phases 0 to 3) and the PRE command (phases 0 to 3), so the selection circuit 401 selects the ACT command / phase 0 in order of priority. In response to this selection, the output circuit 501 outputs the ACT command to the memory 900 at T13.

[0053] At T16, the ACT request generation circuit 301 deasserts the ACT request since there is no memory access that requires the issuance of an ACT command. The PRE request generation circuit 302 continues to assert the PRE request for closing bank 2 for the memory access of index 2. The RD / WR request generation circuit 303 asserts a WR request for the first WR for the memory access of index 0. Since the RD command / phase 0 is selected at T8, the determination circuit 701 sets the counter value to 5 at T12 (S903) and sets the counter value to 1 at T16 (S908). Therefore, when the WR request is asserted at T16, the determination circuit 701 permits the issuance of the corresponding WR command in phases 1 to 3 (S913). Therefore, at this point, it is determined that the PRE command (phases 0 to 3) and the WR command (phases 1 to 3) can be issued. In response to this determination result, the selection circuit 401 selects the WR command / phase 1 at T16. Then, in response to this selection, the output circuit 501 outputs a WR command to the memory 900 at T18.

[0054] At T20, the PRE request generation circuit 302 continues to assert a PRE request for closing bank 2 for the memory access of index 2. The RD / WR request generation circuit 303 asserts a WR request for the second WR for the memory access of index 0. Since the WR command / phase 1 was selected at T16, the counter value becomes 1 at the time of T20 (S904), and the determination circuit 701 determines that the WR command can be issued in phases 1 to 3. Therefore, the selection circuit 401 selects the WR command / phase 1 at T20. Then, the output circuit 501 outputs the WR command to the memory 900 at T22.

[0055] At T24, the PRE request generation circuit 302 continues to assert a PRE request for closing bank 2 in response to the memory access of index 2. The RD / WR request generation circuit 303 deasserts the RD / WR request since there is no memory access to the open bank. At this point, the command that is determined to be issuable is the PRE command (phases 0 to 3), and the selection circuit 401 selects the PRE command / phase 0. In response to this selection, the output circuit 501 outputs the PRE command to the memory 900 at T25.

[0056] At T28, the ACT request generation circuit 301 asserts an ACT request to open page 0x1 of bank 2 for memory access of index 2. Since there is no more memory access to bank 0, the PRE request generation circuit 302 asserts a PRE request to close bank 0. At T24, the PRE command / phase 0 to bank 2 is selected, and the cycle interval between the PRE command and the ACT command to the same bank is 5. Therefore, at the time of T28, the judgment circuit 701 judges that the ACT command of bank 2 can be issued in phases 1 to 3. Therefore, at this time, it is judged that the PRE command (phases 0 to 3) and the ACT command (phases 1 to 3) can be issued, and the selection circuit 401 selects the ACT command / phase 1 in accordance with the priority order. In response to this selection, the output circuit 501 outputs the ACT command to the memory 900 at T30.

[0057] At T32, the PRE request generation circuit 302 continues to assert a PRE request to close bank 0. The RD / WR request generation circuit 303 asserts a WR request for the second WR for the memory access of index 2. Since ACT / phase 1 was selected at T28, the judgment circuit 701 judges at T32 that the WR command cannot be issued in phases 0 and 1, but can be issued in phases 2 and 3. The selection circuit 401 selects WR command / 2 in accordance with the priority order, and as a result, the output circuit 501 outputs the WR command at T35.

[0058] Although the selection circuit 401 selects the command according to the priority order of the command, this is not limited to this. For example, a command that has been determined to be issuable for a long time may be preferentially selected. Alternatively, a command with a younger phase may be preferentially selected. For example, in the above description, the selection circuit 401 selects the ACT command at T28, but the PRE command determined to be issuable in phase 0 may be preferentially selected over the ACT command determined to be issuable in phase 1. In this case, the selection circuit 401 selects the PRE command / phase 0 at T28, and the output circuit 501 outputs the PRE command (bank 0) to the memory 900 at T33. After that, the ACT command is selected at T32.

[0059] As described above, by making the clock 2 used in the memory controller 101 slower than the operating clock (clock 1) of the memory 900, it is possible to improve the timing convergence.

[0060] In the third embodiment, the selection circuit 401 has been described as issuing a command in a phase in which the command can be issued to the memory 900 at the fastest among the information indicating whether or not the command can be issued in each phase generated by the determination circuit 701. However, the selection circuit 401 may issue a command in another phase if the command can be issued among the information indicating whether or not the command can be issued generated by the determination circuit 701. Furthermore, the selection circuit 401 may output a phase in which command issuance is prohibited.

[0061] <Fourth embodiment> In the third embodiment, the phase is determined so that a command can be issued at the shortest command interval while satisfying the cycle constraint. In the fourth embodiment, a configuration is described in which a command is issued to the memory 900 by fixing it to a predetermined cycle among the cycles (phases 0 to 3) of clock 1 present in one cycle of clock 2. FIG. 14 is a timing diagram showing an example of the operation of the memory controller 101 according to the fourth embodiment. As in the third embodiment, there are four cycles of clock 1 in one cycle of clock 2, but in the fourth embodiment, the selection circuit 401 selects a command only in phase 0.

[0062] For example, at T16, as described above in the third embodiment (FIG. 8), it is determined that the PRE command (phases 0 to 3) and the WR command (phases 1 to 3) are issuable. In the third embodiment, the WR command / phase 1 is selected, but in the fourth embodiment, since only a command of phase 0 is selected, the PRE command / phase 0 is selected. As described above, the present embodiment differs from the third embodiment in that the selection circuit 401 selects only commands that have become issuable in phase 0. Such control can be performed, for example, by the selection circuit 401 selecting one command according to priority from among the commands that the determination circuit 701 has permitted to be issued in phase 0. Alternatively, the determination circuit 701 may determine that only commands that have become issuable in phase 0 are issuable. In that case, for example, in the flowchart of FIG. 4, it is sufficient to determine that a command is issuable only when the counter value is 0 (S912), and not permit issuance in other cases.

[0063] As described above, by selecting only commands in phase 0, the implementation of the determination circuit 701, the selection circuit 401, and the output circuit 501 can be simplified, and the timing convergence can be improved. In the fourth embodiment, the command is selected only in phase 0, but the present invention is not limited to this and any phase may be limited. For example, a command may be selected so that it is issued only in phase 1. Also, a plurality of selectable phases may be used, and for example, a command that is available for issuance in phase 0 or phase 2 may be selected using two of the four phases.

[0064] <Fifth embodiment> In the fifth embodiment, a configuration will be described in which one command is selected in synchronization with the clock 2 while the enable signal, which repeats between an enabled state and an disabled state at an operating frequency slower than the clock 2, is in an enabled state. For example, in the fifth embodiment, the operating period of the clock 2 is twice that of the clock 1, and the operating period of the enable signal is twice that of the clock 2. Using this clock enable signal, the ACT request generation circuit 301, the PRE request generation circuit 302, the RD / WR request generation circuit 303, and the selection circuit 401 are configured so that the signal is changed only in the cycle in which the clock enable signal is 1 (enabled state). As a result, for signals with low timing convergence, it is sufficient to determine the signal value by applying multiple clocks of the clock 2. In this way, by synchronizing with the clock 2 and changing the signal only in the cycle in which the clock enable signal is 1, a multi-cycle path can be achieved in which the signal value is determined by applying multiple cycles. FIG. 15 is a timing diagram showing an example of the operation of the memory controller 101 according to the fifth embodiment. The signals generated by the ACT request generation circuit 301, PRE request generation circuit 302, RD / WR request generation circuit 303, and selection circuit 401 are operated so that they change only in one cycle of the clock enable. Here, the clock enable is 1 / 4 times the operating frequency of the clock 1, which allows operation at the same timing as in the third embodiment (FIG. 8). In this way, by operating so that the signal value is determined over multiple clocks, it is possible to improve timing convergence.

[0065] In the fifth embodiment, the ACT request generation circuit 301, the PRE request generation circuit 302, the RD / WR request generation circuit 303, and the selection circuit 401 operate using a clock enable signal, but the present invention is not limited to this. At least one of the ACT request generation circuit 301, the PRE request generation circuit 302, the RD / WR request generation circuit 303, the selection circuit 401, and the determination circuit 701 may use a clock enable signal.

[0066] Sixth embodiment FIG. 16 is a timing diagram showing an example of the operation of the memory controller 101 according to the sixth embodiment. In the sixth embodiment, the selection circuit 401 selects a command only in phase 0 in the fifth embodiment. By selecting a command only in phase 0, the implementation of the determination circuit 701, the selection circuit 401, and the output circuit 501 can be simplified, and the timing convergence can be improved. In the sixth embodiment, the command is selected only in phase 0, but the present invention is not limited thereto, and any phase may be limited. For example, a command may be selected so that the command is issued only in phase 1. Also, a plurality of selectable phases may be used, and for example, a command that is available for issuance in phase 0 or phase 2 out of the four phases may be selected.

[0067] Seventh embodiment FIG. 17 is a timing diagram showing an example of the operation of the memory controller 101 according to the seventh embodiment. In the seventh embodiment, the output circuit 501 operates at clock 1, which is the operating frequency of the memory, and the selection circuit 401 operates at clock 2, which is half the operating frequency of the memory. In addition, the ACT request generation circuit 301, the PRE request generation circuit 302, and the RD / WR request generation circuit 303 operate at clock 3, which is half the operating frequency of clock 2. The timing constraints between commands are the same as those in the first embodiment (FIG. 3(a)). In addition, it is assumed that the memory access held in the holding circuit 201 is the same as in the first embodiment (FIG. 3(b)), and the bank state management circuit 601 also starts operating from state 621, as in the first embodiment (FIG. 3(c)). In addition, when the selection circuit 401 selects a command during a period when clock 3 is 1, it is assumed that the same command is not selected in the next cycle to prevent the command request from being selected twice. For example, when the selection circuit 401 selects a WR command at T20 in Fig. 17, the corresponding WR request is also asserted at T22. The selection circuit 401 must avoid reselecting the WR command corresponding to this WR request.

[0068] The operation of the memory controller 101 of the seventh embodiment will be described with reference to FIG. 17. At T4, the ACT request generation circuit 301 asserts an ACT request for opening bank 1 for memory access with index 0. The PRE request generation circuit 302 asserts a PRE request for memory access with index 2 for closing bank 2. The RD / WR request generation circuit 303 asserts an RD request for the first RD for memory access with index 1. At T4, the determination circuit 701 determines that commands corresponding to these requests can be issued in phases 0 to 3. At T4, the selection circuit 401 selects one command according to priority from commands determined to be issueable in phase 0 or phase 1. Here, the RD command / phase 0 is selected. At T5, the output circuit 501 outputs an RD command to the memory 900. At T6, the ACT request generation circuit 301, the PRE request generation circuit 302, and the RD / WR request generation circuit 303 each maintain the asserted state at T4. Furthermore, the determination circuit 701 maintains the determination result at T4. Since the selection circuit 401 selected the RD command at T4, it ignores this RD command. At T6, the selection circuit 401 selects one command in accordance with the priority order from among the commands that are determined to be issuable in phase 2 or phase 3. In this case, the ACT command / phase 2 is selected. At T7, the output circuit 501 outputs the selected ACT command to the memory 900.

[0069] At T8, the ACT request generation circuit 301 deasserts the ACT request since there is no memory access that requires the issuance of an ACT command. The PRE request generation circuit 302 continues to assert the PRE request for closing bank 2 for the memory access of index 2. The RD / WR request generation circuit 303 asserts the RD request for the second RD for the memory access of index 1. Since the RD command / phase 0 was selected at T4, the determination circuit 701 determines that the RD command corresponding to the second RD request can be issued in phases 0 to 3 at T8. In addition, the state in which the PRE command is determined to be issuable in phases 0 to 3 is maintained. At T8, the selection circuit 401 selects one command according to the priority order from among the commands that are determined to be issuable in phase 0 or phase 1. Here, the RD command / phase 0 is selected. At T9, the output circuit 501 outputs the RD command to the memory 900. At T10, the ACT request generation circuit 301, the PRE request generation circuit 302, and the RD / WR request generation circuit 303 maintain their respective asserted states, and the judgment circuit 701 maintains the state of judgment for each command. The selection circuit 401 ignores the RD command because it selected this RD command at T8. At T10, the selection circuit 401 selects one command in accordance with priority from among the commands that are determined to be issuable in phase 2 or phase 3. In this case, the PRE command / phase 2 is selected. At T11, the output circuit 501 outputs the PRE command for bank 2 to the memory 900.

[0070] At T12, the ACT request generation circuit 301 asserts an ACT request to open bank 2 for memory access of index 2. Since there is no memory access to bank 0, the PRE request generation circuit 302 asserts a PRE request to close bank 0. The RD / WR request generation circuit 303 asserts a WR request for the first WR for memory access of index 0. Since the RD command / phase 0 was selected at T8, the determination circuit 701 determines that the WR command cannot be issued. Since the PRE command / phase 2 for bank 2 was selected at T10, the determination circuit 701 determines that the ACT command for bank 2 can be issued in phase 3. Since the RD command / phase 0 for bank 0 was selected at T8, the determination circuit 701 determines that the PRE command for bank 0 can be issued in phases 1 to 3. The selection circuit 401 selects one of the commands that can be issued in phase 0 or phase 1. Here, the PRE command / phase 1 for bank 0 is selected. At T14, the output circuit 501 outputs the PRE command to the memory 900.

[0071] At T14, the ACT request generation circuit 301, the PRE request generation circuit 302, and the RD / WR request generation circuit 303 maintain the asserted state of the requests at T12. Alternatively, the judgment circuit 701 maintains the judgment state for each command. The selection circuit 401 selects one command according to the priority order from the commands that are judged to be issuable in phase 2 or phase 3. In this example, the ACT command / phase 3 of bank 2 is selected. At T16, the output circuit 501 outputs the ACT command to the memory 900.

[0072] At T16, the ACT request generation circuit 301 deasserts the ACT request since there is no memory access that requires the issuance of an ACT command. The PRE request generation circuit 302 deasserts the PRE request since there is no memory access that requires the issuance of a PRE command. The RD / WR request generation circuit 303 continues to assert the WR request for the first WR for the memory access of index 0. Since the RD command / phase 0 was selected at T8, the determination circuit 701 determines that the WR command can be issued in phases 1 to 3 at this point. Therefore, at T16, the selection circuit 401 selects the WR command / phase 1. In response to this selection, the output circuit 501 outputs the WR command to the memory 900 at T18.

[0073] At T18, the ACT request generation circuit 301, the PRE request generation circuit 302, and the RD / WR request generation circuit 303 maintain their respective asserted states. Alternatively, the determination circuit 701 maintains the determination state for each command. Since the selection circuit 401 selected the WR command at T16, it ignores it at T18. As a result, no command is selected at T18.

[0074] At T20, the RD / WR request generation circuit 303 asserts a WR request for the second WR for the memory access of index 0. Since the determination circuit 701 selected the WR command / phase 1 at T16, it determines that the WR command corresponding to the asserted WR request can be issued in phases 1 to 3. The selection circuit 401 selects the WR command / phase 1. At T22, the output circuit 501 outputs the WR command to the memory 900.

[0075] In this way, by slowing down the clocks of the holding circuit 201, the ACT request generating circuit 301, the PRE request generating circuit 302, and the RD / WR request generating circuit 303, it is possible to improve the timing convergence.

[0076] In the seventh embodiment, the selection circuit 401 has been described as issuing a command in a phase in which the command can be issued to the memory 900 at the fastest, among the information indicating whether a command can be issued in each phase generated by the determination circuit 701. However, the selection circuit 401 may issue a command in another phase, as long as the other phase is a phase in which the command can be issued, among the information indicating whether a command can be issued in each phase generated by the determination circuit 701. Furthermore, the determination circuit 701 may output a phase in which command issuance is prohibited.

[0077] Eighth embodiment FIG. 18 is a timing diagram showing an example of the operation of the memory controller 101 when the selection circuit 401 of the seventh embodiment selects only commands of phase 0. By selecting only commands of phase 0, the implementation of the determination circuit 701, the selection circuit 401, and the output circuit 501 can be simplified, and the timing convergence can be improved. In the eighth embodiment, only commands of phase 0 are selected, but the present invention is not limited to this, and it is sufficient if the selection of commands is limited to a predetermined phase. For example, only commands of phase 0 and commands of phase 2 may be selected. In addition, the selection of a command of a predetermined phase may be performed by the determination circuit 701 determining only commands that can be issued in the predetermined phase, or the selection circuit 401 selecting a command to be issued from commands that can be issued in the predetermined phase.

[0078] <Ninth embodiment> FIG. 19 is a block diagram showing a configuration example of a memory controller 101a according to the ninth embodiment. In the memory controller 101a, the ACT request generation circuit 301 and the PRE request generation circuit 302 of the first embodiment are replaced with an ACT / PRE request generation circuit 321. The ACT / PRE request generation circuit 321 generates one command request, either an ACT command or a PRE command, from a memory access in the holding circuit 201. Any method of selecting whether to generate an ACT command or a PRE command may be used. For example, the ACT / PRE request generation circuit 321 preferentially selects an ACT or PRE command for a memory access that has been held for the longest time among memory accesses that can be issued by an ACT or PRE command held in the holding circuit 201. Alternatively, either an ACT or PRE command may always be preferentially selected. In this way, the configuration of the request generation circuit may be different.

[0079] As described above, the present disclosure relates to a scheduling technique for efficiently using the effective bandwidth of the memory 900. According to each embodiment, the front-stage arbiter arbitrates for each memory command, and the rear-stage arbiter arbitrates between memory commands, and the operating frequency of each arbiter can be selected, so that no design change is required even if the operating frequency of the memory is improved.

[0080] The disclosure of this specification includes the following memory controller and a control method thereof. (Item 1) A holding means for holding a plurality of memory accesses to a memory operated by a first clock; a generating means for generating a plurality of command requests for operating the memory based on the plurality of memory accesses; a determination means for determining whether or not a plurality of commands corresponding to the plurality of command requests can be issued based on constraints on issuance timing set for each of the plurality of commands in synchronization with a second clock slower than the first clock; a selection means for selecting, in synchronization with the second clock, one command to be issued to the memory from among the commands that are determined by the determination means to be issuable; and an output means for outputting the selected one command to the memory in synchronization with the first clock. (Item 2) the determination means attaches, to a command that has been determined to be issuable, phase information indicating a cycle in which the command can be issued among a plurality of cycles of the first clock that exist within one cycle of the second clock; The memory controller according to item 1, characterized in that the output means outputs the selected one command in a cycle indicated by the phase information attached to the selected one command. (Item 3) The memory controller described in item 2, characterized in that when the phase information indicates that the selected command can be issued in two or more cycles, the selection means attaches phase information indicating the earliest cycle to the selected command. (Item 4) 3. The memory controller according to item 2, wherein the selection means selects one command from among commands permitted to be issued in a predetermined cycle according to the phase information. (Item 5) The memory controller according to item 1, characterized in that the determination means determines whether the multiple commands can be issued in a predetermined cycle among multiple cycles of the first clock that exist within one cycle of the second clock. (Item 6) A memory controller as described in any one of items 2 to 4, characterized in that when the first clock has an operating frequency N times that of the second clock (N is a natural number), the phase information indicates cycles that permit or prohibit output of the command among the 0th to N-1th cycles of the first clock that exist in one cycle of the second clock. (Item 7) 7. The memory controller of item 6, wherein N is 2 or 4. (Item 8) The memory controller according to any one of items 1 to 5, characterized in that at least one of the generating means, the judging means, and the selecting means operates in synchronization with the second clock while an enable signal that repeatedly becomes enabled and disabled at an operating frequency slower than the second clock indicates an enabled state. (Item 9) 8. The memory controller according to claim 1, wherein the generating means generates a command request in synchronization with the second clock. (Item 10) 8. The memory controller according to any one of items 1 to 7, wherein the generating means generates a command request in synchronization with a third clock that is slower than the second clock. (Item 11) 11. The memory controller according to any one of items 1 to 10, wherein the type of command is selected from among activate, precharge, read, and write. (Item 12) The memory controller according to any one of items 1 to 11, characterized in that when there are multiple commands that are determined by the determination means to be issuable, the selection means selects one command according to a priority order that is preset for the type of command. (Item 13) 13. The memory controller according to item 12, wherein the priority order is read, write, activate, and precharge, or write, read, activate, and precharge. (Item 14) 14. The memory controller according to item 12 or 13, wherein the selection means preferentially selects a command that has been issued for a long time since it was determined that the command can be issued. (Item 15) 15. The memory controller according to any one of items 1 to 14, wherein the generating means generates a command request with priority to a memory access that has been held in the holding means for a long time. (Item 16) A method for controlling a memory controller using a holding means for holding a plurality of memory accesses to a memory that operates on a first clock, comprising the steps of: generating a plurality of command requests for operating the memory based on the plurality of memory accesses; a determination step of determining whether or not a plurality of commands corresponding to the plurality of command requests can be issued based on constraints on issuance timing set for each of the plurality of commands in synchronization with a second clock slower than the first clock; a selection step of selecting, in synchronization with the second clock, one command to be issued to the memory from among the commands determined to be issuable in the determination step; and an output step of outputting the selected command to the memory in synchronization with the first clock.

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

[0082] 101: memory controller, 102: memory controller, 201: holding circuit, 301: ACT request generation circuit, 302: PRE request generation circuit, 303: RD / WR request generation circuit, 304: ACT / PRE request generation circuit, 401: selection circuit, 501: output circuit, 601: bank state management circuit, 701: determination circuit

Claims

1. holding means for holding a plurality of memory accesses to a memory that operates on a first clock; a generating means for generating a plurality of command requests for operating the memory based on the plurality of memory accesses; a determination means for determining whether or not a plurality of commands corresponding to the plurality of command requests can be issued based on constraints on issuance timing set for each of the plurality of commands in synchronization with a second clock slower than the first clock; a selection means for selecting, in synchronization with the second clock, one command to be issued to the memory from among the commands that have been determined by the determination means to be issuable; an output means for outputting the selected one command to the memory in synchronization with the first clock.

2. the determination means attaches, to a command that has been determined to be issuable, phase information indicating a cycle in which the command can be issued among a plurality of cycles of the first clock that exist within one cycle of the second clock; 2. The memory controller according to claim 1, wherein said output means outputs said selected one command in a cycle indicated by said phase information attached to said selected one command.

3. 3. The memory controller according to claim 2, wherein the selection means, when the phase information indicates that the selected one command can be issued in two or more cycles, attaches phase information indicating an earliest sequence cycle to the selected one command.

4. 3. The memory controller according to claim 2, wherein said selection means selects one command from among commands permitted to be issued in a predetermined cycle according to said phase information.

5. 2. The memory controller according to claim 1, wherein the determination means determines whether or not the plurality of commands can be issued in a predetermined cycle among a plurality of cycles of the first clock that exist within one cycle of the second clock.

6. 3. The memory controller of claim 2, wherein when the first clock has an operating frequency N times that of the second clock (N is a natural number), the phase information indicates cycles that permit or prohibit output of the command among 0th to N-1th cycles of the first clock that exist in one cycle of the second clock.

7. 7. The memory controller of claim 6, wherein N is 2 or 4.

8. 2. The memory controller according to claim 1, wherein at least one of the generating means, the determining means, and the selecting means operates in synchronization with the second clock while an enable signal that repeatedly becomes valid and invalid at an operating frequency slower than the second clock indicates an enabled state.

9. 2. The memory controller according to claim 1, wherein said generating means generates a command request in synchronization with said second clock.

10. 2. The memory controller according to claim 1, wherein said generating means generates the command request in synchronization with a third clock that is slower than said second clock.

11. 2. The memory controller according to claim 1, wherein the type of command is selected from among activate, precharge, read, and write.

12. 2. The memory controller according to claim 1, wherein, when there are a plurality of commands that are determined by the determination means to be issuable, the selection means selects one command in accordance with a priority order that is preset for types of commands.

13. 13. The memory controller according to claim 12, wherein the priority order is read, write, activate, and precharge, or write, read, activate, and precharge.

14. 13. The memory controller according to claim 12, wherein the selection means selects a command with priority given to a command that has been issued for a long time since it was determined that the command can be issued.

15. 2. The memory controller according to claim 1, wherein said generating means generates a command request with priority to a command request corresponding to a memory access that has been held in said holding means for a long time.

16. 1. A method for controlling a memory controller using a holding means for holding a plurality of memory accesses to a memory that operates on a first clock, comprising the steps of: generating a plurality of command requests for operating the memory based on the plurality of memory accesses; a determination step of determining whether or not a plurality of commands corresponding to the plurality of command requests can be issued based on constraints on issuance timing set for each of the plurality of commands in synchronization with a second clock slower than the first clock; a selection step of selecting, in synchronization with the second clock, one command to be issued to the memory from among the commands determined to be issuable in the determination step; an output step of outputting the selected one command to the memory in synchronization with the first clock.

Citation Information

Patent Citations

  • Device for supporting workpiece in laser beam machine

    JP2008030108A