Called by Compiler to run your pass.
Called by Compiler to run your pass. CircuitState contains the circuit and its form, as well as other related data.
Input Firrtl AST
A transformed Firrtl AST
Requires the Circuit form to be "low"
Requires the Circuit form to be "low"
A convenience function useful for debugging and error messages
A convenience function useful for debugging and error messages
Indicates the output Circuit form to be "low"
Indicates the output Circuit form to be "low"
Perform the transform and update annotations.
Perform the transform and update annotations.
Input Firrtl AST
A transformed Firrtl AST
A mathematical transform on some type
A mathematical transform on some type
an output object of the same type
Deeply visits every Expression in e.
Deeply visits every Expression in e.
Deeply visits every Statement in m.
Deeply visits every Statement and Expression in s.
(Since version ) see corresponding Javadoc for more information.
Convenience method to get annotations relevant to this Transform
Convenience method to get annotations relevant to this Transform
The CircuitState form which to extract annotations
A collection of annotations
(Since version 1.1) Just collect the actual Annotation types the transform wants
AnalyzeCircuit Transform
Walks Circuit, and records the number of muxes it finds, per module.
While some compiler frameworks operate on graphs, we represent a Firrtl circuit using a tree representation:
To visit all Firrtl IR nodes in a circuit, we write functions that recursively walk down this tree. To record statistics, we will pass along the Ledger class and use it when we come across a Mux.
See the following links for more detailed explanations: Firrtl's IR: