Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Add test for Rtlil Backend, fix per-module file emission, scalafmt, a…
Browse files Browse the repository at this point in the history
…nd apply bugfixes for inconsistencies found during testing.
  • Loading branch information
nxmq committed Aug 19, 2021
1 parent c6f068f commit 8fb1b4f
Show file tree
Hide file tree
Showing 6 changed files with 457 additions and 323 deletions.
13 changes: 6 additions & 7 deletions src/main/scala/firrtl/Emitter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ object EmitCircuitAnnotation extends HasShellOptions {
Seq(RunFirrtlTransformAnnotation(Dependency(Btor2Emitter)), EmitCircuitAnnotation(Btor2Emitter.getClass))
case "experimental-smt2" | "smt2" =>
Seq(RunFirrtlTransformAnnotation(Dependency(SMTLibEmitter)), EmitCircuitAnnotation(SMTLibEmitter.getClass))
case "experimental-rtlil" | "rtlil" =>
Seq(RunFirrtlTransformAnnotation(Dependency(RtlilEmitter)), EmitCircuitAnnotation(RtlilEmitter.getClass))
case "experimental-rtlil" =>
Seq(RunFirrtlTransformAnnotation(Dependency[RtlilEmitter]), EmitCircuitAnnotation(classOf[RtlilEmitter]))
case _ => throw new PhaseException(s"Unknown emitter '$a'! (Did you misspell it?)")
},
helpText = "Run the specified circuit emitter (all modules in one file)",
Expand Down Expand Up @@ -149,8 +149,8 @@ object EmitAllModulesAnnotation extends HasShellOptions {
RunFirrtlTransformAnnotation(new SystemVerilogEmitter),
EmitAllModulesAnnotation(classOf[SystemVerilogEmitter])
)
case "experimental-rtlil" | "rtlil" =>
Seq(RunFirrtlTransformAnnotation(Dependency(RtlilEmitter)), EmitCircuitAnnotation(RtlilEmitter.getClass))
case "experimental-rtlil" =>
Seq(RunFirrtlTransformAnnotation(Dependency[RtlilEmitter]), EmitAllModulesAnnotation(classOf[RtlilEmitter]))
case _ => throw new PhaseException(s"Unknown emitter '$a'! (Did you misspell it?)")
},
helpText = "Run the specified module emitter (one file per module)",
Expand Down Expand Up @@ -214,6 +214,5 @@ case class EmittedVerilogModuleAnnotation(value: EmittedVerilogModule)
final case class EmittedRtlilCircuit(name: String, value: String, outputSuffix: String) extends EmittedCircuit
final case class EmittedRtlilModule(name: String, value: String, outputSuffix: String) extends EmittedModule
case class EmittedRtlilCircuitAnnotation(value: EmittedRtlilCircuit)
extends EmittedCircuitAnnotation[EmittedRtlilCircuit]
case class EmittedRtlilModuleAnnotation(value: EmittedRtlilModule)
extends EmittedModuleAnnotation[EmittedRtlilModule]
extends EmittedCircuitAnnotation[EmittedRtlilCircuit]
case class EmittedRtlilModuleAnnotation(value: EmittedRtlilModule) extends EmittedModuleAnnotation[EmittedRtlilModule]
Loading

0 comments on commit 8fb1b4f

Please sign in to comment.