PhaseManager

firrtl.options.PhaseManager
See thePhaseManager companion object
class PhaseManager(val targets: Seq[PhaseDependency], val currentState: Seq[PhaseDependency] = ..., val knownObjects: Set[Phase] = ...) extends DependencyManager[AnnotationSeq, Phase], Phase

A Phase that will ensure that some other Phases and their prerequisites are executed.

This tries to determine a phase ordering such that an AnnotationSeq ''output'' is produced that has had all of the requested Phase target transforms run without having them be invalidated.

Value parameters

targets

the Phases you want to run

Attributes

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

Members list

Value members

Inherited methods

def customPrintHandling(tab: String, charSet: CharSet, size: Int): Option[PartialFunction[(Phase, Int), Seq[String]]]

A method that can be overridden to define custom print handling. This is useful if you would like to make some transform print additional information.

A method that can be overridden to define custom print handling. This is useful if you would like to make some transform print additional information.

Value parameters

charSet

the character set in use

size

the number of nodes at the current level of the tree

tab

the current tab setting

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala

Convert all prerequisites, optionalPrerequisites, optionalPrerequisiteOf, and invalidates to a Graphviz representation.

Convert all prerequisites, optionalPrerequisites, optionalPrerequisiteOf, and invalidates to a Graphviz representation.

Value parameters

file

the name of the output file

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala

Attributes

Inherited from:
LazyLogging
Source
Logger.scala
override 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

Definition Classes
Inherited from:
DependencyManager
Source
DependencyManager.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.

Definition Classes
Inherited from:
DependencyManager
Source
DependencyManager.scala
override def optionalPrerequisites: Seq[Dependency[Phase]]

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.

Definition Classes
Inherited from:
DependencyManager
Source
DependencyManager.scala
override def prerequisites: Seq[Dependency[Phase]]

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.

Definition Classes
Inherited from:
DependencyManager
Source
DependencyManager.scala
def prettyPrint(tab: String = ..., charSet: CharSet = ...): String

Textually show the determined transform order

Textually show the determined transform order

Value parameters

charSet

a collection of characters to use when printing

tab

an indentation string to use for every line of output

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala
def prettyPrintRec(tab: String, charSet: CharSet): Seq[String]

Helper utility when recursing during pretty printing

Helper utility when recursing during pretty printing

Value parameters

charSet

a collection of characters to use when printing

preprocess

a partial function that will be used before any other printing logic

tab

an indentation string to use for every line of output

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala
final override def transform(annotations: AnnotationSeq): AnnotationSeq

A mathematical transform on some type

A mathematical transform on some type

Value parameters

a

an input object

Attributes

Returns

an output object of the same type

Definition Classes
Inherited from:
DependencyManager
Source
DependencyManager.scala
def transformOrderToGraphviz(colormap: Seq[String] = ...): String

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala
def wrappers: Seq[Phase => Phase]

A sequence of wrappers to apply to the resulting TransformLike sequence. This can be used to, e.g., add automated pre-processing and post-processing.

A sequence of wrappers to apply to the resulting TransformLike sequence. This can be used to, e.g., add automated pre-processing and post-processing.

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala

Concrete fields

A sequence of TransformLikes that have been run. Internally, this will be converted to an ordered set.

A sequence of TransformLikes that have been run. Internally, this will be converted to an ordered set.

Attributes

Source
DependencyManager.scala
val knownObjects: Set[Phase]

Existing transform objects that have already been constructed

Existing transform objects that have already been constructed

Attributes

Source
DependencyManager.scala

Requested TransformLikes that should be run. Internally, this will be converted to a set based on the ordering defined here.

Requested TransformLikes that should be run. Internally, this will be converted to a set based on the ordering defined here.

Attributes

Source
DependencyManager.scala

Inherited fields

protected val colormap: Seq[String]

This colormap uses Colorbrewer's 4-class OrRd color scheme

This colormap uses Colorbrewer's 4-class OrRd color scheme

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala

A directed graph consisting of all prerequisites, including prerequisites derived from optionalPrerequisites and optionalPrerequisiteOf

A directed graph consisting of all prerequisites, including prerequisites derived from optionalPrerequisites and optionalPrerequisiteOf

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala
lazy protected val dependencyToObject: LinkedHashMap[Dependency[Phase], Phase]

Store of conversions between classes and objects. Objects that do not exist in the map will be lazily constructed.

Store of conversions between classes and objects. Objects that do not exist in the map will be lazily constructed.

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala

A version of the transformOrder that flattens the transforms of any internal DependencyManagers.

A version of the transformOrder that flattens the transforms of any internal DependencyManagers.

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala

A directed graph consisting of invalidation edges

A directed graph consisting of invalidation edges

Attributes

Inherited from:
DependencyManager
Source
DependencyManager.scala
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
lazy val transformOrder: Seq[Phase]

An ordering of TransformLikes that causes the requested firrtl.options.DependencyManager.targets targets to be executed starting from the currentState. This ordering respects prerequisites, optionalPrerequisites, optionalPrerequisiteOf, and invalidates of all constituent TransformLikes. This uses an algorithm that attempts to reduce the number of re-lowerings due to invalidations. Re-lowerings are implemented as new firrtl.options.DependencyManagers.

An ordering of TransformLikes that causes the requested firrtl.options.DependencyManager.targets targets to be executed starting from the currentState. This ordering respects prerequisites, optionalPrerequisites, optionalPrerequisiteOf, and invalidates of all constituent TransformLikes. This uses an algorithm that attempts to reduce the number of re-lowerings due to invalidations. Re-lowerings are implemented as new firrtl.options.DependencyManagers.

Attributes

Throws
firrtl.options.DependencyManagerException

if a cycle exists in either the firrtl.options.DependencyManager.dependencyGraph dependencyGraph or the invalidateGraph.

Inherited from:
DependencyManager
Source
DependencyManager.scala