From 657f4d4e0c6bd1668983090ccc428b3f8e4b0d42 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 17 Apr 2017 17:27:00 -0700 Subject: [PATCH] Permit early grant acks to broadcast hub --- src/main/scala/uncore/tilelink2/Broadcast.scala | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/scala/uncore/tilelink2/Broadcast.scala b/src/main/scala/uncore/tilelink2/Broadcast.scala index 7de1e093..8c686112 100644 --- a/src/main/scala/uncore/tilelink2/Broadcast.scala +++ b/src/main/scala/uncore/tilelink2/Broadcast.scala @@ -226,17 +226,20 @@ class TLBroadcastTracker(id: Int, lineBytes: Int, probeCountBits: Int, bufferles // Only one operation can be inflight per line, because we need to be sure // we send the request after all the probes we sent and before all the next probes - val idle = RegInit(Bool(true)) + val got_e = RegInit(Bool(true)) + val sent_d = RegInit(Bool(true)) val opcode = Reg(io.in_a.bits.opcode) val param = Reg(io.in_a.bits.param) val size = Reg(io.in_a.bits.size) val source = Reg(io.in_a.bits.source) val address = RegInit(UInt(id << lineShift, width = io.in_a.bits.address.getWidth)) val count = Reg(UInt(width = probeCountBits)) + val idle = got_e && sent_d when (io.in_a.fire() && io.in_a_first) { assert (idle) - idle := Bool(false) + sent_d := Bool(false) + got_e := io.in_a.bits.opcode =/= TLMessages.Acquire opcode := io.in_a.bits.opcode param := io.in_a.bits.param size := io.in_a.bits.size @@ -245,12 +248,12 @@ class TLBroadcastTracker(id: Int, lineBytes: Int, probeCountBits: Int, bufferles count := io.probe } when (io.d_last) { - assert (!idle) - idle := opcode =/= TLMessages.Acquire + assert (!sent_d) + sent_d := Bool(true) } when (io.e_last) { - assert (!idle) - idle := Bool(true) + assert (!got_e) + got_e := Bool(true) } when (io.probenack || io.probedack) {