WO2006112111A1 - キャッシュメモリシステム及びその制御方法 - Google Patents

キャッシュメモリシステム及びその制御方法 Download PDF

Info

Publication number
WO2006112111A1
WO2006112111A1 PCT/JP2006/302141 JP2006302141W WO2006112111A1 WO 2006112111 A1 WO2006112111 A1 WO 2006112111A1 JP 2006302141 W JP2006302141 W JP 2006302141W WO 2006112111 A1 WO2006112111 A1 WO 2006112111A1
Authority
WO
WIPO (PCT)
Prior art keywords
command
address
cache
unit
cache memory
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2006/302141
Other languages
English (en)
French (fr)
Inventor
Hazuki Okabayashi
Tetsuya Tanaka
Ryuta Nakanishi
Masaitsu Nakajima
Keisuke Kaneko
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to DE602006011292T priority Critical patent/DE602006011292D1/de
Priority to EP06713284A priority patent/EP1868101B1/en
Priority to JP2007521091A priority patent/JP4090497B2/ja
Priority to CN2006800105539A priority patent/CN101151600B/zh
Priority to US11/816,858 priority patent/US7953935B2/en
Publication of WO2006112111A1 publication Critical patent/WO2006112111A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/12Replacement control
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • the present invention relates to a cache memory system and its control method, and more particularly to a technique for improving controllability of a cache memory system by software.
  • a small-capacity, high-speed cache memory such as a static random access memory (SRAM) or the like, is disposed in or near the microprocessor, and part of data is stored in the cache memory. By doing this, you can speed up microprocessor memory access.
  • SRAM static random access memory
  • Patent Document 1 Japanese Patent Application Laid-Open No. 7-295882
  • the present invention has been made in view of the above problems, and actively controls software power.
  • the purpose is to provide a cache memory system with a preferred configuration for accepting and processing.
  • a cache memory system comprises a cache memory provided between a processor and a memory, and transfer and attribute control means for controlling the cache memory, the transfer and attribute
  • the control means is provided with a command entry unit to which a command indicating the transfer of the cache data and the attribute operation and the address specifying the target of the operation is given by the processor executing a predetermined instruction; And an operation request unit that requests the cache memory to perform an operation indicated by the command.
  • command entry unit is further provided with an address range corresponding to the command from the processor, and the operation request unit is configured to perform the operation on the plurality of addresses belonging to the address range as the cache. It may be requested sequentially to the memory.
  • the cache memory holds a tag indicating a high-order portion of a memory address corresponding to cache data held in the cache entry in association with a cache entry which is a management unit of cache data.
  • a valid flag indicating whether the cache entry is valid a dirty flag indicating whether the write operation has been performed on the cache entry, and any other cache entry accesses when the cache entry is accessed.
  • the cache entry Save the data to memory, reset the dirty flag and valid flag, and reset the dirty flag of the cache entry only if the dirty flag is reset.
  • write-back and invalidation operation and hit specified address If there is a cache entry to perform, one of the oldest operations to set the weak flag of that cache entry may be executed.
  • the six types of operations are effective in improving the cache hit rate, reducing unnecessary bus transactions, and balancing bus transactions (temporal distribution). It is suitable for improving the cache efficiency by positively accepting and controlling the control from the
  • the transfer and attribute control means further adjusts an address adjustment unit for adjusting the beginning and end of the address range to indicate the beginning data of a cache entry which is a management unit of cache data in the cache memory.
  • the operation request unit may sequentially request the cache memory to perform the operation on a plurality of addresses included in the adjusted address range.
  • the address adjustment unit adjusts the beginning and end of the address range so as to indicate the beginning data of the cache entry. It reduces the burden of cache management, which eliminates the need to manage size.
  • the transfer and attribute control means further includes a command holding unit for holding a plurality of commands and an address range corresponding to each command, and the plurality of held frames.
  • Command selector for selecting one of the commands, and the operation request unit sequentially requests the operation indicated by the command for a plurality of addresses belonging to the address range associated with the selected command. I do!
  • the command selection unit selects another command before all the requests are made for the selected command, and the operation request unit re-executes the original command. If selected, the command may still be requested, and operations on the address may be requested sequentially.
  • the transfer and attribute control means can hold and process a plurality of commands, for example, the plurality of commands can be given from, for example, each task when the processor performs multitask processing. In some cases it is suitable.
  • the transfer and attribute control means further determines whether or not the processor has executed a specific instruction by the processor with respect to a predicted address defined for the next scheduled request. And an effective address generation unit that generates an effective address by adding or subtracting a predetermined offset value to the predicted address when a positive determination is made, and the operation request unit generates the effective address. Request the operation for the effective address.
  • the transfer and attribute control means further includes a command holding unit for holding a plurality of commands and an address range related to each command
  • the execution determining unit further comprises: For each command held, the processor determines whether a specific instruction has been executed by the processor with respect to the predicted address corresponding to that command, and the transfer and attribute control means further makes a positive determination.
  • the command selecting unit has a command selecting unit for selecting one of the commands, and the effective address generating unit generates an effective address by adding or subtracting a predetermined value to a predicted address corresponding to the selected command.
  • the operation request unit may request an operation indicated by the selected command on the generated effective address.
  • the transfer and attribute control means further includes an address output unit for sequentially outputting an address for specifying each cache entry which is a management unit of cache data in the cache memory, and the operation request unit is And requesting the cache memory to perform a sequential operation on one or more cache entries including the cache entry specified by the output address, and the cache memory executes the sequential operation in response to the request.
  • the sequential operation may be a write back operation! /.
  • the command entry unit indicates that a single command indicating an operation for a single address and an operation for a plurality of addresses included in an address range are performed in synchronization with a specific instruction executed by the processor.
  • the command may be given from the processor, and the operation request unit may request the cache memory to make an operation request according to each command based on a preset priority.
  • the preset priority may be the order of the commands.
  • the present invention can be realized as such a cache memory system, and a control method of the cache memory system having steps of processing executed by characteristic means included in such a cache memory system.
  • a control method of the cache memory system having steps of processing executed by characteristic means included in such a cache memory system.
  • the cache memory system of the present invention by causing the processor to execute the predetermined instruction, software can request transfer and attribute manipulation of cache data. Good for receiving and processing A cache memory system having a desirable configuration is obtained.
  • FIG. 1 is a block diagram showing an example of the overall configuration of a computer system including a processor, a cache memory, a memory, and a TAC according to an embodiment of the present invention.
  • FIG. 2 is a block diagram showing a configuration example of a cache memory.
  • FIG. 3 is a diagram showing an example of updating of the use flag.
  • Fig. 4 is a diagram showing how a cache entry is replaced when there is no weak flag
  • Fig. 4 (b) is an explanatory diagram showing the role of the weak flag W in the replacement process. .
  • FIG. 5 is a flowchart showing an example of operation primitive processing in a cache memory.
  • FIG. 6 is a flow chart showing an example of the auto cleaner processing in the cache memory.
  • FIG. 7 is a view showing a configuration example of a cache entry according to a modification.
  • FIG. 8 is a diagram showing an example of an interface between a cache memory and a TAC.
  • FIG. 9 is a block diagram showing a configuration example of a TAC.
  • FIG. 10 is a diagram showing an example of an instruction for writing a command in an operation primitive register
  • FIG. 10 (b) is a diagram showing an example of a command.
  • FIG. 11 (a) is a diagram showing an example of an instruction to write a start address in a start address register
  • FIG. 11 (b) is a diagram showing an example of an instruction to write a size in a size register
  • FIG. 11 (c) is a diagram showing an example of an instruction for writing a command in a command register
  • FIG. 11 (d) is a diagram showing an example of a command.
  • Figure 12 shows an example of an instruction to write a command to the TAC control register.
  • FIG. 12 (b) shows an example of the command.
  • FIG. 13 is a conceptual diagram for explaining the contents of address adjustment.
  • FIG. 14 is a block diagram showing a configuration of an address holding unit.
  • FIG. 15 is a flowchart showing an example of area command control processing in the area command control unit.
  • FIG. 16 is a flow chart showing an example of instruction interlocked command control processing in the instruction interlocked command control unit.
  • FIG. 17 is a flowchart showing an example of auto cleaner control processing in the auto cleaner control unit.
  • FIG. 18 is a flowchart showing an example of operation request processing in the operation request unit.
  • FIG. 1 is a block diagram showing an overall configuration of a computer system including a processor 1, a memory 2, a cache memory 3 and a transfer and attribute controller (TAC) 4 in the embodiment of the present invention.
  • the cache memory 3 and the TAC 4 in this embodiment correspond to the cache memory system of the present invention.
  • the TAC 4 issues a command indicating transfer of cache data and attribute operation and an address specifying the target of the operation by the processor 1 executing a predetermined instruction. Request the cache memory 3 to perform the operation indicated by the command.
  • the cache memory 3 performs caching of data in response to a memory access from the processor 1 as performed by a conventional general cache memory. Also, when memory access from processor 1 is not processed, six types of cache data transfer and attribute manipulation, and auto cleaner are executed according to the request from TAC4. These six operations are called action primitives. The action primitives and the auto cleaner will be described in detail later.
  • Such a configuration of the cache memory system of the present invention actively accepts software power control when trying to overcome the cache efficiency limit by autonomous control by hardware with the aid of software.
  • FIG. 2 is a block diagram showing a configuration example of the cache memory 3.
  • the cache memory 3 includes an address register 20, a memory I / F 21, a demultiplexer 22, a decoder 30, four ways 31a to 31d (hereinafter abbreviated as ways 0 to 3), and four comparators 32a to 32d. And four AND circuits 33a to 33d, an OR circuit 34, selectors 35 and 36, a demultiplexer 37, and a control unit 38.
  • demultiplexer 22 preferentially selects the access address to memory 2 given from processor 1, and no memory access from processor 1, sometimes from TAC4. Select the address given.
  • Address register 20 is a register that holds the selected access address.
  • This access address shall be 32 bits.
  • the access address includes, in order from the most significant bit, a 21-bit tag address, a 4-bit set index (SI in the figure), and a 5-bit word index (WI in the figure).
  • the tag address points to an area (the size is the number of sets X blocks) in the memory to be mapped to the way. The size of this area is a size of 2 k bytes determined by the address bits (A10 to AO) lower than the tag address, and is also the size of one way.
  • Set index (SI) is the way 0 Point to one of multiple sets across three. Since this set number is a set index power bit, there are 16 sets.
  • the cache entry specified by the tag address and the set index is a replacement unit, and when stored in the cache memory, it is called line data or line.
  • the size of the line data is the size determined by the address bits lower than the set index, ie, 128 bytes. Assuming that 1 word is 4 bytes, 1 line data is 32 lines.
  • the word index (WI) indicates a word in a plurality of words constituting line data.
  • the least significant 2 bits (Al, AO) in the address register 20 are ignored during word access.
  • the memory IZF 21 is an IZF for accessing the memory 2 from the cache memory 3, such as write back of data from the cache memory 3 to the memory 2 and loading of data to the memory dual power cache memory 3.
  • the decoder 30 decodes 4 bits of the set index and selects one of 16 sets across 4 ways 0-3.
  • ways 0 to 3 are four ways having the same configuration, and have a capacity of 4 ⁇ 2 k bytes.
  • Each way has 16 cache entries.
  • One cache entry has a Norid flag V, a 21-bit tag, 128-byte line data, a weak flag W, a use flag U, and a dirty flag D.
  • a tag is a copy of a 21 bit tag address.
  • Line data is a copy of 128-byte data in a block specified by a tag address and a set index.
  • the Norit flag V indicates whether the data of the cache entry is valid.
  • the weak flag W indicates whether the access from the processor is a low access frequency access or not, and for replacement control in the cache memory, the access order of the cache entry is forcibly made the oldest. In other words, it indicates that the cache entry should be accessed earlier than any other cache entry accessed.
  • the weak flag W indicates the strongest replacement target even if it is evicted before other cache entries.
  • the use flag U indicates whether or not the cache entry has been accessed, and is used instead of access order data between cache entries in the LRU method. More accurate The use flag U 1 means that there was an access, 0 does not. However, if the use flags for all four ways in one set are all 1, the ways other than the way to be set are reset to zero. In other words, the use flag U indicates the relative status of the accessed time being old or new or two. In other words, a cache entry with a usage flag U of 1 means that it is accessed more recently than a cache entry with a usage flag of 0.
  • the dirty flag D is written back to the memory because the cache entry has not been written by the processor, that is, the data cached in the line exists but may differ from the data in the memory due to the writing. Indicates whether or not necessary.
  • the comparator 32a compares whether the tag address in the address register 20 matches the tag of way 0 in the four tags included in the set selected by the set index.
  • the comparators 32b to 32c are the same except that they correspond to the ways 31b to 31d.
  • the AND circuit 33a determines whether or not the norid flag and the comparison result of the comparator 32a match. Let hO be the comparison result. When the comparison result hO is 1, it means that the line data corresponding to the tag address and the set index in the address register 20 match, that is, a hit occurs in the way 0. Comparison result If hO is 0, it means that it has mis-hit. The same applies to the AND circuits 33b to 33d except that they correspond to the ways 31b to 31d. The comparison result hi ⁇ ! ⁇ 3 means the force hit or missed in ways 1 to 3.
  • the OR circuit 34 is the comparison result hO ⁇ ! Take the or of ⁇ 3. Let the result of this or be a hit. hit is
  • the selector 35 selects the line data of the hit way among the line data of ways 0 to 3 in the selected set.
  • the selector 36 selects one word indicated in the word index from the 32 words of line data selected by the selector 35.
  • the write data may be in word units.
  • the control unit 38 controls the entire cache memory 3.
  • FIG. 3 shows an example of updating of the use flag by the control unit 38.
  • the upper part of the figure, interruption, and the lower part show four cache entries constituting set N straddling ways 0 to 3.
  • the 1 or 0 at the right end of each of the four cache entries is the value of the usage flag.
  • These four usage flags U are denoted as UO to U3.
  • the control unit 38 determines a cache entry to be replaced based on the usage flag and performs replacement. For example, in the upper part of FIG. 3, the control unit 38 determines either way 1 or 3 as a replacement target, and in the middle part of FIG. 3 determines method 3 as a replacement target. Decide which of the two to replace.
  • Fig. 4 (a) This is a comparative example in the case where it is assumed that the weak flag does not exist, and it is a diagram showing a situation where the cache entry is replaced. Also in the figure, as in FIG. 3, four cache entries constituting set N straddling ways 0 to 3 are shown. The 1 or 0 at the right end of each of the four cash entries is the value of the usage flag. Also, let only data E with low access frequency be data A, B, C and D be data with high access frequency.
  • processor 1 accesses data E in the first stage of FIG. 4 (a)
  • a cache miss occurs. Due to this cache miss, for example, the cache entry of the frequently accessed data A is replaced with the frequently accessed data D, and the state of the fourth stage is established.
  • the less frequently used data E is not selected for replacement and remains in the cache memory.
  • FIG. 4 (b) is an explanatory view showing the role of the weak flag W in the replacement process.
  • processor 1 accesses data E in the state of the first stage of FIG. 4 (b) (same as the first stage of FIG. 4 (a)), a cache miss occurs.
  • the processor 1 sets the weak flag W to 1 in the cache entry of the data E.
  • the cache entry of data E is evicted first at the next cache miss, and the state of the second stage is entered.
  • the operation primitive is the following operation on a single address specified from TAC4.
  • FIG. 5 is a flowchart showing an example of operation primitive processing in the cache memory 3. This action primitive processing is started when the designation I of the action primitive and the address A for specifying the action target are given from TAC 4 and executes the designated action primitive.
  • control unit 38 If the control unit 38 is processing a memory access from the processor 1, it waits until the processing is completed (S101: YES), and while the memory access from the processor 1 is not being performed, The multiplexer 22 selects the address given by the TAC 4 (S102).
  • Auto Cleaner is the following operation for a single address specified from TAC4.
  • Each cache entry of the set indicated by the address (specifically, referring to FIG. 2, four set belonging to the set indicated by the set index SI included in the address) If the dirty flag D and the weak flag W are both set, the cache entry is written back.
  • This operation is useful for balancing (temporal distribution) bus transactions.
  • FIG. 6 is a flowchart showing an example of the auto-cleaner processing in the cache memory 3. This auto-cleaner process is started when TAC4 gives an auto-cleaner designation I and an address A for designating an operation target.
  • control unit 38 If the control unit 38 is processing a memory access from the processor 1, it waits until the processing is completed (S201: YES), and while the memory access from the processor 1 is not being performed, The multiplexer 22 selects the address given by the TAC 4 (S202).
  • Each cache entry belonging to the set designated by the set index included in the address is repeated, and the following is repeated (S 203 to S 207).
  • the cache memory of the present invention is not limited to the configuration of the above embodiment, but various modifications are possible. Hereinafter, some of the modifications will be described.
  • the 4-way 'set' associative cache memory is described as an example, but the number of ways may be any number. In the above embodiment, an example in which the number of sets is 16 has been described, but the number of sets may be several.
  • the cache memory of the full-associative system or the direct map system may be used, for example, the cache memory of the set 'associative memory has been described as an example.
  • the line has been described as a cache data replacement unit, but a subline, which is each portion obtained by dividing the line into four, may be used as a replacement unit. In that case, each cache entry holds 4 valid flags and 4 dirty flags respectively.
  • FIG. 7 is a view showing an example of the configuration of a cache entry in that case. 1/4 of the line In addition to the brine, 1/2, 1/8 and 1/16 of the line may be sub-lines. In this case, each cache entry holds the same number of NORD flags and dirty flags as the subline. It may be switched depending on the instruction from TAC4 whether the replacement unit is a line or a sub-line.
  • FIG. 8 is a diagram showing an example of an interface (signals to be transmitted and received) between the cache memory 3 and the TAC 4. The above variants are considered in this example.
  • the 32-bit address specifies an operation target. Requests, request acceptance, and execution completion are used in the handshake for the issuance of requests. Fill, Touch, Write Back, Invalid Gate, Write Back / Deactivate, Aging, and Auto Cleaner specify the requested operation.
  • the 3-bit active way specifies whether to make the active way active way for each way.
  • the refill unit specifies whether the replacement unit is a line or a subline.
  • FIG. 9 is a block diagram showing a configuration example of the TAC 4.
  • the TAC 4 requests the cache memory 3 to perform an operation according to a command given from the processor 1, the command entry unit 40, the area command control unit 41, the command interlocking command control unit 42, the auto cleaner control unit 43, and the operation request.
  • a section 44 is provided.
  • the command given by TAC 1 from processor 1 is synchronized with a single command indicating an operation for a single address and a specific command executed by the setr for an operation for a plurality of addresses included in the address range.
  • a single command indicating an operation for a single address and a specific command executed by the setr for an operation for a plurality of addresses included in the address range.
  • write back sequentially the cache data and an instruction linked command indicating that the command is to be performed, an area command indicating that the operation is to be performed asynchronously with a specific instruction executed by the processor to a plurality of addresses included in the address range, and cache data sequentially.
  • an auto cleaner command is synchronized with a single command indicating an operation for a single address and a specific command executed by the setr for an operation for a plurality of addresses included in the address range.
  • the command entry unit 40 is a group of registers to which a command and an address are written when the processor 1 executes a predetermined instruction, and the operation primitive register 401, start address register 402, size register 403, command A register 404 and a TAC control register 405 are provided. These registers are directly accessible from the processor 1, for example, assigned to a predetermined memory address, and hold the contents written by the processor 1.
  • the area command control unit 41 is a functional block that holds up to four area commands and generates a request according to the held commands.
  • the area command control unit 41 includes an address adjustment unit 411, a command holding unit 412, and commands.
  • a selection unit 413 is provided.
  • Instruction interlocking command control unit 42 is a functional block that holds up to four instruction interlocking commands and generates a request according to the held command in synchronization with a specific instruction that processor 1 executes. Yes, address adjustment unit 421, command holding unit 422, execution determination unit 423
  • a command selection unit 424 and an effective address generation unit 425.
  • the auto cleaner control unit 43 is a functional block that generates an auto cleaner request, and includes a landing address output unit 431.
  • the single command is written to the operation primitive register 401 and held.
  • FIG. 10 (a) shows an example of an instruction for writing a single command in the operation primitive register 401.
  • This instruction is a normal transfer instruction (mov instruction), and specifies a command as a source operand and an operation primitive register (PR) 401 as a destination operand.
  • mov instruction normal transfer instruction
  • PR operation primitive register
  • FIG. 10 (b) shows an example of the command format.
  • This command format consists of the operation target address and the specification of operation primitives.
  • Command entry unit 40 outputs, to operation request unit 44, a request corresponding to the single command held in operation primitive register 401.
  • FIG. 11 (a) shows an example of an instruction to write the start address in the start address register (SAR) 402.
  • This instruction is also a normal transfer instruction as in FIG. 10 (a).
  • the start address indicates the start address of the command operation target.
  • the size register (SR) 403 is shown in 011 (b).
  • This instruction is also a normal transfer instruction.
  • the size indicates the size of the operation target.
  • the unit of size may be a predetermined unit, which may be the number of bytes or the number of lines (the number of cache entries).
  • FIG. 11 (c) shows an example of an instruction for writing a command in the command register (CR) 404.
  • This instruction is also a normal transfer instruction.
  • This command format includes an instruction interlock flag that specifies whether operation requests should be interlocked with the execution of a specific instruction (that is, whether the command is an instruction interlock command or an area command), specification of an operation primitive, and specification of an operation primitive. And an increment value indicating an interval of a plurality of addresses to be operated within the specified address range.
  • this increment value is, for example, the size of a line
  • desired operations can be sequentially performed on all cache data in the address range.
  • the specific instruction is a load'store instruction with post-increment
  • desired operations can be sequentially performed on the operation target of the instruction.
  • command entry unit 40 When the contents described above are written in start address register 402, size register 403, and command register 404, command entry unit 40 outputs the command to area command control unit 41 as the area command, and performs instruction interlocking. If it is a command, it is output to the command linked command control section 42.
  • the auto-cleaner command updates the value of the auto-cleaner flag, which is in a predetermined bit position in the TAC control register 405, and indicates whether to enable or disable the auto-cleaner.
  • FIG. 12 (a) shows an example of an instruction for updating the auto cleaner flag (along with the entire contents of the TAC control register 405). This instruction is also a normal transfer instruction.
  • FIG. 12 (b) shows an example of the command format. This command format corresponds to the format of the TAC control register and contains the new value of the autocleaner flag in the bit position.
  • Command entry unit 40 outputs the value of the auto cleaner flag held in TAC control register 405 to auto cleaner control unit 43.
  • the address adjustment unit 411 acquires the address range related to the area command from the command entry unit 40, adjusts both ends to point to the top data of the cache entry, and the command holding unit 412 Holding up to four area commands after adjusting the range, the command selection unit 413 selects one of the held area commands (for example, the oldest one) and , Generates a request according to the selected area command, and outputs the request to the operation request unit 44.
  • the address adjustment unit 411 first adds the start address held in the start address register 402 and the size held in the size register 403.
  • the addition result is an end address that points to the end of the address range.
  • the size is expressed in a predetermined unit, and if the unit is, for example, a byte, it is added as a byte address, and if it is a line, it is added as a line address. .
  • the address adjusting unit 411 adjusts the start address and the end address.
  • FIG. 13 is a conceptual diagram for explaining the contents of the adjustment.
  • the start address points at any position other than the beginning of the line N.
  • the start address is adjusted to the start of the next line (N + 1) so that it is adjusted to the line start address a or adjusted to the start of the line N including the data of the start address to the line start address b.
  • the line pointed to by the line start address is called the start line.
  • the end address points to any position other than the beginning of line M.
  • the end address is a force that is adjusted to the line end address a to point to the beginning of the previous line (M-1), or adjusted to the line end address b to point to the beginning of the line M that contains data on the end address. It is adjusted.
  • the line pointed to by the simple end address is called an end line.
  • start address and the end address may be lined inside or out line by line. After the outer line of the line unit, the outer line of the sub line unit and the inner line of the inner line are also possible.
  • the processor 1 can designate any start address and any size regardless of the line size and the line boundary.
  • the command holding unit 412 acquires the line start address and the line end address from the address adjustment unit 411, and acquires and holds the operation primitive and the increment value from the command register 404.
  • FIG. 14 is a block diagram showing the configuration of the command holding unit 412.
  • the command holding unit 412 is composed of four registers 4121 to 4124, and may preferably be a FIFO (First In First Out) type queue capable of reading the contents of each register.
  • Each register holds the line start address and line end address acquired from the address adjustment unit 411, and the increment value and operation primitive acquired from the command register 404.
  • the line start address is successively updated by adding an increment value for each request according to the control from the operation request unit 44, and is used as a current address.
  • the command selection unit 413 selects one of the commands held in the command holding unit 412 (for example, the oldest one, that is, the head of the FIFO queue), and one request indicating the current address and the operation primitive. Are generated and output to the operation request unit 44.
  • FIG. 15 is a flowchart showing an example of area command control processing in the area command control unit 41.
  • the address adjustment unit 411 adjusts the address of the command (S302), and registers the address adjusted command in the command holding unit 412. (S303).
  • This command does not hold the command yet Forces to be registered in a new register, if all registers hold commands, registration is performed by overwriting the oldest command. Note that even if the current address exceeds the line end address (which means that the operation for all target addresses has been requested), or if you delete the command in advance. Well, if all the registers hold commands, it is also conceivable to cause the processor 1 to generate an exception without registering new commands.
  • command selection unit 413 selects the oldest command and outputs a request indicating the current address and the operation primitive to operation request unit 44. (S305).
  • the command selecting unit 413 may select a command other than the oldest command. Specifically, for example, after providing a configuration in which the task that has issued each command and the current task currently being executed by the processor 1 are known, the command given from the current task is the oldest command. It is conceivable to select in preference to the others.
  • This configuration is suitable, for example, when the processor 1 performs multitasking processing, and can process commands given from the current task with priority following processing of task switching. Also, since the command holding unit 412 holds the current address for each command, even if the original command is selected once after another command is selected, the original command is not deleted. You can still request an operation on an address.
  • the address adjusting unit 421 acquires the address range related to the instruction interlocking command from the command entry unit 40, and adjusts both ends thereof to point to the head data of the cache entry respectively. , Holds up to four instruction-linked commands after adjusting the address range.
  • the execution determination unit 423 determines whether the processor has executed a specific instruction with respect to the predicted address defined for each command held, and the command selection unit 424 makes a positive determination.
  • One of the commands (for example, the oldest one) is selected, and a request for the effective address generated by the effective address generation unit 425 is output to the operation request unit 44.
  • the address adjusting unit 421 and the command holding unit 422 are the same as the address adjusting unit 4 11 and the command holding unit 412, respectively, the description will be omitted.
  • the execution judgment unit 423 uses the current address of each command held in the command holding unit 422 as a predicted address, and causes the processor 1 to use the predicted address as an operand (specifically, load with post-increment) It is determined whether an instruction and a store instruction with post-increment have been executed. In order to make such a determination, for example, the processor 1 supplies the execution determination unit 423 with a signal C indicating that a post-increment load instruction and a post-increment store instruction are being executed, and the execution determination unit 423 may compare the address appearing on the address bus with each current address held in the command holding unit 422 while the signal C is being supplied.
  • the command selection unit 424 selects one of the commands (for example, the oldest one) that has been positively determined by the execution determination unit 423.
  • the effective address generation unit 425 adds the offset value of one line to the current address (predicted address described above) of the command to make the command operation target. Generates an effective address. If the selected command indicates writeback, invalidation, writeback and invalidation, or oldest, the command operation target is obtained by subtracting the offset value for one line from the current address of the command. Generate an effective address that Then, the command selection unit 424 generates one request indicating the effective address and the specification of the operation primitive, outputs the request to the operation request unit 44, and increases the current address corresponding to the selected command by an increment value. Update by letting
  • the replacement unit is a line
  • the offset value for one line is used
  • the replacement unit is a subline
  • a smaller (for example, two sublines) offset value is used. I see.
  • FIG. 16 is a flowchart showing an example of the instruction interlocking command control process in the instruction interlocking command control unit 42.
  • the address adjustment unit 421 adjusts the address of the command (S 402), and the command after the address adjustment to the command holding unit 422 is performed.
  • the execution determination unit 423 compares the operand address of the specific instruction with the current address of each command (S405). If there is a command whose address matches (S406: YES), the command selection unit 424 selects the oldest one of them (S407), and the effective address generation unit 425 generates an effective address for the selected command. Then, the command selection unit 424 outputs a request indicating the effective address and the operation primitive to the operation request unit 44, and updates the current address corresponding to the selected command by incrementing the increment value ( S408).
  • the cleaning address output unit 431 sequentially outputs an address specifying each cache entry in the cache memory 3.
  • the cleaning address output unit 431 may be a simple register that holds and outputs an address.
  • Auto cleaner control unit 43 has an auto cleaner from TAC control register 405. While the flag value indicating that it is effective is acquired, a request for the auto cleaner operation for the address output from the cleaning address output unit 431 is output to the operation request unit 44.
  • FIG. 17 is a flowchart showing an example of the auto cleaner control process in the auto cleaner control unit 43.
  • the auto cleaner control unit 43 controls the auto cleaner for the address output from the cleaning address output unit 431.
  • the operation is output to the operation request unit 44 (S 502).
  • the operation request unit 44 is provided with up to four requests: a request according to a single command, a request according to an instruction interlocked command, a request according to an area command, and a request for auto cleaner operation. there is a possibility.
  • the operation request unit 44 selects one request based on the preset priority, and transfers the selected request to the cache memory 3. This pre-set priority may be the order of the commands described above.
  • the operation request unit 44 transfers a request according to an instruction interlocked command, a request according to an area command, and a request for an auto cleaner operation, an operation target next to the request is indicated. Control the current address of the command and the cleaning address.
  • FIG. 18 is a flowchart showing an example of the operation request process in the operation request unit 44.
  • the operation request unit 44 may delete the contents of the operation primitive register.
  • the request is transferred to the cache memory 3 (S 604). If the current address of the command corresponding to the transferred request (incremented when the command is selected in the command selection section 424) exceeds the line end address, the command is erased and It is also good. If there is a request according to the area command (S 606: YES), the request is transferred to the cache memory 3 (S 607), and then the area command control unit 41 is used to transmit the power address of the area command. , And increment by increment value (S 608). If the current address exceeds the line end address by this update, the command may be deleted.
  • the request is transferred to the cache memory 3 (S 610), and then the auto cleaner control unit 43 is controlled and the tallying address output unit 431 The address output from is increased by the unit address of the set.
  • TAC 4 is given a command relating to cache data transfer and attribute manipulation as processor 1 executes a predetermined instruction, and according to the command, six types of operation primitives and auto cleaner manipulation are performed. Is requested to the cache memory 3, and the cache memory 3 executes an operation according to the request from the TAC 4 while performing conventional general caching according to the memory access from the processor 1.
  • the six operation primitives and the auto cleaner operation are effective in improving the cache hit rate, reducing unnecessary bus transactions, and leveling (temporal distribution) of bus transactions, and the above-mentioned advance operation.
  • Software power can also be requested by having the processor 1 execute prescribed instructions (see, for example, FIGS. 10, 11, and 12). Therefore, this configuration is suitable for performing these operations under active control from software in order to improve the efficiency of the cache.
  • such specific instructions may be inserted into the program by the compiler.
  • the compiler knows the program location to which data is initially buffered, such as by determining the lifetime of the data, and inserts a command before it to request a fill operation, and so on. If you know the program position where data will not be written after that and then insert a command that requires the oldest data, it may be possible.
  • TAC4 fulfills only simple functions such as acquisition of commands from processor 1, queuing and selection of commands, sequential generation of requests for multiple addresses, and transfer of requests to cache memory 3. .
  • the present invention is applicable to a cache memory that improves controllability from software, and can be applied to, for example, an on-chip cache memory, an off-chip cache memory, a data cache memory, an instruction cache memory, and the like.

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

 ソフトウェアからの制御を積極的に受け入れて処理するキャッシュメモリシステムは、プロセッサ(1)とメモリ(2)との間に設けられるキャッシュメモリ(3)と、前記キャッシュメモリを制御するTAC(Transfer and Attribute Controller)(4)とを備え、TAC(4)はプロセッサ(1)が予め定められた命令を実行することによって、キャッシュデータの転送及び属性操作とその操作の対象を指定するアドレスとを示すコマンドを与えられ、前記アドレスに対する前記コマンドによって示される操作を、前記キャッシュメモリに要求する。

Description

明 細 書
キャッシュメモリシステム及びその制御方法
技術分野
[0001] 本発明は、キャッシュメモリシステム及びその制御方法に関し、特にキャッシュメモリ システムのソフトウェアによる制御性を向上する技術に関する。
背景技術
[0002] 近年のマイクロプロセッサでは、例えば、 SRAM (Static Random Access Memory) 等力 成る小容量で高速なキャッシュメモリをマイクロプロセッサの内部、もしくはその 近傍に配置し、データの一部をキャッシュメモリに記憶することによって、マイクロプロ セッサのメモリアクセスを高速化させて 、る。
[0003] 従来、キャッシュの効率向上(ヒット率向上、キャッシュミスレイテンシ低減)を指向し た種々の技術が知られている。そのような技術の一つに、キャッシュミスが発生する前 に、近い未来に使用するデータを予めキャッシュにフィルするプリロード (又はプリフエ ツチ)がある(例えば特許文献 1)。この技術を用いて、プリフェッチ命令により指定し たアドレスを含むラインをキャッシュにロードすることにより、キャッシュミスの低減を図 ることがでさる。
特許文献 1:特開平 7— 295882号公報
発明の開示
発明が解決しょうとする課題
[0004] しかしながら、上記従来の技術によれば、メモリへのアクセスの状況をハードウェア によって監視し、ハードウェアによって自律的にキャッシュ操作をしょうとすると、正確 な予測が困難であるためにかえって無駄な転送が発生することがある。このことは、 上記従来の技術に限らず、キャッシュの効率向上を指向した種々の技術において同 様である。そのようなハードウェアによる自律的な制御によるキャッシュ効率の限界を 打開する一つのアプローチとして、ソフトウェアによる制御を援用することが考えられ る。
[0005] 本発明は、上記の問題に鑑みてなされたものであり、ソフトウェア力もの制御を積極 的に受け入れて処理を行うための好ましい構成を持ったキャッシュメモリシステムを提 供することを目的とする。
課題を解決するための手段
[0006] 上記課題を解決するため、本発明のキャッシュメモリシステムは、プロセッサとメモリ との間に設けられるキャッシュメモリと、前記キャッシュメモリを制御する転送及び属性 制御手段とを備え、前記転送及び属性制御手段は、前記プロセッサが予め定められ た命令を実行することによって、キャッシュデータの転送及び属性操作とその操作の 対象を指定するアドレスとを示すコマンドを与えられるコマンドエントリ部と、前記アド レスに対する前記コマンドによって示される操作を、前記キャッシュメモリに要求する 操作要求部とを備える。
[0007] また、前記コマンドエントリ部は、さらに、前記プロセッサから前記コマンドに対応し てアドレス範囲を与えられ、前記操作要求部は、前記アドレス範囲に属する複数のァ ドレスに対する前記操作を、前記キャッシュメモリに逐次要求してもよい。
[0008] この構成によれば、前記予め定められた命令を前記プロセッサに実行させることに よって、ソフトウェアから、前記キャッシュデータの転送及び属性操作を要求できるの で、ソフトウェア力もの制御を積極的に受け入れて処理を行うための好ましい構成を 持ったキャッシュメモリシステムが得られる。
[0009] また、前記キャッシュメモリは、キャッシュデータの管理単位であるキャッシュエントリ に対応付けて、そのキャッシュエントリに保持されるキャッシュデータに対応するメモリ アドレスの上位部を示すタグを保持するタグ保持部と、そのキャッシュエントリが有効 か否かを示すバリッドフラグと、そのキャッシュエントリに書き込み操作があった力否か を示すダーティフラグと、そのキャッシュエントリがアクセスされた時期を他のどのキヤ ッシュエントリがアクセスされた時期よりも古いとみなすことを示すウィークフラグとを保 持するフラグ保持部とを有し、前記転送及び属性制御手段からの要求に応じて、指 定されるアドレスにヒットするキャッシュエントリがない場合に、リプレース対象となるキ ャッシュエントリを選択し、メモリから前記選択されたキャッシュエントリへ前記指定され たアドレスに対応するデータをロードし、タグを設定してノ リツドフラグをセットするフィ ル操作、指定されるアドレスにヒットするキャッシュエントリがない場合に、リプレース対 象となるキャッシュエントリを選択し、メモリから前記選択されたキャッシュエントリへデ ータをロードすることなくタグを設定してノ リツドフラグをセットするタツチ操作、指定さ れるアドレスにヒットするキャッシュエントリがありかつダーティフラグがセットされている 場合に、そのキャッシュエントリのデータをメモリへセーブしてダーティフラグをリセット するライトバック操作、指定されるアドレスにヒットするキャッシュエントリがある場合に、 そのキャッシュエントリのデータをダーティフラグの状態に応じてメモリへセーブするこ となくバリッドフラグをリセットする無効化操作、指定されるアドレスにヒットするキヤッシ ュエントリがある場合に、ダーティフラグがセットされていればそのキャッシュエントリの データをメモリへセーブしてダーティフラグ及びバリッドフラグをリセットし、ダーティフ ラグがリセットされていればそのキャッシュエントリのノ リツドフラグのリセットのみを行う ライトバック兼無効化操作、及び指定されるアドレスにヒットするキャッシュエントリがあ る場合に、そのキャッシュエントリのウィークフラグをセットする最古ィ匕操作の中の一つ を実行してもよい。
[0010] この構成によれば、前記 6種類の操作は、キャッシュのヒット率の向上、不必要なバ ストランザクションの削減、及びバストランザクションの平準化(時間的分散)に効果が あるので、ソフトウェアからの制御を積極的に受け入れて処理を行うことによってキヤ ッシュ効率の向上を図る上で好適である。
[0011] また、前記転送及び属性制御手段は、さらに、前記アドレス範囲の先頭及び末尾を 、前記キャッシュメモリにおけるキャッシュデータの管理単位であるキャッシュエントリ の先頭データを示すように調整するアドレス調整部を有し、前記操作要求部は、前記 調整後のアドレス範囲に含まれる複数のアドレスに対する前記操作を、前記キヤッシ ュメモリに逐次要求してもよ 、。
[0012] この構成によれば、前記アドレス調整部が、前記アドレス範囲の先頭及び末尾を、 前記キャッシュエントリの先頭データを示すように調整するので、プログラマやコンパ イラはキャッシュメモリのライン境界やラインサイズを管理する必要がなぐキャッシュ 管理のための負担が軽減される。
[0013] また、前記転送及び属性制御手段は、さらに、複数のコマンドとそれぞれのコマンド に対応するアドレス範囲とを保持するコマンド保持部と、前記保持された複数のコマ ンドの中から一つを選択するコマンド選択部とを有し、前記操作要求部は、前記選択 されたコマンドに関連するアドレス範囲に属する複数のアドレスに対する、そのコマン ドによって示される操作を逐次要求してもよ!/、。
[0014] また、好ましくは、前記コマンド選択部は、前記選択されたコマンドにつ 、て全ての 要求がなされる前に、他のコマンドを選択し、前記操作要求部は、元のコマンドが再 び選択された場合にそのコマンドにつ 、てまだ要求して!/、な!、アドレスに対する操作 を逐次要求してもよい。
[0015] この構成によれば、前記転送及び属性制御手段は複数のコマンドを保持して処理 できるので、例えば前記複数のコマンド力 例えば前記プロセッサがマルチタスク処 理を行う場合の各タスクから与えられる場合に好適である。
[0016] また、前記転送及び属性制御手段は、さらに、次に予定される要求に関して定めら れる予測アドレスに対して、前記プロセッサによって特定の命令が実行された力否か を判断する実行判断部と、肯定判断がなされると、前記予測アドレスに所定のオフセ ット値を加算又は減算することによって実効アドレスを生成する実効アドレス生成部と を有し、前記操作要求部は、前記生成された実効アドレスに対する前記操作を要求 してちよい。
[0017] また、好ましくは、前記転送及び属性制御手段は、さらに、複数のコマンドとそれぞ れのコマンドに関係するアドレス範囲とを保持するコマンド保持部を有し、前記実行 判断部は、前記保持された各コマンドについて、そのコマンドに対応する予測アドレ スに対して、前記プロセッサによって特定の命令が実行されたか否かを判断し、前記 転送及び属性制御手段は、さらに、肯定判断がなされたコマンドの中力 一つを選 択するコマンド選択部を有し、前記実効アドレス生成部は、前記選択されたコマンド に対応する予測アドレスに所定値を加算又は減算することによって実効アドレスを生 成し、前記操作要求部は、前記生成された実効アドレスに対する前記選択されたコ マンドによって示される操作を要求してもよ 、。
[0018] この構成によれば、前記特定の命令がプリフェッチ付きの命令である場合に特に好 適であり、その命令の操作対象に対してその命令の実行に同期して前記操作の要 求がなされるので、キャッシュエントリを効率よく操作することができる。 [0019] また、前記転送及び属性制御手段は、さらに、前記キャッシュメモリにおけるキヤッ シュデータの管理単位である各キャッシュエントリを指定するアドレスを逐次出力する アドレス出力部を有し、前記操作要求部は、前記出力されたアドレスによって指定さ れるキャッシュエントリを含む一つ以上のキャッシュエントリに対する逐次操作を前記 キャッシュメモリに要求し、前記キャッシュメモリは、前記要求に応じて逐次操作を実 行してちょい。
[0020] ここで、前記逐次操作は、ライトバック操作であってもよ!/、。
この構成によれば、バストランザクションの平準化(時間的分散)に効果があることは 明らかである。
[0021] また、前記コマンドエントリ部は、単一のアドレスに対する操作を示す単独コマンドと 、アドレス範囲に含まれる複数のアドレスに対する操作を前記プロセッサが実行する 特定の命令と同期して行うことを示す命令連動コマンドと、アドレス範囲に含まれる複 数のアドレスに対する操作を前記プロセッサが実行する特定の命令とは非同期に行 うことを示す領域コマンドと、キャッシュデータを逐次ライトバックすることを示すオート クリーナコマンドとを、前記プロセッサから与えられ、前記操作要求部は、各コマンド に応じた操作要求を、予め設定された優先順位に基づいて、前記キャッシュメモリに 要求してもよい。
[0022] ここで、前記予め設定された優先順位が、前記コマンドの順であってもよ 、。
この構成によれば、各操作の実行モードに応じた好適な順序で操作を要求すること ができる。
[0023] また、本発明は、このようなキャッシュメモリシステムとして実現することができるだけ でなぐそのようなキャッシュメモリシステムが備える特徴的な手段によって実行される 処理をステップとするキャッシュメモリシステムの制御方法として実現することもできる
発明の効果
[0024] 本発明のキャッシュメモリシステムによれば、前記予め定められた命令をプロセッサ に実行させることによって、ソフトウェアから、キャッシュデータの転送及び属性操作を 要求できるので、ソフトウェア力もの制御を積極的に受け入れて処理を行うための好 ましい構成を持ったキャッシュメモリシステムが得られる。
[0025] キャッシュ効率の向上を図るために前記操作としてキャッシュ効率の向上に効果が ある操作を採用し、ソフトウェアからの積極的な制御下でこれらの操作を行えば、ハ 一ドウエアとソフトウェアとの良好な機能分担が可能となり、その結果、自律的な制御 によるキャッシュ効率の向上を目指してハードウェアがいたずらに大規模ィ匕する事態 を回避することちできる。
図面の簡単な説明
[0026] [図 1]図 1は、本発明の実施の形態に係るプロセッサ、キャッシュメモリ、メモリ、 TAC を含むコンピュータシステムの全体構成例を示すブロック図である。
[図 2]図 2は、キャッシュメモリの構成例を示すブロック図である。
[図 3]図 3は、使用フラグの更新例を示す図である。
[図 4]図 4 (a)はウィークフラグが存在しない場合にキャッシュエントリがリプレースされ る様子を示す図であり、図 4 (b)はリプレース処理におけるウィークフラグ Wの役割を 示す説明図である。
[図 5]図 5は、キャッシュメモリにおける動作プリミティブ処理の一例を示すフローチヤ ートである。
[図 6]図 6は、キャッシュメモリにおけるオートクリーナ処理の一例を示すフローチヤ一 トである。
[図 7]図 7は、変形例に係るキャッシュエントリの構成例を示す図である。
[図 8]図 8は、キャッシュメモリと TACとの間のインタフェースの一例を示す図である。
[図 9]図 9は、 TACの構成例を示すブロック図である。
[図 10]図 10 (a)は、動作プリミティブレジスタにコマンドを書き込む命令の一例を示す 図であり、図 10 (b)は、コマンドの一例を示す図である。
[図 11]図 11 (a)は、スタートアドレスレジスタにスタートアドレスを書き込む命令の一例 を示す図であり、図 11 (b)は、サイズレジスタにサイズを書き込む命令の一例を示す 図であり、図 11 (c)は、コマンドレジスタにコマンドを書き込む命令の一例を示す図で あり、図 11 (d)は、コマンドの一例を示す図である。
[図 12]図 12 (a)は、 TACコントロールレジスタにコマンドを書き込む命令の一例を示 す図であり、図 12 (b)は、コマンドの一例を示す図である。
[図 13]図 13は、アドレス調整の内容を説明する概念図である。
[図 14]図 14は、アドレス保持部の構成を示すブロック図である。
[図 15]図 15は、領域コマンド制御部における領域コマンド制御処理の一例を示すフ ローチャートである。
[図 16]図 16は、命令連動コマンド制御部における命令連動コマンド制御処理の一例 を示すフローチャートである。
[図 17]図 17は、オートクリーナ制御部におけるオートクリーナ制御処理の一例を示す フローチャートである。
[図 18]図 18は、操作要求部における操作要求処理の一例を示すフローチャートであ る。
符号の説明
1 プロセッサ
2 メモリ
3 キャッシュメモリ
4 TAC
20 アドレスレジスタ
21 メモリ IZF
22 デマルチプレクサ
30 デコーダ
31a- -31d ウェイ
32a- -32d 比較器
33a- -33d アンド回路
34 オア回路
35 セレクタ
36 セレクタ
37 デマルチプレクサ 40 コマンドエントリ部
41 領域コマンド制御部
42 命令連動コマンド制御部
43 オートクリーナ制御部
44 操作要求部
401 動作プリミティブレジスタ
402 スタートアドレスレジスタ
403 サイズレジスタ
404 コマンドレジスタ
405 TACコントロールレジスタ
411 アドレス調整部
412 コマンド保持部
413 コマンド選択部
421 アドレス調整部
422 コマンド保持部
423 実行判断部
424 コマンド選択部
425 実効アドレス生成部
431 クリーニングアドレス出力言 1
発明を実施するための最良の形態
[0028] 以下、本発明の実施の形態について、図面を参照しながら説明する。
[0029] く全体構成〉
図 1は、本発明の実施の形態におけるプロセッサ 1、メモリ 2、キャッシュメモリ 3、及 び TAC (Transfer and Attribute Controller) 4を含むコンピュータシステムの全体構 成を示すブロック図である。この実施の形態におけるキャッシュメモリ 3及び TAC4が 本発明のキャッシュメモリシステムに相当する。
[0030] TAC4は、プロセッサ 1が予め定められた命令を実行することによってキャッシュデ ータの転送及び属性操作とその操作の対象を指定するアドレスとを示すコマンドを与 えられ、そのコマンドによって示される操作をキャッシュメモリ 3に要求する。
[0031] キャッシュメモリ 3は、プロセッサ 1からのメモリアクセスに応じて、従来の一般的なキ ャッシュメモリが行うようにデータのキャッシングを行う。また、プロセッサ 1からのメモリ アクセスを処理していないときには、 TAC4からの要求に応じて、 6種類のキャッシュ データの転送及び属性操作、並びにオートクリーナを実行する。この 6種類の操作は 動作プリミティブと呼ばれる。動作プリミティブ及びオートクリーナについて、後に詳し く説明する。
[0032] 本発明のキャッシュメモリシステムのこのような構成は、ハードウェアによる自律的な 制御によるキャッシュ効率の限界をソフトウェアの援用によって打開しょうとしたときに 、ソフトウェア力もの制御を積極的に受け入れるために適して 、る。
[0033] くキャッシュメモリの構成 >
以下、キャッシュメモリ 3の具体例として、 4ウェイ 'セット'ァソシエイティブ方式のキヤ ッシュメモリに本発明を適用した場合の構成について説明する。
[0034] 図 2は、キャッシュメモリ 3の構成例を示すブロック図である。同図のように、キヤッシ ュメモリ 3は、アドレスレジスタ 20、メモリ I/F21、デマルチプレクサ 22、デコーダ 30、 4つのウェイ 31a〜31d (以下ウェイ 0〜3と略す)、 4つの比較器 32a〜32d、 4つのァ ンド回路 33a〜33d、オア回路 34、セレクタ 35、 36、デマルチプレクサ 37、制御部 3 8を備える。
[0035] デマルチプレクサ 22は、制御部 38からの制御に応じて、プロセッサ 1から与えられ るメモリ 2へのアクセスアドレスを優先的に選択し、プロセッサ 1からのメモリアクセスが な 、ときに TAC4から与えられるアドレスを選択する。
[0036] アドレスレジスタ 20は、選択されたアクセスアドレスを保持するレジスタである。この アクセスアドレスは 32ビットであるものとする。同図に示すように、アクセスアドレスは、 最上位ビットから順に、 21ビットのタグアドレス、 4ビットのセットインデックス(図中の SI )、 5ビットのワードインデックス(図中の WI)を含む。ここで、タグアドレスはウェイにマ ッビングされるメモリ中の領域 (そのサイズはセット数 Xブロックである)を指す。この領 域のサイズは、タグアドレスよりも下位のアドレスビット (A10〜AO)で定まるサイズつ まり 2kバイトであり、 1つのウェイのサイズでもある。セットインデックス(SI)はウェイ 0〜 3に跨る複数セットの 1つを指す。このセット数は、セットインデックス力 ビットなので 1 6セットある。タグアドレスおよびセットインデックスで特定されるキャッシュエントリは、リ プレース単位であり、キャッシュメモリに格納されている場合はラインデータ又はライン と呼ばれる。ラインデータのサイズは、セットインデックスよりも下位のアドレスビットで 定まるサイズつまり 128バイトである。 1ワードを 4バイトとすると、 1ラインデータは 32ヮ ードである。ワードインデックス (WI)は、ラインデータを構成する複数ワード中の 1ヮ ードを指す。アドレスレジスタ 20中の最下位 2ビット(Al、 AO)は、ワードアクセス時に は無視される。
[0037] メモリ IZF21は、キャッシュメモリ 3からメモリ 2へのデータのライトバックや、メモリ 2 力 キャッシュメモリ 3へのデータのロード等、キャッシュメモリ 3からメモリ 2をアクセス するための IZFである。
[0038] デコーダ 30は、セットインデックスの 4ビットをデコードし、 4つのウェイ 0〜3に跨る 1 6セット中の 1つを選択する。
[0039] 4つのウェイ 0〜3は、同じ構成を有数する 4つのウェイであり、 4 X 2kバイトの容量を 有する。各ウェイは、 16個のキャッシュエントリを有する。 1つのキャッシュエントリは、 ノ リツドフラグ V、 21ビットのタグ、 128バイトのラインデータ、ウィークフラグ W、使用フ ラグ U、及びダーティフラグ Dを有する。
[0040] タグは 21ビットのタグアドレスのコピーである。ラインデータは、タグアドレスおよびセ ットインデックスにより特定されるブロック中の 128バイトデータのコピーである。
[0041] ノ リツドフラグ Vは、当該キャッシュエントリのデータが有効か否かを示す。
[0042] ウィークフラグ Wは、プロセッサからのアクセスに関しては、アクセス頻度の低いァク セスか否かを示し、キャッシュメモリにおけるリプレース制御に関しては、そのキヤッシ ュエントリのアクセス順序を強制的に最古とする、つまりそのキャッシュエントリがァク セスされた時期が他のどのキャッシュエントリがアクセスされた時期よりも古いとみなす ことを示す。ウィークフラグ Wによって、他のキャッシュエントリよりも先に追い出しても ょ 、最強のリプレース対象が示される。
[0043] 使用フラグ Uは、そのキャッシュエントリにアクセスがあつたか否かを示し、 LRU方 式におけるキャッシュエントリ間のアクセス順序データの代わりに用いられる。より正確 には、使用フラグ Uの 1は、アクセスがあったことを、 0はないことを意味する。ただし、 1つのセット内の 4つウェイの使用フラグが全て 1になる場合には、セットするウェイ以 外は 0にリセットされる。別言すれば、使用フラグ Uは、アクセスされた時期が古いか 新しいか 2つの相対的な状態を示す。つまり、使用フラグ Uが 1のキャッシュエントリは 、使用フラグが 0のキャッシュエントリよりも新しくアクセスされたことを意味する。
[0044] ダーティフラグ Dは、当該キャッシュエントリにプロセッサから書き込みがあつたか否 力 つまりライン中にキャッシュされたデータが存在するが書き込みによりメモリ中の データと異なる可能性があるためメモリに書き戻すことが必要力否かを示す。
[0045] 比較器 32aは、アドレスレジスタ 20中のタグアドレスと、セットインデックスにより選択 されたセットに含まれる 4つのタグ中のウェイ 0のタグとがー致する力否かを比較する。 比較器 32b〜32cについても、ウェイ 31b〜31dに対応すること以外は同様である。
[0046] アンド回路 33aは、ノリツドフラグと比較器 32aの比較結果とがー致する力否かをァ ンドする。この比較結果を hOとする。比較結果 hOが 1である場合は、アドレスレジスタ 20中のタグアドレスおよびセットインデックスに対応するラインデータが一致すること、 つまりウェイ 0においてヒットしたことを意味する。比較結果 hOが 0である場合は、ミスヒ ットしたことを意味する。アンド回路 33b〜33dについても、ウェイ 31b〜31dに対応 すること以外は同様である。その比較結果 hi〜! ι3は、ウェイ 1〜3でヒットしたかミスし た力を意味する。
[0047] オア回路 34は、比較結果 hO〜! ι3のオアをとる。このオアの結果を hitとする。 hitは
、キャッシュメモリにヒットしたか否かを示す。
[0048] セレクタ 35は、選択されたセットにおけるウェイ 0〜3のラインデータのうち、ヒットした ウェイのラインデータを選択する。
[0049] セレクタ 36は、セレクタ 35により選択された 32ワードのラインデータにうち、ワードィ ンデッタスに示される 1ワードを選択する。
[0050] デマルチプレクサ 37は、キャッシュエントリにデータを書き込む際に、ウェイ 0〜3の
1つに書き込みデータを出力する。この書き込みデータはワード単位でよい。
[0051] 制御部 38は、キャッシュメモリ 3の全体の制御を行う。
[0052] <使用フラグ Uの説明 > 図 3は、制御部 38による使用フラグの更新例を示す。同図の上段、中断、下段は、 ウェイ 0〜3に跨るセット Nを構成する 4つのキャッシュエントリを示している。 4つのキ ャッシュエントリ右端の 1又は 0は、それぞれ使用フラグの値である。この 4つの使用フ ラグ Uを UO〜U3と記す。
[0053] 同図上段では(UO〜U3) = (1、 0、 1、 0)であるので、ウェイ 0、 2のキャッシュェント リはアクセスがあったことを、ウェイ 1、 3のキャッシュエントリはアクセスがないことを意 味する。
[0054] この状態で、メモリアクセスがセット N内のウェイ 1のキャッシュエントリにヒットした場 合、同図中段に示すように、(UO〜U3) = (1、 1、 1、 0)に更新される。つまり、実線 に示すようにウェイ 1の使用フラグ U1が 0から 1に更新される。
[0055] さらに、同図中段の状態で、メモリアクセスがセット N内のウェイ 3のキャッシュェント リにヒットした場合、同図下断に示すように、(UO〜U3) = (0、 0、 0、 1)に更新される 。つまり、実線に示すようにウェイ 3の使用フラグ U1が 0から 1に更新される。加えて、 破線に示すようにウェイ 3以外の使用フラグ U0〜U2が 1から 0に更新される。これに より、ウェイ 3のキヤシュエントリ力 ウェイ 0〜2の各キャッシュエントリよりも新しくァクセ スされたことを意味すること〖こなる。
[0056] 制御部 38は、キャッシュミス時に W= 1のキャッシュエントリが存在しなければ、使用 フラグに基づいてリプレース対象のキャッシュエントリを決定してリプレースを行う。例 えば、制御部 38は、図 3上段では、ウェイ 1とウェイ 3の何れかをリプレース対象と決 定し、図 3中段ではウェイ 3をリプレース対象と決定し、図 3下段ではウェイ 0〜2の何 れかをリプレース対象と決定する。
[0057] くウィークフラグ Wの説明 >
図 4 (a)ウィークフラグが存在しな 、と仮定した場合の比較例であり、キャッシュェン トリがリプレースされる様子を示す図である。同図においても、図 3と同様にウェイ 0〜 3に跨るセット Nを構成する 4つのキャッシュエントリを示している。 4つのキャッシュェ ントリ右端の 1又は 0は、それぞれ使用フラグの値である。また、データ Eのみアクセス 頻度の低いデータを、データ A、 B、 C、 Dはアクセス頻度の高いデータとする。
[0058] 図 4 (a)の第 1段目の状態で、プロセッサ 1がデータ Eにアクセスすると、キャッシュミ スが発生する。このキャッシュミスにより、例えば、 u=oのキャッシュエントリの中から アクセス頻度の高 、データ Cのキャッシュエントリがアクセス頻度の低!、データ Eにリ プレースされ、第 2段目の状態となる。
[0059] 第 2段目の状態で、プロセッサ 1がデータ Cにアクセスすると、キャッシュミスが発生 する。このキャッシュミスにより、 U = 0のキャッシュエントリであるアクセス頻度の高い データ Dのキャッシュエントリがアクセス頻度の高いデータ Cにリプレースされ、第 3段 目の状態となる。
[0060] 第 3段目の状態で、プロセッサ 1がデータ Dにアクセスすると、キャッシュミスが発生 する。このキャッシュミスにより、例えば、アクセス頻度の高いデータ Aのキャッシュェ ントリがアクセス頻度の高いデータ Dにリプレースされ、第 4段目の状態となる。
[0061] 同様に、第 4段目でも、使用頻度の低いデータ Eはリプレース対象として選択されな いで、キャッシュメモリに残っている。
[0062] 第 5段目の状態で、使用頻度の低いデータ Eは最も古い (U=0)であることから、リ プレース対象として選択されて、追い出される。
[0063] このように、擬似 LRU方式にお!、て (通常の LRU方式にお!、ても)、アクセス頻度 の低 、データ Eによって、 4ウェイの場合は最悪 4回のキャッシュミスを誘発する場合 がある。
[0064] 図 4 (b)は、リプレース処理におけるウィークフラグ Wの役割を示す説明図である。
[0065] 図 4 (b)の第 1段目の状態(図 4 (a)の第 1段目と同じ)で、プロセッサ 1がデータ Eに アクセスすると、キャッシュミスが発生する。このキャッシュミスにより、例えば、 U = 0の キャッシュエントリの中力もアクセス頻度の高いデータ Cのキャッシュエントリがァクセ ス頻度の低いデータ Eにリプレースされる。このとき、プロセッサ 1は、データ Eのキヤッ シュエントリにウィークフラグ Wを 1に設定するものとする。これにより、次のキャッシュミ ス時にデータ Eのキャッシュエントリが真っ先に追い出され、第 2段目の状態となる。
[0066] 第 2段目の状態で、プロセッサ 1がデータ Cにアクセスすると、キャッシュミスが発生 する。このキャッシュミスにより、 W= lのキャッシュエントリであるアクセス頻度の低い データ Eのキャッシュエントリがリプレース対象として選択され、アクセス頻度の高 ヽデ ータ Cにリプレースされ、第 3段目の状態となる。 [0067] このように、ウィークフラグ Wを設けることにより、アクセス頻度の低いデータによるキ ャッシュミスの誘発を低減することができる。
[0068] <動作プリミティブ >
次に、キャッシュメモリ 3が実行する 6種類の動作プリミティブについて説明する。動 作プリミティブは、 TAC4から指定される単一のアドレスに対する次のような操作であ る。
(1)フィル操作:前記アドレスにヒットするキャッシュエントリがない場合に、リプレース 対象となるキャッシュエントリを選択し、メモリから前記選択されたキャッシュエントリへ 前記指定されたアドレスに対応するデータをロードし、タグを設定してノ リツドフラグ V をセットする。この操作は、キャッシュのヒット率の向上に役立つ。
(2)タツチ操作:前記アドレスにヒットするキャッシュエントリがない場合に、リプレース 対象となるキャッシュエントリを選択し、メモリから前記選択されたキャッシュエントリへ データをロードすることなくタグを設定してノ リツドフラグ Vをセットする。この操作は、 キャッシュのヒット率の向上と、不必要なバストランザクションの削減に役立つ。
(3)ライトバック操作:前記アドレスにヒットするキャッシュエントリがありかつダーティフ ラグ Dがセットされている場合に、そのキャッシュエントリのデータをメモリへセーブし てダーティフラグ Dをリセットする。この操作は、バストランザクションの平準化(時間的 分散)に役立つ。
(4)無効化操作:前記アドレスにヒットするキャッシュエントリがある場合に、そのキヤッ シュエントリのデータをダーティフラグに応じてメモリへセーブすることなくバリッドフラ グ Vをリセットする。この操作は、不必要なバストランザクションの削減に役立つ。
(5)ライトバック兼無効化操作:前記アドレスにヒットするキャッシュエントリがある場合 に、ダーティフラグ Dがセットされて!/ヽればそのキャッシュエントリのデータをメモリへセ ーブしてダーティフラグ D及びバリッドフラグ Vをリセットし、ダーティフラグ Dがリセット されて!/ヽればそのキャッシュエントリのバリッドフラグ Vのリセットのみを行う。この操作 は、バストランザクションの平準化(時間的分散)に役立つ。
(6)最古ィ匕操作:前記アドレスにヒットするキャッシュエントリがある場合に、そのキヤッ シュエントリのウィークフラグ Wをセットする。この操作は、キャッシュのヒット率の向上 に役立つ。
[0069] <動作プリミティブ処理 >
図 5は、キャッシュメモリ 3における動作プリミティブ処理の一例を示すフローチヤ一 トである。この動作プリミティブ処理は、 TAC4から動作プリミティブの指定 Iと、操作対 象を指定するアドレス Aとを与えられると起動され、指定された動作プリミティブを実 行する。
[0070] 制御部 38がプロセッサ 1からのメモリアクセスを処理中なら、その処理が終了するま で待ち(S101 :YES)、そして、プロセッサ 1からのメモリアクセスが行われていない期 間に、デマルチプレクサ 22は TAC4から与えられたアドレスを選択する(S102)。
[0071] そのアドレスにヒットするキャッシュエントリがある場合には(S103 : YES)、無効化、 最古化、ライトバック、及びライトバック兼無効化のみが、そのヒットしたキャッシュェン トリを操作対象として実行される(S104)。指定された動作プリミティブ力 Sライトバック 又はライトバック兼無効化であれば、ダーティフラグ Dが 1ならライトバックし (S105〜 S106)、さらに指定された動作プリミティブ力ライトバック兼無効化であればバリッドフ ラグ Vをリセットする(S107〜S108)。また、指定された動作プリミティブが無効化で あればバリッドフラグ Vをリセットし (S110)、最古ィ匕であればウィークフラグ Wをセット する(S109)。
[0072] そのアドレスにヒットするキャッシュエントリがない場合には(S 103 : NO)、フィル及 びタツチのみが実行される(S 111)。その場合にはまず、リプレース対象となるキヤッ シュエントリを選択し(S112)、そのキャッシュエントリのダーティフラグ Dが 1ならライト ノ ックし(S 113〜S 114)、タグアドレスを設定して(S 115)、さらに指定された動作プ リミティブがフィルであればそのキャッシュエントリへメモリからデータをロードし(S117 )、その後、 Vフラグをセットする(S 118)。
[0073] <オートクリーナ >
次に、キャッシュメモリ 3が実行するオートクリーナについて説明する。オートクリーナ は、 TAC4から指定される単一のアドレスに対する次のような操作である。
[0074] 前記アドレスで示されるセットの各キャッシュエントリ(図 2を参照して具体的に言え ば、前記アドレスに含まれるセットインデックス SIで指し示されるセットに属する 4つの キャッシュエントリ)について、ダーティフラグ D及びウィークフラグ Wが共にセットされ ていればライトバックする。
[0075] この操作は、バストランザクションの平準化 (時間的分散)に役立つ。
[0076] <オートクリーナ処理 >
図 6は、キャッシュメモリ 3におけるオートクリーナ処理の一例を示すフローチャート である。このオートクリーナ処理は、 TAC4からオートクリーナの指定 Iと、操作対象を 指定するアドレス Aとを与えられると起動される。
[0077] 制御部 38がプロセッサ 1からのメモリアクセスを処理中なら、その処理が終了するま で待ち(S201 :YES)、そして、プロセッサ 1からのメモリアクセスが行われていない期 間に、デマルチプレクサ 22は TAC4から与えられたアドレスを選択する(S202)。
[0078] そのアドレスに含まれるセットインデックスで指定されるセットに属する各キャッシュ エントリ ίこつ ヽて、以下を繰り返す(S203〜S207)。
[0079] ダーティフラグ Dが 1で、かつウィークフラグ Wが 1なら(S204 :YES)、ライトバックし てダーティフラグ Dをリセットする(S205〜S206)。
[0080] <変形例>
なお、本発明のキャッシュメモリは、上記の実施の形態の構成に限るものではなぐ 種々の変形が可能である。以下、変形例のいくつかについて説明する。
(1)上記実施の形態では、 4ウェイ 'セット'ァソシエイティブのキャッシュメモリを例に 説明したが、ウェイ数は、いくつでもよい。また、上記実施の形態では、セット数が 16 である例を説明したが、セット数は 、くつでもよ 、。
(2)上記実施の形態では、セット'ァソシエイティブのキャッシュメモリを例に説明した 力 フル ·ァソシエイティブ方式やダイレクトマップ方式のキャッシュメモリであってもよ い。
(3)上記実施の形態では、ラインをキャッシュデータのリプレース単位であるとして説 明したが、ラインを 4つに分割した各部分であるサブラインをリプレース単位としてもよ い。その場合、各キャッシュエントリは、 4つのバリッドフラグおよび 4つのダーティフラ グをそれぞれ保持する。
[0081] 図 7は、その場合のキャッシュエントリの構成例を示す図である。ラインの 1/4をサ ブラインとする他に、ラインの 1/2、 1/8、 1/16をサブラインとしてもよい。その場 合、各キャッシュエントリは、サブラインと同数のノ リツドフラグおよびダーティフラグを それぞれ保持する。リプレース単位をラインとするかサブラインとするかを、 TAC4か らの指示に応じて切り替えてもよ 、。
(4)キャッシュメモリとしてのいくつかの機能 (例えばリプレース機能)が制限されるゥェ ィ (インアクティブウェイ)を設けてもょ ヽ。各ウェイをそのようなインアクティブウェイと するか、全ての機能が利用可能なアクティブウェイとするかを、 TAC4からの指示に 応じて切り替えてもよい。
[0082] <キャッシュメモリ及び TAC間のインタフェースの一例 >
図 8は、キャッシュメモリ 3と TAC4との間のインタフェース(送受信される信号)の一 例を示す図である。この例には、上記の変形例が考慮されている。
[0083] 32ビットのアドレスは、操作の対象を指定する。要求、要求受理、及び実行完了は 、要求の発行に関するハンドシェイクに用いられる。フィル、タツチ、ライトバック、無効 ィ匕、ライトバック兼無効化、最古化、及びオートクリーナは、要求する操作を指定する 。 3ビットのアクティブウェイは、ウェイごとにアクティブウェイとする力インアクティブゥェ ィとするかを指定する。リフィル単位は、リプレース単位をラインとするかサブラインと するかを指定する。
[0084] く TACの構成〉
次に、 TACの構成について説明する。
[0085] 図 9は、 TAC4の構成例を示すブロック図である。 TAC4は、プロセッサ 1から与え られるコマンドに応じた操作をキャッシュメモリ 3へ要求するために、コマンドエントリ部 40、領域コマンド制御部 41、命令連動コマンド制御部 42、オートクリーナ制御部 43 、及び操作要求部 44を備える。
[0086] TAC4がプロセッサ 1から与えられるコマンドには、単一のアドレスに対する操作を 示す単独コマンドと、アドレス範囲に含まれる複数のアドレスに対する操作を前記プ 口セッサが実行する特定の命令に同期して行うことを示す命令連動コマンドと、ァドレ ス範囲に含まれる複数のアドレスに操作を前記プロセッサが実行する特定の命令と は非同期に行うことを示す領域コマンドと、キャッシュデータを逐次ライトバックするこ とを示すオートクリーナコマンドとがある。
[0087] コマンドエントリ部 40は、プロセッサ 1が予め定められた命令を実行することによって 、コマンドとアドレスとを書き込まれるレジスタ群であり、動作プリミティブレジスタ 401、 スタートアドレスレジスタ 402、サイズレジスタ 403、コマンドレジスタ 404、及び TAC コントロールレジスタ 405を備える。これらのレジスタは、例えば予め定められたメモリ アドレスに割り当てられるなどして、プロセッサ 1から直接アクセスが可能であり、プロ セッサ 1により書き込まれた内容を保持する。
[0088] 領域コマンド制御部 41は、領域コマンドを最大 4つまで保持し、保持されているコマ ンドに応じた要求を生成する機能ブロックであり、アドレス調整部 411、コマンド保持 部 412、及びコマンド選択部 413を備える。
[0089] 命令連動コマンド制御部 42は、命令連動コマンドを最大 4つまで保持し、保持され ているコマンドに応じた要求を、プロセッサ 1が実行する特定の命令と同期して生成 する機能ブロックであり、アドレス調整部 421、コマンド保持部 422、実行判断部 423
、コマンド選択部 424、実効アドレス生成部 425を備える。
[0090] オートクリーナ制御部 43は、オートクリーナ要求を生成する機能ブロックであり、タリ 一-ングアドレス出力部 431を備える。
[0091] くコマンドエントリ部 >
単独コマンドは、動作プリミティブレジスタ 401に書き込まれ、保持される。
[0092] 図 10 (a)に、動作プリミティブレジスタ 401に単独コマンドを書き込む命令の一例を 示す。この命令は、通常の転送命令 (mov命令)であり、ソースオペランドとしてコマン ドを、デスティネーションオペランドとして動作プリミティブレジスタ(PR) 401を指定し ている。
[0093] 図 10 (b)に、コマンドフォーマットの一例を示す。このコマンドフォーマットは、操作 対象アドレスと動作プリミティブの指定とからなる。
[0094] コマンドエントリ部 40は、動作プリミティブレジスタ 401に保持された単独コマンドに 応じた要求を操作要求部 44へ出力する。
[0095] 領域コマンド及び命令連動コマンドは、スタートアドレスレジスタ 402、サイズレジス タ 403、及びコマンドレジスタ 404に書き込まれる。 [0096] 図 11 (a)に、スタートアドレスレジスタ(SAR) 402にスタートアドレスを書き込む命令 の一例を示す。この命令も、図 10 (a)と同様に通常の転送命令である。スタートァドレ スは、コマンドの操作対象の先頭アドレスを示す。
[0097] 011 (b)に、サイズレジスタ(SR) 403にサイズを書き込む命令の一例を示す。この 命令も、通常の転送命令である。サイズは、前記操作対象の大きさを示す。サイズの 単位は、バイト数であっても、ライン数 (キャッシュエントリ数)であってもよぐ予め定め られた単位であればょ 、。
[0098] 図 11 (c)に、コマンドレジスタ(CR) 404にコマンドを書き込む命令の一例を示す。
この命令も、通常の転送命令である。
[0099] 011 (d)に、コマンドフォーマットの一例を示す。このコマンドフォーマットは、操作 の要求を特定の命令の実行に連動させるか否力 (つまり、コマンドが命令連動コマン ドか領域コマンドか)を指定する命令連動フラグと、動作プリミティブの指定と、指定さ れたアドレス範囲内で操作対象とする複数のアドレスの間隔を示すインクリメント値と からなる。
[0100] このインクリメント値を、例えばラインのサイズとすれば、アドレス範囲内の全てのキ ャッシュデータに順次所望の操作を行うことができる。また、前記特定の命令がポスト インクリメント付きのロード'ストア命令である場合に、このインクリメント値をその命令の ポストインクリメント値とすれば、その命令の操作対象に順次所望の操作を行うことが できる。
[0101] コマンドエントリ部 40は、スタートアドレスレジスタ 402、サイズレジスタ 403、及びコ マンドレジスタ 404に前述した内容が書き込まれると、そのコマンドが領域コマンドな ら領域コマンド制御部 41へ出力し、命令連動コマンドなら命令連動コマンド制御部 4 2へ出力する。
[0102] オートクリーナコマンドは、 TACコントロールレジスタ 405内の予め定められたビット 位置にあってオートクリーナを有効とするか無効とするかを示すオートクリーナフラグ の値を更新する。
[0103] 図 12 (a)に、オートクリーナフラグを (TACコントロールレジスタ 405全体の内容と共 に)更新する命令の一例を示す。この命令も、通常の転送命令である。 [0104] 図 12 (b)に、コマンドフォーマットの一例を示す。このコマンドフォーマットは、 TAC コントロールレジスタのフォーマットに対応し、前記ビット位置にオートクリーナフラグ の新しい値を含む。
[0105] コマンドエントリ部 40は、 TACコントロールレジスタ 405に保持されたオートクリーナ フラグの値をオートクリーナ制御部 43へ出力する。
[0106] <領域コマンド制御部 >
領域コマンド制御部 41において、アドレス調整部 411は、コマンドエントリ部 40から 領域コマンドに関するアドレス範囲を取得し、その両端をそれぞれキャッシュエントリ の先頭データを指すように調整し、コマンド保持部 412は、アドレス範囲を調整された 後の領域コマンドを最大 4つまで保持し、コマンド選択部 413は、保持されている領 域コマンドの一つ (例えば、最も古くから保持されている一つ)を選択して、選択され た領域コマンドに応じた要求を生成し、操作要求部 44へ出力する。
[0107] <アドレス調整部 >
ここで、アドレス調整部 411のアドレス調整機能の内容を詳しく説明する。
[0108] アドレス調整部 411は、まずスタートアドレスレジスタ 402に保持されたスタートアド レスとサイズレジスタ 403に保持されたサイズとを加算する。加算結果は、アドレス範 囲の終了位置を指すエンドアドレスである。サイズは、前述したように、予め定められ た単位で表されて!/ヽればよぐその単位が例えばバイトであればバイトアドレスとして 加算し、ラインであればラインアドレスとして加算すればょ 、。
[0109] 次に、アドレス調整部 411は、スタートアドレス及びエンドアドレスを調整する。
[0110] 図 13は、その調整の内容を説明する概念図である。同図において、スタートァドレ スはライン Nの先頭以外の任意の位置を指す。スタートアドレスは、次のライン (N+ 1 )の先頭を指すようァラインスタートアドレス aに調整される力 又はスタートアドレスの データを含むライン Nの先頭を指すようァラインスタートアドレス bに調整される。ァラ インスタートアドレスが指すラインをスタートラインと呼ぶ。
[0111] また、エンドアドレスはライン Mの先頭以外の任意の位置を指す。エンドアドレスは、 直前のライン (M— 1)の先頭を指すようァラインエンドアドレス aに調整される力、又は エンドアドレスのデータを含むライン Mの先頭を指すようァラインエンドアドレス bに調 整される。ァラインエンドアドレスが指すラインをエンドラインと呼ぶ。
[0112] このように、スタートアドレス及びエンドアドレスは、ライン単位で内側ァラインされる か又は外側ァラインされる。ライン単位の外側ァラインの後、さらに、サブライン単位 の外佃 Jァラインと内佃 Jァラインが可會である。
[0113] この調整によりプロセッサ 1はラインサイズ及びライン境界とは無関係に、任意のスタ ートアドレスと任意の大きさとを指定することができる。
[0114] くコマンド保持部 >
コマンド保持部 412は、アドレス調整部 411からァラインスタートアドレスとァラインェ ンドアドレスとを取得するとともに、コマンドレジスタ 404から動作プリミティブとインクリ メント値とを取得して保持する。
[0115] 図 14は、コマンド保持部 412の構成を示すブロック図である。コマンド保持部 412 は、 4つのレジスタ 4121〜4124から構成され、好ましくは各レジスタの内容を読み 出し可能な FIFO (First In First Out)方式のキューであるとしてもよい。各レジスタは 、アドレス調整部 411から取得されたァラインスタートアドレス及びァラインエンドアド レス、及びコマンドレジスタ 404から取得されたインクリメント値及び動作プリミティブを 保持する。ァラインスタートアドレスは、操作要求部 44からの制御に応じて、要求ごと にインクリメント値を加算することによって次々に更新され、カレントアドレスとして用い られる。
[0116] <コマンド選択部 >
コマンド選択部 413は、コマンド保持部 412に保持されているコマンドの一つ(例え ば最も古い一つ、つまり FIFOキューの先頭)を選択し、そのカレントアドレスと動作プ リミティブとを示す一つの要求を生成し、操作要求部 44へ出力する。
[0117] <領域コマンド制御処理 >
図 15は、領域コマンド制御部 41における領域コマンド制御処理の一例を示すフロ 一チャートである。
[0118] コマンドエントリ部 40に領域コマンドがエントリされると(S301 : YES)、アドレス調整 部 411はそのコマンドのアドレスを調整して(S302)、コマンド保持部 412ヘアドレス 調整後のコマンドを登録する(S303)。このコマンドは、まだコマンドを保持していな いレジスタに登録される力、全てのレジスタがコマンドを保持している場合には、最も 古いコマンドを上書きすることによって登録される。なお、カレントアドレスがァライン エンドアドレスを上回った (これは、全ての対象アドレスに対する操作を要求し終えた ことを意味する)コマンドに上書きする力、又はそのようなコマンドを予め消去しておい てもよく、また、全てのレジスタがコマンドを保持している場合には、新たなコマンドを 登録せずにプロセッサ 1に例外を発生させることも考えられる。
[0119] コマンドが登録されていれば(S304 : YES)、コマンド選択部 413は、最も古いコマ ンドを選択して、そのカレントアドレスと動作プリミティブとを示す要求を操作要求部 4 4へ出力する(S305)。
[0120] なお、コマンド選択部 413は、最も古いコマンド以外のコマンドを選択してもよい。具 体的には、例えば、各コマンドを発行したタスクと、現在プロセッサ 1で実行されてい るカレントタスクとが知られる構成を設けた上で、カレントタスクから与えられたコマンド を、最も古 、コマンドよりも優先して選択することが考えられる。
[0121] この構成は、例えばプロセッサ 1がマルチタスク処理を行う場合に適しており、タスク の切り替えに追従してカレントタスクから与えられたコマンドを優先的に処理できる。し 力も、コマンド保持部 412は、コマンドごとにカレントアドレスを保持しているから、ひと たび他のコマンドが選択された後で、元のコマンドが選択された場合でも、元のコマ ンドにつ 、てまだ要求して 、な 、アドレスに対する操作を要求することができる。
[0122] <命令連動コマンド制御部 >
命令連動コマンド制御部 42において、アドレス調整部 421は、コマンドエントリ部 40 から命令連動コマンドに関するアドレス範囲を取得し、その両端をそれぞれキヤッシ ュエントリの先頭データを指すように調整し、コマンド保持部 422は、アドレス範囲を 調整された後の命令連動コマンドを最大 4つまで保持する。実行判断部 423は、保 持されている各コマンドについて定められる予測アドレスに対して、前記プロセッサに よって特定の命令が実行された力否かを判断し、コマンド選択部 424は、肯定判断さ れたコマンドの一つ(例えば、最も古くから保持されている一つ)を選択し、実効アドレ ス生成部 425によって生成される実効アドレスに対する要求を操作要求部 44へ出力 する。 [0123] ここで、アドレス調整部 421及びコマンド保持部 422は、それぞれアドレス調整部 4 11及びコマンド保持部 412と同一であるので、説明を省略する。
[0124] <実行判断部 >
実行判断部 423は、コマンド保持部 422に保持されている各コマンドのカレントアド レスを予測アドレスとして用いて、プロセッサ 1によってその予測アドレスをオペランド とする特定命令 (具体的には、ポストインクリメント付きロード命令、及びポストインクリ メント付きストア命令)が実行されたか否かを判断する。このような判断を行うために、 例えば、プロセッサ 1は、ポストインクリメント付きロード命令、及びポストインクリメント 付きストア命令を実行中であることを示す信号 Cを実行判断部 423に供給し、実行判 断部 423は、信号 Cが供給されている期間に、アドレスバスに現れるアドレスをコマン ド保持部 422に保持されて ヽる各カレントアドレスと比較してもよ!/ヽ。
[0125] <コマンド選択部、及び実効アドレス生成部 >
コマンド選択部 424は、実行判断部 423によって肯定判断されたコマンドの一つ( 例えば最も古い一つ)を選択する。実効アドレス生成部 425は、選択されたコマンド がフィル又はタツチを示す場合、そのコマンドのカレントアドレス(前述した予測アドレ ス)に、 1ライン分のオフセット値を加算することによって、コマンドの操作対象となる実 効アドレスを生成する。また、選択されたコマンドがライトバック、無効化、ライトバック 兼無効化、又は最古化を示す場合、そのコマンドのカレントアドレスから、 1ライン分 のオフセット値を減算することによって、コマンドの操作対象となる実効アドレスを生 成する。そして、コマンド選択部 424は、その実効アドレスと動作プリミティブの指定と を示す一つの要求を生成し、操作要求部 44へ出力すると共に、選択されたコマンド に対応するカレントアドレスを、インクリメント値分増加させることによって更新する。
[0126] なお、ここではリプレース単位がラインであるとして 1ライン分のオフセット値を用いる こととした力 リプレース単位がサブラインである場合には、より小さな (例えば 2サブラ イン分の)オフセット値を用いてもょ 、。
[0127] <命令連動コマンド制御処理 >
図 16は、命令連動コマンド制御部 42における命令連動コマンド制御処理の一例を 示すフローチャートである。 [0128] コマンドエントリ部 40に命令連動コマンドがエントリされると(S401 : YES)、アドレス 調整部 421はそのコマンドのアドレスを調整して(S402)、コマンド保持部 422へアド レス調整後のコマンドを登録する(S303)。このコマンドは、領域コマンドの場合と同 様、まだコマンドを保持していないレジスタに登録される力、全てのレジスタがコマンド を保持している場合には、最も古いコマンドを上書きすることによって登録される。な お、カレントアドレスがァラインエンドアドレスを上回った(つまり、アドレス範囲内の全 ての対象アドレスに対する要求を発行し終えた)コマンドに上書きする力、又はそのよ うなコマンドを予め消去しておいてもよぐまた、全てのレジスタがコマンドを保持して いる場合には、新たなコマンドを登録せずにプロセッサ 1に例外を発生させることも考 えられる。
[0129] コマンドが登録されていれば(S404 : YES)、実行判断部 423は、前記特定命令の オペランドアドレスを各コマンドのカレントアドレスと比較する(S405)。アドレスが一致 したコマンドがあれば(S406 : YES)、コマンド選択部 424は、その中で最も古い一 つを選択し (S407)、実効アドレス生成部 425は、選択されたコマンドについて実効 アドレスを生成して、コマンド選択部 424は、その実効アドレスと動作プリミティブとを 示す要求を操作要求部 44へ出力し、選択されたコマンドに対応するカレントアドレス を、インクリメント値分増カロさせることによって更新する(S408)。
[0130] <オートクリーナ制御部 >
オートクリーナ制御部 43において、クリーニングアドレス出力部 431は、キャッシュメ モリ 3における各キャッシュエントリを指定するアドレスを逐次出力する。クリーニング アドレス出力部 431は、アドレスを保持して出力する単なるレジスタであってもよい。
[0131] このクリーニングアドレスには、例えば 4ウェイ 'セット'ァソシエイティブ方式のキヤッ シュメモリ(図 2を参照)においては、各セットを指定するアドレスを用いればよい。そ のようなアドレス ίま、図 2の f列につ!ヽて具体的に言えば、、 ΟχΟΟΟΟΟΟΟΟ力ら 0x0000 0780までの 0x0080 (セットの単位アドレス)おきの 16個のアドレスによって代表され る。これらのアドレスにはセットインデックス SIの全ての値が含まれるので、全てのセッ トの指定が可能である。
[0132] オートクリーナ制御部 43は、 TACコントロールレジスタ 405からオートクリーナが有 効であることを示すフラグ値が取得される間、クリーニングアドレス出力部 431から出 力されるアドレスに対するオートクリーナ操作の要求を操作要求部 44へ出力する。
[0133] <オートクリーナ制御処理 >
図 17は、オートクリーナ制御部 43におけるオートクリーナ制御処理の一例を示すフ ローチャートである。
[0134] TACコントロールレジスタ 405からオートクリーナが有効であることを示すフラグ値 が得られる場合 (S501 : YES)、オートクリーナ制御部 43は、クリーニングアドレス出 力部 431から出力されるアドレスに対するオートクリーナ操作を操作要求部 44へ出 力する(S502)。
[0135] <操作要求処理 >
ここまでの説明から、操作要求部 44には、単独コマンドに応じた要求、命令連動コ マンドに応じた要求、領域コマンドに応じた要求、及びオートクリーナ操作の要求の 最大 4つの要求が与えられる可能性がある。操作要求部 44は、これらの要求が同時 に与えられた場合、予め設定された優先順位に基づいて一つの要求を選択し、選択 した要求をキャッシュメモリ 3へ転送する。この予め設定された優先順位は、前述した コマンドの順序としてもよ 、。
[0136] また、操作要求部 44は、命令連動コマンドに応じた要求、領域コマンドに応じた要 求、及びオートクリーナ操作の要求を転送した場合には、その要求の次の操作対象 が示されるように、コマンドのカレントアドレス、及びクリーニングアドレスを制御する。
[0137] 図 18は、操作要求部 44における操作要求処理の一例を示すフローチャートである
[0138] 単独コマンドに応じた要求があれば(S601: YES)、その要求をキャッシュメモリ 3に 転送する(S602)。単独コマンドに応じた要求を転送した後、操作要求部 44は、動 作プリミティブレジスタの内容を消去してもよ 、。
[0139] 命令連動コマンドに応じた要求があれば(S603 : YES)、その要求をキャッシュメモ リ 3へ転送する(S604)。転送した要求に対応するコマンドのカレントアドレス (コマン ド選択部 424にお 、てそのコマンドが選択された際にインクリメントされる)がァライン エンドアドレスを上回っている場合には、そのコマンドを消去してもよい。 [0140] 領域コマンドに応じた要求があれば(S606 : YES)、その要求をキャッシュメモリ 3 へ転送し (S607)、その後、領域コマンド制御部 41を介して、その領域コマンドの力 レントアドレスを、インクリメント値分増加させることによって更新する(S608)。この更 新によって、カレントアドレスがァラインエンドアドレスを上回った場合には、そのコマ ンドを消去してもよい。
[0141] オートクリーナコマンドに応じた要求があれば(S609 : YES)、その要求をキヤッシ ュメモリ 3へ転送し (S610)、その後、オートクリーナ制御部 43を制御して、タリーニン グアドレス出力部 431から出力されるアドレスを、セットの単位アドレス分増加させる。
[0142] <まとめ >
以上説明したように、 TAC4は、プロセッサ 1が予め定められた命令を実行すること によってキャッシュデータの転送及び属性操作に関するコマンドを与えられ、そのコ マンドに応じて 6種類の動作プリミティブ及びオートクリーナ操作をキャッシュメモリ 3 に要求し、キャッシュメモリ 3は、プロセッサ 1からのメモリアクセスに応じて従来の一般 的なキャッシングを行う合間に、 TAC4からの要求に応じた操作を実行する。
[0143] この 6種類の動作プリミティブ及びオートクリーナ操作は、キャッシュのヒット率の向 上、不必要なバストランザクションの削減、及びバストランザクションの平準化(時間的 分散)に効果があり、かつ前記予め定められた命令 (例えば、図 10、図 11、図 12を 参照)をプロセッサ 1に実行させることでソフトウェア力も要求できる。従って、キヤッシ ュ効率の向上を図る上でソフトウェアからの積極的な制御下でこれらの操作を行うた めに、この構成は好適である。
[0144] また、そのような特定の命令は、コンパイラによりプログラム中に挿入してもよい。具 体的に、コンパイラは、データの生存期間を判断するなどしてデータが最初にァクセ スされるプログラム位置を知ってその前にフィル操作を要求するコマンドを挿入し、ま た、同様にしてそれ以降データに書き込みがなされないプログラム位置を知ってその 後に最古ィ匕を要求するコマンドを挿入すると 、つたことが考えられる。
[0145] キャッシュメモリ 3が行う 6種類の動作プリミティブ及びオートクリーナ操作の内容を 鑑みれば、プロセッサからのメモリアクセスに応じた一般的なキャッシング操作を行う 従来のハードウェアに大規模な追加、修正を施すことなぐキャッシュメモリ 3を実現で きる。
[0146] TAC4もまた、プロセッサ 1からのコマンド取得、コマンドのキューイングと選択、複 数のアドレスに対する要求の逐次発生、及びキャッシュメモリ 3への要求の転送管理 t ヽつた簡明な機能のみを果たす。
[0147] ハードウェアをこの程度に簡素化しかつソフトウェアからの制御を受け入れるために 好ましい構成とすることによって、ハードウェアとソフトウェアとの良好な機能分担が可 能となり、その結果、自律的な制御によるキャッシュ効率の向上を目指してハードゥエ ァがいたずらに大規模ィ匕する事態を回避することができる。
産業上の利用可能性
[0148] 本発明は、ソフトウェアからの制御性を向上するキャッシュメモリに利用可能であり、 例えば、オンチップキャッシュメモリ、オフチップキャッシュメモリ、データキャッシュメモ リ、命令キャッシュメモリ等に適用できる。

Claims

請求の範囲
[1] プロセッサとメモリとの間に設けられるキャッシュメモリと、
前記キャッシュメモリを制御する転送及び属性制御手段とを備え、
前記転送及び属性制御手段は、
前記プロセッサが予め定められた命令を実行することによって、キャッシュデータの 転送及び属性操作とその操作の対象を指定するアドレスとを示すコマンドを与えられ るコマンドエントリ部と、
前記アドレスに対する前記コマンドによって示される操作を、前記キャッシュメモリに 要求する操作要求部と
を備えることを特徴とするキャッシュメモリシステム。
[2] 前記キャッシュメモリは、キャッシュデータの管理単位であるキャッシュエントリに対 応付けて、
そのキャッシュエントリに保持されるキャッシュデータに対応するメモリアドレスの上 位部を示すタグを保持するタグ保持部と、
そのキャッシュエントリが有効か否かを示すバリッドフラグと、そのキャッシュエントリ に書き込み操作があつたか否かを示すダーティフラグと、そのキャッシュエントリのァ クセス順序を強制的に最古とすることを示すウィークフラグとを保持するフラグ保持部 と
を有し、
前記転送及び属性制御手段からの要求に応じて、
指定されるアドレスにヒットするキャッシュエントリがない場合に、リプレース対象とな るキャッシュエントリを選択し、メモリから前記選択されたキャッシュエントリへ前記指定 されたアドレスに対応するデータをロードし、タグを設定してノ リツドフラグをセットする フィル操作、
指定されるアドレスにヒットするキャッシュエントリがない場合に、リプレース対象とな るキャッシュエントリを選択し、メモリから前記選択されたキャッシュエントリへデータを ロードすることなくタグを設定してノ リツドフラグをセットするタツチ操作、
指定されるアドレスにヒットするキャッシュエントリがありかつダーティフラグがセットさ れている場合に、そのキャッシュエントリのデータをメモリへセーブしてダーティフラグ をリセットするライトバック操作、
指定されるアドレスにヒットするキャッシュエントリがある場合に、そのキャッシュェント リのデータをダーティフラグの状態に応じてメモリへセーブすることなくバリッドフラグ をリセットする無効化操作、
指定されるアドレスにヒットするキャッシュエントリがある場合に、ダーティフラグがセ ットされていればそのキャッシュエントリのデータをメモリへセーブしてダーティフラグ 及びバリッドフラグをリセットし、ダーティフラグがリセットされて 、ればそのキャッシュェ ントリのノ リツドフラグのリセットのみを行うライトバック兼無効化操作、及び
指定されるアドレスにヒットするキャッシュエントリがある場合に、そのキャッシュェント リのウィークフラグをセットする最古ィ匕操作
の中の一つを実行する
ことを特徴とする請求項 1に記載のキャッシュメモリシステム。
[3] 前記コマンドエントリ部は、さらに、前記プロセッサから前記コマンドに対応してアド レス範囲を与えられ、
前記操作要求部は、前記アドレス範囲に属する複数のアドレスに対する前記操作 を、前記キャッシュメモリに逐次要求する
ことを特徴とする請求項 1または 2に記載のキャッシュメモリシステム。
[4] 前記転送及び属性制御手段は、さらに、
前記アドレス範囲の先頭及び末尾を、前記キャッシュメモリにおけるキャッシュデー タの管理単位であるキャッシュエントリの先頭データを示すように調整するアドレス調 整部を有し、
前記操作要求部は、前記調整後のアドレス範囲に含まれる複数のアドレスに対す る前記操作を、前記キャッシュメモリに逐次要求する
ことを特徴とする請求項 3に記載のキャッシュメモリシステム。
[5] 前記転送及び属性制御手段は、さらに、
複数のコマンドとそれぞれのコマンドに対応するアドレス範囲とを保持するコマンド 保持部と、 前記保持された複数のコマンドの中から一つを選択するコマンド選択部と を有し、
前記操作要求部は、前記選択されたコマンドに対応するアドレス範囲に属する複 数のアドレスに対する、そのコマンドによって示される操作を逐次要求する
ことを特徴とする請求項 3または 4に記載のキャッシュメモリシステム。
[6] 前記コマンド選択部は、前記選択されたコマンドについて全ての要求がなされる前 に、他のコマンドを選択し、
前記操作要求部は、元のコマンドが再び選択された場合にそのコマンドについてま だ要求して!/、な 、アドレスに対する操作を逐次要求する
ことを特徴とする請求項 5に記載のキャッシュメモリシステム。
[7] 前記転送及び属性制御手段は、さらに、
次に予定される要求に関して定められる予測アドレスに対して、前記プロセッサによ つて特定の命令が実行されたか否かを判断する実行判断部と、
肯定判断がなされると、前記予測アドレスに所定のオフセット値を加算又は減算す ることによって実効アドレスを生成する実効アドレス生成部と
を有し、
前記操作要求部は、前記生成された実効アドレスに対する前記操作を要求する ことを特徴とする請求項 3に記載のキャッシュメモリシステム。
[8] 前記転送及び属性制御手段は、さらに、
複数のコマンドとそれぞれのコマンドに対応するアドレス範囲とを保持するコマンド 保持部を有し、
前記実行判断部は、前記保持された各コマンドについて、そのコマンドに対応する 予測アドレスに対して、前記プロセッサによって特定の命令が実行された力否かを判 断し、
前記転送及び属性制御手段は、さらに、
肯定判断がなされたコマンドの中力 一つを選択するコマンド選択部を有し、 前記実効アドレス生成部は、前記選択されたコマンドに対応する予測アドレスに所 定値を加算又は減算することによって実効アドレスを生成し、 前記操作要求部は、前記生成された実効アドレスに対する前記選択されたコマンド によって示される操作を要求する
ことを特徴とする請求項 7に記載のキャッシュメモリシステム。
[9] 前記転送及び属性制御手段は、さらに、
前記キャッシュメモリにおけるキャッシュデータの管理単位である各キャッシュェント リを指定するアドレスを逐次出力するアドレス出力部を有し、
前記操作要求部は、前記出力されたアドレスによって指定されるキャッシュエントリ を含む一つ以上のキャッシュエントリに対する何れかの操作要求を保持する要求保 持手段を備え、操作要求を保持している間は自発的に操作要求をし続ける
ことを特徴とする請求項 1に記載のキャッシュメモリシステム。
[10] 前記操作要求部は、前記キャッシュメモリに要求する操作力 Sライトバック操作であり 前記キャッシュメモリは、前記要求に応じてライトバック操作を実行する
ことを特徴とする請求項 1または 9に記載のキャッシュメモリシステム。
[11] 前記コマンドエントリ部は、単一のアドレスに対する操作を示す単独コマンドと、アド レス範囲に含まれる複数のアドレスに対する操作を前記プロセッサが実行する特定 の命令と同期して行うことを示す命令連動コマンドと、アドレス範囲に含まれる複数の アドレスに対する操作を前記プロセッサが実行する特定の命令とは非同期に行うこと を示す領域コマンドと、キャッシュデータを逐次操作することを示す逐次操作コマンド のうちの少なくとも一つを前記プロセッサから与えられ、
前記操作要求部は、各コマンドに応じた操作要求を予め設定された優先順位に基 づ 、て選択を行 、、前記キャッシュメモリに要求する
ことを特徴とする請求項 1または 2に記載のキャッシュメモリシステム。
[12] 前記操作要求部は、各コマンドに応じた操作を、前記コマンドの順に優先して、前 記キャッシュメモリに要求する
ことを特徴とする請求項 11に記載のキャッシュメモリシステム。
[13] プロセッサとメモリとの間に設けられるキャッシュメモリを制御する制御方法であって 前記プロセッサから、キャッシュデータの転送及び属性操作とその操作の対象を指 定するアドレスとを示すコマンドを取得する取得ステップと、
前記アドレスに対する前記コマンドによって示される操作を、前記キャッシュメモリに 要求する操作要求ステップと
を含むことを特徴とする制御方法。
PCT/JP2006/302141 2005-04-08 2006-02-08 キャッシュメモリシステム及びその制御方法 Ceased WO2006112111A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
DE602006011292T DE602006011292D1 (de) 2005-04-08 2006-02-08 Cache-speichersystem und steuerverfahren dafür
EP06713284A EP1868101B1 (en) 2005-04-08 2006-02-08 Cache memory system, and control method therefor
JP2007521091A JP4090497B2 (ja) 2005-04-08 2006-02-08 キャッシュメモリシステム及びその制御方法
CN2006800105539A CN101151600B (zh) 2005-04-08 2006-02-08 高速缓冲存储器系统及其控制方法
US11/816,858 US7953935B2 (en) 2005-04-08 2006-02-08 Cache memory system, and control method therefor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005-112839 2005-04-08
JP2005112839 2005-04-08

Publications (1)

Publication Number Publication Date
WO2006112111A1 true WO2006112111A1 (ja) 2006-10-26

Family

ID=37114853

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/302141 Ceased WO2006112111A1 (ja) 2005-04-08 2006-02-08 キャッシュメモリシステム及びその制御方法

Country Status (8)

Country Link
US (1) US7953935B2 (ja)
EP (1) EP1868101B1 (ja)
JP (1) JP4090497B2 (ja)
KR (1) KR20070093452A (ja)
CN (1) CN101151600B (ja)
DE (1) DE602006011292D1 (ja)
TW (1) TW200702993A (ja)
WO (1) WO2006112111A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012530979A (ja) * 2009-12-22 2012-12-06 インテル・コーポレーション 所与の範囲のページのキャッシュフラッシュおよび所与の範囲のエントリのtlb無効化を行なうシステム、方法、および装置
US8484423B2 (en) 2009-06-23 2013-07-09 International Business Machines Corporation Method and apparatus for controlling cache using transaction flags
JP5536655B2 (ja) * 2008-09-17 2014-07-02 パナソニック株式会社 キャッシュメモリ、メモリシステム及びデータコピー方法
US20210365392A1 (en) * 2019-02-21 2021-11-25 Huawei Technologies Co., Ltd. System on Chip, Access Command Routing Method, and Terminal

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100818920B1 (ko) * 2006-02-10 2008-04-04 삼성전자주식회사 그래픽 객체의 처리 시 발생된 키 이벤트를 제어하는 장치및 그 방법
WO2007098055A2 (en) * 2006-02-17 2007-08-30 Google Inc. Encoding and adaptive, scalable accessing of distributed models
KR100985517B1 (ko) * 2008-12-04 2010-10-05 주식회사 에이디칩스 캐시메모리 제어방법
KR101502827B1 (ko) * 2014-03-20 2015-03-17 주식회사 에이디칩스 컴퓨터 시스템에서의 캐시 무효화 방법
KR102128475B1 (ko) * 2014-03-27 2020-07-01 에스케이하이닉스 주식회사 반도체 메모리 장치
US9779025B2 (en) 2014-06-02 2017-10-03 Micron Technology, Inc. Cache architecture for comparing data
CN105243685B (zh) * 2015-11-17 2018-01-02 上海兆芯集成电路有限公司 数据单元的关联性检查方法以及使用该方法的装置
CN105427368B (zh) * 2015-11-17 2018-03-20 上海兆芯集成电路有限公司 数据单元的关联性检查方法以及使用该方法的装置
US10101925B2 (en) * 2015-12-23 2018-10-16 Toshiba Memory Corporation Data invalidation acceleration through approximation of valid data counts
KR102649657B1 (ko) * 2018-07-17 2024-03-21 에스케이하이닉스 주식회사 데이터 저장 장치 및 동작 방법, 이를 포함하는 스토리지 시스템
US11281585B2 (en) 2018-08-30 2022-03-22 Micron Technology, Inc. Forward caching memory systems and methods
US11086791B2 (en) * 2019-08-29 2021-08-10 Micron Technology, Inc. Methods for supporting mismatched transaction granularities

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5119453A (en) * 1974-08-08 1976-02-16 Fujitsu Ltd Patsufua memoriseigyohoshiki
JPH0612327A (ja) 1992-02-28 1994-01-21 Motorola Inc キャッシュメモリを有するデータプロセッサ
EP0602808A2 (en) 1992-12-18 1994-06-22 Advanced Micro Devices, Inc. Cache systems
JPH07295882A (ja) 1994-04-22 1995-11-10 Hitachi Ltd 情報処理装置、及び、情報処理システム
JPH11167520A (ja) * 1997-12-04 1999-06-22 Nec Corp プリフェッチ制御装置
JPH11272551A (ja) * 1998-03-19 1999-10-08 Hitachi Ltd キャッシュメモリのフラッシュ制御方式およびキャッシュメモリ
EP1182566A1 (en) 2000-08-21 2002-02-27 Texas Instruments France Cache operation based on range of addresses
JP2003223360A (ja) * 2002-01-29 2003-08-08 Hitachi Ltd キャッシュメモリシステムおよびマイクロプロセッサ
JP2004326758A (ja) * 2003-04-24 2004-11-18 Internatl Business Mach Corp <Ibm> 局所的なキャッシュ・ブロック・フラッシュ命令

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6045855A (ja) 1983-08-22 1985-03-12 Fujitsu Ltd 磁気ディスク装置の順次アクセス検出方法
JPH0784879A (ja) 1993-09-09 1995-03-31 Toshiba Corp キャッシュメモリ装置
US5860110A (en) * 1995-08-22 1999-01-12 Canon Kabushiki Kaisha Conference maintenance method for cache memories in multi-processor system triggered by a predetermined synchronization point and a predetermined condition
JP4067887B2 (ja) 2002-06-28 2008-03-26 富士通株式会社 プリフェッチを行う演算処理装置、情報処理装置及びそれらの制御方法
JP2004118305A (ja) 2002-09-24 2004-04-15 Sharp Corp キャッシュメモリ制御装置
JP4009304B2 (ja) 2003-09-19 2007-11-14 松下電器産業株式会社 キャッシュメモリおよびキャッシュメモリ制御方法
JP4044585B2 (ja) 2003-11-12 2008-02-06 松下電器産業株式会社 キャッシュメモリおよびその制御方法
EP1686485A4 (en) 2003-11-18 2008-10-29 Matsushita Electric Industrial Co Ltd CACHE MEMORY AND CONTROL PROCEDURE THEREFOR
KR100826757B1 (ko) 2003-11-18 2008-04-30 마쯔시다덴기산교 가부시키가이샤 캐시 메모리 및 그 제어 방법
WO2005066796A1 (ja) 2003-12-22 2005-07-21 Matsushita Electric Industrial Co., Ltd. キャッシュメモリ及びその制御方法
JP4521206B2 (ja) * 2004-03-01 2010-08-11 株式会社日立製作所 ネットワークストレージシステム、コマンドコントローラ、及びネットワークストレージシステムにおけるコマンド制御方法
WO2005091146A1 (ja) 2004-03-24 2005-09-29 Matsushita Electric Industrial Co., Ltd. キャッシュメモリ及びその制御方法

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5119453A (en) * 1974-08-08 1976-02-16 Fujitsu Ltd Patsufua memoriseigyohoshiki
JPH0612327A (ja) 1992-02-28 1994-01-21 Motorola Inc キャッシュメモリを有するデータプロセッサ
EP0602808A2 (en) 1992-12-18 1994-06-22 Advanced Micro Devices, Inc. Cache systems
JPH07295882A (ja) 1994-04-22 1995-11-10 Hitachi Ltd 情報処理装置、及び、情報処理システム
JPH11167520A (ja) * 1997-12-04 1999-06-22 Nec Corp プリフェッチ制御装置
JPH11272551A (ja) * 1998-03-19 1999-10-08 Hitachi Ltd キャッシュメモリのフラッシュ制御方式およびキャッシュメモリ
EP1182566A1 (en) 2000-08-21 2002-02-27 Texas Instruments France Cache operation based on range of addresses
JP2003223360A (ja) * 2002-01-29 2003-08-08 Hitachi Ltd キャッシュメモリシステムおよびマイクロプロセッサ
JP2004326758A (ja) * 2003-04-24 2004-11-18 Internatl Business Mach Corp <Ibm> 局所的なキャッシュ・ブロック・フラッシュ命令

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5536655B2 (ja) * 2008-09-17 2014-07-02 パナソニック株式会社 キャッシュメモリ、メモリシステム及びデータコピー方法
US8484423B2 (en) 2009-06-23 2013-07-09 International Business Machines Corporation Method and apparatus for controlling cache using transaction flags
JP2012530979A (ja) * 2009-12-22 2012-12-06 インテル・コーポレーション 所与の範囲のページのキャッシュフラッシュおよび所与の範囲のエントリのtlb無効化を行なうシステム、方法、および装置
JP2015084250A (ja) * 2009-12-22 2015-04-30 インテル・コーポレーション 所与の範囲のページのキャッシュフラッシュおよび所与の範囲のエントリのtlb無効化を行なうシステム、方法、および装置
US20210365392A1 (en) * 2019-02-21 2021-11-25 Huawei Technologies Co., Ltd. System on Chip, Access Command Routing Method, and Terminal
US11748279B2 (en) * 2019-02-21 2023-09-05 Huawei Technologies Co., Ltd. System on chip, access command routing method, and terminal

Also Published As

Publication number Publication date
CN101151600B (zh) 2012-02-22
EP1868101A4 (en) 2009-01-21
TW200702993A (en) 2007-01-16
EP1868101B1 (en) 2009-12-23
CN101151600A (zh) 2008-03-26
KR20070093452A (ko) 2007-09-18
US20090100231A1 (en) 2009-04-16
JP4090497B2 (ja) 2008-05-28
JPWO2006112111A1 (ja) 2008-11-27
DE602006011292D1 (de) 2010-02-04
US7953935B2 (en) 2011-05-31
EP1868101A1 (en) 2007-12-19

Similar Documents

Publication Publication Date Title
JP5536658B2 (ja) バッファメモリ装置、メモリシステム及びデータ転送方法
EP1066566B1 (en) Shared cache structure for temporal and non-temporal instructions and corresponding method
WO2006112111A1 (ja) キャッシュメモリシステム及びその制御方法
US20070186048A1 (en) Cache memory and control method thereof
US20100217937A1 (en) Data processing apparatus and method
US20110167224A1 (en) Cache memory, memory system, data copying method, and data rewriting method
US11036639B2 (en) Cache apparatus and method that facilitates a reduction in energy consumption through use of first and second data arrays
US8621152B1 (en) Transparent level 2 cache that uses independent tag and valid random access memory arrays for cache access
JP4008947B2 (ja) キャッシュメモリ及びその制御方法
US7555610B2 (en) Cache memory and control method thereof
US6446168B1 (en) Method and apparatus for dynamically switching a cache between direct-mapped and 4-way set associativity
KR20050007907A (ko) 동적으로 할당 또는 해제되는 버퍼를 가지는 캐쉬 메모리장치, 이를 구비한 디지털 데이터 처리 시스템 및 그 방법
JP5012016B2 (ja) キャッシュメモリ装置、演算処理装置及びキャッシュメモリ装置の制御方法
JP2009093559A (ja) プロセッサ、情報処理装置、プロセッサのキャッシュ制御方法
KR100851298B1 (ko) 캐시 메모리 컨트롤러 및 이를 이용한 캐시 메모리 관리방법
JP2004240616A (ja) メモリコントローラ及びメモリアクセス制御方法
JP4008946B2 (ja) キャッシュメモリ及びその制御方法
JPH08335188A (ja) ソフトウェア制御可能なキャッシュメモリ装置
WO2010098152A1 (ja) キャッシュメモリシステムおよびキャッシュメモリ制御方法

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2007521091

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 1020077018401

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 11816858

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2006713284

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 200680010553.9

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

WWW Wipo information: withdrawn in national office

Ref document number: DE

NENP Non-entry into the national phase

Ref country code: RU

WWW Wipo information: withdrawn in national office

Ref document number: RU

WWP Wipo information: published in national office

Ref document number: 2006713284

Country of ref document: EP