Fix assertion falsely firing on invalid
This commit is contained in:
@@ -1429,11 +1429,13 @@ class MemTraceLogger(
|
|||||||
|
|
||||||
// This assert only holds true for PutFullData and not PutPartialData,
|
// This assert only holds true for PutFullData and not PutPartialData,
|
||||||
// where HIGH bits in the mask may not be contiguous.
|
// where HIGH bits in the mask may not be contiguous.
|
||||||
assert(
|
when (tlIn.a.valid) {
|
||||||
PopCount(tlIn.a.bits.mask) === (1.U << tlIn.a.bits.size),
|
assert(
|
||||||
"mask HIGH popcount do not match the TL size. " +
|
PopCount(tlIn.a.bits.mask) === (1.U << tlIn.a.bits.size),
|
||||||
"Partial masks are not allowed for PutFull"
|
"mask HIGH popcount do not match the TL size. " +
|
||||||
)
|
"Partial masks are not allowed for PutFull"
|
||||||
|
)
|
||||||
|
}
|
||||||
val trailingZerosInMask = trailingZeros(tlIn.a.bits.mask)
|
val trailingZerosInMask = trailingZeros(tlIn.a.bits.mask)
|
||||||
val dataW = tlIn.params.dataBits
|
val dataW = tlIn.params.dataBits
|
||||||
val mask = ~(~(0.U(dataW.W)) << ((1.U << tlIn.a.bits.size) * 8.U))
|
val mask = ~(~(0.U(dataW.W)) << ((1.U << tlIn.a.bits.size) * 8.U))
|
||||||
|
|||||||
Reference in New Issue
Block a user