VLSI Layout Optimizer with XGBoost + DEAP
clo.ai is a state-of-the-art machine learning-driven VLSI layout optimization system that combines XGBoost regression with evolutionary algorithms to reduce power consumption and improve timing in integrated circuits. The system analyzes circuit netlists, predicts performance metrics, and automatically adjusts gate sizes to achieve an optimal balance between power and delay.
Delay optimization helps reduce power consumption in three complementary ways:
- Lower Switching Activity: Fewer glitches → fewer unnecessary transitions → less dynamic power (P ∝ CV²f)
- Slack Turns Into Voltage-Headroom: Shorter paths allow lower voltage or extra functionality with quadratic power savings
- Smaller, Cooler Gates: Right-sized transistors reduce capacitive loading and leakage
Our layout optimization model follows a five-stage process:
- Parse & Sketch: Read ISCAS-85 or CircuitNet bench files, discover inputs → gates → outputs, and assign (x,y) coordinates
- Simulate & Sample: Run quick transistor-sizing sweeps to generate thousands of <delay, power> training pairs
- Learn the Physics: Train an XGBoost regressor on gate count, fan-in, and placement density data
- Search for Better Layouts: Use DEAP genetic algorithm to find optimal sizing weights for delay reduction
- Validate & Export: Write optimized weights back into the netlist and verify with ground-truth simulation
- Framework: React 18, TypeScript 5, Vite
- Styling: Tailwind CSS, Framer Motion
- UI Components: Shadcn/UI
- Visualization: ReactFlow for circuit visualization
- State Management: React Context API
- API Framework: FastAPI 0.112.0
- Server: Uvicorn (ASGI)
- Data Validation: Pydantic 2.6.3
- File Handling: python-multipart, aiofiles
- ML Framework: XGBoost 2.0.3, DEAP 1.4.1 (Distributed Evolutionary Algorithms in Python)
- Data Processing: NumPy 1.26.4, Pandas 2.1.4, SciPy 1.12.0
- Visualization: Matplotlib 3.8.3, Seaborn 0.13.1, Plotly 5.19.0
- Circuit Analysis: NetworkX 3.2.1
- Version Control: Git
- Dependency Management: pip, npm
- Environment Variables: python-dotenv
- Logging: Loguru
- Interactive Circuit Visualization: View and explore circuit layouts with dynamic zooming, panning, and node search
- Multi-Objective Optimization: Balance power consumption and timing performance
- Instant Benchmarking: Compare original vs. optimized circuit metrics side-by-side
- Sleek User Interface: Modern, responsive design with intuitive workflow
- Real-Time Progress Tracking: Monitor optimization status as it progresses
- Download Optimized Results: Export optimized circuit designs in standard bench format
The model is trained on 2,000,000 samples from the CircuitNet dataset, focusing on the IR drop features. Key model parameters:
- XGBoost: max_depth=3, learning_rate=0.1, early_stopping_rounds=50
- DEAP: ngen=10-20, sigma=0.2, mu=1.0
- Circuit simulation: gate_size_range=0.5-2.0
Achieved an average of 15-20% power reduction across benchmark circuits while maintaining or improving timing performance.
- Node.js (v18+)
- Python (v3.10+)
- pip
- Git
-
Clone the repository:
git clone https://github.com/ly-sona/clo.ai.git cd clo.ai -
Set up the frontend:
cd frontend/application npm install npm run dev -
Set up the backend (in a new terminal):
cd backend python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate pip install -r requirements.txt python app.py
-
Set up the models (optional, for development):
cd models pip install -r requirements.txt -
Open your browser to http://localhost:5173
Create a .env file in the backend directory with the following settings:
DEBUG=True
MODEL_PATH=../models/xgb_model.json
LOG_LEVEL=INFO
clo.ai/
├── backend/ # FastAPI backend and API
│ ├── app.py # Main application entry point
│ ├── optimizer/ # Circuit optimization logic
│ └── requirements.txt # Backend dependencies
├── circuit_files/ # Example and test circuit files
├── frontend/ # React frontend application
│ └── application/ # Main frontend code
│ ├── src/ # Source code
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ └── api/ # API client functions
│ └── public/ # Static assets
├── layouts/ # Generated layout files
├── models/ # ML models and training scripts
│ ├── train.py # Training script
│ ├── utils/ # Helper utilities
│ └── xgb_model.json # Trained model
└── README.md # This file
cd frontend/application
npm testcd backend
pytest tests/Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Mentor: Anu Boyapati
- Mentees: Ishita Saran, Patrick Sigler, Quan Dang, Orvin Ahmed, and Adwaith Moothezhath