1
0

tilelink2: use 'connect' instead of TL-specific 'tl' to connect nodes

This commit is contained in:
Wesley W. Terpstra 2016-08-31 10:43:34 -07:00
parent 05221d7073
commit c785375276

View File

@ -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