TraceWeaveのロゴ

TraceWeave

コミュニティ
gokeshenzhen

Open-source, evidence-driven MCP server for RTL simulation debugging: correlate VCS/Xcelium logs, VCD/FSDB waveforms, SystemVerilog/UVM source, hierarchy, and connectivity to trace failures to root cause.

公開者gokeshenzhen
リポジトリTraceWeave
言語Python
フォーク
29
スター
114
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    TraceWeaveは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 利用可能なツール(0個)

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースプロジェクトの注目度

    リンク先のリポジトリには114件のスターと29件のフォークがあります。

🐙 TraceWeave

TraceWeave is an MCP server for RTL / SoC debugging. It connects compile records, simulation logs, VCD/FSDB 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

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/ZInspect the surrounding waveform and follow upstream drivers to trace unknown-value propagation
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 simulation logs and VCD / FSDB waveforms. Exported formal waveforms can also be queried; automatic artifact discovery currently supports JasperGold.

Signal tracing (driver, load, and connectivity path queries) follows Verdi NPI → Source Graph → basic static analysis (Legacy Static) by default. It first queries the elaborated KDB; when NPI is unavailable or cannot provide a trustworthy result, it tries Source Graph without a commercial license, then falls back to basic static analysis where supported.

Capabilities for large designs, with selected examples of validated scale:

  • Hierarchy and source browsing on demand: the server builds and retains hierarchy and file indexes, then returns local results by instance, subtree, or file to keep large SoC queries manageable in the assistant's context. Hierarchy construction and local queries have been verified on a synthetic design with 50,500 logical instances; the initial build still scans compilation records and sources.
  • Bulk handshake checks: sweep_handshakes discovers AHB / valid-ready interfaces and checks stalls, payload stability, and premature valid/HTRANS deassertion. A recorded design with 78,817 total signals and a 2.59 ms waveform yielded 49 candidate interfaces involving 262 clock/protocol signals; 35 interfaces were checked in about 4.65 minutes, with 14 skipped and partial coverage. Runtime and coverage depend on the waveform, interface types, and resource limits.
  • GiB-scale log parsing: parse_sim_log has been verified on a 1 GiB synthetic log with 2,097,152 lines, finding all four errors at the beginning, middle, and end.

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, or Source Graph without a commercial license

Repository Installation

bash
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. NPI still requires the appropriate EDA runtime and license from your site.

For an existing installation, start with a read-only check:

bash
bash scripts/install.sh --check

PyPI Installation

bash
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.

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[]

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:

bash
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

Once connected, try a request like this, replacing the path with your project directory:

Use TraceWeave to investigate the simulation failure in my_case under /path/to/verif. Start with the logs, design structure, and interface handshakes, then trace suspicious signals. Include timestamps, signals, and source references in your findings.

You can also start with a specific question:

Compare tb.dut.result in these two waveforms and trace the logic producing the difference on each side.

Use deep mode to scan the design described by this compile log for suspicious ties, unconnected inputs, and constant comparisons.

The assistant's default investigation follows these steps:

  1. Find the run's artifacts: locate compile logs, simulation logs, and waveforms.
  2. Establish design context: build the hierarchy and scan structural risks in parallel using the same compile log.
  3. Narrow the investigation: parse failures and scan handshakes for failed runs with a waveform.
  4. Trace and verify: inspect signals, drivers, and consumers, then test hypotheses with window or cycle checks.
  5. Compare after a fix: check how failure records and waveforms change in the next run.

For a first connection check, ask the assistant to call get_sim_paths and confirm that actual MCP tool calls run. See the debug workflow for the full procedure.

Custom Runtime Error Formats

parse_sim_log already recognizes standard UVM_ERROR / UVM_FATAL messages and VCS / Xcelium assertion failures, with a generic ERROR fallback. For project-specific checker, scoreboard, or $display output, add Python regular expressions to custom_patterns.yaml. Custom messages do not need to contain UVM_ERROR or even ERROR; no Python changes are required.

If your messages share a label but the text after it varies, matching that label is enough:

text
MY_CHECK_FAIL @ 12.5 ns expected=0x12 actual=0x34
MY_CHECK_FAIL @ 20 ns timeout waiting for response

Replace the default patterns: [] with the following, or append the rule to your existing patterns list:

yaml
patterns:
  - name: my_checker
    severity: ERROR
    regex: '^MY_CHECK_FAIL'

^ means the start of the line; everything after the label may vary, with no extra regex needed. If a timestamp or other text precedes the label, use regex: 'MY_CHECK_FAIL' to match it anywhere in the line.

  • name identifies the failure group. severity defaults to ERROR; FATAL and WARNING are also supported. Matched custom warnings are included in runtime failure counts. description is for maintainers.
  • regex matches one log line at a time. Use YAML single quotes to preserve backslashes. Built-in assertion and UVM parsing runs first, followed by custom rules in list order (first match wins), then the generic ERROR fallback. Recognized compile / elaboration diagnostics remain excluded.

The expected=0x12 actual=0x34 format above is already recognized automatically, so the simple label rule is enough and no named captures are needed. Suppose your log uses its own field names instead:

text
MY_CHECK_FAIL @ 12.5 ns want=0x12 have=0x34

regex: '^MY_CHECK_FAIL' still recognizes the error and preserves the full message. To also extract want and have as the expected and actual values, replace the regex in the rule above with:

yaml
regex: '^MY_CHECK_FAIL.*want=(?P<expected>\S+)\s+have=(?P<actual>\S+)'

Repository installations use the root custom_patterns.yaml by default. To keep project rules elsewhere, or when using the PyPI installation, save the YAML above in your own file and pass its absolute path to the MCP server process:

bash
export TRACEWEAVE_CUSTOM_PATTERNS_FILE="/absolute/path/to/custom_patterns.yaml"

This selects that file instead of the default custom rules; built-in formats remain active. The MCP client must inherit or explicitly forward the variable. Restart or reconnect the server after changing it, then parse the log again. Edits to the selected YAML are loaded on the next parse_sim_log call.

Tool Quick Reference

Usually, you describe the debugging goal and let the assistant select the tools. This table lists every tool by purpose; MCP tool definitions provide the parameters.

FAQ

Can I use TraceWeave without a commercial license?

Log analysis, VCD queries, static structural scanning, and Source Graph do not need a commercial license. Direct value and transition queries on existing waveforms do not need an NPI license: VCD uses the built-in parser, while FSDB uses local Verdi FSDB Reader libraries and the wrapper. Verdi NPI signal tracing and KDB builds require the corresponding EDA environment and license.

How should I judge signal-tracing accuracy?

NPI uses an elaborated KDB matching the current design; Source Graph builds a semantic connectivity graph from source. With complete compilation context, supported target semantics, and complete query coverage, exact resolution, and no truncation, the results can be treated as exact structural connectivity facts within the current query scope for driver, load, and connectivity path analysis.

Can I run static structural scans without simulation results?

Yes. scan_structural_risks performs static source analysis without running a simulation or reading simulation run logs or VCD / FSDB waveforms. The current interface requires a compile/elaboration log (compile_log) and access to the corresponding sources and include files, so it can be used after compilation/elaboration, before running the simulation.

How do I choose auto or deep for static structural scanning?

The default auto mode runs source-text checks and reuses compatible semantic results already available. Ask the assistant to use deep when you need a new semantic scan for constant connections, open inputs, and similar facts. The analysis_mode parameter applies to each call; no client configuration change is needed. Findings are leads to investigate: legitimate tie-offs and protocol constants may also appear.

Does a scan with no findings mean the design is correct?

Conclusions depend on actual coverage. Missing signals, resource limits, or unsupported structures can limit analysis. Zero findings with zero or partial coverage do not establish that a design is free of problems. Tools report coverage and truncation so the assistant can decide whether to narrow the scope and investigate further.

Can I inspect formal waveforms?

You can query exported VCD / FSDB files and automatically discover JasperGold artifacts. Property results, trace classification, and reachability semantics must come from the formal tool or the user.

Where is design data processed?

File parsing and EDA queries run locally or on the configured LSF compute nodes. Returned debugging evidence enters your AI client's context. TraceWeave usage telemetry is off by default and writes only to local files 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
Complete environment configuration and advanced settingsConfiguration reference
Reporting a problem or suggesting a featureGitHub Issues

Before contributing, read AGENTS.md. With test dependencies installed, run python3.11 -m pytest from the repository root.

TraceWeave is available under the MIT License.

WeChat

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

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "gokeshenzhen-traceweave": {
      "command": "",
      "args": []
    }
  }
}

TraceWeaveのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度TraceWeaveに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」→「詳細設定」→「Model Context Protocol」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「Model Context Protocol」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

TraceWeaveをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. TraceWeaveのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタのステータスが「準備完了」のままか確認するには、画面を更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "gokeshenzhen-traceweave": {
      "command": "npx",
      "args": [
        "-y",
        "TraceWeave"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてTraceWeaveのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. TraceWeaveのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
TraceWeaveを使ってこのタスクを手伝ってもらえますか?
TraceWeave
はい、読みました。
TraceWeaveで調べた結果をお伝えします。

よくある質問

TraceWeave MCPサーバーは何に使いますか?

TraceWeaveは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでは、複数のAIモデルでTraceWeave MCPを利用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでTraceWeaveを利用できます。

TypingMindでTraceWeave MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けのトップクラスのフロントエンドです。TraceWeaveを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

TraceWeave MCPをTypingMindに接続するにはどうすればよいですか?

TraceWeaveはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでTraceWeave MCPのどのようなツールを利用できますか?

TraceWeaveはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

TraceWeave MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。TraceWeaveで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇