Skip to practice questions

Part 3 · Ordering and closure

AXI ordering and verification closure

Model per-ID ordering, out-of-order completion, end-to-end prediction, assertions, coverage, and zero-outstanding closure.

Reading path
3 of 3
Concept chapters
2
Practice links
7

Question-first preparation

Practice the mechanisms on this page.

Each question maps directly to one of the chapters below, so you can test the contract before reading the explanation.

Recommended start

One representative prompt from each major mechanism. Open any card in the live question bank.

  1. Q729Distinguish AXI-Lite from AXI3Design Verification · EasyPremium
  2. Q318Choose AXI or APB for a control blockProtocols and Interfaces · EasyPremium
  3. Q989Extend AXI IDs for Two Merged MastersProtocols and Interfaces · MediumPremium
  4. Q622Verify a four-by-four AXI bridgeUVM · MediumPremium
  5. Q918Match out-of-order AXI read responsesUVM · HardPremium
  6. Q620AXI Read Responses Reverse Two Requests with the Same IDWaveform Debugging · HardPremium
Complete question directoryFilter every stable practice link by mechanism.7 questions
Showing 7 questions across every track.Choose a track to narrow the practice set without changing its stable question links.
  1. Q729Distinguish AXI-Lite from AXI3Design Verification · EasyPremium
  2. Q989Extend AXI IDs for Two Merged MastersProtocols and Interfaces · MediumPremium
  3. Q622Verify a four-by-four AXI bridgeUVM · MediumPremium
  4. Q918Match out-of-order AXI read responsesUVM · HardPremium
  5. Q620AXI Read Responses Reverse Two Requests with the Same IDWaveform Debugging · HardPremium
  6. Q767Verify ordered AXI responses with an exact timeoutVerification Utilities · HardPremium
  7. Q318Choose AXI or APB for a control blockProtocols and Interfaces · EasyPremium

06 · Latency tolerance without lost order

AXI scoreboards need per-ID order, not one global FIFO.

AXI permits useful concurrency and response reordering while preserving required order within the applicable ID and destination relationship.

Rule to say firstDifferent IDs may complete out of request order. Transactions with the same ID and destination retain their required order, so compare through per-ID queues or an equivalent legal-order model.

Ordering-domain explorer

Cross-ID reordering can be legal while same-ID reversal is not.

Request order
A · ID3B · ID8C · ID3
Legal response
B · ID8A · ID3C · ID3pass
Illegal response
C · ID3A · ID3B · ID8same-ID reversal
Queue heads
ID3=AID8=BID3=C after Adrainempty
  1. 01Request 0ID 3 · A

    Queue A at the tail of ordering domain ID 3.

  2. 02Request 1ID 8 · B

    Queue B independently in ordering domain ID 8.

  3. 03Request 2ID 3 · C

    C follows A in the same ID 3 queue.

  4. 04ResponseID 8 · B

    B may complete before A because the IDs differ.

  5. 05ID 3 responsesA then C

    The head of the ID 3 queue must complete first.

Request 0ID 3 · A

Queue A at the tail of ordering domain ID 3.

Different IDs
May reorder
Do not impose a global response FIFO.
Same ordering domain
Preserve order
Compare against the domain's queue head.
Interconnect
May extend IDs
Master identity can be appended and later removed.
End of test
Zero outstanding
Every request must resolve, abort or be accounted for.

The scoreboard should accept every architecturally legal completion order and reject only real ordering, association, duplication, loss or data errors.

01

Observe

Track accepted requests by channel, ID, destination, burst shape and reset epoch; observe responses with their RID or BID.

02

Decide

Use a queue per ordering domain, plus a transaction map when the interconnect extends, remaps or routes IDs.

03

Failure

A global FIFO rejects legal cross-ID reordering, or an associative lookup accidentally allows same-ID responses to reverse.

04

Prove

Constrain comparison to legal ordering domains, check unmatched and duplicate responses, drain all outstanding work and cover reorder depth across IDs.

Define the ordering key before choosing a data structure

An ID is part of the ordering domain, not automatically a globally unique transaction handle. The complete key depends on the manager, direction, destination and interconnect transformations.

  • Keep read and write response bookkeeping separate.
  • Use the response ID to choose a queue, then compare the queue head.
  • Track every beat within the selected burst before retiring the request.
  • Model any interconnect-added master bits and verify they are stripped on the correct return path.
What each structure proves
StructureUseCharacteristic mistake
One global FIFOOnly a globally ordered interfaceRejects legal AXI cross-ID reordering.
Queue per ID/domainPreserve order inside each domainNeeds a complete routing key.
Associative transaction mapFind independent outstanding workCan hide illegal same-ID reversal if used alone.
Age or deadline mapProgress and timeout policyMust distinguish legal latency from starvation.

Make reordering explicit in the scoreboard

The pseudocode below uses one queue for each response ordering key. A production model also retains expected beat data, responses, destination and reset epoch.

  • Report unknown IDs, empty-queue responses, duplicate terminal beats and missing responses separately.
  • Do not retire a burst until its final response beat is accepted.
  • If the architecture permits additional reordering within an ID, encode that exact rule rather than weakening all comparisons.
Per-ID response matching modeltext
on_request(req):
  key = {direction, manager, destination, req.id, reset_epoch}
  expected[key].push_back(predict(req))

on_response(rsp):
  key = {direction, manager, destination, rsp.id, reset_epoch}
  require expected.exists(key) and !expected[key].empty()
  exp = expected[key].front()
  compare_current_beat(exp, rsp)
  if rsp.is_last_accepted_beat:
    expected[key].pop_front()

end_of_test:
  require every expected queue is empty

Prevent reset and ID reuse from creating aliases

Reset may discard work in one scope while another fabric segment remains alive. A checker needs an explicit flush, abort or epoch policy rather than silently clearing every map.

  • Tag expected work with a reset epoch when late responses can remain visible.
  • Delay ID reuse or reject stale-epoch responses according to the product contract.
  • Cover maximum outstanding depth, repeated IDs, mixed destinations and long response inversions.
  • At end of test, classify every nonempty queue as a DUT loss, legal outstanding work or intentional reset abort.

Explain it out loud

Interview reasoning checkpoints

Strong answer

Yes. Different IDs allow independent ordering domains, so a later request on another ID can complete first.

Reason it through
  1. The response ID associates the result with its request stream.
  2. A global FIFO would report a false failure.
  3. The scoreboard still checks data, response, beat count and legal routing.
Interviewer lens

This tests whether the candidate understands why AXI has IDs and how a latency-tolerant checker uses them.

Common trap

Answering that any order is legal and forgetting same-ID constraints.

Strong answer

Not if that lookup ignores order. Same-ID transactions in the applicable ordering domain must be compared in the required order, normally through a queue.

Reason it through
  1. Both transactions share the same visible identifier.
  2. Returning the second first can violate the protocol even if its data matches.
  3. The checker needs both association and order, not one of them.
Interviewer lens

This exposes scoreboards that are flexible enough to accept a real DUT bug.

Common trap

Searching all expected items for any payload match and removing whichever happens to compare.

Strong answer

It can append manager identity or routing context so overlapping source IDs remain unique inside the merged fabric, then remove that extension on the response path.

Reason it through
  1. Two managers may legally issue the same local ID.
  2. The subordinate-facing ID must retain enough context to return each response correctly.
  3. Verification checks extension, routing, ordering and restoration together.
Interviewer lens

This connects pin-level protocol knowledge to a multi-port interconnect implementation.

Common trap

Assuming an ID is globally unique across all managers without inspecting the fabric's transformation.

07 · From local rules to end-to-end confidence

Protocol closure needs assertions, transactions, scoreboards and coverage.

No single checker proves a bus. Local safety properties find cycle-accurate violations, while monitors, predictors, scoreboards, coverage and progress tracking prove the complete transaction lifecycle.

Rule to say firstCheck each invariant at the lowest layer that can observe it independently, then reconcile accepted transactions at the architectural boundary.

Verification evidence chain

Different tools answer different protocol questions.

  1. 01AgentsDrive legal and hostile timing

    Create requests, responses, waits, backpressure, errors and resets.

  2. 02AssertionsLocal cycle rules

    Check stability, sequencing, terminal beats and forbidden states.

  3. 03MonitorsAccepted transactions

    Publish only architecturally completed channel or bus events.

  4. 04Predictor + scoreboardEnd-to-end result

    Model data, response, ordering, routing and transaction lifetime.

  5. 05Coverage + performanceClosure evidence

    Demonstrate feature combinations, stress depth and progress behavior.

AgentsDrive legal and hostile timing

Create requests, responses, waits, backpressure, errors and resets.

Assertions
Local truth
Best for sampled signal invariants.
Scoreboard
Transaction truth
Best for data, ordering and lifecycle.
Coverage
Intent evidence
Counts meaningful accepted scenarios.
Outstanding audit
Must reach zero
Loss and starvation cannot hide at test end.

A strong strategy layers independent evidence. A protocol checker can prove legal pins and still miss wrong data, a misrouted response, starvation or an expected transaction left in the scoreboard.

01

Observe

Inventory interfaces, optional features, ordering domains, outstanding limits, reset scopes, errors, performance targets and legal backpressure.

02

Decide

Partition safety into SVA, reconstruction into monitors, functional prediction into models, comparison into scoreboards and intent into coverage.

03

Failure

A team relies on one vendor checker, counts attempted traffic, compares in the wrong order or reaches end of test with silent outstanding work.

04

Prove

Trace requirements into checkers and coverage, run negative and disruption tests, audit unmatched work and trend latency, throughput and starvation evidence.

Choose the protocol that matches the architectural job

Protocol selection is a design tradeoff, and it shapes the verification problem. Preserve the implemented version and optional-feature list in configuration rather than teaching one interface as a universal superset.

Protocol intent and verification focus
InterfaceBest fitPrimary verification risk
Ready/validA local streaming or decoupled channelStall persistence, throughput and buffering.
APBLow-bandwidth registers and peripheralsSETUP/ACCESS phase legality and wait stability.
AHB/AHB-LitePipelined memory-mapped transfersAddress/data phase association and HREADY stalls.
AXI4-LiteSimple memory-mapped control without burstsIndependent channel joins despite reduced features.
AXI4/AXI5High-throughput outstanding trafficBursts, channel independence, IDs, ordering and backpressure.

Partition the environment by evidence ownership

Reusable VIP separates active behavior from passive truth. Drivers honor the protocol; passive monitors independently reconstruct what the DUT actually accepted.

  • Use one agent per interface role, configurable as active or passive.
  • Publish monitor transactions only from accepted bus events.
  • Use a predictor or reference model independent of the DUT implementation.
  • Key the scoreboard by the real ordering domain and retain per-beat state.
  • Bind assertions close to the interface and parameterize widths and optional features.
  • Add age tracking for bounded requirements, fairness policies and testbench watchdogs.

Stress timing, errors and lifecycle—not only payload values

A protocol testplan should make every legal timing relationship happen and every prohibited relationship fail in a controlled negative test.

  • Cross channel or phase, burst type, size, alignment, ID, response, backpressure length and outstanding depth.
  • Inject waits and errors at the first, middle and terminal beat or phase.
  • Reset during every independent AXI channel, APB wait and AHB stretched data phase.
  • Exercise maximum throughput, long stalls, many-to-one contention and repeated ID reuse.
  • Track latency distributions, bandwidth, occupancy, starvation and fairness separately from correctness.
  • At end of test, require all monitor, predictor and scoreboard queues to be empty or explicitly classified.

Build an interview answer around mechanism and proof

A strong protocol answer starts with the sampled rule, names state ownership, identifies the failure mode and finishes with independent evidence.

Reusable answer frame
StepQuestion to answerProtocol example
ContractWhat exact edge commits state?VALID && READY, APB completion or HREADY-qualified phase.
StateWhat must the checker remember?Pending offer, APB request, AHB phase or AXI burst/ID queue.
FailureWhat characteristic bug appears?Early advance, unstable wait, wrong association or illegal reorder.
ProofWhich independent evidence catches it?SVA plus monitor, scoreboard, coverage and outstanding audit.

Explain it out loud

Interview reasoning checkpoints

Strong answer

No. It is valuable for signal-level legality, but the environment still needs independent transaction reconstruction, functional prediction, data and ordering comparison, coverage and progress checks.

Reason it through
  1. Legal bus activity can carry wrong data or target the wrong destination.
  2. A local checker does not necessarily understand the product's reset, timeout, QoS or end-to-end contract.
  3. Coverage must show the required scenarios actually occurred.
Interviewer lens

This tests whether the candidate can design a complete verification strategy instead of naming a tool.

Common trap

Equating protocol compliance with functional correctness.

Strong answer

Sample architectural transaction coverage on acceptance or completion. Offered traffic can be useful stimulus coverage, but it must be labeled separately.

Reason it through
  1. A stalled offer has not changed architectural state.
  2. Counting it every cycle inflates bins and duplicates one transaction.
  3. Phase-specific coverage may intentionally observe attempts, waits and retries as separate events.
Interviewer lens

This reveals whether the coverage model is tied to the real protocol event.

Common trap

Sampling whenever VALID or PSEL is high and calling every sampled cycle a transaction.

Strong answer

Start at accepted events: verify the monitor's sampled handshake and retained state, then check association and ordering before investigating payload prediction.

Reason it through
  1. A wrong transaction boundary corrupts every downstream comparison.
  2. Channel or phase history often explains apparent data mismatches.
  3. Stable transaction IDs, beat indices and timestamps connect assertion failures to scoreboard entries.
Interviewer lens

This tests practical debug prioritization across waveform and transaction layers.

Common trap

Immediately changing the reference model before proving that the monitor reconstructed the bus correctly.