Skip to content

About

ML accelerator design-space exploration, an open-source RTL-to-GDS flow, and the LLM agent tooling built to make that work affordable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SiliconForge

A working toolkit for designing ML accelerators and pushing them through an open-source silicon flow — plus the agent tooling built to make that work affordable.

Five independent tools, each usable on its own:

Tool What it does Lines
siliconforge/ Python framework: HuggingFace model → IR → tiling/mapping → area, power, timing, cost estimates → DSE → generated RTL, floorplan, and SDC ~27,000
openroad-flow/ RTL→GDS flow on free tools: Yosys → OpenROAD (ASAP7) → multi-corner STA → DRC → KLayout GDS, plus a flip-chip bump-map generator. Ships a working 8×8 systolic array to run it on ~2,100
llm-experiment-harness/ Closed-loop autonomous parameter search: an LLM proposes a config, runs the experiment, parses results, and decides what to try next. Runs offline with a mock proposer ~1,300
local-llm-mcp/ MCP server routing code generation to a local model in LM Studio, so mechanical work costs $0 in API tokens ~1,200
claude-code-setup/ The orchestration methodology: lead agent verifies, cheap workers do legwork, local model absorbs boilerplate ~650

siliconforge/ — ML accelerator design-space exploration

A Python framework for answering "if I built this accelerator, how would it perform, what would it cost, and would it close timing?" — without writing RTL first.

model (HF / ONNX)
   ↓  frontend/      ingest → ModelIR, op coverage, token-step graph
   ↓  quantization/  INT8 / INT4 / FP8-E4M3 / NVFP4 kernels, calibration, error model
   ↓  mapper/        tiling, fusion, parallelism, scheduling, KV-cache layout
   ↓  spatial/       compile onto a tiled chip; cycle & bandwidth model
   ↓  cost/          area, energy, thermal, die yield, packaged cost
   ↓  sta/           timing library, critical path, clock tree, SDC export
   ↓  pnr/           analytical place & route estimate
   ↓  dse/           evolutionary + Optuna search over the whole space
   ↓  artifacts/     generated Verilog, floorplan, PPA report

Subpackages: frontend, quantization, mapper, spatial, cost, sta, pnr, dse, hardware, artifacts, driver, inference.

pip install -e .
python examples/core/estimate_chip.py      # area / compute / power / cost report
python examples/spatial/...                # compile a model, emit RTL + PPA

Quantization formats are the public ones (INT8 symmetric per-channel, INT4 symmetric per-group, FP8 E4M3, NVFP4 E2M1-per-16-block). Model configs shipped in defaults.py are public HuggingFace architecture dimensions.


openroad-flow/ — RTL-to-GDS reference flow

A complete physical-design flow using only free tools, driven by one config file. Every stage is parameterized — point TOP_MODULE, RTL_FILES, die geometry, and clock target at your own design.

RTL ──Yosys──► netlist ──OpenROAD──► floorplan → place → CTS → route
                                          │
                                          ├──► multi-corner STA
                                          ├──► DRC
                                          └──KLayout──► GDS

Ships a self-contained 8×8 INT8 systolic MAC array (example/rtl/) with SDC constraints and a self-checking testbench, so the flow has something real to run on. scripts/gen_bump_map.py generates a flip-chip C4 bump map (power/ground/signal allocation, HBM stack placement) as JSON + HTML + a package spec.

make sim      # Icarus: 6 back-to-back 8×8 matmuls vs behavioral golden
make synth    # Yosys
make all      # synth → route → sta → drc → gds

llm-experiment-harness/ — closed-loop parameter search

The loop:

   ┌─────────────────────────────────────────────┐
   │                                             │
propose config → run experiment → parse metrics → analyze vs baseline
   ▲                                             │
   └───────────────── LLM picks next ────────────┘

Point it at any command that takes parameters and prints metrics. You declare the parameter space, which metrics to maximize/minimize, and your baselines; it drives the search. Metric names and the command are entirely yours — the harness is domain-agnostic.

cd examples
PYTHONPATH=../src python3 -m llm_harness.cli --config config.example.json --dry-run

--dry-run uses a deterministic mock proposer, so the full loop demonstrates end-to-end with no LLM server and zero dependencies — standard library only.


local-llm-mcp/ — offload codegen to a local model

An MCP stdio server exposing 14 tools (implement_task, llm_write_file, llm_edit_file, generate_tests, summarize_file, search_code, run_tests, refactor_suggest, …) that route work to a local model served by LM Studio. Mechanical code generation costs nothing; the frontier model is spent on judgment instead.

All file tools are confined to PROJECT_ROOT. See its README for the config block and the tool reference.


claude-code-setup/ — multi-agent orchestration kit

The methodology the rest of this repo was built with:

  • Orchestrator/worker split — the lead agent does architecture, rulings, and verification; workers do legwork on a pinned cheaper model.
  • Independent re-verification — a worker's summary is a claim, not evidence. The lead re-runs the checks.
  • Token offloading — a decision table for what goes to the local model.
  • Subagent safety — concrete rules against the failure modes that actually bite: agents running destructive git commands over a human's uncommitted work, parallel agents clobbering the same file, and agents reporting success without having run anything.

Includes a project-agnostic CLAUDE.md.template, an example settings file with a permission allowlist and a deny list for destructive git operations, and three reusable subagent definitions.


What has actually been verified

Being precise about this, because "it compiles" and "it works" are different claims:

Verified How
Python package imports, 28 core tests pass pytest on Python 3.14
Systolic-array example simulates correctly Icarus Verilog — 6 passes, 384 INT32 outputs, 0 mismatches vs behavioral golden
Example design synthesizes Yosys 0.64 — clean, no multi-driver warnings
Bump-map generator runs Produced a 10,201-bump map (JSON + HTML + spec)
Experiment-harness demo runs end to end Executed under a --without-pip venv with empty site-packages
MCP server + example tests node --check; example suite 6/6

Not verified: OpenROAD and KLayout were not installed in the environment this was assembled in, so place & route, DRC, and GDS export were written against each tool's documented command set but not run end to end. Treat them as reviewed-but-unexecuted until you run them yourself. The scripts do fail with a clear, actionable error when the tool is missing rather than crashing.

Reading the numbers: reported power is for the workload actually being modelled — a batch-1 single-token decode step, which is memory-bandwidth-bound and barely exercises the compute array. It is not comparable to peak TOPS, which assumes a fully utilized systolic array. Dividing one by the other gives a meaningless efficiency figure; real accelerators show the same gap, and it is the reason memory bandwidth dominates decode-time power in practice.


Provenance

These tools were built for, and extracted from, a private hardware design project, then generalized. Everything specific to that design — its architecture, configuration, measured results, and firmware/ISA layer — was removed rather than renamed. What remains is the reusable engineering: the modeling framework, the open-source flow, and the agent tooling.

License

MIT — see LICENSE.

About

ML accelerator design-space exploration, an open-source RTL-to-GDS flow, and the LLM agent tooling built to make that work affordable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages