1
0

TraceGen: Lookup -> MuxLookup

A recent commit to tracegen.scala introduced a call to BitPat() which
seems to mess up the subsequent call to Lookup().  (This function
seems undocumented so I'm not sure what's going on.)  As a fix, I've
removed the call to BitPat() and replaced Lookup() with MuxLookup().
This commit is contained in:
Matthew Naylor 2016-07-17 22:28:18 +01:00
parent f3775df04d
commit 4af6313288

View File

@ -144,14 +144,14 @@ class TagMan(val logNumTags : Int) extends Module {
val inUse = List.fill(numTags)(Reg(init = Bool(false))) val inUse = List.fill(numTags)(Reg(init = Bool(false)))
// Mapping from each tag to its 'inUse' bit // Mapping from each tag to its 'inUse' bit
val inUseMap = (0 to numTags-1).map(i => BitPat(UInt(i))).zip(inUse) val inUseMap = (0 to numTags-1).map(i => UInt(i)).zip(inUse)
// Next tag to offer // Next tag to offer
val nextTag = Reg(init = UInt(0, logNumTags)) val nextTag = Reg(init = UInt(0, logNumTags))
io.tagOut := nextTag io.tagOut := nextTag
// Is the next tag available? // Is the next tag available?
io.available := ~Lookup(nextTag, Bool(true), inUseMap) io.available := ~MuxLookup(nextTag, Bool(true), inUseMap)
// When user takes a tag // When user takes a tag
when (io.take) { when (io.take) {