DescriptionQ015
Q015DVASIC interview problem
Check a per-ID latency window
TechniquesPythonLatencyCyclesPer-ID queue
DifficultyMedium
TopicReference Models
LanguagePython
Requirements4 checkpoints
01
Problem
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.

Example input and output
Use this case to check your interpretationInput
request id5 at cycle 10; request id5 at cycle 12; responses id5 at cycles 13 and 18Output
oldest request latency=3 PASS; next request latency=6 PASS; no pending requestsExplanation
Repeated IDs pair with their oldest unmatched send, and both inclusive legal boundaries 3 and 6 are exercised.
02
Requirements (4)
- 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.
