Skip to content

Commit

Permalink
Merge pull request #3577 from chipsalliance/fifo-identity
Browse files Browse the repository at this point in the history
FIFOFixer should be identity when no clients may request Fifo
  • Loading branch information
jerryz123 authored Feb 28, 2024
2 parents 2b8fa0a + c79db98 commit 7f8f08b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/scala/tilelink/FIFOFixer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7f8f08b

Please sign in to comment.