Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ812
Page ↗
Q812DesignASIC interview problem

Implement a constant multiply without truncation

TechniquesDesignSystemVerilogShift-addBit widthCombinational logic
DifficultyMedium
TopicRTL Arithmetic
LanguageSystemVerilog
Requirements4 checkpoints
01

Problem

For an unsigned 10-bit input, implement y = 9*x + 3 without using the multiplication operator and choose an expression width that preserves the maximum result.

Starting declarationSystemVerilog
input  logic [9:0]  x;
output logic [13:0] y;

Example input and output

Use this case to check your interpretation
Input
x = 10'd1023
Output
y = 14'd9210
Explanation

The maximum input produces 9*1023 + 3 = 9210, which is below 2^14 and therefore fits losslessly in 14 bits.

02

Requirements (4)

  • Implement 9*x as (x << 3) + x.
  • Extend x before shifting so every intermediate is 14 bits wide.
  • Add the constant 3 without truncation.
  • State and verify the maximum possible result.