Understand it.
Explain it with confidence.
Practical questions for design verification interviews. Start with the short answer, connect it to an example, then try the follow-up aloud.
91 questions · 9 topics · Foundation to advanced
Showing 91 questions
What do the sequence, driver and monitor each do?
Short answer. A sequence describes transactions. The driver turns them into interface activity. The monitor reconstructs transactions from observed signals.
Make it practical. Think of ordering a parcel, dispatching it, and recording what actually crossed the loading gate. The order alone does not prove delivery.
Follow-up: Can a monitor replace a driver?
No. Observation and stimulus have different responsibilities.
Why use factory create instead of new?
Short answer. Factory creation allows a registered type to be replaced through an override. A direct constructor call bypasses that lookup.
Make it practical. A test can select an error-injecting driver without editing the environment.
Follow-up: Why might an override fail?
Check registration, creation method, override timing and instance path.
Why does a UVM test end before traffic finishes?
Short answer. A task phase can finish when no objections remain. Keep an objection while required activity and checking are outstanding.
Make it practical. A sequence ending does not necessarily mean the last response has arrived.
Follow-up: Should every component keep an objection?
Use a clear owner; uncontrolled objections can prevent completion.
Why is an input monitor useful to a scoreboard?
Short answer. It tells the predictor what the DUT actually accepted, not merely what a sequence intended to send. Compare predicted results with monitored outputs.
Make it practical. A stalled request should not enter the expected queue as an accepted transfer.
Follow-up: What if outputs are reordered?
Match with an identifier and enforce the ordering rules that apply to that stream.
Does assigning one class variable to another copy the object?
Short answer. No. It copies the handle. Both variables can refer to the same object. A shallow object copy creates a new outer object but still shares nested object handles.
Make it practical. Two labels can point to the same box. Changing the box contents changes what either label finds.
Follow-up: When do you need a deep copy?
When nested objects must also be independent. Define which members are copied and which are intentionally shared.
Why can a queue contain the latest packet several times?
Short answer. A queue of class handles can hold repeated references to one reused object. Later edits then appear through every reference.
Make it practical. Publish a fresh transaction for each transfer, or capture a suitable copy before the producer changes it.
Follow-up: Does copying at dequeue fix it?
No. Earlier values may already have been overwritten.
When does an AXI transfer happen?
Short answer. A channel transfers one beat at a rising clock edge where both VALID and READY are asserted. Seeing either signal alone is insufficient.
Make it practical. VALID stays high for three edges, but READY is high only on the third: one beat transfers.
Follow-up: What if both remain high for three edges?
Three beats transfer; the payload may change between accepted beats.
Can the source wait for READY before asserting VALID?
Short answer. No. The source must not make VALID depend on READY. Otherwise two endpoints waiting on each other can deadlock.
Make it practical. The source announces available data; the receiver announces capacity.
Follow-up: Can the receiver wait for VALID?
Yes, subject to the applicable channel rules.
What must remain stable during backpressure?
Short answer. Once VALID is asserted, keep it asserted and keep that channel’s payload stable until acceptance.
Make it practical. When WVALID is high and WREADY low, hold WDATA and the associated control information.
Follow-up: What bug should a checker detect?
A payload change during the stall, or VALID disappearing before a handshake, outside reset.
Must write address and write data arrive together?
Short answer. No. AXI has independent write-address and write-data channels. Verification must allow their handshakes at different times.
Make it practical. Delay address acceptance while accepting write data, then try the reverse.
Follow-up: Is write data enough for a response?
For AXI4, the write response requires accepted address and completion of the write-data burst.
A test passes. What does that actually prove?
Short answer. Only that the checks exercised in that run did not report a failure. First establish that useful stimulus reached the DUT and that the relevant checkers ran.
Make it practical. A disabled scoreboard can make a broken design look clean. Track accepted traffic and completed comparisons alongside pass status.
Follow-up: How would you validate the checker?
Introduce a controlled mismatch and confirm that the intended check detects it.
How do you debug a failure that happens only in regression?
Short answer. Preserve the seed, executable, source revisions, runtime options, configuration and logs. Reproduce that exact setup before changing anything.
Make it practical. A local pass with a newer binary is a different experiment. Compare inputs before assuming a simulator race.
Follow-up: What if the exact run still differs?
Investigate external files, uninitialized state, scheduling races and shared resources; change one variable at a time.
How would you verify a small FIFO?
Short answer. Start with its contract: depth, reset, ordering and behavior for simultaneous reads and writes. Model accepted operations and compare returned data.
Make it practical. For a depth-four FIFO, fill it, attempt another write, drain it, and test both operations at the full and empty boundaries. Expected acceptance depends on the specification.
Follow-up: Is checking full and empty enough?
No. Also check data order, loss, duplication, occupancy transitions and reset behavior.
What should a scoreboard do when reset arrives mid-transaction?
Short answer. Follow the reset contract. Determine whether each outstanding operation is cancelled, retained or completed, then update expected state accordingly.
Make it practical. If a reset cancels a request, keeping its expected response can create a false mismatch later. If the request survives, flushing it can hide a loss.
Follow-up: What about a late response with a reused ID?
Track reset generations where needed and check how the protocol distinguishes stale traffic.
The chip stops booting. Where do you begin?
Short answer. Find the last confirmed milestone and the first missing one. Check the dependencies of that transition: clocks, reset release, power, memory access, configuration and response completion.
Make it practical. If a processor waits on a register read, trace request acceptance, routing, target availability and the return path.
Follow-up: Why not inspect the final timeout first?
The timeout marks the symptom. The first missing event usually narrows the cause more effectively.
Coverage is high. How do you decide whether to sign off?
Short answer. Review requirements and their checks, uncovered scenarios, exclusions, unresolved bugs and configuration coverage. A percentage is evidence about a model, not a guarantee that the model is complete.
Make it practical. A covered reset bin says little if no test checks outstanding transactions across that reset. Link scenarios to observable pass criteria.
Follow-up: What would you report to a lead?
State what is verified, what remains uncertain, the evidence, and the risk of each accepted gap.
Why can an if statement miss a mismatch when a signal is X?
Short answer. With four-state operands, logical inequality (!=) can produce X when the result is uncertain. An if branch runs only when its condition evaluates as true. Use case inequality (!==) for an exact four-state mismatch check, and check unknowns explicitly when valid data must contain only zeros and ones.
Make it practical. Suppose expected is 4'b0101 and actual is 4'b01x1. The expression actual != expected evaluates to X, so if (actual != expected) may skip the error branch. The expression actual !== expected evaluates to 1 and detects this mismatch.
Follow-up. Does case equality guarantee that the data is valid?
No. Two matching X patterns compare equal with ===. If unknown bits are forbidden, check $isunknown(actual) when the data is valid. Keep the sampled value four-state so conversion to a two-state type cannot erase the unknown.
Two agents receive the same virtual interface. How would you find the configuration mistake?
Short answer. Check the context, instance path, field name and type used by every configuration set and get. A broad wildcard can make the same interface visible to both agents. Give each agent the intended interface through a narrowly scoped setting and check whether each get succeeds.
Make it practical. An environment has sensor_agent and flash_agent. Setting vif for every descendant can connect both drivers to one interface. Instead, target env.sensor_agent.* and env.flash_agent.* from the test, using the matching virtual-interface type at each set and get. Confirm the driver instance paths in the built hierarchy.
Follow-up. Which value wins if two settings match?
During build, a setting made from a higher component level has higher precedence. At the same level, the last setting wins. After build, settings use default precedence and the last matching setting wins. Enable +UVM_CONFIG_DB_TRACE to inspect the accesses.
An assertion reports no failures, but the request never happened. What did you check?
Short answer. An implication only requires its consequent when the antecedent matches. A false antecedent gives a vacuous success for that attempt. Cover the trigger and the intended sequence so you can tell whether the requirement was exercised.
Make it practical. For a request that requires grant on the next sampled clock, use assert property (@(posedge clk) disable iff (!rst_n) req |=> gnt). Add cover property (@(posedge clk) disable iff (!rst_n) req ##1 gnt). With req always low, the assertion has no failing request attempt and the sequence coverage has no hit.
Follow-up. What changes if req stays high for three clocks?
Each sampled high value starts an attempt. If the contract concerns only a new request edge, use $rose(req) consistently in the assertion and coverage. First agree whether a held-high request represents one request or repeated requests.
Can iff remove an unsupported mode from a coverage model?
Short answer. An iff expression controls whether a sample is counted. It does not remove the bin from the coverage model. Represent unsupported values through the bin definitions or appropriate ignore_bins, based on the configuration and verification requirements.
Make it practical. Imagine separate read and write bins, with the write bin guarded by iff (write_enabled). In a read-only configuration, the guard prevents write hits, but the write bin still exists. Build a model for the supported operation set so the reported goal matches that configuration.
Follow-up. When is iff the right choice?
Use it when a supported event should count only under a valid sampling condition, such as a completed transfer. A temporarily disabled supported feature still needs verification when it becomes enabled. Exclude a scenario only when the configuration or specification makes it inapplicable.
Why can an I2C controller see an ACK when the target model is disabled?
Short answer. During the ninth clock, the transmitter must release SDA so the receiver can acknowledge by pulling it low. If the controller keeps driving low after transmitting an address, it can mistake its own drive for an ACK. A stuck line or another device can also cause a low level.
Make it practical. In a seven-bit write transaction, the direction bit is zero. A faulty controller leaves that zero driven during the ACK clock. Disable the target model and inspect both SDA and the controller drive-enable. With a pull-up and every device releasing SDA, the ninth bit should be high and the controller should observe NACK.
Follow-up. Who generates ACK when the controller reads a data byte?
The controller is the receiver of that byte, so it generates ACK to request another byte. It sends NACK after the final byte it wants to read. The controller still supplies the clock pulses.
Does an inline constraint replace a class constraint?
Short answer. Ordinary enabled class constraints and inline constraints must be satisfied together. Conflicting requirements make randomize() fail. Check its return value before sending the transaction. A soft constraint can yield to a conflicting hard constraint.
Make it practical. A packet has a hard constraint length inside {[1:8]}. Calling pkt.randomize() with {length == 12;} cannot succeed. To generate a supported longer packet, revise the intended constraint or deliberately disable the relevant named constraint before randomizing.
Follow-up. Will retrying with another seed solve this conflict?
No. No value can satisfy these two hard constraints. Use the solver diagnostic to locate the conflict and fix the intended legal set. A different seed can select a different legal solution only when solutions exist.
The driver sent one item, then the sequence stopped. Which handshake would you inspect?
Short answer. For a driver using get_next_item(), check that a matching item_done() occurs after the driver has finished its agreed handling of that item. The sequence can remain blocked in finish_item() while this completion is missing.
Make it practical. A driver obtains a write request and successfully drives it. An early return in its error-handling branch skips item_done(), so the next sequence item never starts. Trace acquisition and completion around that branch and make sure each acquired item has exactly one completion.
Follow-up. Does item_done() always mean the DUT response has arrived?
No. It completes the sequence-driver item handshake. A pipelined driver may complete that handshake after accepting responsibility for the request and return a response later. Define that policy, preserve any data needed after completion, and check outstanding DUT responses separately.
Is an eight-beat AXI4 write starting at 0x0FF0 legal?
Short answer. You need the burst type and bytes per beat to decide. For an aligned INCR burst with four bytes per beat, eight beats span 0x0FF0 through 0x100F. That crosses a 4 KB boundary, which an AXI burst must not cross.
Make it practical. Split the 32-byte operation into two four-beat bursts. The first starts at 0x0FF0 and ends at 0x0FFF. The second starts at 0x1000 and ends at 0x100F. Each has AWLEN equal to 3 and AWSIZE equal to 2. This example assumes both destinations support the accesses.
Follow-up. Can zero write strobes on the last beats make the original burst legal?
No. Byte enables do not change the burst address progression. The burst still crosses the boundary. Constrain valid stimulus to legal bursts and check malformed traffic only as an explicit negative test with agreed expected behavior.
Why synchronize reset release separately in two clock domains?
Short answer. With asynchronous assertion and synchronous release, each domain needs its reset release aligned to its own clock. A release synchronized to one unrelated clock can arrive near an active edge of the other clock. Review reset-domain crossings and the dependency between domains as well.
Make it practical. A peripheral clock is gated while the processor clock is running. Releasing the external reset allows the processor domain to recover, but the peripheral reset synchronizer still needs clock edges. Enable the required clock, wait for the specified local reset release, then permit accesses that depend on the peripheral.
Follow-up. Can a passing RTL simulation prove reset release is safe from metastability?
No. Ordinary RTL simulation does not model analog metastability. Use structural reset and clock-domain checks plus implementation timing checks for that risk. Simulation can still verify release sequencing, stopped-clock behavior and access gating.
Both coverpoints reach 100%. Why can their cross still have holes?
Short answer. Individual coverpoints show that each value or category appeared. A cross records which combinations appeared together at a sample. Full individual coverage does not imply that every required combination occurred.
Make it practical. Your transaction monitor sees read-short and write-long transfers. The operation coverpoint has seen read and write, and the length coverpoint has seen short and long. But read-long and write-short remain untested combinations. Sample operation and length from the same completed transaction.
Follow-up. Should every possible combination be a coverage goal?
Use the specification to identify legal, meaningful combinations. Document exclusions for impossible combinations and add directed stimulus for missing required ones. A combination hit also needs a corresponding correctness check before it supports a verification claim.
In SPI mode 0, when must the first data bit be ready?
Short answer. Before the first rising SCLK edge after chip select becomes active. Mode 0 has CPOL=0 and CPHA=0: the clock idles low and the receiver samples on the leading, rising edge. Later bits are normally changed on falling edges.
Make it practical. For an MSB-first transfer of 0x80, present the first 1 before the first rising edge. A driver that waits for that edge to launch the first bit can race the receiver or shift the received word. Check chip-select setup and the device-specific data setup and hold times.
Follow-up. Does CPOL=1 always mean sampling on falling edges?
No. CPHA also matters. Mode 2 (CPOL=1, CPHA=0) samples on the first, falling edge; mode 3 (CPOL=1, CPHA=1) samples on the second, rising edge. Configure both endpoints and the monitor for the same supported mode.
Does calling the register model reset() reset the hardware?
Short answer. No. It updates the model’s desired and mirrored field values for the specified reset kind. The testbench must separately apply the DUT reset and wait until register access is permitted. Then check readable reset values against the specification.
Make it practical. A configuration register contains 0x35 and its hard-reset value is 0x00. Calling regmodel.reset("HARD") alone can make the model expect zero while the physical register still contains 0x35. Drive the actual reset, synchronize the model with that event, and read back the register when the bus is ready.
Follow-up. Can you use the hard-reset values after every warm reset?
Only if the specification says those fields reset that way. Retained fields need retained expectations. Model the applicable reset kind and affected fields explicitly; do not overwrite retained state with hard-reset defaults.
Why does a timeout fire after a fork...join_any operation already completed?
Short answer. join_any resumes the parent when one child finishes; it does not cancel the remaining children. A timeout branch can therefore keep running after the response branch wins. Cancel the losing branch with controlled process cleanup.
Make it practical. A response arrives after 12 clocks, beating a 100-clock watchdog. Without cleanup, the watchdog still reports an error at clock 100. Put the response/timeout race in a dedicated child process, then use disable fork after its inner join_any to stop that race’s remaining children.
Follow-up. Why isolate the race before using disable fork?
disable fork acts on the calling process’s active descendants, not merely the nearest textual fork block. Isolation protects unrelated background workers. Also define what wins if response and timeout occur on the same clock; thread scheduling order is not a reliable timeout policy.
Why does an assertion fail even though its error message prints matching values?
Short answer. A clocked concurrent assertion normally checks sampled values from the Preponed region. Its failure action runs later, in the Reactive region. An ordinary signal reference in the error message can show a newer value. Print $sampled(signal) to report what that assertion actually checked.
Make it practical. At a rising clock edge, a is 0 and b is 1. The property @(posedge clk) a == b fails. A nonblocking assignment changes b to 0 later in that time slot, so a plain error message can print a=0, b=0. Printing $sampled(a) and $sampled(b) shows the failing pair 0 and 1.
Follow-up. Should you add an arbitrary delay to make the assertion pass?
No. First decide which clock event and values the requirement concerns. If it concerns a registered result visible at the next sampling edge, express that timing explicitly. Fix the property’s timing or the RTL behavior rather than hiding the mismatch with a delay.
How should a checker detect an early WLAST in an AXI4 write burst?
Short answer. Associate the write data with its address transaction and compare accepted beat count with AWLEN+1. WLAST must mark the final beat, not shorten the promised burst. Count transfers only when WVALID and WREADY are both high.
Make it practical. For AWLEN=3, expect four accepted data beats. WLAST on the second accepted beat is a protocol error. If the fourth beat is stalled for three clocks, it is still one beat: hold WLAST and the data until that beat is accepted.
Follow-up. What if write data arrives before the address handshake?
Buffer the observed data information and reconcile it when the address becomes available; independent channels permit that timing. For multiple AXI4 writes, preserve write-transaction order because write data cannot interleave between bursts. Do not assume an early WLAST guarantees a particular error response from every target.
Why can a negative signed value compare greater than an unsigned value?
Short answer. A mixed signed/unsigned integral comparison uses unsigned interpretation. Inspect both operand types and widths before treating the result as a DUT bug. Convert both operands to a sufficiently wide signed type when the intended comparison is mathematical.
Make it practical. With int delta = -1 and int unsigned limit = 1, delta < limit is false: the comparison treats the 32-bit pattern for -1 as a large unsigned number. For these 32-bit operands, longint'(delta) < longint'(limit) compares signed 64-bit values and is true.
Follow-up. Is casting the unsigned operand to signed at the same width always safe?
No. An unsigned value with its top bit set becomes negative if reinterpreted as signed at that width. Widen enough to preserve its positive range, and ensure both comparison operands have the intended signed type.
How can a scoreboard wait for a matching transaction without blocking analysis write()?
Short answer. Keep the analysis write() callback free of delays and blocking waits. Buffer incoming transactions, commonly with a uvm_tlm_analysis_fifo, and let a separate task consume them and perform any required waiting or matching.
Make it practical. An input monitor publishes a request at clock 10, while the output monitor publishes its result at clock 14. Connect each stream to its own analysis FIFO. A scoreboard task can wait for entries through get(), then compare the appropriate request and result. For reordered traffic, match by the specified identifier rather than blindly pairing FIFO heads.
Follow-up. Does an analysis FIFO apply backpressure if the scoreboard falls behind?
No. It is unbounded and its analysis write interface cannot wait for capacity. Watch queue growth, missing matches and end-of-test leftovers. A continually growing queue can expose a stalled checker or a missing stream, even while stimulus keeps running.
When does an APB write complete if PREADY stays low?
Short answer. It completes on a rising PCLK edge with PSEL, PENABLE and PREADY all high. During an extended Access phase, keep the request stable, including address, direction and write data. Do not count each wait-state clock as another write.
Make it practical. A write to address 0x20 enters Access with PREADY low for two clocks. Keep PSEL and PENABLE asserted and hold the request through those waits. When PREADY is high at the next rising edge, the monitor records one completed write.
Follow-up. Can PENABLE stay high for a second transfer to the same peripheral?
No. Even back-to-back transfers need a Setup phase with PENABLE low. PSEL can remain asserted when the same peripheral stays selected. Check that the next address and data belong to that new Setup phase, not to the stalled previous transfer.
Why must an I2C controller observe SCL after releasing it?
Short answer. On a bus supporting clock stretching, releasing the controller’s low drive does not guarantee that SCL has risen. A target may still hold the shared line low. Continue the clock sequence from the observed bus level rather than only from the controller’s internal clock command.
Make it practical. In a Standard-mode test, the target holds SCL low after acknowledging a byte while it prepares the next byte. The controller releases SCL, but the monitor must not record a rising edge until the target also releases it and the line actually rises. Check that no data bit is skipped during the pause.
Follow-up. Should every long low period automatically fail the test?
Use the supported mode, device specification and system timeout policy. Clock stretching is optional, and legal timing differs by mode. Test a permitted stretch separately from a stuck-low fault, and verify the specified timeout or recovery behavior for the latter.
Does disable iff pause an assertion attempt until reset ends?
Short answer. No. When the disable condition becomes true, active attempts are aborted rather than suspended. With disable iff (!rst_n), reset can abort an attempt between sampling clocks. Deasserting reset does not resume the old obligation.
Make it practical. Consider @(posedge clk) disable iff (!rst_n) req |-> ##[1:3] ack. A request is sampled, then reset asserts before the acknowledgment arrives. That attempt is disabled; it does not report a missing acknowledgment three clocks later. After reset, a newly sampled request starts a fresh attempt.
Follow-up. What if the requirement says an operation must survive that reset?
Then aborting its checker on that reset would discard required verification. Track the retained operation with a checker or scoreboard whose reset policy matches the specification. Separately check cancellation for operations that are supposed to be discarded.
Why does a weighted constraint generate far more short packets than expected?
Short answer. Check whether the weight applies to each value or to a whole range. In a dist constraint, := assigns the weight to every value in a range; :/ assigns it to the range as a whole. Weights are relative, not necessarily percentages.
Make it practical. Suppose length dist {[1:4] := 10, 8 := 40} is the only constraint affecting length. The four short lengths have total weight 40, equal to length 8. Changing the range entry to [1:4] :/ 10 gives the short range total weight 10, so length 8 has probability 40/50, or 80%.
Follow-up. Does an 80% weight guarantee eight long packets in every ten trials?
No. It describes a probability distribution, not an exact quota for a small batch. Inspect a sufficiently large sample for distribution mistakes. If a test requires an exact mix, build that mix explicitly and randomize its order.
Why turn an IP-level agent passive when reusing it at SoC level?
Short answer. At SoC level, real RTL may already drive the interface that a testbench driver controlled at IP level. A passive agent observes that traffic without competing for signal ownership. Keep its monitor and analysis connections; create and connect the driver and sequencer only when active mode is intended.
Make it practical. An IP test uses an active bus agent to program a peripheral. In the SoC test, the processor runs firmware and performs those writes. Reuse the agent passively to observe accesses and feed checking and coverage, while the processor remains the bus requester.
Follow-up. Does setting UVM_PASSIVE automatically stop a badly implemented driver?
No. The agent implementation must honor its configuration during construction and connection. Check the built topology and signal drivers. A passive monitor must not drive READY or responses; if a testbench endpoint must provide those signals, use an appropriate active responder.
Can an AXI4 read scoreboard use one global expected-response queue?
Short answer. Only if the verified interface contract guarantees a single response order. AXI4 permits read responses for different IDs to return out of request order and their beats to interleave. Responses for the same ID must preserve request order. Track a queue of outstanding bursts per ID and progress within each burst.
Make it practical. Request A uses ID 2 and requests two beats. Later request B uses ID 5 and requests one beat. B may return first. Match RID 5 to B rather than comparing it with the global oldest request A. For ID 2, advance its beat index only on accepted R-channel transfers and check RLAST against the expected final beat.
Follow-up. Is a single expected transaction stored under each ID sufficient?
Not when multiple outstanding requests reuse an ID. Keep them in issue order within that ID and complete the oldest burst before advancing to the next. Also flag unexpected IDs, extra beats, missing responses and incorrect response status.
A coverage bin has hits but is still uncovered. What would you inspect?
Short answer. Check the bin’s hit threshold, especially option.at_least, and the report’s instance and run scope. A hit count below the configured threshold does not make that bin covered. Read the raw counts before assuming sampling failed.
Make it practical. A retry-length coverpoint has option.at_least = 3. Its zero-retry bin has two valid samples, so it remains uncovered; the third qualifying sample reaches the threshold. Confirm that each sample represents a distinct intended observation rather than repeated sampling of the same completed transaction.
Follow-up. Do three hits prove three different corner cases were exercised?
No. A hit threshold counts samples, not diversity or correctness. If retry behavior must be tested under three reset modes, model those modes and their required combinations explicitly, and check the result of each scenario.
Why can a firmware read-modify-write lose an unrelated interrupt flag?
Short answer. For write-one-to-clear status bits, writing a one clears that bit and writing a zero leaves it unchanged. A read-modify-write can write back ones for other pending events and clear them unintentionally. Write a mask containing only the events that should be acknowledged, while respecting the register’s full access policy.
Make it practical. Assume bits 0 and 3 are independent W1C flags, both pending, with no new hardware event during the access. Reading status gives 0x09. Firmware using STATUS |= 0x01 writes 0x09 and clears both flags. A direct write of 0x01 clears bit 0 while preserving bit 3. A firmware/RTL test should verify that preserved flag as well as the acknowledged one.
Follow-up. What if hardware sets a flag on the same cycle that firmware clears it?
The register specification must define the hardware-set versus software-clear priority; W1C alone does not define every collision rule. Drive that collision deliberately, check the specified result and interrupt behavior, and also test whether a still-active source reasserts the flag.
Why can polling get_mirrored_value() miss a hardware status change?
Short answer. get_mirrored_value() returns the register model’s stored mirror; it does not access the DUT. Similarly, get() returns the desired value. To poll a hardware-updated status through the bus, use read() with the intended frontdoor map and check the returned status and data.
Make it practical. A peripheral sets DONE internally, but no observation has updated the register model. A loop that repeatedly calls get_mirrored_value() can keep seeing zero. Perform timed frontdoor reads until DONE is observed or a bounded timeout expires. Keep the polling interval consistent with the test’s timing requirements.
Follow-up. Does enabling a bus predictor make every internal register change visible to the mirror?
No. A bus predictor sees monitored bus operations, not arbitrary internal state changes. Define how hardware-updated fields are observed and predicted. Also check read side effects: repeatedly reading a read-to-clear status can consume the event you are trying to observe.
Does $rose(flags) detect a rising bit anywhere in a vector?
Short answer. No. $rose examines the least significant bit of its expression between sampling events. If each flag matters, check each bit separately. If the requirement is specifically a transition from no flags to at least one flag, apply $rose to the reduction OR, $rose(|flags).
Make it practical. For flags[3:0], a sampled change from 0000 to 0100 does not trigger $rose(flags), because bit 0 stays zero. $rose(flags[2]) detects that bit’s rise, and $rose(|flags) detects the change from no asserted flags to some asserted flag.
Follow-up. Will $rose(|flags) detect a second flag rising while another remains high?
No. For 0001 to 0101, the reduction OR remains one. Use per-bit checks for independent events. Also remember that $rose can count an X- or Z-to-1 transition; add explicit known-value checks when unknown flags are forbidden.
Does an APB error response guarantee that a failed write changed nothing?
Short answer. No. PSLVERR reports a transfer error, but the protocol does not guarantee rollback of peripheral state. Check the peripheral specification for permitted side effects. Sample the response at completion, when PSEL, PENABLE and PREADY are all high.
Make it practical. A negative test writes an unsupported command and receives PSLVERR. The checker should verify the documented error behavior and any specified state changes, rather than automatically restoring the old expected value. If the peripheral contract requires no state change, explicitly check that requirement.
Follow-up. Should a monitor report a failed transfer whenever PSLVERR is high during a wait state?
No. PSLVERR is only valid for the completing Access cycle. A high value while PREADY is low is not by itself a completed error response. Record the response at the completion edge and count the transfer once.
Can an illegal coverage bin replace a protocol assertion?
Short answer. An illegal bin reports an error when its prohibited value is sampled, but it only sees the covergroup’s sampling events. Use a dedicated assertion or checker for the protocol requirement, with an explicit checking window and useful diagnostics. Keep coverage focused on which scenarios were exercised.
Make it practical. A covergroup samples packet type only after a packet finishes. A forbidden type appears on a valid request, but the DUT hangs before completion. The coverage model never samples that packet, so its illegal bin cannot catch the event. A checker at the valid request can report the bad type immediately.
Follow-up. How would you prove that the dedicated checker is enabled?
Inject a controlled prohibited request and confirm that the intended check reports it with the relevant context. Then run a legal request to check for false alarms. Treat this as a check of the verification environment, and document how intentional negative tests are classified.
Does a volatile doorbell write guarantee that a device sees freshly written descriptors?
Short answer. No. volatile alone is not a memory-ordering or cache-coherency mechanism. Use the platform’s prescribed memory attributes, barriers, cache maintenance where required, and I/O accessors. The requirement is that descriptor contents become visible before the device is told to consume them.
Make it practical. Firmware fills a descriptor in normal memory and then writes a volatile START register. A test with a simple memory model may pass even though the real system can expose START before the descriptor is visible. Verify the platform’s required ordering sequence and compare the descriptor data actually read by the device with the intended contents.
Follow-up. If the DMA memory is coherent, can the test ignore ordering?
No. Coherency and ordering solve different problems. Coherent memory can still require barriers before ownership is handed to a device. Exercise the supported memory configuration and delays, and state honestly if the simulation model cannot expose reordering or stale-cache failures.
Why can an array sum wrap even when its destination is an int?
Short answer. An array reduction uses the element type, or the type of its with expression, to determine the result type. Assigning that result to a wider variable does not recover bits already lost. Widen each element before summing, and choose a width that holds the largest possible total.
Make it practical. For bit [7:0] samples[2] containing 200 and 100, samples.sum() can produce the eight-bit result 44. Use samples.sum() with (int'(item)) to obtain 300 for this small unsigned-byte array. The widening belongs inside the reduction.
Follow-up. Is casting every array element to int always sufficient?
No. A larger array or larger elements can overflow a 32-bit sum too. Calculate the maximum total and select a sufficiently wide signed or unsigned type. Include boundary totals in a small directed test before trusting a sum constraint.
Why does a sequence report response queue overflow even though every request completes?
Short answer. Completing the request handshake does not consume response objects. If the driver sends responses, the sequence must retrieve them with get_response() or enable and implement a response handler. Check response routing and production versus consumption counts.
Make it practical. A sequence submits twelve requests, while the driver promptly returns one response per request. If the sequence postpones all response reads until the end, a queue with capacity eight can overflow. Consume responses as traffic proceeds, or deliberately size the queue for the bounded outstanding workload.
Follow-up. Is disabling the overflow message a fix?
No. Suppressing a diagnostic does not recover a dropped response. Verify that each expected response is consumed exactly once and that the test waits for outstanding completions. Increasing capacity only helps when the maximum backlog is understood.
How should an AXI memory scoreboard handle a partial write?
Short answer. Apply WSTRB as a byte-enable mask on each accepted write-data beat. WSTRB bit n controls WDATA bits [8*n+7:8*n]. Preserve bytes whose strobes are zero, and derive the permitted byte lanes from the transfer address and size.
Make it practical. For an aligned four-byte transfer on a 32-bit bus, let the old word be 0x11223344, WDATA be 0xAABBCCDD and WSTRB be 4'b0101. The expected new word is 0x11BB33DD: byte lanes zero and two change. This example uses ordinary byte-addressable memory, not a register with special write side effects.
Follow-up. Can the scoreboard simply mask both expected and actual data during the later read?
No. That can hide corruption of untouched bytes. Update only enabled bytes in the memory model, then compare all valid bytes returned by the read. Separately check that the strobes are legal for the transfer.
Can a $past-based check use history from before reset?
Short answer. Yes, if the checker does not explicitly guard the history it uses. disable iff aborts assertion attempts; it is not a promise that sampled-value history has been cleared. Enable comparisons only after enough relevant post-reset samples exist. Before sufficient simulation history exists, $past returns the default sampled value.
Make it practical. A checker compares a two-cycle pipeline output with $past(input_data, 2). Immediately after reset, those two earlier samples may belong to reset or an earlier operation. Reset a history-valid counter and wait until two post-reset sampling edges have been recorded before enabling that comparison.
Follow-up. What if the $past call uses a sampling gate?
Count the qualifying sampling events, not simply elapsed clocks. A gated $past refers to earlier clocks where its gate was true. Keep the history-valid logic aligned with that gate and test reset with long gaps between valid samples.
How do you verify which controller loses I2C arbitration?
Short answer. During arbitration, a controller sending a one releases SDA and observes the resolved bus while SCL is high. If SDA is low instead, it has lost arbitration and must stop driving SDA. The winning transfer must continue without corruption.
Make it practical. Two controllers start together and send matching address bits until one releases SDA for a one while the other drives a zero. Check that the first controller reports arbitration loss, releases its SDA driver, and does not disrupt the remaining transaction. Inspect individual drive enables as well as the shared bus.
Follow-up. Should the losing controller immediately force a STOP?
No. That could interrupt the winner. It must wait for the bus to become free before restarting. A losing controller may continue clock pulses through the end of the byte in which it lost; do not incorrectly require SCL to stop at the loss bit.
Does a semaphore created with one key always enforce mutual exclusion?
Short answer. Only if the testbench manages its keys correctly. new(1) supplies an initial key count, not a maximum capacity. An extra put() can create extra keys and allow multiple processes into a region that was intended to have one owner.
Make it practical. Two workers protect a shared configuration operation with get(1) and put(1). An error path accidentally calls put(1) twice after one acquisition. Later, both workers can obtain a key and overlap. Track successful acquisitions and release exactly the keys acquired on each path.
Follow-up. What if a worker tries get(1) twice before returning its first key?
With no other available key, its second get blocks. A semaphore does not recognize the same process and grant a recursive lock. Avoid nested acquisition of the same one-key semaphore, and test cleanup paths as well as the normal path.
Why can set() followed by update() skip a repeated register write?
Short answer. set() changes the model’s desired value. update() performs an access only when the model determines that an update is needed. For an ordinary RW register whose desired and mirrored values already agree, repeating the same set() need not generate another bus write. Use an explicit frontdoor write() when the access itself is the test objective.
Make it practical. A test must exercise two writes of 0x5A to a configuration register. After the first write and prediction, its mirror is already 0x5A. Calling set(0x5A) and update() again may produce no second transfer. Issue two explicit writes and confirm two completed accesses in the bus monitor.
Follow-up. Should you deliberately corrupt the mirror to force an update?
No. Choose the API that expresses the intended access and preserve a consistent model. For fields with special write policies or hardware updates, also check their access semantics and prediction strategy; a register model is not a substitute for observing the bus.
Where does an AXI4 wrapping burst go after reaching its upper boundary?
Short answer. It returns to the lower boundary of its wrap region. The region size is bytes per beat multiplied by the number of beats. The starting address must be aligned to a beat, but need not be the region’s lowest address. WRAP bursts permit 2, 4, 8 or 16 beats.
Make it practical. For four beats of four bytes starting at 0x3C, the wrap region is 0x30 through 0x3F. The beat addresses are 0x3C, 0x30, 0x34 and 0x38. A scoreboard that treats this as INCR would incorrectly expect 0x40 for the second beat.
Follow-up. Is a four-beat WRAP burst starting at 0x3E legal when each beat is four bytes?
No. The start is not aligned to the four-byte transfer size. Check start alignment, allowed burst length and interface support before generating legal WRAP stimulus. Cover different starting positions within the wrap region.
Can merged coverage hide an untested feature in one IP instance?
Short answer. Yes. An aggregate that unions bin hits across instances can show that a feature occurred somewhere, without proving it occurred in every required instance. Retain and inspect instance-level coverage when the verification goal applies independently to each IP.
Make it practical. Two identical controllers each need read and write tests. Controller A sees only reads; controller B sees only writes. The union contains both operations, but each controller still lacks half its required scenarios. Report the two instances separately and target the missing operation on each.
Follow-up. Does enabling option.per_instance alone define the signoff calculation?
No. It enables separate instance tracking; aggregation and reported metrics also depend on the other coverage options and reporting configuration. Validate those settings with a tiny example containing deliberately different hits, and state whether the goal is per instance or across the whole system.
What does a passing boot test fail to prove when firmware is preloaded through a memory backdoor?
Short answer. It does not prove the loading path that the backdoor bypassed. A preload can efficiently test later firmware execution and RTL interaction, but it cannot establish that the real loader transferred the image correctly. State exactly which boot stages the test executes.
Make it practical. A fast test deposits an image into SRAM and starts execution there. It can check the application’s peripheral accesses, but it has skipped reading the image from external storage and copying it into SRAM. Keep a separate test that boots through that real path and checks the loaded bytes and entry point.
Follow-up. How can you keep the fast test useful without overstating its coverage?
Document the skipped stages and injected state. Match the intended reset state, memory format and any required integrity metadata, then check milestones and externally visible results after the shortcut. Use full-path tests for initialization, loading and authentication requirements that the shortcut bypasses.
Why can an inline constraint accidentally compare a field with itself?
Short answer. Inside an ordinary object randomize() with block, unqualified names are resolved in the randomized object before the calling scope. If both scopes contain length, length == length can constrain nothing useful. Use local::length to explicitly reference the caller’s variable.
Make it practical. A sequence has a local length value of 12, and its request object also has a rand length field. req.randomize() with { length == local::length; } ties the request to the sequence’s value. Check randomize() for failure and inspect the generated request before sending it.
Follow-up. Does local:: override a conflicting constraint in the request class?
No. It changes name resolution, not constraint priority. If an enabled hard constraint requires length to be at most 8, requesting 12 still fails. Distinct variable names can improve readability, but explicit scoping is useful when an API intentionally reuses names.
Why can a UVM event waiter hang even though trigger() was called?
Short answer. wait_trigger() waits for a trigger that it can observe after it begins waiting. If the producer triggers first, the waiter can miss that occurrence. wait_ptrigger() handles a trigger earlier in the same simulation time slice, but it does not queue a history of notifications.
Make it practical. At time 100 ns, a producer calls done.trigger() before a consumer reaches done.wait_trigger(). If no later trigger occurs, the consumer waits forever. For this same-time-slice race, wait_ptrigger() can return immediately. If the consumer starts at 101 ns, use an appropriate stored-state or queued-message design instead.
Follow-up. What should you use when every completion must be counted?
Use a FIFO or mailbox carrying one record per completion, with clear ownership and consumption rules. An event is a notification, not a transaction queue. Test both producer-first and consumer-first scheduling, plus multiple completions before the consumer runs.
Should an arbiter use $onehot or $onehot0 to check its grants?
Short answer. Use $onehot0 when zero or one grant is permitted, and $onehot when exactly one is required. Both count bits that are one; neither alone rejects every X or Z pattern. Add !$isunknown(grant) when the grant vector must be fully known.
Make it practical. For a four-requester arbiter that may idle, 0000 and 0100 are legal but 0101 is not. A sampled check of !$isunknown(grant) && $onehot0(grant) catches both multiple grants and unknown bits. Apply the check during the specified operating window, with the intended reset policy.
Follow-up. Does this check prove that the correct requester wins?
No. It checks grant encoding. Separately verify that a grant corresponds to an eligible request and follows the arbitration policy. Add progress or fairness checks when the specification requires them; a permanently zero grant vector passes onehot0.
Can an AXI4 read burst end early after an error response?
Short answer. No. An error does not cancel the remaining transfers in an AXI4 burst. The responder must still complete the requested beat count, and RLAST must identify the final beat. Check response status on each accepted read beat rather than treating the first error as completion.
Make it practical. An ARLEN value of 3 requests four beats. If the second accepted beat carries SLVERR, the checker must still expect beats three and four, with RLAST on beat four. Keep tracking the burst under its ID and exercise backpressure after the error.
Follow-up. Should the scoreboard compare errored read data with normal memory contents?
Do not assume errored data is a valid successful read. Check data only to the extent the interface contract defines it, while continuing to check status, ID, beat count and completion. Do not assume all other beats must carry the same response status.
Why can a SPI read stall after its command has been transmitted?
Short answer. The controller must continue generating clocks for the target to shift out read data. In conventional four-wire SPI, receiving bits still requires clocking a transfer; transmit data may be filler when the target ignores it. A read command alone does not clock the response back.
Make it practical. For a single-lane command whose device specification requires one opcode byte, three address bytes, eight dummy clocks and one data byte, keep chip select active and generate 48 clocks in total. The monitor must distinguish command, address, dummy and data phases instead of treating the dummy interval as returned data.
Follow-up. Are filler transmit bytes and protocol dummy cycles the same thing?
No. Filler bytes can generate clocks while valid read data arrives. Protocol dummy cycles are a specified latency interval before that data is valid. Their count depends on the device, command and mode; derive it from the configured protocol rather than assuming every read uses eight dummy clocks.
Why can randomize() fail after rand_mode(0) freezes a field?
Short answer. rand_mode(0) stops the solver from choosing a new value for that variable; it does not disable constraints that reference it. The frozen value becomes an input that must still satisfy every enabled constraint. Use constraint_mode() separately only when disabling that requirement is intentional.
Make it practical. A transaction has rand int length and an enabled constraint length inside {[1:8]}. Set length to 12 and call length.rand_mode(0). Randomizing the object fails because the frozen 12 still violates the constraint. Setting it to a legal fixed value, such as 4, permits the solver to solve the other fields.
Follow-up. Will repeating randomize() with more seeds fix this case?
No. The frozen value and enabled constraint are contradictory. Check the return value and the current values of nonrandomized fields. Restore any temporarily changed modes before reusing the object in another scenario.
Why can a newly created driver response fail to reach its requesting sequence?
Short answer. The response needs the request’s UVM sequence and transaction identification. When creating a separate response object, call rsp.set_id_info(req) before returning it through the sequencer response interface. Copy or populate response payload fields separately.
Make it practical. Two sequences share a sequencer. The driver creates a fresh response for a completed request, fills read data and status, and returns it. Without the request’s identification, correct payload data alone does not establish where that response belongs. Preserve the originating request information and apply set_id_info to each matching response.
Follow-up. Does set_id_info copy the bus protocol ID or all request fields?
No. It copies UVM sequence and transaction IDs, not arbitrary protocol fields. The driver must separately associate an out-of-order DUT completion with its original request and populate the response. A bus ID and a UVM transaction ID serve different purposes and need not have the same value.
What should PSTRB contain during an APB read transfer?
Short answer. On an APB interface that includes write strobes, PSTRB must be zero during a read transfer. It indicates valid write-data byte lanes; it is not a read byte-enable mask. Check this for selected read transfers, including their Setup and Access phases.
Make it practical. A 32-bit requester performs a write with PSTRB=4'b0010 and then a read. If its driver leaves the previous strobe value on the read, that is a protocol violation even when PRDATA looks correct. Drive PSTRB to zero for the read and include write-to-read transitions in stimulus.
Follow-up. Can an all-zero PSTRB read tell the peripheral to return no bytes?
No. Read data is carried on PRDATA according to the peripheral’s read semantics. PSTRB does not qualify it. Distinguish an interface with strobes from an older or configured interface where that optional signal is absent.
Does 100% automatic-bin coverage mean every value of an eight-bit field occurred?
Short answer. Not necessarily. With no explicit bins and the default auto_bin_max of 64, an unsigned eight-bit coverpoint groups its 256 values into 64 bins. A hit on one value covers that bin at the default one-hit threshold; the other values in that bin need not have appeared.
Make it practical. For bit [7:0] code, the default bins group 0–3, 4–7, and so on. Sampling 0, 4, 8 and every fourth value through 252 can cover all 64 bins while exercising only 64 of the 256 values. Inspect the bin ranges instead of treating the percentage as a count of distinct values.
Follow-up. What if the requirement really needs every value?
Define explicit per-value bins, for example bins each_value[] = {[0:255]}, or deliberately configure the automatic-bin limit for this small domain. For large fields, model meaningful boundaries and categories unless exhaustive value coverage is truly required.
How can you distinguish lost retention data from firmware clearing it after reset?
Short answer. Check the memory at defined points before and after reset, and separately trace early firmware initialization. Retention hardware may preserve bytes that boot firmware deliberately clears for a particular reset cause. The expected result must include both the hardware reset contract and the boot policy.
Make it practical. Fill a reserved retention region with a distinctive pattern, record the expected reset cause, and request the reset. Observe the region after hardware recovery but before firmware can overwrite it, then check it again after the initialization milestone. If it survives the first check but changes during a documented clear routine, that is different from a retention hardware failure.
Follow-up. Why is checking only a retained magic word insufficient?
One word cannot detect corruption elsewhere, and startup code might rewrite that word. Check the intended region with varied data or an appropriate integrity check, verify the reset cause, and avoid testbench reloads that could conceal a loss. Test retained and deliberately initialized reset cases separately.
Why avoid putting randomize() only inside an assert statement?
Short answer. Randomization is an operation the test needs to execute, not just a condition to observe. If immediate assertions are disabled in a way that skips their expression evaluation, assert(req.randomize()) can skip stimulus generation too. Call randomize() in ordinary control flow and handle its return value explicitly.
Make it practical. Use if (!req.randomize()) followed by a fatal error or another deliberate failure path. A run with assertions disabled should still generate requests. Compare generated transaction counts and values with checking enabled and disabled to catch accidental dependence on assertion execution.
Follow-up. Is void'(req.randomize()) an adequate replacement?
It executes the call, but discards whether it succeeded. A solver failure can then leave old values in use. Check the return value and prevent an unsuccessfully randomized request from being sent.
Does grab() interrupt a transaction already being driven?
Short answer. No. A sequencer grab moves its request to the front of the arbitration queue; it does not undo an item already granted or abort a DUT transfer. It must also wait if another lock or grab blocks the requesting sequence. Distinguish arbitration priority from cancellation.
Make it practical. A background sequence has already handed a packet to the driver when a recovery sequence calls grab(). The driver still needs to finish or explicitly abort that packet under its documented protocol policy. The recovery sequence can control subsequent eligible arbitration after its grab is granted, then release it with ungrab().
Follow-up. Can holding the grab while waiting for another sequence cause a hang?
Yes, if that sequence needs the same sequencer and is blocked by the grab. Keep the exclusive interval bounded, avoid circular dependencies and release ownership on every intended exit path. Trace grants and driver completion separately when debugging.
Where does |=> start checking after a multi-cycle antecedent?
Short answer. For a single-clock property, non-overlapped implication starts its consequent on the clock after the antecedent match ends. Overlapped implication starts on that ending clock. Count from the end of the matched sequence, not from its first event.
Make it practical. In @(posedge clk) (start ##2 ready) |=> done, start at clock 10 and ready at clock 12 require done at clock 13. Replacing |=> with |-> checks done at clock 12. A timing sketch with explicit clock numbers helps expose a one-cycle error.
Follow-up. Does this property also require ready to appear two clocks after start?
No. If ready is absent, the antecedent does not match and that attempt is vacuous. If ready itself is required, check that obligation separately, for example start |-> ##2 ready, using the intended reset policy. Cover the full successful scenario as well.
Does a default coverage bin make every remaining value a coverage goal?
Short answer. No. A default bin collects values not matched by the other bins, but is excluded from the coverage calculation. Use ordinary explicit bins for behaviors that must contribute to the coverage goal. A default bin is useful for investigating unexpected or unclassified samples.
Make it practical. A two-bit operation field has bins read={0}, write={1}, and other=default. Hitting read and write can complete the counted bins even if values 2 and 3 never occur. If those are supported flush and fence commands, give each a normal named bin.
Follow-up. Does a hit in an ordinary default bin automatically report a protocol violation?
No. It records the observation. Check prohibited operations with an appropriate assertion or checker, and keep legitimate but rare operations in the coverage model. Review default-bin hits to find missing classifications or stimulus mistakes.
Will nine recovery clocks always clear a stuck I2C bus?
Short answer. No. For SDA stuck low, the bus-clear procedure calls for nine clock pulses so the device holding SDA may release it. Recovery must observe the actual line levels. If SDA remains low, use the system’s supported hardware-reset or power-cycle recovery policy; a pulse counter alone does not prove success.
Make it practical. Inject a target model that remains partway through transmitting a byte. Check the controller’s recovery pulses on the shared SCL line and whether SDA is released. Then inject a permanent SDA-low fault: the test should see a bounded failure and the specified escalation, not a false bus-free report.
Follow-up. What changes if SCL itself is stuck low?
Toggling the controller’s output command cannot create valid clocks while another device holds SCL low. The recommended recovery uses hardware reset where available, or power cycling where supported. Verify the implemented recovery policy and a successful subsequent transaction after the fault is removed.
Why can every forked worker receive the final loop index?
Short answer. With fork...join_none, child processes do not start until the parent suspends or terminates. If a loop launches workers without suspending, a child that reads the shared loop index later can see its final value. Capture the index in a separate automatic variable for each iteration before launching that worker.
Make it practical. For four lanes, use for (int i=0; i<4; i++) begin automatic int lane=i; fork drive_lane(lane); join_none end, followed by wait fork when completion is required. Each worker receives its own lane number. The workers may still execute in any order.
Follow-up. Why can moving automatic int lane=i inside the forked begin...end fail?
That initialization runs only when the child starts, which may be after the loop finishes. Automatic lifetime gives each child storage; it does not make a late read of i happen earlier.
Why does repeatedly peeking a UVM FIFO return the same transaction?
Short answer. peek() observes the front entry without removing it. get() consumes an entry. Both blocking methods can wait when the FIFO is empty. A scoreboard that peeks in a loop without consuming anything can repeatedly compare the same entry; if nothing in the loop waits, it can also prevent simulation time from advancing.
Make it practical. An expected FIFO contains packets A and B. With a single consumer, two peek() calls both return A. After get() removes A, the next peek() sees B. Use get() for normal processing and reserve peek() for intentional look-ahead.
Follow-up. What must code check when using try_get() instead?
Check its return value before processing the output. On failure it returns zero and leaves the output argument unchanged, so ignoring the result can process an old transaction again. A nonblocking call needs no time to complete.
Can an AXI4 target respond after the last write beat but before accepting the address?
Short answer. No. BVALID must wait until the write address has been accepted and the final write-data beat has been accepted. These are separate channel handshakes and can happen on different clocks. Seeing WLAST high without WVALID and WREADY does not establish data completion.
Make it practical. In a single outstanding write, accept all four data beats while delaying AWREADY. The checker must reject an early BVALID. After the address handshake, allow the response and check that exactly one response handshake retires the burst. Repeat with the address accepted first and the final data beat stalled.
Follow-up. Does the target also need to wait for BREADY before raising BVALID?
No. That dependency is forbidden and could deadlock. Once a valid response is presented, keep it valid and keep its payload stable until the response handshake, unless reset cancels it under the protocol reset rules.
Will an eight-cycle response assertion time out if its clock stops?
Short answer. An assertion clocked by posedge clk counts sampling events, not elapsed simulation time. A property such as req |-> ##[1:8] ack cannot reach its eighth sampling event while that clock is stopped. Pair cycle-based checks with an independently driven progress watchdog when a stopped clock is itself a failure.
Make it practical. Accept a request, suppress ack, then stop the interface clock after two edges. A watchdog driven by an always-running reference clock or an explicit simulation-time deadline should report the hang. Also test a running clock with missing ack, so the cycle-based assertion is exercised separately.
Follow-up. How do you avoid false failures during intentional clock gating?
Derive watchdog enable and deadline from the specified power-state and wake-up contract. Suspend it only in permitted states and bound clock restart after wake-up. A watchdog using the same stopped clock cannot enforce that deadline.
Can a set reset-cause bit prove that the latest reset came from that source?
Short answer. Not by itself when reset causes are sticky. An uncleared bit may describe an earlier reset, and some designs can record multiple causes. Build expectations from the register specification, its clearing policy and the causes observed during the current reset sequence.
Make it practical. In a design with sticky watchdog and software-reset bits, first trigger a watchdog reset and leave its cause uncleared. Then request a software reset. Check the specified accumulated result rather than assuming a one-hot cause. Repeat after explicitly clearing old causes, and capture the status before boot firmware clears it.
Follow-up. Is observing the expected cause bit enough to verify reset?
No. Also check the affected reset domains, required retention behavior and successful boot recovery. Correlate the accepted reset request, reset outputs and firmware status read. A correct status bit does not prove that every required block reset or that firmware handled the reason correctly.
Can solve...before make conflicting constraints satisfiable?
Short answer. No. For ordinary random integral variables, solve...before changes how legal solutions are selected, not which combinations are legal. All active constraints still apply. Use it to control distribution between related variables, not as a procedural sequence of assignments or a way to override a constraint.
Make it practical. Let mode be a random bit and length a random two-bit value, with mode==0 implying length==0. There are five legal pairs: one with mode 0 and four with mode 1. Adding solve mode before length makes mode selection balanced, then chooses a permitted length for that mode. It still never allows mode 0 with length 3.
Follow-up. Will exactly half of a ten-item run have mode 0?
No. Balanced probability is not an exact per-run quota. Check distributions over many samples. If a test needs five items of each mode, construct that mix explicitly and randomize its order.
Why can firmware register writes leave an auto-predicted register mirror stale?
Short answer. Automatic prediction updates the mirror for register-model accesses through the configured map. It does not independently observe processor traffic. For firmware-driven accesses, connect the bus monitor to an explicit register predictor with the correct map and adapter, and keep automatic prediction off for that prediction path.
Make it practical. A boot program writes 0x24 to an ordinary RW configuration register without calling any testbench register API. With auto-prediction alone, the mirror can remain at its reset value. Check that the completed write reaches the monitor, converts to the correct address and data, and updates the intended register through the predictor.
Follow-up. What should you check before blaming the RTL for a mirror mismatch?
Trace one access through monitor, adapter, map lookup and prediction. Check address units, byte enables and completion status. Avoid predicting the same operation twice through overlapping automatic and explicit paths. For hardware-updated fields, separately define how their internal changes are modeled or observed.
Why can a transition bin miss a sequence that looks correct in the waveform?
Short answer. A simple transition bin matches consecutive samples of its coverpoint. It does not automatically discard repeated values or infer the intended transaction boundaries. First inspect the actual sampling stream, then decide whether the requirement concerns consecutive clock cycles, accepted transactions or state changes.
Make it practical. A bin (IDLE => BUSY => DONE) does not match the sampled sequence IDLE, BUSY, BUSY, DONE. If variable BUSY duration is legal, model that duration deliberately. For a transaction-order requirement, use a separate covergroup sampled once per relevant completed transaction; document that its transitions count transactions rather than clocks.
Follow-up. Should you just remove repeated samples until the bin hits?
Only if that sampling policy represents the requirement. Filtering changes the meaning and can hide an excessive dwell time. Keep latency or progress checks separately, and log the values passed to sample() to validate the coverage model before changing stimulus.
Is PENABLE high while a peripheral’s PSEL is low always an APB error?
Short answer. No. Multiple peripherals can share PENABLE while each has its own select signal. An unselected peripheral can see PENABLE high during a transfer to another peripheral. A local checker must qualify its transfer observations with that peripheral’s PSEL.
Make it practical. A bridge accesses a timer while a UART remains unselected. PENABLE rises for the timer access, but the UART’s PSEL stays low. An assertion PENABLE |-> uart_psel would falsely report an error. The UART monitor should record a completed access only when its own PSEL, PENABLE and PREADY are all high at the sampling edge.
Follow-up. What should a test verify while traffic targets the other peripheral?
Check that the unselected peripheral accepts no bus transfer and has no unintended bus-induced register side effects. Account separately for legitimate internal activity, such as a running counter. Then select it and confirm normal access still works.
Is a NACK after the final byte of an I2C read necessarily a failure?
Short answer. No. In a normal controller read, the controller is the data receiver and sends a NACK after the last byte to end reception. It then issues STOP or a repeated START as required. Interpret ACK/NACK by transfer phase and which device is receiving, rather than flagging every NACK as an error.
Make it practical. For a three-byte read, the target acknowledges its read address and transmits three bytes. The controller acknowledges the first two data bytes, then releases SDA for the ninth clock after the third byte, producing NACK. Check that the target releases SDA for this response and that termination follows correctly.
Follow-up. How is an address NACK different?
An address NACK means the addressed target did not acknowledge that address phase. Handle it using the specified retry or error policy. In the scoreboard, distinguish address rejection from the controller’s deliberate final-data NACK so a successful read is not mislabeled as a failure.
When should a constraint be soft rather than hard?
Short answer. Use a soft constraint for a preferred default that tests may legitimately replace. Keep mandatory legality rules hard. A conflicting hard constraint can discard the soft preference, but it does not disable other hard constraints. A soft constraint is not simply a lower probability choice.
Make it practical. A packet has hard length inside {[1:64]} and soft length==8. Ordinary randomization prefers length 8. An inline hard constraint length==32 can replace that default. An inline length==80 still fails because it conflicts with the hard legal range.
Follow-up. Should protocol legality be made soft to simplify negative tests?
Usually no. That can unintentionally allow illegal traffic in normal tests. Provide an explicit negative-test mode or a separate error-injection path, check randomization success, and make the intended violation visible in the test configuration.
Why can compare() pass after a new transaction field is added?
Short answer. The field may be missing from the comparison implementation or excluded by its comparison settings. UVM does not automatically discover arbitrary class members. Include relevant fields through field automation or do_compare(), and check the comparer policy and exclusion flags.
Make it practical. An expected packet and an actual packet have identical payloads but different destination tags. If the new tag is absent from comparison, the scoreboard can report a match. Add the field to the comparison and deliberately change only that tag in a small checker test; comparison should fail with a useful diagnostic.
Follow-up. What matters when implementing do_compare() in a derived transaction?
Call super.do_compare() to preserve base-field checks, check the cast of rhs to the expected type, and combine the base result with comparisons of the added fields. Use the supplied comparer for diagnostics and policy support. Override the do_compare() hook rather than the nonvirtual compare() method.
Can two AXI4 write bursts interleave their data beats when their IDs differ?
Short answer. No. AXI4 does not support write-data interleaving and has no WID signal. At a given interface, write data follows the transaction-address order, with all beats of one burst preceding the next burst’s beats. Different AWIDs do not permit alternating data beats between bursts.
Make it practical. Accept addresses for a three-beat burst A and a two-beat burst B, in that order. The accepted W stream must be A0, A1, A2, B0, B1, with WLAST on A2 and B1. Insert stalls freely, but flag a generator that attempts A0, B0, A1, B1, A2.
Follow-up. Does this require the address handshake to happen before its first data beat?
No. Address and data channels remain independent, so data can arrive before its address. A monitor must buffer early data and pair the streams in order. Do not invent a W-channel ID or assume address and data handshakes occur together.
Why does a held-high request create several response obligations?
Short answer. A clocked property such as req |-> ##2 ack checks a response two clocks later for every sampled cycle with req high. Earlier attempts do not prevent later attempts from starting. If the requirement is one response check per request assertion, a sampled rising-edge antecedent may express that intent better.
Make it practical. Assume req was sampled low, then is high at clocks 10, 11 and 12. The level-triggered property requires ack at clocks 12, 13 and 14. With $rose(req) |-> ##2 ack, that high interval creates only the obligation at clock 12. Choose the version that matches the interface contract.
Follow-up. Is replacing every request antecedent with $rose(req) safe?
No. Some interfaces accept a new transaction on every valid-and-ready cycle, even when valid stays high. Use the acceptance event for those interfaces. An edge-based check also does not prove request persistence, response uniqueness or correct matching of multiple outstanding requests.
Does a boot timeout prove that an invalid firmware signature was rejected correctly?
Short answer. No. A timeout could come from an unrelated loading, clock or reset failure. A negative secure-boot test must reach authentication, observe the specified rejection or recovery behavior, and check that control is not handed to the rejected image.
Make it practical. First boot a known-good signed image. Then change a byte in its authenticated payload without re-signing, while preserving a loadable format. Reset through the normal boot path. Check the expected authentication failure and absence of execution at the rejected entry point. Record the mutation location and image identity for reproducibility.
Follow-up. What separate test checks key authorization?
Use a correctly formed image signed by a test key that the selected device configuration does not authorize. Check the specified rejection. This tests trust policy separately from corrupted-content detection. If fallback is supported, verify that only an authorized fallback image runs; a successful fallback must not conceal execution of the rejected image.
Why can randc values repeat when a new transaction is created each time?
Short answer. The cyclic history belongs to the individual object. Creating a fresh object for every randomize() call creates separate histories, so values collected across those objects can repeat. Reuse one generator object when the requirement is to exhaust a fixed domain before repeating.
Make it practical. A generator contains an unconstrained randc bit [1:0] lane. Four successful randomizations of the same object visit all four lane values. Constructing four separate objects and randomizing each once does not provide that guarantee. Keep the generator alive and copy its chosen lane into each fresh transaction.
Follow-up. Can you reuse the same transaction handle in every queued request instead?
Be careful: a queue of class handles can refer repeatedly to the same changing object. Preserve each request in a separate object or a correctly copied snapshot. Generator lifetime and transaction ownership are different design decisions.
Does a factory override replace an object that was already created?
Short answer. No. A factory override affects later matching factory creation requests. It does not change the dynamic type of an existing object or replace a component already connected in the testbench. Configure the override before the relevant create() call.
Make it practical. An environment creates its driver during build_phase. Installing a specialized-driver override in connect_phase leaves that existing driver unchanged. Set the override before the driver is built, then inspect the created type and topology to confirm that the intended component was selected.
Follow-up. What if an early instance override still does not take effect?
Check the requested original type and the full instance path used at creation. Use factory debug_create_by_type() or the corresponding name-based diagnostic with the same context. A printed override entry proves registration, not that a particular creation request matched it.
Does an OKAY response mean an AXI exclusive write updated memory?
Short answer. Not necessarily. At a target that supports exclusives, a failed exclusive write returns OKAY and must not update the addressed location. A successful exclusive write returns EXOKAY. Interpret the response together with the access type and the target’s exclusive-access support.
Make it practical. Master A completes an exclusive read with EXOKAY. Master B then writes the same monitored location. A issues its matching exclusive write with different data. Check that A receives OKAY and that memory still contains B’s data. Also run a no-interference case that returns EXOKAY and commits A’s data.
Follow-up. What if the target does not support exclusive accesses?
It can return OKAY and treat the write as an ordinary write, updating memory. The exclusive read response identifies lack of support; the requester should not assume a reservation was established. Model unsupported targets separately from failed reservations at an exclusive-capable target.
Can changing a coverpoint weight improve coverage without exercising new behavior?
Short answer. Yes. Coverage aggregation uses weights. Giving a coverpoint zero weight removes its contribution to the enclosing coverage calculation; it does not demonstrate that its scenarios were tested. Review both the reported percentage and the model settings behind it.
Make it practical. A covergroup has two equally weighted coverpoints, one at 100% and another at 0%. Their weighted average is 50%. Setting the uncovered coverpoint’s weight to zero can make the aggregate 100%, even though the stimulus and bin hits are unchanged. Compare the configuration as well as the coverage database.
Follow-up. When is zero weight reasonable?
For a documented reporting choice, such as auxiliary coverpoints used to construct a cross whose coverage is the actual goal. Keep required behavior represented in the signoff criteria. Do not remove a required goal merely to raise the summary percentage.
Why can a level-triggered interrupt return immediately after handler completion?
Short answer. Completing an interrupt at a controller does not necessarily clear its source in the peripheral. In a claim/complete design, a source that remains asserted can become pending again after completion. Verify the source condition, peripheral status and controller state separately.
Make it practical. A receive-FIFO interrupt stays high while occupancy exceeds its threshold. Firmware claims it and immediately signals completion without draining the FIFO. The interrupt is delivered again. A useful test checks the drain operation, source deassertion, completion and absence of unwanted retriggering, then sends new data to confirm that a new interrupt still works.
Follow-up. Is writing the peripheral’s status-clear bit always enough?
No. A level condition can reassert while its root cause remains true. Follow that peripheral’s specified service sequence, and ensure the source-clearing action has taken effect before completion where required. If service is deliberately deferred, verify the specified masking and later re-enable behavior.
No matching questions. Try a different keyword or choose all topics.
Practice tip: answer aloud before opening a question. Explain your assumptions and one way you would check the behavior. These are learning exercises, not claims about questions asked by a particular employer.
Engineering articles