Skip to main content

MCP Server for AI-powered RTL diagram generation from Verilog source

Project description

RTLViz - AI-Powered RTL Diagram Generator

Generate beautiful, interactive block diagrams from Verilog source files.

Python License

🧠 Hybrid Architecture

RTLViz uses a Code-First, LLM-Enhanced approach:

  1. Code Parser: Extracts 100% accurate connectivity and hierarchy from Verilog (no hallucinations).
  2. LLM Analyzer: Adds semantic understanding (e.g., "This is an IF stage", "This generic module is an ALU").
  3. Strict Validator: Enforces layout density, coloring, and connectivity rules.

✨ Features

  • Strict Validation: Fails if nodes are uncolored or layout uses excessive whitespace.
  • Reference Styling: Automatically applies standard styling (e.g., Yellow MUX, Amber ALU) for CPU designs.
  • Dynamic Clustering: Groups logic by function (e.g., "Memory Interface", "Instruction Decode").

🚀 Quick Start

Step 1: Install

pip install rtlviz

Step 2: Setup (Auto-configures your IDE)

rtlviz setup

This auto-detects and configures:

  • ✅ Antigravity (Google DeepMind)
  • ✅ Claude Desktop
  • ✅ Cursor
  • ✅ VS Code Copilot
  • ✅ Windsurf

Step 3: Use

Option A: Ask your AI (after setup)

"Generate an RTL diagram for the Verilog files in ./src"

Option B: CLI command

rtlviz generate ./src -o diagram.html

📖 Commands

rtlviz generate

Generate a diagram directly:

rtlviz generate ./src -o diagram.html
rtlviz generate ./src -o diagram.html --llm    # With LLM enhancement
rtlviz generate ./src -o diagram.html --title "My CPU"

rtlviz setup

Configure MCP server for AI IDEs:

rtlviz setup                  # Auto-detect and configure all found IDEs
rtlviz setup --all            # Force configure all IDEs
rtlviz setup --antigravity    # Configure Antigravity only
rtlviz setup --claude         # Configure Claude Desktop only
rtlviz setup --cursor         # Configure Cursor only
rtlviz setup --vscode         # Configure VS Code Copilot only
rtlviz setup --windsurf       # Configure Windsurf only

✨ Features

  • 🔧 Automatic Parsing - Extracts modules, ports, and connections from Verilog
  • 📊 Pipeline Detection - Auto-identifies stages (IF, ID, EX, MEM, WB)
  • 🎨 Beautiful Diagrams - Orthogonal routing, color-coded clusters
  • 🤖 LLM Enhancement - Built-in GPT integration for semantic labels
  • 🌐 Interactive HTML - Pan, zoom, download SVG

🛠️ MCP Server (for AI IDEs)

After running rtlviz setup, your AI assistant can use these tools:

generate_rtl_diagram

{
  "source_dir": "/path/to/verilog",
  "output_path": "/path/to/output.html",
  "use_llm": true
}

render_diagram

{
  "dot_content": "digraph { ... }",
  "output_path": "/path/to/output.html"
}

📋 Requirements

  • Python 3.10+
  • Internet connection (for Viz.js CDN)

All dependencies installed automatically.


🔧 Troubleshooting

"Command not found: rtlviz"

pip install rtlviz

"No valid Verilog modules found"

  • Check directory contains .v files
  • Ensure files have module ... endmodule declarations

📄 License

MIT License

🔗 Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtlviz-0.3.6.tar.gz (211.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rtlviz-0.3.6-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file rtlviz-0.3.6.tar.gz.

File metadata

  • Download URL: rtlviz-0.3.6.tar.gz
  • Upload date:
  • Size: 211.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for rtlviz-0.3.6.tar.gz
Algorithm Hash digest
SHA256 f3d1057b7ecf88c1bcde047abbf475f1f3fde582fa1fe16c2b79fe1e1a20aa6e
MD5 1b1b8ecf5c3a6c3f14084a03171822bb
BLAKE2b-256 f2365cd274e5d9cb6b3277c9c2ce4fe36dba80ac9c3643a7e8a3673a58f67c5d

See more details on using hashes here.

File details

Details for the file rtlviz-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: rtlviz-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for rtlviz-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 636f881cad1ab0605d6c5a4af5599af6636c1300e284219d9b73b5d632e4b57a
MD5 1568cc61b1e9fc96f3cd9f043ff487de
BLAKE2b-256 a2312c3584a94b87c6e1bb70e4442eeeaf45f7049b6f4c2090d3ff5f00edbfef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page