1
0

Add iterator function to LazyModule to iterate over all nodes

This commit is contained in:
Jacob Chang 2017-01-12 15:20:32 -08:00
parent f1cb06142e
commit 59eb7c24ee

View File

@ -85,6 +85,11 @@ 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) )
}
}
object LazyModule