A specialized AI assistant for chip design and performance analysis, focusing on RISC-V and MIPS architectures.
- 🤖 Specialized AI Assistant: Expert-level chip design analysis using Google's Gemini AI
- 📊 File Upload Support: Upload CSV, JSON, and text files for performance data analysis
- 📝 Text File Analysis: Support for instruction traces, logs, and other text-based data files
- 🔬 Performance Focus: Optimized for IPC analysis, cache performance, and architectural bottlenecks
- ⚡ Modern Setup: Uses uv for fast dependency management with pip fallback
- 🔧 Environment Management: Uses python-dotenv for secure API key management
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Run the installation script
./install.sh
# Start the chatbot
uv run python app.py# Run the installation script (will use pip automatically)
./install.sh
# Activate virtual environment and start
source venv/bin/activate
python app.py# Install dependencies
pip install -r requirements.txt
# Configure environment (copies .env.example to .env)
cp .env.example .env
# Edit .env with your Google API key
# Test the setup
python test_setup.py
# Run the chatbot
python app.pyRun the test script to verify your setup:
uv run python test_setup.py
# or
python test_setup.pyThis will check:
- Python version compatibility
- Required dependencies
- Environment configuration
- Sample file availability
- Basic functionality
- Copy
.env.exampleto.env - Get your Gemini API key from Google AI Studio
- Set your API key in the
.envfile:GEMINI_API_KEY=your_actual_api_key_here GEMINI_MODEL=gemini-2.5-flash
/csv <filepath>- Load CSV file for analysis/json <filepath>- Load JSON file for analysis/txt <filepath>- Load text file for analysis (e.g., traces, logs)/files- List uploaded files/clear- Clear all uploaded files/help- Show available commands/quit- Exit the chatbot
The project includes sample files to test the functionality:
sample_performance.csv- Processor performance metricssample_benchmark.json- Detailed benchmark resultsinst_trace.txt- RISC-V instruction trace example
🔬 You: /csv sample_performance.csv
✅ Successfully loaded CSV: sample_performance.csv (6 rows, 8 columns)
🔬 You: Analyze the IPC performance across different architectures
🤖 Assistant: Based on the uploaded performance data, I can see significant
variations in IPC across architectures...
🔬 You: /txt inst_trace.txt
✅ Successfully loaded text file: inst_trace.txt (149 lines, 892 words)
🔬 You: What RISC-V instructions are most frequent in this trace?
🤖 Assistant: Analyzing the instruction trace, I can see several patterns...
The most frequent instructions are memory operations (sd) and arithmetic...
The chatbot uses a specialized system prompt (system_prompt.md) that configures it as:
- Senior chip design engineer with 15+ years experience
- Expert in RISC-V and MIPS architectures
- Specialist in performance optimization and EDA workflows
- Focused on quantitative analysis and actionable recommendations
- Python 3.9+
- google-genai[aiohttp] - Google Generative AI SDK
- python-dotenv - Environment variable management
- Standard library modules (json, csv, asyncio, pathlib)
├── app.py # Main chatbot application
├── system_prompt.md # AI assistant configuration
├── requirements.txt # pip dependencies
├── pyproject.toml # Modern Python project config
├── install.sh # Installation script
├── setup.py # Python setup script (legacy)
├── test_setup.py # Environment test script
├── env-example # Environment template
├── sample_performance.csv # Sample CSV data
└── sample_benchmark.json # Sample JSON data