Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ502
Q502DesignASIC interview problem

Increment a four-digit BCD counter

TechniquesBCDReady/validCarry propagation
DifficultyEasy
TopicRTL Design
LanguageSystemVerilog
Requirements4 checkpoints
01

Problem

Accept four valid binary-coded decimal (BCD) digits, add one without converting the packed value to binary, and return a stallable ready/valid response. Wrap 9999 to 0000 and flag the wrap.

Example input and output

Use this case to check your interpretation
Input
accepted BCD values 1999, then 9999; stall the second response
Output
1999 -> 2000 carry_out=0; 9999 -> 0000 carry_out=1, held stable while stalled
Explanation

Decimal carry propagates across trailing nines, and the all-nine case wraps all four digits with one carry flag.

02

Requirements (4)

  • Treat each input digit as a decimal value from 0 through 9.
  • Propagate decimal carry across any run of trailing nines.
  • Create exactly one output transaction for every accepted input transaction.
  • Hold all result digits and carry_out stable while out_valid is asserted and out_ready is low.