← All projectsGitHub
LLM chip design loops

Does writing a fixed-weight multiplier as shift-and-add with canonical signed digits beat Yosys's x * K?

research/chip-constmul

Fixed-weight multipliers for all 255 8-bit constants: Yosys's x * K tracks binary shift-add (Pearson 0.97 with set bits), and a canonical-signed-digit form has 33% fewer generic-gate cells at similar depth (every form proved equivalent).

6 tests

What it found

For every 8-bit constant K (1–255), an 8-bit input is multiplied three ways — the * operator, binary shift-add, and canonical-signed-digit (CSD) shift-add/subtract — and scored by Yosys 0.33 in generic gates; every variant is proved equivalent to the operator form by a miter. The operator tracks binary shift-add (cells correlate 0.97 with the number of set bits of K, 0.65 with CSD digits). CSD uses 75.7 mean cells against 112.9 for the operator (33.0% fewer; fewer cells for 230 of 255 constants, worse for 14) at similar mean depth (20.0 vs 19.6); K=255 drops from 222 to 30 cells. Preliminary: one tool version, one ABC script, generic gates rather than library area, one input width, no shared sub-sums across constants.

A figure from its own output

Figure produced by research/chip-constmul: cells_by_digits
chip-constmul/experiments/cells_by_digits.svg, written by the project's own experiment code.

Paper, code and results

More in LLM chip design loops

All 40 LLM chip design loops projects →

Other research topics

Proper scoring & elicitation28Effort & peer prediction9Verification games & slashing19Detection & tolerances14Markets as routers13Prediction-market design9Paying contributors8Decentralised training systems23Digital twins & sim-to-real164LLM chip design loops40Robot manufacturing loops53Ambient AI assistant46Self-replicating manufacturing34Simulation-first design64Engineered clothing45Task-specific AI accelerators40Algorithmic chip-design loops42Open-source purpose-built robots44The software-engineering loop43Adversarial human imitation41Open-source residential construction41Autonomous multi-angle capture34Sensing, imaging and 3D31Energy supply and dense energy storage39Robot societies among people31Agentic co-design of low-cost robots27Laundry-hanging robots25Machine learning on qualitative data23Robots on the building site27Civilizations & group psychology1History & human sciences1

Produced with AI assistance (Claude). Results are from the code in this repository and are simulated or stylised unless the abstract says otherwise; nothing here implies affiliation with or endorsement by any lab, researcher or company cited. MIT licensed.