Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Regress cross-transaction histogram leakage

Hardware interview practice

Regress cross-transaction histogram leakage

HardVerification UtilitiesSystemVerilog

Build a focused regression for an earliest-unique-event DUT suspected of retaining histogram counts between requests. Prove the history dependence, then generalize the check into a fresh-per-request oracle.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Reviewed example

Work through one case

Input
back-to-back requests without reset: first events=[5,5]; second events=[5]
Expected output
first result not_found; second result found at index0

A fresh histogram makes code 5 unique in the second request; leaked counts would incorrectly retain its prior frequency of two.

What to cover

Requirements

  1. Issue legal requests back to back without reset and allocate a fresh 16-entry count table for every prediction.
  2. Return the lowest active index whose final count is one; empty and all-repeated frames return not found.
  3. Treat event_count above 32 as an error with all result fields zero.
  4. Include a minimal two-request sequence in which a repeated code becomes unique in the second request.
  5. Require exactly one done pulse per accepted start and identify the repeated-to-unique transition as the key follow-up coverage target.
Continue practicing

Related questions

ConstraintsConstrain and cover an ASCII palindrome checker→ConstraintsGenerate opcode-bijection stimulus→ConstraintsGenerate ordered-signature matches→
asic.fyi · Learn silicon end to end.info@asic.fyi