aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/ExecutionOptionsManager.scala
diff options
context:
space:
mode:
authorChick Markley2016-12-06 15:43:45 -0800
committerJack Koenig2016-12-06 15:43:45 -0800
commit65b61b4a614748c699982de5ab8072b21d7f9160 (patch)
treeb93fa5f8c74c562ee43e626e1296f80f7e7e4d69 /src/main/scala/firrtl/ExecutionOptionsManager.scala
parentef4b9e59be86bd83c6c815441cb9c8621d49c89f (diff)
Fixes for Annotation serialized/deserialize (#390)
* Fixes for Annotation serialized/deserialize Made serializer agree with deserializer on text representation Re-ordered serializations of Named subclasses to be C or C.m or C.m.c where C=circuit, m=module, c=component Note: component may contain dots Added serialize deserialize tests to AnnotationSpec Did some style cleanup on AnnotationSpec Added explicit return tupe on SimpleTransformSpec#execute * Make explicit Util.error remove commented code * Make Annotation#serialize a nicer format fix import there and remove new on case class * In firrtl Driver.execute use annotations passed in through optionsManager#firrtlOptions if nonEmpty otherwise read the annotations in from an annotations file Add new option to override this behavior, --force-append-anno-file will append annotations in file to any that are passed in A few other style fixes to Driver: remove new with case classes. don't use match when if(boolean) will do * Added tests of malformed component and circuit names
Diffstat (limited to 'src/main/scala/firrtl/ExecutionOptionsManager.scala')
-rw-r--r--src/main/scala/firrtl/ExecutionOptionsManager.scala12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/ExecutionOptionsManager.scala b/src/main/scala/firrtl/ExecutionOptionsManager.scala
index 977ef9bb..ab900a36 100644
--- a/src/main/scala/firrtl/ExecutionOptionsManager.scala
+++ b/src/main/scala/firrtl/ExecutionOptionsManager.scala
@@ -143,10 +143,10 @@ case class FirrtlExecutionOptions(
firrtlSource: Option[String] = None,
customTransforms: Seq[Transform] = List.empty,
annotations: List[Annotation] = List.empty,
- annotationFileNameOverride: String = "")
+ annotationFileNameOverride: String = "",
+ forceAppendAnnoFile: Boolean = false)
extends ComposableOptions {
-
def infoMode: InfoMode = {
infoModeName match {
case "use" => UseInfo
@@ -237,6 +237,14 @@ trait HasFirrtlOptions {
"use this to override the default annotation file name, default is empty"
}
+ parser.opt[Unit]("force-append-anno-file")
+ .abbr("ffaaf")
+ .foreach { _ =>
+ firrtlOptions = firrtlOptions.copy(forceAppendAnnoFile = true)
+ }.text {
+ "use this to force appending annotation file to annotations being passed in through optionsManager"
+ }
+
parser.opt[String]("compiler")
.abbr("X")
.valueName ("<high|low|verilog>")