Reading a Yosys Stats Report
Section 2.4 evaluated timing performance on the synthesized design. Section 2.5 examines synthesis output reports, beginning with structural netlist metrics.
Every synthesis run quotes cell counts and estimated gate area.
The Yosys stat command produces these statistics automatically at the end of the synthesis flow.
This command prints a complete structural summary of the mapped gate-level netlist.
Complete Report for alu8 with Area Strategy
The stat command generates the following report for the AREA 0 run of alu8:
=== alu8 ===
Number of wires: 212
Number of wire bits: 612
Number of public wires: 27
Number of public wire bits: 187
Number of memories: 0
Number of memory bits: 0
Number of processes: 0
Number of cells: 146
sky130_fd_sc_hd__a21oi_1 9
sky130_fd_sc_hd__and2_1 7
sky130_fd_sc_hd__buf_1 5
sky130_fd_sc_hd__clkinv_1 1
sky130_fd_sc_hd__conb_1 2
sky130_fd_sc_hd__dfxtp_1 10
sky130_fd_sc_hd__fa_1 8
sky130_fd_sc_hd__inv_1 11
sky130_fd_sc_hd__mux2_1 34
sky130_fd_sc_hd__nand2_1 15
sky130_fd_sc_hd__nor2_1 10
sky130_fd_sc_hd__o21ai_1 12
sky130_fd_sc_hd__xnor2_1 9
sky130_fd_sc_hd__xor2_1 13
Chip area for module '\alu8': 1512.67
Section-by-Section Analysis
The wire section lists internal and interface connections.
The metric Number of wires: 212 counts every internal net tracked by Yosys, including generated intermediate signals.
The metric Number of public wires: 27 counts ports and declared RTL signals.
You can use the public wire count to cross-check declared Verilog nets.
The cell breakdown maps directly back to RTL statements:
| Cell type | Count | Likely RTL origin |
|---|---|---|
dfxtp_1 (D flip-flop) |
10 | result[7:0] (8) + zero (1) + carry_out (1) |
fa_1 (full adder) |
8 | The a + b and a - b arithmetic in the case |
mux2_1 (2:1 mux) |
34 | The 8-way case (op) selecting between operations, per bit |
xor2_1, xnor2_1 |
13, 9 | The XOR operation, plus XOR/XNOR inside comparator and subtractor logic |
and2_1, nand2_1, nor2_1 |
7, 15, 10 | The AND and OR operations and general restructuring |
a21oi_1, o21ai_1 |
9, 12 | Compound AND-OR-invert cells ABC folded multi-gate logic into, per Section 2.1 |
buf_1 |
5 | Fanout buffering where a signal drives enough load to need it |
conb_1 |
2 | Constant 0 and 1 drivers, typically from tied-off or unused bits |
The report lists ten D flip-flops (dfxtp_1).
This count matches the ten registered output bits declared in the RTL (result[7:0], zero, and carry_out).
Always verify that the flip-flop count matches your intended register count.
An unexpected flip-flop count indicates unintended latches, missing registers, or dead-code elimination.
The report also lists total cell count and chip area: 146 cells and 1512.67 square microns.
The area metric sums the area attribute of all mapped cells from the Liberty library.
Do not evaluate cell counts or area in isolation.
Always balance total area against timing slack and target operating frequency.
Practice Exercise
A rerun of alu8 reports 146 total cells but only 9 instances of dfxtp_1.
Identify the first debug step.
Explain why a missing sequential cell is more critical than a change in combinational gate counts.
Solution
Compare the synthesized register names against the previous netlist to find the missing register. Inspect recent RTL edits in the clock or reset logic. Combinational cell counts can vary legitimately based on synthesis optimization choices. However, a missing flip-flop indicates loss of intended state, incorrect constant propagation, or unintended latch formation. These issues represent functional design bugs.
The next article walks through an OpenSTA pre-placement timing report in detail.