diff --git a/src/main/scala/diplomacy/LazyModule.scala b/src/main/scala/diplomacy/LazyModule.scala index 68fa825c..49768120 100644 --- a/src/main/scala/diplomacy/LazyModule.scala +++ b/src/main/scala/diplomacy/LazyModule.scala @@ -54,7 +54,7 @@ abstract class LazyModule()(implicit val p: Parameters) def module: LazyModuleImp protected[diplomacy] def instantiate() = { - children.reverse.foreach { c => + children.reverse.foreach { c => // !!! fix chisel3 so we can pass the desired sourceInfo // implicit val sourceInfo = c.module.outer.info Module(c.module) @@ -69,6 +69,7 @@ abstract class LazyModule()(implicit val p: Parameters) buf ++= "\n" buf ++= " \n" buf ++= " \n" + buf ++= " \n" buf ++= " \n" nodesGraphML(buf, " ") edgesGraphML(buf, " ") @@ -84,7 +85,9 @@ abstract class LazyModule()(implicit val p: Parameters) buf ++= s"""${pad} ${module.instanceName}\n""" buf ++= s"""${pad} \n""" nodes.filter(!_.omitGraphML).foreach { n => - buf ++= s"""${pad} \n""" + buf ++= s"""${pad} \n""" + buf ++= s"""${pad} ${n.nodedebugstring}\n""" + buf ++= s"""${pad} \n""" } children.filter(!_.omitGraphML).foreach { _.nodesGraphML(buf, pad + " ") } buf ++= s"""${pad} \n""" @@ -103,7 +106,7 @@ abstract class LazyModule()(implicit val p: Parameters) } } children.filter(!_.omitGraphML).foreach { c => c.edgesGraphML(buf, pad) } } - + def nodeIterator(iterfunc: (LazyModule) => Unit): Unit = { iterfunc(this) children.foreach( _.nodeIterator(iterfunc) ) diff --git a/src/main/scala/diplomacy/Nodes.scala b/src/main/scala/diplomacy/Nodes.scala index 2080e8c0..1fdc0b9a 100644 --- a/src/main/scala/diplomacy/Nodes.scala +++ b/src/main/scala/diplomacy/Nodes.scala @@ -60,6 +60,7 @@ abstract class BaseNode def nodename = getClass.getName.split('.').last def name = lazyModule.name + "." + nodename def omitGraphML = outputs.isEmpty && inputs.isEmpty + lazy val nodedebugstring: String = "" protected[diplomacy] def gci: Option[BaseNode] // greatest common inner protected[diplomacy] def gco: Option[BaseNode] // greatest common outer