Hardware interview practice
Check a per-ID latency window
Implement a checker requiring every response to arrive 3 through 6 cycles after its matching request. Multiple requests, including repeated IDs, may be in flight.

Reviewed example
Work through one case
Input
request id5 at cycle 10; request id5 at cycle 12; responses id5 at cycles 13 and 18Expected output
oldest request latency=3 PASS; next request latency=6 PASS; no pending requestsRepeated IDs pair with their oldest unmatched send, and both inclusive legal boundaries 3 and 6 are exercised.
What to cover
Requirements
- Measure integer clock cycles, not simulator time units.
- Pair a response with the oldest unmatched send for its ID.
- Treat both latency boundaries as inclusive.
- Reject unexpected responses and report missing responses at the end.
