39 m_assoc <= (int64_t)
sizeof(uint64_t)*4);
52 if (!tmp_assoc)
break;
63 PseudoLRUReplacementPolicyParams::create()
78 assert(index >= 0 && index <
m_assoc);
84 node_val = (index >>
i)&1;
86 m_trees[set] |= node_val << tree_index;
88 m_trees[set] &= ~(1 << tree_index);
89 tree_index = node_val ? (tree_index*2)+2 : (tree_index*2)+1;
102 node_val = (
m_trees[set] >> tree_index) & 1;
104 tree_index = node_val ? (tree_index * 2) + 1 : (tree_index * 2) + 2;
ReplacementPolicyParams Params
unsigned m_assoc
total number of sets
Implementation of tree-based pseudo-LRU replacement.
Tick ** m_last_ref_ptr
set associativity
uint64_t * m_trees
number of levels in the tree
uint64_t Tick
Tick count type.
unsigned int m_num_levels
nearest (to ceiling) power of 2
int64_t getVictim(int64_t set) const
PseudoLRUPolicy(const Params *p)
void touch(int64_t set, int64_t way, Tick time)
unsigned int m_effective_assoc