1
0

tilelink: fix error fragmentation from multibeat to multibeat (#1082)

Unfortunately, dLast is not actually correct for AccessAckData.
dFragnum is 0 for all the subbeats in the multibeat=>multibeat case.
This commit is contained in:
Wesley W. Terpstra 2017-10-31 17:34:46 -07:00 committed by GitHub
parent 8ec06151b0
commit 84145959e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,7 +156,7 @@ class TLFragmenter(val minSize: Int, val maxSize: Int, val alwaysMin: Boolean =
val dToggle = RegInit(Bool(false))
val dFragnum = out.d.bits.source(fragmentBits-1, 0)
val dFirst = acknum === UInt(0)
val dLast = dFragnum === UInt(0)
val dLast = dFragnum === UInt(0) // only for AccessAck (!Data)
val dsizeOH = UIntToOH (out.d.bits.size, log2Ceil(maxDownSize)+1)
val dsizeOH1 = UIntToOH1(out.d.bits.size, log2Up(maxDownSize))
val dHasData = edgeOut.hasData(out.d.bits)
@ -188,9 +188,9 @@ class TLFragmenter(val minSize: Int, val maxSize: Int, val alwaysMin: Boolean =
// The specification requires that error transition LOW=>HIGH only once per burst.
// Since we fragmented a big burst into mulitple little bursts, we need to OR them.
val r_error = RegInit(Bool(false))
val d_error = r_error || out.d.bits.error
when (out.d.fire()) { r_error := !dLast && d_error }
val r_error = Reg(Bool())
val d_error = (!dFirst && r_error) || out.d.bits.error
when (out.d.fire()) { r_error := d_error }
in.d.bits.error := d_error
if (earlyAck) {