1
0

diplomacy: reprotect Node bundles after module construction is completed

This commit is contained in:
Wesley W. Terpstra
2017-11-08 15:32:45 -08:00
parent fdeed7bbb3
commit 2092cb4ec8
2 changed files with 12 additions and 1 deletions

View File

@ -165,7 +165,9 @@ sealed trait LazyModuleImpLike extends BaseModule
protected[diplomacy] def instantiate() = {
val childDangles = wrapper.children.reverse.flatMap { c =>
implicit val sourceInfo = c.info
Module(c.module).dangles
val mod = Module(c.module)
mod.finishInstantiate()
mod.dangles
}
wrapper.instantiate()
val nodeDangles = wrapper.nodes.reverse.flatMap(_.instantiate())
@ -184,6 +186,10 @@ sealed trait LazyModuleImpLike extends BaseModule
}
(auto, dangles)
}
protected[diplomacy] def finishInstantiate() {
wrapper.nodes.reverse.foreach { _.finishInstantiate() }
}
}
class LazyModuleImp(val wrapper: LazyModule) extends MultiIOModule with LazyModuleImpLike {