Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Compute every product except one channel

Hardware interview practice

Compute every product except one channel

MediumDatapathsSystemVerilog

Accept a frame of sensor-lane gain factors and emit, for each lane, the product of every other lane's gain without using division.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Reviewed example

Work through one case

Input
accepted gains by lane = [1, 2, 3, 4]
Expected output
products by lane = [24, 12, 8, 6]

Each output combines the prefix before its lane with the suffix after it, so division is never needed.

What to cover

Requirements

  1. Support 1 to 8 unsigned eight-bit gains and emit results in lane order.
  2. Use a 56-bit result because each output multiplies at most seven eight-bit factors.
  3. Return the empty product 1 for a one-lane frame and handle zero, one-zero, and multi-zero inputs naturally.
  4. Reuse a multiplier across bounded prefix, suffix, and output work rather than requiring division.
  5. Keep output lane, product, and last stable while stalled.
asic.fyi · Learn silicon end to end.info@asic.fyi