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
  • Constraints and Timing15
  • Sequential, FSM and Memory19
  • Datapath Synthesis14
  • Area, Power and Test14
  • Verification, ECO and Handoff15
  • Flows and Debugging15
  • Interview and Judgment11
    • Synthesis Interview Questions
      • Flow and Inference Questions
      • Optimization and Mapping Questions
      • Timing and Constraint Questions
      • Sequential and Datapath Questions
      • Power and Test Questions
      • Verification and ECO Questions
    • Synthesis Design Scenarios
Loading lesson

‹Synthesis Interview Questions
  1. Topics
  2. Logic Synthesis
  3. Interview and Judgment
  4. Synthesis Interview Questions
  5. Optimization and Mapping Questions

Part 9 · Interview and Judgment · Intermediate

Optimization and Mapping Questions

Optimization and mapping questions with worked area and depth arithmetic in library units.

On this page

    Boolean effort and structuring

    Boolean optimization rewrites logic to shorten paths or share terms. Whether it helps depends on the design, so no rewrite always wins.

    Question

    Precise answer

    Follow-up probe

    Common wrong answer

    When does restructuring Boolean logic help?

    When it shortens the critical path or shares common terms; it can also grow area, so the gain varies by design.

    Name a case where it hurts.

    Optimization always reduces area and delay.

    What does technology mapping choose?

    A cover of library cells for the logic with the lowest cost under the active constraints; the result varies by library and constraints.

    Why does one RTL map differently for speed versus area?

    There is one correct gate netlist per RTL.

    How do you compare two mappings by hand?

    Sum cell count times cell area in teaching-library units; the worked block below totals 23 units.

    Recompute it if the MUX2 becomes two NAND2 and an INV.

    Count the gates and ignore their sizes.

    Area in teaching-library units

    Areas below are units of the fictional teaching library course.lib, not a process. The checker at the end of this lesson recomputes both totals.

    Diagram
    area in teaching-library units (course.lib EXAMPLE areas, not a process):
    block: 4 NAND2, 2 INV, 1 MUX2, 1 DFF
    area = 4 x 2 + 2 x 1 + 1 x 5 + 1 x 8
         = 8 + 2 + 5 + 8 = 23 area units
    second block: 2 XOR2, 3 NAND2, 2 DFF
    area = 2 x 5 + 3 x 2 + 2 x 8
         = 10 + 6 + 16 = 32 area units

    Depth, trees, and a checker

    A select tree over N inputs needs depth ceiling of log2 of N. The program below proves the quoted areas and depths.

    Diagram
    16:1 mux from 2:1 MUX2 cells (EXAMPLE structure):
    levels = ceiling of log2(16) = 4
    cells = 16 - 1 = 15
    5:1 mux: levels = ceiling of log2(5) = 3, since 2^2 = 4 < 5 <= 8 = 2^3
    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
    33
    import sys
    
    AREA = {"INV": 1, "NAND2": 2, "MUX2": 5, "DFF": 8, "XOR2": 5}
    
    def block_area(counts):
        total = 0
        for k in counts:
            total = total + AREA[k] * counts[k]
        return total
    
    def tree_depth(n):
        d = 0
        p = 1
        while p < n:
            p = p * 2
            d = d + 1
        return d
    
    checks = [
        (block_area({"NAND2": 4, "INV": 2, "MUX2": 1, "DFF": 1}), 23),
        (block_area({"XOR2": 2, "NAND2": 3, "DFF": 2}), 32),
        (tree_depth(16), 4),
        (tree_depth(5), 3),
        (16 - 1, 15),
    ]
    
    for i in range(len(checks)):
        got, want = checks[i]
        if got != want:
            print("FAIL: check " + str(i + 1) + " got " + str(got) + " want " + str(want))
            sys.exit(1)
    
    print("PASS: areas 23 and 32 with mux depths 4 and 3 confirmed")

    Common pitfall

    Trusting one mapping number across libraries. Areas here are teaching-library units, so a new library re-ranks every cover.

    Interview

    Likely probes: hand area sums and tree depth.

    • The first block totals 23 units and the second totals 32 units.

    • A 16:1 mux tree is 4 levels deep and uses 15 cells.

    • Swapping the MUX2 for two NAND2 and one INV keeps the total at 23 units.

    Check yourself The worked block totals 23 area units. Replace the MUX2 (5 units) with two NAND2 and one INV. What is the new total?

    Two NAND2 give 4 units and one INV gives 1, so the replacement is 5 units and the total stays 23.

    Check yourself How deep is a 5:1 mux tree, and why?

    Three levels, since 4 is below 5 and 8 covers it: the ceiling of log2 of 5 is 3.

    Related topics

    • Timing and constraints

    • Technology mapping

    • Muxes, decoders and encoders

    Previous

    130 / 139

    Next: Timing and Constraint Questions

    Up next

    Up nextTiming and Constraint Questions

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Sequential and Datapath Questions
    • Power and Test Questions
    • Verification and ECO Questions