WO2007097030A1 - キャッシュ制御装置およびキャッシュ制御方法 - Google Patents

キャッシュ制御装置およびキャッシュ制御方法 Download PDF

Info

Publication number
WO2007097030A1
WO2007097030A1 PCT/JP2006/303622 JP2006303622W WO2007097030A1 WO 2007097030 A1 WO2007097030 A1 WO 2007097030A1 JP 2006303622 W JP2006303622 W JP 2006303622W WO 2007097030 A1 WO2007097030 A1 WO 2007097030A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
cache
buffer
buffer means
cache memory
Prior art date
Application number
PCT/JP2006/303622
Other languages
English (en)
French (fr)
Inventor
Masaki Ukai
Original Assignee
Fujitsu Limited
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Limited filed Critical Fujitsu Limited
Priority to EP10174845.7A priority Critical patent/EP2261804B1/en
Priority to PCT/JP2006/303622 priority patent/WO2007097030A1/ja
Priority to EP06714759.5A priority patent/EP1990730B1/en
Priority to JP2008501580A priority patent/JP4409620B2/ja
Publication of WO2007097030A1 publication Critical patent/WO2007097030A1/ja
Priority to US12/230,244 priority patent/US8312218B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0893Caches characterised by their organisation or structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0844Multiple simultaneous or quasi-simultaneous cache accessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0844Multiple simultaneous or quasi-simultaneous cache accessing
    • G06F12/0855Overlapped cache accessing, e.g. pipeline
    • G06F12/0857Overlapped cache accessing, e.g. pipeline by multiple requestors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0844Multiple simultaneous or quasi-simultaneous cache accessing
    • G06F12/0855Overlapped cache accessing, e.g. pipeline
    • G06F12/0859Overlapped cache accessing, e.g. pipeline with reload from main memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1056Simplification

Definitions

  • the present invention relates to a cache control device and a cache control method for writing data to a cache memory, and in particular, it is possible to capture a large amount of data to be written to the cache memory while realizing downsizing and low cost of the chip.
  • the present invention relates to a cache control device and a cache control method.
  • Data that is inserted into the cache memory is generally taken in by a data register connected to the cache memory, and written into the cache memory from the data register.
  • Patent Document 1 the amount of data to be moved-in when the load on the main memory increases is increased. As a result of the reduction, the technology for resuming the move-in of the reduced data when the main memory load is reduced is disclosed. [0006] Although the technique of Patent Document 1 can efficiently adjust the data move-in when a cache miss occurs, the processing speed of the CPU that uses the moved-in data is limited by the speed of the main memory. As a result, the increased memory latency cannot be fully covered. Therefore, it may be possible to improve throughput by executing subsequent processes one after another while executing data move-in for cache misses. In this case, since the amount of data that is moved in increases as the number of cache misses that occur at the same time increases, it is desirable to increase the amount of data that can be fetched at one time by the data register that writes data to the cache memory.
  • Patent Document 1 Japanese Patent Laid-Open No. 7-210460
  • the present invention has been made in view of the strong point, and realizes a cache control device and a cache control capable of capturing a large amount of data to be written in a cache memory while realizing a reduction in size and cost of a chip. It aims to provide a method.
  • the present invention provides a cache control device for writing data to a cache memory, wherein the first buffer holds data flowing from the outside for writing to the cache memory Out of data held in the first buffer means, second buffer means for holding data to be written to the cache memory at present, and the data held in the second buffer means And write control means for controlling writing to the cache memory.
  • the present invention is characterized in that, in the above-mentioned invention, the first buffer means includes a RAM having a capacity capable of storing all data that can be simultaneously requested to be written to the cache memory.
  • the present invention further includes monitoring means for monitoring whether or not there is a free area in the second buffer means, and the first buffer means is provided by the monitoring means. When it is confirmed that the second buffer means has an empty area, the data is output to the second buffer means.
  • the second buffer unit is disposed in the vicinity of the cache memory, and the first buffer unit is located farther from the cache memory than the second buffer unit. It is characterized by being arranged.
  • the first buffer means includes external bus control means for controlling inflow of data from a plurality of external buses, and the second buffer means is provided for each external bus. And an area that holds the same amount of data.
  • the present invention is characterized in that, in the above invention, the second buffer means includes an area for holding data for two writes for each external bus.
  • bypass means for bypassing the first buffer means to data flowing in from the outside, and data output from the first buffer means or the bypass means force are also output.
  • selecting means for selecting one of the data to be output to the second buffer means are also output.
  • the selection unit selects data that also outputs the bypass unit force when the second buffer unit includes an empty area.
  • the write control means writes data to the cache memory when data is output from the first buffer means to the second buffer means.
  • the second buffer means is executed.
  • the present invention is a cache control method for writing data to a cache memory, wherein the first holding step of holding data flowing into the cache memory from an external force in a first buffer; Of the data held in the first holding step, the second holding step for holding the data to be written to the cache memory at the present time in the second buffer, and the data held in the second holding step And a writing control step for controlling writing to the cache memory.
  • data that flows into the external memory for writing to the cache memory is held in the first buffer, and among the data held in the first buffer, the data to be written to the cache memory is currently Is stored in the second buffer, and the writing of the data held in the second buffer to the cache memory is controlled.
  • a normal data register is used as the second buffer, it is possible to use a RAM with a small circuit scale of the associated circuit as the first buffer, as well as the inflow and outflow power of data per unit time. As a result, it is possible to capture a large amount of data to be written into the cache memory while realizing a reduction in size and cost of the chip.
  • the first buffer includes a RAM having a capacity capable of storing all the data that can be requested to be written to the cache memory at the same time.
  • the first buffer is issued along with a cache miss. All response data for move-in requests can be stored, and the CPU can perform subsequent processing to improve throughput.
  • whether or not there is an empty area in the second buffer is monitored, and if the first buffer is confirmed that there is an empty area in the second buffer, the data is stored in the second buffer. Output to buffer. This ensures that all data is written to the cache memory without overflowing the second buffer that holds the data written directly to the cache memory. it can.
  • the second buffer is arranged near the cache memory, and the first buffer is arranged farther from the cache memory than the second buffer. Data can be written to the cache memory quickly and the position of the first buffer on the chip can be determined flexibly.
  • the first buffer controls inflow of data having a plurality of external bus powers
  • the second buffer is an area corresponding to each external bus and stores the same amount of data. It has a holding area. For this reason, even when a plurality of external bus power data flows into the chip external force first buffer, the data of each external bus power can be equally written to the cache memory.
  • the second buffer since the second buffer includes an area for holding data for two writes for each external bus, the data for one write is stored in the cache memory. While writing to the memory, the next buffer data can be taken in by the first buffer, and the data can be efficiently written to the cache memory.
  • the second buffer is bypassed for data into which an external force also flows, and either the data output from the first buffer or the data bypassed the first buffer is selected and the second buffer is selected. Output to buffer. This makes it possible for the second buffer to directly fetch data as necessary, saving time required for data input / output to the first buffer.
  • the first buffer when data is output to the second buffer, the first buffer also causes the second buffer to write this data to the cache memory.
  • the data to be written is taken into the second buffer, and the data that has flowed into the chip can be reliably written to the cache memory.
  • FIG. 1 is a block diagram showing a main configuration of a chip according to an embodiment of the present invention.
  • FIG. 2 is a block diagram showing an internal configuration of a data register unit according to one embodiment.
  • FIG. 3 is a diagram showing an example of a packet configuration of move-in data according to one embodiment.
  • FIG. 4 is a diagram showing a state of data inflow into the chip according to one embodiment.
  • FIG. 5-1 is a diagram showing an example of input / output timing of move-in data to the RAM according to the embodiment.
  • FIG. 5-2 is a diagram showing another example of input / output timing of move-in data to the RAM according to the embodiment.
  • FIG. 6 is a diagram showing an example of a circuit arrangement on a chip according to an embodiment. Explanation of symbols
  • FIG. 1 is a block diagram showing a main configuration of a chip according to an embodiment of the present invention.
  • the chip shown in FIG. 1 includes an external bus control unit 101, a move-in (hereinafter abbreviated as “MI”) data RAM 102, a bypass path unit 103, a selector 104, an input / output control unit 105, a monitoring unit 106, a CPU.
  • MIB move-in buffer
  • FIG. 1 four Ml data inflow paths are provided for the chip! /, But the number of Ml data inflow paths may be one or a plurality other than four.
  • the external bus control unit 101 is connected to an upper cache (not shown), main memory, or another chip outside the chip through an external bus, and is a plurality of data inflow paths into the chip (in FIG. 1). Four external buses are controlled, and the Ml data that flows into each external bus is temporarily registered in an internal register. Then, the external bus control unit 101 inputs Ml data from one of the external buses to the Ml data RAM 102 and the bypass path unit 103 at a timing according to the control of the input / output control unit 105.
  • the Ml data RAM 102 stores the Ml data output from the external bus control unit 101, and when the data register unit 108 has a free space for taking in the Ml data, it passes the selector 104 to the data register unit 108. Output Ml data. That is, the Ml data RAM 102 functions as a buffer provided in the preceding stage of the data register unit 108. Specifically, the Ml data RAM 102 is a static random access memory (SRAM) having a capacity capable of storing all Ml data when Ml data is transferred as a response to all move-in requests issued at the same time. ) Etc.
  • SRAM static random access memory
  • the MI data RAM 102 is a buffer of the data register unit 108, it is not necessary to increase the data inflow and outflow per unit time in accordance with the writing to the cache. However, it is necessary to achieve a throughput that corresponds to the inflow of data from the external bus.
  • the bypass path unit 103 bypasses the Ml data output from the external bus control unit 101 and the data register unit 108 has a free area for taking in the Ml data, or the CPU cores 107-1, 107— When outputting Ml data directly to 2, Ml data is output to the data register unit 108 or CPU core 107-1 and 107-2 via the selector 104.
  • the selector 104 selects either the Ml data stored in the Ml data RAM 102 or the Ml data passing through the bypass path unit 103 according to the control of the input / output control unit 105, and the data register unit Output to 108 and CPU core 107-1 and 107-2.
  • the input / output control unit 105 inputs the Ml data flowing into the external bus control unit 101 in the cycle of the external bus to the MI data RAM 102 and the bypass path unit 103 in accordance with the CPU cycle, and the Ml data RAM 102 or bypass Ml data from the path unit 103 is output from the selector 104 as Ml data.
  • the input / output control unit 105 determines the power to select either the Ml data RAM 102 or the bypass path unit 103 according to the availability of the data register unit 108 to be reported.
  • the selector 104 is controlled to output Ml data from the unit.
  • the input / output control unit 105 when the input / output control unit 105 outputs Ml data from the selector 104, the input / output control unit 105 notifies the MIB 109 of information related to the output Ml data.
  • the input / output timing of Ml data by the input / output control unit 105 will be described in detail later.
  • the monitoring unit 106 monitors the availability in the data register unit 108, and if the data register unit 108 has a free capacity for taking in the Ml data, reports the fact to the input / output control unit 105. Although details will be described later, as shown in FIG. 2, the monitoring unit 106 monitors the availability of a move-in data queue (hereinafter abbreviated as “MIDQ”) 108a in the data register unit 108. At this time, the monitoring unit 106 may equally divide the capacity of the MIDQ 108a into the number of external buses, and monitor the free space of the capacity corresponding to each external node. In this way, when multiple external buses are connected to the chip, each external bus The incoming data can be evenly loaded into the MIDQ 108a.
  • MIDQ move-in data queue
  • the CPU cores 107-1 and 107-2 have L1 caches 107a-1 and 107a-2 inside, respectively, and the data stored in the L1 caches 107a-1 and 107a-2, from the L2 cache 111 Predetermined processing is executed using the read data and Ml data from outside the chip.
  • the data register unit 108 once captures data to be written to the L2 cache 111 and data to be read from the L2 cache 111, writes write data including Ml data to the L2 cache 111, and reads the read data, for example, the CPU core 107— 1 and 107-2 L1 caches 107a-1 and 107a-2 are output.
  • the data register unit 108 includes a MIDQ 108a, a write-back data queue (hereinafter abbreviated as “WBDQJ”) 108b, a move-out data queue (hereinafter abbreviated as “MODQ”) 108c, And a read data queue (hereinafter abbreviated as “RDQ”) 108d.
  • WBDQJ write-back data queue
  • MODQ move-out data queue
  • RDQ read data queue
  • the MIDQ 108a captures the Ml data output from the selector 104 and writes the captured MI data to the L2 cache 111.
  • the MIDQ 108a has a capacity capable of capturing two units of data for one external bus. In other words, in this embodiment, since four external buses are connected to the chip, a total capacity of 8 units of data can be acquired. With this configuration, if data is already captured by the MIDQ 108a while it is being captured by the MIDQ 108a! /, The data will be written to the L2 cache 111 and the operation will be performed on all external bus data. !
  • the WBDQ 108b captures the write-back data written back from the L1 caches 107a-1 and 107a-2, and writes the captured write-back data into the L2 cache 111.
  • the MODQ 108c reads out the move-out data ("MO data" in FIG. 2) requested to move out from the L2 cache 111 from the outside of the chip and outputs it to the outside of the chip that requested the move-out.
  • the RDQ 108d reads the read data requested to be read by the CPU cores 107-1 and 107-2 from the L2 cache 111 and outputs the read data to the CPU cores 107-1 and 107-2.
  • the MIB 109 is a buffer for storing a request for a move-in request to the L2 cache 111, and information on the Ml data is notified from the input / output control unit 105. If this is done, the request corresponding to this MI data is deleted, and the fact is notified to the write control unit 110.
  • the write control unit 110 controls the data register unit 108 to write the Ml data corresponding to the request erased from the MIB 109 to the L2 cache 111. Specifically, when the write control unit 110 is notified from the MIB 109 that the request has been deleted, the Ml data corresponding to the deleted request, which is the Ml data captured in the MIDQ 108a, is sent to the L2 cache 111. The data register unit 108 is instructed to write.
  • the L2 cache 111 stores data required by the CPU cores 107-1 and 107-2, and the data required by the CPU cores 107-1 and 107-2 is not stored. In the case (when a cache miss occurs), the desired data is moved in from the higher level cache outside the chip, the main memory, or another chip.
  • external bus control unit 101 controls writing of Ml data to the L2 cache 111, and constitutes a cache control apparatus according to the present embodiment.
  • CPU cores 107-1 and 107-2 request to read data from L2 cache 111, if the L2 cache 111 does not store the desired data and a cache miss occurs, Data move-in to cache, main memory, or other chips is required. The request issued at the time of the move-in request is stored in the MIB 109.
  • Ml data flows into the external bus control unit 101 of the chip as a response to the move-in request.
  • Fig. 1 shows the force that the four Ml data flows into different external bus power external bus control units 101.
  • the timing at which each external bus power Ml data flows in may be overlapping or different.
  • the explanation will continue for the case where Ml data flows into any one external bus.
  • the Ml data flowing into the external bus control unit 101 is composed of, for example, a packet as shown in FIG. It is made.
  • the 4-byte header flows into the external bus control unit 101 in the first cycle of the external bus, and the response data (WORD 0 to 7) that is the main body of the Ml data in the second cycle of the external bus in the ninth cycle It will flow into the control unit 101.
  • the header of the Ml data packet includes an operation code (OPCODE) indicating that this packet is not a command packet, but a parity bit used for packet error detection (OPCODE). PA) etc. are included.
  • a tag that indicates whether the cycle is a header or data. Is added. Specifically, in FIG. 3, for example, a cycle with a tag “001” is a header, a cycle with a tag “100” is data, and a cycle with a tag “101” is at the end of the data. is there.
  • the Ml data that has flowed into the external bus control unit 101 as such a packet is once registered in the register in the external bus control unit 101, and is then controlled by the input / output control unit 105. 101 to Ml data RAM 102 and bypass path 103 are input. At this time, the I / O control unit 105 takes into account the difference between the external bus cycle and the CPU cycle and the difference between the transfer capacity of the external bus and the transfer capacity of the internal bus in the chip.
  • the Ml data is output from the external bus control unit 101 at a speed that does not exceed the data capacity of the register in the external bus control unit 101, and the Ml data is input to the Ml data RAM 102 and the bypass path unit 103.
  • Ml data since the Ml data is input to both the Ml data RAM 102 and the bypass path unit 103, the data that has passed through the bypass path unit 103 can be retransmitted from the Ml data RAM 102. If retransmission of data is unnecessary, Ml data may be input to only one of Ml data RAM 102 and bypass path unit 103 according to the selection by selector 104 below.
  • the monitoring unit 106 constantly monitors the availability of the MIDQ 108a in the data register unit 108, and if there is a free area in the MIDQ 108a that can take in Ml data, the input / output control unit 105 Has been reported. Therefore, if there is an empty area in the MIDQ 108a by the input / output control unit 105, the Ml data RAM 102 or the data is sent to the selector 104. The MI data is output from the path route unit 103 to the MIDQ 108a.
  • the I / O control unit 105 when the Ml data is output from the external bus control unit 101, if there is an empty area in the MIDQ 108a and no Ml data is stored in the Ml data RAM 102, The selector 104 is made to output the Ml data from the bypass path unit 103. Further, if Ml data is already stored in the Ml data RAM 102, the input / output control unit 105 instructs the selector 104 to output the Ml data from the Ml data RAM 102.
  • the Ml data is output to the MIDQ 108a in the order in which the external bus power also flows into the chip, and the Ml data is stored in the Ml data RAM102. If not, the Ml data is directly output from the bypass path unit 103 to the MIDQ 108a, and the time for the Ml data to be written into the Ml data RAM 102 can be reduced.
  • the input / output control unit 105 controls the selector 104 to output from the bypass path unit 103.
  • Ml data may be directly output to CPU cores 107-1 and 107-2.
  • the selector 104 is controlled by the input / output control unit 105 and the Ml data is output to the MIDQ 108a
  • information on the Ml data is notified to the MIB 109.
  • the MIB 109 deletes the request for the move-in request corresponding to the Ml data notified from the input / output control unit 105, and notifies the write control unit 110 to that effect.
  • the write control unit 110 changes the MIB 109 power to the MIDQ 108a in the data register unit 108 to complete the move-in of the corresponding Ml data.
  • the corresponding Ml data is instructed to be written to the L2 cache 111.
  • the MIDQ 108a writes the data to the Ml data force cache 111, and the move-in is completed.
  • the MIDQ 108a has a free space, so the monitoring unit 106 reports that there is a free space to the I / O control unit 105, and again from the selector 104, the Ml data RAM 102 or the bypass Ml data from the route part 103 is output.
  • the timing at which Ml data is input / output to / from the Ml data RAM 102 by the input / output control unit 105 will be described with a specific example. In the following, it is assumed that the CPU cycle is three times faster than the external bus cycle, and the transfer capacity of the internal bus is twice that of the external bus.
  • Ml data the packet shown in FIG. 3 is assumed to flow into the external bus control unit 101.
  • Ml data is received by the chip in the order of header, data WO, data Wl,..., Data W7 every cycle of the external bus (3 cycles of the CPU). . That is, data of 4 bytes is received every 3 cycles of the CPU, and the received data flows into the external bus control unit 101 and is held in the register # 1 in the external bus control unit 101. After that, the data W0 to W7 received 4 bytes at a time according to the transfer capacity of the internal bus are collected into 8 bytes and held in register # 2. At this time, since register # 2 holds data in units of 8 bytes, each 4 bytes of data W0 to W7 is held in register # 2. The time required for receiving data of 8 bytes is 6 CPU It becomes a cycle.
  • Ml data is transferred to the external bus control unit 101 from the four inflow paths of external buses # 1 to # 4. Inflow. As described above, Ml data flows from any of these external buses # 1 to # 4, so that data is transferred from all four external buses to the MI data RAM102 and bypass during 6 CPU cycles. It is necessary to input to the route part 103.
  • CPU cycles are assigned to the external buses # 1 to # 4 respectively, and data from each external bus is input to the Ml data RAM 102 and the bypass path unit 103 in the assigned cycle. It ’s fine. By doing this, the data of the four external buses # 1 to # 4 are input to the Ml data RAM 102 and the bypass path unit 103 in four cycles of the CPU, and the registers in the external bus control unit 101 overflow. There is no.
  • the Ml data RAM 102 Since the amount of data input to the Ml data RAM 102 in one cycle differs depending on the number of external buses, the chip clock rate, and the transfer capacity between the external bus and the internal bus, the Ml data RAM 102 Must be able to accept the amount of data input in one cycle. However, this amount of data is significantly smaller than the amount of data that the MIDQ 108a in the data register unit 108 accepts in one cycle. Therefore, the data register Compared to the case where RAM is used as a substitute, the area of the data bus of the control circuit associated with the Ml data RAM 102 is negligibly small.
  • the Ml data RAM 102 can normally execute only one of reading and writing of data in one cycle. Therefore, if 4 out of 6 cycles are spent inputting data from each external bus # 1 to # 4, then 1 out of the remaining 2 cycles will be used for data output. The remaining one cycle should be a cycle of nothing between data input and output, and it is desirable to prevent interference between data input and output.
  • the L2 cache 111 is more effective than the case where only the data register unit 108 is provided on the chip. A large amount of data to be written can be captured.
  • the Ml data RAM 102 is connected to the MIDQ 108a of the data register unit 108, which is not directly connected to the L2 cache 111, and has a two-stage buffer. Therefore, the inflow and outflow of data per unit time of the Ml data RAM 102 itself may be much smaller than that of the Ml DQ108a.
  • the control circuit associated with the Ml data RAM 102 can reduce the data bus size and cost. Can be planned.
  • the buffer is configured in two stages, and the RAM is connected to MIDQ 108a, so that the location where Ml data RAM102 is placed on the chip where the spatial distance between RAM and MIDQ108a is not limited can be freely determined. can do.
  • This allows flexible circuit layout on the chip. Since the size of the data register unit 108 does not change, as shown in FIG. 6, for example, no function is performed on the chip, and the dead ground (shaded area in the figure) is minimized. Can be suppressed.
  • MIDR indicates the position of the Ml data RAMI 02
  • the control block indicates the position of the processing block such as the input / output control unit 105, the monitoring unit 106, the MIB 109, and the write control unit 110. ! /
  • a RAM for storing Ml data is provided in the preceding stage of the data register in the chip, and the Ml data flowing into the chip is stored, so that data is written to the cache memory.
  • Ml data can be loaded into the chip, and RAM itself does not write to the cache memory! /, So the increase in circuit size and cost due to the RAM is minimal Mu
  • the force that is written in the data force cache 111 in the order of output from the Ml data RAM 102 to the MIDQ 108a for example, the replacement process of the data written in the L2 cache 111 occurs.
  • the present invention can be applied to a case where a large amount of data to be written into the cache memory is captured while realizing a reduction in size and cost of the chip.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

 チップの小型化および低コスト化を実現しつつ、キャッシュメモリに書き込まれるデータを多く取り込むこと。外部バス制御部(101)は、入出力制御部(105)の制御に応じたタイミングで、いずれかの外部バスからのMIデータをMIデータRAM(102)に入力する。MIデータRAM(102)は、MIデータを記憶し、データレジスタ部(108)にMIデータを取り込むための空きが生じるとセレクタ(104)を経由してデータレジスタ部(108)へMIデータを出力する。入出力制御部(105)は、外部バス制御部(101)へ流入するMIデータをCPUサイクルに合わせてMIデータRAM(102)に入力させる。データレジスタ部(108)は、L2キャッシュ(111)へ書き込まれるMIデータを一度取り込んだ後、L2キャッシュ(111)へ書き込む。

Description

明 細 書
キャッシュ制御装置およびキャッシュ制御方法
技術分野
[0001] 本発明は、キャッシュメモリにデータを書き込むキャッシュ制御装置およびキヤッシ ュ制御方式に関し、特に、チップの小型化および低コストィ匕を実現しつつ、キャッシュ メモリに書き込まれるデータを多く取り込むことができるキャッシュ制御装置およびキ ャッシュ制御方法に関する。
背景技術
[0002] 近年、コンピュータなどの情報処理装置にお!、ては、一般にアクセス速度が低!、メ インメモリへのアクセス回数を減らして CPU (Central Processing Unit)の処理速度を 向上させるため、 CPU上にキャッシュメモリが搭載される構成が主流となっている。キ ャッシュメモリは、高速アクセスが可能であるものの、容量がメインメモリよりも小さいた め、 CPUが必要とするデータがキャッシュメモリに記憶されて ヽな ヽ(キャッシュミス) ことがあり、このような場合には、 2次キャッシュなどの上位キャッシュやメインメモリに 記憶されているデータを CPU上のキャッシュメモリヘム一ブインする必要が生じる。
[0003] キャッシュメモリヘム一ブインされるデータは、ー且キャッシュメモリに接続されるデ ータレジスタによって取り込まれ、データレジスタからキャッシュメモリに書き込まれる のが一般的である。
[0004] ところで、近年の技術の目覚しい進歩により、 CPUの処理速度はますます向上して いるとともに、メインメモリの容量はますます増大している。この結果、単位時間当たり に CPUが必要とするデータ量は多くなる一方で、これらのデータをメインメモリから探 し出すのには長時間を要するようになり、 CPUとメインメモリの速度が乖離し、相対的 にメモリレイテンシが増大しつつある。
[0005] このような状況下では、キャッシュメモリへのデータのムーブインを適切に制御する ことが重要になってきており、例えば特許文献 1では、メインメモリの負荷が大きくなる とムーブインするデータ量を削減し、メインメモリの負荷が小さくなると削減した分のデ 一タのム一ブインを再開する技術が開示されて ヽる。 [0006] 特許文献 1の技術では、キャッシュミス発生時のデータのムーブインを効率的に調 整することができるものの、ムーブインされるデータを使用する CPUの処理速度がメ インメモリの速度によって制限されることになり、増大しているメモリレイテンシを完全 にカバーすることはできない。そこで、キャッシュミスに対するデータのムーブインを実 行中に、 CPUが後続する処理を次々に実行してスループットを向上することが考えら れる。この場合、同時期に発生するキャッシュミスが多くなつてムーブインされるデー タ量が増えるため、キャッシュメモリにデータを書き込むデータレジスタが一度に取り 込み可能なデータ量を増カロさせることが望まれる。
[0007] 特許文献 1 :特開平 7— 210460号公報
発明の開示
発明が解決しょうとする課題
[0008] しかしながら、データレジスタの容量を増加させるため、単にデータレジスタ内のデ 一タキユーを大きくすると、現行のチップの面積には収まりきらなくなるため、 CPUが 搭載されるチップの面積の増大を招き、チップの小型化に逆行することになり現実的 ではない。 用することも考えられるが、データレジスタは、キャッシュメモリに書き込まれるデータ を一時的に取り込むものであるため、データレジスタの代用となる RAMは、キヤッシ ュメモリよりは大幅に小さい容量で十分である。そして、容量が小さいにも拘らず、デ ータレジスタの代用として機能しスループットを向上するためには、 RAMの単位時間 当たりのデータの流入量および流出量をキャッシュメモリへの書き込みに合わせて大 きくする必要がある。このため、 RAMの使用に伴う制御回路やデータバスが大きい 面積を占めることになり、結果としてデータレジスタの代用部分が空間的にもコスト的 にも肥大してしまう。
[0010] 本発明は力かる点に鑑みてなされたものであり、チップの小型化および低コストィ匕 を実現しつつ、キャッシュメモリに書き込まれるデータを多く取り込むことができるキヤ ッシュ制御装置およびキャッシュ制御方法を提供することを目的とする。
課題を解決するための手段 [0011] 上記課題を解決するために、本発明は、キャッシュメモリにデータを書き込むキヤッ シュ制御装置であって、前記キャッシュメモリへの書き込み用に外部から流入するデ ータを保持する第 1バッファ手段と、前記第 1バッファ手段に保持されるデータのうち 、現時点で前記キャッシュメモリへの書き込み対象となるデータを保持する第 2バッフ ァ手段と、前記第 2バッファ手段に保持されるデータの前記キャッシュメモリへの書き 込みを制御する書込制御手段とを有することを特徴とする。
[0012] また、本発明は、上記発明において、前記第 1バッファ手段は、前記キャッシュメモ リへの書き込みが同時に要求され得るすべてのデータを記憶可能な容量の RAMを 含むことを特徴とする。
[0013] また、本発明は、上記発明において、前記第 2バッファ手段に空き領域がある力否 かを監視する監視手段をさらに有し、前記第 1バッファ手段は、前記監視手段によつ て前記第 2バッファ手段に空き領域があること確認された場合に、データを前記第 2 ノ ッファ手段へ出力することを特徴とする。
[0014] また、本発明は、上記発明において、前記第 2バッファ手段は、前記キャッシュメモ リの近傍に配置され、前記第 1バッファ手段は、前記第 2バッファ手段よりも前記キヤ ッシュメモリから遠方に配置されることを特徴とする。
[0015] また、本発明は、上記発明において、前記第 1バッファ手段は、複数の外部バスか らのデータの流入を制御する外部バス制御手段を含み、前記第 2バッファ手段は、 外部バスそれぞれに対応する領域であって同量のデータを保持する領域を備えるこ とを特徴とする。
[0016] また、本発明は、上記発明において、前記第 2バッファ手段は、外部バスそれぞれ について 2回の書き込み分のデータを保持する領域を備えることを特徴とする。
[0017] また、本発明は、上記発明において、外部から流入するデータに前記第 1バッファ 手段をバイパスさせるバイパス手段と、前記第 1バッファ手段から出力されるデータま たは前記バイパス手段力も出力されるデータのいずれか一方を選択して前記第 2バ ッファ手段へ出力する選択手段とをさらに有することを特徴とする。
[0018] また、本発明は、上記発明において、前記選択手段は、前記第 2バッファ手段に空 き領域がある場合に、前記バイパス手段力も出力されるデータを選択することを特徴 とする。
[0019] また、本発明は、上記発明において、前記書込制御手段は、前記第 1バッファ手段 から前記第 2バッファ手段へデータが出力されると、このデータの前記キャッシュメモ リへの書き込みを前記第 2バッファ手段に実行させることを特徴とする。
[0020] また、本発明は、キャッシュメモリにデータを書き込むキャッシュ制御方法であって、 前記キャッシュメモリへの書き込み用に外部力 流入するデータを第 1バッファに保 持する第 1保持工程と、前記第 1保持工程にて保持されるデータのうち、現時点で前 記キャッシュメモリへの書き込み対象となるデータを第 2バッファに保持する第 2保持 工程と、前記第 2保持工程にて保持されるデータの前記キャッシュメモリへの書き込 みを制御する書込制御工程とを有することを特徴とする。
発明の効果
[0021] 本発明によれば、キャッシュメモリへの書き込み用に外部力 流入するデータを第 1 ノ ッファに保持し、第 1バッファに保持されるデータのうち、現時点でキャッシュメモリ への書き込み対象となるデータを第 2バッファに保持し、第 2バッファに保持されるデ ータのキャッシュメモリへの書き込みを制御する。このため、第 2バッファとして通常の データレジスタを用いれば、第 1バッファとしては、単位時間当たりのデータの流入量 および流出量力 、さぐ付随する回路の回路規模が小さい RAMなどを用いることが 可能となり、チップの小型化および低コストィヒを実現しつつ、キャッシュメモリに書き込 まれるデータを多く取り込むことができる。
[0022] また、本発明によれば、第 1バッファは、キャッシュメモリへの書き込みが同時に要 求され得るすべてのデータを記憶可能な容量の RAMを含むため、例えばキャッシュ ミスに伴って発行されるすべてのムーブイン要求に対する応答のデータをすベて記 憶することができ、 CPUが後続する処理を実行してスループットを向上することがで きる。
[0023] また、本発明によれば、第 2バッファに空き領域がある力否かを監視し、第 1バッファ は、第 2バッファに空き領域があること確認された場合に、データを第 2バッファへ出 力する。このため、直接キャッシュメモリに書き込まれるデータを保持する第 2バッファ が溢れてしまうことがなぐ確実にすべてのデータをキャッシュメモリに書き込むことが できる。
[0024] また、本発明によれば、第 2バッファは、キャッシュメモリの近傍に配置され、第 1バッ ファは、第 2バッファよりもキャッシュメモリから遠方に配置されるため、第 2バッファか らキャッシュメモリへのデータの書き込みが迅速に実行されるとともに、第 1バッファの チップ上での位置を柔軟に決定することができる。
[0025] また、本発明によれば、第 1バッファは、複数の外部バス力ものデータの流入を制 御し、第 2バッファは、外部バスそれぞれに対応する領域であって同量のデータを保 持する領域を備える。このため、チップ外力 第 1バッファへ複数の外部バス力 デー タが流入する場合でも、それぞれの外部バス力 のデータを均等にキャッシュメモリ に書き込むことができる。
[0026] また、本発明によれば、第 2バッファは、外部バスそれぞれにつ!/、て 2回の書き込み 分のデータを保持する領域を備えるため、 1回の書き込み分のデータをキャッシュメ モリに書き込む間に、次の書き込み分のデータを第 1バッファ力も取り込むことができ 、効率的にキャッシュメモリへのデータの書き込みを実行することができる。
[0027] また、本発明によれば、外部力も流入するデータに第 1バッファをバイパスさせ、第 1バッファから出力されるデータまたは第 1バッファをバイパスしたデータのいずれか 一方を選択して第 2バッファへ出力する。このため、必要に応じて第 2バッファが直接 データを取り込むことが可能となり、第 1バッファへのデータの入出力に要する時間を 省くことができる。
[0028] また、本発明によれば、第 2バッファに空き領域がある場合に、第 1バッファをバイパ スしたデータを選択するため、第 2バッファに空き領域があり、第 1バッファへのデータ の入出力に要する時間が無駄になる場合、チップにデータが流入して力 キャッシュ メモリに書き込まれるまでの時間を短縮することができる。
[0029] また、本発明によれば、第 1バッファ力も第 2バッファへデータが出力されると、この データのキャッシュメモリへの書き込みを第 2バッファに実行させるため、キャッシュメ モリへの書き込み時には書き込み対象のデータが第 2バッファに取り込まれており、 チップに流入したデータを確実にキャッシュメモリに書き込むことができる。
図面の簡単な説明 [0030] [図 1]図 1は、本発明の一実施の形態に係るチップの要部構成を示すブロック図であ る。
[図 2]図 2は、一実施の形態に係るデータレジスタ部の内部構成を示すブロック図で ある。
[図 3]図 3は、一実施の形態に係るムーブインデータのパケット構成の一例を示す図 である。
[図 4]図 4は、一実施の形態に係るチップへのデータ流入の様子を示す図である。
[図 5-1]図 5— 1は、一実施の形態に係る RAMへのムーブインデータの入出力タイミ ングの一例を示す図である。
[図 5-2]図 5— 2は、一実施の形態に係る RAMへのムーブインデータの入出力タイミ ングの他の一例を示す図である。
[図 6]図 6は、一実施の形態に係るチップ上の回路配置の一例を示す図である。 符号の説明
[0031] 101 外部バス制御部
102 Mlデータ RAM
103 バイパス経路部
104 セレクタ
105 入出力制御部
106 監視部
107—1、 107- 2 CPUコア
107a— 1、 107a— 2 ΙΛキャッシュ
108 データレジスタ部
108a MIDQ
108b WBDQ
108c MODQ
108d RDQ
109 MIB
110 書込制御部 111 L2キャッシュ
発明を実施するための最良の形態
[0032] 以下、本発明の一実施の形態について、図面を参照して詳細に説明する。なお、 以下では、それぞれ 1次キャッシュ(L1キャッシュ)を備えた 2つの CPUコアおよび 2 次キャッシュ(L2キャッシュ)が 1つのチップに搭載されており、 L2キャッシュへのデー タのム一ブインが行われる場合について説明する力 本発明は、他のキャッシュへの データの書き込み時にも同様に適用することができる。
[0033] 図 1は、本発明の一実施の形態に係るチップの要部構成を示すブロック図である。
図 1に示すチップは、外部バス制御部 101、ムーブイン (Move-in:以下「MI」と略記 する)データ RAM102、バイパス経路部 103、セレクタ 104、入出力制御部 105、監 視部 106、 CPUコア 107— 1、 107— 2、 L1キャッシュ 107a— 1、 107a— 2、データ レジスタ部 108、ムーブインバッファ(Move- in Buffer:以下「MIB」と略記する) 109、 書込制御部 110、および L2キャッシュ 111を有している。なお、図 1においては、チッ プに対して 4つの Mlデータの流入パスが設けられて!/、るが、 Mlデータの流入パス数 は、 1でも 4以外の複数でも良い。
[0034] 外部バス制御部 101は、チップ外の図示しない上位キャッシュ、メインメモリ、または 他のチップなどと外部バスを通じて接続されており、チップ内へのデータの流入パス となる複数(図 1では 4つ)の外部バスを制御し、各外部バス力 流入する Mlデータを 一時的に内部のレジスタに登録する。そして、外部バス制御部 101は、入出力制御 部 105の制御に応じたタイミングで、いずれかの外部バスからの Mlデータを Mlデー タ RAM 102およびバイパス経路部 103に入力する。
[0035] Mlデータ RAM102は、外部バス制御部 101から出力される Mlデータを記憶し、 データレジスタ部 108に Mlデータを取り込むための空きが生じるとセレクタ 104を経 由してデータレジスタ部 108へ Mlデータを出力する。すなわち、 Mlデータ RAM10 2は、データレジスタ部 108の前段に設けられたバッファとして機能する。具体的には 、 Mlデータ RAM102は、同時期に発行されるすべてのムーブイン要求に対する応 答として Mlデータが転送されてきた場合、すべての Mlデータを記憶可能な容量の S RAM (Static Random Access Memory)などから構成されている。 [0036] この MIデータ RAM102は、データレジスタ部 108のバッファであるため、単位時間 当たりのデータの流入量および流出量をキャッシュへの書き込みに合わせて大きくす る必要はない。ただし、外部バスからのデータの流入量に対応する程度のスループッ トを達成する必要はある。
[0037] バイパス経路部 103は、外部バス制御部 101から出力される Mlデータをバイパスし 、データレジスタ部 108に Mlデータを取り込むための空き領域がある場合や、 CPU コア 107—1、 107— 2へ直接 Mlデータを出力する場合に、セレクタ 104を経由して データレジスタ部 108または CPUコア 107— 1、 107— 2へ Mlデータを出力する。
[0038] セレクタ 104は、入出力制御部 105の制御に応じて、 Mlデータ RAM102に記憶さ れている Mlデータまたはバイパス経路部 103を通過する Mlデータのいずれか一方 を選択し、データレジスタ部 108および CPUコア 107— 1、 107— 2へ出力する。
[0039] 入出力制御部 105は、外部バスのサイクルで外部バス制御部 101へ流入する Ml データを CPUサイクルに合わせて MIデータ RAM 102およびバイパス経路部 103に 入力させるとともに、 Mlデータ RAM102またはバイパス経路部 103からの Mlデータ をセレクタ 104から Mlデータを出力させる。このとき、入出力制御部 105は、監視部 1 06力 報告されるデータレジスタ部 108の空き状況に応じて、 Mlデータ RAM102 およびバイパス経路部 103のどちらを選択する力決定し、決定された処理部からの Mlデータを出力するようにセレクタ 104を制御する。
[0040] また、入出力制御部 105は、セレクタ 104から Mlデータを出力させると、出力され た Mlデータに関する情報を MIB109へ通知する。なお、入出力制御部 105による Mlデータの入出力のタイミングについては、後に詳述する。
[0041] 監視部 106は、データレジスタ部 108における空き状況を監視し、データレジスタ 部 108に Mlデータを取り込む空き容量がある場合に、その旨を入出力制御部 105 へ報告する。なお、詳細は後述するが、監視部 106は、図 2に示すように、データレ ジスタ部 108内のムーブインデータキュー(以下「MIDQ」と略記する) 108aの空き状 況を監視する。このとき、監視部 106は、 MIDQ108aの容量を外部バスの数に等分 し、それぞれの外部ノ スに対応する容量の空き領域を監視するようにしても良い。こう することにより、チップに複数の外部バスが接続されている場合、各外部バスから流 入するデータを均等に MIDQ108aへ取り込ませることができる。
[0042] CPUコア 107— 1、 107— 2は、それぞれ内部に L1キャッシュ 107a— 1、 107a— 2 を備えており、 L1キャッシュ 107a— 1、 107a— 2に記憶されたデータ、 L2キャッシュ 111から読み出されたデータ、およびチップ外からの Mlデータなどを用いて所定の 処理を実行する。
[0043] データレジスタ部 108は、 L2キャッシュ 111へ書き込まれるデータおよび L2キヤッ シュ 111から読み出されるデータを一度取り込み、 Mlデータを含む書き込みデータ を L2キャッシュ 111へ書き込み、読み出しデータを例えば CPUコア 107— 1、 107— 2の L1キャッシュ 107a— 1、 107a— 2などへ出力する。具体的には、データレジスタ 部 108は、例えば図 2に示すように、 MIDQ108a、ライトバックデータキュー(以下「 WBDQJと略記する) 108b,ムーブアウトデータキュー(以下「MODQ」と略記する) 108c,およびリードデータキュー(以下「RDQ」と略記する) 108dを有している。
[0044] MIDQ108aは、セレクタ 104から出力される Mlデータを取り込み、取り込まれた M Iデータを L2キャッシュ 111に書き込む。 MIDQ108aは、 1つの外部バスについて 2 単位のデータを取り込み可能な容量を有している。すなわち、本実施の形態におい ては、 4つの外部バスがチップに接続されているため、合計で 8単位のデータを取り 込み可能な容量を有している。この構成により、データが MIDQ108aに取り込まれ て 、る最中に、既に MIDQ108aに取り込まれて!/、るデータを L2キャッシュ 111に書 き込むと 、う動作がすべての外部バスからのデータにつ!、て可能となる。
[0045] WBDQ108bは、 L1キャッシュ 107a— 1、 107a— 2から書き戻されるライトバックデ ータを取り込み、取り込まれたライトバックデータを L2キャッシュ 111に書き込む。 M ODQ108cは、 L2キャッシュ 111からのムーブアウトがチップの外部から要求された ムーブアウトデータ(図 2では「MOデータ」)を L2キャッシュ 111から読み出し、ムー ブアウト要求元のチップ外部へ出力する。 RDQ108dは、 CPUコア 107—1、 107— 2によって読み出しが要求されたリードデータを L2キャッシュ 111から読み出し、 CP Uコア 107— 1、 107— 2へ出力する。
[0046] 図 1に戻って、 MIB109は、 L2キャッシュ 111へのムーブインを要求するリクエスト を記憶するバッファであり、入出力制御部 105から Mlデータに関する情報が通知さ れると、この MIデータに対応するリクエストを消去するとともに、その旨を書込制御部 110へ通知する。
[0047] 書込制御部 110は、 MIB109から消去されたリクエストに対応する Mlデータを L2 キャッシュ 111に書き込むようにデータレジスタ部 108を制御する。具体的には、書込 制御部 110は、 MIB109からリクエストを消去した旨が通知されると、 MIDQ108aに 取り込まれている Mlデータであって消去されたリクエストに対応する Mlデータを L2 キャッシュ 111へ書き込むようにデータレジスタ部 108に指示する。
[0048] L2キャッシュ 111は、 CPUコア 107—1、 107— 2によって必要とされるデータを記 憶しており、 CPUコア 107—1、 107— 2が必要とするデータが記憶されていない場 合 (キャッシュミスが発生した場合)には、チップ外の上位キャッシュ、メインメモリ、ま たは他のチップなどから所望のデータがムーブインされる。
[0049] これらの処理ブロックのうち、外部バス制御部 101、 Mlデータ RAM102、バイパス 経路部 103、セレクタ 104、入出力制御部 105、監視部 106、データレジスタ部 108 、 MIB109、および書込制御部 110は、 L2キャッシュ 111への Mlデータの書き込み を制御しており、本実施の形態に係るキャッシュ制御装置を構成して 、る。
[0050] 次いで、上記のように構成されたチップの L2キャッシュ 111へのデータムーブイン 時における動作にっ 、て説明する。
[0051] CPUコア 107— 1、 107— 2によって L2キャッシュ 111からのデータの読み出しが 要求された際、 L2キャッシュ 111に所望のデータが記憶されておらずキャッシュミス が発生すると、チップ外の上位キャッシュ、メインメモリ、または他のチップなどへデー タのム一ブインが要求される。このムーブイン要求時に発行されるリクエストは、 MIB 109に記憶される。
[0052] その後、このムーブイン要求に対する応答として、チップの外部バス制御部 101に Mlデータが流入する。図 1は 4つの Mlデータがそれぞれ異なる外部バス力 外部バ ス制御部 101に流入する様子を示している力 各外部バス力 Mlデータが流入する タイミングは重なっていても異なっていても良い。ここでは、いずれか 1つの外部バス 力も Mlデータが流入する場合について説明を続ける。
[0053] 外部バス制御部 101に流入する Mlデータは、例えば図 3に示すようなパケットで構 成されている。すなわち、外部バスの 1サイクル目で 4バイトのヘッダが外部バス制御 部 101へ流入し、外部バスの 2サイクル目力 9サイクル目で Mlデータの本体である 応答データ (WORD0〜7)が外部ノ ス制御部 101へ流入することになる。図 3に示 すように、 Mlデータのパケットのヘッダには、このパケットがコマンドなどのパケットで はなくデータパケットであることを示すオペコード(OPCODE)や、パケットの誤り検出 に用いられるパリティビット (PA)などが含まれて 、る。
[0054] また、外部バスの各サイクルで流入するデータ量は 4バイト( = 32ビット)であるが、 それぞれのサイクルの先頭には、当該サイクルがヘッダであるかデータであるかを示 すタグが付加されている。具体的には、例えば図 3において、タグが「001」のサイク ルはヘッダであり、タグが「100」のサイクルはデータであり、さらにタグが「101」であ るサイクルはデータの末尾である。
[0055] このようなパケットとして外部バス力 外部バス制御部 101へ流入した Mlデータは、 外部バス制御部 101内のレジスタに一度登録された後、入出力制御部 105の制御 によって外部バス制御部 101から Mlデータ RAM102およびバイパス経路部 103に 入力される。このとき、入出力制御部 105は、外部バスのサイクルと CPUサイクルとの 違いや外部バスの転送容量とチップ内の内部バスの転送容量との違いなどを考慮し て、外部バス力 流入する Mlデータが外部バス制御部 101内のレジスタのデータ許 容量を超えない速度で外部バス制御部 101から Mlデータを出力させ、 Mlデータを Mlデータ RAM102およびバイパス経路部 103に入力する。なお、本実施の形態に おいては、 Mlデータを Mlデータ RAM102およびバイパス経路部 103の双方に入 力するため、バイパス経路部 103を通過したデータを Mlデータ RAM102から再送 することができるが、データの再送が不要であれば、以下のセレクタ 104による選択 に応じて、 Mlデータを Mlデータ RAM102およびバイパス経路部 103のいずれか一 方のみに入力するようにしても良 、。
[0056] 一方、監視部 106によって、データレジスタ部 108の MIDQ 108aの空き状況が常 に監視されており、 MIDQ108aに Mlデータを取り込み可能な空き領域があれば、 その旨が入出力制御部 105へ報告されている。そこで、入出力制御部 105によって 、 MIDQ108aに空き領域があれば、セレクタ 104に Mlデータ RAM102またはバイ パス経路部 103から MIDQ108aへ MIデータを出力させる。
[0057] このとき、入出力制御部 105は、 Mlデータが外部バス制御部 101から出力される 時点で MIDQ108aに空き領域があり、かつ、 Mlデータ RAM102に Mlデータが記 憶されていなければ、セレクタ 104にバイパス経路部 103からの Mlデータを出力さ せるようにする。また、入出力制御部 105は、 Mlデータ RAM102に既に Mlデータ が記憶されていれば、セレクタ 104に Mlデータ RAM102からの Mlデータを出力さ せるよう〖こする。
[0058] このようにセレクタ 104から出力される Mlデータが選択されることにより、外部バス 力もチップに流入した順序で Mlデータが MIDQ108aへ出力されるとともに、 Mlデ ータ RAM102に Mlデータが記憶されていない場合は、バイパス経路部 103から直 接 Mlデータが MIDQ 108aへ出力され、 Mlデータが Mlデータ RAM 102に書き込 まれる時間を削減することができる。
[0059] また、入出力制御部 105は、例えばプリフェッチ時など CPUコア 107— 1、 107- 2 が直接 Mlデータを要求している場合は、セレクタ 104を制御してバイパス経路部 10 3からの Mlデータを直接 CPUコア 107—1、 107— 2へ出力させるようにしても良い。
[0060] そして、入出力制御部 105によってセレクタ 104が制御され、 Mlデータが MIDQ1 08aへ出力されると、この Mlデータに関する情報が MIB109へ通知される。そして、 MIB109によって、入出力制御部 105から通知された Mlデータに対応するムーブイ ン要求のリクエストが消去され、その旨が書込制御部 110へ通知される。ムーブイン 要求のリクエストが MIB109から消去されると、対応する Mlデータのムーブインを完 了するため、書込制御部 110によって、データレジスタ部 108内の MIDQ108aに対 して、 MIB109力 消去されたリクエストに対応する Mlデータの L2キャッシュ 111へ の書き込みが指示される。この指示を受け、 MIDQ108aによって、 Mlデータ力 キ ャッシュ 111へ書き込まれ、ムーブインが完了する。
[0061] 以降、ムーブインが完了すると、 MIDQ108aには空き領域ができるため、監視部 1 06によって空き領域があることが入出力制御部 105へ報告され、再びセレクタ 104か ら、 Mlデータ RAM102またはバイパス経路部 103からの Mlデータが出力されること になる。 [0062] 次に、入出力制御部 105によって、 Mlデータ RAM102に Mlデータが入出力され るタイミングについて、具体例を挙げながら説明する。以下では、 CPUサイクルは外 部バスのサイクルの 3倍の速度であり、内部バスの転送容量は外部バスの転送容量 の 2倍であるとする。また、 Mlデータとしては、図 3に示したパケットが外部バス制御 部 101へ流入しているものとする。
[0063] 図 4に示すように、 Mlデータは、外部バスの 1サイクル(CPUの 3サイクル)ごとにへ ッダ、データ WO、データ Wl、 · ··、データ W7の順にチップに受信される。すなわち、 CPUの 3サイクルにっき 4バイトずつのデータが受信され、受信データは、外部バス 制御部 101に流入し、外部バス制御部 101内のレジスタ # 1に保持される。その後、 内部バスの転送容量に合わせて、 4バイトずつ受信されたデータ W0〜W7が 8バイト ずつにまとめられてレジスタ # 2に保持される。このとき、レジスタ # 2が 8バイトを単位 としてデータを保持するため、それぞれの 4バイトのデータ W0〜W7がレジスタ # 2に 保持される時間は、 8バイト分のデータの受信に要する CPUの 6サイクルとなる。
[0064] 以上は 1つの外部ノ スからのデータの流入を示している力 本実施の形態におい ては、外部バス # 1〜# 4の 4つの流入パスから外部バス制御部 101に Mlデータが 流入する。これらのいずれの外部バス # 1〜# 4からも上述したのと同様に Mlデータ が流入しているため、 CPUの 6サイクルの間に 4つの外部バスすベてからデータを M Iデータ RAM102およびバイパス経路部 103に入力する必要がある。ここでは、それ ぞれ外部バス # 1〜# 4に CPUの 1サイクルずつ割り当てて、割り当てられたサイク ルで各外部バスからのデータを Mlデータ RAM102およびバイパス経路部 103に入 力するようにすれば良い。こうすることにより、 4つの外部バス # 1〜# 4のデータは、 CPUの 4サイクルで Mlデータ RAM102およびバイパス経路部 103に入力されること になり、外部バス制御部 101内のレジスタが溢れることがない。
[0065] このように外部バスの数、チップのクロックレート、および外部バスと内部バスの転送 容量の差などにより、 1サイクルで Mlデータ RAM102に入力されるデータ量が異な るため、 Mlデータ RAM102は、 1サイクルで入力されるデータ量を受け付け可能で ある必要がある。ただし、このデータ量は、データレジスタ部 108内の MIDQ 108aが 1サイクルで受け付けるデータ量よりも大幅に少ない。したがって、データレジスタの 代用として RAMが用いられる場合と比して、 Mlデータ RAM102に付随する制御回 路ゃデータバスの面積は無視できるほど小さい。
[0066] ところで、 Mlデータ RAM102は、通常 1サイクル中にデータの読み書きの一方し か実行することができない。そのため、 6サイクル中 4サイクルが各外部バス # 1〜# 4 からのデータの入力に費やされると、残りの 2サイクル中 1サイクルは、データの出力 に用いられる。そして、さらに残りの 1サイクルは、データの入力と出力の間の何もしな いインターバルのサイクルとしておき、データの入出力間での干渉を防止するのが望 ましい。
[0067] このように、外部バス # 1〜 # 4の 4つの外部ノ スがチップに接続されて 、る場合は 、内部バスの転送容量や CPUのクロックレートによるチップ内部でのスループットが 外部バスの少なくとも 6倍であれば、図 5— 1に示すように、 6サイクル中にすべての外 部バス # 1〜# 4からのデータが Mlデータ RAM102に入力されるとともに、このデー タが Mlデータ RAM102から出力される。このとき、外部バス # 1〜# 4すべてから同 じタイミングでデータが流入するとは限らないが、例えば外部バス # 1と外部バス # 4 力 はデータが遅れて流入したとしても、図 5— 2に示すように、必ずすベての外部バ ス # 1〜# 4のデータを Mlデータ RAM102に入力するタイミングと Mlデータ RAMI 02から出力するタイミングとが 6サイクル中にある。
[0068] そして、 4つの外部バス # 1〜 # 4のデータが Mlデータ RAM102から溢れることが ないように入出力されるため、チップにデータレジスタ部 108のみが備えられた場合 よりも L2キャッシュ 111に書き込まれるデータを多く取り込むことができる。また、この Mlデータ RAM102は、直接 L2キャッシュ 111に接続されるのではなぐデータレジ スタ部 108の MIDQ 108aと接続され、バッファが二段構成となっている。このため、 Mlデータ RAM102自体の単位時間当たりのデータの流入量および流出量は、 Ml DQ108aよりも大幅に小さくて良ぐ Mlデータ RAM102に付随する制御回路ゃデ ータバスの小型化および低コストィ匕を図ることができる。
[0069] さらに、バッファを二段構成として、 MIDQ 108aに RAMを接続したことにより、 RA Mと MIDQ108aとの空間的距離に制限がなぐチップ上で Mlデータ RAM102を配 置する位置を自由に決定することができる。このため、チップ上での回路配置を柔軟 に決定することができるとともに、データレジスタ部 108の大きさは変わらないため、 例えば図 6に示すように、チップ上で何の機能も果たさな 、死に地(図中斜線部)を 最小限に抑制することができる。ただし、図 6においては、 MIDRは Mlデータ RAMI 02の位置を示しており、制御ブロックは入出力制御部 105、監視部 106、 MIB109、 および書込制御部 110などの処理ブロックの位置を示して!/、る。
[0070] 以上のように、本実施の形態によれば、チップ内のデータレジスタの前段に Mlデー タを記憶する RAMを設け、チップ内に流入する Mlデータを記憶させるため、キヤッ シュメモリに書き込まれる Mlデータをチップに多く取り込むことができるとともに、 RA M自体がキャッシュメモリへの書き込みを行うわけではな!/、ので、 RAMを設けたこと による回路規模の増大およびコストの増大は最小限ですむ。
[0071] なお、上記実施の形態においては、 Mlデータ RAM102から MIDQ108aへ出力 された順序でデータ力 キャッシュ 111に書き込まれることとなる力 例えば L2キヤ ッシュ 111に書き込まれたデータのリプレース処理などが発生することにより、 MIDQ 108aから L2キャッシュ 111への書き込みを待機する必要が生じることがある。このよ うな状況は、 MIB109において入出力制御部 105からの通知と記憶されているリクェ ストと力も把握することが可能であるため、 MIDQ108aに取り込まれたデータの書き 込みの待機が生じた場合、一度 MIDQ108aに取り込まれたデータを廃棄し、後続 のデータを Mlデータ RAM102から取り込んで書き込みを行うようにしても良い。そし て、廃棄されたデータは、改めて MIDQ108aに取り込まれて書き込みが行われるよ うにすれば良い。
産業上の利用可能性
[0072] 本発明は、チップの小型化および低コストィ匕を実現しつつ、キャッシュメモリに書き 込まれるデータを多く取り込む場合に適用することができる。

Claims

請求の範囲
[1] キャッシュメモリにデータを書き込むキャッシュ制御装置であって、
前記キャッシュメモリへの書き込み用に外部力 流入するデータを保持する第 1バッ ファ手段と、
前記第 1バッファ手段に保持されるデータのうち、現時点で前記キャッシュメモリへ の書き込み対象となるデータを保持する第 2バッファ手段と、
前記第 2バッファ手段に保持されるデータの前記キャッシュメモリへの書き込みを制 御する書込制御手段と
を有することを特徴とするキャッシュ制御装置。
[2] 前記第 1バッファ手段は、
前記キャッシュメモリへの書き込みが同時に要求され得るすべてのデータを記憶可 能な容量の RAM (Random Access Memory)を含むことを特徴とする請求項 1記載の キャッシュ制御装置。
[3] 前記第 2バッファ手段に空き領域があるか否力を監視する監視手段をさらに有し、 前記第 1バッファ手段は、
前記監視手段によって前記第 2バッファ手段に空き領域があること確認された場合 に、データを前記第 2バッファ手段へ出力することを特徴とする請求項 1記載のキヤッ シュ制御装置。
[4] 前記第 2バッファ手段は、
前記キャッシュメモリの近傍に配置され、
前記第 1バッファ手段は、
前記第 2バッファ手段よりも前記キャッシュメモリから遠方に配置される
ことを特徴とする請求項 1記載のキャッシュ制御装置。
[5] 前記第 1バッファ手段は、
複数の外部バス力 のデータの流入を制御する外部バス制御手段を含み、 前記第 2バッファ手段は、
外部ノ スそれぞれに対応する領域であって同量のデータを保持する領域を備える ことを特徴とする請求項 1記載のキャッシュ制御装置。
[6] 前記第 2バッファ手段は、
外部ノ スそれぞれについて 2回の書き込み分のデータを保持する領域を備えること を特徴とする請求項 5記載のキャッシュ制御装置。
[7] 外部力も流入するデータに前記第 1バッファ手段をバイパスさせるバイパス手段と、 前記第 1バッファ手段から出力されるデータまたは前記バイパス手段から出力され るデータのいずれか一方を選択して前記第 2バッファ手段へ出力する選択手段と をさらに有することを特徴とする請求項 1記載のキャッシュ制御装置。
[8] 前記選択手段は、
前記第 2バッファ手段に空き領域がある場合に、前記バイパス手段から出力される データを選択することを特徴とする請求項 7記載のキャッシュ制御装置。
[9] 前記書込制御手段は、
前記第 1バッファ手段から前記第 2バッファ手段へデータが出力されると、このデー タの前記キャッシュメモリへの書き込みを前記第 2バッファ手段に実行させることを特 徴とする請求項 1記載のキャッシュ制御装置。
[10] キャッシュメモリにデータを書き込むキャッシュ制御方法であって、
前記キャッシュメモリへの書き込み用に外部力 流入するデータを第 1バッファに保 持する第 1保持工程と、
前記第 1保持工程にて保持されるデータのうち、現時点で前記キャッシュメモリへの 書き込み対象となるデータを第 2バッファに保持する第 2保持工程と、
前記第 2保持工程にて保持されるデータの前記キャッシュメモリへの書き込みを制 御する書込制御工程と
を有することを特徴とするキャッシュ制御方法。
PCT/JP2006/303622 2006-02-27 2006-02-27 キャッシュ制御装置およびキャッシュ制御方法 WO2007097030A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
EP10174845.7A EP2261804B1 (en) 2006-02-27 2006-02-27 Cache controller and cache control method
PCT/JP2006/303622 WO2007097030A1 (ja) 2006-02-27 2006-02-27 キャッシュ制御装置およびキャッシュ制御方法
EP06714759.5A EP1990730B1 (en) 2006-02-27 2006-02-27 Cache controller and cache control method
JP2008501580A JP4409620B2 (ja) 2006-02-27 2006-02-27 演算処理装置、キャッシュメモリ制御装置及び制御方法
US12/230,244 US8312218B2 (en) 2006-02-27 2008-08-26 Cache controller and cache control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/303622 WO2007097030A1 (ja) 2006-02-27 2006-02-27 キャッシュ制御装置およびキャッシュ制御方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/230,244 Continuation US8312218B2 (en) 2006-02-27 2008-08-26 Cache controller and cache control method

Publications (1)

Publication Number Publication Date
WO2007097030A1 true WO2007097030A1 (ja) 2007-08-30

Family

ID=38437089

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/303622 WO2007097030A1 (ja) 2006-02-27 2006-02-27 キャッシュ制御装置およびキャッシュ制御方法

Country Status (4)

Country Link
US (1) US8312218B2 (ja)
EP (2) EP1990730B1 (ja)
JP (1) JP4409620B2 (ja)
WO (1) WO2007097030A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810117A (zh) * 2013-12-24 2014-05-21 苏州国芯科技有限公司 处理器用指令存储系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810116B (zh) * 2013-12-24 2017-06-20 苏州国芯科技有限公司 用于嵌入式系统的指令存储装置
CN103810122B (zh) * 2013-12-24 2017-03-22 苏州国芯科技有限公司 用于嵌入式系统的高速缓存器
CN107959694B (zh) * 2016-10-14 2021-04-06 中兴通讯股份有限公司 数据同步缓存的方法和装置

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0322053A (ja) * 1989-06-20 1991-01-30 Fujitsu Ltd ムーブ・イン・バッファ制御方式
JPH03116345A (ja) * 1989-09-29 1991-05-17 Nec Ibaraki Ltd データ処理装置
JPH04153751A (ja) * 1990-10-17 1992-05-27 Fujitsu Ltd バッファ記憶制御方式
JPH05100849A (ja) * 1991-10-04 1993-04-23 Fujitsu Ltd バツフア記憶制御方式
JPH06222990A (ja) * 1992-10-16 1994-08-12 Fujitsu Ltd データ処理装置
JPH07210460A (ja) 1994-01-25 1995-08-11 Fujitsu Ltd バッファストレイジのムーブイン制御方法
JPH07219844A (ja) * 1994-01-18 1995-08-18 Samsung Electron Co Ltd キャッシュラインリプレーシング装置及び方法
JPH08202620A (ja) * 1991-02-25 1996-08-09 Internatl Business Mach Corp <Ibm> 高速データ・アクセス・システム
JP2003122632A (ja) * 2001-10-17 2003-04-25 Nec Corp キャッシュデータ登録システム及び登録方法

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5837633B2 (ja) 1979-07-23 1983-08-17 富士通株式会社 バッフア・メモリ記憶制御方式
JPS6320639A (ja) 1986-07-15 1988-01-28 Nec Corp メモリアクセス制御装置
JPS6320640A (ja) 1986-07-15 1988-01-28 Nec Corp メモリアクセス制御装置
JPH0769862B2 (ja) 1988-02-12 1995-07-31 日本電気株式会社 キャッシュメモリ装置
JP3093446B2 (ja) 1992-06-16 2000-10-03 富士通株式会社 情報処理装置
US5668971A (en) * 1992-12-01 1997-09-16 Compaq Computer Corporation Posted disk read operations performed by signalling a disk read complete to the system prior to completion of data transfer
US6219773B1 (en) * 1993-10-18 2001-04-17 Via-Cyrix, Inc. System and method of retiring misaligned write operands from a write buffer
JP3490502B2 (ja) 1994-08-01 2004-01-26 富士通株式会社 メモリ制御装置
US5737550A (en) * 1995-03-28 1998-04-07 Advanced Micro Devices, Inc. Cache memory to processor bus interface and method thereof
US6246396B1 (en) * 1997-04-30 2001-06-12 Canon Kabushiki Kaisha Cached color conversion method and apparatus
US6055649A (en) * 1997-11-19 2000-04-25 Texas Instruments Incorporated Processor test port with scan chains and data streaming
WO1999049395A1 (fr) 1998-03-23 1999-09-30 Hitachi, Ltd. Controleur de memoire tampon
JP3845043B2 (ja) * 2002-06-28 2006-11-15 富士通株式会社 命令フェッチ制御装置
US7739451B1 (en) * 2002-12-27 2010-06-15 Unisys Corporation Method and apparatus for stacked address, bus to memory data transfer

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0322053A (ja) * 1989-06-20 1991-01-30 Fujitsu Ltd ムーブ・イン・バッファ制御方式
JPH03116345A (ja) * 1989-09-29 1991-05-17 Nec Ibaraki Ltd データ処理装置
JPH04153751A (ja) * 1990-10-17 1992-05-27 Fujitsu Ltd バッファ記憶制御方式
JPH08202620A (ja) * 1991-02-25 1996-08-09 Internatl Business Mach Corp <Ibm> 高速データ・アクセス・システム
JPH05100849A (ja) * 1991-10-04 1993-04-23 Fujitsu Ltd バツフア記憶制御方式
JPH06222990A (ja) * 1992-10-16 1994-08-12 Fujitsu Ltd データ処理装置
JPH07219844A (ja) * 1994-01-18 1995-08-18 Samsung Electron Co Ltd キャッシュラインリプレーシング装置及び方法
JPH07210460A (ja) 1994-01-25 1995-08-11 Fujitsu Ltd バッファストレイジのムーブイン制御方法
JP2003122632A (ja) * 2001-10-17 2003-04-25 Nec Corp キャッシュデータ登録システム及び登録方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810117A (zh) * 2013-12-24 2014-05-21 苏州国芯科技有限公司 处理器用指令存储系统
CN103810117B (zh) * 2013-12-24 2017-03-22 苏州国芯科技有限公司 处理器用指令存储系统

Also Published As

Publication number Publication date
JPWO2007097030A1 (ja) 2009-07-09
EP2261804B1 (en) 2019-08-07
US8312218B2 (en) 2012-11-13
EP1990730A1 (en) 2008-11-12
EP2261804A1 (en) 2010-12-15
EP1990730A4 (en) 2009-07-08
JP4409620B2 (ja) 2010-02-03
EP1990730B1 (en) 2017-09-27
US20080320223A1 (en) 2008-12-25

Similar Documents

Publication Publication Date Title
US5642494A (en) Cache memory with reduced request-blocking
CN100578466C (zh) 用于基于集线器的存储器子系统中的双向数据总线的数据旁路的装置和方法
US8108647B2 (en) Digital data architecture employing redundant links in a daisy chain of component modules
US8788759B2 (en) Double-buffered data storage to reduce prefetch generation stalls
US20120198165A1 (en) Mechanism to Update the Status of In-Flight Cache Coherence In a Multi-Level Cache Hierarchy
US20090100206A1 (en) Memory and I/O Bridge
WO1993019424A1 (en) System and method for supporting a multiple width memory subsystem
JP2009517725A (ja) メモリ・システム内で不確定な読み取りデータ待ち時間を可能にする方法及びシステム
CN103201725A (zh) 用于在多个处理器之间共享的存储器的存储器访问设备及其访问方法
US8352712B2 (en) Method and system for specualtively sending processor-issued store operations to a store queue with full signal asserted
WO2005109218A1 (en) Memory controller with command look-ahead
CN102646446A (zh) 硬件动态高速缓存电源管理
EP1069509B1 (en) Improvements in or relating to microprocessors
US20080140934A1 (en) Store-Through L2 Cache Mode
US6594711B1 (en) Method and apparatus for operating one or more caches in conjunction with direct memory access controller
US6427189B1 (en) Multiple issue algorithm with over subscription avoidance feature to get high bandwidth through cache pipeline
US6507892B1 (en) L1 cache memory
JP4409620B2 (ja) 演算処理装置、キャッシュメモリ制御装置及び制御方法
US20090031088A1 (en) Method and apparatus for handling excess data during memory access
EP2128771B1 (en) Method and apparatus for controlling cache memory
EP1668513B1 (en) Cache bank interface unit
JP4173858B2 (ja) 命令キャッシュ、及びメモリ競合を低減する方法
EP1431878A2 (en) Shared write buffer in a peripheral interface and method of operating
US7689735B2 (en) Instruction stream control
JP2005508549A (ja) アンキャッシュ素子のための帯域幅の向上

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
ENP Entry into the national phase

Ref document number: 2008501580

Country of ref document: JP

Kind code of ref document: A

REEP Request for entry into the european phase

Ref document number: 2006714759

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2006714759

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE