Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Verify a time-slotted capacity checker

Hardware interview practice

Verify a time-slotted capacity checker

MediumReference ModelsSystemVerilog

Write a difference-array oracle for one to sixteen reservations over 32 time slots, returning format status, feasibility, global peak load, and the earliest slot above capacity.

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
capacity=3; reservations=[(start=0,end=4,units=2),(start=2,end=5,units=2)]
Expected output
feasible=0; global_peak=4; first_bad_slot=2

The half-open intervals overlap at slots 2 and 3, producing load four; slot 2 is the first strictly above capacity.

What to cover

Requirements

  1. Accept an already assembled reservation list plus a framing-valid flag; classify zero units, start not less than end, end above 32, or a list outside 1 through 16 as format_error.
  2. For valid half-open intervals, sweep signed deltas across all 32 slots, retain the global peak, and record only the first load strictly greater than capacity.
  3. A feasible result has first_bad_slot zero; a format error has feasible zero and all numeric result fields zero.
  4. Treat frame monitoring, four-ID response matching, reset epochs, and coverage as follow-up scoreboard work.
Continue practicing

Related questions

Reference ModelsMatch out-of-order packets by ID→Reference ModelsVerify signed maximum-product ranges→Reference ModelsVerify a minimum energy-window engine→
asic.fyi · Learn silicon end to end.info@asic.fyi