From c4eadd3ab36a04a92287b33ce2658c3c81264b53 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Wed, 12 Oct 2016 18:55:57 -0700 Subject: [PATCH] tilelink2 Monitor: enforce stricter transaction ordering --- src/main/scala/uncore/tilelink2/Monitor.scala | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/scala/uncore/tilelink2/Monitor.scala b/src/main/scala/uncore/tilelink2/Monitor.scala index 754a18a8..f7887f0c 100644 --- a/src/main/scala/uncore/tilelink2/Monitor.scala +++ b/src/main/scala/uncore/tilelink2/Monitor.scala @@ -392,24 +392,20 @@ class TLMonitor(gen: () => TLBundleSnoop, edge: () => TLEdge, sourceInfo: Source val (_, a_last, _) = edge.firstlast(bundle.a.bits, bundle.a.fire()) val (_, d_last, _) = edge.firstlast(bundle.d.bits, bundle.d.fire()) - val bypass = bundle.a.bits.source === bundle.d.bits.source - val a_bypass = bypass && bundle.d.valid && d_last - val d_bypass = bypass && bundle.a.valid && a_last - if (edge.manager.minLatency > 0) { - assert(!bypass || !bundle.a.valid || !bundle.d.valid, s"'A' and 'D' concurrent, despite minlatency ${edge.manager.minLatency}" + extra) + assert(bundle.a.bits.source =/= bundle.d.bits.source || !bundle.a.valid || !bundle.d.valid, s"'A' and 'D' concurrent, despite minlatency ${edge.manager.minLatency}" + extra) } val a_set = Wire(init = UInt(0, width = edge.client.endSourceId)) when (bundle.a.fire()) { when (a_last) { a_set := UIntToOH(bundle.a.bits.source) } - assert(a_bypass || !inflight(bundle.a.bits.source), "'A' channel re-used a source ID" + extra) + assert(!inflight(bundle.a.bits.source), "'A' channel re-used a source ID" + extra) } val d_clr = Wire(init = UInt(0, width = edge.client.endSourceId)) when (bundle.d.fire() && bundle.d.bits.opcode =/= TLMessages.ReleaseAck) { when (d_last) { d_clr := UIntToOH(bundle.d.bits.source) } - assert(d_bypass || inflight(bundle.d.bits.source), "'D' channel acknowledged for nothing inflight" + extra) + assert((a_set | inflight)(bundle.d.bits.source), "'D' channel acknowledged for nothing inflight" + extra) } inflight := (inflight | a_set) & ~d_clr