DescriptionQ923
Q923DVASIC interview problem
Scoreboard variable-length bitmap ranges
TechniquesDVScoreboardVariable responseFramingBackpressure
DifficultyHard
TopicReference Models
LanguageSystemVerilog
Requirements5 checkpoints
01
Problem
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.
Example input and output
Use this case to check your interpretationInput
accepted mask=32'h0000_00E6; stall the first range response onceOutput
ranges=[1,2] then [5,7]; last=0 then1; done pulses when [5,7] is acceptedExplanation
Bits 1-2 and 5-7 form two maximal low-to-high runs; backpressure cannot change the held first range.
02
Requirements (5)
- On an accepted idle start, scan low to high and enqueue each maximal run of adjacent set bits.
- Compare and pop one expected range only on range_valid and range_ready; an output with an empty queue is an immediate failure.
- Mark only the final expected range as last and keep range payload stable while stalled.
- For an all-zero mask, require no range transfer and exactly one done pulse.
- For nonzero masks, require done on acceptance of the final marked range and flush all state on reset.
