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

Commit

Permalink
Fix legacy support for ExecutionOptions (#195)
Browse files Browse the repository at this point in the history
CompilerAnnotation has been deprecated and is now rarely used in FIRRTL,
replaced with RunFirrtlTransformAnnotation of an Emitter. The
(deprecated) support for ExecutionOptions now handles this change.
  • Loading branch information
jackkoenig authored Sep 18, 2020
1 parent 4c8bed6 commit 2ebf008
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import chiseltest._
import chiseltest.internal.{TreadleBackendAnnotation, VerilatorBackendAnnotation}
import chisel3._
import treadle.HasTreadleSuite
import firrtl.stage.CompilerAnnotation
import firrtl.stage.{CompilerAnnotation, RunFirrtlTransformAnnotation}
import firrtl.{
AnnotationSeq, ExecutionOptionsManager, LowFirrtlCompiler, MinimumVerilogCompiler,
NoneCompiler, SystemVerilogCompiler, VerilogCompiler}
AnnotationSeq, ExecutionOptionsManager, FirrtlEmitter, LowFirrtlCompiler, MinimumVerilogCompiler,
NoneCompiler, SystemVerilogCompiler, VerilogCompiler, VerilogEmitter}

package object TestOptionBuilder {
implicit class ChiselScalatestOptionBuilder[T <: MultiIOModule](x: ChiselScalatestTester#TestBuilder[T]) {
Expand All @@ -29,6 +29,8 @@ package object TestOptionBuilder {
case CompilerAnnotation(compiler) if compiler.isInstanceOf[VerilogCompiler] => VerilatorBackendAnnotation
case CompilerAnnotation(compiler) if compiler.isInstanceOf[MinimumVerilogCompiler] => VerilatorBackendAnnotation
case CompilerAnnotation(compiler) if compiler.isInstanceOf[SystemVerilogCompiler] => VerilatorBackendAnnotation
case RunFirrtlTransformAnnotation(_: FirrtlEmitter) => TreadleBackendAnnotation
case RunFirrtlTransformAnnotation(_: VerilogEmitter) => VerilatorBackendAnnotation
case anno => anno
}

Expand Down

0 comments on commit 2ebf008

Please sign in to comment.