Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Shorten a critical path with pipelining

Hardware interview practice

Shorten a critical path with pipelining

MediumTimingSystemVerilog

A four-operand W-bit sum is too slow as one long combinational expression. Re-architect it as a two-stage pipeline that accepts new inputs every cycle and carries a valid bit to the output.

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
W=8; accept a=200,b=100,c=50,d=10 at cycle0
Expected output
10-bit sum=360 with out_valid at cycle2

Stage one registers widened partials 300 and 60, and stage two registers their full sum while later transactions may enter every cycle.

What to cover

Requirements

  1. Add enough width to preserve the full mathematical sum.
  2. Register two pairwise partial sums, then register their final sum.
  3. Accept one transaction per cycle and produce results at fixed two-cycle latency.
  4. Explain that latency increases even though throughput can remain one result per cycle.
asic.fyi · Learn silicon end to end.info@asic.fyi