Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Scoreboard a maximum-interval accelerator

Hardware interview practice

Scoreboard a maximum-interval accelerator

HardReference ModelsSystemVerilog

Verify a bounded accelerator that accepts up to 16 signed samples and returns the greatest-sum contiguous interval. Build the reference prediction and in-order scoreboard around the request and response handshakes.

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
accepted signed samples=[-2,3,4,-1]; response is stalled for two cycles
Expected output
result_valid=1; max_sum=7; start=1; end=2; payload remains stable during stall

Exhaustive nonempty intervals select [3,4]; the queued prediction is consumed only when the response handshake occurs.

What to cover

Requirements

  1. Snapshot inputs only when req_valid and req_ready are both high, and evaluate every nonempty interval using signed arithmetic at least 16 bits wide.
  2. Break equal-sum ties by the lowest start index and then the lowest end index; count zero predicts result_valid low and zero result fields.
  3. Queue one expectation per accepted request and compare exactly once per accepted response.
  4. Require rsp_valid and its payload to remain stable while the response is stalled.
  5. Flush canceled expectations on reset and reject any orphan response before the first post-reset request.
Continue practicing

Related questions

Reference ModelsVerify a decimal palindrome checker→Reference ModelsVerify a bounded step-sequence counter→Reference ModelsScoreboard variable-length bitmap ranges→
asic.fyi · Learn silicon end to end.info@asic.fyi