I'm trying to write a cache memory, so I created a Seq of type Mem because I'm trying to have access to all elements in a set of the cache at the same time.
val metaMem = Seq.fill(nWays) (Mem((nSets), new MetaData))
and then I want to have indexing like below:
metaMem(way).write(set, MD)
But, because, way is UInt in my code, and seq only accepts Int for indexing, it would cause compile error.
Does anyone have any suggestions on how to solve this problem?
Thanks a lot