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

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • Study Route: One Week Before the Interview
  • Study Route: Two Weeks
  • Study Route: Four Weeks (Full Course)4
  • OOP & Testbench Puzzles25
  • Concurrency & Timing Puzzles25
  • Randomization & Constraint Puzzles25
  • SVA Assertion Puzzles25
  • Functional Coverage Puzzles25
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
  • UVM Testbench Puzzles25
    • UVM Phases and Objections
      • Which Way Do the Phases Walk the Tree
      • Drain Time After the Last Drop
      • PASSED Banner Printed Before the Error
      • Derived build_phase Without super
      • phase_ready_to_end Never Extends
      • Creating a Component After Build
    • Factory and config_db
    • Sequences and Sequencers
    • Analysis, Scoreboards and RAL
    • UVM Testbench Puzzles: Tricky Q&A
  • Clock, Reset & CDC Puzzles25
  • Bus and Interface Protocol Puzzles25
  • Interview Prep: Puzzle Rounds7
  • DV Puzzle Cheatsheet
Loading lesson

←UVM Phases and Objections
  1. Topics
  2. DV Interview Puzzles
  3. UVM Testbench Puzzles
  4. UVM Phases and Objections
  5. Creating a Component After Build
On this page

    VLSI DV Interview PuzzlesAll levels

    Creating a Component After Build

    UVM 1.2. To save effort the test creates an optional checker only when a plusarg is present, and does it in connect_phase (after reading the plusarg there). What happens at run time when the plusarg is given?

    Puzzle

    Difficulty: Medium · Puzzle 6 of 6 · Topic: UVM Phases and Objections

    UVM 1.2. To save effort the test creates an optional checker only when a plusarg is present, and does it in connect_phase (after reading the plusarg there). What happens at run time when the plusarg is given?

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    class my_test extends uvm_test;
      `uvm_component_utils(my_test)
      my_env env;
      late_checker chk;
      function new(string name, uvm_component parent); super.new(name, parent); endfunction
      function void build_phase(uvm_phase phase);
        super.build_phase(phase);
        env = my_env::type_id::create("env", this);
      endfunction
      function void connect_phase(uvm_phase phase);
        if ($test$plusargs("WITH_CHK")) begin
          chk = late_checker::type_id::create("chk", this);
          env.agent.mon.ap.connect(chk.analysis_export);
        end
      endfunction
    endclass

    Hint

    Components can only exist before a certain phase has finished. Which one, and what does the library do if you break the rule?

    Step-by-step solution

    Diagram
    1) All components must be created during build_phase (or before it, from the build of an ancestor); after the build phase has ended UVM no longer runs build_phase for newcomers, so creation is refused.
    2) In UVM 1.2 the component constructor reports a UVM_FATAL (id ILLCRT) saying that creating a component after the build phase has ended is illegal. The simulation stops there.
    3) Fix: create the checker in build_phase under the same plusarg test (conditional creation in build_phase is fine), and connect it in connect_phase if it is non-null.

    Answer

    Answer: A UVM_FATAL (ILLCRT) at the create call in connect_phase; fix by creating the optional component in build_phase and connecting it later.

    How this was checked

    Not run here: The UVM library is not installed here, so this cannot be executed; the ILLCRT fatal is raised inside the UVM component constructor; there is nothing meaningful to emulate in plain SystemVerilog.. The answer follows the language rules and the solution steps above.

    Why candidates get it wrong

    Conditional creation is legal, late creation is not: the condition can stay, only the phase in which the create call runs must move to build_phase.

    Interviewer follow-up

    Which two kinds of object are not bound by this rule, and why? Model answer: uvm_objects (sequences, items, config objects) can be created in any phase, since they have no phase scheduling or hierarchy; only uvm_components need a build_phase, a parent and a place in the tree before the build phase ends.

    Related topics

    • Back to UVM Phases and Objections

    • UVM Testbench Puzzles section

    Previous

    216 / 293

    Next: Factory and config_db

    Up next

    Up nextFactory and config_db

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Which Way Do the Phases Walk the Tree
    • Drain Time After the Last Drop
    • PASSED Banner Printed Before the Error