Data replacement algorithm. Each set is corresponds to a 3-bit
merge destination (MD) storage which saves 3 most significant
bits of another other set for a merge. Initially, the MD contains
3 most significant bits of the set itself that implies no merge.
To establish a merge, the MD of the target set and victim set
are exchanged and form a coupled set. From now then, any hot
data at STT-RAM lines in the target set can move to SRAM
lines of the victim and vice versa. In other words, the merge is
bidirectional between these two sets and intra-set policies for
both sets are independent. In short, SRAM lines of the victim
set help filtering writes to STT-RAM lines of the target.
We limit maximum replacement of the lines from a set to
another by number of SRAM lines at each set. Besides, a set
may hold either memory lines that correspond to itself (native
lines) or the lines that are displaced from its coupled. To solve
this ambiguity, each line has an identification bit, I. This bit
takes “1”, if its data block is native to the set and gets “0”, if it
is displaced from another set.
Cache search algorithm. When a request is directed to a set,
tag equality with its native lines are checked. If not found,
looking at the MD of the set; it decides to search another set (if
MD content differs from its index) or not. The set index for the
secondary search is a direct function of current set’s index and
its MD where tag equality is checked for lines with I=”0”. In
the case of no tag equality, the LRU policy is followed to bring
the requested data into the native cache set. Figure 2 shows a
case study in which two sets are merged and 3 most significant
bits of the tag address of one is stored in MD of the other.
Breaking merge algorithm. During program execution, WWS
of the sets varies which may decrease the merge efficiency.
Indeed, inefficient established merges have two negative
effects: they require search in the coupled set, if tag equality
fails at the native set. Besides, they can block some potential
merges due to lack of idle sets in a merge group. Therefore,
two types of transactions result in breaking a merge: first if the
coupled sets are not more write-intensive any more (with TSC
less than a threshold), we decide to break a merge. Second, we