FREE — INTERVIEW QUESTIONS

UVM interview questions, with code answers, solved problems and a real UVM log read line by line

90+ free UVM questions for design verification interviews: objects and components, phases, the factory, config DB, sequences and the driver handshake, agents, analysis ports, scoreboards, objections, RAL and reporting. Includes 18 worked answers with code, 8 solved problems, a failing regression log walked through step by step, a regression planner and a rapid-fire round.

550+ UVM Interview Questions ebook cover
UVM EBOOK · 616 QUESTIONS · 24 CHAPTERS

Get all 616 UVM questions, chapter by chapter

A questions-only bank from the factory to real verification scenarios, with 195 questions on testbench components and 95 on debugging, architecture and scenarios.

INSTANT PDF DOWNLOAD · 8 FREE PREVIEW PAGES
See the ebook

UVM interviews almost always begin with "draw your testbench". Everything after that is a follow-up on the drawing: who creates each box, in which phase, how the boxes talk, what happens when a test overrides one of them, and how you'd know if something silently went wrong.

Start with the cheat sheet and the table of who builds what, skim the 50 questions by topic, then work through the worked answers with the code in front of you. Finish with the log walkthrough: reading a failing regression log is the most practical senior question there is.

HOW IT'S ASKED

Three levels of a UVM interview

LEVEL 1

Architecture & base classes

Objects vs components, the phase order, what the factory is for, what config DB stores, the parts of an agent. You should be able to draw a full environment in two minutes.

LEVEL 2

Write the pieces

A sequence body, a driver run_phase, a config DB set and get, a factory override, a scoreboard with two analysis inputs. Small code, exact API.

LEVEL 3

Debug & architecture

"The test ends at time 0", "my override does nothing", "the scoreboard fails but the waves look right", "reuse this agent at SoC level". They want method and trade-offs.

HOW TO ANSWER

Six habits of strong UVM answers

01

Draw it first

Test, env, agents, scoreboard, the arrows between them. Every later answer can point at the drawing.

02

Say which phase

Create in build, connect in connect, run stimulus in run, check in check. Many bugs are just something done in the wrong phase.

03

Name the handshake

start_item, finish_item on one side; get_next_item, item_done on the other. Interviewers love the step-by-step.

04

Configure, don't hardcode

Active or passive, number of agents, timeouts, error injection: all from config objects or the config DB, never from if (test_name == …).

05

Keep components reusable

Agents know a protocol, not a test. Say what would have to change to use your agent on another project; the right answer is "nothing".

06

Debug with UVM's own tools

print_topology(), factory.print(), +UVM_CONFIG_DB_TRACE, +UVM_OBJECTION_TRACE. Naming them shows you've debugged real environments.

CHEAT SHEET

The UVM facts interviewers expect at once

The rules behind most one-line questions, in one place.

PHASESbuild → connect → end_of_elaboration → start_of_simulation → run → extract → check → report → finalBuild runs top-down, the others bottom-up. Only run (and its runtime sub-phases) is a task that consumes time.
RUNTIMEreset → configure → main → shutdown, each with pre_ and post_ · run in parallel with run_phase
OBJECT vs COMPONENTuvm_object: new(name), created any time · uvm_component: new(name, parent), built in build_phase, has phases
FACTORYT::type_id::create(name, parent) · overrides: set_type_override, set_inst_override, instance beats type
CONFIG DBset(cntxt, inst_path, field, value) · get(this, "", field, var) returns 1 if foundDuring build, a set from higher in the hierarchy wins; after build, the last set wins.
HANDSHAKEseq: start_item → randomize → finish_item · drv: get_next_item → drive → item_done
TLMport (needs) → export (forwards) → imp (implements) · analysis_port.write(): one to many, never blocks
OBJECTIONSphase ends when the objection count returns to 0, plus any drain time
REPORTINGINFO, WARNING, ERROR, FATAL · verbosity NONE < LOW < MEDIUM < HIGH < FULL < DEBUG · only INFO is filtered by verbosity
RALwrite/read front door · poke/peek back door · set + update · mirror checks · desired vs mirrored value
ARBITRATIONdefault FIFO · WEIGHTED, RANDOM, STRICT_FIFO, STRICT_RANDOM, USER · lock() queues, grab() jumps the queue
TRY IT

Regression planner

How long a nightly regression takes on your compute, and how many failures you'll have to triage in the morning.

TOTAL RUNS–
CPU HOURS–
WALL-CLOCK–
FAILURES TO TRIAGE–

 

WHO BUILDS WHAT

Every piece of a UVM environment, and when it does its job

"Where is this created, and how does it connect?" follows every architecture question. This is the answer for each piece.

PIECEKINDCREATED BY / INCONNECTED INWORKS IN
TestComponentrun_test(), by name—build (env, config, overrides); run (starts sequences)
EnvironmentComponentTest, build_phaseconnect_phase: monitors to scoreboard and coverageHolds agents, scoreboard, virtual sequencer
AgentComponentEnv, build_phaseconnect_phase: driver to sequencerBuilds driver and sequencer only when active
SequencerComponentAgent, build_phase (active only)Agent's connect_phaseArbitrates between sequences at run time
DriverComponentAgent, build_phase (active only)seq_item_port to sequencerrun_phase: pulls items, drives pins via the virtual interface
MonitorComponentAgent, build_phase (always)analysis_port to subscribersrun_phase: samples pins, writes transactions
ScoreboardComponentEnv, build_phaseAnalysis imps or TLM FIFOsrun_phase compares; check_phase reports leftovers
SequenceObjectTest or virtual sequence, any timestart(sequencer)body(), at run time
Sequence itemObjectSequence, per transactionPassed by handleRandomised, driven, monitored, compared
BROWSE BY TOPIC

50 UVM interview questions across 10 topics

A sample of what DV interviewers ask most. The 616-question ebook covers each topic in much more depth, chapter by chapter.

Fundamentals

Why UVM, and what it's made of.

  • What problem does UVM solve that a plain SystemVerilog testbench doesn't?
  • Why is a sequence an object but a driver a component?
  • What do the `uvm_*_utils macros actually register?
  • What is a self-checking testbench?
  • What does run_test() do, and where does the test name come from?

Factory

Swapping classes without editing code.

  • Why call type_id::create() instead of new()?
  • What's the difference between a type override and an instance override?
  • Why must an override be set before the component is built?
  • Why are name-based overrides riskier than type-based ones?
  • How do you check which overrides are active?

Config DB & Interfaces

Passing settings and handles down the tree.

  • How does a driver get its virtual interface?
  • What do the context and instance-path arguments of set() mean?
  • Why use one config object instead of many separate settings?
  • Who wins when two components set the same field?
  • How would you debug a get() that returns 0?

Phasing & Objections

When things happen, and when they stop.

  • Why is build top-down but connect bottom-up?
  • Which phases are tasks, and which are functions?
  • Who should raise objections: the test, the sequence or the driver?
  • What is drain time for?
  • How do the runtime sub-phases relate to run_phase?

Sequences & Sequencer

Generating stimulus.

  • What do start_item() and finish_item() each wait for?
  • How does a sequence get a response back from the driver?
  • What's the difference between lock() and grab()?
  • Why use a virtual sequence, and what is p_sequencer?
  • How would you layer a high-level sequence over a protocol sequence?

Driver & Monitor

Turning transactions into pins and back.

  • What's the difference between get_next_item() and try_next_item()?
  • How should a driver behave during reset?
  • Why must a monitor never drive anything?
  • When should a monitor create a new transaction object?
  • Where should protocol checks live: monitor, assertions or scoreboard?

Agent & Environment

Packaging for reuse.

  • What's the difference between an active and a passive agent?
  • How do you build a variable number of agents from configuration?
  • How would you reuse a block-level environment at subsystem level?
  • Why shouldn't an environment know which test is running?
  • What belongs in an agent's config object?

TLM & Scoreboard

Moving and checking transactions.

  • What's the difference between a port, an export and an imp?
  • Why is an analysis port one-to-many and non-blocking?
  • How does a scoreboard take two different analysis inputs?
  • When do you need a reference model, and when is a queue enough?
  • How do you check out-of-order responses?

RAL

Registers as objects.

  • What problem does the register layer solve?
  • What does the adapter convert, in each direction?
  • What's the difference between front-door and back-door access?
  • What are the desired and mirrored values?
  • What do explicit and implicit prediction mean?

Debug & Reporting

Finding out what really happened.

  • How do message IDs and verbosity help when debugging a long log?
  • How would you demote one known error for a single test?
  • What does print_topology() tell you?
  • How do you debug a failure that only appears with some seeds?
  • When is a callback better than a factory override?

These are samples. The full bank has 616 questions.

24 chapters, one for each layer of a UVM environment, plus debugging methodology, scalable architecture and 35 real-world scenarios. Questions only, so you practise producing answers.

See the full question bank
N1 · PHASE ORDERBEGINNERA test builds an env, which builds an agent with a driver and a monitor. In what order do their build_phase and connect_phase run?Show solution ↓
build   (top-down):  test → env → agent → driver, monitor
connect (bottom-up): driver, monitor → agent → env → test

Note: never rely on the order between siblings such as driver and monitor.

N2 · CONFIG DB PRECEDENCEINTERMEDIATEIn build_phase, the test sets is_active = UVM_PASSIVE for "env.agt*"; the env then sets is_active = UVM_ACTIVE for "agt". What does the agent get?Show solution ↓
During build_phase, a set from higher in the hierarchy wins.
test (higher) → UVM_PASSIVE
env  (lower)  → ignored for this field
Agent is PASSIVE.

Note: this is what lets a test override an environment's defaults. After build, the last set wins instead.

N3 · FACTORY PRECEDENCEINTERMEDIATEA test sets a type override bus_driver → drv_a and an instance override bus_driver → drv_b for "env.agt0.*". Which class does each of agt0 and agt1 get?Show solution ↓
agt0.drv : instance override matches → drv_b
agt1.drv : no instance match → type override → drv_a

Note: instance overrides are checked first, then type overrides.

N4 · OBJECTIONSINTERMEDIATEThe test raises an objection at 0 and drops it at 100 ns. A sequence raises one at 10 ns and drops it at 250 ns. Drain time is 50 ns. When does run_phase end?Show solution ↓
count: 0 ns → 1, 10 ns → 2, 100 ns → 1, 250 ns → 0
count reaches 0 at 250 ns, drain 50 ns
run_phase ends at 300 ns

Note: if something raises again during the drain, the phase keeps running.

N5 · ARBITRATIONBEGINNERTwo sequences always have items ready on one sequencer set to UVM_SEQ_ARB_WEIGHTED, with priorities 300 and 100. What share of grants does each get?Show solution ↓
Total weight = 300 + 100 = 400
A: 300 / 400 = 75%
B: 100 / 400 = 25%

Note: with the default FIFO arbitration, priority is ignored and requests are granted in arrival order.

N6 · RAL MIRRORINTERMEDIATEA register is modelled as fully RW. You write 8'hA5 through the front door, then call mirror(UVM_CHECK). The RTL actually ties bit 7 to 0. What happens?Show solution ↓
Mirror after write: 8'hA5   (1010_0101)
DUT read back:      8'h25   (0010_0101)
mirror(UVM_CHECK) → error: expected A5, read 25

Note: the check doesn't say which side is wrong. Compare the register spec: either the RTL has a bug or bit 7 should be modelled read-only.

N7 · REGRESSION SIZEBEGINNER40 tests × 25 seeds, 12 minutes per run, 50 parallel slots, 2% fail rate. How long does it take, and how many failures land on your desk?Show solution ↓
Runs        = 40 × 25 = 1,000
CPU time    = 1,000 × 12 min = 12,000 min = 200 h
Wall-clock  = 200 h / 50 = 4 h
Failures    = 2% × 1,000 = 20

Note: group the 20 by error ID and first message; they're often two or three real bugs. The calculator above does the same sums.

N8 · VERBOSITYBEGINNERWith +UVM_VERBOSITY=UVM_MEDIUM, which print: an info at UVM_NONE, an info at UVM_MEDIUM, an info at UVM_HIGH, and a `uvm_warning?Show solution ↓
info  UVM_NONE    → printed  (always)
info  UVM_MEDIUM  → printed  (≤ MEDIUM)
info  UVM_HIGH    → hidden   (> MEDIUM)
warning           → printed  (not filtered by verbosity)

Note: use UVM_LOW for "one line per test" messages, HIGH and above for per-transaction detail.

UVM_INFO @ 0: reporter [RNTST] Running test err_inject_test...
UVM_WARNING @ 0: reporter [BDTYP] Cannot create a component of type
  'bus_err_drvier' because it is not registered with the factory.   (1)
UVM_INFO @ 0: uvm_test_top.env [CFG] 2 agents, scoreboard on, coverage on
UVM_ERROR @ 1250: uvm_test_top.env.sb [SB/MISMATCH] addr 0x40:
  exp data=0x1f got data=0x00                                        (2)
UVM_ERROR @ 1290: uvm_test_top.env.sb [SB/MISMATCH] addr 0x44: ...
  ... 36 more SB/MISMATCH, all after 1250 ...                        (3)
UVM_FATAL @ 9200000: reporter [PH_TIMEOUT] Explicit timeout of
  9200000 hit, indicating a probable testbench issue                 (4)

--- UVM Report Summary ---
UVM_INFO    : 412
UVM_WARNING :   1
UVM_ERROR   :  38
UVM_FATAL   :   1
[BDTYP] 1   [SB/MISMATCH] 38   [PH_TIMEOUT] 1                        (5)
  1. The override is misspelt (drvier), so the error-injection driver was never created. The test ran with the normal driver while claiming to inject errors. It's only a warning.
  2. The first mismatch is the one to debug. Data 0x00 often means the monitor sampled before the data was valid, or the read happened before the write completed.
  3. 36 more mismatches after it are probably the same cause repeating; the scoreboard queue may simply be out of step.
  4. The run phase never ended: an objection still held, or a sequence stuck waiting for item_done() or a response.
  5. The summary by ID says there are three distinct problems, not forty.
What would you fix first?

The BDTYP warning. Until the override works, this test isn't testing what its name says, so its other failures may mean nothing. Then debug the first mismatch at 1250 ns, then the timeout.

How would you make the misspelt override fail loudly next time?

Use type-based overrides (bus_driver::type_id::set_type_override(bus_err_driver::get_type())), which fail at compile time if the class name is wrong. Or promote the warning in the base test: set_report_severity_id_override(UVM_WARNING, "BDTYP", UVM_ERROR).

What would you rerun with to debug the timeout?

+UVM_OBJECTION_TRACE to see who still holds an objection, a lower timeout so the run fails faster, and +UVM_VERBOSITY=UVM_HIGH on the driver to see the last item it started.

Is a regression with 38 errors and a fatal "one failure"?

For triage, yes: one test, one seed. But record all three signatures separately so the timeout isn't forgotten once the mismatch is fixed. The ebook has full chapters on debugging methodology and real-world scenarios like this.

Is a sequence an object or a component?

An object.

Which phase is a task?

run_phase (and its runtime sub-phases).

Which phase runs top-down?

build_phase.

Where are TLM ports connected?

connect_phase.

Macro to register a component?

`uvm_component_utils.

Instance or type override: which wins?

Instance.

What does config_db::get return on failure?

0.

What does finish_item wait for?

The driver's item_done().

Non-blocking alternative to get_next_item?

try_next_item().

What does a passive agent contain?

Only a monitor.

How many subscribers can an analysis port have?

Zero or more.

Method a subscriber implements?

write().

When does a run-time phase end?

When all objections are dropped, plus drain time.

Default sequencer arbitration?

UVM_SEQ_ARB_FIFO.

lock() or grab(): which jumps the queue?

grab().

Back-door register read?

peek().

RAL class that converts to bus items?

The adapter (reg2bus / bus2reg).

Is verbosity applied to errors?

No, only to info messages.

Switch to trace config DB activity?

+UVM_CONFIG_DB_TRACE.

Choose the test at run time?

+UVM_TESTNAME=<name>.

COMMON MISTAKES

What costs candidates the most in UVM rounds

×

Reciting class names

"Driver, monitor, agent, scoreboard" isn't an answer. Say what each does, in which phase, and how they connect.

×

Using new() for components

It works until the first test tries to override something. Use type_id::create() everywhere.

×

Ignoring return values

An unchecked config_db::get() or randomize() turns a setup mistake into a mystery much later.

×

Objections in the wrong place

None at all ends the test at time 0; one in a forever-running driver means the test never ends.

×

Test logic inside the environment

Checks for test names inside agents or the env make them impossible to reuse. Configure instead.

×

Trusting a green regression

Without coverage and a check that every expected item was seen, a passing test may simply have done nothing.

QUICK FAQ

Before you start preparing

What do UVM interviews focus on?

Testbench architecture (objects, components, phases), the factory and config DB, the sequence-driver handshake, agents and analysis ports, scoreboards, objections and RAL, then debugging and reuse questions for experienced candidates.

Do I need SystemVerilog before UVM?

Yes. Classes, inheritance, virtual methods, parameterised classes, constraints and fork-join are all used directly in UVM code. The SystemVerilog questions are the place to start.

Which UVM version should I learn?

The concepts are the same across UVM 1.1d, 1.2 and the IEEE 1800.2 versions. A few method names and deprecations differ; mention the version your project used if a detail depends on it.

Where can I practise without a licence?

EDA Playground lets you run UVM testbenches in the browser for free, which is enough to write a small agent, sequence and scoreboard end to end.

What should a fresher prepare first?

Object vs component, the phase order, the factory and create(), config DB for virtual interfaces, the sequence-driver handshake, an agent's structure, analysis ports and a simple scoreboard.

Will I be asked to write UVM code?

Usually short pieces: a sequence body, a driver run_phase, a config DB get, a factory override or a scoreboard write function. Getting the exact API calls right matters.

Want to be tested on these live?

Book a 1:1 mock interview with a mentor working in this exact domain.

Book a mock interview