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

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • OOP & Testbench Puzzles25
    • Handle and Copy Puzzles
    • Virtual Method Puzzles
      • Non-Virtual vs Virtual Through Base Handle
      • Missing super.new with Required Base Args
      • Virtual Call from Base Constructor
      • Signature Mismatch Prevents Override
      • Template Method with Non-Virtual Wrapper
      • super Method Call in Override Chain
    • Parameterized Class Puzzles
    • Factory Override Puzzles
    • OOP & Testbench Puzzles: Tricky Q&A
  • Concurrency & Timing Puzzles25
  • Randomization & Constraint Puzzles25
  • SVA Assertion Puzzles25
  • Functional Coverage Puzzles25
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
  • Interview Prep: Puzzle Rounds5
  • DV Puzzle Cheatsheet
Loading lesson

‹Virtual Method Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. OOP & Testbench Puzzles
  4. Virtual Method Puzzles
  5. Missing super.new with Required Base Args

VLSI DV Interview Puzzles · All levels

Missing super.new with Required Base Args

Why does this class fail before simulation even starts, and what exact fix is required?

On this page

    Puzzle

    Difficulty: Medium · Puzzle 2 of 6 · Topic: Virtual Method Puzzles

    Why does this class fail before simulation even starts, and what exact fix is required?

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    class base_cfg;
      int id;
      function new(int id);
        this.id = id;
      endfunction
    endclass
    
    class ext_cfg extends base_cfg;
      function new();
        // no super.new call
      endfunction
    endclass

    Hint

    Constructors are not optional in inheritance when base has required parameters.

    Step-by-step solution

    Diagram
    1) `base_cfg` has no zero-argument constructor; it requires `id`.
    2) `ext_cfg::new` must call `super.new(<id>)` as the first statement.
    3) Without it, compilation/elaboration fails due to unsatisfied base constructor call.

    Answer

    Answer: It is illegal because base constructor needs an argument and `ext_cfg` never calls `super.new(id)`.

    Why candidates get it wrong

    Candidates coming from other languages assume base default constructor is auto-synthesized.

    Interviewer follow-up

    How would you thread this constructor argument from UVM factory `create` path in components?

    Related topics

    • Back to Virtual Method Puzzles

    • OOP & Testbench Puzzles section

    Previous

    37 / 210

    Next: Virtual Call from Base Constructor

    Up next

    Up nextVirtual Call from Base Constructor

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Signature Mismatch Prevents Override
    • Template Method with Non-Virtual Wrapper
    • super Method Call in Override Chain