Update README.md for AgentIC v3.0: new features, UI, formal verification, security, defense use cases
Browse files
README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
# AgentIC: Sovereign AI-Powered Silicon Design Framework
|
| 2 |
|
| 3 |
-
. Unlike simple code generators, AgentIC employs a **Self-Correcting Multi-Agent System** that iteratively designs, verifies, fixes, and physically hardens custom silicon.
|
| 6 |
|
| 7 |
-
It acts as a **"Text-to-Silicon" Compiler**, orchestrating a crew of specialized AI agents (Architect, Designer, Verification Engineer, Physical Design Lead) to ensure functional correctness and manufacturability.
|
| 8 |
|
| 9 |
---
|
| 10 |
|
|
@@ -26,8 +26,10 @@ graph TD
|
|
| 26 |
end
|
| 27 |
|
| 28 |
subgraph "Phase 2: Formal & Dynamic Verification"
|
| 29 |
-
QA -- Approve --> Formal[
|
| 30 |
-
Formal -->|
|
|
|
|
|
|
|
| 31 |
Testbench -->|Simulation| Sim{Icarus Verilog}
|
| 32 |
Sim -- Fail --> Debugger[Error Analyst]
|
| 33 |
Debugger -->|Fix Logic| Designer
|
|
@@ -36,35 +38,61 @@ graph TD
|
|
| 36 |
|
| 37 |
subgraph "Phase 3: Deep Physical Hardening"
|
| 38 |
Sim -- Pass --> OpenLane[OpenLane Flow]
|
| 39 |
-
OpenLane -->|GDSII| PPA[PPA
|
| 40 |
PPA -- "Timing/Area Violations" --> Optimizer[Backend Engineer]
|
| 41 |
Optimizer -->|Optimize RTL| Designer
|
| 42 |
end
|
| 43 |
|
| 44 |
-
PPA -- "Metrics OK" --> Tapeout([Final GDSII])
|
| 45 |
```
|
| 46 |
|
| 47 |
---
|
| 48 |
|
| 49 |
-
## ๐ Key Capabilities
|
| 50 |
|
| 51 |
-
### 1.
|
| 52 |
-
|
| 53 |
-
* **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
* **Compiler-Aware Auto-Fix**: Automatically detects and repairs syntax errors (e.g., mismatched port widths, invalid SystemVerilog constructs) without human intervention.
|
| 55 |
-
* **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
###
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
-
###
|
| 63 |
* **Beyond Code**: AgentIC checks real-world metricsโ**Power, Performance (Timing), and Area**.
|
|
|
|
| 64 |
* **Optimization Cycle**:
|
| 65 |
* If **Timing** fails (Negative Slack), the agent inserts pipeline stages.
|
| 66 |
* If **Area** is too high (Congestion), the agent simplifies logic or increases core size.
|
| 67 |
-
* **OpenLane Integration**: Full control over `config.tcl` generation and disaster recovery
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
---
|
| 70 |
|
|
@@ -76,6 +104,7 @@ Traditional LLMs often leak "thought processes" or Markdown artifacts into code,
|
|
| 76 |
* **Docker** (for OpenLane)
|
| 77 |
* **Icarus Verilog** (`sudo apt install iverilog`)
|
| 78 |
* **GTKWave** (optional, for viewing waveforms)
|
|
|
|
| 79 |
|
| 80 |
### Setup
|
| 81 |
|
|
@@ -93,10 +122,12 @@ Traditional LLMs often leak "thought processes" or Markdown artifacts into code,
|
|
| 93 |
3. **Configure Environment**
|
| 94 |
Create a `.env` file in the root directory:
|
| 95 |
```bash
|
| 96 |
-
# LLM Provider (Examples)
|
| 97 |
-
OPENAI_API_KEY="sk-..."
|
| 98 |
-
# OR
|
| 99 |
NVIDIA_API_KEY="nvapi-..."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
# Tool Paths (Optional, defaults provided)
|
| 102 |
OPENLANE_ROOT="/home/user/OpenLane"
|
|
@@ -107,13 +138,20 @@ Traditional LLMs often leak "thought processes" or Markdown artifacts into code,
|
|
| 107 |
|
| 108 |
## ๐ป Usage
|
| 109 |
|
| 110 |
-
### 1.
|
| 111 |
-
The
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
```bash
|
| 114 |
python3 AgentIC/main.py build \
|
| 115 |
-
--name
|
| 116 |
-
--desc "
|
| 117 |
```
|
| 118 |
|
| 119 |
**Options:**
|
|
@@ -121,29 +159,53 @@ python3 AgentIC/main.py build \
|
|
| 121 |
* `--skip-openlane`: Stops after verification (useful for quick RTL iteration).
|
| 122 |
* `--max-retries 5`: Sets how many times the agent can attempt to fix its own errors.
|
| 123 |
|
| 124 |
-
###
|
| 125 |
If you have existing code and just want the agent to fix bugs:
|
| 126 |
```bash
|
| 127 |
-
python3 AgentIC/main.py simulate --name
|
| 128 |
```
|
| 129 |
|
| 130 |
-
###
|
| 131 |
To run OpenLane physical design on an existing Verilog file:
|
| 132 |
```bash
|
| 133 |
-
python3 AgentIC/main.py harden --name
|
| 134 |
```
|
|
|
|
| 135 |
|
| 136 |
---
|
| 137 |
|
| 138 |
-
## ๐๏ธ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
-
|
|
| 141 |
| :--- | :--- | :--- |
|
| 142 |
-
| **
|
| 143 |
-
| **
|
| 144 |
-
| **
|
| 145 |
-
| **Verification Agent** |
|
| 146 |
-
| **
|
|
|
|
|
|
|
| 147 |
|
| 148 |
---
|
| 149 |
|
|
@@ -155,12 +217,48 @@ python3 AgentIC/main.py harden --name my_processor
|
|
| 155 |
|
| 156 |
### "Simulation Failed (Compilation Error)"
|
| 157 |
* **Cause**: LLM hallucinated invalid syntax.
|
| 158 |
-
* **Fix**: AgentIC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
-
|
| 161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
|
| 163 |
---
|
| 164 |
|
| 165 |
## ๐ License
|
| 166 |
MIT License. Free for Research and Sovereign Development.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# AgentIC: Sovereign AI-Powered Silicon Design Framework
|
| 2 |
|
| 3 |
+
     
|
| 4 |
|
| 5 |
**AgentIC** is an automated, sovereign AI Agent framework that transforms natural language descriptions directly into industry-standard physical chip layouts (GDSII). Unlike simple code generators, AgentIC employs a **Self-Correcting Multi-Agent System** that iteratively designs, verifies, fixes, and physically hardens custom silicon.
|
| 6 |
|
| 7 |
+
It acts as a **"Text-to-Silicon" Compiler**, orchestrating a crew of specialized AI agents (Architect, Designer, Verification Engineer, Physical Design Lead) to ensure functional correctness and manufacturabilityโwith a focus on **Atmanirbhar (Self-Reliant) Defense Applications**.
|
| 8 |
|
| 9 |
---
|
| 10 |
|
|
|
|
| 26 |
end
|
| 27 |
|
| 28 |
subgraph "Phase 2: Formal & Dynamic Verification"
|
| 29 |
+
QA -- Approve --> Formal[Dual-Mode SVA]
|
| 30 |
+
Formal -->|Industry SVA| Commercial[Commercial EDA]
|
| 31 |
+
Formal -->|Yosys SVA| SymbiYosys[SymbiYosys Proof]
|
| 32 |
+
SymbiYosys -->|Mathematical Proof| Testbench[Testbench Agent]
|
| 33 |
Testbench -->|Simulation| Sim{Icarus Verilog}
|
| 34 |
Sim -- Fail --> Debugger[Error Analyst]
|
| 35 |
Debugger -->|Fix Logic| Designer
|
|
|
|
| 38 |
|
| 39 |
subgraph "Phase 3: Deep Physical Hardening"
|
| 40 |
Sim -- Pass --> OpenLane[OpenLane Flow]
|
| 41 |
+
OpenLane -->|GDSII| PPA[PPA Dashboard]
|
| 42 |
PPA -- "Timing/Area Violations" --> Optimizer[Backend Engineer]
|
| 43 |
Optimizer -->|Optimize RTL| Designer
|
| 44 |
end
|
| 45 |
|
| 46 |
+
PPA -- "Metrics OK" --> Tapeout([Final GDSII + 2D/3D Visualization])
|
| 47 |
```
|
| 48 |
|
| 49 |
---
|
| 50 |
|
| 51 |
+
## ๐ Key Capabilities v3.0
|
| 52 |
|
| 53 |
+
### 1. ๐ฅ๏ธ Mission Control Web UI (NEW)
|
| 54 |
+
A full-featured **Streamlit-based Web Dashboard** with a futuristic "Deep Space" glassmorphism theme:
|
| 55 |
+
* **Dashboard**: Real-time PPA metrics (WNS, Power, Area, Gate Count) with live extraction from OpenLane runs
|
| 56 |
+
* **AI Advisor**: Intelligent diagnostics and optimization recommendations based on design analysis
|
| 57 |
+
* **Design Studio**: Natural language design input + integrated Verilog code editor (Monaco/Ace)
|
| 58 |
+
* **Market Benchmarking**: Compare your indigenous designs against industry standards (Nvidia Jetson, Military FPGAs, etc.)
|
| 59 |
+
* **Fabrication**: 2D SVG layout preview + interactive 3D layer stack visualization (Sky130 layers)
|
| 60 |
+
* **GDSII Download**: One-click tapeout file download
|
| 61 |
+
|
| 62 |
+
### 2. ๐ก๏ธ Robust "Anti-Hallucination" Engine
|
| 63 |
+
Traditional LLMs often leak "thought processes" or Markdown artifacts into code, breaking compilers. AgentIC v3.0 features:
|
| 64 |
+
* **Hardened VLSI Tools**: Custom I/O handlers (`vlsi_tools.py`) that strictly sanitize outputs, stripping `<think>` tags, "Thought:", "Action:", and non-Verilog artifacts.
|
| 65 |
* **Compiler-Aware Auto-Fix**: Automatically detects and repairs syntax errors (e.g., mismatched port widths, invalid SystemVerilog constructs) without human intervention.
|
| 66 |
+
* **Security Audit**: Built-in `SecurityCheck()` function scans for malicious patterns (`$system`, shell commands, etc.)
|
| 67 |
+
* **Filesystem Guard**: Enforces correct file extensions (`.sv`, `.v`, `.tcl`) and prevents file path traversal attacks.
|
| 68 |
+
|
| 69 |
+
### 3. ๐ง Dual-Mode Formal Verification (NEW)
|
| 70 |
+
* **Industry-Standard SVA**: Generates proper `property`/`assert property` SystemVerilog Assertions compatible with commercial tools (Synopsys, Cadence)
|
| 71 |
+
* **Yosys-Compatible SVA**: Auto-converts assertions to SymbiYosys format for open-source k-induction proofs
|
| 72 |
+
* **Dynamic Simulation**: Generates self-checking testbenches with proper FSM timing analysis
|
| 73 |
+
* **Root Cause Analysis**: AI `Error Analyst` determines if bugs are in RTL or Testbench, fixing the correct file
|
| 74 |
|
| 75 |
+
### 4. ๐ Resilient LLM Fallback Chain (NEW)
|
| 76 |
+
Multi-tier LLM failover for operational continuity:
|
| 77 |
+
```
|
| 78 |
+
NVIDIA Nemotron/Llama 405B โ NVIDIA Backup โ Groq Cloud โ Local LLM
|
| 79 |
+
```
|
| 80 |
+
* Supports air-gapped deployment with local models (Qwen Coder, Llama)
|
| 81 |
+
* Automatic fallback on API failures
|
| 82 |
|
| 83 |
+
### 5. ๐ญ Physical Design Feedback Loop (PPA)
|
| 84 |
* **Beyond Code**: AgentIC checks real-world metricsโ**Power, Performance (Timing), and Area**.
|
| 85 |
+
* **Dynamic Standards**: Automatically calculates expected PPA standards based on gate count and design complexity
|
| 86 |
* **Optimization Cycle**:
|
| 87 |
* If **Timing** fails (Negative Slack), the agent inserts pipeline stages.
|
| 88 |
* If **Area** is too high (Congestion), the agent simplifies logic or increases core size.
|
| 89 |
+
* **OpenLane Integration**: Full control over `config.tcl` generation and disaster recovery.
|
| 90 |
+
|
| 91 |
+
### 6. ๐ฎ๐ณ Atmanirbhar Benchmarking (NEW)
|
| 92 |
+
Compare your sovereign designs against market alternatives:
|
| 93 |
+
* **Cost Analysis**: INR-based unit cost comparison with savings calculation
|
| 94 |
+
* **Performance Radar**: Power efficiency, manufacturing readiness, supply chain independence, security trust
|
| 95 |
+
* **AI Verdict**: Automatic domain detection (Security, Edge AI, General Purpose) with deployment recommendations
|
| 96 |
|
| 97 |
---
|
| 98 |
|
|
|
|
| 104 |
* **Docker** (for OpenLane)
|
| 105 |
* **Icarus Verilog** (`sudo apt install iverilog`)
|
| 106 |
* **GTKWave** (optional, for viewing waveforms)
|
| 107 |
+
* **SymbiYosys** (optional, for formal verification - install via [oss-cad-suite](https://github.com/YosysHQ/oss-cad-suite-build))
|
| 108 |
|
| 109 |
### Setup
|
| 110 |
|
|
|
|
| 122 |
3. **Configure Environment**
|
| 123 |
Create a `.env` file in the root directory:
|
| 124 |
```bash
|
| 125 |
+
# LLM Provider (Examples - uses fallback chain automatically)
|
|
|
|
|
|
|
| 126 |
NVIDIA_API_KEY="nvapi-..."
|
| 127 |
+
# OR
|
| 128 |
+
GROQ_API_KEY="gsk_..."
|
| 129 |
+
# OR
|
| 130 |
+
OPENAI_API_KEY="sk-..."
|
| 131 |
|
| 132 |
# Tool Paths (Optional, defaults provided)
|
| 133 |
OPENLANE_ROOT="/home/user/OpenLane"
|
|
|
|
| 138 |
|
| 139 |
## ๐ป Usage
|
| 140 |
|
| 141 |
+
### 1. ๐ Launch Web UI (Recommended)
|
| 142 |
+
The easiest way to use AgentIC is via the Mission Control dashboard:
|
| 143 |
+
```bash
|
| 144 |
+
streamlit run AgentIC/app.py
|
| 145 |
+
```
|
| 146 |
+
Then open `http://localhost:8501` in your browser.
|
| 147 |
+
|
| 148 |
+
### 2. Build a Chip (CLI)
|
| 149 |
+
The `build` command runs the full flow: Architecture โ RTL โ Verify โ GDSII.
|
| 150 |
|
| 151 |
```bash
|
| 152 |
python3 AgentIC/main.py build \
|
| 153 |
+
--name bharat_secure_comm \
|
| 154 |
+
--desc "AES-256 encryption accelerator with key expansion and GCM authentication mode"
|
| 155 |
```
|
| 156 |
|
| 157 |
**Options:**
|
|
|
|
| 159 |
* `--skip-openlane`: Stops after verification (useful for quick RTL iteration).
|
| 160 |
* `--max-retries 5`: Sets how many times the agent can attempt to fix its own errors.
|
| 161 |
|
| 162 |
+
### 3. Manual Simulation & Fix
|
| 163 |
If you have existing code and just want the agent to fix bugs:
|
| 164 |
```bash
|
| 165 |
+
python3 AgentIC/main.py simulate --name my_design --max-retries 10
|
| 166 |
```
|
| 167 |
|
| 168 |
+
### 4. Hardening Only
|
| 169 |
To run OpenLane physical design on an existing Verilog file:
|
| 170 |
```bash
|
| 171 |
+
python3 AgentIC/main.py harden --name my_design
|
| 172 |
```
|
| 173 |
+
Supports background execution for long runs (10-30+ minutes).
|
| 174 |
|
| 175 |
---
|
| 176 |
|
| 177 |
+
## ๐๏ธ Project Structure
|
| 178 |
+
|
| 179 |
+
```
|
| 180 |
+
AgentIC/
|
| 181 |
+
โโโ app.py # Streamlit Web UI (Mission Control)
|
| 182 |
+
โโโ main.py # CLI Entry Point
|
| 183 |
+
โโโ requirements.txt
|
| 184 |
+
โโโ src/
|
| 185 |
+
โ โโโ agentic/
|
| 186 |
+
โ โโโ cli.py # Core pipeline commands
|
| 187 |
+
โ โโโ config.py # LLM & path configuration
|
| 188 |
+
โ โโโ agents/
|
| 189 |
+
โ โ โโโ designer.py # RTL generation agent
|
| 190 |
+
โ โ โโโ testbench_designer.py
|
| 191 |
+
โ โ โโโ verifier.py # SVA & error analysis agents
|
| 192 |
+
โ โโโ tools/
|
| 193 |
+
โ โโโ vlsi_tools.py # File I/O, simulation, OpenLane
|
| 194 |
+
โโโ designs/ # Example designs
|
| 195 |
+
โโโ artifacts/ # Generated GDSII outputs
|
| 196 |
+
```
|
| 197 |
+
|
| 198 |
+
### Agent Crew Architecture
|
| 199 |
|
| 200 |
+
| Agent | Role | Primary Tools |
|
| 201 |
| :--- | :--- | :--- |
|
| 202 |
+
| **Chief System Architect** | Defines Micro-Architecture, FSM States, Interfaces | Markdown Specs |
|
| 203 |
+
| **VLSI Designer** | Writes Synthesizable SystemVerilog RTL | `write_verilog`, `syntax_check_tool` |
|
| 204 |
+
| **Senior Silicon Architect** | QA - Rejects multi-drivers, latches, huge arrays | Static Analysis |
|
| 205 |
+
| **Verification Agent** | Industry SVA + Yosys SVA generation | `write_sby_config`, `convert_sva_to_yosys` |
|
| 206 |
+
| **Testbench Agent** | Self-checking testbench with FSM timing | `run_simulation` |
|
| 207 |
+
| **Error Analyst** | Root cause classification (RTL vs Testbench) | Log parsing |
|
| 208 |
+
| **Backend Engineer** | OpenLane config.tcl + PPA optimization | `run_openlane` |
|
| 209 |
|
| 210 |
---
|
| 211 |
|
|
|
|
| 217 |
|
| 218 |
### "Simulation Failed (Compilation Error)"
|
| 219 |
* **Cause**: LLM hallucinated invalid syntax.
|
| 220 |
+
* **Fix**: AgentIC v3.0 auto-fixes most issues. Use `--max-retries 10` for complex designs.
|
| 221 |
+
|
| 222 |
+
### "Code contains 'Thought:' or `<think>` lines"
|
| 223 |
+
* **Status**: **SOLVED**. The `vlsi_tools.py` regex filters strip these artifacts automatically.
|
| 224 |
+
|
| 225 |
+
### "Formal Verification Skipped"
|
| 226 |
+
* **Cause**: SymbiYosys (sby) not installed.
|
| 227 |
+
* **Fix**: Install [OSS CAD Suite](https://github.com/YosysHQ/oss-cad-suite-build) or continue without (industry SVA still generated for commercial tools).
|
| 228 |
+
|
| 229 |
+
### "LLM API Failed"
|
| 230 |
+
* **Cause**: API key invalid or service down.
|
| 231 |
+
* **Fix**: AgentIC automatically falls back through the chain: NVIDIA โ Groq โ Local. Ensure at least one valid key is set in `.env`.
|
| 232 |
|
| 233 |
+
---
|
| 234 |
+
|
| 235 |
+
## ๐ Security Features
|
| 236 |
+
|
| 237 |
+
* **No Code Exfiltration**: Supports fully local/air-gapped LLM deployment
|
| 238 |
+
* **Input Sanitization**: Blocks `$system`, shell commands, and path traversal attacks
|
| 239 |
+
* **Auditable Output**: All generated code is human-readable SystemVerilog (no binary blobs)
|
| 240 |
+
* **Secure Communication Designs**: Built-in support for AES-256, GCM authentication, and tamper detection modules
|
| 241 |
+
|
| 242 |
+
---
|
| 243 |
+
|
| 244 |
+
## ๐ฏ Defense Application Examples
|
| 245 |
+
|
| 246 |
+
* **Secure Lockout Mechanism**: FSM-based PIN verification with lockout after N failed attempts
|
| 247 |
+
* **Bharat NPU**: Indigenous Neural Processing Unit for edge AI
|
| 248 |
+
* **Secure Communication Block**: AES-256 with key expansion, encryption/decryption/authentication modes
|
| 249 |
+
* **Tamper Detection**: Hardware-level tamper response with key zeroization
|
| 250 |
|
| 251 |
---
|
| 252 |
|
| 253 |
## ๐ License
|
| 254 |
MIT License. Free for Research and Sovereign Development.
|
| 255 |
+
|
| 256 |
+
---
|
| 257 |
+
|
| 258 |
+
## ๐ค Contributing
|
| 259 |
+
Contributions are welcome! Please see the project wiki for development guidelines.
|
| 260 |
+
|
| 261 |
+
## ๐ References
|
| 262 |
+
* [OpenLane Documentation](https://openlane.readthedocs.io/)
|
| 263 |
+
* [SkyWater 130nm PDK](https://skywater-pdk.readthedocs.io/)
|
| 264 |
+
* [SymbiYosys Documentation](https://symbiyosys.readthedocs.io/)
|