CPC G06F 12/0811 (2013.01) [G06F 21/602 (2013.01)] | 13 Claims |
1. A method for managing a cache memory of an electronic computer, this method comprising following steps during execution by this electronic computer of a process that must process a word:
(a) receiving a request containing an address of the word to be read or written, the address comprising:
a received line tag,
a received set address, this received set address belonging to a first set of s different values, where the number s is an integer greater than two, then
b) generating, depending on the set address received in step a), a respective first value for each line index of a group of W different line indices, where W is a predetermined integer greater than or equal to one, each line index pointing to one respective way of s different lines of the cache memory and the respective first value uniquely identifying a single line of the way to which the line index points, each line identified by the respective first value of a line index comprising a pre-stored line tag, then
c) comparing the received line tag to the line tags of the lines identified by the first values of the W line indices generated in step b), to determine whether any of these line tags corresponds to the received line tag,
d) when none of the line tags compared in step c) corresponds to the received line tag, triggering a cache miss and retrieving the word from a memory of higher rank, and when, conversely, one of the line tags compared in step c) corresponds to the received line tag, reading from or writing to the cache memory the word inside the line containing the line tag that corresponds to the received line tag,
wherein:
step b) comprises, for each of the W line indices, selecting, depending on the set address received in step a), a first cell in a first column of a pre-stored indirection table associated with this line index and using, as first value generated for this line index, the value contained in this first cell,
in step d), in response to triggering of a cache miss, the method comprises the following operations:
d1) storing the word retrieved from the memory of higher rank in a new line identified by a second line-index value that points to the way containing this new line, this second value being different from the first value of this line index generated in step b) and being contained in a second cell of the first column of the indirection table associated with this line index, this second cell being different from the first cell, and
d2) permutating, in the first column of the indirection table associated with the line index that points to the way containing the new line, only values contained in the first and second cells, so that after this permutation the first cell contains the second value and the second cell contains the first value.
|