package stage
The stage package provides an implementation of the FIRRTL compiler using the firrtl.options package. This primarily consists of:
- FirrtlStage, the internal and external (command line) interface to the FIRRTL compiler
- A number of Phases that support and compartmentalize the individual operations of FirrtlStage
- FirrtlOptions, a class representing options that are necessary to drive the FirrtlStage and its Phases
- FirrtlOptionsView, a utility that constructs an OptionsView of FirrtlOptions from an AnnotationSeq
- FirrtlCli, the command line options that the FirrtlStage supports
- FirrtlStageUtils containing miscellaneous utilities for stage
- Source
- package.scala
- Alphabetic
- By Inheritance
- stage
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
sealed
trait
CircuitOption extends Unserializable
Indicates that this Annotation contains information that is directly convertable to a FIRRTL Circuit.
-
case class
CurrentFirrtlStateAnnotation(currentState: Seq[TransformDependency]) extends NoTargetAnnotation with FirrtlOption with Product with Serializable
Indicate to the FIRRTL compiler that specific transforms have already been run.
Indicate to the FIRRTL compiler that specific transforms have already been run.
The intended use of this is for advanced users who want to skip specific transforms in the FIRRTL compiler. It is far safer for users to use the command line options to the FIRRTL compiler via
--start-from =
- currentState
a sequence of transforms that have already been run on the circuit
-
case class
DisableFold(op: PrimOp) extends NoTargetAnnotation with FirrtlOption with Product with Serializable
Turn off folding a specific primitive operand
Turn off folding a specific primitive operand
- op
the op that should never be folded
-
case class
FirrtlCircuitAnnotation(circuit: Circuit) extends NoTargetAnnotation with FirrtlOption with Product with Serializable
Holds a FIRRTL Circuit
Holds a FIRRTL Circuit
- circuit
a circuit
-
trait
FirrtlCli extends AnyRef
Shell mixin that provides command line options for FIRRTL.
Shell mixin that provides command line options for FIRRTL. This does not include any RegisteredLibrary or RegisteredTransform as those are automatically loaded by the Stage using this Shell.
-
case class
FirrtlDirectoryAnnotation(dir: String) extends NoTargetAnnotation with CircuitOption with Product with Serializable
Read a directory of ProtoBufs
Read a directory of ProtoBufs
- set with
-I/--input-directory
TODO: Does not currently support FIRRTL files.
- dir
input directory name
- set with
-
case class
FirrtlFileAnnotation(file: String) extends NoTargetAnnotation with CircuitOption with Product with Serializable
An explicit input FIRRTL file to read
An explicit input FIRRTL file to read
- set with
-i/--input-file
- If unset, an FirrtlFileAnnotation with the default input file will not be generated
- file
input filename
- set with
-
sealed
trait
FirrtlOption extends Unserializable
Indicates that this is an Annotation directly used in the construction of a FirrtlOptions view.
-
class
FirrtlOptions extends AnyRef
Internal options used to control the FIRRTL compiler stage.
- class FirrtlPhase extends PhaseManager
-
case class
FirrtlSourceAnnotation(source: String) extends NoTargetAnnotation with CircuitOption with Product with Serializable
Holds a String containing FIRRTL source to read as input
Holds a String containing FIRRTL source to read as input
- set with
--firrtl-source
- set with
- class FirrtlStage extends Stage
-
case class
InfoModeAnnotation(modeName: String = "use") extends NoTargetAnnotation with FirrtlOption with Product with Serializable
Sets the info mode style
Sets the info mode style
- set with
--info-mode
- Note
This cannote be directly converted to Parser.InfoMode as that depends on an optional FirrtlFileAnnotation
- set with
-
case class
OutputFileAnnotation(file: String) extends NoTargetAnnotation with FirrtlOption with Product with Serializable
An explicit output file the emitter will write to
An explicit output file the emitter will write to
- set with
-o/--output-file
- file
output filename
- set with
-
case class
RunFirrtlTransformAnnotation(transform: Transform) extends NoTargetAnnotation with Product with Serializable
Holds the unambiguous class name of a Transform to run
Holds the unambiguous class name of a Transform to run
- set with
-fct/--custom-transforms
- transform
the full class name of the transform
- set with
-
class
TransformManager extends Transform with DependencyAPIMigration with DependencyManager[CircuitState, Transform]
A Transform that ensures some other Transforms and their prerequisites are executed.
-
case class
CompilerAnnotation(compiler: Compiler = new VerilogCompiler()) extends NoTargetAnnotation with FirrtlOption with Product with Serializable
helpValueName a Compiler that should be run
helpValueName a Compiler that should be run
- set stringly with
-X/--compiler
- If unset, a CompilerAnnotation with the default VerilogCompiler
- compiler
compiler name
- Annotations
- @deprecated
- Deprecated
(Since version FIRRTL 1.4.0) Use a RunFirrtlTransformAnnotation targeting a specific Emitter.
- set stringly with
Value Members
- object AllowUnrecognizedAnnotations extends NoTargetAnnotation with FirrtlOption with HasShellOptions with Product with Serializable
- object FirrtlDirectoryAnnotation extends HasShellOptions with Serializable
- object FirrtlFileAnnotation extends HasShellOptions with Serializable
- object FirrtlMain extends StageMain
- implicit object FirrtlOptionsView extends OptionsView[FirrtlOptions] with LazyLogging
- object FirrtlSourceAnnotation extends HasShellOptions with Serializable
-
object
FirrtlStageUtils
Utilities that help with processing FIRRTL options
- object Forms
- object InfoModeAnnotation extends HasShellOptions with Serializable
-
object
OptimizeForFPGA extends HasShellOptions
This flag enables a set of options that guide the FIRRTL compilation flow to ultimately generate Verilog that is more amenable to using for synthesized FPGA designs.
This flag enables a set of options that guide the FIRRTL compilation flow to ultimately generate Verilog that is more amenable to using for synthesized FPGA designs. Currently, this flag affects only memories, as the need to emit memories that support downstream inference of hardened RAM macros. These options are not intended to be specialized to any particular vendor; instead, they aim to emit simple Verilog that more closely reflects traditional human-written definitions of synchronous-read memories.
1) Enable the firrtl.passes.memlib.InferReadWrite transform to reduce port count, where applicable.
2) Use the firrtl.transforms.SimplifyMems transform to Lower aggregate-typed memories with always-high masks to packed memories without splitting them into multiple independent ground-typed memories.
3) Use the firrtl.passes.memlib.SeparateWriteClocks transform to ensure that each write port of a multiple-write, synchronous-read memory with 'undefined' collision behavior ultimately maps to a separate clocked process in the emitted Verilog. This avoids the issue of implicitly constraining cross-port collision and write ordering behavior and helps simplify inference of true dual-port RAM macros.
4) Use the firrtl.passes.memlib.SetDefaultReadUnderWrite to specify that memories with undefined read-under-write behavior should map to emitted microarchitectures characteristic of "read-first" ports by default. This eliminates the difficulty of inferring a RAM macro that matches the strict semantics of "write-first" ports.
5) Add a firrtl.passes.memlib.PassthroughSimpleSyncReadMemsAnnotation to allow some synchronous-read memories and readwrite ports to pass through firrtl.passes.memlib.VerilogMemDelays without introducing explicit pipeline registers or splitting ports.
6) Add a firrtl.annotations.MemorySynthInit to enable memory initialization values to be synthesized.
- object OutputFileAnnotation extends HasShellOptions with Serializable
-
object
PrettyNoExprInlining extends NoTargetAnnotation with FirrtlOption with HasShellOptions with Product with Serializable
Turn off all expression inlining
Turn off all expression inlining
- Note
this primarily applies to emitted Verilog
- object RunFirrtlTransformAnnotation extends HasShellOptions with Serializable
- object TransformManager
Deprecated Value Members
-
object
CompilerAnnotation extends HasShellOptions with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version FIRRTL 1.4.0) Use a RunFirrtlTransformAnnotation targeting a specific Emitter.
-
object
DisableFold extends HasShellOptions with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 1.4) will be removed and merged into ConstantPropagation in 1.5
-
object
WarnNoScalaVersionDeprecation extends NoTargetAnnotation with FirrtlOption with HasShellOptions with Product with Serializable
Suppresses warning about Scala 2.11 deprecation
Suppresses warning about Scala 2.11 deprecation
- set with
--warn:no-scala-version-deprecation
- Annotations
- @deprecated
- Deprecated
(Since version FIRRTL 1.5) Support for Scala 2.11 has been dropped, this object no longer does anything
- set with
This is the documentation for Firrtl.