Stage

firrtl.options.Stage
abstract class Stage extends Phase

A Stage represents one stage in the FIRRTL hardware compiler framework. A Stage is, conceptually, a Phase that includes a command line interface.

The FIRRTL compiler is a stage as well as any frontend or backend that runs before/after FIRRTL. Concretely, Chisel is a Stage as is FIRRTL's Verilog emitter. Each stage performs a mathematical transformation on an AnnotationSeq where some input annotations are processed to produce different annotations. Command line options may be pulled in if available.

Attributes

Deprecated
[Since version Chisel 7.0.0] All APIs in package firrtl are deprecated.
Source
Stage.scala
Graph
Supertypes
trait Phase
trait LazyLogging
class Object
trait Matchable
class Any
Show all
Known subtypes
class ChiselStage

Members list

Value members

Abstract methods

protected def run(annotations: AnnotationSeq): AnnotationSeq

Run this stage on some input annotations

Run this stage on some input annotations

Value parameters

annotations

input annotations

Attributes

Returns

output annotations

Source
Stage.scala

Concrete methods

final def execute(args: Array[String], annotations: Seq[Annotation]): Seq[Annotation]

Run this stage on on a mix of arguments and annotations

Run this stage on on a mix of arguments and annotations

Value parameters

args

command line arguments

initialAnnotations

annotation

Attributes

Returns

output annotations

Throws
firrtl.options.OptionsException

if command line or annotation validation fails

Source
Stage.scala
final def transform(annotations: Seq[Annotation]): Seq[Annotation]

Execute this stage on some input annotations. Annotations will be read from any input annotation files.

Execute this stage on some input annotations. Annotations will be read from any input annotation files.

Value parameters

annotations

input annotations

Attributes

Returns

output annotations

Throws
firrtl.options.OptionsException

if command line or annotation validation fails

Source
Stage.scala

Deprecated methods

final def execute(args: Array[String], annotations: AnnotationSeq): AnnotationSeq

Run this stage on on a mix of arguments and annotations

Run this stage on on a mix of arguments and annotations

Value parameters

args

command line arguments

initialAnnotations

annotation

Attributes

Returns

output annotations

Throws
firrtl.options.OptionsException

if command line or annotation validation fails

Deprecated
[Since version Chisel 7.1.0] Use the form that taks Seq[Annotation]
Source
Stage.scala
final def transform(annotations: AnnotationSeq): AnnotationSeq

Execute this stage on some input annotations. Annotations will be read from any input annotation files.

Execute this stage on some input annotations. Annotations will be read from any input annotation files.

Value parameters

annotations

input annotations

Attributes

Returns

output annotations

Throws
firrtl.options.OptionsException

if command line or annotation validation fails

Deprecated
[Since version Chisel 7.1.0] Use the form that taks Seq[Annotation]
Source
Stage.scala

Inherited methods

Attributes

Inherited from:
LazyLogging
Source
Logger.scala
def invalidates(a: Phase): Boolean

A function that, given another transform (parameter a) will return true if this transform invalidates/undos the effects of the other transform (parameter a).

A function that, given another transform (parameter a) will return true if this transform invalidates/undos the effects of the other transform (parameter a).

Value parameters

a

transform

Attributes

Inherited from:
DependencyAPI
Source
Phase.scala

A sequence of transforms to add this transform as an optionalPrerequisite. The use of optionalPrerequisiteOf enables the transform declaring them to always run before some other transforms. However, declaring optionalPrerequisiteOf will not result in the sequence of transforms executing.

A sequence of transforms to add this transform as an optionalPrerequisite. The use of optionalPrerequisiteOf enables the transform declaring them to always run before some other transforms. However, declaring optionalPrerequisiteOf will not result in the sequence of transforms executing.

This is useful for providing an ordering constraint to guarantee that other transforms (e.g., emitters) will not be scheduled before you.

Attributes

Note

This method will not result in the listed transforms running. If you want to add multiple transforms at once, you should use a DependencyManager with multiple targets.

Inherited from:
DependencyAPI
Source
Phase.scala

All transforms that, if a prerequisite of another transform, will run before this transform.

All transforms that, if a prerequisite of another transform, will run before this transform.

Attributes

Note

The use of a Seq here is to preserve input order. Internally, this will be converted to a private, ordered Set.

Inherited from:
DependencyAPI
Source
Phase.scala

All transform that must run before this transform

All transform that must run before this transform

Attributes

Note

The use of a Seq here is to preserve input order. Internally, this will be converted to a private, ordered Set.

Inherited from:
DependencyAPI
Source
Phase.scala

Abstract fields

val shell: Shell

A utility that helps convert command line options to annotations

A utility that helps convert command line options to annotations

Attributes

Source
Stage.scala

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
LazyLogging
Source
Logger.scala
lazy val name: String

The name of this Phase. This will be used to generate debug/error messages or when deleting annotations. This will default to the simpleName of the class.

The name of this Phase. This will be used to generate debug/error messages or when deleting annotations. This will default to the simpleName of the class.

Attributes

Returns

this phase's name

Note

Override this with your own implementation for different naming behavior.

Inherited from:
Phase
Source
Phase.scala