← l8hdl projects

Generating arithmetic modules like it was year 2000

Tohoku Arith and NTNU reborn

Around the turn of the millennium, two university web sites would build an arithmetic circuit for you. You filled in a form: an adder, a multiplier, a multiply-accumulator, the bit widths, the kind of partial-product tree, the final adder. You pressed Submit. A while later, sometimes by e-mail, you had HDL in your hands. Both sites went dark long ago. Their pages survived in the Internet Archive. Here they are again, and they answer again.

Tohoku: the Arithmetic Module Generator

The Aoki Laboratory of the Graduate School of Information Sciences, Tohoku University, ran the Arithmetic Module Generator (AMG). Its five forms built two-operand adders, multi-operand adders, multipliers and two kinds of multiply-accumulators. It offered twelve final adders, eight partial-product trees from the array to the redundant binary tree, simple or radix-4 Booth partial products, and unsigned or two's complement numbers. The request was queued, a REQUEST-ID came by mail, then verified Verilog or VHDL. The site also documented the algorithms behind every option.

Enter the Tohoku AMG »

NTNU: Modgen

Johnny Pihl and Espen Sand at the Department of Physical Electronics, Norwegian University of Science and Technology, wrote Modgen in 1998, an "Arithmetic Module Generator for High Performance VLSI Designs". One form, one CGI script: adders, subtracters, multipliers, squarers, Wallace trees and registers, with Booth recoding, pipelining around the Wallace tree, truncation, accumulation and a carry-save output, in VHDL or Verilog. Their paper on the generator's multipliers is part of the rebuilt site.

Enter NTNU Modgen »

What is new new

The pages are the archived originals, with a few period touches added. Behind the forms there is no mail queue and no CGI anymore. Your browser answers the request on the spot. Nothing is sent anywhere.

The circuits come from the arithmetic catalog of l8hdl. Its adders, multipliers and multiply-accumulators are exported as generic Verilog: one module per algorithm, with the widths as true parameters and the structure built by generate. For each request the page writes a small top module that instantiates these generic modules for your widths, and appends the generic modules it needs. A multiplier, for example, is a carry-save tree module plus a final-adder module:

mul_carrysave_dadda_signed #(.AW(16), .BW(12), .P(0)) u_tree ( ... .s(cs_s), .c(cs_c) );
adder_han_carlson          #(.W(28),  .P(0))          u_final ( .req_a(cs_s), .req_b(cs_c), ... .s(p) );

Every answer comes with a self-checking testbench. It drives a few thousand random vectors plus the corner cases (zero, all ones, the sign bit), compares with a behavioural model in the testbench itself, and prints PASS or FAIL. It runs under Verilator or Icarus Verilog.

What is reborn so far

An option without a module is shown greyed out in the forms, marked "(not yet reborn)". Where a whole form has no generic module yet, it offers a few fixed presets in plain Verilog instead.

SiteFormHowOptions with a module
TohokuTwo-operand addergeneric8 of 12 final adders: brent kung, carry select, han carlson, kogge stone, ladner fischer, ripple, skip fixed, skip variable
TohokuMultipliergeneric, composedcarry-save trees booth wallace 2's complement; simple dadda 2's complement; simple dadda unsigned; simple wallace 2's complement, each with any of the 8 adders; also booth dadda 2's complement with han carlson
TohokuSimple MAC X*Y+Zgenericsimple dadda, 2's complement, kogge stone; simple dadda, unsigned, kogge stone
TohokuMulti-operand adderpresetsS = sum of 4 operands of 16 bits (operand i at bits i*16..), Unsigned binary, Dadda tree, Han-Carlson adder; S = sum of 6 operands of 12 bits (operand i at bits i*12..), Unsigned binary, (4;2) compressor tree, Brent-Kung adder; S = sum of 8 operands of 8 bits (operand i at bits i*8..), 2's complement, Wallace tree, Kogge-Stone adder
TohokuGeneralized MACpresetsP = P = 3*Y1 + X2*Y2, 35 result bits; P = P = -7*Y1 + X2*Y2, 27 result bits; P = P = X1*Y1 + X2*Y2 + X3*Y3, 19 result bits
NTNUAdder, subtractergenericbinary-tree (Kogge-Stone) adder, input / output registers
NTNUMultipliergeneric, composedsimple or Booth partial products, Wallace tree; pipelining none, 1 or 2 steps; truncation, accumulate, carry-save output, registers
NTNUSquarergenericWallace tree; pipelining as a register behind the squarer
NTNUWallace treepresetscolumn heights or bit widths: 1 2 3 4 3 2 1; 2 2 3; 4 4 4 4; 16 12 8 4; 8 8 8
NTNUSimple registerwrappera plain register
bothNot yetTohoku: carry look-ahead, conditional sum and the two block look-ahead adders; balanced delay, overturned stairs, (4;2), (7,3) and redundant binary trees; Booth on Dadda except with Han-Carlson. NTNU: pipelining inside the Wallace tree, VHDL output.

All generic modules in one archive: arith2000-verilog.tar.gz (31 modules, 104 KB). Every option set the forms offer was compiled with its testbench under Verilator and passed before this site was built (162 cases, 2026-11-20).

Credits

The original pages, texts and figures belong to their authors: the Aoki Laboratory, Tohoku University, and Johnny Pihl and Espen Sand, NTNU. They were recovered from the Internet Archive's Wayback Machine; each rebuilt page says so at its top. The generators behind them are new.