diff --git a/uncore/src/main/scala/agents/Cache.scala b/uncore/src/main/scala/agents/Cache.scala index fc67c391..80f8f8dd 100644 --- a/uncore/src/main/scala/agents/Cache.scala +++ b/uncore/src/main/scala/agents/Cache.scala @@ -82,6 +82,7 @@ class SeqRandom(n_ways: Int) extends SeqReplacementPolicy { class PseudoLRU(n: Int) { + require(isPow2(n)) val state_reg = Reg(Bits(width = n)) def access(way: UInt) { state_reg := get_next_state(state_reg,way)