diff --git a/src/main/scala/diplomacy/Nodes.scala b/src/main/scala/diplomacy/Nodes.scala index 259eb8f4..b5f2f7b9 100644 --- a/src/main/scala/diplomacy/Nodes.scala +++ b/src/main/scala/diplomacy/Nodes.scala @@ -18,8 +18,8 @@ trait InwardNodeImp[DI, UI, EI, BI <: Data] def bundleI(ei: EI): BI def colour: String def reverse: Boolean = false - def connect(edges: () => Seq[EI], bundles: () => Seq[(EI, BI, BI)])(implicit p: Parameters, sourceInfo: SourceInfo): (Option[LazyModule], () => Unit) = { - (None, () => bundles().foreach { case (_, i, o) => i <> o }) + def connect(edges: () => Seq[EI], bundles: () => Seq[(BI, BI)])(implicit p: Parameters, sourceInfo: SourceInfo): (Option[LazyModule], () => Unit) = { + (None, () => bundles().foreach { case (i, o) => i <> o }) } // optional methods to track node graph @@ -255,7 +255,7 @@ abstract class MixedNode[DI, UI, EI, BI <: Data, DO, UO, EO, BO <: Data]( val (oStart, oEnd) = y.oPortMapping(o) require (iEnd - iStart == oEnd - oStart, s"Bug in diplomacy; ${iEnd-iStart} != ${oEnd-oStart} means port resolution failed") Seq.tabulate(iEnd - iStart) { j => - (x.edgesIn(iStart+j), x.bundleIn(iStart+j), y.bundleOut(oStart+j)) + (x.bundleIn(iStart+j), y.bundleOut(oStart+j)) } } val (out, newbinding) = inner.connect(edges _, bundles _) diff --git a/src/main/scala/uncore/tilelink2/Nodes.scala b/src/main/scala/uncore/tilelink2/Nodes.scala index ff99906a..626d24ef 100644 --- a/src/main/scala/uncore/tilelink2/Nodes.scala +++ b/src/main/scala/uncore/tilelink2/Nodes.scala @@ -25,12 +25,12 @@ object TLImp extends NodeImp[TLClientPortParameters, TLManagerPortParameters, TL override def labelI(ei: TLEdgeIn) = (ei.manager.beatBytes * 8).toString override def labelO(eo: TLEdgeOut) = (eo.manager.beatBytes * 8).toString - override def connect(edges: () => Seq[TLEdgeIn], bundles: () => Seq[(TLEdgeIn, TLBundle, TLBundle)])(implicit p: Parameters, sourceInfo: SourceInfo): (Option[LazyModule], () => Unit) = { + override def connect(edges: () => Seq[TLEdgeIn], bundles: () => Seq[(TLBundle, TLBundle)])(implicit p: Parameters, sourceInfo: SourceInfo): (Option[LazyModule], () => Unit) = { val monitor = p(TLMonitorBuilder)(TLMonitorArgs(edges, sourceInfo, p)) (monitor, () => { val eval = bundles () - monitor.foreach { m => (eval zip m.module.io.in) foreach { case ((_,i,o), m) => m := TLBundleSnoop(o,i) } } - eval.foreach { case (_, bi, bo) => + monitor.foreach { m => (eval zip m.module.io.in) foreach { case ((i,o), m) => m := TLBundleSnoop(o,i) } } + eval.foreach { case (bi, bo) => bi <> bo if (p(TLCombinationalCheck)) { // It is forbidden for valid to depend on ready in TL2