1
0

interrupts: add debugstring to nodes to show sync depth in graphml

This commit is contained in:
Wesley W. Terpstra 2017-10-26 13:11:47 -07:00
parent 2acff8d21f
commit e76e0f6dce
2 changed files with 10 additions and 4 deletions

View File

@ -27,7 +27,7 @@ object IntSyncCrossingSource
class IntSyncCrossingSource(alreadyRegistered: Boolean = false)(implicit p: Parameters) extends LazyModule
{
val node = IntSyncSourceNode()
val node = IntSyncSourceNode(alreadyRegistered)
lazy val module = new LazyModuleImp(this) {
(node.in zip node.out) foreach { case ((in, edgeIn), (out, edgeOut)) =>
@ -43,7 +43,7 @@ class IntSyncCrossingSource(alreadyRegistered: Boolean = false)(implicit p: Para
class IntSyncCrossingSink(sync: Int = 3)(implicit p: Parameters) extends LazyModule
{
val node = IntSyncSinkNode()
val node = IntSyncSinkNode(sync)
lazy val module = new LazyModuleImp(this) {
(node.in zip node.out) foreach { case ((in, edgeIn), (out, edgeOut)) =>

View File

@ -51,12 +51,18 @@ object IntSyncImp extends SimpleNodeImp[IntSourcePortParameters, IntSinkPortPara
case class IntSyncIdentityNode()(implicit valName: ValName) extends IdentityNode(IntSyncImp)()
case class IntSyncSourceNode()(implicit valName: ValName)
case class IntSyncSourceNode(alreadyRegistered: Boolean)(implicit valName: ValName)
extends MixedAdapterNode(IntImp, IntSyncImp)(
dFn = { p => p },
uFn = { p => p })
{
override lazy val nodedebugstring = s"alreadyRegistered:${alreadyRegistered}"
}
case class IntSyncSinkNode()(implicit valName: ValName)
case class IntSyncSinkNode(sync: Int)(implicit valName: ValName)
extends MixedAdapterNode(IntSyncImp, IntImp)(
dFn = { p => p },
uFn = { p => p })
{
override lazy val nodedebugstring = s"sync:${sync}"
}