Skip to content

Commit

Permalink
Add error message in LazyModule construction
Browse files Browse the repository at this point in the history
This just ports chipsalliance/rocket-chip#3569
to this repo.
  • Loading branch information
tymcauley committed Mar 12, 2024
1 parent edf3753 commit 867738f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion diplomacy/src/diplomacy/lazymodule/LazyModuleImp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ sealed trait LazyModuleImpLike extends RawModule {
dangles
}.getOrElse {
// For non-clones, instantiate the child module
val mod = Module(c.module)
val mod = try {
Module(c.module)
} catch {
case e: ChiselException => {
println(s"Chisel exception caught when instantiating ${c.name} within ${this.name} at ${c.line}")
throw e
}
}
mod.dangles
}
}
Expand Down

0 comments on commit 867738f

Please sign in to comment.