Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Factory-aware component construction

Hardware interview practice

Factory-aware component construction

MediumUVM ComponentsSystemVerilog

A test installs a type override from base_agent to coverage_agent before the environment is built, but the instantiated agent is still base_agent. What is the decisive defect?

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Starting point

Question code

class env extends uvm_env;
  base_agent agt;
  function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    agt = new("agt", this);
  endfunction
endclass
Choose one

Answer choices

  1. A. The agent must be created in connect_phase for overrides to work
  2. B. Direct construction with new bypasses factory lookup; use base_agent::type_id::create
  3. C. The override must target uvm_agent rather than base_agent
  4. D. Component type overrides apply only to grandchildren of the test
Continue practicing

Related questions

UVM Componentsuvm_object versus uvm_component→UVM ComponentsActive and passive agents→
asic.fyi · Learn silicon end to end.info@asic.fyi