Perform the transform, encode renaming with RenameMap, and can delete annotations Called by runTransform.
Perform the transform, encode renaming with RenameMap, and can delete annotations Called by runTransform.
Input Firrtl AST
A transformed Firrtl AST
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
The CircuitForm that this transform requires to operate on
The CircuitForm that this transform requires to operate on
A convenience function useful for debugging and error messages
A convenience function useful for debugging and error messages
The CircuitForm that this transform outputs
The CircuitForm that this transform outputs
Perform the transform and update annotations.
Perform the transform and update annotations.
Input Firrtl AST
A transformed Firrtl AST
AnalyzeCircuit Transform
Walks ir.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: