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

AboutContactPrivacyTerms
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

Part 1 · Synthesis Foundations · Intermediate

Area by Cell Type

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

On this page

    Area is count times cell area

    Each library cell carries an area in library units of the teaching library. The report multiplies each count by its cell area and adds the parts.

    Cell

    Area (library units)

    NAND2

    2

    NOR2

    2

    INV

    1

    These units belong to course.lib, a fictional teaching library. They measure relative cell cost, never a real process.

    stat -liberty on a mapped design

    Mapping replaces generic gates with library cells. The script below synthesises the three-gate example, maps it to course.lib, and proves no generic gate remains.

    yosys
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    read_verilog <<EOV
    module top(input a, b, c, d, output y);
    wire n1, n2;
    assign n1 = a & b;
    assign n2 = c & d;
    assign y = n1 | n2;
    endmodule
    EOV
    read_liberty -lib course.lib
    hierarchy -check -top top
    synth -top top
    abc -liberty course.lib
    select -assert-none t:$_AND_
    select -assert-none t:$_OR_
    check
    stat -liberty course.lib
    log PASS: mapped netlist holds library cells only

    Synthesis lowers the coarse cells to generic gates, and abc maps those to course.lib. After abc, no generic gate remains. The block below is an illustrative layout, numbers invented for this lesson.

    Diagram
    illustrative layout, numbers invented for this lesson (an example block, never tool output):
    NAND2: count 12 x area 2 = 24 units
    NOR2:  count 4 x area 2 = 8 units
    INV:   count 6 x area 1 = 6 units
    DFF:   count 8 x area 8 = 64 units
    total = 24 + 8 + 6 + 64
          = 102 area units

    A hand-added area total

    The design below instantiates two NAND2 cells and one NOR2 cell directly. Its script pins the counts, and the calc block adds the area by hand.

    yosys
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    read_verilog <<EOV
    module NAND2(input a, b, output y);
    assign y = ~(a & b);
    endmodule
    module NOR2(input a, b, output y);
    assign y = ~(a | b);
    endmodule
    module top(input a, b, c, d, output y);
    wire n1, n2;
    NAND2 g1 (.a(a), .b(b), .y(n1));
    NAND2 g2 (.a(c), .b(d), .y(n2));
    NOR2 g3 (.a(n1), .b(n2), .y(y));
    endmodule
    EOV
    hierarchy -check -top top
    select -assert-count 2 t:NAND2
    select -assert-count 1 t:NOR2
    check
    stat
    log PASS: two NAND2 and one NOR2 instantiate as written
    Diagram
    course.lib areas: NAND2 2 units, NOR2 2 units (teaching library, not a process)
    gate list: 2 NAND2, 1 NOR2
    NAND2 part = 2 x 2 = 4 units
    NOR2 part  = 1 x 2 = 2 units
    total = 4 + 2 = 6 area units
    NAND2 share = 4 / 6 = 66.67%
    NOR2 share  = 2 / 6 = 33.33%
    66.67 + 33.33 = 100.00

    The program below repeats the addition and checks the shares. It passes only when the total is 6 units and the shares sum to 100.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    import sys
    
    AREAS = {"NAND2": 2, "NOR2": 2}
    COUNTS = {"NAND2": 2, "NOR2": 1}
    
    def close(got, want):
        return abs(got - want) < 0.005
    
    total = 0
    for cell in COUNTS:
        total = total + COUNTS[cell] * AREAS[cell]
    
    parts = {}
    for cell in COUNTS:
        parts[cell] = COUNTS[cell] * AREAS[cell] / total * 100.0
    
    bad = 0
    if total != 6:
        print("FAIL: total area is " + str(total) + " want 6")
        bad = 1
    if not close(parts["NAND2"], 66.67):
        print("FAIL: NAND2 share is " + str(parts["NAND2"]))
        bad = 1
    if not close(parts["NOR2"], 33.33):
        print("FAIL: NOR2 share is " + str(parts["NOR2"]))
        bad = 1
    if not close(parts["NAND2"] + parts["NOR2"], 100.0):
        print("FAIL: shares do not sum to 100")
        bad = 1
    if bad != 0:
        sys.exit(1)
    print("PASS: area 6 units with shares 66.67 and 33.33")

    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.

    Library units compare only within one library. The companion nand_only.lib holds only INV, BUF and NAND2, so the same RTL mapped there gives a different total.

    Common pitfall

    Comparing area totals across libraries misleads. The same function costs different totals under different cell sets, so compare only within one library.

    Interview

    Likely probes: units of an area total, and its blind spots.

    • Area is a sum of count times cell area, in library units of the named library.

    • By-type shares say where the area sits; the total alone does not.

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

    Check yourself Two NAND2 cells of area 2 and one NOR2 cell of area 2 total 6 area units. What are the shares?

    NAND2 takes 4 units (66.67%) and NOR2 takes 2 units (33.33%). The shares sum to 100.00.

    Check yourself An area report says 102 units, yet the routed design is much larger. What did the report leave out?

    Wire area and placement effects. The report counts cell area in library units only.

    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 lessonReport an error

    See also

    • Longest Path, Write and Read Back