chipleap 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chipleap-0.2.0/.gitignore +20 -0
- chipleap-0.2.0/CHANGELOG.md +43 -0
- chipleap-0.2.0/LICENSE +21 -0
- chipleap-0.2.0/PKG-INFO +142 -0
- chipleap-0.2.0/README.md +105 -0
- chipleap-0.2.0/docs/commercial-tools.md +122 -0
- chipleap-0.2.0/docs/design.md +60 -0
- chipleap-0.2.0/docs/img/decisions.gif +0 -0
- chipleap-0.2.0/docs/img/die.jpg +0 -0
- chipleap-0.2.0/docs/img/layout.jpg +0 -0
- chipleap-0.2.0/docs/img/report.png +0 -0
- chipleap-0.2.0/docs/landscape.md +76 -0
- chipleap-0.2.0/docs/mcp.md +73 -0
- chipleap-0.2.0/docs/model.md +181 -0
- chipleap-0.2.0/docs/platforms.md +112 -0
- chipleap-0.2.0/docs/spec.md +120 -0
- chipleap-0.2.0/docs/verification.md +90 -0
- chipleap-0.2.0/docs/xheep.md +60 -0
- chipleap-0.2.0/examples/kws-dscnn.yaml +26 -0
- chipleap-0.2.0/examples/llama-3.2-1b-decode.yaml +18 -0
- chipleap-0.2.0/examples/qwen3-0.6b-prefill.yaml +16 -0
- chipleap-0.2.0/examples/smollm2-135m-open-pdk.yaml +16 -0
- chipleap-0.2.0/pyproject.toml +86 -0
- chipleap-0.2.0/src/chipleap/__init__.py +3 -0
- chipleap-0.2.0/src/chipleap/__main__.py +3 -0
- chipleap-0.2.0/src/chipleap/cli.py +635 -0
- chipleap-0.2.0/src/chipleap/data/example-spec.yaml +18 -0
- chipleap-0.2.0/src/chipleap/explore/__init__.py +27 -0
- chipleap-0.2.0/src/chipleap/explore/engine.py +391 -0
- chipleap-0.2.0/src/chipleap/explore/moves.py +391 -0
- chipleap-0.2.0/src/chipleap/explore/score.py +98 -0
- chipleap-0.2.0/src/chipleap/gen/__init__.py +0 -0
- chipleap-0.2.0/src/chipleap/gen/bundle.py +185 -0
- chipleap-0.2.0/src/chipleap/gen/datasheet.py +282 -0
- chipleap-0.2.0/src/chipleap/gen/rtl/chipleap_accel.sv +998 -0
- chipleap-0.2.0/src/chipleap/gen/rtl/chipleap_accel_axi.sv +267 -0
- chipleap-0.2.0/src/chipleap/gen/rtl.py +376 -0
- chipleap-0.2.0/src/chipleap/gen/sw/chipleap_driver.h.tpl +154 -0
- chipleap-0.2.0/src/chipleap/gen/tb/stim_gen.cpp +108 -0
- chipleap-0.2.0/src/chipleap/gen/tb/tb_chipleap.cpp +228 -0
- chipleap-0.2.0/src/chipleap/gen/tb/tb_chipleap.sv +268 -0
- chipleap-0.2.0/src/chipleap/gen/tb/tb_chipleap_axi.cpp +304 -0
- chipleap-0.2.0/src/chipleap/gen/xheep.py +163 -0
- chipleap-0.2.0/src/chipleap/hw/__init__.py +22 -0
- chipleap-0.2.0/src/chipleap/hw/cpu.py +103 -0
- chipleap-0.2.0/src/chipleap/hw/design.py +221 -0
- chipleap-0.2.0/src/chipleap/hw/liberty.py +268 -0
- chipleap-0.2.0/src/chipleap/hw/memory.py +180 -0
- chipleap-0.2.0/src/chipleap/hw/tech.py +275 -0
- chipleap-0.2.0/src/chipleap/hw/techlib.py +215 -0
- chipleap-0.2.0/src/chipleap/mcp_server.py +610 -0
- chipleap-0.2.0/src/chipleap/model/__init__.py +0 -0
- chipleap-0.2.0/src/chipleap/model/accel.py +344 -0
- chipleap-0.2.0/src/chipleap/model/bounds.py +115 -0
- chipleap-0.2.0/src/chipleap/model/evaluate.py +553 -0
- chipleap-0.2.0/src/chipleap/report/data.py +162 -0
- chipleap-0.2.0/src/chipleap/report/floorplan.py +192 -0
- chipleap-0.2.0/src/chipleap/report/html.py +366 -0
- chipleap-0.2.0/src/chipleap/report/text.py +176 -0
- chipleap-0.2.0/src/chipleap/spec.py +280 -0
- chipleap-0.2.0/src/chipleap/verify/__init__.py +0 -0
- chipleap-0.2.0/src/chipleap/verify/backends.py +114 -0
- chipleap-0.2.0/src/chipleap/verify/consistency.py +132 -0
- chipleap-0.2.0/src/chipleap/verify/csynth.py +283 -0
- chipleap-0.2.0/src/chipleap/verify/hdlsim.py +256 -0
- chipleap-0.2.0/src/chipleap/verify/innovus.py +97 -0
- chipleap-0.2.0/src/chipleap/verify/pnr.py +183 -0
- chipleap-0.2.0/src/chipleap/verify/remote.py +216 -0
- chipleap-0.2.0/src/chipleap/verify/run.py +373 -0
- chipleap-0.2.0/src/chipleap/verify/sim.py +233 -0
- chipleap-0.2.0/src/chipleap/verify/synth.py +185 -0
- chipleap-0.2.0/src/chipleap/verify/tools.py +160 -0
- chipleap-0.2.0/src/chipleap/verify/xheep.py +166 -0
- chipleap-0.2.0/src/chipleap/workload/__init__.py +20 -0
- chipleap-0.2.0/src/chipleap/workload/graph.py +146 -0
- chipleap-0.2.0/src/chipleap/workload/llm.py +426 -0
- chipleap-0.2.0/src/chipleap/workload/ops.py +157 -0
- chipleap-0.2.0/tests/conftest.py +5 -0
- chipleap-0.2.0/tests/test_accel_model.py +107 -0
- chipleap-0.2.0/tests/test_commercial.py +519 -0
- chipleap-0.2.0/tests/test_evaluate.py +114 -0
- chipleap-0.2.0/tests/test_gen.py +223 -0
- chipleap-0.2.0/tests/test_hw.py +85 -0
- chipleap-0.2.0/tests/test_mcp_cli.py +111 -0
- chipleap-0.2.0/tests/test_platform.py +173 -0
- chipleap-0.2.0/tests/test_pnr.py +48 -0
- chipleap-0.2.0/tests/test_rtl.py +84 -0
- chipleap-0.2.0/tests/test_spec_explore.py +118 -0
- chipleap-0.2.0/tests/test_synth.py +26 -0
- chipleap-0.2.0/tests/test_workload.py +136 -0
- chipleap-0.2.0/tests/test_xheep.py +30 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
|
+
.venv/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.pytest_cache/
|
|
8
|
+
.mypy_cache/
|
|
9
|
+
.ruff_cache/
|
|
10
|
+
.coverage
|
|
11
|
+
htmlcov/
|
|
12
|
+
# Generated bundles and simulation builds
|
|
13
|
+
out/
|
|
14
|
+
obj_dir/
|
|
15
|
+
*.vcd
|
|
16
|
+
*.fst
|
|
17
|
+
.playwright-mcp/
|
|
18
|
+
|
|
19
|
+
# Local agent worktrees
|
|
20
|
+
.claude/worktrees/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.2.0] - 2026-10-10
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Place and route: `chipleap verify --steps pnr` (or `--steps all`) runs the accelerator through LibreLane on IHP SG13G2, with timing at every corner, KLayout DRC with IHP's rule deck, LVS and antenna repair, and keeps the GDS. The open-PDK example's 1 x 8 GEMV engine routes to a 0.81 mm2 core with clean DRC and LVS, about 120 MHz at the typical corner and 77 MHz at the slow corner. `scripts/render_gds.py` draws a GDS in the PDK's colours.
|
|
14
|
+
- A `standalone` platform: the accelerator as AXI4 IP for any host (an Arm, RISC-V or FPGA SoC), with an AXI4-Lite register port, AXI4 read and write masters, a plain C driver and a protocol-checking AXI testbench. Set `platform: standalone` in a spec or pass `--platform standalone`; reports give the IP's area apart from the assumed host system.
|
|
15
|
+
- Commercial EDA tools next to the open ones: simulation with Cadence Xcelium, Synopsys VCS or Siemens Questa through one simulator-neutral SystemVerilog testbench driven by the generated C driver, and synthesis with Cadence Genus or Synopsys Design Compiler, with Innovus scripts for the netlist (`--sim-tool`, `--synth-tool`). Runs on this machine or on a design server over ssh (`--remote`, `--remote-setup`); the MCP server cannot choose a host or a setup command.
|
|
16
|
+
- `chipleap tech add`, `list` and `remove`: measure a PDK of your own from its liberty files into your config directory, never into a repository, and use it like the built-in technologies.
|
|
17
|
+
- README images: the die render, an animation of the agent's decisions with every floorplan to scale, the report, and the routed layout (`scripts/make_readme_visuals.py`).
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Synthesis failed for bundles given by a relative path.
|
|
22
|
+
- The hero callouts drifted off their blocks on phones while scrolling, and figures on phones used a display face whose 1 read oddly.
|
|
23
|
+
- `chipleap require` now sizes external memory per process node at the rate that node's I/O allows, as the evaluator does. It no longer rules out serial memories that run below their rated speed on the IHP 130 nm pads, such as two octal PSRAM channels for SmolLM2 135M at 2 tokens per second; `required_resources` reports `channels_by_node`.
|
|
24
|
+
|
|
25
|
+
## [0.1.0] - 2026-10-10
|
|
26
|
+
|
|
27
|
+
First release.
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- Workloads: twelve decoder-only LLM presets with shapes from their `config.json` (SmolLM2, Qwen2.5, Qwen3, Gemma 3, TinyLlama, Llama 3.2, Phi-3), decode and prefill, grouped-query attention, sliding windows, int8, int4 and int2 weights with group scales, int8 and int4 KV cache; custom graphs with `conv2d`, `dwconv2d`, `matmul` and `vector` operators.
|
|
32
|
+
- Hardware model: X-HEEP cores (CV32E20, CV32E40X, CV32E40P, CV32E40PX), buses, continuous and interleaved banks, seven external memories with per-node PHY and I/O limits, four process nodes; IHP SG13G2 data measured from the open PDK and from Yosys synthesis.
|
|
33
|
+
- Analytical evaluator with placement, bandwidth, per-operator timing and bottleneck attribution, energy, area and feasibility checks; `chipleap require` for inverse sizing.
|
|
34
|
+
- Explorer: an explainable agent that names the bottleneck, evaluates every single change and records its reasoning, plus seeded global sampling and a Pareto front; precision as a decision.
|
|
35
|
+
- Generator: X-HEEP Python configuration, accelerator SystemVerilog (GEMV, weight-stationary and output-stationary cores, multi-port DMA, double buffering), X-HEEP adapter, FuseSoC core, reggen register description, C driver with the model's tile planner, Verilator testbench, datasheet.
|
|
36
|
+
- Verification: bundle consistency, Verilator lint, randomized simulation against a golden model with a cycle cross-check (exact without memory stalls), Yosys synthesis on IHP SG13G2 through sv2v with buffered static timing (the accelerator area model is fitted to it), X-HEEP validation and template rendering of the configuration regenerated from `design.yaml` (a bundle's own Python is never executed).
|
|
37
|
+
- Reports in text, Markdown, JSON and self-contained HTML with the decision log, the Pareto front and breakdowns; a to-scale floorplan sketch.
|
|
38
|
+
- MCP server with ten tools, a `design_chip` prompt and a spec reference, run logs and `chipleap replay`.
|
|
39
|
+
- Website with a Blender render of a generated die and the agent's decisions animated to scale.
|
|
40
|
+
|
|
41
|
+
[Unreleased]: https://github.com/danieltyukov/chipleap/compare/v0.2.0...HEAD
|
|
42
|
+
[0.2.0]: https://github.com/danieltyukov/chipleap/compare/v0.1.0...v0.2.0
|
|
43
|
+
[0.1.0]: https://github.com/danieltyukov/chipleap/releases/tag/v0.1.0
|
chipleap-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Daniel Tyukov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
chipleap-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: chipleap
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Architecture exploration from workload to RISC-V SoC: an analytical evaluator, an explainable design agent and an X-HEEP generator with RTL verification.
|
|
5
|
+
Project-URL: Homepage, https://danieltyukov.github.io/chipleap/
|
|
6
|
+
Project-URL: Source, https://github.com/danieltyukov/chipleap
|
|
7
|
+
Project-URL: Issues, https://github.com/danieltyukov/chipleap/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/danieltyukov/chipleap/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Daniel Tyukov
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: accelerator,design-space-exploration,eda,hardware-architecture,llm,mcp,risc-v,x-heep
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: mcp>=1.10
|
|
22
|
+
Requires-Dist: pyyaml>=6.0
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: hjson>=3.0; extra == 'dev'
|
|
25
|
+
Requires-Dist: mako>=1.2; extra == 'dev'
|
|
26
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-cov>=5; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
30
|
+
Requires-Dist: types-pyyaml; extra == 'dev'
|
|
31
|
+
Provides-Extra: site
|
|
32
|
+
Requires-Dist: pillow>=10; extra == 'site'
|
|
33
|
+
Provides-Extra: xheep
|
|
34
|
+
Requires-Dist: hjson>=3.0; extra == 'xheep'
|
|
35
|
+
Requires-Dist: mako>=1.2; extra == 'xheep'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="assets/logo.svg" alt="ChipLeap" width="280">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<p align="center"><b>Tell it the model and the speed you need. ChipLeap designs the chip,<br>explains every choice, writes the RTL and checks it.</b></p>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<a href="https://github.com/danieltyukov/chipleap/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/danieltyukov/chipleap/ci.yml?branch=main&label=CI" alt="CI status"></a>
|
|
46
|
+
<a href="https://github.com/danieltyukov/chipleap/releases"><img src="https://img.shields.io/github/v/release/danieltyukov/chipleap" alt="Latest release"></a>
|
|
47
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
|
|
48
|
+
<img src="https://img.shields.io/badge/python-%3E%3D3.10-brightgreen" alt="Python 3.10 or newer">
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
<p align="center">
|
|
52
|
+
<a href="https://danieltyukov.github.io/chipleap/">Website</a> ·
|
|
53
|
+
<a href="#quick-start">Quick start</a> ·
|
|
54
|
+
<a href="docs/">Docs</a> ·
|
|
55
|
+
<a href="CHANGELOG.md">Changelog</a>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<p align="center">
|
|
59
|
+
<img src="docs/img/die.jpg" alt="A rendered die that ChipLeap designed for SmolLM2 135M on the IHP 130 nm open PDK, with SRAM, a RISC-V core, a GEMV engine and an octal PSRAM interface" width="760">
|
|
60
|
+
<br><sub>A chip ChipLeap designed for SmolLM2 135M on the open IHP 130 nm PDK, rendered to scale from its floorplan.</sub>
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
## What it does
|
|
64
|
+
|
|
65
|
+
You describe a workload (say, Llama 3.2 1B decoding), a target (5 tokens per second) and your limits (area, power, process nodes). ChipLeap works out the rest:
|
|
66
|
+
|
|
67
|
+
1. **Sizes the problem.** The bandwidth, compute and memory the target needs, and which memories and nodes can deliver them.
|
|
68
|
+
2. **Designs the architecture.** An agent finds the bottleneck, tries every single change, keeps the best one and writes down why. It chooses the on-chip memory, the external memory, the dataflow, the array size, the precision, the CPU, the clock and the node.
|
|
69
|
+
3. **Generates the hardware.** Accelerator RTL in SystemVerilog, an X-HEEP RISC-V SoC configuration or AXI4 IP for any host, a C driver, a testbench and a datasheet.
|
|
70
|
+
4. **Checks it.** Simulation against a golden model, synthesis, place and route, and the SoC generator's own checks, on open-source tools or the commercial ones you already have.
|
|
71
|
+
|
|
72
|
+
<p align="center">
|
|
73
|
+
<img src="docs/img/decisions.gif" alt="The agent's decisions for Llama 3.2 1B: each step's floorplan drawn to the same scale, from a bare microcontroller to a 16 nm design with a GEMV engine and LPDDR5" width="760">
|
|
74
|
+
<br><sub>The agent's decisions for Llama 3.2 1B at 5 tokens per second. Every floorplan is drawn to the same scale.</sub>
|
|
75
|
+
</p>
|
|
76
|
+
|
|
77
|
+
## Quick start
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
uv tool install git+https://github.com/danieltyukov/chipleap
|
|
81
|
+
chipleap init llama.yaml # an example spec to edit
|
|
82
|
+
chipleap explore llama.yaml -o out # decisions, Pareto front and the hardware in out/
|
|
83
|
+
chipleap verify out # simulate, synthesize and check it
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Open `out/report.html` to see each decision, the Pareto front and where the time goes.
|
|
87
|
+
|
|
88
|
+
<p align="center"><img src="docs/img/report.png" alt="The HTML report: the recommended design, the Pareto front of 2,153 evaluated designs and the agent's progress toward the target" width="560"></p>
|
|
89
|
+
|
|
90
|
+
## Ask your AI assistant
|
|
91
|
+
|
|
92
|
+
ChipLeap is also an MCP server, so Claude, Cursor, VS Code or Codex can drive it:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
claude mcp add chipleap -s user -- chipleap mcp
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Then ask things like *"Design the smallest chip on the IHP open PDK that runs SmolLM2 135M at two tokens per second"* or *"Why is this design memory bound, and what is the cheapest fix?"*. [docs/mcp.md](docs/mcp.md) covers the other clients.
|
|
99
|
+
|
|
100
|
+
## Works with what you have
|
|
101
|
+
|
|
102
|
+
- **Any workload:** twelve LLM presets (SmolLM2, Qwen, Gemma, Llama, Phi, TinyLlama), or your own network of convolutions and matrix multiplies.
|
|
103
|
+
- **Any host:** a complete X-HEEP RISC-V SoC, or the accelerator alone as AXI4 IP for an Arm, RISC-V or FPGA SoC ([platforms](docs/platforms.md)).
|
|
104
|
+
- **Open tools:** Verilator, Yosys and LibreLane (OpenROAD, KLayout, Netgen) on the IHP SG13G2 open PDK.
|
|
105
|
+
- **Commercial tools:** Cadence Xcelium and Genus, Synopsys VCS and Design Compiler, Siemens Questa, on your machine or on a design server over ssh ([guide](docs/commercial-tools.md)).
|
|
106
|
+
- **Your own PDK:** `chipleap tech add` measures it from its liberty files and keeps the numbers on your machine.
|
|
107
|
+
|
|
108
|
+
Every tool is optional. `chipleap doctor` lists what it found, and `chipleap verify` skips what is missing and says why.
|
|
109
|
+
|
|
110
|
+
## Down to the layout
|
|
111
|
+
|
|
112
|
+
<img src="docs/img/layout.jpg" alt="The routed layout of the 1 x 8 GEMV engine on IHP SG13G2, drawn from its GDS: signal wires on four metal layers under the power grid" width="300" align="right">
|
|
113
|
+
|
|
114
|
+
`chipleap verify out --steps all` adds place and route with LibreLane, the open flow Tiny Tapeout uses for its IHP shuttles. The picture is the GDS it wrote for the SmolLM2 chip's 1 x 8 GEMV engine: a 0.81 mm² core with clean DRC, LVS and antenna checks, at about 120 MHz at the typical corner and 77 MHz at the slow one.
|
|
115
|
+
|
|
116
|
+
The accelerator model is the same tile schedule the RTL runs, so it is checked against it:
|
|
117
|
+
|
|
118
|
+
- **Cycles:** equal to simulation without memory stalls, within a few percent with random stalls, on Verilator, Xcelium, VCS and Questa alike.
|
|
119
|
+
- **Area:** logic area within 4 % on average of synthesis on IHP SG13G2, across 11 configurations.
|
|
120
|
+
- **Clock:** the model allows 100 MHz on that node, which the routed design meets at the typical corner.
|
|
121
|
+
|
|
122
|
+
The other nodes are scaled from published figures and say so. [docs/model.md](docs/model.md) lists every number and its source; [docs/verification.md](docs/verification.md) explains each check.
|
|
123
|
+
|
|
124
|
+
## Learn more
|
|
125
|
+
|
|
126
|
+
| Guide | What it covers |
|
|
127
|
+
|---|---|
|
|
128
|
+
| [Spec format](docs/spec.md) | Workloads, targets, constraints and what the explorer may change |
|
|
129
|
+
| [The model](docs/model.md) | Timing, energy and area, with sources |
|
|
130
|
+
| [Verification](docs/verification.md) | Simulation, synthesis, place and route, X-HEEP checks |
|
|
131
|
+
| [Platforms](docs/platforms.md) | X-HEEP or AXI4 IP, and how to integrate each |
|
|
132
|
+
| [Commercial tools](docs/commercial-tools.md) | Cadence, Synopsys and Siemens tools, remote servers, your own PDK |
|
|
133
|
+
| [X-HEEP integration](docs/xheep.md) | How the accelerator plugs into the SoC |
|
|
134
|
+
| [Where it fits](docs/landscape.md) | Agentic EDA, workload-to-chip services and academic tools, compared |
|
|
135
|
+
|
|
136
|
+
## Contributing
|
|
137
|
+
|
|
138
|
+
Issues and pull requests are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md). `pytest` runs the suite, and the hardware tests run when their tools are installed.
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
MIT. Generated X-HEEP configurations carry X-HEEP's Apache-2.0 header. ChipLeap is an independent project, not affiliated with EPFL, IHP or any company named here.
|
chipleap-0.2.0/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/logo.svg" alt="ChipLeap" width="280">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center"><b>Tell it the model and the speed you need. ChipLeap designs the chip,<br>explains every choice, writes the RTL and checks it.</b></p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://github.com/danieltyukov/chipleap/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/danieltyukov/chipleap/ci.yml?branch=main&label=CI" alt="CI status"></a>
|
|
9
|
+
<a href="https://github.com/danieltyukov/chipleap/releases"><img src="https://img.shields.io/github/v/release/danieltyukov/chipleap" alt="Latest release"></a>
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
|
|
11
|
+
<img src="https://img.shields.io/badge/python-%3E%3D3.10-brightgreen" alt="Python 3.10 or newer">
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://danieltyukov.github.io/chipleap/">Website</a> ·
|
|
16
|
+
<a href="#quick-start">Quick start</a> ·
|
|
17
|
+
<a href="docs/">Docs</a> ·
|
|
18
|
+
<a href="CHANGELOG.md">Changelog</a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<img src="docs/img/die.jpg" alt="A rendered die that ChipLeap designed for SmolLM2 135M on the IHP 130 nm open PDK, with SRAM, a RISC-V core, a GEMV engine and an octal PSRAM interface" width="760">
|
|
23
|
+
<br><sub>A chip ChipLeap designed for SmolLM2 135M on the open IHP 130 nm PDK, rendered to scale from its floorplan.</sub>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
## What it does
|
|
27
|
+
|
|
28
|
+
You describe a workload (say, Llama 3.2 1B decoding), a target (5 tokens per second) and your limits (area, power, process nodes). ChipLeap works out the rest:
|
|
29
|
+
|
|
30
|
+
1. **Sizes the problem.** The bandwidth, compute and memory the target needs, and which memories and nodes can deliver them.
|
|
31
|
+
2. **Designs the architecture.** An agent finds the bottleneck, tries every single change, keeps the best one and writes down why. It chooses the on-chip memory, the external memory, the dataflow, the array size, the precision, the CPU, the clock and the node.
|
|
32
|
+
3. **Generates the hardware.** Accelerator RTL in SystemVerilog, an X-HEEP RISC-V SoC configuration or AXI4 IP for any host, a C driver, a testbench and a datasheet.
|
|
33
|
+
4. **Checks it.** Simulation against a golden model, synthesis, place and route, and the SoC generator's own checks, on open-source tools or the commercial ones you already have.
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<img src="docs/img/decisions.gif" alt="The agent's decisions for Llama 3.2 1B: each step's floorplan drawn to the same scale, from a bare microcontroller to a 16 nm design with a GEMV engine and LPDDR5" width="760">
|
|
37
|
+
<br><sub>The agent's decisions for Llama 3.2 1B at 5 tokens per second. Every floorplan is drawn to the same scale.</sub>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
## Quick start
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
uv tool install git+https://github.com/danieltyukov/chipleap
|
|
44
|
+
chipleap init llama.yaml # an example spec to edit
|
|
45
|
+
chipleap explore llama.yaml -o out # decisions, Pareto front and the hardware in out/
|
|
46
|
+
chipleap verify out # simulate, synthesize and check it
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Open `out/report.html` to see each decision, the Pareto front and where the time goes.
|
|
50
|
+
|
|
51
|
+
<p align="center"><img src="docs/img/report.png" alt="The HTML report: the recommended design, the Pareto front of 2,153 evaluated designs and the agent's progress toward the target" width="560"></p>
|
|
52
|
+
|
|
53
|
+
## Ask your AI assistant
|
|
54
|
+
|
|
55
|
+
ChipLeap is also an MCP server, so Claude, Cursor, VS Code or Codex can drive it:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
claude mcp add chipleap -s user -- chipleap mcp
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Then ask things like *"Design the smallest chip on the IHP open PDK that runs SmolLM2 135M at two tokens per second"* or *"Why is this design memory bound, and what is the cheapest fix?"*. [docs/mcp.md](docs/mcp.md) covers the other clients.
|
|
62
|
+
|
|
63
|
+
## Works with what you have
|
|
64
|
+
|
|
65
|
+
- **Any workload:** twelve LLM presets (SmolLM2, Qwen, Gemma, Llama, Phi, TinyLlama), or your own network of convolutions and matrix multiplies.
|
|
66
|
+
- **Any host:** a complete X-HEEP RISC-V SoC, or the accelerator alone as AXI4 IP for an Arm, RISC-V or FPGA SoC ([platforms](docs/platforms.md)).
|
|
67
|
+
- **Open tools:** Verilator, Yosys and LibreLane (OpenROAD, KLayout, Netgen) on the IHP SG13G2 open PDK.
|
|
68
|
+
- **Commercial tools:** Cadence Xcelium and Genus, Synopsys VCS and Design Compiler, Siemens Questa, on your machine or on a design server over ssh ([guide](docs/commercial-tools.md)).
|
|
69
|
+
- **Your own PDK:** `chipleap tech add` measures it from its liberty files and keeps the numbers on your machine.
|
|
70
|
+
|
|
71
|
+
Every tool is optional. `chipleap doctor` lists what it found, and `chipleap verify` skips what is missing and says why.
|
|
72
|
+
|
|
73
|
+
## Down to the layout
|
|
74
|
+
|
|
75
|
+
<img src="docs/img/layout.jpg" alt="The routed layout of the 1 x 8 GEMV engine on IHP SG13G2, drawn from its GDS: signal wires on four metal layers under the power grid" width="300" align="right">
|
|
76
|
+
|
|
77
|
+
`chipleap verify out --steps all` adds place and route with LibreLane, the open flow Tiny Tapeout uses for its IHP shuttles. The picture is the GDS it wrote for the SmolLM2 chip's 1 x 8 GEMV engine: a 0.81 mm² core with clean DRC, LVS and antenna checks, at about 120 MHz at the typical corner and 77 MHz at the slow one.
|
|
78
|
+
|
|
79
|
+
The accelerator model is the same tile schedule the RTL runs, so it is checked against it:
|
|
80
|
+
|
|
81
|
+
- **Cycles:** equal to simulation without memory stalls, within a few percent with random stalls, on Verilator, Xcelium, VCS and Questa alike.
|
|
82
|
+
- **Area:** logic area within 4 % on average of synthesis on IHP SG13G2, across 11 configurations.
|
|
83
|
+
- **Clock:** the model allows 100 MHz on that node, which the routed design meets at the typical corner.
|
|
84
|
+
|
|
85
|
+
The other nodes are scaled from published figures and say so. [docs/model.md](docs/model.md) lists every number and its source; [docs/verification.md](docs/verification.md) explains each check.
|
|
86
|
+
|
|
87
|
+
## Learn more
|
|
88
|
+
|
|
89
|
+
| Guide | What it covers |
|
|
90
|
+
|---|---|
|
|
91
|
+
| [Spec format](docs/spec.md) | Workloads, targets, constraints and what the explorer may change |
|
|
92
|
+
| [The model](docs/model.md) | Timing, energy and area, with sources |
|
|
93
|
+
| [Verification](docs/verification.md) | Simulation, synthesis, place and route, X-HEEP checks |
|
|
94
|
+
| [Platforms](docs/platforms.md) | X-HEEP or AXI4 IP, and how to integrate each |
|
|
95
|
+
| [Commercial tools](docs/commercial-tools.md) | Cadence, Synopsys and Siemens tools, remote servers, your own PDK |
|
|
96
|
+
| [X-HEEP integration](docs/xheep.md) | How the accelerator plugs into the SoC |
|
|
97
|
+
| [Where it fits](docs/landscape.md) | Agentic EDA, workload-to-chip services and academic tools, compared |
|
|
98
|
+
|
|
99
|
+
## Contributing
|
|
100
|
+
|
|
101
|
+
Issues and pull requests are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md). `pytest` runs the suite, and the hardware tests run when their tools are installed.
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
MIT. Generated X-HEEP configurations carry X-HEEP's Apache-2.0 header. ChipLeap is an independent project, not affiliated with EPFL, IHP or any company named here.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Commercial tools and your own PDK
|
|
2
|
+
|
|
3
|
+
ChipLeap runs on open tools by default, and the same checks run on the commercial ones a
|
|
4
|
+
university or company already licenses: Cadence Xcelium, Synopsys VCS or Siemens Questa
|
|
5
|
+
for simulation, Cadence Genus or Synopsys Design Compiler for synthesis, with Cadence
|
|
6
|
+
Innovus scripts for the mapped netlist. The tools can be on this machine or on a design
|
|
7
|
+
server reached over ssh, and the process can be a foundry PDK measured from its liberty
|
|
8
|
+
files.
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
$ chipleap verify out --sim-tool xcelium --synth-tool genus --remote eda-server \
|
|
12
|
+
--remote-setup "source /opt/eda/licences.sh; source /opt/eda/cadence/xcelium.sh; source /opt/eda/cadence/genus.sh"
|
|
13
|
+
sim PASS Xcelium: 21 randomized jobs bit-exact; cycle model error 0.0% max without stalls, ...
|
|
14
|
+
synth PASS Genus: logic cell area ... mm2 on ihp-sg13g2 (model ... mm2, ...), critical path ... ns at a 100 MHz target
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Simulation
|
|
18
|
+
|
|
19
|
+
`--sim-tool xcelium`, `vcs` or `questa` runs `tb_chipleap.sv`, a SystemVerilog testbench
|
|
20
|
+
that every simulator runs unchanged. ChipLeap writes its stimulus on this machine with a
|
|
21
|
+
small C++ program (`stim_gen.cpp`) that compiles the generated C driver: it plans and
|
|
22
|
+
starts each job exactly as firmware would, records the driver's register writes, and
|
|
23
|
+
computes the golden result with the same data generator as the Verilator testbench. The
|
|
24
|
+
simulator then replays the writes, polls `STATUS`, reads `CYCLES` and compares every
|
|
25
|
+
output word.
|
|
26
|
+
|
|
27
|
+
So a commercial simulator checks the same things as Verilator: every job bit-exact, and
|
|
28
|
+
the cycle count against the model's prediction. Memory stalls come from a fixed
|
|
29
|
+
generator, so Xcelium, VCS, Questa and Verilator report the same cycle counts for the same
|
|
30
|
+
stimulus. `--sim-tool verilator-sv` runs this testbench on Verilator 5 with `--timing`,
|
|
31
|
+
which is how the flow is tested without a licence.
|
|
32
|
+
|
|
33
|
+
| Simulator | Command ChipLeap runs |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Xcelium | `xrun -64bit -sv -timescale 1ns/1ps -top tb_chipleap chipleap_accel.sv tb_chipleap.sv +stim=stim.txt` |
|
|
36
|
+
| VCS | `vcs -full64 -sverilog -timescale=1ns/1ps -top tb_chipleap ... -o simv && ./simv +stim=stim.txt` |
|
|
37
|
+
| Questa | `vlib work && vlog -sv ... && vsim -c tb_chipleap +stim=stim.txt -do "run -all; quit -f"` |
|
|
38
|
+
|
|
39
|
+
The work directory, with the stimulus, the simulator's output and its logs, is
|
|
40
|
+
`out/verify/<simulator>/`.
|
|
41
|
+
|
|
42
|
+
## Synthesis
|
|
43
|
+
|
|
44
|
+
`--synth-tool genus` or `dc` synthesizes the accelerator the way the Yosys step does:
|
|
45
|
+
twice, with 8- and 16-word buffers, extrapolating the logic area to zero buffer words,
|
|
46
|
+
because the buffers are SRAM macros in silicon. Each run's parameters are written into a
|
|
47
|
+
copy of the RTL, so no tool-specific parameter syntax is involved. The clock is the
|
|
48
|
+
design's when the technology is the design's own, otherwise the technology's practical
|
|
49
|
+
clock, and the step reports the worst setup slack at it as a critical path.
|
|
50
|
+
|
|
51
|
+
`--synth-tech` picks the library: `ihp-sg13g2` (the default, from the open PDK) or a
|
|
52
|
+
technology of your own (below). Genus reads the liberty directly. Design Compiler needs a
|
|
53
|
+
compiled `.db`: name one with `chipleap tech add --db`, or ChipLeap compiles the liberty
|
|
54
|
+
with Library Compiler (`lc_shell`) first.
|
|
55
|
+
|
|
56
|
+
When the technology's LEF files are known (the IHP SG13G2 ones are found next to its
|
|
57
|
+
liberty), the step also writes `innovus.tcl` and `mmmc.tcl` for the 16-word netlist:
|
|
58
|
+
floorplan, placement, clock tree, routing, post-route timing and reports, and a GDS when
|
|
59
|
+
the technology names a layer map. ChipLeap does not run Innovus itself; the open flow it
|
|
60
|
+
runs for layout is LibreLane.
|
|
61
|
+
|
|
62
|
+
## Running on a server
|
|
63
|
+
|
|
64
|
+
`--remote HOST` (or `CHIPLEAP_REMOTE`) copies the step's work directory to a fresh
|
|
65
|
+
scratch directory on the host, runs the tool there and copies the results back, then
|
|
66
|
+
deletes the scratch directory. `--remote-setup` (or `CHIPLEAP_REMOTE_SETUP`) is the shell
|
|
67
|
+
snippet that puts the tools on the path and points at the licence server; a snippet that
|
|
68
|
+
sources `.csh` files or uses `setenv` runs under tcsh, anything else under bash.
|
|
69
|
+
|
|
70
|
+
- Every run gets a new shell, so a site rule such as "one PDK per shell" holds by
|
|
71
|
+
construction.
|
|
72
|
+
- ssh runs with `BatchMode=yes`: key-based logins only, a password prompt is an error
|
|
73
|
+
rather than a hang. Hops and multiplexing come from your `~/.ssh/config`.
|
|
74
|
+
- `chipleap doctor --remote HOST --remote-setup ...` lists which of `xrun`, `vcs`,
|
|
75
|
+
`vsim`, `genus`, `dc_shell`, `lc_shell` and `innovus` the setup puts on the path there.
|
|
76
|
+
Locally, `chipleap doctor` looks them up on the path without starting them, so no
|
|
77
|
+
licence is checked out.
|
|
78
|
+
|
|
79
|
+
The MCP tool `verify_soc` takes the tool choices (`sim_tool`, `synth_tool`,
|
|
80
|
+
`synth_tech`), each checked against a fixed list, so an assistant can run the commercial
|
|
81
|
+
flow too. It cannot choose a host or a setup snippet: a remote run happens only when you
|
|
82
|
+
set `CHIPLEAP_REMOTE` and `CHIPLEAP_REMOTE_SETUP` in the environment that starts the MCP
|
|
83
|
+
server, because anything an assistant reads could try to steer it.
|
|
84
|
+
|
|
85
|
+
## Your own PDK
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
$ chipleap tech add mylib40 --node 40 --liberty /pdk/std/typ.lib \
|
|
89
|
+
--sram-liberty /pdk/sram/lib --lef /pdk/tech.lef --lef /pdk/std/cells.lef
|
|
90
|
+
Added technology 'mylib40' (40 nm, 1.1 V) in ~/.config/chipleap/tech/mylib40.yaml
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`chipleap tech add` measures what the liberty files state and scales what they do not:
|
|
94
|
+
|
|
95
|
+
| Number | From |
|
|
96
|
+
|---|---|
|
|
97
|
+
| Gate equivalent | the unit-drive two-input NAND's area |
|
|
98
|
+
| Logic leakage density | that NAND's leakage at the library's corner |
|
|
99
|
+
| SRAM area | a least-squares fit of macro area against capacity over the macro libraries (cells with a `memory` group) |
|
|
100
|
+
| SRAM read energy | the read-condition internal power of the widest macros, fitted against size and taken at 16 KiB |
|
|
101
|
+
| MAC and CPU energy | Horowitz (ISSCC 2014) scaled to the node and supply, as for the generic nodes |
|
|
102
|
+
| Clock and external memory rate | interpolated between the built-in nodes, or `--max-mhz` and `--max-io-mts` |
|
|
103
|
+
|
|
104
|
+
Without macro libraries the SRAM figures are scaled from IHP SG13G2 by the gate area. The
|
|
105
|
+
technology then appears everywhere a built-in one does: in exploration (restrict a spec to
|
|
106
|
+
it with `constraints: {tech: [mylib40]}`), in `chipleap catalog` and `chipleap tech list`,
|
|
107
|
+
and as `--synth-tech mylib40` for Genus and Design Compiler.
|
|
108
|
+
|
|
109
|
+
With `--remote HOST`, the liberty files stay on the server: each is read over ssh into
|
|
110
|
+
memory, measured and dropped, and the technology records the paths on that host, so
|
|
111
|
+
synthesis with `--remote HOST` uses them where they are.
|
|
112
|
+
|
|
113
|
+
## What stays private
|
|
114
|
+
|
|
115
|
+
- Technology files live in `~/.config/chipleap/tech` (`CHIPLEAP_TECH_DIR` moves it, an
|
|
116
|
+
empty value turns them off). They hold the measured numbers and the file paths, never
|
|
117
|
+
library content, and nothing writes them into a bundle or a repository. Under an NDA,
|
|
118
|
+
keep that directory out of version control and backups you share.
|
|
119
|
+
- A liberty that is not on this machine is never copied to it.
|
|
120
|
+
- Synthesis and simulation results stay in the bundle's `verify/` directory. Licence
|
|
121
|
+
terms for commercial tools often forbid publishing benchmark results; ChipLeap does not
|
|
122
|
+
publish anything, and the project's own documentation quotes only open-tool numbers.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# How ChipLeap is built
|
|
2
|
+
|
|
3
|
+
This page is for contributors: what each part does, how data flows between them, and why the main decisions were made. User-facing material lives in the [README](../README.md) and the other docs.
|
|
4
|
+
|
|
5
|
+
## The loop
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
spec.yaml ──> workload (operators) ──> evaluate(workload, design) ──> Evaluation
|
|
9
|
+
^ |
|
|
10
|
+
| v
|
|
11
|
+
explore: agent moves + sampling <── assess against the spec
|
|
12
|
+
|
|
|
13
|
+
v
|
|
14
|
+
recommended design ──> generate ──> bundle ──> verify
|
|
15
|
+
|
|
|
16
|
+
model constants <─── cycle counts, area <─────┘
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Packages
|
|
20
|
+
|
|
21
|
+
| Package | Role |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `chipleap.workload` | Operators (`MatMul`, `VectorOp`), LLM presets and their lowering (`llm.py`), custom graphs with convolution lowering (`graph.py`). |
|
|
24
|
+
| `chipleap.hw` | Process technologies (`tech.py`), external memories (`memory.py`), X-HEEP cores (`cpu.py`), the design point and its X-HEEP validity rules (`design.py`). |
|
|
25
|
+
| `chipleap.model` | The accelerator's tile planner and cycle model (`accel.py`), the SoC evaluator (`evaluate.py`), inverse sizing (`bounds.py`). |
|
|
26
|
+
| `chipleap.spec` | Spec parsing and validation. |
|
|
27
|
+
| `chipleap.explore` | Scoring against a spec (`score.py`), single-decision moves (`moves.py`), the agent loop, sampling and the Pareto front (`engine.py`). |
|
|
28
|
+
| `chipleap.gen` | The X-HEEP configuration (`xheep.py`), RTL, driver and testbench (`rtl.py` and the sources in `rtl/`, `sw/`, `tb/`), register map and datasheet (`datasheet.py`), the bundle writer (`bundle.py`). |
|
|
29
|
+
| `chipleap.verify` | Tool discovery, the consistency check, Verilator simulation, Yosys synthesis, X-HEEP checks, and the orchestration behind `chipleap verify`. |
|
|
30
|
+
| `chipleap.report` | Text, Markdown, JSON and self-contained HTML reports; the floorplan sketch. |
|
|
31
|
+
| `chipleap.mcp_server` | The MCP tools, prompt and resource, the run log and replay. |
|
|
32
|
+
| `chipleap.cli` | The command line. |
|
|
33
|
+
|
|
34
|
+
## Decisions
|
|
35
|
+
|
|
36
|
+
**One machine, two descriptions.** The accelerator exists twice: as SystemVerilog and as `chipleap.model.accel`. The model is not a separate idealisation; it describes the RTL's own schedule, with constants read off its state machines, and the C driver's tile planner is the Python one transcribed. That is what lets the verifier compare the two cycle for cycle, and what makes the explorer's numbers trustworthy for the accelerator. When the RTL changes, the constants in `accel.py` and the test `tests/test_rtl.py` change with it.
|
|
37
|
+
|
|
38
|
+
**A fast closed form and an exact schedule.** The explorer evaluates thousands of designs, each with dozens of operators, some with tens of thousands of tiles (a 128k-entry vocabulary). `job_timing` sums over the at most eight distinct tile shapes. `simulate_job` walks the tiles through the loader and the core and is exact. Jobs of up to 256 tiles use the exact one, and a test bounds the error of the closed form on the rest.
|
|
39
|
+
|
|
40
|
+
**An explainable agent, not a black box.** The agent changes one decision at a time, evaluates every legal change, takes the best and records the hypothesis behind it, the result and the alternatives it rejected. Greedy steps can stall, so a seeded random sample of the whole space runs too, and the agent then polishes the best sampled point. Everything evaluated feeds the Pareto front. This follows the bottleneck-driven approach of Explainable-DSE (Dave, Nowatzki and Shrivastava, ASPLOS 2024), extended to whole-SoC decisions (external memory, process node, core, bus) and tied to generated hardware. An LLM agent reaches the same moves through the MCP tool `explain_bottleneck` and can weigh trade-offs the objective does not encode.
|
|
41
|
+
|
|
42
|
+
**Thresholds instead of noise.** A move must improve the objective by 1 %, or save 2 % of area while costing at most 0.2 % of the objective, to count as a step. Without that the agent spends steps on improvements no one would act on.
|
|
43
|
+
|
|
44
|
+
**Feasibility in words.** A design that cannot be built is still evaluated, and its violations are sentences ("no LPDDR4 PHY is known at 130 nm"). The agent prefers fewer violations, then smaller target misses, then the objective. So it can climb out of an infeasible start and explain what it fixed.
|
|
45
|
+
|
|
46
|
+
**Placement by reuse.** Activations are touched several times per step, then the KV cache, then weights once each, so on-chip SRAM is filled in that order. For decode all three are read once per token, which is why the order matters less there than for prefill.
|
|
47
|
+
|
|
48
|
+
**X-HEEP's rules, enforced early.** `Design.validate` encodes the X-HEEP constraints the generator would reject: at most 16 banks, interleaved banks only on the NtoM bus, power-of-two sizes. The explorer never produces a configuration X-HEEP refuses, and `chipleap verify` confirms it with X-HEEP's own code.
|
|
49
|
+
|
|
50
|
+
**Open tools only, and say when they are missing.** Every verification step runs on open-source tools and skips itself with a reason when its tool is absent. Yosys 0.33 cannot read the RTL's SystemVerilog directly, so synthesis goes through sv2v; the RTL avoids constructs both cannot handle (2-D unpacked arrays are flattened, for instance).
|
|
51
|
+
|
|
52
|
+
**Data with provenance.** Every technology number either comes from the IHP SG13G2 PDK (measured, `scripts/calibrate_sg13g2.py`) or is scaled from a cited source and labelled as such. LLM shapes are copied from each model's `config.json`, with the URL in the code.
|
|
53
|
+
|
|
54
|
+
## Adding things
|
|
55
|
+
|
|
56
|
+
- **A model preset:** add an `LLMArch` to `PRESETS` in `workload/llm.py` with its `config.json` URL, and its published parameter count to `tests/test_workload.py`.
|
|
57
|
+
- **A technology:** add a `Technology` in `hw/tech.py` with a `note` saying where its numbers come from; add a row to [model.md](model.md).
|
|
58
|
+
- **An external memory:** add an `ExternalMemory` in `hw/memory.py`, including `phy_max_node_nm` and `min_mts`.
|
|
59
|
+
- **A move:** add it to `explore/moves.py` with a `kind`, a label and the hypothesis an engineer would state; make sure it produces a valid `Design`.
|
|
60
|
+
- **An RTL change:** keep `model/accel.py` in step, run `pytest tests/test_rtl.py`, and check that the cycle error without stalls is still zero.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Landscape
|
|
2
|
+
|
|
3
|
+
Where ChipLeap sits among AI chip-design products, research and open tools, based on public material read on 10 October 2026. Claims are attributed to their source with a date. If something here is wrong or out of date, please open an issue with a link.
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
- Most agentic EDA products start from a specification or existing RTL: they generate and verify RTL, debug simulations, or close implementation. Architecture exploration (deciding what to build for a workload) is claimed by a few (Siemens Fuse, Cognichip, Ricursive) but with no public product that shows it.
|
|
8
|
+
- Workload-to-chip companies exist (Architect Labs, Cognichip) and are closed services. Architect Labs' published Redwood work had humans fix the workload and top-level architecture in a spec, and the AI built from there.
|
|
9
|
+
- Academic architecture tools (Timeloop and Accelergy, MAESTRO, ZigZag, Stream, LLMCompass, GenZ) produce numbers, not hardware, and the LLM-specific ones target datacenters. A recent reinforcement-learning paper searches ASIC architectures for LLMs with all weights on chip and no external memory.
|
|
10
|
+
- No tool found models HyperRAM or PSRAM-class memory or asks whether a memory PHY exists at the chosen node. No published tool checks its architecture model cycle for cycle against RTL it generates. No one offers this on an open PDK.
|
|
11
|
+
|
|
12
|
+
That is the gap ChipLeap targets: workload to decisions (including external memory and process node), decisions to an X-HEEP SoC and accelerator RTL, and a model checked against that RTL, all open and local.
|
|
13
|
+
|
|
14
|
+
## Players
|
|
15
|
+
|
|
16
|
+
| Player | Starts from | What it does, per its own material | Open | Source |
|
|
17
|
+
|---|---|---|---|---|
|
|
18
|
+
| ChipAgents | Specification | Reads specs; generates RTL, UVM environments and assertions; waveform root-cause analysis | No | [Series A1 release, 17 Feb 2026](https://itweb.africa/article/chipagents-raises-74m-to-scale-an-agentic-ai-platform-to-accelerate-chip-design/nWJad7bNQOK7bjO1) |
|
|
19
|
+
| Cadence ChipStack AI Super Agent | Specification | Builds a model of the spec, generates test plans and tests, runs Cadence simulation and formal; an RTL generation agent in early access | No | [The Register, 10 Feb 2026](https://theregister.com/2026/02/10/cadences_agentic_chip_design_tool); [engineering.com, Sep 2026](https://www.engineering.com/cadence-adds-rtl-generation-to-chipstack-ai-super-agent/) |
|
|
20
|
+
| Synopsys Autopilot and AgentEngineer | Specification or RTL | Agents for verification closure, validation, implementation, analog, manufacturing; architecture is a separate product (Platform Architect) | No | [Synopsys, 28 Sep 2026](https://www.synopsys.com/ko-kr/korean/press-releases/26-09-28-synopsys-powers-autonomous-engineering.html) |
|
|
21
|
+
| Siemens Fuse EDA AI Agent | Architecture and planning | Orchestrates Siemens tools, "architectural exploration and design planning", MCP-connected tools | No | [Siemens, 16 Mar 2026](https://news.siemens.com/en-us/siemens-fuse-eda-ai-agent/) |
|
|
22
|
+
| Ricursive Intelligence | Claimed end to end | "layout, optimization, verification, and architecture exploration"; no public product | No | [Converge Digest, 3 Dec 2025](https://convergedigest.com/ricursive-intelligence-aims-to-accelerate-semiconductor-design/) |
|
|
23
|
+
| Cognichip | Claimed architecture onward | Site lists architecture exploration, spec and RTL generation, testbenches, PPA estimates; private beta | No | [cognichip.ai](https://www.cognichip.ai); [TechCrunch, 1 Apr 2026](https://techcrunch.com/2026/04/01/cognichip-wants-ai-to-design-the-chips-that-power-ai-and-just-raised-60m-to-try/) |
|
|
24
|
+
| Architect Labs | Human-written spec of workload and architecture | Redwood: AI generated the performance model, RTL, verification, firmware and kernels; Qwen3-0.6B at 12.1 tokens/s on an FPGA with LPDDR4; ASIC numbers projected | No | [arXiv:2608.26418, Aug 2026](https://arxiv.org/abs/2608.26418) |
|
|
25
|
+
| Chipmind | Specification or RTL | Agents write RTL, run simulation, lint and synthesis, and deliver pull requests | No | [chipmind.ai](https://www.chipmind.ai) |
|
|
26
|
+
| SigmanticAI | Natural language to RTL | RTL and testbench generation in an IDE, with synthesis feedback | No | [YC launch](https://www.ycombinator.com/launches/NzI-sigmanticai-the-cursor-for-hardware-design); [AnySilicon, 9 Apr 2026](https://anysilicon.com/news/sigmanticai-ai-native-rtl-and-verification-generation-platform/) |
|
|
27
|
+
| Hardware Intelligence | Simulation results | Waveform debugger with a verification agent | No | [hardwareintelligence.ai](https://hardwareintelligence.ai) |
|
|
28
|
+
| Visibl Semiconductors | Specification and RTL | Watches specs, RTL and CI for drift; also custom-silicon services for power electronics | No | [YC profile](https://www.ycombinator.com/companies/visibl-semiconductors) |
|
|
29
|
+
| Standard Machines | Not a design tool | Reinforcement-learning environments and sealed evaluations for chip-design agents, scored against a speed-of-light bound | No | [YC profile](https://www.ycombinator.com/companies/standard-machines) |
|
|
30
|
+
| Mirabilis VisualSim | Architecture | System-level discrete-event models with AI assistance | No | [mirabilisdesign.com](https://www.mirabilisdesign.com/ai-assisted-visualsim-architecture-exploration-for-semiconductors-and-systems/) |
|
|
31
|
+
|
|
32
|
+
## Research
|
|
33
|
+
|
|
34
|
+
**RL-driven ASIC architecture exploration.** R. Ganti and S. Xu, "From LLM to Silicon: RL-Driven ASIC Architecture Exploration for On-Device AI Inference", [arXiv:2604.07526](https://arxiv.org/abs/2604.07526), April 2026. It uses Soft Actor-Critic over a mesh of RISC-V tensor cores, the network-on-chip and operator placement, for Llama 3.1 8B and SmolVLM at seven nodes from 3 to 28 nm. Performance, power and area come from an analytical model. Weights sit in on-chip memory ("no HBM"), and no external memory interface or host CPU is modelled. The paper mentions RTL artifacts but evaluates none, with no synthesis and a single seed. No code was found. The authors say silicon validation is still needed.
|
|
35
|
+
|
|
36
|
+
**Explainable, bottleneck-driven design-space exploration.** This is ChipLeap's closest prior art, and its agent loop follows it:
|
|
37
|
+
|
|
38
|
+
- [Explainable-DSE](https://dl.acm.org/doi/abs/10.1145/3623278.3624772) (S. Dave, T. Nowatzki, A. Shrivastava, ASPLOS 2024) builds a bottleneck graph, maps each factor to the parameters that affect it, and applies mitigations, for edge DNN accelerators.
|
|
39
|
+
- [AgentDSE](https://arxiv.org/abs/2606.21836) (June 2026) and [Beacon](https://arxiv.org/abs/2608.30932) (August 2026) put LLM agents in the loop with inspectable reasoning.
|
|
40
|
+
|
|
41
|
+
None of the three closes the loop to RTL, synthesis or an SoC.
|
|
42
|
+
|
|
43
|
+
**Performance models.** Timeloop and Accelergy, MAESTRO, ZigZag, Stream, SCALE-Sim, LLMCompass, GenZ and Calculon are open and widely used. They model accelerators (or datacenter systems, for the LLM-specific ones) and produce numbers. External memory is a bandwidth figure, and none emits an SoC configuration. Gemmini with Chipyard, ESP and CFU Playground generate SoCs, but from hand-set parameters rather than a workload search.
|
|
44
|
+
|
|
45
|
+
## Open platforms and PDKs
|
|
46
|
+
|
|
47
|
+
- [X-HEEP](https://github.com/esl-epfl/x-heep) (EPFL) is a configurable RISC-V microcontroller with a Python configuration API and an accelerator interface; eight chips have been taped out on commercial nodes. ChipLeap generates its configurations and checks them with X-HEEP's own generator.
|
|
48
|
+
- [IHP SG13G2](https://github.com/IHP-GmbH/IHP-Open-PDK) is an open 130 nm PDK with SRAM macros up to 8192x32. ETH Zurich has taken open-flow designs on it to silicon: Croc/MLEM at 80 MHz typical, and Basilisk with HyperBus measured at up to 124 MB/s ([Hot Chips 2025 poster](https://hc2025.hotchips.org/assets/program/posters/HC2025.ETHZ.PhilippeSauter.v02.pdf)).
|
|
49
|
+
- No LPDDR or DDR PHY exists for an open PDK. Commercial LPDDR4 PHYs reach down to about 40 nm.
|
|
50
|
+
|
|
51
|
+
## What edge LLM hardware achieves
|
|
52
|
+
|
|
53
|
+
Single-user decode reads every weight once per token, so it tracks memory bandwidth. Measured results show it:
|
|
54
|
+
|
|
55
|
+
- **Raspberry Pi 5, Llama 3.2 1B at 4 bits:** about 11 tokens per second ([community benchmark](https://stratospherelinuxips.readthedocs.io/en/develop/immune/research_rpi_llm_performance.html)).
|
|
56
|
+
- **openTPU, Qwen3-0.6B at int8:** 21.6 tokens per second with 17.1 GB/s of DDR3, running at 82 to 94 % of peak bandwidth ([openTPU](https://github.com/FeSens/openTPU)).
|
|
57
|
+
- **Redwood on LPDDR4, Qwen3-0.6B:** 12.1 tokens per second, about 47 % of peak bandwidth ([arXiv:2608.26418](https://arxiv.org/abs/2608.26418)).
|
|
58
|
+
|
|
59
|
+
Published microcontroller deployments so far use models under about 15 million parameters. ChipLeap's arithmetic (`chipleap require`) shows why. Llama 3.2 1B at int4 needs about 6.7 GB/s for ten tokens per second and 642 MiB of storage, which no HyperRAM or PSRAM configuration provides. On an open 130 nm PDK the realistic target is a model of about 100 million parameters at a few tokens per second.
|
|
60
|
+
|
|
61
|
+
## What ChipLeap adds
|
|
62
|
+
|
|
63
|
+
| | ChipLeap |
|
|
64
|
+
|---|---|
|
|
65
|
+
| Starts from | the workload and its targets |
|
|
66
|
+
| Decides | memory hierarchy, external memory and channels, dataflow, array, precision, core, bus, clock, node |
|
|
67
|
+
| Checks feasibility | capacity, read-only memories, the address window, and whether a PHY exists at the node |
|
|
68
|
+
| Answers inverse questions | `chipleap require`: what a target demands |
|
|
69
|
+
| Explains | a decision log with hypotheses, results and rejected alternatives |
|
|
70
|
+
| Generates | an X-HEEP configuration or AXI4 IP for any host, accelerator RTL, register map, driver, testbench, datasheet |
|
|
71
|
+
| Verifies | consistency, lint, simulation against a golden model with a cycle cross-check, synthesis, place and route with DRC and LVS on IHP SG13G2, X-HEEP's checks |
|
|
72
|
+
| Runs | locally, free, from the command line or any MCP assistant, with replayable run logs; on open tools by default, and on Cadence, Synopsys and Siemens simulators and synthesis, locally or on a design server, when you have them |
|
|
73
|
+
|
|
74
|
+
The agentic EDA suites drive their own vendor's tools; ChipLeap drives whichever of the open and commercial tools you have, and a PDK of your own through `chipleap tech add`.
|
|
75
|
+
|
|
76
|
+
What ChipLeap does not do: generate arbitrary RTL, debug your design, or sign off for a foundry. It decides and specifies, then hands over a verified starting point that tools further down the flow can take.
|