Architecture
- Fully combinational posit<16,1> multiplier: 5 RTL modules (posit, extraction, lzd, lod, booth) plus two exploratory variants (parameterized, Zhang-style packing).
- Extraction: each operand is conditionally inverted by its sign, then a hierarchical leading-zero detector and leading-one detector (built from 4-bit LZD/LOD cells) give the regime run length in one pass. A barrel shift aligns the exponent bit and the 13-bit fraction.
- Scale path: regime and exponent fold into a single signed scale factor per operand (rg_exp = 2·regime + exp), and the two are added.
- Mantissa path: 14×14 multiply of the fractions with hidden bits, then a one-bit normalization shift that also increments the scale on overflow.
- Re-encoding: the scale splits back into regime and exponent, and a signed arithmetic shift builds the regime run in place.
- Rounding: round-to-nearest-even from guard, round, sticky and LSB bits, then two's-complement negation for mixed-sign products.
- Special cases: zero operands force zero, and NaR (1000…0) on either input forces NaR.
- Radix-4 Booth multiplier (booth.v) written as a lower-power replacement for the behavioural mantissa multiply; not yet integrated.
- Earlier prototype (Dec 2024): a precision-scalable 32-bit datapath that runs as 4× posit8, 2× posit16 or 1× posit32, selected by a mode input, with shared complementer, LZD/LOD, shifter and a mode-gated Booth multiplier. It was restarted as the fixed posit<16,1> design above to get a clean, synthesizable baseline for the power study.
Verification Architecture
- Directed Verilog testbenches per module: posit_tb (full multiplier), booth_tb, extraction_tb, and 4-bit and 15-bit LZD/LOD benches.
- posit_tb and booth_tb are self-checking: each vector compares the DUT output against a hand-computed expected posit bit pattern and prints Passed/Failed.
- The extraction and LZD/LOD benches drive sweeps and are checked by waveform inspection, not by an automatic comparison.
- Simulated in Vivado xsim during development and re-run in Questa for this page. No reference model or scoreboard yet.
Verification Strategy
- Corner-case directed vectors for the full multiplier: positive × positive, negative regime, mixed signs, negative × negative, maximum regime (saturates to maxpos) and minimum regime (underflows to minpos).
- Unit-level checks of the leading-zero and leading-one detectors before integrating them into extraction.
- PlannedBit-exact comparison against a software posit reference (e.g. SoftPosit) over random and exhaustive single-operand sweeps.
- PlannedMake the extraction and LZD/LOD benches self-checking.
- PlannedFix the Booth multiplier's operand signedness, integrate it, and re-verify the full multiplier.
- PlannedCommit the power reports and switching-activity setup alongside the area and timing reports.
Results
- posit_tb: 6 / 6 directed vectors pass, including both regime extremes (re-run in Questa 21.1).
- booth_tb: 10 / 14 pass. All four failures have the MSB of operand A set. The Booth encoder treats A as two's-complement, while three of the expected values assume unsigned A, and the fourth expected value is itself wrong (the RTL gives the correct 8191²). Unsigned 14-bit mantissas need one more zero-extended Booth digit.
- Power: 4–7% reduction from switching-activity analysis in Design Compiler (measured outside this repo; reports not committed).
- Synthesis (Design Compiler, TSMC 65 nm tcbn65gpluswc, WCCOM worst-case corner): 1,064 leaf cells, 3,317.76 total cell area (library units), 10.30 ns critical path from A[15] through extraction, multiply and rounding to O[14].
- Bugs found by the directed tests and fixed: LZD/LOD count errors, rg_exp extraction, regime/exponent encoding, large-regime handling, normalization/rounding, and Booth sign extension. An earlier Zhang-style variant with wrong exponent, regime and rounding logic is kept in extra/ as a record.
- Reproducible: synthesis scripts and the DC command list are in synthesis/, and area, timing and QoR reports are committed.
Evidence
wire [14:0] operand_ng = operand[15] ? ~operand[14:0] : operand[14:0];
lzd lzd16(operand_ng, czip, vz);
lod lod16(operand_ng, cone, vo);
wire [4:0] rg = operand_ng[14] ? cone - 1 : -czip;
wire [3:0] shift_rg = operand_ng[14] ? cone + vo : czip + vz;
wire [14:0] shifted_op_neg = operand_ng << shift_rg;
wire exp = shifted_op_neg[14];
assign mantissa = shifted_op_neg[13:1];
assign rg_exp = { rg, 1'b0 } + exp;wire G = tempAns[13];
wire R = tempAns[12];
wire S = |tempAns[11:0];
wire L = tempAns[14];
wire roundup = G & (R | S | L);
wire [N-1:0] intermediateAns = { 1'b0, tempAns[28:28-N+2] } + roundup;
wire special = (A[N-1] & ~|A[N-2:0] | B[N-1] & ~|B[N-2:0]);
assign O = special ? inf : finalAns;# Passed: 0010100011110110 x 0001110101110001 = 0001001001111100
# Passed: 0100010000000000 x 0111010000110100 = 0111010101000001
# Passed: 0111001001010010 x 1111101101010010 = 1110011110001100
# Passed: 1101111000010100 x 1111101101010010 = 0000001010000000
# Passed: 0111111111011000 x 0111111011010010 = 0111111111111111
# Passed: 0000000110000011 x 0000000000101111 = 0000000000000001Critical Path Length: 10.30
Total Negative Slack: 0.00
Leaf Cell Count: 1064
Combinational Area: 3317.759997
Total Number of Nets: 1199