From bb309e573f063188d05f9341651177da8470962f Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Tue, 20 Jun 2017 14:10:25 -0700 Subject: [PATCH] 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