From Numbers to Insights: Reading What Synthesis Tells You
Synthesis turns RTL into a netlist of library cells, and the tool reports a lot about the result: how many cells it used, which ones, how much area they take, and, through a timing tool, how fast the result is. Reading those reports is how you check that the netlist is what you meant, spot problems early, and compare one way of synthesizing against another.
Every report in this article comes from a real run of Yosys 0.63 and OpenSTA with the SkyWater 130 high-density library (sky130_fd_sc_hd). Two small designs are used throughout: an 8-bit counter with an enable and an asynchronous reset, and an 8-by-8 multiplier with registered inputs and a registered 16-bit product.
Gate Count and Area Reports: The stat Command
Running stat
stat counts what is in the design. With -liberty it also adds up cell areas from the library. This script maps the counter and prints its statistics:
read_verilog counter.v
synth -top counter
dfflibmap -liberty sky130_fd_sc_hd__tt_025C_1v80.lib
abc -liberty sky130_fd_sc_hd__tt_025C_1v80.lib
opt_clean -purge
stat -liberty sky130_fd_sc_hd__tt_025C_1v80.lib
Output:
=== counter ===
+----------Local Count, excluding submodules.
| +-Local Area, excluding submodules.
| |
19 - wires
26 - wire bits
4 - public wires
11 - public wire bits
4 - ports
11 - port bits
23 304.042 cells
1 5.005 sky130_fd_sc_hd__a21oi_1
1 6.256 sky130_fd_sc_hd__a31oi_1
1 8.758 sky130_fd_sc_hd__and4_1
8 200.192 sky130_fd_sc_hd__dfrtp_1
2 12.512 sky130_fd_sc_hd__lpflow_isobufsrc_1
1 3.754 sky130_fd_sc_hd__nand2_1
1 5.005 sky130_fd_sc_hd__nand3_1
1 6.256 sky130_fd_sc_hd__nand4_1
1 3.754 sky130_fd_sc_hd__nor2_1
3 26.275 sky130_fd_sc_hd__xnor2_1
3 26.275 sky130_fd_sc_hd__xor2_1
Chip area for module '\counter': 304.041600
of which used for sequential elements: 200.192000 (65.84%)
Reading the Wire and Port Counts
A wire is any net in the module, and wire bits counts each bit separately: the 8-bit count bus is one wire but eight wire bits. Public wires are the ones with names from your RTL, here the four ports clk, rst_n, en and count, which together are 11 bits. The other wires are internal nets that synthesis created and named itself.
Reading the Cell Breakdown
The counter maps to 23 cells. Eight of them are dfrtp_1, a D flip-flop with an active-low asynchronous reset, which matches the eight bits of count. The rest is the increment and enable logic: XOR and XNOR gates for the sum bits and a few AND/NAND/NOR and AND-OR-INVERT cells for the carries. The suffix after the name is the drive strength: _1 is the smallest.
The first check is always the register count: it should match the registers you wrote. A missing flip-flop usually means logic was optimized away because nothing used it; an extra one, or a latch cell, points to an RTL mistake.
Two cells may look odd: lpflow_isobufsrc_1 is an isolation buffer meant for power-gated designs, but its function (an AND with one inverted input) fits the logic, so ABC used it. Production flows usually mark such cells dont_use so the mapper leaves them alone.
Area
Each cell has an area attribute in the Liberty file, in square micrometres for SkyWater 130, and stat -liberty sums them: 304.04 µm² for the counter. The last line splits out the flip-flops: 200.19 µm², or 65.84% of the area. A small counter is mostly registers, because one flip-flop is far larger than a simple gate.
The multiplier shows the opposite. Its statistics report 288 cells and 2606.25 µm², of which only 24.58% is the 32 flip-flops. The six most used cells are:
54 202.694 sky130_fd_sc_hd__nand2_1
36 315.302 sky130_fd_sc_hd__xnor2_1
32 640.614 sky130_fd_sc_hd__dfxtp_1
28 245.235 sky130_fd_sc_hd__xor2_1
25 250.240 sky130_fd_sc_hd__maj3_1
15 56.304 sky130_fd_sc_hd__nor2_1
XOR, XNOR and majority (maj3) cells are the building blocks of adders, so a list like this tells you at a glance that the design is arithmetic. The area is the sum of real cell areas, but it is not the final chip area: placement adds spacing, filler cells and the clock tree later.
Comparing Different Mappings
The abc command does the technology mapping, and its options change the result. These are four runs of the multiplier on the same library, each timed afterwards with OpenSTA at a 5 ns clock:
| Mapping command | Cells | Area (µm²) | Setup slack at 5 ns |
|---|---|---|---|
abc -liberty ... (default) | 288 | 2606.25 | 1.04 ns |
abc -D 1500 -liberty ... | 288 | 2606.25 | 1.04 ns |
abc -fast -liberty ... | 549 | 3508.36 | 1.55 ns |
area-oriented script (&nf -a) | 302 | 2745.13 | 1.53 ns |
Three results stand out. First, the delay target -D changed nothing: the same netlist came out for targets from 300 ps to 20,000 ps, because ABC's mapper already maps for minimum delay by its own estimate and a target only lets it recover area when it has room to spare. Second, the default mapping is the smallest. Third, the two alternatives are larger but faster when OpenSTA times them: abc -fast uses 35% more area for about half a nanosecond of extra slack.
The reason is that ABC estimates delay with a simple model of each cell that ignores most of the load on each net, while OpenSTA uses the full Liberty tables with real loads. The lesson is general: judge a mapping by the timing tool's numbers, not by the synthesis tool's own delay goal, and expect area and speed to trade against each other.
Critical Path Identification
Why Yosys Is Not Enough
Yosys has no sign-off timing analysis. To find the critical path, write the netlist with write_verilog -noattr and time it in a static timing analysis tool such as OpenSTA, with a clock defined:
read_liberty sky130_fd_sc_hd__tt_025C_1v80.lib
read_verilog mult8_netlist.v
link_design mult8
create_clock -name clk -period 5 [get_ports clk]
set_input_delay 0 -clock clk [delete_from_list [all_inputs] [get_ports clk]]
set_output_delay 0 -clock clk [all_outputs]
report_checks -path_delay max -format full
For readability, the flip-flop instances in this netlist were renamed after the signal they drive (a_r_1_reg holds bit 1 of the registered input a); the logic is unchanged. The worst setup path:
Startpoint: a_r_1_reg (rising edge-triggered flip-flop clocked by clk)
Endpoint: p_14_reg (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
Delay Time Description
---------------------------------------------------------
0.00 0.00 clock clk (rise edge)
0.00 0.00 clock network delay (ideal)
0.00 0.00 ^ a_r_1_reg/CLK (sky130_fd_sc_hd__dfxtp_1)
0.46 0.46 ^ a_r_1_reg/Q (sky130_fd_sc_hd__dfxtp_1)
0.21 0.67 v _248_/Y (sky130_fd_sc_hd__nand4_1)
0.28 0.95 v _283_/X (sky130_fd_sc_hd__a22o_1)
0.18 1.14 v _288_/X (sky130_fd_sc_hd__and3_1)
0.41 1.55 ^ _294_/Y (sky130_fd_sc_hd__nor4b_1)
0.22 1.77 v _295_/Y (sky130_fd_sc_hd__o21ai_0)
0.41 2.17 v _322_/X (sky130_fd_sc_hd__maj3_1)
0.25 2.43 ^ _324_/Y (sky130_fd_sc_hd__o21ai_0)
0.13 2.55 v _470_/Y (sky130_fd_sc_hd__a21oi_1)
0.24 2.80 ^ _471_/Y (sky130_fd_sc_hd__o21ai_0)
0.14 2.94 v _473_/Y (sky130_fd_sc_hd__a21oi_1)
0.20 3.14 ^ _475_/Y (sky130_fd_sc_hd__o211ai_1)
0.14 3.28 v _477_/Y (sky130_fd_sc_hd__a31oi_1)
0.39 3.67 v _479_/X (sky130_fd_sc_hd__maj3_1)
0.16 3.83 v _488_/X (sky130_fd_sc_hd__xor2_1)
0.00 3.83 v p_14_reg/D (sky130_fd_sc_hd__dfxtp_1)
3.83 data arrival time
5.00 5.00 clock clk (rise edge)
0.00 5.00 clock network delay (ideal)
0.00 5.00 clock reconvergence pessimism
5.00 ^ p_14_reg/CLK (sky130_fd_sc_hd__dfxtp_1)
-0.13 4.87 library setup time
4.87 data required time
---------------------------------------------------------
4.87 data required time
-3.83 data arrival time
---------------------------------------------------------
1.04 slack (MET)
Reading the Path
The path starts at the clock edge on a_r_1_reg, which takes 0.46 ns to update its output. The data then passes through 14 logic cells, a chain of partial-product, carry and majority gates, and reaches p_14_reg at 3.83 ns. The capturing flip-flop needs it 0.13 ns before the next edge, so the data is required by 4.87 ns and the slack is 1.04 ns. Paths through multipliers and adders are the usual critical paths: each bit of the result waits for the carries from the bits below it.
If this path failed, the options are to relax the clock, pipeline the multiplier into two stages, or let synthesis use faster structures, and then check timing again.
Netlist Visualization: The show Command
show draws the netlist as a graph with Graphviz: cells as boxes, nets as lines. show -format svg -prefix counter writes counter.svg instead of opening a viewer, and show counter limits the drawing to one module. To highlight a cell type, select it first, for example select t:sky130_fd_sc_hd__dfrtp_1.
A drawing is most useful for small blocks and for debugging a specific structure: a signal that unexpectedly feeds back to itself, a long chain of gates, or one net driving a very large number of inputs. For a design of a few hundred cells, the statistics and the timing report are easier to work with than a picture.
Understanding the Synthesized Netlist
Cell Instances
The written netlist is ordinary structural Verilog: wires, and one instance per cell. This is one flip-flop and one gate from the counter:
sky130_fd_sc_hd__dfrtp_1 count_0_reg (
.CLK(clk),
.D(_06_),
.Q(count[0]),
.RESET_B(rst_n)
);
sky130_fd_sc_hd__xor2_1 _24_ (
.A(count[3]),
.B(_09_),
.X(_03_)
);
The flip-flop's pins are named as in the library: CLK, D, Q and RESET_B, the active-low reset. Nets that synthesis created get names such as _06_. Names from your RTL survive on ports and on nets that were not optimized away; a net you need to keep for debugging can be marked with (* keep *) in the RTL.
Tracing Through the Netlist
To follow a signal, start at a port or flip-flop output, find the cells whose inputs use that net, and repeat until you reach a flip-flop input or an output port. The timing report above is exactly such a trace, done by the tool for the slowest path.
Comparing Results Across Corners
A library comes in several Liberty files, one per process, voltage and temperature corner. Synthesizing the multiplier against the slow (ss_100C_1v60), typical (tt_025C_1v80) and fast (ff_n40C_1v95) libraries gave the same netlist each time: the same 288 cells and 2606.25 µm². The cells and their areas do not change between corners; their delays do. Timing the netlist at each corner with a 5 ns clock shows how much:
| Corner | Worst setup slack |
|---|---|
| Slow (ss, 100 °C, 1.60 V) | -3.25 ns |
| Typical (tt, 25 °C, 1.80 V) | 1.04 ns |
| Fast (ff, -40 °C, 1.95 V) | 2.66 ns |
The design meets 5 ns at the typical and fast corners and misses it by more than 3 ns at the slow corner. A chip has to work at every corner it is specified for, so this result means either a slower clock or a faster design. The fast corner is where hold timing is checked: short paths get even shorter there. The comparison is made with the timing tool, not with the area numbers, which stayed the same.
Summary
stat -libertyreports wires, cells by type, total area and the share used by flip-flops; check the register count first- The cell mix tells you what the design is: a small counter is mostly flip-flop area, a multiplier mostly XOR, XNOR and majority cells
- Mapping options change area and speed, but ABC's own delay goal is only an estimate; in these runs
-Dchanged nothing and the larger mappings were the faster ones - Critical paths come from a timing tool such as OpenSTA, which reports each cell on the path, the arrival and required times and the slack
- The same netlist has very different timing at different corners, so every corner must be checked