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.
| Dimension | uvm_component | uvm_object |
|---|---|---|
| Primary role | Persistent testbench structure | Data, policy, or scenario |
| Hierarchy | Has parent and full path | No component hierarchy |
| Phasing | Receives phase callbacks | Does not participate directly |
| Examples | agent, driver, monitor, env | item, sequence, config |
