Sponsored by Deepsite.site

MCP‑EDA Example Flow

Created By
AndyLu6667 months ago
Server for EDA Tools, Duke University
Content

MCP‑EDA Example Flow

An end‑to‑end digital implementation reference that combines Synopsys Design Compiler for RTL‑to‑gate synthesis and Cadence Innovus for physical implementation, wrapped in a set of lightweight Python/FastAPI micro‑services plus automation scripts.

The goal is to let you:

  • spin up every step (setup → compile → floor‑plan → place → CTS → power‑plan → route → save) with a single command
  • or drive / debug individual steps via simple REST calls
  • keep all tool settings under version control (CSV + TCL) for fully repeatable runs

1. Repository Layout

.
├── config/                  # CSV knobs for each stage
│   ├── synthesis.csv
│   ├── imp_global.csv
│   ├── placement.csv
│   └── cts.csv
├── designs/
│   └── des/                 # example AES‑DES design
│       ├── rtl/             # Verilog sources
│       └── implementation/  # auto‑generated results
├── libraries/               # FreePDK45 timing/lib/LEF
├── scripts/
│   └── FreePDK45/
│       ├── tech.tcl         # common tech setup
│       ├── frontend/        # Design‑Compiler TCL
│       └── backend/         # Innovus TCL (1–8)
├── server/                  # FastAPI micro‑services
│   ├── synth_setup_server.py
│   ├── synth_compile_server.py
│   ├── floorplan_server.py
│   ├── placement_server.py
│   ├── cts_server.py
│   ├── powerplan_server.py
│   ├── route_server.py
│   └── save_server.py
└── run_pipeline.sh          # one‑shot driver

2. Prerequisites

ToolVersion (known good)Notes
Synopsys Design CompilerV‑2023.12‑SP2dc_shell in $PATH
Cadence Innovus21.1 s075innovus in $PATH
Python3.9 +tested with venv
FreePDK45Nangate OpenCell v1.3timing/LEF already included

Licenses: You need valid DC & Innovus licenses on the host.


3. Quick Start – one line

./run_pipeline.sh       # runs ALL 8 stages, logs to ./logs/

Behind the scenes the script:

  1. Spins up (or re‑uses) the 8 REST services on localhost :3333…3340.
  2. Calls them in sequence, passing the parameter sets from config/*.csv.
  3. Streams JSON back to the console for each stage; artefacts go under
    designs/des/FreePDK45/{synthesis,implementation}/….

If you see ✅ at the end you have a routed & saved GDS/V files ready.


4. Running individual stages

Every stage is a tiny FastAPI app exposing POST /<stage>/run.

Example – placement:

curl -X POST http://localhost:3337/place/run      -H 'Content-Type: application/json'      -d '{
           "design": "des",
           "tech":   "FreePDK45",
           "impl_ver":"cpV1_clkP1_drcV1__g0_p0",
           "g_idx":0, "p_idx":0,
           "force": true
         }' | jq .

All servers honour two rules:

  • idempotent – rerun with force=true to wipe previous logs/reports.
  • stateless – all context (version tags, CSV indices) comes from the JSON.
PortServiceEndpointDepends on
3333synth_setup_server/setup/runsource RTL
3334synth_compile_server/compile/runsetup artefacts
3335floorplan_server/floorplan/run.mapped.v/.sdc
3337placement_server/place/runfloorplan.enc.dat
3338cts_server/cts/runplacement
3336powerplan_server/power/runfloorplan (striped)
3339route_server/route/runCTS
3340save_server/save/runroute

See docs/api_examples.http for ready‑to‑paste requests in VS Code.


5. Configuration – CSV → environment → TCL

Instead of duplicating parameters in TCL, every tunable knob lives in CSV:

  • imp_global.csv – global flow effort, target util, etc.
  • placement.csvsetPlaceMode switches, density caps …
  • cts.csv – CCOpt properties.
  • synthesis.csv – compile options, clock period …

At runtime the Python server:

  1. Picks a row by index (g_idx, p_idx, c_idx …).
  2. Exports the key/values as environment variables.
  3. The stage‑specific *.tcl scripts reference them, e.g.:
setDesignMode -flowEffort $env(design_flow_effort)
floorPlan -r $env(ASPECT_RATIO) $env(target_util)

Change a cell in CSV → commit → rerun only the affected stage.


6. Logs, Reports & Artifacts

PathWhat
logs/<stage>/Full tool std‑out per run (timestamped)
designs/.../synthesis/<syn_ver>/results.mapped.v, .sdc, QOR
designs/.../implementation/<impl_ver>/pnr_reports/floorplan_summary.rpt, place_timing.rpt.gz, …
pnr_save/floorplan.enc.dat, final.enc.dat – for restore
pnr_out/DEF, SPEF, net‑delays, etc.

Reports that matter (WNS/TNS, DRC counts, routing congestion) are collected and returned in JSON by each service – so your CI can grep them directly.


7. How to Re‑use for your Design

  1. Place your RTL under designs/<name>/rtl/*.v.
  2. Add a minimal config.tcl under designs/<name>/ containing at least
    set TOP_NAME "<top_module>"
    set RTL_LIST  [glob $::env(BASE_DIR)/designs/<name>/rtl/*.v]
    
  3. Keep using the default CSV rows or add new ones.
  4. Update the REST calls / run_pipeline.sh with design="<name>".

No other path hard‑coding required.


8. Troubleshooting

SymptomLikely CauseFix
*.mapped.sdc not found” during floorplanRTL top name ≠ file prefixeither rename file or use the new auto‑detect logic in backend/1_setup.tcl
Placement fails with row not legalisedtarget util too hightweak placement.csv → place_global_max_density
Route DRC over 1 Mmissing power stripes on M4/M5revisit 3_powerplan.tcl stripe pitch
REST call returns error: … enc.dat not foundprevious stage crashedlook at logs/<stage>/…log and fix first

9. Roadmap

  • 🚧 add OpenROAD support for fully open‑source flow
  • parameter sweep driver (sweep.py) to explore CSV grids
  • Prometheus metrics endpoint on each server

10. License

See LICENSE. Free to use for academic & evaluation purposes; no guarantees.


Made with ❤️ by the MCP team – feel free to open issues / PRs!

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
ChatWiseThe second fastest AI chatbot™
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Tavily Mcp
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server