Skip to Architecture + lifecycle questions

Part 1 · Architecture and lifecycle

Separate components from transaction objects, assemble reusable agents, and reason precisely about phase order, run-time concurrency, and objections.

Question directory

Questions for Architecture + lifecycle

Open an authored answer here, then follow its diagram and implementation example in context.

  1. Testbench architectureWhat is the difference between uvm_component and uvm_object?UVM interview answer
  2. Testbench architectureWhat belongs in a UVM agent, and what changes in passive mode?UVM interview answer
  3. Testbench architectureWhy is UVM a methodology rather than only a class library?UVM interview answer
  4. Phasing and end of testHow does UVM phasing work, and why is it necessary?UVM interview answer
  5. Phasing and end of testWhen should you use run_phase versus the twelve run-time subphases?UVM interview answer
  6. Phasing and end of testHow do objections control when a UVM test ends?UVM interview answer

UVM Testbench architecture Know what lives where.

Separate persistent structure from transient data, then explain how an agent packages a protocol without mixing stimulus, observation, and checking.

Concept model

UVM component hierarchy and object flow

Persistent structureComponent hierarchy
componentuvm_test
componentuvm_env
Active agent
sequencer
driver
monitor
Passive agent
monitor
Transient intentObject stream
scenario objectsequence
transaction objectsequence item
componentdriver

A configuration object can live for the full test. Object does not automatically mean short-lived.

Components form the persistent hierarchy. Objects carry configuration and transactions through that hierarchy. An active agent drives and observes; a passive agent only observes.

Strong answer

A uvm_component is a persistent, hierarchical testbench element that participates in phasing. A uvm_object is a non-hierarchical data or behavior object used for items, sequences, and configuration.

Reason it through

  • Components have a parent, a hierarchical path, phase callbacks, and report context. Drivers, monitors, agents, environments, scoreboards, and tests are components.
  • Objects have names but no component parent or phase callbacks. Sequence items, sequences, register transactions, and configuration objects are typical examples.
  • Call components structural and objects transactional, but do not call components compile-time static. Both are SystemVerilog class instances; their ownership and lifecycle contracts differ.
Component and object comparison
Dimensionuvm_componentuvm_object
Primary rolePersistent testbench structureData, policy, or scenario
HierarchyHas parent and full pathNo component hierarchy
PhasingReceives phase callbacksDoes not participate directly
Examplesagent, driver, monitor, envitem, sequence, config

UVM Phasing and end of test Know when time may pass.

Explain the ordered function phases, the two concurrent run-time schedules, and the objection contract that decides when a time-consuming phase may finish.

Concept model

The UVM lifecycle has order and concurrency

top-downbuild
bottom-upconnect + elaborate
bottom-upstart of simulation
time advancesrun
bottom-upextract + check + report
top-downfinal
Common domainrun_phaseAlways-on drivers, monitors, and scoreboards
Runs concurrently
Run-time schedule12 ordered task phasesExplicit reset, configure, main, and shutdown synchronization
  1. 01pre_reset
  2. 02reset
  3. 03post_reset
  4. 04pre_configure
  5. 05configure
  6. 06post_configure
  7. 07pre_main
  8. 08main
  9. 09post_main
  10. 10pre_shutdown
  11. 11shutdown
  12. 12post_shutdown

Construction and cleanup are ordered across the hierarchy. The common run phase executes concurrently with the twelve-phase run-time schedule, so a team needs one consistent phase policy.