AnalyzeCircuit Transform
Ledger tracks firrtl.ir.Circuit statistics
Ledger tracks firrtl.ir.Circuit statistics
In this lesson, we want to count the number of muxes in each module in our design.
This Ledger class will be passed along as we walk our circuit, and help us count each Mux we find.
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: