File size: 15,218 Bytes
d36f3b6 f8d709b 4a6ac1a 4074a23 4a6ac1a 4074a23 4a6ac1a f8d709b 4a6ac1a f8d709b 4a6ac1a f8d709b 4a6ac1a f8d709b 8eba0f7 f8d709b 5008b9d f8d709b 5008b9d f8d709b 5008b9d f8d709b 5008b9d f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 5008b9d f8d709b 5008b9d f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b ca48adb f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 5008b9d f8d709b ca48adb f8d709b 3ec0e55 f8d709b 3ec0e55 f8d709b 3ec0e55 f8d709b 3ec0e55 f8d709b 3ec0e55 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 3ec0e55 f8d709b 3ec0e55 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 3ec0e55 f8d709b 6b6699d f8d709b 8160b61 f8d709b bbdb119 f8d709b 81fa1c9 f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b 81fa1c9 4a6ac1a 900a7e7 f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb 81fa1c9 f8d709b 81fa1c9 4a6ac1a f8d709b 4a6ac1a 81fa1c9 f8d709b 81fa1c9 4a6ac1a ca48adb 8eba0f7 ca48adb 4a6ac1a bbdb119 f8d709b 81fa1c9 f8d709b 81fa1c9 ca48adb f8d709b 4a6ac1a f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b 8eba0f7 f8d709b ca48adb f8d709b 4a6ac1a 3ec0e55 f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b 8eba0f7 f8d709b ca48adb f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b ca48adb f8d709b 8eba0f7 f8d709b 8eba0f7 f8d709b 8eba0f7 4a6ac1a 3ec0e55 f8d709b ca48adb 8eba0f7 81fa1c9 f8d709b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | ---
title: AgentIC
emoji: π€
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
app_port: 7860
---
# AgentIC
AgentIC is an autonomous RTL-to-GDSII pipeline. Give it a natural-language chip specification β it generates RTL, writes testbenches, runs simulation, formal verification, coverage, and regression, and optionally drives physical implementation through GDSII hardening. Every stage is AI-assisted, EDA-tool-verified, and gated behind a Human-in-the-Loop approval checkpoint.
## How It Runs
AgentIC is deployed as a Docker container on HuggingFace Spaces. The backend is a FastAPI server (`server/api.py`) running on port 7860. The frontend is a React app (`web/`) that connects to it via HTTP and Server-Sent Events.
```
Browser (React frontend)
β HTTP + SSE (real-time streaming)
βΌ
FastAPI β uvicorn server.api:app :7860 β HuggingFace Space
β
βββ CrewAI agents β LLM (NVIDIA API) β remote call
βββ EDA tools (iverilog, verilator, yosys, sby) β installed in Docker
```
## Build Stages
| Stage | What happens |
|---|---|
| **SPEC** | LLM structures the natural-language description into a hardware spec |
| **RTL_GEN** | Designer agent generates synthesizable Verilog |
| **RTL_FIX** | Syntax errors are caught and repaired in a repair loop |
| **VERIFICATION** | Testbench agent writes a testbench; iverilog/verilator runs simulation |
| **FORMAL_VERIFY** | yosys + sby runs bounded model checking on the RTL |
| **COVERAGE_CHECK** | Verilator coverage analysis; fails if below threshold |
| **REGRESSION** | Multi-seed regression run across corner cases |
| **SDC_GEN** | Timing constraints file generated |
| **FLOORPLAN** | *(requires skip_openlane: false)* OpenLane floorplanning |
| **HARDENING** | *(requires skip_openlane: false)* GDSII hardening |
| **SIGNOFF** | *(requires skip_openlane: false)* DRC/LVS sign-off |
| **SUCCESS** | All gates passed; artifacts available |
## Human-in-the-Loop (HITL)
Before physical implementation begins (FLOORPLAN), the build pauses and sends an `approval_required` event over the SSE stream. The Human-in-the-Loop Build page in the frontend shows the RTL summary, verification results, and formal proof status. You approve or reject before hardening starts.
- **Approve** β build continues into FLOORPLAN β HARDENING β SIGNOFF
- **Reject** β build stops with a full failure record
To run RTL-only (no physical stages, no HITL pause), set `skip_openlane: true` in the build request. This is the default on HuggingFace since OpenLane requires a full PDK installation.
## EDA Tools
All EDA tools run inside the Docker container:
| Tool | Installed via | Used for |
|---|---|---|
| `iverilog` | apt | Verilog compilation + simulation |
| `verilator` | apt | Coverage analysis |
| `yosys` | apt | Synthesis + formal prep |
| `sby` (SymbiYosys) | built from source | Formal verification |
## API Endpoints
| Method | Path | Description |
|---|---|---|
| `POST` | `/build` | Start a build job |
| `GET` | `/build/stream/{job_id}` | Real-time SSE event stream |
| `GET` | `/build/status/{job_id}` | Job status |
| `GET` | `/build/result/{job_id}` | Final artifacts |
| `GET` | `/approval/status` | Check if waiting for HITL |
| `POST` | `/approve` | Approve pending stage |
| `POST` | `/reject` | Reject pending stage |
| `GET` | `/designs` | List completed designs |
| `GET` | `/metrics/{design_name}` | Physical metrics for a design |
Interactive docs: `https://huggingface.co/spaces/vxkyyy/AgentIC` β `/docs`
## Deployment
AgentIC is deployed to HuggingFace Spaces via Docker. Every push to `main` on GitHub automatically deploys via GitHub Actions.
See [docs/DEPLOY_HUGGINGFACE.md](docs/DEPLOY_HUGGINGFACE.md) for the full deployment guide, CI/CD explanation, and HITL operational details.
## Local Development
```bash
# Build and run the backend locally
docker build -t agentic:local .
docker compose up
# API available at http://localhost:7860
# Docs at http://localhost:7860/docs
```
```bash
# Run the frontend (separate process)
cd web
npm install
npm run dev
# Frontend at http://localhost:5173
```
## Environment Variables
Copy `.env.example` to `.env` and fill in your keys:
```bash
cp .env.example .env
# Edit .env β set NVIDIA_API_KEY at minimum
```
| Variable | Required | Description |
|---|---|---|
| `NVIDIA_API_KEY` | Yes | Cloud LLM API key |
| `NVIDIA_MODEL` | No | Default: `meta/llama-3.3-70b-instruct` |
| `NVIDIA_BASE_URL` | No | Default: `https://integrate.api.nvidia.com/v1` |
| `GROQ_API_KEY` | No | Optional fallback LLM |
| `LLM_MODEL` | No | Local Ollama model override |
| `LLM_BASE_URL` | No | Local LLM endpoint |
## What AgentIC Actually Does
At a high level, AgentIC performs four jobs:
1. Turn an ambiguous prose specification into a structured hardware task.
2. Generate candidate RTL, testbenches, properties, and constraints.
3. Push those artifacts through quality gates with controlled repair loops.
4. Stop only when the design either passes the configured flow or fails with a concrete diagnosis.
The system is not a simple code generator. It is a build-and-check pipeline that keeps testing what it generates.
## System Model
AgentIC is organized around three layers:
### 1. Orchestration Layer
The orchestrator owns stage transitions, retry budgets, artifact routing, and failure handling. It is the source of truth for:
- which stage runs next
- what inputs each stage is allowed to consume
- what counts as pass, fail, skip, or tool error
- how many retries are allowed
- when the build must halt instead of spinning
Core implementation: [orchestrator.py](/home/vickynishad/AgentIC/src/agentic/orchestrator.py)
### 2. Tool Layer
EDA tool wrappers execute Verilator, Icarus Verilog, Yosys, and SymbiYosys. Intermediate work is staged in temporary directories; human-relevant artifacts remain in the design tree.
Core implementation: [vlsi_tools.py](/home/vickynishad/AgentIC/src/agentic/tools/vlsi_tools.py)
### 3. Agent Layer
Specialist AI components assist specific tasks such as RTL generation, testbench creation, failure analysis, and formal-property generation. These components do not bypass the tool checks; their output must still pass the relevant stage gates.
## End-to-End Pipeline
The full build pipeline is:
```text
Specification
-> RTL_GEN
-> RTL_FIX
-> VERIFICATION
-> FORMAL_VERIFY
-> COVERAGE_CHECK
-> REGRESSION
-> HARDENING
-> CONVERGENCE
-> SIGNOFF
```
Each stage is gated. A stage can only advance if its required checks pass. There is no silent forwarding of a broken artifact.
### Stage Intent
| Stage | Purpose | Typical Outputs |
|------|---------|-----------------|
| `SPECIFICATION` | Normalize the user prompt into a design contract | structured prompt context |
| `RTL_GEN` | Generate initial RTL and supporting files | `<name>.v`, supporting metadata |
| `RTL_FIX` | Enforce syntax, lint, and semantic rigor; repair failures | corrected RTL, diagnostics |
| `VERIFICATION` | Build TB, run simulation, analyze functional failures | `<name>_tb.v`, sim logs, VCD |
| `FORMAL_VERIFY` | Generate SVA, preflight it, run formal checks | `<name>_sva.sv`, formal summaries |
| `COVERAGE_CHECK` | Improve or validate coverage after functional success | coverage metrics, coverage JSON |
| `REGRESSION` | Run directed corner-case validation | regression results |
| `HARDENING` | Invoke OpenLane flow if enabled | layout flow outputs |
| `CONVERGENCE` | Recover from physical-flow failures | updated configs or constraints |
| `SIGNOFF` | Run DRC/LVS/STA/power/equivalence style checks | signoff reports |
## Reliability Model
AgentIC is designed around one rule: every stage must provide enough evidence to justify the next stage.
### Fail-Closed By Default
If syntax, lint, simulation, formal checks, or physical checks fail, the build does not continue unless a replacement artifact passes the relevant gate.
### Deterministic Before Generative
Repair is layered:
1. deterministic cleanup or mechanical fix
2. targeted analysis
3. constrained regeneration
4. strategy pivot or fail-closed halt
This ordering matters. The system tries to preserve design intent and minimize uncontrolled rewrites.
### Budgeted Loops
Each repair path is budgeted. The system tracks repeated failures and retry exhaustion to avoid infinite churn.
## Core Reasoning Components
AgentIC uses multiple specialized components rather than one undifferentiated "agent".
These components are used for tasks such as:
- RTL generation
- testbench generation
- SVA generation
- constraint generation
- documentation
These outputs are still stage-gated. AgentIC does not assume that generated code is valid just because an AI model produced it.
## How Reliability Is Managed
Reliability work in AgentIC focuses on three practical areas:
- clear stage boundaries
- explicit artifact passing between stages
- replayable testing from benchmark failures
The goal is to make failures diagnosable and repeatable, not to hide them behind optimistic retries.
## Toolchain
AgentIC is built around open-source digital design tools:
- Verilator
- Icarus Verilog (`iverilog`, `vvp`)
- Yosys
- SymbiYosys (`sby`)
- OpenLane for physical implementation
Formal and physical-flow stages are optional depending on the selected build mode and installed environment.
## Repository Structure
Top-level layout:
```text
AgentIC/
βββ src/agentic/ # orchestrator, tool wrappers, agents, CLI
βββ tests/ # unit and reliability tests
βββ benchmark/ # benchmark runner and reports
βββ docs/ # supporting documentation
βββ web/ # frontend
βββ server/ # backend/service layer
βββ scripts/ # helper and CI scripts
βββ artifacts/ # generated runtime artifacts
βββ metircs/ # benchmark and design metrics
```
Key files:
- [README.md](/home/vickynishad/AgentIC/README.md)
- [main.py](/home/vickynishad/AgentIC/main.py)
- [cli.py](/home/vickynishad/AgentIC/src/agentic/cli.py)
- [orchestrator.py](/home/vickynishad/AgentIC/src/agentic/orchestrator.py)
- [vlsi_tools.py](/home/vickynishad/AgentIC/src/agentic/tools/vlsi_tools.py)
- [USER_GUIDE.md](/home/vickynishad/AgentIC/docs/USER_GUIDE.md)
## Installation
### Prerequisites
Minimum verification flow:
```text
Python 3.10+
Verilator 5.x
Icarus Verilog
Yosys / SymbiYosys via oss-cad-suite
```
Optional physical flow:
```text
OpenLane
Docker
Installed PDK (for example sky130 or gf180)
```
### Setup
```bash
git clone https://github.com/Vickyrrrrrr/AgentIC.git
cd AgentIC
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
### Environment
Typical `.env` values:
```bash
NVIDIA_API_KEY="your-key-here"
LLM_BASE_URL="http://localhost:11434"
OPENLANE_ROOT="/path/to/OpenLane"
PDK_ROOT="/path/to/pdk"
```
See [USER_GUIDE.md](/home/vickynishad/AgentIC/docs/USER_GUIDE.md) for model backend selection details.
## CLI Usage
All commands are invoked through `main.py`.
### Build
Fast RTL and verification flow:
```bash
python3 main.py build \
--name my_design \
--desc "32-bit APB timer with interrupt" \
--skip-openlane
```
Full flow with signoff-oriented stages:
```bash
python3 main.py build \
--name my_design \
--desc "32-bit APB timer with interrupt" \
--full-signoff \
--pdk-profile sky130
```
Skip coverage while still continuing from formal to regression:
```bash
python3 main.py build \
--name my_design \
--desc "UART transmitter with programmable baud divisor" \
--skip-openlane \
--skip-coverage
```
Important build flags:
```text
--skip-openlane
--skip-coverage
--full-signoff
--strict-gates / --no-strict-gates
--min-coverage
--max-retries
--max-pivots
--pdk-profile {sky130,gf180}
--hierarchical {auto,off,on}
--congestion-threshold
```
### Other Commands
```bash
python3 main.py simulate --name <design>
python3 main.py harden --name <design>
python3 main.py verify <design>
```
## Generated Artifacts
A typical design directory contains:
```text
designs/<name>/
βββ src/
β βββ <name>.v
β βββ <name>_tb.v
β βββ <name>_sva.sv
β βββ *_formal_result.json
β βββ *_coverage_result.json
β βββ *.vcd
βββ formal/
βββ config.tcl
βββ macro_placement.tcl
βββ ip_manifest.json
```
Design-local `src/` is intended to keep permanent, human-useful artifacts. Tool intermediates such as Verilator build trees, compiled simulators, `.sby` working directories, coverage work products, and Yosys scratch outputs are staged in temporary directories and cleaned automatically.
## Benchmarking
The repository includes a benchmark runner for multi-design evaluation:
```bash
python3 benchmark/run_benchmark.py --design counter8 --attempts 1 --skip-openlane
```
Generated summaries live under [benchmark/results](/home/vickynishad/AgentIC/benchmark/results).
Benchmarking matters here because repeated failures usually point to pipeline issues, validation gaps, or repair-routing problems. Those failures are used to improve the system over time.
## Web Interface
AgentIC includes a frontend and backend for interactive execution and live streaming of pipeline events. The UI is useful when you want:
- stage-by-stage visibility
- human approval gates
- real-time log streaming
- artifact inspection during a build
Frontend and service code:
- [web](/home/vickynishad/AgentIC/web)
- [server](/home/vickynishad/AgentIC/server)
## Scope And Limits
AgentIC is aimed at autonomous digital design exploration, verification-heavy iteration, and open-source PDK implementation flows. It is not yet a replacement for a certified commercial signoff stack or a production ASIC team with foundry-qualified internal methodology.
Practical implications:
- benchmark pass rate still matters more than demo quality
- hierarchical repair is harder than single-module repair and is treated explicitly
- formal and coverage stages are valuable, but must be routed correctly to be useful
- "industry-grade" here means constrained, diagnosable, replayable, and fail-closed
## Design Principles
The project is built around a small number of non-negotiable rules:
- fail closed
- prefer deterministic fixes before LLM fixes
- preserve design intent with minimum-diff repair
- validate every generated artifact before downstream use
- treat routing bugs as seriously as model bugs
- turn observed benchmark failures into regression tests
## IP Note
This README describes capabilities and workflow at a high level. It does not document the internal prompt architecture, private heuristics, decision policies, or proprietary reasoning logic used inside the system.
## License
Proprietary and Confidential.
Copyright Β© 2026 Vicky Nishad. All rights reserved.
This repository, including its architecture, algorithms, prompts, agent logic, repair heuristics, and associated intellectual property, may not be reproduced, distributed, reverse-engineered, or used in derivative works without explicit written permission.
|