Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Verify a minimum energy-window engine

Hardware interview practice

Verify a minimum energy-window engine

MediumReference ModelsSystemVerilog

Implement an exhaustive oracle and four-entry tagged scoreboard core for the shortest contiguous nonnegative energy window whose sum reaches a threshold.

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
energy=[2,1,4,2]; threshold=6
Expected output
found=1; start=2; length=2

Window [4,2] reaches six in two elements, shorter than [2,1,4], and no one-element window qualifies.

What to cover

Requirements

  1. Build an exhaustive widened-arithmetic oracle and treat zero threshold or count above the configured maximum as a bad request.
  2. Return found=0 with zero start and length when no window qualifies; otherwise compare shortest length before lowest start.
  3. Store at most four predictions by transaction ID, compare and retire each response exactly once, and reject duplicate or unknown IDs.
  4. Flush every pending prediction on reset and provide an end-of-test empty check for missing responses.
  5. Identify exact-threshold hits, equal-length ties, zero density, response order, stalls, errors, and reset as follow-up coverage targets.
Continue practicing

Related questions

Reference ModelsModel a recent-ID replay stream→Reference ModelsDebug a signed sliding-window peak→Reference ModelsVerify a dominant-opcode window analyzer→
asic.fyi · Learn silicon end to end.info@asic.fyi