Hardware interview practice
Verify a cascading flit-collision resolver
Write a stack oracle and header check for a framed flit-collision resolver. A right-moving flit is marked R, a left-moving flit L, and only an R survivor followed by an incoming L can collide.
Reviewed example
Work through one case
Input
accepted flits=[R5,R3,L4] followed by lastExpected output
header survivor_count=1,error=0; sole survivor=R5 with last=1L4 first eliminates the smaller opposing R3 and then loses to R5, exercising a two-level collision cascade while preserving survivor order.
What to cover
Requirements
- Use a stack oracle for one to 16 nonzero direction/magnitude flits, including arbitrary-depth collision cascades.
- Magnitude zero or a seventeenth flit predicts an error header with survivor_count zero.
- For a legal frame, require the header count to equal the ordered survivor queue length; an empty result has no data beats.
- Treat handshake assembly, header-before-data state, output beat checking, reset, and coverage as follow-up scoreboard work.
