DescriptionQ057
Q057DVQualcommASIC interview problem
Out-of-order scoreboard for tagged pixel jobs
TechniquesDVSystemVerilogUVMOut-of-orderjobs
DifficultyHard
TopicSystemVerilog & UVM
LanguageSystemVerilog
Requirements4 checkpoints
01
Problem
Up to eight pixel-vector jobs may complete out of order. A tag cannot be reused until its result completes. Write UVM scoreboard methods for requests and multi-beat results.
Function headerSystemVerilog
function void write_req(job_req r); // tag,n,offset,pixel[]
function void write_rsp(job_rsp p); // tag,index,value,last
// expected value=min(pixel[index]+offset,255)
// legal tag 0..7, n 1..16Example input and output
Use this case to check your interpretationInput
Request tag2 has pixels {10,250}, offset10; tag5 has pixel {3}, offset1. Results arrive tag5:{4,last}, then tag2:{20,not-last},{255,last}.Output
All comparisons pass and both tags retire with error_count unchanged.Explanation
Tags may complete out of order, while indices remain ordered within each tag and saturation converts 250+10 to 255.
02
Requirements (4)
- On a legal request, store the full expected vector by tag; reject a duplicate tag or illegal length without changing existing state.
- An unknown response tag reports an error and changes no state. For a known tag, a wrong index, early last, or missing last on the final beat reports an error and immediately deletes that tag.
- For a known beat with the expected index and correct last placement, compare the saturated value. A value mismatch still consumes the beat; advance after a nonfinal beat and retire after the legal final beat.
- In check_phase report every remaining tag as incomplete; cleanup for one tag must not disturb another tag.
