aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/Compiler.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/firrtl/Compiler.scala')
-rw-r--r--src/main/scala/firrtl/Compiler.scala10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/scala/firrtl/Compiler.scala b/src/main/scala/firrtl/Compiler.scala
index 3da25083..60ec0eb0 100644
--- a/src/main/scala/firrtl/Compiler.scala
+++ b/src/main/scala/firrtl/Compiler.scala
@@ -45,7 +45,8 @@ case class CircuitState(
/** Helper for getting an [[EmittedCircuit]] when it is known to exist */
def getEmittedCircuit: EmittedCircuit = emittedCircuitOption match {
case Some(emittedCircuit) => emittedCircuit
- case None => throw new FIRRTLException("No EmittedCircuit found! Check Emitter Annotations")
+ case None =>
+ throw new FIRRTLException(s"No EmittedCircuit found! Did you delete any annotations?\n$deletedAnnotations")
}
/** Helper function for extracting emitted components from annotations */
def emittedComponents: Seq[EmittedComponent] = {
@@ -55,6 +56,13 @@ case class CircuitState(
})
emittedOpt.getOrElse(Seq.empty)
}
+ def deletedAnnotations: Seq[Annotation] = {
+ val deletedOpt = annotations map (_.annotations collect {
+ case DeletedAnnotation(xformName, anno) =>
+ DeletedAnnotation(xformName, anno)
+ })
+ deletedOpt.getOrElse(Seq.empty)
+ }
}
/** Current form of the Firrtl Circuit