ChipTalkOfficial homeEngineering articles
ChipTalk Interview Prep

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

UVM · Foundation

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.

Question link
UVM · Foundation

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.

Question link
UVM · Intermediate

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.

Question link
UVM · Intermediate

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.

Question link
SystemVerilog · Foundation

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.

Question link
SystemVerilog · Intermediate

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.

Question link
AXI · Foundation

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.

Question link
AXI · Intermediate

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.

Question link
AXI · Intermediate

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.

Question link
AXI · Intermediate

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.

Question link
Debug & Coverage · Foundation

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
SoC & Reset · Intermediate

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.

Question link
SoC & Reset · Advanced

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.

Question link
Debug & Coverage · Advanced

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.

Question link
SystemVerilog · Foundation

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.

Question link
UVM · Intermediate

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.

Question link
Assertions · Intermediate

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.

Question link
Debug & Coverage · Advanced

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.

Question link
I2C · Foundation

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.

Question link
SystemVerilog · Foundation

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.

Question link
UVM · Intermediate

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.

Question link
AXI · Intermediate

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.

Question link
SoC & Reset · Advanced

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
SPI · Foundation

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.

Question link
UVM · Intermediate

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.

Question link
SystemVerilog · Advanced

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.

Question link
Assertions · Intermediate

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.

Question link
AXI · Intermediate

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.

Question link
SystemVerilog · Foundation

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.

Question link
UVM · Intermediate

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.

Question link
APB · Intermediate

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.

Question link
I2C · Foundation

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.

Question link
Assertions · Advanced

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.

Question link
SystemVerilog · Intermediate

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%.

Question link
UVM · Foundation

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.

Question link
AXI · Advanced

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
SoC & Reset · Advanced

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.

Question link
UVM · Foundation

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.

Question link
Assertions · Intermediate

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.

Question link
APB · Intermediate

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
SoC & Reset · Advanced

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.

Question link
SystemVerilog · Intermediate

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.

Question link
UVM · Advanced

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.

Question link
AXI · Foundation

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.

Question link
Assertions · Intermediate

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.

Question link
I2C · Intermediate

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.

Question link
SystemVerilog · Foundation

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.

Question link
UVM · Intermediate

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.

Question link
AXI · Intermediate

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
SoC & Reset · Advanced

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.

Question link
SystemVerilog · Intermediate

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.

Question link
UVM · Advanced

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.

Question link
Assertions · Foundation

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.

Question link
AXI · Intermediate

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.

Question link
SPI · Intermediate

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.

Question link
SystemVerilog · Intermediate

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.

Question link
UVM · Intermediate

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.

Question link
APB · Foundation

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
SoC & Reset · Advanced

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.

Question link
SystemVerilog · Foundation

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.

Question link
UVM · Advanced

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().

Question link
Assertions · Intermediate

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
I2C · Intermediate

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.

Question link
SystemVerilog · Intermediate

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.

Question link
UVM · Foundation

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.

Question link
AXI · Intermediate

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.

Question link
Assertions · Advanced

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.

Question link
SoC & Reset · Advanced

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.

Question link
SystemVerilog · Intermediate

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.

Question link
UVM · Advanced

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
APB · Foundation

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.

Question link
I2C · Foundation

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.

Question link
SystemVerilog · Foundation

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.

Question link
UVM · Intermediate

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.

Question link
AXI · Intermediate

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.

Question link
Assertions · Intermediate

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.

Question link
SoC & Reset · Advanced

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.

Question link
SystemVerilog · Foundation

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.

Question link
UVM · Intermediate

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.

Question link
AXI · Advanced

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.

Question link
Debug & Coverage · Intermediate

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.

Question link
SoC & Reset · Advanced

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.

Question link

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.