WO2005029336A1 - キャッシュメモリおよびキャッシュメモリ制御方法 - Google Patents

キャッシュメモリおよびキャッシュメモリ制御方法 Download PDF

Info

Publication number
WO2005029336A1
WO2005029336A1 PCT/JP2004/012421 JP2004012421W WO2005029336A1 WO 2005029336 A1 WO2005029336 A1 WO 2005029336A1 JP 2004012421 W JP2004012421 W JP 2004012421W WO 2005029336 A1 WO2005029336 A1 WO 2005029336A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
access
information indicating
access information
new
Prior art date
Application number
PCT/JP2004/012421
Other languages
English (en)
French (fr)
Inventor
Tetsuya Tanaka
Ryuta Nakanishi
Tokuzou Kiyohara
Hiroyuki Morishita
Keishi Chikamura
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 EP04772377A priority Critical patent/EP1667028A4/en
Priority to JP2005514011A priority patent/JP4009304B2/ja
Priority to US10/571,531 priority patent/US20070028055A1/en
Publication of WO2005029336A1 publication Critical patent/WO2005029336A1/ja

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/12Replacement control
    • 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/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/126Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning
    • G06F12/127Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning using additional replacement algorithms
    • 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
    • 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/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/123Replacement control using replacement algorithms with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
    • G06F12/124Replacement control using replacement algorithms with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list being minimized, e.g. non MRU

Definitions

  • the present invention relates to a cache memory for accelerating processor memory access and a control method thereof.
  • LRU Least Recently Used
  • Fo First In First Out
  • the L RU method is a method of deciding on the replacement target that has the oldest order of coverage in the queue.
  • This L RU method is, for example, the most common> J place algorithm adopted in the cache memory disclosed in Japanese Patent Application Laid-Open No. 20000-472, etc. o
  • the cache memory is full-associative and has (2 to the power of 2) entries, then k bits for each entry will be used as data indicating the access order. I need.
  • Access order data Disclosure of the Invention There is a problem that the scale of a circuit for updating memory (register or RAM) and access order data is large.
  • the cache memory of the present invention stores 1-bit access information indicating presence / absence of access for each cache holding data serving as a cache unit. It has a storage means and a selection means for selecting the target server to be replaced from among the certificates corresponding to the access information indicating no access.
  • the selection unit may be configured to select one cache unit ⁇ one randomly or in a round ⁇ type from cache units corresponding to access information indicating no access.
  • the storage means caches access information that can be represented by one bit, instead of ad-terminating data indicating access order in the conventional LRU method on a case-by-case basis. Since each memory stores it, it is possible to reduce its storage capacity and to reduce the size of the hardware.
  • the selection means uses the access information to indicate that there is no access, which is the target of the replay. This can be easily determined by selecting one of the corresponding caches, and the cabinet can also obtain a hit rate substantially equivalent to that of the conventional RU.
  • the cache memory when the cache memory is hit in the cache entry, the cache memory also renews access information corresponding to the cache, and at that time, the cache memory is updated.
  • the access information indicates that there is access, it may be configured to have an update means for setting access information corresponding to all the other cash cases ⁇ u without access.
  • the »update means may further be configured to set the access information corresponding to the hit search entry at the time of the reset without any access.
  • the storage means further stores new information indicating whether or not the data is in a new state immediately after the data is stored in the cache entry for each cache ⁇ U, and the update means is In addition, when the user clicks on the cache, the corresponding information on the cache will be reset to indicate that it is not in the new state.
  • a configuration in which a cache entry to be replaced is selected from the cache entries corresponding to access information indicating access and indicating that the access state is not new. May
  • the selection means corresponds to the access information indicating no access, and ignores the new information if there is no answer corresponding to the new information indicating that the access is not in the new state. It may be configured to select the cache entry to be replicated.
  • the selection means ignores the access information. It may be configured to select one of the target documents.
  • the method of controlling cache memory is a method of controlling cache memory having a memory for storing access information indicating presence or absence of access for each cache memory in cache memory.
  • a detection step for detecting a search error and a mistake, and an update step for updating access information corresponding to a cache entry for which a hit detection has been detected.
  • a determination step of determining whether access information corresponding to all other cache entries other than the cache entry where the hit is detected is indicated that the access is present or not; If the judgment result is positive, the access information corresponding to all other caches is updated to indicate no access.
  • 2Selection step to select the cache object to be rebuilt from the cache entries corresponding to the access information indicating no access when the update step and miss entry are detected.
  • FIG. 1 shows the processor and cache according to the first embodiment of the present invention.
  • Figure 2 is a block diagram showing the configuration of the camera memory.
  • Figure 3 is an explanatory diagram showing the bit configuration of the system entry.
  • Figure 4 is a block diagram showing the configuration of the control unit? Ru.
  • FIG. 6 is a diagram showing the flag updating process.
  • Fig. 7 is a diagram showing a truth table showing input / output logic of the flag management unit.
  • Fig. 8 is a diagram showing a circuit example of the flag management unit.
  • Figure 9 shows the U-place processing flow.
  • Fig. 10 is an explanatory view showing an example of flag updating in the modification.
  • Fig. 1 1 is a diagram showing a flow of flag updating processing in the modification.
  • Fig. 12 A is other than the selection processing in the modification.
  • Fig. 12 B is a diagram showing another example of the selection process in the modification.
  • Fig. 13 B is a diagram showing a configuration of a cache memory in the second embodiment of the present invention P ⁇ o o
  • Fig.14 is an explanatory diagram showing the bit configuration of the cache entry.
  • Fig.15 is a block diagram showing the configuration of the control unit.
  • Figure 16 shows the flow of> J-place processing.
  • Figure 17 shows the flag update process flow.
  • Fig. 1 is a block diagram showing a schematic configuration of a system including processor 1, cache memory 3 and memo 2 according to the first embodiment of the present invention.
  • As shown in the figure, a cash memory 3 of the present invention Is provided in a system having a processor 1 and a memory 2 and is used as a replacement algorithm.
  • pseudo LRU method data indicating the access order of the cache is represented by only one bit per cache memory, and the corresponding bit is 0.
  • One of the target entries from within the library The method of choice is adopted.
  • cache memory 3 As a specific example of cache memory 3, the configuration in the case where the above-mentioned pseudo-LRU is applied to 4-way set-associative cache memory will be described.
  • FIG. 2 is a block diagram showing an example of the configuration of cache memory 3.
  • cache memory 3 has an address register 20, a decoder 30 and four ways 31a to 31d (hereinafter referred to as ways 0 to 3) and a ratio of four.
  • the address register 2 0 holds the access address to memory 2
  • This access address shall be 32 bits. As shown in the figure, the access address is, in order from the most significant bit, a 21-bit tag address, a bit, a 4-bit set index (SI in the figure),
  • One of the 5 bits-contains the index (W I in the figure).
  • the tag word and the letter “less” refer to the area in the memory to be mapped to X (the size is set number X task).
  • the size of this area is the size of one way, which is a size of 2 k bytes determined by the address below the tag address and the res bit (A 10 to A O).
  • I points to one of multiple sets ranging from 0 to 3.
  • the number of sets is 16 because the setting index is 4 bits.
  • the protocol specified by the tag address and index is a replacement unit, and if it is stored in the cache memory, the size of the line data or line data called line is larger than that of the set index.
  • the size is 1 2 8 bytes, which is determined by the lower address bit. 1 ⁇ If the data is 4 bytes, 1 line data is 32 words.
  • the word index (WI) refers to a single word in multiple words that compose line data.
  • the least significant 2 bits (A 1 AO) in address register 2 0 are ignored at single access.
  • the coder 30 decodes the 4 bits of the set index, and selects one of 16 sets that spans four strings 0 to 3.
  • one cache entry is a flag flag V 2.
  • the no lead flag V indicates whether or not the cache ⁇ U is valid.
  • the tag is a 21 bit tag pad and a copy of mless.
  • Line data is a copy of 128-byte data in a block identified by tag address and setting information.
  • the duty flag is whether or not the cache has been written, because the cache that has been cached in one place is different from the data in the memory by writing. Indicates that writing back to memory is required o
  • the use flag U indicates whether or not there is an access to the cache entry, and the four keys in the set at the time of replacement by a miss hit Used instead of access order in cache entry • 3 ⁇ Precisely, 1 of use flag U means that 0 has not been accessed. If all four use flags in the set become 1, it will be 0
  • the use flag u is Indicates whether the accessed time is old or new or two relative states.
  • a cache entry with a usage flag U of 1 means that a cache entry with a usage flag of 0 has been accessed more recently.
  • One of four cache entries is called a set.
  • the comparator 32a includes the tag address in the address register 20 and the way in the four tags included in the set selected by the set index.
  • the comparators 3 2 b to 3 2 c are the same except that they correspond to the ways 3 1 b to 3 1 d.
  • the AND circuit 33a has the parity flag and the comparison result of the comparator 32a.
  • a value of 0 means hit. If the comparison result h 0 is 0, it means that a miss hit has occurred. And circuits 3 3 b to 3 3 (about the same, except that they correspond to way 3 1 b 3 1 d. Comparison results h 1 to h 3 were hit in ways 1 to 3) OR circuit 3 or 4 takes the comparison result h 0 to h 3. The result of this or is the hit The hit is whether or not the hit is made to the cache memory Show.
  • the selector 35 selects the line data of the hit way among the line data of ways 0 to 3 in the selected set.
  • Selector 36 selects one of the line data of 32 words selected by selector 35, as shown in the end index.
  • Demultiplexer 3 7 writes data to the cache. Output the write data to one of ways 0 to 3
  • the word may be in word units.
  • the control unit 38 performs overall control of the cache memory 3 and, in particular, determines the update of the use flag U and the cache memory to be replaced.
  • control unit 38 has a flag updating unit 39 and a replacement unit 40.
  • the flag updating unit 39 updates the valid flag, the used flag U, and the dirty flag D. It is well known that the read flag V and the duty flag D are updated.
  • the flag updating unit 3 9 updates the use flag at the time of cache hit.
  • FIG. 5 shows an example of updating of the use flag by the flag updating unit 3 9.
  • the upper part and the lower part of the figure show the four cache entries that make up the set N that straddles the lines 0-3.
  • the cache entry in 3 means that there is no access.
  • the pre-processing unit 40 performs the re-presence by determining the cancellation target ⁇ one based on the use flag at the time of the cancellation 3 ⁇ 4. For example, in the upper part of FIG. 5, place part 40 determines either of process 1 or 3 as a target to be replayed, and in the middle part of FIG. 5 determines that 3 is a target of replay, In the lower part of Fig. 5, one of X X 2 and 2 2 is determined to be a target for replacement.
  • FIG. 6 is a flowchart showing flag update processing in the flag update unit 3 9
  • Step S 61 when the flag update unit 39 performs a cache hit (step S 61), the flag u of the way used in the set selected by the setup flag is used. Set it to 1 (Step S 6 2), read the use flag u of other ways in the set (Step S 6 3), and check whether the read use flag U is all 1 or not. (Step S 6 4), and if not all 1, the process ends. If all 1, all use flags u of other ways are reset to 0 (step S 6 5).
  • the flag updating unit 3 9 can update the usage flag as in the example of updating shown in FIG.
  • FIG. 7 is a diagram showing a truth table showing the input / output logic of the flag updating unit 39.
  • H 0 h 3 in the input column of the figure is a hit signal in the ways 0 to 3 shown in FIG.
  • U O i i n to U 3 _ i n indicate the values (values before update) of the use flags of way 0 to way 3 read from the set selected by the set index.
  • the flag updating unit 3 9 in the same figure is an AND circuit 80 to 8 3, an AND circuit 8 4 to 8 7, an OR circuit 8 8, an OR circuit 8 9 to 9 2, a selector.
  • the use circuits 8 0 to 8 3 are the set selected by the index. • The use flags of 0 to 3 3 U 0-i 3 to 4 ⁇ are used. U 0 — i n to U
  • the cache flag whose buffer flag V is 1 (valid) 'J1's use flag U 0 i 1 to U 3 _ i n is output.
  • the NAND circuits 8 4 to 8 7 and the inverter circuit 8 8 are the same as in FIG. 7 unless the output of the AND circuit 8 0 8 3 shown in FIG. Detect the case of the mouth mark of the input column of. Use flag of other ways in hit, hit way U — detect all cases where i is 1
  • Circuits 8 9 to 9 2 respectively have hit signals h 0 to h 3 and use flags
  • Selectors 9 3 to 9 6 are on the 1 side if the case marked above is detected.
  • a circuit like this makes it possible to convert the truth table in Fig. 7 into one. Reduced hardware size, as it is not necessary to indicate the access order of individual ways, and it is only necessary to update the 1-bit usage flag for each way. can do.
  • FIG. 9 is a flowchart showing the replacement process in the replacement unit 40.
  • the replay process unit 40 reads the use flag U of the four ways in the memory access miss (step S 91) and the setup selected again by the setup index. Exit (Step S 9 2) and select one way whose usage flag U is 0 (Step S 9 3). At this time, if there is more than one queue whose use flag U is 0, the replay unit 40 randomly selects one. Furthermore, the replacement unit 40 applies the replacement to the selected cache in the set (step S94), and the replacement after the replacement. Initialize the usage flag U to 1 (step S95). Note that, at this time, the U flag U and the flag D are initialized to 1 and 0, respectively.
  • the target for replacement is determined by selecting one of the cache entries whose usage flag is 0. This replacement algorithm is used instead of data indicating access order in the conventional LRU method.
  • the cache memory of the present invention is not limited to the configuration of the above embodiment, and various modifications are possible. Any of the modifications will be described below.
  • the flag updating unit 3 9 sets the use flags U 0 to U 3 of the other ways in the vehicle V to 0 if all the flags are 0, as shown in the lower part of FIG. It is possible to update its own use flag to 1, but instead it may be configured to update its own use flag to 0 as well.
  • Figure 1 0 shows an example of flag update in the case of ⁇ . .
  • FIG. 10 is different from FIG. 5 in that the lower row 3 is 0 instead of 1.
  • FIG. 11 is a chart showing the flag update process in this modification. This figure is different from FIG. 6 in that Step S 65 instead of Step S 65
  • step S 65 a the flag updating unit 3 9 resets all use flags u 0 to U 3 in the set to 0.
  • step S 9 3 shown in FIG. If there is more than one candidate flag with a use flag of 0, select 1 for random, but instead of> ⁇ , select regularly.
  • the u-pres unit 4 0 may be selected in such a case that y (L) or P (L) is selected as the way number is smaller (larger).
  • Fig. 12 A shows the process 3 ⁇ 4 r to select the random and ⁇ bin expressions.
  • the U-pres portion 40 determines the number of the way that was previously replaced when there are multiple caches with a use flag of 0 in the memory and the memory (step S). 1 2 1) Select a cache entry with a number with a use flag of 0 and a cache with a number larger than the determined number (step S 12 2).
  • the number replaced last may be determined, for example, by providing a register that holds the number of the tray placed in the entire cache memory and referencing the relevant lister.
  • ⁇ ⁇ ⁇ ⁇ registers may indicate replaced ques by bit position.
  • An example of the register in this case is shown in Figure 12 ⁇ .
  • the figure shows the transition of the 4-bit field in the register. Bit positions of 4 bits of, _> correspond to way 0 to way 3. Of the four bits, the “1” bit indicates the previously replaced key 3 ⁇ 4 :.
  • the rib race 40 is the closest to the direction in which the bit "1" is rotated to the right from among the cache entries whose use flag in the set is 0 in the set. Determine the bit and select the cache of the key corresponding to the bit position. In the example of the figure, ways 0, 1,
  • V, and 2 are selected in the order of V.
  • Figure 12 shows the common registers for all the sets, it is also possible to have individual registers for each set.
  • the 4-way ⁇ set ⁇ association key The cache memory has been described as an example, but the number of entries may be 8 to 16 and 3 may be 3, and in the above embodiment, an example in which the number of sets is 16 has been described. Any number of sets may be used
  • the cache memory of the setup-association is described as an example, but it may be a cache memory of a full-system cache type.
  • the use flag U may be 1 bit or 2 bits. For example, in the case of 2 bits, it is not necessary to completely indicate the access order of each cache memory, but it is preferable to be able to determine whether 2 states are less or less or old or new. You may define the third state and the four hundredth state that can be represented by a bit.
  • step S955 shown in FIG. 9 the use flag U immediately after the reply is initialized to 1, but it may be initialized to 0 instead of «. However, if the initial value of the usage flag is set to 0, there is a possibility that the printer may be re-bleaked again due to a cache miss that occurred after the reload.
  • FIG. 13 is a block diagram showing the configuration of the cache memory according to the second embodiment of the present invention.
  • the cache memory of the figure shows that the control section 38 has the secret of storing the 1 13 1 a 1 3 1 d instead of the 3 1 a to 3 1 d.
  • the difference from the point having the control unit 1 3 8 is the same.
  • the explanation of the same points is omitted, and the explanation will be made centering on the 3 ⁇ 4 point. In each case, there will be a point where a two-way flag is added
  • Figure 14 shows the bit configuration of one cache within the key 1 3 1 a. As shown in the figure, the difference is that the second flag N is added. It has become. The second flag N is set to 1 as an initial value immediately after (or immediately after) filling, and is set to 0 when the corresponding computer is accessed. “1” in the “n” flag means that the word has been placed (or filled) and has not been accessed even once, and that it is in a new state.
  • control unit 1 38 has a flag updating unit 1 3 9 and a release unit 1 40 0, and as compared with the control unit 3 8
  • the setting and updating of flag N is different from the point of excluding a cache memory with a new flag of 1 at U place from U place.
  • Figure 16 is a step-by-step chart showing the replacement process in the replacement section 140.
  • pj Figure is compared with Figure 9 and step S 92 instead of step S 92 9 2 a and a step between steps 9 2 a and 9 3
  • step S.sub.95 a is provided instead of step S.sub.95.
  • step S92a the replacement unit 140 is used as the four-way use flag U 0 to U in the set selected by the set-up.
  • step S 1 6 1 Determine if all of N 3 are 1's (step S 1 6 1), and if all 1's, go to step S 9 3 and if not all 1's (0's) In this case, out of the ways whose use flag U is 0, we exclude the way whose 2 you flag N is 1 (step S 1 6 2).
  • step S 95 a the replacement unit 140 initializes the new flag N to 1 along with the initialization of other flags.
  • FIG. 17 is a flowchart showing the flag update process in the flag new part 1 3 9. The figure is different from FIG. 6 in that step S 1 7 1 is added between steps S 6 2 and S 6 3.
  • step S 1 71 the flag updating unit 1 3 9 determines that the flag of the cache entry of the hit queue in the selected set is “1”.
  • the replacement unit 140 excludes the corresponding entry from the target of the replacement when the new flag is 1. This is due to the following reasons. In other words, if the use flag u has an initial value of 1 and if the use flags of other ways become 1 sequentially
  • Modifications (1) to (5) of the first embodiment may be applied to the present embodiment.
  • step S 95 a shown in Fig. 16 the use flag U immediately after replacement is initialized to 1, but instead, it may be initialized to 0. Unlike the first embodiment, since the new flag N is provided in the present embodiment, even if the initial value of the use flag is 1 or 0, access is also performed even if cache misses occur after replacement. It is possible to prevent re-pressing without being done.
  • the cache memory in each of the above embodiments may be applied to any of an on-chip cache, an off-chip cache, an instruction cache, and a data cache built in a chip together with the processor.
  • the present invention is directed to cache memory for speeding up memory and processing and its control method, for example, on-chip cache memory, off-chip cache memory, and memory memory. Suitable for instruction cache memory etc.

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

本発明のキャッシュメモリは、キャッシュエントリー毎に、アクセスの有無を示す使用フラグUを記憶するウェイ0~ウェイ3と、ヒットしたとき当該キャッシュエントリーに対応する使用フラグUをアクセス有りに更新し、その際にセット内の他の全ての使用フラグがアクセス有りを示す場合には、セット内の他の全ての使用フラグをアクセス無しにリセットし、アクセス無しを示す使用フラグUに対応するキャッシュエントリーの中からリプレース対象のキャッシュエントリーを選択する制御部を備える。

Description

明 細 書
キャ ッシュメモ リ およびキャ ッシュメ モ リ 制御方法 技術分野
本発明は、 プロセッサのメモ リ アクセスを高速化するためのキヤ ッシ ュメ モ リ およびその制御方法に関する。 背景技術
従来キャ ッシュメモ リのエン ト リーを リ プレースするためのアルゴリ ズムと して L R U ( Least Recently Use d ) 方式や F I F O ( First In First Out) 方式がよ く 知られている。
L R U方式は、 キャ ッンュエン ト リーのう ちァクセス順序が最も古い ェン 卜 —を リ プレース対象と決定する方法である 。この L R U方式は、 例えば 、 特開 2 0 0 0 - 4 7 9 4 2号公報などに開示されたキヤ ッシュ メ モ リ においても採用されている最も一般的な >J プレースアルゴリ ズム でめ o
と こ ろで、 L R U方式のァルゴリズムでリ ブレ ―スするには、 各ェン 卜 リ一についてァクセス順序を示すデータ を記 する記憶部と、 それを 更新する複雑な回路とが必要になるため、 ハー ド、ゥエア規模が大き く な ると いラ問題がある
例えば、 フルァソシエイティ ブ式のキャ ッシュメモ リ であって、 ( 2の k乗) 個のエン ト リーを有する場合、 アクセス順序を示すデータ と して ェン ト リ一毎に k ビッ トを必要とする。
また、 Nウェイセッ トァソシエイティ ブの場合には、 ウェイ数 N = 8 であれば、 アクセス順序を示す情報と して (ウェイ数 = 8 ) (最低 3 ビッ ト) X (セッ ト数) を必要と し、 アクセス順序データ を記憶する記 憶部 ( レジスタ又は R A M ) およぴァクセス順序データ を更新する回路 の規模が大きいと いう問題がある 発明の開示
本発明は、 し R U方式と同等のヒ ッ 卜率を得られる リ プレース制御を よ リ少なぃハ ―ドウエア規模で実現するキャ ッシュメ モ リ を提供するこ とを目的とする
上記目的を 成するため本発明のキヤ ソシュメ モ リ は 、 キャ ッシュの 単位となるデ ―タ を保持するキヤ ッシュェン ト リ一毎に 、 アクセスの有 無を示す 1 ビッ トのアクセス情報を記憶する記憶手段と 、 アクセス無し を示すァクセス情報に対応するキャ ッシュェン ト リーの中から リ プレー ス対象のキヤ Vンュエン ト リ一を選択する 択手段と を備 る。
前記選択手段は、 アクセス無しを示すァクセス情報に対応するキヤッ シユエン 卜 リ一の中から、 ラ ンダムにまたはラウン ド □ビン式に 1 つの キャ ッシュェン 卜 U一を選択する構成と してもよい。
この構成によれば 、 従来の L R U方式におけるァクセス順序を示すデ ータ をキヤ ッ シュェン ト リ一毎に ad Ί®する代わり に、 記憶手段は 1 ビッ 卜で表現可能なァクセス情報をキャ ッシュェン ト リー毎に記憶している ので、 その記 容量を削減することがでさハ — ドゥエァ規模を削減する こ とができる また 、 選択手段は 、 リ プレ ―ス対象を 、 アクセス無しを 示すアクセス情報に対応するキヤッ シュェン ト リ一の 1 つを選択するこ とによ り簡単に決定 し、 しカヽも、 従来の し R U と比較してもほぼ同等の ヒ ッ 卜率を得るこ とができる。
こ こで、 前記キャ ッシュメ モリ は、 さ らに 、 キヤ ッンュエン ト リーに ヒ ッ ト したと さ当該キャ ッシュェン 卜 リ ―に対応するァクセス情報をァ クセス有り に 新し 、 その際に他の全てのキャ ッ シュェン ト リーに対応 するァクセス情報がァクセス有リ ¾■示す場合には、 他の全てのキヤ ッシ ユエン 卜 u ―に対応するァクセス情報をァクセス無しに セ ッ トする更 新手段を備える構成と して よい
これによ 、 従来のァクセス順序デ —タ を更新する複雑な回路を ァ クセス情報を更新する簡単なフラグ更新回路に置き換える こ とが'でさる ので、 ハ ― ウェア規模をさ らに大き く 低減するこ とができる。
( »—で 前記更新手段は さ らに、 前記リセッ 卜に際して前記ヒ ッ 卜 したキャ ヅンュエン ト リ一に対応するアクセス情報をァクセス無しに U セッ 卜するよ うに構成して よい
こ こで 前記記憶手段は さ らに、 キヤッシュェン 卜 U一毎にキャ ッ シュエン ト リ一にデータが格納された直後の新しい状態であるか否かを 示すニュー情報を記憶し、 前記更新手段は、 さ らに、 キャ ッシュェン ト リ一にヒ ッ 卜 したと き当該キャ ッ シュェン 卜 リ ―に対応する二ュ―情報 を新しい状態でないこと を示すよ う リセッ 卜 し 刖 §d選択手段は、 ァク セス しを示すアクセス情報に対応 し、 かつ新しい状態でないこ と を示 す二ュ一情報に対応するキヤ ッシユエン ト リーの中から リ プレース対 象のキャ ッシユエン ト リ一を選択する構成と してもよい
こ で、前記選択手段は、アクセス無しを示すァクセス情 に対応し、 かつ新しい状態でないこ と を示すニュー情報に対応するキャ ッンュェン 卜 U ―が存在 しない場合には、 ニュー情報を無視して、 リ プレ ―ス対象 のキャ ッシユエン ト リーを選択する構成と して よい。
こで、前記選択手段は、アクセス有り を示すァクセス情報に対応 し、 または新しい状態であるこ と を示すニュ一情報に対応するキャッシュェ ン 卜 一のみが存在する場合には、 ニュ一情報を無視して U プレ ―ス 対象のキャッシュェン ト リ一を選択する構成と してもよい
の構成によれば、 リ プレースされた後に一度もァクセスされていな い新しい状態のキャ ッンュェン ト リ一がリ プレースされて しまう こ とを 防止することができる。
また 、 本発明のキヤッシュメ モリ の制御方法は 、 キャ ッシュメ モ リの キヤ ッ シユエン 卜 リー毎に アクセスの有無を示すァクセス情報を記憶 する記 《¾、部を有するキヤ ッシュメ モ リ の制御方法であつて、 キヤ ッンュ ヒ ッ 卜およびミスを検出する検出ステッ プと、 ヒ ッ 卜 したこ とが検出さ れたキャ ッシユエン ト リーに対応するアクセス情報をァクセス有リ に更 新する 1 更新ステツフ と 、 ヒ ッ 卜 したこ とが検出されたキャッシュェ ン 卜 リ一以外の他の全てのキャ ッシユエン ト リーに対応するァクセス情 報がァクセス有り を示すか口かを判定する判定ステップと、 判定手段の 判定結 が肯定である場合に 、 他の全てのキヤ ッシュェン 卜 リ一に対応 するァクセス情報をァクセス無しを示すよ う に更新する第 2更新ステッ プと、 ミス したこ とが検出されたと き、 アクセス無しを示すァクセス情 報に対応するキヤ ッシユエン ト リ一の中から リ ブレース対象のキヤ ッシ ユエン 卜 リーを選択する選択ステッ プと を有する
以上のよう に、 本発明のキャッシュメ モ リ によれば 、 ハ一 ドゥエァ規 模を削減し、 しかも従来の し R U方式に相当する ヒ ッ ト率を実現するこ とがでぎる 図面の簡単な 明
図 1 は 、 本発明の実施の形態 1 におけるプロセッサ、 キャ ッシュ
U 、 メ モ リ を含む概略構成を示すプロ ック図である
図 2 は 、 キャ ヅ ンュメ モ リ の構成を示すブロ ック図で
図 3 は 、 キャ ヅ ンュエン ト リのビッ ト構成を示す説明図でめ 。 図 4 は 、 制御部の構成を示すブロ ック図 ? る。
図 5 は 、 フラグの更新例を示す説明図でめ 図 6 は、 フラグ更新処理フ 口一を示す図である。
図 7 は 、 フラグ管理部の入出力論理を示す真理値表を示す図で ΰθる 0 図 8 は 、 フラグ管理部の回路例を示す図である。
図 9 は 、 U プレース処理フ ローを示す図である。
図 1 0は、 変形例におけるフラグの更新例を示す説明図である ο 図 1 1 は、 変形例におけるフラグ更新処理フローを示す図である ο 図 1 2 Aは 、 変形例における選択処理の他の例を示す図である 0 図 1 2 Bは 、 変形例における選択処理の他の例を示す図である 0 図 1 3 は、 本発明ン実施の形態 2におけるキャ ッシュメ モ の構成を 示すブ P ック図 あ o
図 1 4は、 キャ ッシユエン ト リのビッ ト構成を示す説明図である ο 図 1 5は、 制御部の構成を示すブロ ック図である。
図 1 6 は、 >J プレース処理フローを示す図である。
図 1 7 は、 フラグ更新処理フローを示す図である。 発明を実施するための最良の形態
(実施の形態 1 )
<全体構成 >
図 1 は 、 本発明の実施の形態 1 におけるプロセッサ 1、 キャ ッシュメ モリ 3 、 メモ 2 を含むシステムの概略構成を示すプロ ック図である ο 同図のよ うに 、 本発明のキャ ッシュメモ リ 3 は、 プロセッサ 1 およびメ モリ 2 を有するシステムに備えられ、 リ プレースアルゴリ ズムと して し
R U方式を簡略化した擬似的なし R U方式を用いる 。本実施の形態では、 擬似的な L R U方式と して、 キャ Vシユエン 卜 リ のアクセス順序を示す データ をキヤ ッシュェン ト リ一毎に 1 ビッ 卜だけで表現し、 当該ビッ ト が 0のキヤッシユエン 卜 リーの中から リ プレ一ス対象エン ト リ一を 1 つ 選択する方式を採用 している。
<キャ ッシュメモ リの構成 >
以下では、 キャ ッシュメ モ リ 3 の具体例と して、 4 ウェイ ' セッ ト - ァソシエイティ ブ方式のキャ ッシュメモ リ に上記擬似 L R U を適用 した 場合の構成について説明する。
図 2 は、 キャ ッシュメ モ リ 3の構成例を示すブロ ック図である。 同図 のよ う に、 キャ ッシュメ モ リ 3 は、 ア ドレス レジスタ 2 0、 デコーダ 3 0、 4つのウェイ 3 1 a 〜 3 1 d (以下ウェイ 0 ~ 3 と略す)、 4つの比
$ί 3 2 a 3 2 d 、 4つのアン ド回路 3 3 a ~ 3 3 d 、オア回路 3 4、 セ レク タ 3 5 セ レクタ 3 6 、 デマルチプレクサ 3 7 、 制御部 3 8 を備 える
ァ ドレス レンスタ 2 0 は、 メモ リ 2へのアクセスア ドレスを保持する
、 *
レンスタである 。このアクセスァ ドレスは 3 2 ビッ トであるものとする。 同図に示すよ ラ に、 アクセスア ド レスは、 最上位ビッ トから順に、 2 1 ビッ 卜のタグァ ド、レス、 4 ビッ トのセッ トイ ンデックス (図中の S I )、
5 ビッ 卜のつ ―ドィ ンデックス (図中の W I ) を含む。 こ こで、 タ グァ ド、レスはゥ Xィにマッ ビングされるメモ リ 中の領域 (そのサイズはセッ 卜数 Xプロ ヅクである) を指す。 この領域のサイズは、 タグア ドレスよ 下位のァ ド、レスビッ ト ( A 1 0〜 A O ) で定まるサイズつま り 2 k バイ トであ 、 1 つのウェイのサイズでもある。セッ トイ ンデックス ( S
I ) はゥェィ 0 ~ 3 に跨る複数セッ 卜の 1 つを指す。 このセッ ト数は、 セッ 卜イ ン丁ックスが 4 ビッ トなので 1 6セッ トである。 タグア ドレス およびセッ 卜ィ ンデックスで特定されるプロ ックは、 リ プレース単位で あ 、 キヤ ッシュメモリ に格納されている場合はライ ンデータ又はライ ンと呼ばれる ラィ ンデータのサイズは、 セ ッ トイ ンデックスよ り も下 位のア ドレス ビッ 卜で定まるサイズつま り 1 2 8バイ トである。 1 ヮー ドを 4バイ ト とすると、 1 ライ ンデータは 3 2 ワー ドである。 ワー ドィ ンデックス (W I ) は、 ライ ンデータ を構成する複数ワー ド中の 1 ヮ一 ドを指す。 ア ド レス レジスタ 2 0 中の最下位 2 ビッ ト ( A 1 A O ) は、 つ一ドアクセス時には無視される
丁 コーダ 3 0は、 セッ トイ ンデックスの 4 ビッ 卜をデコ ー ドし、 4 つ のゥエイ 0 ~ 3 に跨る 1 6セッ ト中の 1 つを選択する。
4つのウェイ 0 ~ 3 は、 同 じ構成を有数する 4つのゥ Xィであり 4
X 2 kバイ 卜の容量を有する。 ゥエイ 0 は、 1 6個のキャ ッ シユエン 卜
U一を有する。
図 3 に 1 つのキャ ッシュェン ト リーにおける詳細なビッ 卜構成を示す 同図のよ うに、 1 つのキャ ッシュエン ト リ一は、 バリ ツ フラグ V 2
1 ビッ トのタグ、 1 2 8バイ トのライ ンデータ、 使用フラグ Uおよびダ
―亍ィ フラグ Dを保持する。 ノく リ ッ ドフラグ Vは、 そのキャ ッシュェン 卜 U一が有効か否かを示す。 タ グは 2 1 ビッ 卜のタ グァ ド、 mレスのコ ピ一 である。 ライ ンデータは、 タ グァ ドレスおよびセッ トイ ン丁ックスによ 特定されるブロ ック中の 1 2 8バイ トデータのコ ピーである。 ダ ―テ ィ フラグは、 そのキャ ッシュェン ト リーに書き込みがあ たか否か 、 つ ま キヤシユエン ト リ 一中にキヤ ッシュされた ·ϊ タが き込みによ り メ モ リ 中のデータ と異なるためメ モ リ に書き戻すこ とが必 を示 す o 使用フラグ Uは、 そのキヤ ッシュエン ト リ一にァクセスがあつたか 否かを示し、 ミス ヒ ッ トによる リ プレースに際してセッ 卜内の 4つのキ ャ ッシュエン ト リ一におけるァクセス順序の代わり に用い •3れる ο よ リ 正確には、 使用フラグ Uの 1 は、 アクセスがあったこ と を 0はないこ とを意味する。 セッ ト内の 4つの使用フラグは、 全て 1 になれば、 0に
'j セッ 卜されるので、 セッ ト内の 4つのキャ ッシュェン 卜 リ一における 使用の有無を示す相対的な値である。 別言すれば、 使用フラグ uは 、 ァ クセスされた時期が古いか新しいか 2 つの相対的な状態を示す。つまり 、 使用フラグ Uが 1 のキャッシュェン ト リーは、 使用フラグが 0のキヤッ シュエン ト リ ——よ り も新し く アクセスされたこ と を意味する。
ウェイ 1 〜 3 についても、 ウェイ 0 と同様である。 セッ トイ ンデック スの 4 ビッ 卜によってデコーダ 3 0 を介 して選択される 4 ウェイに跨る
4つのキヤ ッシュエン ト リ一は、 セッ ト と呼ばれる。
比較器 3 2 a は、 ア ドレス レジスタ 2 0中のタ グア ドレスと、 セッ ト イ ンデックスによ り選択されたセ ッ トに含まれる 4つのタ グ中のウェイ
0のタ グとが ―致するか否かを比較する。 比較器 3 2 b 〜 3 2 c につい ても、 ウェイ 3 1 b ~ 3 1 d に対応するこ と以外は同様である。
アン ド回路 3 3 a は、 パリ ッ ドフラグと比較器 3 2 a の比較結果とが
—致するか否かを比較する。 この比較結果を h O とする。 比較結果 h O が 1 である場 。 は、 ァ ドレス レジスタ 2 0 中のタ グァ ドレスおよびセッ トイ ンデックスに対応するライ ンデータが存在するこ と、 つま リ ウエイ
0において ヒ ッ ト したことを意味する。比較結果 h 0が 0である場合は、 ミス ヒ ッ 卜 したこ とを意味する。アン ド回路 3 3 b ~ 3 3 (め についても、 ウェイ 3 1 b 3 1 d に対応すること以外は同様である。 その比較結果 h 1 〜 h 3 は 、 ウェイ 1 〜 3 でヒ ッ 卜 したかミス したかを意味する。 オア回路 3 4は、 比較結果 h 0 ~ h 3のオアをとる。 このオアの結果 を h i t とする 。 h i t は、 キャ ッシュメ モ リ に ヒ ッ ト したか否かを示 す。
セ レクタ 3 5 は、 選択されたセッ 卜におけるウェイ 0 ~ 3のライ ンデ ータのう ち、 ヒ ッ 卜 したウェイのライ ンデータ を選択する。
セ レクタ 3 6 は、 セ レクタ 3 5 によ り選択された 3 2 ワー ドのライ ン データのう ち 、 ヮー ドイ ンデックスに示される 1 ヮ一 ドを選択する。 デマルチプレクサ 3 7 は、 キャ ッシュェン ト リ にデータ を書き込む際 に、 ウェイ 0 〜 3 の 1 つに書き込みデ—タ を出力する この書き込みデ
—タ はワー ド単位でよい。
制御部 3 8 は、 キャ ッ シュメ モリ 3の全体の制御を行ラ 特に 、 使用 フラグ Uの更新ゃリ プレースすべきキャ ッシユエン 卜 ―の決定などを 行う。
<制御部の構成 >
図 4は、 制御部 3 8の構成を示すブロ ック図である 同図のよ ラに、 制御部 3 8 は、 フラグ更新部 3 9 と リ プレース部 4 0 を備える
フラグ更新部 3 9 は 、 バリ ッ ドフラグ 、 使用フラグ U 、 ダーティ フ ラグ Dの更新を行う このう ちノく リ ッ ドフラグ V、 ダ ―ティ フラグ Dの 更新については周知である。 フラグ更新部 3 9 は、 キャ ッシュ ヒ ッ ト時 に使用フラグの更新処理を行う。
図 5に、 フラグ更新部 3 9 による使用フラグの更新例を示す。 同図の 上段 、 中段 下段は、 ゥェィ 0〜 3 に跨るセッ ト Nを構成する 4 つのキ ャッシユエン ト リ一を示 している。 4つのキャ ッシュエン ト リ一右端の
1 又は 0は 、 それぞれ使用フラグの値である。 この 4つの使用フラグ U を U 0〜 U 3 と記す。
同図上段では ( U 0〜 U 3 ) = ( 1 、 0、 1 、 0 ) であるので ゥェ ィ 0 、 2のキャ ッシュェン 1 、 リーはアクセスがあったこ と を、ゥェィ 1 、
3のキヤ ッシュエン ト リ一はアクセスがないこ と を意味する。
の状態で 、 メモ リ ァクセスがセッ ト N内のウェイ 1 のキヤ ッンュェ ン 卜 リ一にヒ ッ 卜 した場合 、同図中段に示すよ う に、( U 0 〜 U 3 ) ( 1
1 、 1 、 0 ) に更新される 。 つま り 、 実線に示すよ う にウェイ 1 の使用 フラグ U 1 が 0から 1 に更新 れる
さ らに、 同図中段の状態で、 メモ リ アクセスがセッ ト N内のゥ工ィ 3 のキャ ッシュエン ト リ一に ヒ ッ 卜 した場合、 同図下段に示すよう Iに , 、 ( u 0 〜 U 3 ) = ( 0、 0、 0 、 1 ) Iこ 新される つま り 、 実線に示すよ う にゥェィ 3 の使用フラグ U 1 が 0から 1 に更新される 加えて、 破線 に示すようにウェイ 3以外の使用フラグ u 0 〜 U 2が 1 から 0 に更新さ れる これによ り、 ゥェィ 3のキャシュェン 卜 'J —が、 ゥェィ 0 ~ 2の 各キャ ッンュェン ト ―よ 新し < ァクセスされたこと •2:思味するこ とになる
プレ ―ス部 4 0は 、 キャ ッ ン ュ ¾.ス時に使用フラグに基づいて リ ブ レ一ス対象のキヤ ッンュ Xン 卜 u一を決定 して リ プレ一スを行う。 例え ば、 プレース部 4 0は 、 図 5上段では、 ゥ工ィ 1 とゥェィ 3の何れか を リ プレ ―ス対象と決定 し 、 図 5 中段ではゥェィ 3 を リ プレ一ス対象と 決定し 、 図 5下段ではゥ Xィ 0 2の何れかを リ プレース対象と決定す
<フラグ更新処理 >
図 6 は、 フラグ更新部 3 9 におけるフラグ更新処理を示すフローチヤ
― トである。 同図では 、 バ 1) ッ ド、フラグが 0 (無効) であるキャ ッシュ ェェン 卜 リーの使用フラグ Uは 0に初期化されているものとする。
図において、 フラグ更新部 3 9 は、 キヤ ッシュヒ ッ ト したとき (ス テッ プ S 6 1 )、セッ トィ ン丁ックスによ り選択されたセッ トにおけるヒ ヅッ 卜 したウェイの使用フラグ u を 1 にセッ ト し (ステップ S 6 2 )、 その セセッ 卜内の他のウェイの使用フラグ u を読み出 し (ステッ プ S 6 3 )、 読 みみ出 した使用フラグ Uが全て 1 であるか否かを判定し(ステップ S 6 4 )、 全て 1 でなけれぱ終了 し、 全て 1 であれば他のウェイの全ての使用フラ グ u を 0にリ セッ 卜する (ステ Vプ S 6 5 )。
« のよ うに してフラグ更新部 3 9 は、 図 5 に示した更新例のよ う に、 使用フラグを更新するこ とができる。
圭際のフラグ更新部 3 9 はハ一 ドウエアによ リ構成されるので、 以下 ハー ドウエア構成例について説明する。
図 7 は、 フラグ更新部 3 9の入出力論理を示す真理値表を示す図であ る。 同図の入力欄にける h 0 h 3 は、 図 2 に示したウェイ 0〜ウェイ 3 における ヒ ッ ト信号である。 U O— i n ~ U 3 _ i n は、 セッ トイ ン デックスによ り選択されたセッ トから読み出された、 ウェイ 0〜ウェイ 3の使用フラグの値 (更新前の値) を示す。 同図の出力欄における U 0
_ o u t ~ U 3 _ o u t は、 セッ トイ ンデックスに書き戻される使用フ ラグの値 (更新後の値) を示す。 また、 図中の〇印はヒ ッ ト したウェイ の使用フラグ (入力および出力) を、 口印は他のウェイの使用フラグ (入 力) の全てが 1 の場合と、 対応する出力値を示す。 図中の * a * d は 次の式 1 〜式 4 をそれぞれ Τ 9 と を思味する。 こ こで &は 5冊理積を 示す。
( U 1 — ί η ) & ( U 2一 i η ) & ( U 3 _ i η ) = 0 (式 1 )
( U 0— i n ) & ( U 2— i η ) & ( U 3 _ i η ) = 0 (式 2 )
( U 0 _ i n ) &■ ( U 1一 i η ) & ( U 3 _ i η ) = 0 (式 3 )
( U 0— i n ) & ( U 1 — i η ) & ( U 2 _ i η ) = 0 (式 4 )
同図において N o . 1 Ν ο . 4の行は、 ゥェィ 0がヒ ッ 卜 した場 合 ( h 0 = 1 ) ¾·不す。 この場合、 ヒ 卜 したゥェィ 0の使用フラグ U
0— ί ηの ί直が 0であっても 1 であ ても 、 使用フラグ U 0 _ ο u t は
1 となる。 また 、 他のゥェィの使用フラグ U 1 _ ο u t U 2 —— o u t は、 * a の場合には更新されないが 、 □印のよ うに入力時に全て 1 であ る場合には、 全て 0に更新される。 Ν ο . 5 8 Ν o . 9 1 2 N o . 1 3 - 1 6についても 、 ヒ ッ 卜 したウェイが 1 、 2 3 である点を 除いて同様である。
<回路例 >
図 8 は、 図 7の入出力論理を有するフラグ更新部 3 9の具体的な回路 例を示す図である。同図のフラグ更新部 3 9 は、アン ド回路 8 0〜 8 3 、 ァン ド回路 8 4〜 8 7 、 オア回路 8 8 、 オア回路 8 9 〜 9 2、 セ レクタ
9 3 〜 9 6 を備える
ァン ド回路 8 0〜 8 3 は、 セッ 卜ィ ンデックスによ リ選択されたセッ トか •ο ¾πみ出された 、 ゥエイ 0〜ゥェィ 3の使用フラグ U 0— i n 〜 U
3 _ ί η のう ち、 バ U ッ ドフラグ Vが 1 (有効) であるキヤ ッシュェン 卜 'J一の使用フラグ U 0一 i n ~ U 3 _ i n の値を出力する。
ァン ド回路 8 4〜 8 7 およびォァ回路 8 8 は、 アン ド回路 8 0 8 3 の出力が図 7 に示した * a ~ * d を /1¾ブニさない場合、 つま り 同図中の入 力欄の口印のケースを検出する。 つま リ 、 ヒ ッ ト したウェイの他のゥェ ィの使用フラグ U— i n が全て 1 で ώ 場合を検出する
才ァ回路 8 9 ~ 9 2は 、 それぞれヒ ッ ト信号 h 0〜 h 3 と使用フラグ
U 0 ― i r! 〜 U 3 _ i n とのオアをとる
セ レクタ 9 3 ~ 9 6は 、 上記口印のケースが検出された場合には 1 側
(上側) 入力を選択し、 上記口印のケースが検出されない場合には 0側
(下側) 入力を選択し、 選択結果を U 0 ― o u 1: 〜 U Ί ― O U t と して 出力する。 具体的には、 上記口印のケースが検出された場合には 、 セ レ クタ 9 3 ~ 9 6の 1 側(上側)に h 0 〜 h 3が入力されていることから、 ヒ ッ 卜 したゥェィの使用フラグ u — o u t が 1 になリ 、 他のゥ Xィの使 用フラグは 0 となる 。 上記口印のケ ―スが検出されない場合には 、 セ レ ク タ 9 3 ~ 9 6の 0側のそれぞれに h信号と使用フラグ U— i n のオア が入力されているこ とから、 ヒ ッ 卜 したウェイの使用フラグ U — ο u t が 1.にな リ、 他のゥェィの使用フラグは元のままとなる。
のよ うな回路によ り 図 7 の真理値表をノ、一 ドゥエァ化する < とがで きる 。 個々のウェイのァクセス順序を示す必要がなく 、 各ゥェィに 1 ビ ッ 卜の使用フラグを更新するだけでよいので、 ハー ドウェア規模を削減 するこ とができる。
< リ プレース処理 >
図 9 は 、 リ プレース部 4 0における リ プレース処理を示すフローチヤ 一 トである。 同図において リ プレー -ス部 4 0 は、 メ モ リ アクセスがミス したと ぎ (ステップ S 9 1 )、 セッ トィ ンデックスによ リ選択されたセッ 卜における、 4つウェイの使用フラグ U を読み出 し (ステッ プ S 9 2 )、 使用フラグ Uが 0のウェイ を 1 つ選択する(ステッ プ S 9 3 )。このとき、 使用フラグ Uが 0になっているゥェィが複数存在する場合は、 リ プレー ス部 4 0はランダムに 1 つを選択する。 さ らに、 リ プレース部 4 0は、 当該セッ 卜における選択されたゥェィのキャ ッシュェン ト リ一を対象に リ プレ ―ス し (ステップ S 9 4 )、 リ プレース後に当該キャ ッシュェン ト リ一の使用フラグ U を 1 に初期化する (ステッ プ S 9 5 )。 なお、 このと きバ U ッ ドフラグ V、 ダ一ティ フラグ Dは、 それぞれ 1 、 0に初期化さ れる
なお 、 図 9 では、 4つバリ ッ ドフラグ Vが全部 1 (有効) であること す
を前 と しているが、 V = 0 (無効) のキャ ッシュエン ト リ一が存在す ¾ には当該キャ ッシュエン ト リ —を選択する。
のよ うに、 リ プレース対象は、 使用フラグが 0のキャ ッシュェン ト リ一を 1 つ選択するこ とによ り決定される。 このリ プレースァルゴリズ ムは 、 従来の L R U方式におけるァクセス順序を示すデータの代わりに
1 ビ V 卜の使用フラグを用いるので 、 擬似的な L R U方式という こ とが できる
以上説明 してきたよ う に、 本実施の形態におけるキャ ッシュメ モ リ に よれば 、 従来の L R U方式におけるアクセス順序を示すデータをキヤ ッ シュェン ト リー毎に設ける代わリ に 、 1 ビッ トの使用フラグをキヤ ッシ ユエン 卜 リー毎に設けている。 これによ り 、 従来のアクセス順序データ を更新する複雑な回路を、 使用フラグを更新する簡単なフラグ 新回路
(フラグ更新部 3 9 ) に置き換えるこ とができる。 また 、 プレ ―ス部
4 0において、 リ ブレース対象 ¾:、 ·&用フラグが 0のキャ ッシュ Xン 卜 リーの 1 つを選択するこ とによ リ簡単に決定するこ とがでぎる このよ うに、 本実施の形態におけるキャ ッシュメモリ によれば 、 ノヽ一 ド、ゥェァ 規模を大きく 低減するこ とがでぎる。 しかも、 従来の L R U と比車父して もほぼ同等のヒ ッ ト率を得る こ とができ
<変形例 >
なお、 本発明のキャ ッ シュメモ リ は、 上記の実施形態の構成に限るも のではな く 、 種々の変形が可能 以下、 変形例のい < かについ て説明する。
( 1 ) フラグ更新部 3 9 は 、 図 5の下段に示したよう にセ V 卜内の他の ウェイの使用フラグ U 0 ~ U 3が全部 1 であれば 0に し 、 ヒ 卜 したゥ エイ 自身の使用フラグを 1 に更新するが 、 この代わり に ヒ ッ 卜 したゥ エイ 自身の使用フラグも 0に更新する構成と してもよい 図 1 0 に 〜 」 の場合のフラグの更新例を示す 。 図 1 0 は、 図 5 と比較して 、 下段のゥ エイ 3が 1 ではなく 0になつている点が異なっている。
図 1 1 は、 この変形例におけるフラグ更新処理を示すフ □一チャ - ト である。 同図は、 図 6 と比ベて 、 ステツプ S 6 5の代わ リ にステッ プ S
6 5 a を有している点が異なつている。 同 じ点は説明を省略して 、 異な る点のみ説明する。 ステツ プ S 6 5 a では、 フラグ更新部 3 9 は 、 セッ ト内の全ての使用フラグ u 0 〜 U 3 を 0に リセッ 卜する
このよ うに、 図 1 1 のフラグ更新処理によれば、 セ ッ 卜内の全ての使 用フラグ U O〜 U 3が 1 になろう とする と き、 0にリセヅ hする 図 1
1 によっても、 図 5 と同様のヒ ッ ト率を得るこ とができる
( 2 ) 図 9に示したステツ プ S 9 3 において、 リ プレース部 4 0 は 、 セ ッ 卜内に使用フラグが 0のキャ ッンュェン 卜 リ一が複数存在する 合に は 、 ラ ンダムに 1 を 択しているが 、 >~の代わり に、 規則的に 択し てもよし、 。 例えば 、 u プレ ―ス部 4 0 は、 その場合に、 ウェイの番号の 小さい方 (大さい方 ) を 択した y、 ラゥン P ビン式に選択してもよ し、
図 1 2 Aに 、 ラゥン ド、 □ビン式に選択する処理 ¾r示す 。 同図において
U プレ ―ス部 4 0 は 、 セ 、ン 卜内に使用フラグが 0のキヤ ッシュ Xン 卜 'J 一が複数存在する場合に、前回 リ プレース したウェイの番号を判別 し(ス テツ プ S 1 2 1 )、 使用フラグが 0のキャ ッシュエン ト リ一のう ち、 判別 した番号よ り も大きい番号のウェ イのキヤ シュエン ト リ一を選択する (ステップ S 1 2 2 )。 こ こで、 前回 リ プレース した番号は、 例えば、 キ ャ ッシュメ モ リ全体で プレース したゥエイの番号を保持する レジスタ を設けておき、 当該レンスタを参 BBする こ とによ り判別すればよい。 こ
so.口
のレジスタ は、 ゥェィの ■m を保持する代わり に、 リ プレース したゥェ ィをビッ ト位置で示すよ うにしてもよい 。 この場合のレジスタの一例を 図 1 2 Βに示す。 同図ではレジスタ 中の 4 ビッ 卜のフィール ドが遷移す る様子を示 している。 , _>の 4 ビッ 卜のビッ ト位置はウェイ 0〜ウェイ 3 に対応する。 4 ビッ 卜中の " 1 " のビッ トは前回 リ プレースされたゥェ ィ ¾:示す。 ステツ プ S 1 2 2では、 リ ブレース部 4 0は、 かつセッ ト内 の使用フラグが 0のキャ ッシュエン ト リ —の中から、" 1 " のビッ トかた 右に回転する方向の直近の ビッ トを判別 し、 そのビッ ト位置に対応する ゥエイのキヤ ッシュェン 卜 'J一選択する 。同図の例では、 ウェイ 0、 1 、
3 、 0、 2の順にキヤ Vシュエン ト リ一が選択されている。
なお、 図 1 2 Βでは 、 全セッ 卜で共通のレジスタ を示しているが、 セ ッ ト毎の個別に レジスタ を備えるこ と も可貪 である。
( 3 ) 上記実施の形態では、 4 ウェイ ■ セッ ト ■ ァソシエイティ ブのキ ャ ッシュメモ リ を例に説明 したが、 ゥ Xィ数は、 8 ゥエイで 1 6 ゥェ ィでもよい 3 、 上 し 施の形態では 、 セッ 卜数が 1 6である例を説 明 したが、 セッ ト数はいく つでもよい
( 4 ) 上記実施の形態では 、 セッ 卜 - ァソシェィティ ブのキャ ッシュメ モリ を例に 明 したが、 フル ' ァソシェィ丁ィ ブ方式のキヤ ッシュメモ リ であって よい。
( 5 ) 使用フラグ Uは 1 ビ 、ジ 卜でな < て 2 ビッ 卜 と してもよい。 例え ば、 2 ビッ 卜 と した場合で 個々のキャ ッシュェン 卜 リーのァクセス順 序を完全に示す必要はなく 、 少な < と 古いか新しいかの 2状態を相対 的に判別でさればよ く 、 2 ビッ 卜で表現でぎる 3番目の状態および 4番 百の状態をどのよ うに定義 して よい。
( 6 ) 図 9 に示したステップ S 9 5において 、 リ プレ ―ス直後の使用フ ラグ Uは 1 に初期化されるが、 «—の代わリ に 0 に初期化してもよ'い 。 た だし 、 使用フラグの初期値を 0に した場合は 、 リ プレ ―ス後に発生した キャ Vシュ ミスによ り再度リ ブレ —スされて しまう可能性がある □ この
/占"、では 、 初期値は 1 とする方が ま しいと考えられる
(実施の形態 2 )
図 1 3 は 、 本発明の実施の形態 2におけるキャ ッシュメ モ リ の構成を 示すブ □ ック図である。 同図のキャ ッシュメ モ リ は、 図 2の構成と比較 して 、 ゥェィ 3 1 a ~ 3 1 d の代わリ にゥェィ 1 3 1 a 1 3 1 d を備 える占と、 制御部 3 8の代わり に制御部 1 3 8 を備える点とが異なつて いる 以下 同 じ点は説明を省略して、 ¾なる点を中心に説明する ゥ Xィ 1 3 1 a は、 ウェイ 3 1 a と比ベて 、 各キヤ ッンュェン 卜 リ一 中に二ュ一フラグが追加されている点が なる
図 1 4に 、 ゥェィ 1 3 1 a 内の 1 つのキヤ ッシユエン 卜 リ一のビッ 卜 構成を示す 。 同図のよう に、 二 —フラグ Nが追加されている点のみ異 なっている。 二ュ―フラグ Nは、 リ ブレース直後 (又はフィル直後) に 初期値と して 1 が設定され 、 当該キヤ ヅシユエン ト リーへのアクセスが あつたと きに 0に セッ 卜される。 つま リ、 ニュ —フラグ Nの 1 は、 当 言亥キャ ッシュェン 卜 リ一が プレース (又はフィ ル) されてから一度も アクセスされていない、 新しい状態であるこ と を意味する。
制御部 1 3 8 は 、 図 1 5 に示すよう に 、 制御部 1 3 8 は、 フラグ更新 部 1 3 9 と リ ブレ ―ス部 1 4 0 と を備え 、 制御部 3 8 と比べて、 ニュー フラグ Nの設定およぴ更新する点と、 U プレース時にニューフラグが 1 のキャ ッシュェン 卜 リ一を U プレース対象から除外する点とが異なって いる。
< リ プレース処理 >
図 1 6は、 リ プレ —ス部 1 4 0における リ プレース処理を示すフ 口一 チヤ一 トである |pj図は 、 図 9 と比較して、 ステップ S 9 2の代わ りに ステッ プ S 9 2 a を有する点と、 ステッ プ 9 2 a と 9 3の間にステップ
S 1 6 1 および S 1 6 2が追加された点と、 ステップ S 9 5の代わ りに ステッ プ S 9 5 a を有する点とが異なつている。
ステップ S 9 2 a において リ プレース部 1 4 0 は、 セッ トイ ンデック スによ り選択されたセッ 卜における、 4つウェイの使用フラグ U 0 ~ U
3に加えて 4つの二ュ一フラグ ( N 0 N 3 とす ■© ノ ¾r sjcみ出す。 さ らに、 リ ブレ ―ス部 1 4 0は、 読み出 した 4つのニューフラグ N 0
~ N 3の全てが 1 でめ か否かを判定 し (ステツ プ S 1 6 1 )、 全てが 1 である場合は、 ステップ S 9 3 に進み 、 全てが 1 ではない ( 0がある) 場合には、 使用フラグ Uが 0のウェイのうち、 二ユーフラグ Nが 1 のゥ ェィ を除外する (ステッ プ S 1 6 2 )。
さ らに、 ステッ プ S 9 3 において、 プレース部 1 4 0は、 使用フラ グが 0でかつ二ュ一フラグが 0のゥェィの中から リ プレース対象を 1 つ 選択するこ とになる ただ し、 4つの二ュ一フラグの全てが 1 でめる ½ 口には、 使用フラグ Uが 0のウェイの中力、ら U プレース対象を 1 つ選択 し 、 4つの使用フラグ Uの全てが 1 である場合には 、 ニューフラグ Nを 視して使用フラグ Uが 1 のウェイの中力、ら り プレ —ス対象を 1 つ選択 し 、 使用フラグ U = 0かつ二ュ一フラグ N = 0のゥエイが存在しない場 には、 ニューフラグ N を 視して使用フラグ U = 0のウェイの中から プレース対象を 1 つ選択する
また、 ステッ プ S 9 5 a において、 リ プレース部 1 4 0は、 他のフラ グの初期化と共に、 二ュ―フラグ N を 1 に初期化す Ό
<フラグ更新処理 >
図 1 7 は、 フラグ 新部 1 3 9 におけるフラグ更新処理を示すフロー チャ一 トである。 同図は、 図 6 と比較して、 ステップ S 6 2 と S 6 3の 間にステップ S 1 7 1 が追加された点が異なる
ステップ S 1 7 1 においてフラグ更新部 1 3 9 は 、 選択されたセッ 卜 内のヒ ッ ト したゥェィのキャ ッシユエン ト リーの二ュ一フラグが 1 なら
0 にリ セッ 卜する。 これによ リ 、 —度ァクセスされたキャ ッシュェン 卜
'J —は、 ニューフラグ N を 0にリセッ トされる
以上説明 してきたよ うに 、 本実施の形態における リ プレース部 1 4 0 は 、 ニューフラグが 1 の場口は、 当該キャッシュェン ト リ一を リ プレー ス対象から除外している。 これは、 次の理由による 。 すなわち、 使用フ ラグ uは初期値が 1 で が他のウェイの使用フラグが順次 1 になれば
0に リセッ 卜される つま 、 使用フラグ Uが 0のキャ ッシュェン 卜 リ
―であっても一度もァクセスされていない場合がある。 こ う して使用フ ラグが 0になった場 、 U プレース後に一度もァクセスされていなぃキ ャ ッシュエン ト リ一が 、 キャ ッシュ ミスの発生によ リ再度り プレ —ス対 象に選択されて しまラ可能性がある。 そのため ュ一フラグ N を設け るこ とによ り 、 リ プレースされた後に一度もアクセスされていないキヤ ッシユエン ト リーがリ プレースされて しまう こ とを防止する こ とができ る。
<変形例 >
( 1 ) 実施の形態 1 における変形例 ( 1 ) 〜 ( 5 ) を本実施の形態に適 用 してもよい。
( 2 ) 図 1 6 に示したステップ S 9 5 a において、 リ プレース直後の使 用フラグ Uは 1 に初期化されるが、この代わ り に 0に初期化してもよし、。 実施の形態 1 と異なり本実施の形態ではニューフラグ Nが設けられたの で、 使用フラグの初期値が 1 の場合でも 0の場合でも、 リ プレース後に 発生したキヤ ッシュ ミスによ リ一度もアクセスされないまま再度リ プレ —スされて しまう ことを防止する こ とができる。
( 3 ) 上記各実施形態におけるキャ ッシュメモ リ は、 プロセッサと共に チッ プに内蔵されるオンチップキャ ッシュ、 オフチップキャ ッシュ、 命 令キャ ッシュ、 データキャ ッシュの何れに適用 してもよい。 産業上の利用可能性
本発明は、 メ モ •J ァクセスを高速化するためのキャ ッシュメ モ リ およ びその制御方法に迴してお り 、 例えば、 オンチップキャ ッシュメ モ リ 、 オフチッ プキヤ ッシュメモ 、 丁—タキャ ッシュメ モ リ 、 命令キヤ ッシ ュメモ リ等に適している

Claims

請 求 の 範 囲
1 . キャ ッシュの単位となる丁 ―タ を保持するキャ ッシュェン ト リー毎 に 、 ァクセスの有無を示す 1 ビッ 卜のアクセス情報を記憶する記憶手段 と 、
ァクセス無しを示すァクセス情報に対応するキャ ッシュェン ト リ一の 中から プレース対象のキャ ッシユエン ト リーを選択する選択手段と を備えるこ と を特徴とするキャ ッシュメモ リ 。
2 . 前記選択手段は、 アクセス無しを示すアクセス情報に対応するキヤ ッシュエン ト リーの中から、 ランダムに 1 つのキャ ッシュエン ト リ一を 選択する
こ とを特徴とする請求項 1 記載のキャ ッシュメ モ リ 。
3 . 前記選択手段は、 アクセス無しを示すアクセス情報に対応するキヤ ッシュエン ト リ一の中から、 ラウン ドロ ビン式に 1 つのキャ ッシュェン ト リーを選択する
こ と を特徴とする請求項 1 記載のキャ ッシュメ モ リ 。
4 . 前記キヤ 、ン ンュ メ モ リ は 、 さ
キャ ッシュ Xン 卜 リーにヒ V 卜 したと き当該キャ ッンュェン 卜 U ―に 対応するァクセス情報をァクセス有リに更新し、 その際に他の全てのキ ャ ッシユエン 卜 一に対応するァクセス情報がァクセス有り を示す には、 他の全てのキャ ッシュェン 卜 ―に対応するァクセス情 ¾xをァク セス無しにリ セヅ 卜する更新手段を備える
こ と を特徴とする請求項 1 記 のキャ ッシュメ モ U
5 . 前記更新手段は、 さ らに、 前記リセッ トに際して前記ヒ ッ ト したキ ャ ッシユエン ト リーに対応するアクセス情報をアクセス無しに リ セッ ト する
こ と を特徴とする請求項 4記載のキャ ッシュメモ リ 。
6 . 前記記憶手段は、 さ らに、 キャ ッシュエン ト リ一毎に、 メモ リから キャ ッシュエン ト リーにデータが格納された直後の新しい状態であるか 否かを示すニュー情報を記憶し、
前記更新手段は、 さ らに、 キャ ッシュエン ト リ一にヒ ッ ト したと き当 該キャ ッシュェン ト リーに対応するニュー情報を新しい状態でないこと を示すよ う リセッ ト し、
前記選択手段は、 アクセス無しを示すアクセス情報に対応するキヤッ シュエン ト リ一の中から、 .新しい状態でないこ と を示すニュー情報に対 応するキャ ッシュェン ト リ一を優先 して、 リ プレース対象のキャ ッシュ エン ト リ 一を選択する
こ と を特徴とする請求項 5記載のキャ ッシュメモリ 。
7 . 前記選択手段は 、 ァクセス挺 しを示すァクセス情 に対応し 、 かつ 新しい状態でないこ とを示す二ュ ―情報に対応するキャ ヅ ンュェン 卜 リ
—が存在しない場合には、 二ュ ―情報を無視して 、 'J プレ ―ス対象のキ ャ ッシュエン ト リ 一を選択する
こ と を特徴とする 求項 6記載のキヤ ッシュメモ リ
8 . 前記選択手段は、 アクセス有り を示すアクセス情報に対応し、 また は新しい状態であるこ とを示すニュー情報に対応するキャ ッシュェン ト リーのみが存在する場合には、 ニュー情報を無視して、 リ プレース対象 のキヤ ッシュエン ト リ—を選択する
こ と を特徴とする請求項 6記載のキヤ ヅシュメ モ リ 。
9 . 前吕 dキャ ッシュメ モ リ は、 セッ ト - ァソンエイティ ブ方式であ y、 さ らに、 ャャ ッ シュエン ト リ一にヒ ッ 卜 したと き当該キヤ ヅシュェン ト リーに対応するァクセス情報をァクセス有 に更新し、 その際に当該 キヤ ッシュエン ト リ 一と同一のセッ ト内における他の全てのキャ ッシュ ェン 卜 リーに対応するアクセス情報がァクセス有り を示す場 には 、 前 記同一のセッ 卜内における他の全てのキャ V ンュエン ト リ一に対応する ァクセス情報をァクセス無しにリセッ トする更新手段を備える
こと を特徴とする請求項 1 記載のキヤ 'ンシュメ モ リ 。
1 0 . 前記更新手段は 、 さ らに、 前記リセッ 卜に際してキヤ シュ ヒッ 卜したキャ ッシュェン 卜 リーに対応するァクセス情報をァクセス しに リセッ 卜する
こ と を特徴とする請求項 9記載のキヤ ヅ ンュメ モ リ 。
1 1 . 前記記憶手段は 、 さ らに、 キヤッシュェン ト リ一毎に 、 キャ ッシ ユエン ト リーにデータが格納された直後の新しい状態であるか否かを示 すニュ一情報を記憶し 、
前記更新手段は、 さ らに、 ャャ ッシュェン 卜 リーに ヒ ッ ト したと き当 該キヤ ッシユエン 卜 リ一に It、するニュ一情報を新しい状態でないこと を示すよ う リセ ッ ト し 、
前記選択手段は、 ァクセス無しを示すァクセス情報に対応し 、 かつ新 しい状態を示すニュー情報に対応する前記同 ―セッ 卜内のキャッンュェ ン 卜 リ —の中から、 リ プレース対象のキャ ッシュエン ト リ一を 3^択する こ と を特徴とする請求項 1 0記載のキャ ッシュメモ リ 。
1 2 . 前記 択手段は 、 ァクセス しを示すァクセス情報に対応し 、 か 新しい状態でないこと を示す二ュ ―情報に対応するキャ ッンュ Xン 卜
U ―が存在 しない場合には、 二ュ ——情報を無視して 、 プレース対象の キャ ッ シュェン ト リーを選択する
と を特徴とする請求項 1 1 記載のキヤ ッシュメモ 'J
1 3 前記選択手段は ァクセス有り を示すァクセス情 に対応し、 ま たは新しい状態であるこ と を示すニュ一情報に対応するキャッシユエン 卜 ―のみが存在する a には、 ニュ一情報を無視して 、 U プレース対 象のキャ ッシユエン 卜 >J ―を選択する
» と を特徴とする請求項 1 1 記載のキヤ ッシュメモ o
1 4 . 刖 I己キャ ッシュメモ リ は、 さ bに 、
キャ ッシュエン ト リ一にヒ ッ ト したこ と を検出する手段と、 ヒ ッ 卜 したこ とが検出されたキャ ッンュエン ト リ一に対応するァクセ ス情報をアクセス有りに更新する第 1 更新手段と
ヒ ッ 卜 したこ とが検出されたキャッシュエン ト リー以外の他の全ての キャ ッシュエン ト リーに対応するァクセス情報がァクセス有り を示すか 否かを判定する判定手段と、
判定手段の判定結果が肯定である 口に 、 他の全てのキャ ッシュェン 卜 リーに対応するァクセス情報をァクセス無 しを示すよ うに更新する第
2更新手段と を有する
こ と を特徴とする請求項 1 記載のキャ ッシュメモリ
1 5 . 前記記憶手段は、 さ らに、 キヤ ッ ンュェン ト リ一毎に、 メ モリか らキャ ッシュエン ト リ一にデータが格納された直後の新しい状態である か否かを示すニュー情報を記憶し、
刖記第 1 更新手段は、 さ らに、 ヒ ッ ト したこ とが検出されたキヤ ッシ ュェン ト リーに対応するニュー情報を新しい状態でないこ と を示すよう セッ 卜 し、
前記選択手段は、 ァクセス無しを示すァクセス情報に対応するキャッ シュエン ト リ ーの中から 、 新しい状態でない と を示すニュー情報に対 応するキャッシュェン ト リーを優先して 、 リ プレース対象のキヤ ッシュ ェン ト リ一を選択する
ことを特徴とする請求項 1 4記載のキャ ッシュメ モ リ
1 6 . 前記キャ ッシュメ モリ は、セッ ト 'ァソシエイティ ブ方式であし J、 さ らに、 キャ ッシュェン ト リ一にヒ ッ 卜 したこと を検出する手段と、 ヒ ッ 卜 したこ とが検出されたキヤッシュェン ト リ一に対応するァクセ ス情報をアクセス有り に更新する第 1 更新手段と、
ヒ ッ 卜 したこ とが検出されたキヤッシュ Xン ト リ一と同一のセッ 卜内 における他の全てのキヤ ッシユエン 卜 リ一に対応するァクセス情報がァ クセス有リ を示すか否かを判定する判定手段と 、
判定手段の判定結果が肯定である場合に 、 他の全てのキャ ッシュェン 卜 U —に対応するァクセス情報をァクセス舰、 しを示すよ う に更新する第
2更新手段と を有する
こ とを特徴とする請求項 1 記載のキヤ ッシュメ モ リ 。
1 7 . 前記記憶手段は、 さ らに、 キヤ ッシュェン ト リ一毎に、 キヤ ッシ ュェン ト リーにデータが格納された直後の新しい状態であるか否か ¾■示 す二ュ一情報を記憶し、
前記第 1 更新手段は 、 さ らに、 ヒ 卜 したこ とが検出されたキヤ ッシ ュ Xン ト リーに対応する二ュ—情 を新しい状態でないこ と を示すよラ セッ 卜 し、
前記選択手段は、 前記同一のセッ 卜内においてァクセス無しを示すァ クセス情報に対応するキャ ッシュ Xン 卜 ―の中から、 新しい状態でな い < と を示すニュー情報に対応するキャ ッシュェン 卜 リ一を優先して 、
•J プレ —ス対象のキヤ ッシユエン 卜 リ一を 択する
こ と を特徴とする請求項 1 6記載のキャ ッシュメ モ リ 。
1 8 . キャ ッシュメ モ リ のキャッシュエン ト リ一毎に、 アクセスの有無 を示すアクセス情報を記憶する記憶部を有するキャ ッシュメ モリの制御 方法であって、
キャ ッシュ ヒ ッ トおよびミスを検出する検出ステップと、
ヒ ッ ト したこ とが検出されたキャ ッシュェン ト リ一に対応する 1 ビッ 卜のアクセス情報をァクセス有り に更新する第 1 更新ステツ プと、 ヒ ッ 卜 したこ とが検出されたキャ ッシュェン ト リー以外の他の全ての キャ ッシュエン ト リーに対応するァクセス情報がアクセス有リ を示すか 否かを判定する判定ステッ プと、
判定手段の判定結果が肯定である場合に 他の全てのキヤ ッシユエン ト リ一に対応するァクセス情報をァクセス aハ、t、 しを示すよ うに更新する第
2更新ステッ プと、
ミス したこ とが検出されたとき 、 ァクセス無しを示すァクセス情報に 対応するキャ ッシュェン ト リーの中力、ら リ プレ一ス対象のキャ ッシユエ ン ト リ一を選択する選択ステップと
を有するこ とを特徴とする制御方法。
PCT/JP2004/012421 2003-09-19 2004-08-23 キャッシュメモリおよびキャッシュメモリ制御方法 WO2005029336A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP04772377A EP1667028A4 (en) 2003-09-19 2004-08-23 ANTEMEMOIRE AND METHOD FOR CONTROLLING ANTEMEMOIRE
JP2005514011A JP4009304B2 (ja) 2003-09-19 2004-08-23 キャッシュメモリおよびキャッシュメモリ制御方法
US10/571,531 US20070028055A1 (en) 2003-09-19 2004-08-23 Cache memory and cache memory control method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003327032 2003-09-19
JP2003-327032 2003-09-19

Publications (1)

Publication Number Publication Date
WO2005029336A1 true WO2005029336A1 (ja) 2005-03-31

Family

ID=34372854

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/012421 WO2005029336A1 (ja) 2003-09-19 2004-08-23 キャッシュメモリおよびキャッシュメモリ制御方法

Country Status (7)

Country Link
US (1) US20070028055A1 (ja)
EP (1) EP1667028A4 (ja)
JP (1) JP4009304B2 (ja)
KR (1) KR20060063804A (ja)
CN (1) CN100429632C (ja)
TW (1) TW200525356A (ja)
WO (1) WO2005029336A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293839A (ja) * 2006-04-25 2007-11-08 Internatl Business Mach Corp <Ibm> ロックされたキャッシュ内のセットの置換を管理するための方法、コンピュータ・プログラム、キャッシング・システムおよびプロセッサ
JP2010538390A (ja) * 2007-09-04 2010-12-09 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド プロセッサの非常にアソシエティビティの高いキャッシュメモリ用のセカンドチャンス置換機構
JP2015193164A (ja) * 2014-03-31 2015-11-05 ブラザー工業株式会社 非吐出ノズル検出装置

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070093452A (ko) 2005-04-08 2007-09-18 마쯔시다덴기산교 가부시키가이샤 캐시 메모리 시스템 및 그 제어 방법
KR100772196B1 (ko) * 2005-12-06 2007-11-01 한국전자통신연구원 Pci 메모리를 이용한 무복사 캐싱 방법 및 그 장치
SK287315B6 (sk) 2006-06-02 2010-06-07 Biotika, A. S. Spôsob izolácie polymyxínu B z vyfermentovanej pôdy
SK287293B6 (sk) 2006-06-15 2010-05-07 Biotika, A. S. Spôsob fermentácie polymyxínu B pomocou produkčného mikroorganizmu Bacillus polymyxa
US20080292560A1 (en) * 2007-01-12 2008-11-27 Dov Tamarkin Silicone in glycol pharmaceutical and cosmetic compositions with accommodating agent
US8214602B2 (en) * 2008-06-23 2012-07-03 Advanced Micro Devices, Inc. Efficient load queue snooping
TW201015319A (en) * 2008-09-17 2010-04-16 Panasonic Corp Cache memory, memory system, data copying method and data rewriting method
TW201017421A (en) * 2008-09-24 2010-05-01 Panasonic Corp Cache memory, memory system and control method therefor
CN107992433A (zh) * 2017-12-19 2018-05-04 北京云知声信息技术有限公司 二级缓存检测方法及装置
US10783083B2 (en) * 2018-02-12 2020-09-22 Stmicroelectronics (Beijing) Research & Development Co. Ltd Cache management device, system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55157181A (en) * 1979-05-25 1980-12-06 Nec Corp Buffer memory control system
JPH0362144A (ja) * 1989-04-13 1991-03-18 Bull Sa 情報処理システムのメモリアクセスを速くする方法及びこの方法を実施するためのシステム
JPH04288647A (ja) * 1991-02-27 1992-10-13 Mitsubishi Electric Corp キャッシュメモリにおける置き換え制御装置
JPH0619797A (ja) * 1992-04-29 1994-01-28 Sun Microsyst Inc キャッシュ内の記憶されている行を保護する装置及び方法

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4195343A (en) * 1977-12-22 1980-03-25 Honeywell Information Systems Inc. Round robin replacement for a cache store
US5497477A (en) * 1991-07-08 1996-03-05 Trull; Jeffrey E. System and method for replacing a data entry in a cache memory
JP3309425B2 (ja) * 1992-05-22 2002-07-29 松下電器産業株式会社 キャッシュ制御装置
JPH06348595A (ja) * 1993-06-07 1994-12-22 Hitachi Ltd キャッシュ装置
US5802568A (en) * 1996-06-06 1998-09-01 Sun Microsystems, Inc. Simplified least-recently-used entry replacement in associative cache memories and translation lookaside buffers
US5809528A (en) * 1996-12-24 1998-09-15 International Business Machines Corporation Method and circuit for a least recently used replacement mechanism and invalidated address handling in a fully associative many-way cache memory
US6032228A (en) * 1997-11-26 2000-02-29 International Business Machines Corporation Flexible cache-coherency mechanism
US6393525B1 (en) * 1999-05-18 2002-05-21 Intel Corporation Least recently used replacement method with protection
US6282617B1 (en) * 1999-10-01 2001-08-28 Sun Microsystems, Inc. Multiple variable cache replacement policy
US20030105929A1 (en) * 2000-04-28 2003-06-05 Ebner Sharon M. Cache status data structure
JP3661614B2 (ja) * 2001-07-12 2005-06-15 日本電気株式会社 キャッシュメモリ制御方法及びマルチプロセッサシステム
JP2003131946A (ja) * 2001-10-19 2003-05-09 Nec Corp キャッシュメモリ制御装置及び方法
US20030084253A1 (en) * 2001-10-31 2003-05-01 Johnson David J.C. Identification of stale entries in a computer cache
US6996678B1 (en) * 2002-07-31 2006-02-07 Cisco Technology, Inc. Method and apparatus for randomized cache entry replacement

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55157181A (en) * 1979-05-25 1980-12-06 Nec Corp Buffer memory control system
JPH0362144A (ja) * 1989-04-13 1991-03-18 Bull Sa 情報処理システムのメモリアクセスを速くする方法及びこの方法を実施するためのシステム
JPH04288647A (ja) * 1991-02-27 1992-10-13 Mitsubishi Electric Corp キャッシュメモリにおける置き換え制御装置
JPH0619797A (ja) * 1992-04-29 1994-01-28 Sun Microsyst Inc キャッシュ内の記憶されている行を保護する装置及び方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1667028A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293839A (ja) * 2006-04-25 2007-11-08 Internatl Business Mach Corp <Ibm> ロックされたキャッシュ内のセットの置換を管理するための方法、コンピュータ・プログラム、キャッシング・システムおよびプロセッサ
JP2010538390A (ja) * 2007-09-04 2010-12-09 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド プロセッサの非常にアソシエティビティの高いキャッシュメモリ用のセカンドチャンス置換機構
JP2015193164A (ja) * 2014-03-31 2015-11-05 ブラザー工業株式会社 非吐出ノズル検出装置

Also Published As

Publication number Publication date
US20070028055A1 (en) 2007-02-01
EP1667028A4 (en) 2008-10-29
JPWO2005029336A1 (ja) 2006-11-30
EP1667028A1 (en) 2006-06-07
TW200525356A (en) 2005-08-01
CN1853171A (zh) 2006-10-25
KR20060063804A (ko) 2006-06-12
CN100429632C (zh) 2008-10-29
JP4009304B2 (ja) 2007-11-14

Similar Documents

Publication Publication Date Title
US7444494B2 (en) Data processing system and method for predictively selecting a scope of broadcast of an operation utilizing a history-based prediction
US7484042B2 (en) Data processing system and method for predictively selecting a scope of a prefetch operation
JP3620473B2 (ja) 共有キャッシュメモリのリプレイスメント制御方法及びその装置
US6282617B1 (en) Multiple variable cache replacement policy
JP7049338B2 (ja) タグマッチングコマンドに応答する記憶回路
US20060265553A1 (en) Processor, data processing system, and method for initializing a memory block
WO2005029336A1 (ja) キャッシュメモリおよびキャッシュメモリ制御方法
US7475196B2 (en) Processor, data processing system, and method for initializing a memory block in a data processing system having multiple coherency domains
US7870325B2 (en) Cache memory system
US10997079B2 (en) Method and arrangement for saving cache power
US20100138615A1 (en) Handling direct memory accesses
TW200908009A (en) Hierarchical cache tag architecture
CN113961483A (zh) 高速缓存存储器和使用高速缓存存储器的方法
TWI380173B (en) Data processing system, cache memory and method for providing cache coherency
JP3463292B2 (ja) キャッシュ動作要求間の競合に応答して置換用の代替キャッシュ・エントリを選択する方法及びシステム
US20080307169A1 (en) Method, Apparatus, System and Program Product Supporting Improved Access Latency for a Sectored Directory
US20070168639A1 (en) Data processing system and method for selecting a scope of broadcast of an operation by reference to a translation table
US20080028138A1 (en) Content-addressable memory that supports a priority ordering between banks of differing sizes
JP2846697B2 (ja) キャッシュメモリ制御装置
US7865666B2 (en) Cache memory systems and methods thereof
US20080028139A1 (en) Content-addressable memory that supports a priority ordering between banks
JPH11328017A (ja) 偶数/奇数キャッシュ・ディレクトリ方法及び装置
US7376868B2 (en) Cache memory device and reference history bit error detection method
US8886895B2 (en) System and method for fetching information in response to hazard indication information
JP2001051899A (ja) キャッシュメモリ装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200480027074.9

Country of ref document: CN

AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BW BY BZ CA CH CN CO CR CU CZ DK DM DZ EC EE EG ES FI GB GD GE GM HR HU ID IL IN IS JP KE KG KP KZ LC LK LR LS LT LU LV MA MD MK MN MW MX MZ NA NI NO NZ PG PH PL PT RO RU SC SD SE SG SK SY TJ TM TN TR TT TZ UA UG US UZ VN YU ZA ZM

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SZ TZ UG ZM ZW AM AZ BY KG MD RU TJ TM AT BE BG CH CY DE DK EE ES FI FR GB GR HU IE IT MC NL PL PT RO SE SI SK TR BF CF CG CI CM GA GN GQ GW ML MR SN TD TG

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: 1020057024622

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 2005514011

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 2007028055

Country of ref document: US

Ref document number: 10571531

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2004772377

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 2004772377

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 1020057024622

Country of ref document: KR

WWP Wipo information: published in national office

Ref document number: 10571531

Country of ref document: US