🐙 TraceWeave
TraceWeave is an MCP server for RTL / SoC debugging. It connects compile records, simulation logs, VCD/FSDB/FST waveforms, and RTL source to your AI assistant, helping you work from a failed simulation to the relevant time, signals, and driving logic.
Use it with Claude Code, Codex, Copilot, or another MCP client. Describe the problem in natural language; the assistant uses tools to investigate, trace, and verify, with evidence you can review.
Use Cases · Installation · Client Setup · Start Debugging · Tool Quick Reference · FAQ · Documentation and Feedback
Use Cases
| Problem |
How TraceWeave helps |
| A simulation times out or hangs, with no clear starting point |
Summarize failures and scan interface handshakes to narrow down the affected interfaces and time window |
| A scoreboard mismatch or different results between runs |
Compare failure records and waveforms, locate observed differences, and trace data and control sources on both sides |
| A signal becomes X/Z |
Follow drivers and review waveform history to check whether a register sampled and retained an unknown value |
| Packed buses are hard to read, or TL-UL requests are not completing |
Inspect address, data, and control fields individually, then check request/response handshakes, latency, and completion |
| Suspected ties, unconnected inputs, or magic-word conditions |
Statically scan source code for constant connections, open inputs, and constant comparisons as investigation leads; no simulation run or waveform required |
| A deep SoC hierarchy with many modules and interfaces |
Browse hierarchy on demand, locate instances and source files, and follow drivers, consumers, and connectivity paths |
| A debugging hypothesis needs evidence |
Sample by cycle and check timing conditions, handshake stability, and transaction completion |
Supports VCS / Xcelium / Verilator simulation logs and VCD / FSDB / FST waveforms. Exported formal waveforms can also be queried; automatic artifact discovery currently supports JasperGold.
Trace signals from the waveform back to their driving logic with Verdi NPI → Source Graph → basic static analysis, according to available tools and query coverage. Source Graph provides semantic source analysis without a commercial license. Results retain source references, coverage gaps, and next steps so you can check the evidence before assigning a root cause.
Installation
Requires Python 3.11+. Choose the installation that fits your environment:
| Installation |
Intended use |
| Repository |
Simulation hosts with an existing Verdi installation, for FSDB, Source Graph, and optional NPI / LSF |
| PyPI |
Log and VCD analysis, with optional FST and Source Graph |
Repository Installation
git clone https://github.com/gokeshenzhen/TraceWeave.git
cd TraceWeave
export VERDI_HOME=/path/to/verdi
bash scripts/install.sh
The installer prepares the Python environment, Source Graph, and FSDB reader, then checks the runtime. It leaves shell startup files and MCP client configuration untouched. FSDB support builds against the Synopsys FSDB Reader SDK in VERDI_HOME; TraceWeave does not redistribute its headers or libraries. Use of the FSDB Reader is subject to the applicable VC Apps Access Program Agreement (or successor). NPI and KDB operations also require the appropriate EDA runtime and license from your site.
For an existing installation, start with a read-only check:
bash scripts/install.sh --check
PyPI Installation
python3.11 -m pip install "traceweave-mcp[source-graph]"
traceweave-mcp --doctor
For logs, VCD, and basic static analysis only, install traceweave-mcp without [source-graph]. The PyPI package does not include the FSDB reader; use the repository installation for FSDB.
Optional FST support
On Linux, install the fst extra in a PyPI environment and check the reader.
python3.11 -m pip install "traceweave-mcp[fst]>=2.1"
traceweave-mcp --doctor
For a repository installation, run these commands from the repository root using the server's Python environment.
.venv/bin/python -m pip install "pylibfst==0.2.1"
.venv/bin/python -m traceweave_mcp --doctor
Reconnect the MCP server and open a small .fst file with get_waveform_summary. The returned fst_backend.version identifies the loaded reader version. See FST support and limits.
Client Setup
After a repository installation, generate a client configuration template with absolute paths:
| Client |
Generate configuration template |
| Claude Code |
bash scripts/install.sh --print-config claude |
| Codex |
bash scripts/install.sh --print-config codex |
| Copilot |
bash scripts/install.sh --print-config copilot |
These commands only print templates. Add the output to your client's MCP configuration, supply any required site EDA environment variables, and reconnect the server. See the client configuration reference for complete examples.
Other MCP clients supporting stdio can use these connection settings:
| Installation |
command |
args |
| Repository |
<absolute-repository-path>/.venv/bin/python |
["<absolute-repository-path>/server.py"] |
| PyPI |
traceweave-mcp, or its absolute path |
[] |
If a proxy slows NPI SDK initialization and direct vendor access is available,
set TRACEWEAVE_NPI_VENDOR_DIRECT=1 in the MCP server environment and reconnect.
It defaults to off; startup commands stay the same. Before the first SDK import,
it appends srv1.sw.synopsys.com and .updates.synopsys.com to the process's
NO_PROXY/no_proxy, preserving existing entries. It does not edit proxy
configuration or disable SDK communication/retries; offline environments have
no guaranteed benefit. For LSF, the worker environment must also receive the flag.
LSF-only NPI licenses
If Verdi/NPI licenses are available only on LSF compute nodes, provide these settings to the MCP server process. Replace digital with your queue:
export TRACEWEAVE_NPI_EXECUTION=lsf
export TRACEWEAVE_NPI_LSF_QUEUE="digital"
The client must inherit or explicitly pass these variables. Project files, the TraceWeave installation, and cache directories must be visible at the same absolute paths on submission and compute nodes. See the LSF configuration reference for bash / tcsh examples, client environment forwarding, and verification steps.
Start Debugging
Connect your assistant and ask, replacing the path with your project directory:
Use TraceWeave to investigate the simulation failure in my_case under /path/to/verif. Check logs, design structure, and interface handshakes, then trace suspicious signals. Include timestamps, signal paths, and source references.
The investigation discovers current run artifacts, scans structural risks and parses failures. The assistant chooses tool order and scope from the failure phase and known target: inspect known signals/interfaces directly, or consider a scoped/global handshake sweep for opaque timeout or compare symptoms. An unperformed sweep leaves protocol behavior unchecked and does not block recommendations. A full hierarchy build remains available when explicitly needed.
Structural scanning is enabled by default (TRACEWEAVE_STRUCTURAL_SCAN_IN_WORKFLOW=1).
To skip it in the default workflow, set TRACEWEAVE_STRUCTURAL_SCAN_IN_WORKFLOW=0
in the MCP server environment and restart or reconnect the server. Explicit
scan_structural_risks requests remain available; skipped checks remain unchecked.
Handshake scanning and per-call scan modes are unchanged.
For bit-level multiple-driver and undriven-signal checks, explicitly pass
semantic_categories=["multiple_driver", "undriven_signal"] to
scan_structural_risks, optionally with semantic_scope="tb.dut.u_block".
Both NPI and Slang support these categories: auto prioritizes an existing KDB
and otherwise reuses compatible source results; deep also permits a Slang build.
The category list replaces the defaults. Facts report static writers and proved
empty inventories for consumed bits; runtime contention is not checked. Read
coverage and gaps before interpreting zero findings. See the
driver checks reference for limits.
Try a more focused question:
- Find a mismatch: “Compare
tb.dut.result in these two waveforms and trace the logic producing the difference on each side.”
- Trace an X: “
tb.dut.q is X at 36 ns, but its input is now known. Check earlier sampling and hold behavior from 0 to 36 ns.”
- Inspect transactions: “Check this TL-UL interface from 10 to 20 μs for stalls, response latency, and outstanding requests.”
- Check source structure: “Use deep mode to scan this compile log's design for suspicious ties, open inputs, and constant comparisons.”
- Verify a hypothesis: “Sample these signals before each clock edge and check whether the payload stays stable while waiting for ready.”
You can also evaluate SV expressions, inspect packed bus fields, and compare failures after a fix. Coverage limits remain visible: zero findings from an incomplete check do not establish that the design is correct.
For a connection check, ask the assistant to call get_sim_paths. See the debug workflow for the full procedure and the readback check for a repository smoke check.
Custom runtime logs
Built-in parsing covers UVM, VCS/Xcelium assertions, and supported Verilator/cocotb failures. Add project-specific checker labels through custom_patterns.yaml, or set TRACEWEAVE_CUSTOM_PATTERNS_FILE to your own file. See log formats and configuration for examples and Verilator time-unit requirements.
Tool Quick Reference
Describe your debugging goal and let the assistant choose the tools. All tools are listed below; consult their MCP definitions for parameters and supported scope.