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
  • Logic Optimisation and Mapping20
    • Boolean Optimisation
      • Constant Propagation
      • Redundancy Removal
      • Factoring, Collapsing and Sharing
      • AIGs, Depth and Area
      • Don't-Cares
    • Technology Mapping
    • Cell Libraries and Liberty
    • Structuring and Buffering
  • 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

‹Boolean Optimisation
  1. Topics
  2. Logic Synthesis
  3. Logic Optimisation and Mapping
  4. Boolean Optimisation
  5. AIGs, Depth and Area

Part 2 · Logic Optimisation and Mapping · Intermediate

AIGs, Depth and Area

And-Inverter Graphs at an intuitive level and the depth-area trade-off.

On this page

    And-inverter graphs

    An And-Inverter Graph (AIG) builds every function from two-input AND nodes plus optional inversion on the edges. OR and NAND become AND nodes with inverted inputs or outputs.

    One uniform node type makes rewriting simple. The tool matches small AND-inverter patterns and replaces them with cheaper equivalents.

    Sharing one AND node between an inverted and a plain output.
    One AND node driving two outputs through a plain and an inverted edge.

    Depth

    Depth is the longest chain of nodes from an input to the output. It bounds delay: more levels mean more gate delays in series.

    Balancing a chain into a tree keeps the gate count and cuts the depth. The calc block uses an EXAMPLE gate delay of 2.0 time units per AND2.

    Diagram
    4-wide AND of a, b, c, d
    chain: (((a & b) & c) & d) -> 3 AND2 in series, depth 3
    tree: (a & b) & (c & d) -> 2 AND2 in parallel then 1 AND2, depth 2
    EXAMPLE delay per AND2 = 2.0 time units
    chain arrival = 3 x 2.0 = 6.0 time units
    tree arrival = 2 x 2.0 = 4.0 time units
    gates both ways = 3 AND2 = 3 x 3 = 9 area units

    Area and the trade-off

    Sharing cuts area by reusing nodes across outputs. Duplication cuts depth by giving each output its own cone, which costs area.

    Move

    Area effect

    Depth effect

    Share a sub-expression

    Down: built once

    Unchanged or up: shared node serves several paths

    Duplicate for speed

    Up: one cone per output

    Down: each path shortens

    Balance a chain

    Same gate count here

    Down: levels fall from 3 to 2

    Common mistakes

    No rewrite helps on every circuit. Sharing on the critical path can add load, and duplication off it only adds area.

    Common pitfall

    Chasing minimum depth everywhere wastes area where timing already closes. Optimise the critical path first and leave the rest small.

    Interview

    Likely probes: reading depth off a graph and naming the trade.

    • Depth is the longest input-to-output node chain.

    • The 4-wide AND tree keeps 3 gates and cuts depth from 3 to 2.

    • Sharing saves area; duplication buys depth; neither is free.

    Check yourself A 4-wide AND chain becomes a balanced tree. What changes, exactly?

    Depth falls from 3 to 2 while the gate count stays at 3. Arrival drops from 6.0 to 4.0 EXAMPLE time units.

    Check yourself Two outputs share one AND node on the critical path. What can go wrong?

    The shared node drives extra load, which can slow the critical path. Duplicating it off the path may be cheaper in delay.

    Related topics

    • Previous: Factoring, collapsing and sharing

    • Next: Don't-cares

    Previous

    20 / 139

    Next: Don't-Cares

    Up next

    Up nextDon't-Cares

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Constant Propagation
    • Redundancy Removal