diff options
| author | Jack Koenig | 2021-11-29 16:02:04 -0800 |
|---|---|---|
| committer | GitHub | 2021-11-29 16:02:04 -0800 |
| commit | 40192433e96ffe91928fa140d32f99562f95e7cf (patch) | |
| tree | 621e332b61e9774b27a7793e9a90a0f422863e28 /src/main/scala/chisel3 | |
| parent | 989753267745bf01211e3de36517e79a6d0cf3e3 (diff) | |
Remove ChiselExecutionOptions and HasChiselExecutionOptions (#2267)
These were not actually deprecated but any APIs using them were long
since deprecated and more recently removed.
They also depend on long deprecated APIs in FIRRTL that will soon be
removed.
Diffstat (limited to 'src/main/scala/chisel3')
| -rw-r--r-- | src/main/scala/chisel3/ChiselExecutionOptions.scala | 49 | ||||
| -rw-r--r-- | src/main/scala/chisel3/stage/phases/DriverCompatibility.scala | 16 |
2 files changed, 5 insertions, 60 deletions
diff --git a/src/main/scala/chisel3/ChiselExecutionOptions.scala b/src/main/scala/chisel3/ChiselExecutionOptions.scala deleted file mode 100644 index 9f635b19..00000000 --- a/src/main/scala/chisel3/ChiselExecutionOptions.scala +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -package chisel3 - -import chisel3.stage.{NoRunFirrtlCompilerAnnotation, PrintFullStackTraceAnnotation} - -import firrtl.{AnnotationSeq, ExecutionOptionsManager, ComposableOptions} - -//TODO: provide support for running firrtl as separate process, could alternatively be controlled by external driver -//TODO: provide option for not saving chirrtl file, instead calling firrtl with in memory chirrtl -/** - * Options that are specific to chisel. - * - * @param runFirrtlCompiler when true just run chisel, when false run chisel then compile its output with firrtl - * @note this extends FirrtlExecutionOptions which extends CommonOptions providing easy access to down chain options - */ -case class ChiselExecutionOptions( - runFirrtlCompiler: Boolean = true, - printFullStackTrace: Boolean = false - // var runFirrtlAsProcess: Boolean = false - ) extends ComposableOptions { - - def toAnnotations: AnnotationSeq = - (if (!runFirrtlCompiler) { Seq(NoRunFirrtlCompilerAnnotation) } else { Seq() }) ++ - (if (printFullStackTrace) { Some(PrintFullStackTraceAnnotation) } else { None }) - -} - -trait HasChiselExecutionOptions { - self: ExecutionOptionsManager => - - var chiselOptions = ChiselExecutionOptions() - - parser.note("chisel3 options") - - parser.opt[Unit]("no-run-firrtl") - .abbr("chnrf") - .foreach { _ => - chiselOptions = chiselOptions.copy(runFirrtlCompiler = false) - } - .text("Stop after chisel emits chirrtl file") - - parser.opt[Unit]("full-stacktrace") - .foreach { _ => - chiselOptions = chiselOptions.copy(printFullStackTrace = true) - } - .text("Do not trim stack trace") -} - diff --git a/src/main/scala/chisel3/stage/phases/DriverCompatibility.scala b/src/main/scala/chisel3/stage/phases/DriverCompatibility.scala index 9305c5c9..847b7179 100644 --- a/src/main/scala/chisel3/stage/phases/DriverCompatibility.scala +++ b/src/main/scala/chisel3/stage/phases/DriverCompatibility.scala @@ -2,19 +2,13 @@ package chisel3.stage.phases -import firrtl.{AnnotationSeq, ExecutionOptionsManager, HasFirrtlOptions} -import firrtl.annotations.NoTargetAnnotation -import firrtl.options.{Dependency, OptionsException, OutputAnnotationFileAnnotation, Phase, Unserializable} -import firrtl.stage.{FirrtlCircuitAnnotation, RunFirrtlTransformAnnotation} -import firrtl.stage.phases.DriverCompatibility.TopNameAnnotation +import firrtl.annotations.Annotation +import firrtl.options.Phase -import chisel3.HasChiselExecutionOptions -import chisel3.stage.{ChiselStage, NoRunFirrtlCompilerAnnotation, ChiselOutputFileAnnotation} - -/** This provides components of a compatibility wrapper around Chisel's deprecated [[chisel3.Driver]]. +/** This formerly provided components of a compatibility wrapper around Chisel's removed `chisel3.Driver`. * - * Primarily, this object includes [[firrtl.options.Phase Phase]]s that generate [[firrtl.annotations.Annotation]]s - * derived from the deprecated [[firrtl.stage.phases.DriverCompatibility.TopNameAnnotation]]. + * This object formerly included [[firrtl.options.Phase Phase]]s that generate [[firrtl.annotations.Annotation]]s + * derived from the deprecated `firrtl.stage.phases.DriverCompatibility.TopNameAnnotation`. */ @deprecated("This object contains no public members. This will be removed in Chisel 3.6.", "Chisel 3.5") object DriverCompatibility |
