Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Look up time-indexed register history

Hardware interview practice

Look up time-indexed register history

MediumMemory SystemsSystemVerilog

Store timestamped values for four register keys and answer queries with the value whose stored timestamp is the greatest one less than or equal to the requested time.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Reviewed example

Work through one case

Input
write key=2 (t=10,A), then (t=20,B); query key=2 at t=5,10,17,20
Expected output
MISS, A, A, B

The backward search returns the newest timestamp less than or equal to the query and treats an exact timestamp as a hit.

What to cover

Requirements

  1. Support four keys and at most eight writes per key, with strictly increasing timestamps within each key.
  2. Serialize accepted commands and make every accepted write visible to every later accepted query.
  3. Return a miss before the first stored timestamp and use inclusive less-than-or-equal behavior for exact matches.
  4. Model a one-cycle local-memory read rather than comparing an entire history combinationally.
  5. A query response must remain stable until accepted; writes do not generate responses.
asic.fyi · Learn silicon end to end.info@asic.fyi