Arithmetic & Math
Kogge-Stone Parallel Prefix Adder
Parameterized combinational Kogge-Stone adder with carry-in, carry-out, and signed overflow detection.
About this block
Simulate it in the Verilog IDE
Kogge-Stone Parallel Prefix Adder is a SystemVerilog reference block in the Arithmetic & Math catalog. Adders, multipliers, dividers, ALUs, and arithmetic datapaths. Marked Medium: more state or a wider datapath, still one workspace in the IDE.
Parameterized combinational adder built with a Kogge-Stone parallel prefix tree. It computes sum = a + b + cin in a single logic depth of O(log WIDTH) carry stages and exposes unsigned carry-out plus optional signed overflow detection.
The default width is 32 bits. The testbench also instantiates 8-bit and 16-bit variants to confirm parameterization.
clk, rst_n, and ce are present for system integration but are not used inside the combinational core.
- Choose Open in IDE. RTL Studio loads the packaged workspace for Kogge-Stone Parallel Prefix Adder.
- Read the SystemVerilog module in the editor. The catalog line for this block: Parameterized combinational Kogge-Stone adder with carry-in, carry-out, and signed overflow detection.
- Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
- Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.
RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.
Ports
| Name | Direction | Type | Width | Description |
|---|---|---|---|---|
signed_mode | input | logic | 1 | 1 = assert overflow on signed wrap |
ce | input | logic | 1 | Unused (integration placeholder) |
a | input | logic | WIDTH | Augend |
b | input | logic | WIDTH | Addend |
cin | input | logic | 1 | Carry in |
sum | output | logic | WIDTH | Sum result |
cout | output | logic | 1 | Unsigned carry out |
overflow | output | logic | 1 | Signed overflow (MSB carry mismatch) |
More in Arithmetic & Math
- 1-Bit Full Adder
- 1-Bit Full Adder — L1 Upgrade — L2 Upgrade
- 1-Bit Half Adder
- 16-Bit Carry-Select Adder
- 16-Bit Signed Adder with Overflow
- 2-Bit Saturating Up/Down Counter — L2 Upgrade
- 32-Bit Count Leading Zeros
- 32-Bit Equality Comparator — L1 Upgrade — L2 Upgrade
- 32-Bit Population Count — L1 Upgrade — L2 Upgrade
- 4-bit Adder-Subtractor with Overflow
- 4-Digit BCD Adder with Carry Propagation — L2 Upgrade
- 4-Input 8-Bit Adder Tree — L2 Upgrade
- 8-Bit Absolute Value — L1 Upgrade
- 8-Bit ALU Slice with Add/Sub and Logic Ops — L2 Upgrade
- 8-Bit Carry-Save Adder (3:2) — L2 Upgrade
- 8-Bit Count Trailing Zeros — L1 Upgrade — L2 Upgrade