RTL Studio Open IDE

Arithmetic & Math

16-Bit Carry-Select Adder

A 16-bit carry-select adder that splits addition into two 8-bit blocks to reduce propagation delay.

About this block

Simulate it in the Verilog IDE

Easyverilogsimsyn

16-Bit Carry-Select Adder is a Verilog reference block in the Arithmetic & Math catalog. Adders, multipliers, dividers, ALUs, and arithmetic datapaths. Marked Easy: a small block you can read, simulate, and synthesize in one sitting.

This IP implements a high-performance 16-bit carry-select adder in Verilog. By splitting the addition into two 8-bit blocks, it reduces propagation delay compared to a standard ripple-carry adder. Block 0 processes bits [7:0] using the actual carry-in, while Block 1 pre-computes sums for both possible carry-in values (0 and 1). Multiplexers then select the correct Block 1 result based on Block 0's carry-out.

This architecture offers an optimal balance between speed and hardware area, making it suitable for designs requiring moderate arithmetic performance.

This 16-bit carry-select adder provides efficient arithmetic operations. It is suitable for designs requiring moderate speed and low area. The implementation is fully verified with Icarus Verilog.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 16-Bit Carry-Select Adder.
  2. Read the Verilog module in the editor. The catalog line for this block: A 16-bit carry-select adder that splits addition into two 8-bit blocks to reduce propagation delay.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. 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.

Features

  • 16-bit Unsigned Addition: Supports operands a and b of width 16 bits.
  • Carry Handling: Includes cin (carry-in) and cout (carry-out) ports.
  • Optimized Performance: Uses a two-level carry-select structure to minimize critical path delay.
  • Verified: Includes a comprehensive testbench with 8 test cases covering edge cases, overflow, and random values.

Ports

PortDirectionWidthDescription
aInput[15:0]First operand
bInput[15:0]Second operand
cinInput1Carry-in
sumOutput[15:0]Sum result
coutOutput1Carry-out

Architecture

The adder is divided into two 8-bit blocks:

  1. Block 0 (Bits [7:0]): Computes sum and carry-out using the actual cin.
  2. Block 1 (Bits [15:8]): Pre-computes two potential sums and carry-outs:

- One assuming cin = 0. - One assuming cin = 1.

  1. Selection: Multiplexers select the correct Block 1 result based on cout from Block 0.

Verification

The testbench covers zero addition, carry-in scenarios, and overflow cases. All eight test cases passed successfully during simulation.

Test CaseDescriptionExpected ResultStatus
TC1Zero additionsum=0, cout=0PASS
TC2Zero addition with cinsum=1, cout=0PASS
TC3Simple additionsum=8, cout=0PASS
TC4Carry within block 0sum=16, cout=0PASS
TC5Carry into block 1sum=256, cout=0PASS
TC6Full overflowsum=0, cout=1PASS
TC7Block boundary with cinsum=257, cout=0PASS
TC8Random large valuessum=0x10245, cout=1PASS

More in Arithmetic & Math

All Arithmetic & Math blocks