We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5a5f66 commit bf120e8Copy full SHA for bf120e8
src/asic.rs
@@ -218,6 +218,8 @@ impl Analysis<CellLang> for CellAnalysis {
218
struct CircuitStats {
219
/// AST size of the circuit
220
ast_size: usize,
221
+ // The total cell count
222
+ cell_count: usize,
223
/// Number of cells in the circuit
224
cell_counts: BTreeMap<String, usize>,
225
/// The area of the circuit
@@ -253,9 +255,12 @@ impl CircuitStats {
253
255
}
254
256
257
fn new(expr: &RecExpr<CellLang>) -> Self {
258
+ let cell_counts = Self::get_cell_counts(expr);
259
+ let cell_count = cell_counts.values().sum();
260
Self {
261
ast_size: expr.len(),
- cell_counts: Self::get_cell_counts(expr),
262
+ cell_count,
263
+ cell_counts,
264
area: Self::get_area(expr),
265
266
0 commit comments