Run scalafmt after scala version update
This commit is contained in:
@@ -14,7 +14,7 @@ class ExtraLowTransforms extends Transform with DependencyAPIMigration {
|
|||||||
// this PropagatePresetAnnotations is needed to run the RemoveValidIf pass (that is removed from CIRCT).
|
// this PropagatePresetAnnotations is needed to run the RemoveValidIf pass (that is removed from CIRCT).
|
||||||
// additionally, since that pass isn't explicitly a prereq of the LowFormEmitter it
|
// additionally, since that pass isn't explicitly a prereq of the LowFormEmitter it
|
||||||
// needs to wrapped in this xform
|
// needs to wrapped in this xform
|
||||||
override def prerequisites: Seq[TransformDependency] = Forms.LowForm :+
|
override def prerequisites: Seq[TransformDependency] = Forms.LowForm :+
|
||||||
Dependency[firrtl.transforms.PropagatePresetAnnotations]
|
Dependency[firrtl.transforms.PropagatePresetAnnotations]
|
||||||
override def optionalPrerequisites: Seq[TransformDependency] = Forms.LowFormOptimized
|
override def optionalPrerequisites: Seq[TransformDependency] = Forms.LowFormOptimized
|
||||||
override def optionalPrerequisiteOf: Seq[TransformDependency] = Forms.LowEmitters
|
override def optionalPrerequisiteOf: Seq[TransformDependency] = Forms.LowEmitters
|
||||||
|
|||||||
@@ -36,13 +36,16 @@ private class GenerateModelStageMain(annotations: AnnotationSeq) extends LazyLog
|
|||||||
}
|
}
|
||||||
|
|
||||||
def executeStageMain(): Unit = {
|
def executeStageMain(): Unit = {
|
||||||
val appendedAnnotations = annotations.filter(_ match {
|
val appendedAnnotations = annotations
|
||||||
case CompilerNameAnnotation(_) => true
|
.filter(_ match {
|
||||||
case _ => false
|
case CompilerNameAnnotation(_) => true
|
||||||
}).map(_ match {
|
case _ => false
|
||||||
case CompilerNameAnnotation("low") => Some(RunFirrtlTransformAnnotation(Dependency[ExtraLowTransforms]))
|
})
|
||||||
case _ => None
|
.map(_ match {
|
||||||
}).flatten
|
case CompilerNameAnnotation("low") => Some(RunFirrtlTransformAnnotation(Dependency[ExtraLowTransforms]))
|
||||||
|
case _ => None
|
||||||
|
})
|
||||||
|
.flatten
|
||||||
val annos = new FirrtlStage().execute(Array.empty, annotations ++ appendedAnnotations)
|
val annos = new FirrtlStage().execute(Array.empty, annotations ++ appendedAnnotations)
|
||||||
|
|
||||||
annos.collectFirst { case FirrtlCircuitAnnotation(circuit) => circuit } match {
|
annos.collectFirst { case FirrtlCircuitAnnotation(circuit) => circuit } match {
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ object DuplicateCompilerAnnotation extends HasShellOptions {
|
|||||||
longOption = "duplicate-compiler",
|
longOption = "duplicate-compiler",
|
||||||
shortOption = Some("DX"),
|
shortOption = Some("DX"),
|
||||||
toAnnotationSeq = (s: String) => {
|
toAnnotationSeq = (s: String) => {
|
||||||
Seq(
|
Seq(CompilerNameAnnotation(s))
|
||||||
CompilerNameAnnotation(s))
|
|
||||||
},
|
},
|
||||||
helpText = "duplicate-compiler",
|
helpText = "duplicate-compiler",
|
||||||
helpValueName = Some("same as --compiler FIRRTL flag")
|
helpValueName = Some("same as --compiler FIRRTL flag")
|
||||||
|
|||||||
Reference in New Issue
Block a user