1
0

tilelink2: statically optimize numBeats for simple managers

This commit is contained in:
Wesley W. Terpstra 2016-09-05 22:11:03 -07:00
parent 314d6ebd6f
commit 54ab14cd9d

View File

@ -99,7 +99,7 @@ class TLEdge(
val hasData = this.hasData(bundle)
val size = bundle.size()
val cutoff = log2Ceil(manager.beatBytes)
val small = size <= UInt(cutoff)
val small = if (manager.maxTransfer <= manager.beatBytes) Bool(true) else size <= UInt(cutoff)
val decode = UIntToOH(size, maxLgSize+1) >> cutoff
Mux(!hasData || small, UInt(1), decode)
}