tilelink2: maxLgSize should be accurate (#332)

This commit is contained in:
Wesley W. Terpstra authored and GitHub committed 2016-09-22 22:06:22 -07:00
1 parent 7ee79efc15
commit 47843d8ec1
2 files changed
+7 -3

No files matched your search

+6 -2
View File
@@ -216,8 +216,12 @@ class TLEdge(
x match {
case _: TLBundleE => UInt(0)
case bundle: TLDataChannel => {
val decode = UIntToOH1(size(bundle), maxLgSize) >> log2Ceil(manager.beatBytes)
Mux(hasData(bundle), decode, UInt(0))
if (maxLgSize == 0) {
UInt(0)
} else {
val decode = UIntToOH1(size(bundle), maxLgSize) >> log2Ceil(manager.beatBytes)
Mux(hasData(bundle), decode, UInt(0))
}
}
}
}