From c79db98898fb5d8883cfeb26e3f2615595d24ae0 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Tue, 27 Feb 2024 17:37:46 -0800 Subject: [PATCH] FIFOFixer should be identity when no clients may request Fifo --- src/main/scala/tilelink/FIFOFixer.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/scala/tilelink/FIFOFixer.scala b/src/main/scala/tilelink/FIFOFixer.scala index 6aaff7ad641..6085f3cc242 100644 --- a/src/main/scala/tilelink/FIFOFixer.scala +++ b/src/main/scala/tilelink/FIFOFixer.scala @@ -33,12 +33,14 @@ class TLFIFOFixer(policy: TLFIFOFixer.Policy = TLFIFOFixer.all)(implicit p: Para (fixMap, splatMap) } - val node = TLAdapterNode( - clientFn = { cp => cp }, - managerFn = { mp => + val node = new AdapterNode(TLImp)( + { cp => cp }, + { mp => val (fixMap, _) = fifoMap(mp.managers) mp.v1copy(managers = (fixMap zip mp.managers) map { case (id, m) => m.v1copy(fifoId = id) }) - }) + }) with TLFormatNode { + override def circuitIdentity = edges.in.map(_.client.clients.filter(c => c.requestFifo && c.sourceId.size > 1).size).sum == 0 + } lazy val module = new Impl class Impl extends LazyModuleImp(this) {