Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations57
  • Combinational Design58
    • Combinational Timing Overview
    • Muxes, Decoders and Encoders
    • Arithmetic Blocks
    • Comparators and Shifters
    • Tri-State and Shared Buses
    • Latch Inference
    • Arithmetic Datapaths
      • Fixed-Point Contract
      • Width Growth
      • Rounding and Quantization
      • Saturation Policy
      • Divider Architectures
  • Sequential Design61
  • FSM & Control66
  • Timing & Clocking64
  • Reset & CDC58
  • Memory & Buses94
  • Advanced RTL60
  • Senior & Interview175
  • Glossary and Notation
Loading lesson

‹Arithmetic Datapaths
  1. Topics
  2. RTL Design
  3. Combinational Design
  4. Arithmetic Datapaths
  5. Width Growth

Part 2 · Combinational · Advanced

Width Growth

Derive widths for sums, products, accumulators, and reductions before coding expressions.

Why this matters

Expression sizing in SystemVerilog can truncate before assignment. For the running design, a 32-bit product summed over 1024 terms needs a 42-bit accumulator, and that width must be a decision, not a discovery.

After this lesson you can: compute the full-precision width of sums, products and accumulators, and write RTL that extends operands before the operation.

Operation

Safe full-precision width

Unsigned add W + W

W+1

Signed add W + W

W+1

Unsigned multiply A x B

A+B

Signed multiply A x B

A+B

Sum N same-width terms

W + ceil(log2 N)

MAC of N products

A+B+ceil(log2 N), adjusted for numeric bounds

Applying the rule to the running design gives a 32-bit product and a 42-bit worst-case accumulator for 1024 terms. That width becomes the input contract for the later quantizer rather than being rediscovered inside the MAC.

Width growth in the running design, drawn on a common binary point. The multiply adds fraction bits (15 + 15 = 30); accumulating 1024 products adds 10 integer bits, giving 42.

Read each bar as one signal; bits left of the dashed line are integer bits (sign included), bits right of it are fraction bits.

  • Multiply: widths add, 16 + 16 = 32. The fraction grows from 15 to 30 bits, so the product's binary point moves right.

  • Accumulate: the fraction stays at 30 bits; only the integer part grows, by ceil(log2 1024) = 10 bits.

  • Contract: the quantizer later receives all 42 bits and drops 15 fraction bits at one place.

SystemVerilog expression sizing can truncate before assignment. Extend operands into the intended result width before adding, and store multiplication in a full-width signed destination.

design.sv
1
2
3
4
5
6
7
8
// snippet: explicit extension avoids expression-width surprises
logic signed [15:0] a, b;
logic signed [16:0] sum_full;
assign sum_full = {a[15], a} + {b[15], b};

localparam int PW = AW + BW;
logic signed [PW-1:0] product_full;
assign product_full = $signed(x) * $signed(y);

Bounds can justify fewer bits than the worst-case formula, but that is an architectural assumption and belongs in an assertion and reference model.

Check yourself A 16x16 signed product is accumulated over 1024 worst-case terms. What starting accumulator width is safe?

The full product needs 32 bits and 1024 terms add 10 growth bits, so start with 42 bits before considering tighter value bounds.

Remember

  • Extend operands to the intended result width before adding, and store a product in a full-width signed destination.

  • Accumulating 1024 terms adds 10 growth bits: 32 + 10 = 42.

  • Fewer bits need a bound that you assert and model, not an assumption.

Keep going

  • Interview: run a mock interview on this topic

Related topics

  • Rounding and quantization

Previous

112 / 694

Next: Rounding and Quantization

Up next

Up nextRounding and Quantization

Sign in to save progress

Practice this lessonReport an error

See also

  • Saturation Policy
  • Divider Architectures