Skip to question
SystemVerilogDesignVerificationFirmwareArchitectureASIC Interview Questions→
/Interview questions/uvm_object vs. uvm_component

Q008·Free·Design Verification

uvm_object vs. uvm_component

Difficulty
Easy
Topic
UVM Components
Language
SV
Interview prompt

Question

A reusable packet configuration has no hierarchy, ports, or phase behavior. Why is extending uvm_object usually preferable to extending uvm_component?

Choose one

Answer choices

  1. A. Only uvm_object can be randomized
  2. B. uvm_object instances are lightweight data objects and do not participate in the component hierarchy or phasing
  3. C. uvm_component cannot be registered with the factory
  4. D. uvm_object automatically raises and drops run-phase objections
Answer framework

Short answer

Use `uvm_object` because the configuration is data rather than a structural testbench element. It needs neither a hierarchical parent nor phase callbacks, ports, or persistent component lifetime. Choosing an object keeps construction and reuse simpler without preventing factory registration or randomization.

Why this reasoning works

`uvm_component` is intended for entities that occupy the UVM hierarchy, such as environments, agents, drivers, monitors, and scoreboards. Components have parent-child relationships, names within that hierarchy, and participation in the UVM phase schedule. Those services are useful for testbench structure but unnecessary overhead for a packet configuration value.

`uvm_object` suits transient or portable data including transactions, sequence items, policies, and configuration records. It can still define random fields, constraints, copy and compare behavior, printing, and factory registration. If the class later needs ports, automatic phase methods, or a stable place in the component tree, converting its role to a component may then be justified.

Interview takeaways

  • Objects represent data
  • Components form hierarchy
  • Both support the factory
Exact question handoffPractice Q008

Solve it in the question bank, keep your progress, and reveal the reviewed solution when your access allows.

Open in question bank →
Solution accessEach time you open this Solution, one Practice Credit is used; it is not permanently unlocked. Premium Solution content also uses one credit per opening.
Continue learning

UVM Architecture and Lifecycle

Review component roles, agents, phases, objections, domains, and end of test.

  • UVM Components
  • UVM
  • Class roles and construction
UVM Architecture and Lifecycle →
Continue practicing

Related questions

Q536 · UVM ComponentsActive and passive agentsEasyP→Q889 · UVM ComponentsFactory-aware component constructionMediumP→Q804 · UVM ComponentsConfiguration object ownershipMediumP→Q490 · SystemVerilog & UVMInject configuration into a UVM object predictorMediumP→
ASIC.FYI · Learn silicon end to end.info@asic.fyi