Autonomous Multi-Agent System for ASIC Design - LLM-powered end-to-end chip design workflow from natural language specification to silicon-ready GDSII.
- LLM-Powered RTL Generation: Generate Verilog from natural language using Gemini/Mistral
- Automated Verification: cocotb testbench generation and simulation with Icarus Verilog
- Real ASIC Hardening: Complete RTL-to-GDSII flow using OpenLane in Docker
- Caravel Integration: Automatic integration with Efabless Caravel for tapeout
- Knowledge Base: RAG-powered design assistance using ChromaDB
- Multi-Agent Architecture: Specialized agents for each design stage
NO SIMULATIONS - 100% REAL TOOLS:
- β Real Docker OpenLane execution (Yosys, OpenROAD, Magic)
- β Real Sky130 PDK (2.4GB process design kit)
- β Real GDSII generation (fabrication-ready layouts)
- β Real git operations (Caravel clone)
- Python 3.10+
- Docker (for OpenLane)
- Git (for Caravel integration)
- Icarus Verilog (
iverilog) - Verilator (linting)
pip install -r requirements.txtCore dependencies:
openai- LLM API clientmistralai- Mistral LLM supportchromadb- Vector database for RAGcocotb- Hardware verification frameworklangchain- Agent orchestration
- OpenRouter API Key (for Gemini/Claude) OR
- Mistral API Key
Set via environment variable:
export OPENROUTER_API_KEY="your-key-here"
# OR
export MISTRAL_API_KEY="your-key-here"Ubuntu/Debian:
sudo apt update
sudo apt install -y docker.io git iverilog verilator python3-pip
sudo usermod -aG docker $USER # Allow Docker without sudo
newgrp docker # Apply group changemacOS:
brew install docker git icarus-verilog verilator python3git clone https://github.com/yourusername/asic-agent.git
cd asic-agent
pip install -r requirements.txtCRITICAL: Build the knowledge base with real scraped documentation:
# Automated setup (recommended)
./scripts/setup_knowledge_base.sh
# OR manual build
python3 scripts/build_knowledge_base.pyThis scrapes REAL documentation from:
- cocotb official docs (docs.cocotb.org)
- cocotb GitHub examples
- OpenLane documentation
- Curated Verilog patterns
Takes ~30-60 seconds, creates chroma_db/ with vector database.
echo 'export OPENROUTER_API_KEY="sk-or-v1-..."' >> ~/.bashrc
source ~/.bashrcpython3 main.py "Design a 4-bit counter" --name counter4bitThe first run will download the Sky130 PDK to ~/.volare/ (one-time, ~5 minutes).
python3 main.py "Design a [your specification]" --name [design_name]Simple Counter:
python3 main.py "Design a 8-bit counter with synchronous reset" --name counter8bitShift Register:
python3 main.py "Design a 16-bit shift register with parallel load" --name shift_regCustom Configuration:
python3 main.py "Design a 2-bit counter" \
--name counter2bit \
--provider openrouter \
--model google/gemini-2.0-flash-001 \
--max-iterations 3 \
--rate-limit 4.0--name NAME Design name (required)
--provider PROVIDER LLM provider: 'openrouter' or 'mistral' (default: openrouter)
--model MODEL Model name (default: google/gemini-2.0-flash-001)
--max-iterations N Max debug iterations per stage (default: 5)
--rate-limit SECONDS Delay between API calls (default: 6.0)
--no-rate-limit Disable rate limiting
- LLM generates Verilog from natural language
- Automatic module inference and port generation
- Best practices from knowledge base
- Verilator syntax checking
- LLM-powered error fixing
- Iterative refinement
- Automatic cocotb testbench generation
- Icarus Verilog simulation
- Coverage-driven test generation
REAL OpenLane Docker Execution:
- Yosys synthesis
- Floorplanning (OpenROAD)
- Placement & routing
- Clock tree synthesis
- Magic GDSII generation
Output: workspace/design.gds (818KB+ silicon-ready layout)
REAL Caravel Repository Clone:
- Git clone
efabless/caravel_user_project - GDS integration
- Wrapper generation
- Tapeout preparation
asic-agent/
βββ asic_agent/
β βββ agents/ # Specialized agents
β β βββ main_agent.py # RTL generation
β β βββ verification_agent.py # Testbench generation
β β βββ hardening_agent.py # OpenLane execution
β β βββ caravel_agent.py # Caravel integration
β βββ workflows/ # Orchestration
β β βββ orchestrator.py
β βββ database/ # Knowledge base
β β βββ knowledge_base.py
β βββ llm_client.py # LLM API wrapper
β βββ config.py # Configuration
βββ workspace/ # Design outputs (gitignored)
β βββ design.v # Generated RTL
β βββ design.gds # Final GDSII
β βββ openlane_run/ # OpenLane artifacts
βββ main.py # CLI entry point
βββ requirements.txt # Python dependencies
βββ README.md # This file
After successful workflow:
workspace/
βββ [design_name].v # RTL Verilog
βββ test_[design_name].py # cocotb testbench
βββ design.gds # GDSII layout (818KB+)
βββ config.json # OpenLane configuration
βββ openlane_run/
β βββ designs/[name]/runs/run1/
β βββ results/final/
β βββ gds/ # GDSII files
β βββ verilog/gl/ # Gate-level netlist
β βββ lef/ # Cell abstracts
β βββ spef/ # Parasitic extraction
β βββ sdf/ # Timing data
βββ caravel_user_project/ # Cloned Caravel repo
βββ gds/ # Integrated GDS
βββ verilog/rtl/ # Integrated RTL
subprocess.run([
'docker', 'run', '--rm',
'-v', f'{design_dir}:/openlane',
'-v', f'{pdk_root}:/root/.volare',
'efabless/openlane:latest',
'flow.tcl', '-tag', 'run1', '-overwrite'
])subprocess.run([
'git', 'clone', '--depth', '1',
'https://github.com/efabless/caravel_user_project.git',
caravel_dir
])Runtime: 15-30 minutes for complete RTL-to-GDSII flow (small designs)
sudo usermod -aG docker $USER
newgrp docker# Manual PDK fetch
docker run --rm -v ~/.volare:/root/.volare efabless/openlane:latest \
volare fetch sky130 bdc9412b3e468c102d01b7cf6337be06ec6e9c9a# Increase delay between requests
python3 main.py "..." --rate-limit 10.0Check cocotb test logic in workspace/test_*.py - LLM may generate incorrect timing
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ASIC-Agent β
β Autonomous Multi-Agent System for ASIC Design β
β Powered by: OpenRouter/Gemini + ChromaDB + LangGraph β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Configuration: Provider=openrouter, Model=google/gemini-2.0-flash-001
=== RTL Generation Stage ===
β Generated RTL saved to: workspace/counter2bit.v
=== Linting Stage ===
β Linting passed
=== Verification Stage ===
β Verification passed
=== Hardening Stage ===
β OpenLane synthesis complete
β Place & route complete
β GDSII generated: workspace/design.gds (818KB)
=== Integration Stage ===
β Caravel cloned successfully
β GDS integrated
============================================================
WORKFLOW RESULTS
============================================================
Design Name: counter2bit
Final Stage: integration
RTL Files Generated:
β counter2bit.v
β Linting: PASSED
β Verification: PASSED
β Hardening: PASSED (design.gds)
β Integration: PASSED
============================================================
Contributions welcome! Areas for improvement:
- More complex design patterns in knowledge base
- Additional verification strategies
- Timing optimization heuristics
- Multi-module design support
MIT License - See LICENSE file
- OpenLane: RTL-to-GDSII flow (Efabless)
- Sky130 PDK: Open-source process design kit (Google/Skywater)
- Caravel: Open-source chip harness (Efabless)
- cocotb: Python verification framework
- OpenRouter: LLM API gateway
This tool generates real GDSII layouts but does not validate designs for production. For actual tapeout:
- Run full DRC/LVS verification
- Perform timing closure analysis
- Add proper power/ground distribution
- Follow foundry design rules
- Use professional EDA tools for sign-off
Educational/Research Use Only