Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ1038
Page ↗
Q1038DVASIC interview problem

Generate ordered-signature matches

TechniquesSubsequenceConstructive stimulusReference modelCoverage
DifficultyHard
TopicConstraints
LanguageSystemVerilog
Requirements5 checkpoints
01

Problem

Write an ordered-subsequence oracle, a legal-by-construction positive generator, and coverage points for a trace checker whose short event pattern must occur in order within a longer frame.

Example input and output

Use this case to check your interpretation
Input
pattern=[3,7,3]; events=[1,3,5,7,9,3,12]
Output
matched=1 using event positions [1,3,5]
Explanation

Gaps are legal in an ordered subsequence, and the repeated value 3 is consumed at two distinct increasing positions.

02

Requirements (5)

  • Advance the oracle's pattern index only when an accepted event equals the next required code; an empty pattern matches every legal frame.
  • Construct positive cases by choosing increasing embedding positions and filling the gaps independently.
  • After deleting an occurrence or changing order to make a negative candidate, label it negative only when the oracle confirms nonmatch.
  • Predict request_error and matched=0 when pattern_len exceeds 8 or event_len exceeds 32.
  • Cover repeated codes, gap size, match location, and the cause used to construct a confirmed negative.