Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Scoreboard variable-length bitmap ranges

Hardware interview practice

Scoreboard variable-length bitmap ranges

HardReference ModelsSystemVerilog

Verify a bitmap compressor that turns a 32-lane active mask into zero or more maximal inclusive ranges. Check the variable-length output stream, last marker, completion, and stalls.

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 mask=32'h0000_00E6; stall the first range response once
Expected output
ranges=[1,2] then [5,7]; last=0 then1; done pulses when [5,7] is accepted

Bits 1-2 and 5-7 form two maximal low-to-high runs; backpressure cannot change the held first range.

What to cover

Requirements

  1. On an accepted idle start, scan low to high and enqueue each maximal run of adjacent set bits.
  2. Compare and pop one expected range only on range_valid and range_ready; an output with an empty queue is an immediate failure.
  3. Mark only the final expected range as last and keep range payload stable while stalled.
  4. For an all-zero mask, require no range transfer and exactly one done pulse.
  5. For nonzero masks, require done on acceptance of the final marked range and flush all state on reset.
Continue practicing

Related questions

Reference ModelsMonitor an independently stalled binary adder→Reference ModelsVerify unique zero-sum triplets→Reference ModelsScoreboard a maximum-interval accelerator→
asic.fyi · Learn silicon end to end.info@asic.fyi