From c785375276fc5e4b2ae6fecb7e0f94386b5e99c2 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Wed, 31 Aug 2016 10:43:34 -0700 Subject: [PATCH] tilelink2: use 'connect' instead of TL-specific 'tl' to connect nodes --- uncore/src/main/scala/tilelink2/LazyModule.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/uncore/src/main/scala/tilelink2/LazyModule.scala b/uncore/src/main/scala/tilelink2/LazyModule.scala index 3187c71b..82847846 100644 --- a/uncore/src/main/scala/tilelink2/LazyModule.scala +++ b/uncore/src/main/scala/tilelink2/LazyModule.scala @@ -10,8 +10,11 @@ abstract class LazyModule { private val bindings = ListBuffer[() => Unit]() - def tl(manager: TLBaseNode, client: TLBaseNode)(implicit sourceInfo: SourceInfo) = { - bindings += manager.edge(client) + // Use as: connect(source -> sink, source2 -> sink2, ...) + def connect(edges: (TLBaseNode, TLBaseNode)*)(implicit sourceInfo: SourceInfo) = { + edges.foreach { case (source, sink) => + bindings += sink.edge(source) + } } def module: LazyModuleImp