Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ1059
Page ↗
Q1059DVASIC interview problem

Verify a dominant-opcode window analyzer

TechniquesDVWindow searchHistogramTie-breakingOut-of-order
DifficultyMedium
TopicReference Models
LanguageSystemVerilog
Requirements5 checkpoints
01

Problem

Write an exhaustive oracle for the longest opcode window convertible to one of eight classes with at most k replacements, breaking ties by lowest start and then lowest opcode.

Example input and output

Use this case to check your interpretation
Input
opcodes=[1,2,1,1,3]; k=1
Output
best_length=4; start=0; target_opcode=1
Explanation

Window [1,2,1,1] becomes all opcode 1 with one replacement; extending through opcode 3 would require two.

02

Requirements (5)

  • Enumerate every window and all eight target opcodes in an independent oracle; empty input returns zero result fields.
  • Apply the comparison order length, then start, then opcode, and flag k greater than count as a bad request.
  • Explain dominant, balanced, alternating, long-run, exact-k, multiple-start, and multiple-opcode cases as targeted stimulus.
  • Return the complete result record for a later ID-keyed scoreboard; response ordering and reset epochs are follow-up architecture.
  • Identify feasibility, length, start, opcode, entropy, and tie type as separate diagnostic or coverage dimensions.