Skip to question
SystemVerilogDesignVerificationFirmwareArchitectureASIC Interview Questions→
/Interview questions/Predict Priority from If and Case Statements

Q063·Free·Design Verification

Predict Priority from If and Case Statements

Difficulty
Easy
Topic
RTL Design
Language
SV
Interview prompt

Question

A decoder has overlapping conditions. One version uses `if (c0) ... else if (c1) ...`; another uses a `case` statement whose legal input encodings are asserted mutually exclusive. Which statement is correct?

Choose one

Answer choices

  1. A. The `if/else if` text defines priority when both conditions are true; a fully specified mutually exclusive `case` expresses decode selection, but actual area and delay still depend on the logic and synthesis constraints.
  2. B. An `if/else if` statement has no priority because all synthesizable RTL is evaluated simultaneously.
  3. C. A `case` statement always creates parallel hardware with lower delay and larger area than any equivalent `if` statement.
  4. D. Omitting `default` from combinational `case` logic is safe because unmatched values automatically drive zero.
Exact question handoffPractice Q063

Solve it in the question bank, keep your progress, and reveal the reviewed solution when your access allows.

Open in question bank →
Solution accessEach time you open this Solution, one Practice Credit is used; it is not permanently unlocked. Premium Solution content also uses one credit per opening.
Continue learning

Assignments and Procedural Intent

Review blocking and nonblocking updates, specialized blocks, case statements, and inferred state.

  • RTL Design
  • SVA
Assignments and Procedural Intent →
Continue practicing

Related questions

Q141 · RTL DesignDecode Z wildcards without hiding XEasy→Q364 · Design VerificationUse Wildcard Case Constructs without Hiding UnknownsMediumP→Q1012 · SystemVerilogX and Z handling in case statementsEasyP→Q108 · Waveform DebuggingFixed-Priority Arbiter Picks the Wrong RequesterEasy→
ASIC.FYI · Learn silicon end to end.info@asic.fyi