Skip to content
FunCoding

TraceWeave

Listed in the official MCP Registry

Portable MCP runtime for RTL logs and VCD; repository setup adds FSDB and site EDA integration

Star
140
Version
v2.1.2
License
MIT
Last commit
Nov 28, 2026

🐙 TraceWeave

English · 简体中文

TraceWeave

An MCP server for evidence-driven simulation debugging

CI status PyPI version MIT License Python 3.11+ Stars

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.

The TraceWeave Premium HWE-Bench evaluation summary reports that the group with access to Premium MCP tools passed 213/240 tasks (88.75%) and the control group without those tools passed 188/240 (78.33%), a net gain of 25 tasks for the tool group. Results by project

Use Cases · Runnable example · Installation · Client Setup · Tool Quick Reference · FAQ · Documentation and Feedback

TraceWeave debugging workflow from logs and waveforms to source tracing

Use Cases

ProblemHow TraceWeave helps
A simulation times out or hangs, with no clear starting pointSummarize failures and scan interface handshakes to narrow down the affected interfaces and time window
A scoreboard mismatch or different results between runsCompare failure records and waveforms, locate observed differences, and trace data and control sources on both sides
A signal becomes X/ZFollow 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 completingInspect address, data, and control fields individually, then check request/response handshakes, latency, and completion
Suspected ties, unconnected inputs, or magic-word conditionsStatically 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 interfacesBrowse hierarchy on demand, locate instances and source files, and follow drivers, consumers, and connectivity paths
A debugging hypothesis needs evidenceSample 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.

Try the AXI-Stream FIFO pause case

In a public verilog-axis FIFO revision, requesting a frame pause under backpressure makes TVALID drop before the receiver accepts the first beat. From the repository root, replay the original and repaired waveforms with the open-source TraceWeave tools and Python 3.11+ alone.

python3 examples/axis_fifo_pause/replay.py

The original trace shows the handshake violation at 75 ns. With the example repair, the receiver accepts both beats of the first frame, the FIFO acknowledges the pause, and the second frame transfers after release. Try this prompt in an AI client connected to TraceWeave MCP.

Use TraceWeave to debug examples/axis_fifo_pause/recorded/before. Which beat failed to transfer? Trace it to the RTL, fix a copy, and rerun the same testbench to verify your repair.

The repository includes the example patch. Run the command for your simulator to test the original and repaired RTL with the same self-checking testbench.

python3 examples/axis_fifo_pause/simulate.py verilator
python3 examples/axis_fifo_pause/simulate.py vcs

Add --rtl /path/to/axis_fifo.v to test your own repair. Waveform walkthrough and upstream sources

TraceWeave Premium on HWE-Bench

Pass counts and rates by project
ProjectTasksPassed without Premium MCP toolsPassed with Premium MCP toolsGain (percentage points)Net extra passes
OpenTitan141106/141 (75.18%)124/141 (87.94%)+12.77+18
XiangShan2015/20 (75.00%)17/20 (85.00%)+10.00+2
Rocket Chip1310/13 (76.92%)11/13 (84.62%)+7.69+1
Ibex2624/26 (92.31%)25/26 (96.15%)+3.85+1
CVA62722/27 (81.48%)24/27 (88.89%)+7.41+2
Caliptra RTL1311/13 (84.62%)12/13 (92.31%)+7.69+1
Total240188/240 (78.33%)213/240 (88.75%)+10.42+25

Both groups worked on the same 240 tasks across six open-source hardware projects and could run simulations and write diagnostic scripts. HWE-Bench tests scored their final patches. Benchmark · Scoring protocol

Installation

Requires Python 3.11+. Choose the installation that fits your environment:

InstallationIntended use
RepositorySimulation hosts with an existing Verdi installation, for FSDB, Source Graph, and optional NPI / LSF
PyPILog 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:

ClientGenerate configuration template
Claude Codebash scripts/install.sh --print-config claude
Codexbash scripts/install.sh --print-config codex
Copilotbash 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:

Installationcommandargs
Repository<absolute-repository-path>/.venv/bin/python["<absolute-repository-path>/server.py"]
PyPItraceweave-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.

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.

CategoryToolPurpose
Session and artifactsget_sim_pathsDiscover compile logs, simulation logs, and waveforms
get_formal_pathsDiscover JasperGold projects and exported waveforms
get_diagnostic_snapshotReview collected evidence and suggested steps
Design and sourceprepare_design_contextPrepare a design context for on-demand queries
build_tb_hierarchyExplicitly build an RTL / testbench hierarchy view
get_tb_subtreeBrowse a selected instance subtree
find_tb_instanceFind instances by path or module name
lookup_tb_filesFind source files in the compiled input set
get_tb_file_detailInspect module, interface, and class declarations
get_tb_class_hierarchyBrowse SystemVerilog / UVM class inheritance
dump_tb_sectionExport a selected hierarchy or source section
explain_propertyExplain SVA matching, obligations, clocks, local state and directive roles
Logs and failuresparse_sim_logGroup runtime failures and extract times and summaries
get_error_contextRead original log lines around an error
diff_sim_failure_resultsCompare failures between runs
analyze_failuresCombine log and waveform evidence for a failure group
analyze_failure_eventCorrelate one failure with instance, signal, and source leads
recommend_failure_debug_next_stepsSuggest investigation targets and next tool calls
Structure and tracingscan_structural_risksScan text rules; check port facts and optional bit-level drivers with NPI / Slang
explain_signal_driverTrace signal drivers and source locations
find_signal_loadsFind signal consumers and loads
trace_signal_pathQuery structural connectivity between signals
trace_x_sourceTrace X/Z propagation and historical sampling
Waveform readsget_waveform_summaryInspect duration, signal counts, and timescale
search_signalsSearch for full signal paths
get_signal_at_timeRead a value or expression at a selected time
get_signal_transitionsRead transitions within a time window
get_signals_around_timeInspect multiple signals around a selected time
get_signals_by_cycleSample signals or expressions on clock edges
Differences and timingdiff_first_divergenceLocate the first confirmed known-value difference
trace_divergenceBacktrace data, control, and prior state on both sides of a difference
periodCheck periods and cadence anomalies
verify_windowCheck temporal conditions or replay a property plan at a logged failure
Protocols and transactionssuggest_handshakesDiscover valid/ready signal bundles
suggest_protocol_bundlesDiscover AHB / APB signal bundles
sweep_handshakesSweep discovered AHB / valid-ready interfaces for anomalies
inspect_handshakeInspect stalls and hold behavior on one interface
reconstruct_transactionsReconstruct requests/responses, latency, and outstanding requests
resolve_packed_fieldsResolve packed fields and verify waveform coordinates
inspect_tlulInspect TL-UL handshakes and requests/responses
Time cursorscursor_setName a key timestamp
cursor_listList session cursors
cursor_deleteDelete a time cursor
EDA integrationbuild_kdbBuild and cache a Verdi KDB

FAQ

Can I use it without a commercial license?

Log analysis, VCD, optional FST, lexical structural checks, and Slang / Source Graph analysis need no commercial license. Structural scans in auto / deep first try an existing KDB through NPI, which can request a license locally or through configured LSF. fast performs text checks only. FSDB uses your site's Verdi FSDB Reader under its applicable agreement; NPI and KDB builds require the corresponding EDA environment and license.

Do I need simulation results for a structural scan?

No. Supply a compile/elaboration log. Text checks use accessible sources; auto also tries existing/cached KDBs for NPI input-port checks, then only reuses compatible source semantic results for missing categories. deep additionally permits a bounded Slang build. Scans never build a KDB. Supply top_hint if compile metadata lacks a unique top.

Read semantic.category_coverage and result_groups: NPI port facts and source facts retain separate domains and identities. Default comparison checks still need source evidence; unknown expressions, empty-actual default semantics and budget stops remain gaps. Zero facts or a cache hit does not prove completeness. Findings can include legitimate tie-offs. See scan modes and limits.

For large designs, follow semantic.suggested_next_action or pass the returned semantic.continuation as semantic_continuation with the same log/top/scope/categories. Counts are cumulative; fact rows belong to the current page. Tokens expire after ten idle minutes and survive neither server restart nor identity changes. For a known target, query its exact semantic_scope directly.

Can it inspect formal waveforms?

Yes, exported waveforms use the same readers, with automatic JasperGold artifact discovery. Property results and reachability semantics still come from your formal tool or verification context.

Where is design data processed?

File parsing and EDA queries run locally or on configured LSF nodes. Returned evidence enters your AI client's context. Usage telemetry is off by default and writes locally when enabled.

Documentation and Feedback

Learn more aboutResource
Debugging steps and tool cooperationDebug workflow
Verifying a root cause with evidenceDebug discipline
Architecture, backend capabilities, and resource limitsArchitecture
Expression inputs and worked examplesSV expressions
Complete environment configuration and advanced settingsConfiguration reference
Contributing to TraceWeaveContributor guidelines · Regression tests
Reporting a problem or suggesting a featureGitHub Issues

TraceWeave is available under the MIT License.

WeChat

Follow the WeChat public account for project updates and debugging examples:

WeChat public account QR code

Similar MCP servers

Official

Git

Read, search and manipulate Git repositories: status, diff, log, commit, branch and more

MOmodelcontextprotocol/servers92k200 new stars in the last 7 days

Featured

headroom

Compress tool outputs, logs and files, cutting tokens by 20%-95% without changing answers.

HEheadroomlabs-ai/headroom81k538 new stars in the last 7 days

Featured

Codebase Memory

Index a codebase into a persistent knowledge graph and query its structure with far fewer tokens.

DEDeusData/codebase-memory-mcp49k309 new stars in the last 7 days

Featured

GitHub

Manage repos, issues and PRs, analyze code and CI/CD workflows using natural language.

GIgithub/github-mcp-server35k181 new stars in the last 7 days

Featured

serena

Retrieve code semantically, edit, refactor and debug at the symbol level.

ORoraios/serena32k209 new stars in the last 7 days

Compiler Explorer

Compile code with thousands of compilers, inspect the assembly, and share godbolt.org links

COcompiler-explorer/compiler-explorer19k7 new stars in the last 7 days