From f6e0dd12c8add3104c424611151a1e647ab38c07 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Tue, 20 Jun 2017 13:58:30 -0700 Subject: [PATCH 1/4] TLSplitter: ManagerUnification is not used in Xbars Track the change made in 5994714970c7c0ee5687e6c4c6701b5ad4372bd7 --- src/main/scala/uncore/tilelink2/Splitter.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/uncore/tilelink2/Splitter.scala b/src/main/scala/uncore/tilelink2/Splitter.scala index 6a0a4503..42f1d095 100644 --- a/src/main/scala/uncore/tilelink2/Splitter.scala +++ b/src/main/scala/uncore/tilelink2/Splitter.scala @@ -21,14 +21,14 @@ class TLSplitter(policy: TLArbiter.Policy = TLArbiter.lowestIndexFirst)(implicit seq(0).copy( minLatency = seq.map(_.minLatency).min, endSinkId = outputIdRanges.map(_.map(_.end).getOrElse(0)).max, - managers = ManagerUnification(seq.zipWithIndex.flatMap { case (port, i) => + managers = seq.zipWithIndex.flatMap { case (port, i) => require (port.beatBytes == seq(0).beatBytes, s"Splitter data widths don't match: ${port.managers.map(_.name)} has ${port.beatBytes}B vs ${seq(0).managers.map(_.name)} has ${seq(0).beatBytes}B") val fifoIdMapper = fifoIdFactory() port.managers map { manager => manager.copy( fifoId = manager.fifoId.map(fifoIdMapper(_)) )} - }) + } ) } }) From 1aa4f5ce3331518ad387d77aec9f9df21dbff1d4 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Tue, 20 Jun 2017 14:01:07 -0700 Subject: [PATCH 2/4] TLSplitter: QoR improvements Track commit 985d9750e6be56a90afe34e243bff792f081d3ca --- src/main/scala/uncore/tilelink2/Splitter.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/uncore/tilelink2/Splitter.scala b/src/main/scala/uncore/tilelink2/Splitter.scala index 42f1d095..25032fc0 100644 --- a/src/main/scala/uncore/tilelink2/Splitter.scala +++ b/src/main/scala/uncore/tilelink2/Splitter.scala @@ -51,7 +51,7 @@ class TLSplitter(policy: TLArbiter.Policy = TLArbiter.lowestIndexFirst)(implicit // Find a good mask for address decoding val port_addrs = edgesOut.map(_.manager.managers.map(_.address).flatten) val routingMask = AddressDecoder(port_addrs) - val route_addrs = port_addrs.map(_.map(_.widen(~routingMask)).distinct) + val route_addrs = port_addrs.map(seq => AddressSet.unify(seq.map(_.widen(~routingMask)).distinct)) val outputPorts = route_addrs.map(seq => (addr: UInt) => seq.map(_.contains(addr)).reduce(_ || _)) // We need an intermediate size of bundle with the widest possible identifiers From 53f030c0371be788ec367012ec50d609522c3789 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Tue, 20 Jun 2017 14:03:01 -0700 Subject: [PATCH 3/4] TLSplitter: default policy is roundRobin Track commit 274d908d98617f928e47b192cc2f68a3f7ded512 --- src/main/scala/uncore/tilelink2/Splitter.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/uncore/tilelink2/Splitter.scala b/src/main/scala/uncore/tilelink2/Splitter.scala index 25032fc0..7043c461 100644 --- a/src/main/scala/uncore/tilelink2/Splitter.scala +++ b/src/main/scala/uncore/tilelink2/Splitter.scala @@ -6,7 +6,7 @@ import Chisel._ import config._ import diplomacy._ -class TLSplitter(policy: TLArbiter.Policy = TLArbiter.lowestIndexFirst)(implicit p: Parameters) extends LazyModule +class TLSplitter(policy: TLArbiter.Policy = TLArbiter.roundRobin)(implicit p: Parameters) extends LazyModule { val node = TLSplitterNode( clientFn = { case SplitterArg(newSize, ports) => From bb309e573f063188d05f9341651177da8470962f Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Tue, 20 Jun 2017 14:10:25 -0700 Subject: [PATCH 4/4] TLSplitter: special-case the case of no split necessary --- src/main/scala/uncore/tilelink2/Splitter.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/uncore/tilelink2/Splitter.scala b/src/main/scala/uncore/tilelink2/Splitter.scala index 7043c461..96e600b7 100644 --- a/src/main/scala/uncore/tilelink2/Splitter.scala +++ b/src/main/scala/uncore/tilelink2/Splitter.scala @@ -42,7 +42,9 @@ class TLSplitter(policy: TLArbiter.Policy = TLArbiter.roundRobin)(implicit p: Pa def group[T](x: Seq[T]) = if (x.isEmpty) Nil else x.grouped(node.edgesIn.size).toList.transpose - ((node.edgesIn zip io.in) zip (group(node.edgesOut) zip group(io.out))) foreach { + if (node.edgesIn.size <= 1) { + io.out <> io.in + } else ((node.edgesIn zip io.in) zip (group(node.edgesOut) zip group(io.out))) foreach { case ((edgeIn, io_in), (edgesOut, io_out)) => // Grab the port ID mapping