Tutorials

Verilog Fixed-Point Multiplication: Keep the Product Bits You Need

Published · Updated

Write total width and fractional width explicitly

Fixed-point notation is easy to misread because some Q conventions include the sign bit in the integer count and others do not. State W, the total signed width, and F, the fractional width. An encoded integer x represents x×2^−F. This article uses signed two’s-complement integers and does not assume a particular Q-name convention.

Zynq device on a Parallella board. A physical programmable-logic processing context; the multiplication examples are numerical vectors, not measurements of this board.
Zynq device on a Parallella board. A physical programmable-logic processing context; the multiplication examples are numerical vectors, not measurements of this board. Photo: Gareth Halfacree from Bradford, UK. Original · CC BY-SA 2.0.

For signed operands with widths Wa and Wb, a full mathematical product fits Wa+Wb bits. Its fractional width is Fa+Fb. Keep that full product before deciding what to discard. A language expression or assignment can still truncate earlier than intended if operand signedness and intermediate widths are left implicit.

Estimate native FPGA resources.

Connect the arithmetic to an acquisition workload.

Check a negative product and the most-negative boundary

With W=8 and F=4, raw integers −24 and 12 represent −1.5 and 0.75. Their product is raw −288 with F=8, representing −1.125. This gives a compact test of sign extension and binary-point placement without relying on floating-point display alone.

Keep integer encoding and scale togetherKeep integer encoding and scale together1A: raw −24, F = 4Value −1.52B: raw 12, F = 4Value +0.753Product: raw −288, F = 8Exact value −1.125; full width 16 bits
Illustrative model and values; assumptions are stated in the adjacent text.

Also multiply the most-negative 8-bit value by itself: −128×−128 is 16,384. That positive result needs the full signed product range. A narrow temporary can turn it into a misleading negative or zero result. The worksheet accepts raw integers, checks that they fit their declared widths, and reports the full product as an integer and exact power-of-two scale.

Retain exact part-number context.

Make output conversion a separate operation

A narrower output needs a specified fractional shift, rounding rule and overflow policy. Keeping a convenient slice is not a complete definition. For negative values, dropping low bits behaves differently from rounding toward zero, and a rounding increment can itself overflow the target format.

Signed 8 × 8 boundary exampleSigned 8 × 8 boundary example−128 × −12816384 Largest positive signed 15-bit value16383
Illustrative model and values; assumptions are stated in the adjacent text.

Retain full precision through the multiply, then perform the documented conversion. Use the companion rounding and saturation task for that step. Before using an example in an FPGA, simulate the signed extremes and inspect synthesized DSP usage; a numerical model alone does not show how many hardware multipliers were inferred.

Inspect the implemented timing path.

Preserve product scale: short sequencePreserve product scale: Operand A fractional bits: 4 fractional bits; Operand B fractional bits: 4 fractional bits; Full product fractional bits: 8 fractional bits

Operand A fractional bits: 4 fractional bits → Operand B fractional bits: 4 fractional bits → Full product fractional bits: 8 fractional bits

Export your result with its assumptions. For an unresolved board or implementation issue, prepare an engineering review with the exact part, revision and relevant record. This link opens the review page; it does not send your worksheet.

Sources and scope

Sources checked 18 November 2026. Numerical examples are calculated cases. Hardware measurements and device timing closure are outside the results shown here.

Back to Tutorials

Related evidence and next tasks

Continue the task with the relevant source scope. These reading paths do not establish interchangeability or current supply.

Source addresses and citation trail

Full source addresses are retained below. Read each citation with its document revision, page, table and applicability conditions above.

  1. https://commons.wikimedia.org/wiki/File:Adapteva_Parallella_DK02_-_Zynq_(15455173526).png
  2. https://creativecommons.org/licenses/by-sa/2.0
  3. https://projectf.io/posts/fixed-point-numbers-in-verilog/
  4. https://docs.amd.com/r/2025.1-English/ug1399-vitis-hls/Fixed-Point-Identifier-Summary?contentId=kSnNk1t985H31SA0JykRpg
  5. https://docs.amd.com/r/en-US/ug953-vivado-7series-libraries/RAMB18E1