Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • Logic Synthesis Glossary
  • Logic Synthesis Cheatsheet
  • Synthesis Foundations14
    • Synthesis Flow Overview
    • Synthesizable RTL and Inference
    • Reading Netlists and Reports
      • Cell Counts from stat
      • Area by Cell Type
      • Hierarchy, Fanout and Net Names
      • Longest Path, Write and Read Back
  • Logic Optimisation and Mapping20
  • Constraints and Timing15
  • Sequential, FSM and Memory19
  • Datapath Synthesis14
  • Area, Power and Test14
  • Verification, ECO and Handoff15
  • Flows and Debugging15
  • Interview and Judgment11
Loading lesson

←Reading Netlists and Reports
  1. Topics
  2. Logic Synthesis
  3. Synthesis Foundations
  4. Reading Netlists and Reports
  5. Area by Cell Type
On this page

    Part 1 of 9, lesson 12 of 14Part 1 of 9/Synthesis Foundations/Lesson 12 of 14Intermediate

    Area by Cell Type

    Area in library units by cell type, and what an area report cannot tell you.

    Area totals from different libraries do not compare, yet they look identical on a slide. Naming the library before the number prevents the most common area argument.

    After this lesson you can: build an area total from stat -liberty rows as count times cell area, and explain why a restricted library costs more for the same RTL.

    The question

    An area total is a sum, not a measurement: each cell count times its cell area, added row by row. This lesson builds that sum twice for one 4-bit adder, once against the full teaching library course.lib and once against the restricted nand_only.lib, which offers only INV, BUF and NAND2. Both totals are recordings from the script below, and the comparison shows what a restricted library costs for identical logic.

    One adder, two libraries

    The script synthesises the adder once, saves the generic netlist, then maps the same gates twice: first against course.lib, then, after reloading the generic design, against nand_only.lib. The assertions pin what each mapping must satisfy: no generic gate survives either run, every mapped netlist holds at least one library cell, and the restricted run additionally holds at least one NAND2 while the wider cells it cannot use never appear.

    yosys
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    read_verilog <<EOV
    module adder4(input [3:0] a, b, output [4:0] s);
    assign s = a + b;
    endmodule
    EOV
    synth -top adder4 -flatten
    design -save generic
    tee -o abc_course.txt abc -liberty course.lib -constr typical.constr -D 1000
    tee -o stat_course.txt stat -liberty course.lib
    write_json net_course.json
    select -assert-none t:$add t:$and t:$or t:$xor t:$not t:$mux t:$_AND_ t:$_OR_ t:$_XOR_ t:$_NOT_ t:$_MUX_
    select -assert-min 1 t:NAND2 t:NOR2 t:AND2 t:OR2 t:XOR2 t:XNOR2 t:NAND3 t:NOR3 t:AOI21 t:OAI21 t:MUX2 t:INV t:BUF %u
    design -load generic
    tee -o abc_nand.txt abc -liberty nand_only.lib -constr typical.constr -D 1000
    tee -o stat_nand.txt stat -liberty nand_only.lib
    write_json net_nand.json
    select -assert-none t:$add t:$and t:$or t:$xor t:$not t:$mux t:$_AND_ t:$_OR_ t:$_XOR_ t:$_NOT_ t:$_MUX_ t:AND2 t:OR2 t:XOR2 t:XNOR2 t:NAND3 t:NOR3 t:AOI21 t:OAI21 t:MUX2 t:DFF
    select -assert-min 1 t:NAND2
    log PASS: adder4 mapped against course.lib and nand_only.lib with both reports recorded

    In a commercial flow the library choice is the foundry library plus its operating corner and cell subsets. Here the two teaching libraries play those roles: a full menu against a three-cell diet. The load each output drives is the 50 fF load typical.constr sets, so the only deliberate difference between the runs is the menu the mapper may order from.

    Library units compare only within one library. The units below are fictional teaching units from course.lib and nand_only.lib, and they exist so the arithmetic is visible, never so the digits transfer to a real process.

    Predict first Before reading on: the same adder mapped with only INV, BUF and NAND2 available. Will it cost more or less area than the full-library mapping, and why?

    More: 66 units against 59 units, which is 12% extra. Every AND-OR-XOR cone the full library covers with one cell must be rebuilt from NAND2 stages under nand_only.lib, so the cell count rises to 42 from 18 while each replacement cell still costs its own area.

    The full-library area

    Against course.lib the adder maps to 18 cells (AND2 1, AOI21 1, NAND2 5, NOR2 2, OAI21 2, OR2 1, XNOR2 3, XOR2 3) for the full-library total, and ABC's summary agrees on the area at delay 509.54 ps. The chip-area line of the stat report carries the same total, so two passes over one netlist agree.

    Cell type

    Cells

    Area (library units)

    Share

    AND2

    1

    3

    5.1%

    AOI21

    1

    3

    5.1%

    NAND2

    5

    10

    16.9%

    NOR2

    2

    4

    6.8%

    OAI21

    2

    6

    10.2%

    OR2

    1

    3

    5.1%

    XNOR2

    3

    15

    25.4%

    XOR2

    3

    15

    25.4%

    The XNOR2 and XOR2 rows tie for the largest share at 25.4% each. That pair is the actionable part of the report: if this adder ever needs slimming, the tied covering is where the area sits, and the total alone would never have said so.

    Area by cell type for the adder against course.lib: 59 units total, tied for the largest share by XNOR2 and XOR2.

    Break it: take away the cells

    The second run is the deliberate breakage: the same generic gates mapped with only three cells on the menu. The result is 42 cells (INV 18, NAND2 24) for the restricted total, with ABC reporting the same area at delay 922.06 ps. The function never changed; only the covering did. That is the cost of a restricted library, isolated from every other variable because the generic netlist was reloaded unchanged between the runs.

    Cell type

    Cells

    Area (library units)

    Share

    INV

    18

    18

    27.3%

    NAND2

    24

    48

    72.7%

    Area by cell type for the same adder against nand_only.lib: 66 units total, led by NAND2.

    Read the two charts as one story. The full library spreads area across specialised cells, while the restricted run concentrates 72.7% of the restricted total in NAND2. The surcharge buys no extra function; it is the price of rebuilding every cone from NAND2 stages.

    What area cannot tell you

    An area total counts cell area only. It knows nothing about wire area, which depends on placement and routing that run later, and nothing about power or delay beyond what ABC's accompanying summary reports. A total that looks comfortable here can still fail after routing congestion or under a tighter clock, which is why synthesis area is a budget input rather than a sign-off number.

    Common mistakes

    Comparing area totals across libraries misleads. The same adder is both totals on this page, so quoting one without its library name is quoting neither. A related trap is treating the total as the design's size in silicon: wire area and placement effects never appear in a synthesis report.

    What does an area total mean, and what happens when the library shrinks?

    Weak: area is the size of the design, and fewer cells means less area. Strong: area is count times cell area in library units of the named library: here 59 units from course.lib against 66 units from nand_only.lib for identical logic, a 12% surcharge because every cone is rebuilt from NAND2 stages. The report says nothing about wire area.

    Follow-up: the restricted run is slower as well as larger. Why should extra NAND2 stages cost delay too? Because each added stage adds its own cell delay along the path. ABC's delay line confirms it: 509.54 ps with the full library against 922.06 ps restricted.

    Check yourself The full-library run totals some area units. Which rows carry the most, and why does that matter?

    The XNOR2 and XOR2 pair carries the largest share of the full-library total. It matters because optimisation starts with the largest share: shrinking that pair moves the total, while shrinking any small row barely registers.

    Check yourself The restricted run costs more area for the same function. What exactly did the extra area buy?

    Nothing functional. It rebuilt the same cones from NAND2 stages because the wider cells were unavailable, rising from 18 to 42 cells. The surcharge is the price of the smaller menu, visible only because both runs share one generic netlist.

    • Area is a sum over rows: each count times its cell area in library units of the named library.

    • The same adder costs more from nand_only.lib because every function must be built from INV, BUF and NAND2.

    • Wire area and placement never appear in a synthesis area report.

    Rule of thumb: compare area totals only within one library.

    How this was checked

    Every number and both charts on this page come from one Yosys 0.69 run of the script shown, recorded by the course checker (scripts/tools/run-rtl-testbenches.mjs with COURSE=synth): one 4-bit adder mapped against course.lib and against nand_only.lib. Both libraries are fictional, so absolute values are teaching units and only the comparison method transfers.

    • Interview: run a mock interview on this topic

    Related topics

    • Cell counts from stat

    • Technology Mapping

    Previous

    14 / 139

    Next: Hierarchy, Fanout and Net Names

    Up next

    Up nextHierarchy, Fanout and Net Names

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Longest Path, Write and Read Back