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:
parent
8ec06151b0
commit
84145959e1
@ -156,7 +156,7 @@ class TLFragmenter(val minSize: Int, val maxSize: Int, val alwaysMin: Boolean =
|
|||||||
val dToggle = RegInit(Bool(false))
|
val dToggle = RegInit(Bool(false))
|
||||||
val dFragnum = out.d.bits.source(fragmentBits-1, 0)
|
val dFragnum = out.d.bits.source(fragmentBits-1, 0)
|
||||||
val dFirst = acknum === UInt(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 dsizeOH = UIntToOH (out.d.bits.size, log2Ceil(maxDownSize)+1)
|
||||||
val dsizeOH1 = UIntToOH1(out.d.bits.size, log2Up(maxDownSize))
|
val dsizeOH1 = UIntToOH1(out.d.bits.size, log2Up(maxDownSize))
|
||||||
val dHasData = edgeOut.hasData(out.d.bits)
|
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.
|
// 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.
|
// Since we fragmented a big burst into mulitple little bursts, we need to OR them.
|
||||||
val r_error = RegInit(Bool(false))
|
val r_error = Reg(Bool())
|
||||||
val d_error = r_error || out.d.bits.error
|
val d_error = (!dFirst && r_error) || out.d.bits.error
|
||||||
when (out.d.fire()) { r_error := !dLast && d_error }
|
when (out.d.fire()) { r_error := d_error }
|
||||||
in.d.bits.error := d_error
|
in.d.bits.error := d_error
|
||||||
|
|
||||||
if (earlyAck) {
|
if (earlyAck) {
|
||||||
|
Loading…
Reference in New Issue
Block a user