Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ015
Page ↗
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.

Per-ID request and response timeline pairing repeated ID-five requests with the oldest unmatched responses at latencies three and six.
Pair each response with the oldest unmatched request of the same ID before checking the latency window.

Example input and output

Use this case to check your interpretation
Input
request id5 at cycle 10; request id5 at cycle 12; responses id5 at cycles 13 and 18
Output
oldest request latency=3 PASS; next request latency=6 PASS; no pending requests
Explanation

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.