TraceWeave

v2.1.2
io.github.gokeshenzhen/traceweave Checked 5 hours ago Published 8 days ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

explain_property

Explain located SVA text/source as a bounded typed graph of matches, obligations, clocks, locals and recursion. One target or ordered items with unique IDs; units share declarations/macros/parameters/clocks within explicit scopes. Select target/instance_path/line; definitions/fragments imply no active assert. Optional pyslang in the Source Graph interpreter; isolated worker, no simulation/proof/LLM or wave lock. Read syntax_status, semantic_status, context_status and gaps. run_anchor links exact get_sim_paths/get_formal_paths discovery; otherwise mode unknown. Formal discovery proves neither e…

ParameterTypeDescription
argumentsarray
compile_log
design_handle
detailstring
idstring
include_check_planbooleanPrepare a bounded, process-scoped static plan for verify_window; does not read waveforms.
instance_path
items
line
max_depthinteger
max_nodesinteger
max_output_bytesinteger
modestring
role_context
run_anchorExact discovered log, waveform, selected case or formal project; never last-tool inference.
simulatorstring
source_file
target
text
timeout_secnumber
top_hint
unit
unitsarray

prepare_design_context

Capture compile inputs, source content identities and include dependencies from VCS, Xcelium or Verilator logs. Returns an explicit process-scoped design_handle, coverage gaps, preparation costs and recovery identity. Does not build a hierarchy, run Slang or check/load a KDB. Input capture completeness is separate from include resolution and semantic coverage. Replay recovery_context as this tool's arguments to require the same compile/source identity after eviction or restart; identity mismatch publishes no handle. Driver/load/path, X-trace and all six hierarchy/source tools accept design_han…

ParameterTypeDescription
compile_log *string
backend_preferencestring
context_identity_sha256Expected compile/source identity when replaying a recovery_context. A mismatch rejects preparation before a new handle is published.
kdb_pathExplicit candidate, captured on first query; does not prove source association.
max_bytesinteger
max_filesinteger
max_include_depthinteger
max_referencesinteger
simulatorstring
supplementary_compile_logsarrayComplementary compile logs in compilation order.
timeout_secnumber
top_hint

get_sim_paths

Discover compile/sim logs and waveforms under verif_root. Omit case_name to list cases. Explicit sim_log/wave_file/compile_log override those paths; others are auto-discovered. sim_log anchors related wave/build logs. suggested_calls supplies parse_sim_log(log_path, simulator) when known.

ParameterTypeDescription
verif_root *stringAbsolute path to the project's verif/ directory, for example /path/to/project/verif
case_namestringOptional case name, for example case0 (matching make SV_CASE=case0)
compile_logstringExplicit compile/elaborate log, absolute or relative to verif_root; otherwise search case, parent top and sibling build/elab dirs.
sim_logstringExplicit sim log, absolute or relative to verif_root; anchors related wave/build logs.
wave_filestringExplicit FSDB/VCD/FST path, absolute or relative to verif_root; overrides discovery.

get_formal_paths

Discover local formal project directories, role-labelled logs, and exported VCD/FSDB files under a bounded root. JasperGold is the first discovery provider. This tool reports filesystem evidence only: it does not parse proof results or classify a waveform as a counterexample, witness, SST trace, or reachable trace.

ParameterTypeDescription
formal_root *stringAbsolute local root containing formal run artifacts.
formal_logstringOptional formal log, absolute or relative to formal_root.
formal_toolstringDiscovery provider to run; this is a filter, not proof of artifact origin.
project_dirstringOptional project directory, absolute or relative to formal_root.
wave_filestringOptional VCD/FSDB file, absolute or relative to formal_root.

parse_sim_log

Group runtime failures from VCS, Xcelium, or Verilator logs. Pass log_path and simulator, using get_sim_paths.suggested_calls. Includes first-group context. candidate_previous_logs excludes compile/elaboration logs with bounded sampling. Verilator compiler/host diagnostics are excluded; unknown time stays null.

ParameterTypeDescription
log_path *stringAbsolute sim log from get_sim_paths.sim_logs[].path; use log_path here, sim_log in discovery.
simulator *stringvcs / xcelium / verilator
detail_levelstringDetail level to return. Default: summary
max_events_per_groupintegerEvents per group in compact/full modes. Default: 3
max_groupsintegerMaximum number of error groups to return. Default: 20
native_time_unitstringVerified Verilator bare unit; explicit units win.

diff_sim_failure_results

Compare failure events: resolved, persistent, new, timing, X/Z, and convergence. For overwritten logs, capture parse_sim_log snapshots before rerunning, then use snapshot IDs or new_log_path with its previous snapshot.

ParameterTypeDescription
base_log_pathstringBaseline log; alternatively use snapshots or a captured same-path rerun.
base_snapshot_idstringBaseline log snapshot ID returned by parse_sim_log.
native_time_unitstringVerified Verilator bare unit; explicit units win.
new_log_pathstringNew log path; may be overwritten after baseline capture.
new_snapshot_idstringNew log snapshot ID returned by parse_sim_log.
simulatorstringvcs / xcelium / verilator / auto; session default.

get_error_context

Extract raw log text around a given error line. Typically used with first_line returned by parse_sim_log.

ParameterTypeDescription
line *integerCenter error line number
log_path *stringAbsolute path to the simulation log, for example irun.log
afterintegerNumber of lines after the target line. Default: 100
beforeintegerNumber of lines before the target line. Default: 100

search_signals

Search for signals in a waveform file (FSDB/VCD/FST) and return full hierarchical paths. Use this when the client knows a leaf signal name but not the full path. keyword accepts a single string OR a list of strings: pass a list to batch several lookups in one call (one result entry per keyword, in input order) instead of issuing consecutive single-keyword searches. Each result also carries `direction` (input/output/inout/implicit/...) and `var_type` (wire/reg/integer/real/parameter/memory/...), so callers can filter by port direction or language type within a scope by combining a hierarchical…

ParameterTypeDescription
keyword *Signal keyword (for example s_bits, clk, or data), or a list of keywords (max 16) to batch several lookups in one call — prefer the list form over consecutive single-keyword calls
wave_path *stringAbsolute path to the waveform file
max_resultsintegerMaximum number of matches to return. Default: 50

get_signal_at_time

Read a signal or evaluate an SV expression at one time. Pass formulas as {expr,bindings,types} or explicitly use typing=wave_bits. FSDB support depends on fsdb_runtime.enabled. Signals: paths, selections or {expr,bindings,types}; see input $defs for typing/arrays. Check expressions.coverage_status/gaps: partial/not_observed cannot exclude issues; X/Z is observed data. observations_truncated limits display only. error means failure; follow error_code/recovery before retrying. Example arguments: {"wave_path":"/absolute/path/to/TraceWeave/examples/expressions/demo.vcd","time_ps":5,"signal_path":{…

ParameterTypeDescription
signal_path *Full hierarchical path, for example top_tb.dut.s_bits. A bare bus name (no [msb:lsb]) is auto-completed when it resolves uniquely (resolved_from echoes the input); an unresolved name raises with a did…
time_ps *Query time. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit literal like '12.34ns'.
wave_path *string
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.

get_signal_transitions

Return signal or SV expression transitions over the strict closed time range [start_time_ps, end_time_ps] (capped at 1000 by default; truncated=true + hint mark a clipped result, transition_count is always the total found). FSDB support depends on fsdb_runtime.enabled. The last value-change strictly before the window is returned separately as predecessor and is never mixed into transitions. Signals: paths, selections or {expr,bindings,types}; see input $defs for typing/arrays. Check expressions.coverage_status/gaps: partial/not_observed cannot exclude issues; X/Z is observed data. observations…

ParameterTypeDescription
signal_path *
wave_path *string
end_time_ps-1 means through the end of simulation. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit literal like '12.34ns'.
max_transitionsintegerCap on returned transitions (earliest in range kept). Raise explicitly only for deliberate bulk extraction; prefer narrowing the time range.
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
start_time_psWindow start. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit literal like '12.34ns'.

get_signals_around_time

Return values and transitions for signals or SV expressions in a NARROW window around a target timestamp (typically the failure time). Designed for local causal-chain inspection; NOT for bulk trace extraction. For round-by-round or multi-cycle sampling use get_signals_by_cycle. Unit reminder: all times are picoseconds. If the sim log reports `Time: X ns`, set center_time_ps = X*1000 (example: 75,100 ns -> 75,100,000 ps). Typical window_ps: - Glitch inspection: 1,000 - 5,000 ps - One clock cycle: = clock_period_ps (NOT exposed by get_waveform_summary…

ParameterTypeDescription
center_time_ps *Center time in PICOSECONDS (not ns). Convert sim-log ns via *1000. Must be within the waveform duration reported by get_waveform_summary. Accepts an integer (ps), a cursor reference like '@div_3a7c',…
signal_paths *arrayList of full hierarchical signal paths. A bare bus name (no [msb:lsb]) is auto-completed when unique (see resolved_aliases); unresolved names get did_you_mean entries in signal_suggestions.
wave_path *string
extra_transitionsintegerExtra transitions to include before the time window. Default: 5. 0 means none.
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
return_modestringvalues_only drops transitions_in_window/pre_window_transitions from every signal, returning value_at_center + window_transition_count (+ transient annotation). Compact point-sample mode for multi-trac…
window_psintegerHalf-window in ps (center +/- window_ps). Default: 2000. Hard cap: MAX_WAVE_WINDOW_CYCLES clock cycles. For N-cycle sweeps prefer get_signals_by_cycle.

get_signals_by_cycle

Sample signals or SV expressions each cycle; dynamic indices are re-evaluated at every sample. Useful for state machines, pipelines, and round-by-round algorithm checks. Choose start_cycle OR start_time_ps. With end_time_ps, num_cycles limits the window's returned cycles. Use cycle_index_origin=window with start_time_ps for bounded local cycles; inspect local_coverage. At most 256 cycles; check capped and continue with the next start_cycle. sample_phase=before reads strictly before each edge; omit sample_offset_ps or set 0. Default after samples edge+1ps; sample_offset_ps must be >=0. Check re…

ParameterTypeDescription
clock_path *Full hierarchical clock path, for example top_tb.des_clk
signal_paths *arrayList of full hierarchical signal paths to sample. A bare bus name (no [msb:lsb]) is auto-completed when unique (see resolved_aliases); unresolved names get did_you_mean entries in signal_suggestions.
wave_path *stringAbsolute path to the waveform file
cycle_index_originstringDefault global preserves simulation-wide numbering. window requires start_time_ps, numbers from zero locally, and stops at the first clock gap or read budget.
edgestringSampling edge. Default: posedge
end_time_psInclusive window end. Optional num_cycles limits returned edges; capped=true means the whole window was not returned. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit literal li…
num_cyclesintegerMaximum cycles to return. Default: 16 without end_time_ps; otherwise all window edges, capped at 256.
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
sample_offset_psintegerOffset in ps: after defaults to 1; before requires 0 or omission. Negative offsets are unsupported; use sample_phase=before for accepted inputs.
sample_phasestringafter (default): edge plus offset. before: last value strictly before the physical edge, excluding all same-timestamp updates.
start_cycleintegerStarting cycle index (0-based). Default: 0. Mutually exclusive with start_time_ps.
start_time_psAlternative start axis: window start; snapped to the first clock edge at/after this time. Mutually exclusive with start_cycle. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit l…

get_waveform_summary

Return waveform format, duration, scale, top modules and a bounded signal sample. For FSDB, read metadata_query_mode, sample_signals_order and top_modules_complete; a sample never proves full-design coverage. FSDB support depends on fsdb_runtime.enabled. VCD first use reads/parses the entire file, including for this summary. Optional FST: see fst_backend/fst_reading capabilities and gaps.

ParameterTypeDescription
wave_path *string
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.

build_tb_hierarchy

Stream one compile/elaborate log plus optional complementary phase logs, scan source files, and cache the full testbench hierarchy server-side without retaining raw source bodies. For split VCS flows, prefer the source-compile log as compile_log and pass VHDL/source/elaboration companions in build order; later connectivity tools continue using that primary path. Returns a SLIM payload: project, stats, tree_skeleton (depth 2), interfaces, ambiguous_basenames, build_metrics, and hierarchy_handle. A configured timeout/source-byte guard returns build_status='blocked' plus a fixed blocker and no ha…

ParameterTypeDescription
compile_log *stringAbsolute path to the primary compile or elaborate log
simulatorstringvcs / xcelium / verilator / auto (default: auto)
supplementary_compile_logsarrayOptional ordered complementary compile/elaboration logs from the same simulator build; their order participates in the hierarchy and Source Graph identity

scan_structural_risks

Scan compiled RTL/TB for structural risks. fast runs lexical rules only. auto (default) also tries existing/cached KDBs through Verdi NPI, then reuses compatible source semantic results for missing categories without a cold Slang build. deep also allows bounded Slang supplementation. NPI may request a license locally or through configured LSF; scans never build a KDB. Native checks cover elaborated input-port bindings and explicitly requested bit-level multiple_driver / undriven_signal checks; Slang also supports both driver categories. Driver facts describe the observed static model, not runt…

ParameterTypeDescription
compile_log *stringAbsolute path to a compile or elaborate log
analysis_modestring
categoriesarrayOptional list of risk categories to scan. If omitted, all categories are scanned.
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
scan_scopestringScan scope version. Currently only scope1 is supported.
semantic_categoriesarrayReplaces defaults: constant_connection, open_input, constant_comparison. Explicit multiple_driver / undriven_signal checks use bit-level static driver inventories through NPI or Slang. Request propaga…
semantic_continuationstringProcess-local token from semantic.continuation. Resume the same native inventory with unchanged compile log, top, scope and categories. Work budgets may change. Tokens expire after 10 minutes and are…
semantic_max_ast_nodesinteger
semantic_max_factsinteger
semantic_max_instancesinteger
semantic_max_propagation_bitsinteger
semantic_max_propagation_stepsinteger
semantic_max_rss_mibinteger
semantic_scopestringExact elaborated instance path and its descendants; omitted scans all elaborated tops.
semantic_timeout_secnumber
simulatorstringvcs / xcelium / verilator / auto (default: auto)
top_hintstringSelect an elaborated top when compile metadata lacks a unique top; verified against compile evidence and KDB.

analyze_failures

Inspect one failure group with log context and a waveform snapshot at its reliable timestamp.

ParameterTypeDescription
log_path *stringSimulation log path, for example irun.log
signal_paths *arraySignal paths to inspect. Clients should confirm full paths with search_signals after inferring candidates from RTL or log output.
simulator *stringvcs / xcelium / verilator
wave_path *stringWaveform file path, for example top_tb.fsdb
extra_transitionsintegerExtra transitions to include before the window for each signal. Default: 5
group_indexintegerFailure group index to analyze. Default: 0
native_time_unitstringVerified Verilator bare unit; explicit units win.
window_psintegerWaveform window around each failure time in ps. Default: 2000

analyze_failure_event

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Start from a single normalized failure_event and combine waveform, hierarchy, and source information to return recommended instances, signals, and source files. KDB-only log consumers require an explicit simulator.

ParameterTypeDescription
failure_event *objectNormalized failure_event from parse_sim_log for the same log
log_path *string
simulator *string
wave_path *string
backend_preferencestring
compile_logstring
design_handlestringPrepared design for bounded source correlation; no full hierarchy required.
kdb_pathstring
native_time_unitstringVerified Verilator bare unit; explicit units win.
retry_npiboolean
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

recommend_failure_debug_next_steps

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Prioritize a failure using log, waveform, and bounded source correlation; recommend signals, instances, and failure class. Also suggests a diff_sim_failure_results call to use on the next run. KDB-only log consumers require an explicit simulator.

ParameterTypeDescription
log_path *string
simulator *string
wave_path *string
backend_preferencestring
compile_logstring
design_handlestringPrepared design for bounded source correlation; no full hierarchy required.
kdb_pathstring
native_time_unitstringVerified Verilator bare unit; explicit units win.
retry_npiboolean
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

get_diagnostic_snapshot

Cold-start accelerator that aggregates cached tool results into a single summary view. It never runs analysis sub-steps; an optional legacy Xcelium KDB hint reads compile metadata. Returns availability status, compact summaries, and suggested calls for missing steps. The result cache is process-global and survives across cases, so at the start of a new session pass your target case (verif_root and/or case_dir): the snapshot validates the cache against it and reports a clean cold start if the cache belongs to a different case. Prepared design_context summaries are observed metadata, not revalid…

ParameterTypeDescription
case_dirstringAbsolute path to the specific case directory you are debugging. When given, the snapshot confirms the cached get_sim_paths is for this case; if it is for a different case, the snapshot degrades to a c…
design_handlestringExplicit prepared context for this cache-only summary.
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
verif_rootstringAbsolute path to the project's verif/ directory. Builds a suggested_call when get_sim_paths has not run, and validates that a cached get_sim_paths result belongs to this project (mismatch ⇒ honest c…

explain_signal_driver

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Trace a signal to RTL drivers/file:line; recursive crosses instances. Route: trusted NPI -> bounded Source Graph -> Static. Read actual_backend, source_info_origin, traversal and claim_semantics: partial facts are not exhaustive; uniqueness requires exclusive_driver_proved, absence requires negative_claim_allowed. multiple_driver does not prove value conflict. testbench_driven with cross_check.conflict identifies a consumer alias; investigate TB/BFM. Default traceweave.driver.compact.v1 is lossless: statement_semantics_ref…

ParameterTypeDescription
signal_path *string
wave_path *string
allow_bounded_bootstrapbooleanIf true and full hierarchy is unavailable, prove a hard-bounded single-endpoint Source Graph context. Only positive facts may be returned; no-match remains inconclusive and never triggers a whole-sour…
backend_preferencestring
compile_contextobject
compile_logstring
design_handlestring
include_dependenciesbooleanOpt in to one-hop data/control/clock/reset candidates with exact wave selections and gaps (max 32). source is omitted when identical to wave. No values or active-branch verdict. Choose a window/phase,…
kdb_pathstring
max_depthintegerMaximum recursive depth when recursive=true
output_formatstringcompact (default) delivers all retained evidence in a self-contained traceweave.driver.compact.v1 response with typed evidence_tables. Refs are response-local table indices. full preserves the origina…
recursivebooleanWhether to trace the upstream driver chain recursively
retry_npiboolean
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

find_signal_loads

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Find consuming ports, assignment RHS and sensitivity lists. Route: trusted NPI -> bounded Source Graph -> Static. Read actual_backend, source_info_origin and claim_semantics. Returned positive facts need not cover all loads: require exhaustive_search for completeness and negative_claim_allowed for absence. enumeration reports returned/output limits, truncation, search coverage and continuation support; at most 256 loads, no promised continuation. Source Graph validates selected bits; Static normalizes numeric selects. A com…

ParameterTypeDescription
signal_path *string
allow_bounded_bootstrapbooleanIf true and full hierarchy is unavailable, prove a hard-bounded single-endpoint Source Graph context. Only positive facts may be returned; no-match remains inconclusive and never triggers a whole-sour…
backend_preferencestring
compile_logstring
design_handlestring
include_exprbooleanInclude the surrounding expression for each load.
kdb_pathstring
kind_filterarrayRestrict result to a subset of load kinds.
max_depthintegerReserved for future transitive walks. Static backend always behaves as 1; NPI backend's fan-out walk is depth-bounded internally regardless of this argument.
retry_npiboolean
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring
wave_pathstringOptional waveform for an evidence-checked wave/design root binding.

trace_signal_path

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Find structural connectivity between signals through trusted NPI, bounded dual-endpoint Source Graph, then Static. A found path is positive evidence, not exhaustive enumeration or temporal driver direction. Absence requires negative_claim_allowed; incomplete/unsupported cannot prove disconnection. Static may report static_backend_no_path_api. Read actual_backend, coverage and claim_semantics; use driver/load queries or cite verified source inferences at unresolved boundaries. Do not repeat an unchanged unsupported call.

ParameterTypeDescription
from_signal *string
to_signal *string
backend_preferencestring
compile_logstring
design_handlestring
expand_assignsbooleanExpose supported assignment transitions. NPI may show assign cells; Source Graph shows only real IR/source evidence and never invents an NPI cell identity. This changes presentation, not the connectiv…
kdb_pathstring
retry_npiboolean
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring
wave_pathstringOptional waveform for an evidence-checked wave/design root binding.

build_kdb

Auto-build a Verdi KDB from a parsed compile log using vericom + elabcom. Preserves recorded compilation-unit order and parent include context, with bounded log-anchored path recovery for nested filelists when project variables are absent or stale. Does not execute project setup scripts; incomplete replay returns a precheck failure. Use this when the simulator is Xcelium (xrun) and the NPI backend reports no KDB, or to force-refresh a stale cached KDB. Output is cached under TRACEWEAVE_CACHE_DIR (default ~/.cache/traceweave/kdb/<hash>/); cache hits reuse the previous KDB without re-invoking Ve…

ParameterTypeDescription
compile_log *stringAbsolute path to the compile/elaborate log to drive the build from.
force_rebuildbooleanRebuild even if the cache key matches an existing KDB. Default: false.
simulatorstringvcs / xcelium / verilator / auto; log auto-detection.
top_hintstringOverride the top module. Defaults to the first non-recorder top in compile_result.

trace_x_source

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Trace X/Z upstream from a real signal. snapshot follows same-time propagation; history requires history_start_ps and returns observed intervals, sampling/hold evidence and partial frontiers. Native/backend/artifact changes discard the chain and restart at the original target/window. Connectivity runs outside wave locks. Read actual_backend, trace_restarted and node claim_semantics: a positive edge does not prove exclusive drive or global coverage. Keep TB-driver cross-checks. Same-edge predecessors retain scheduling gaps; a…

ParameterTypeDescription
signal_path *string
time_ps *Trace start time. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit literal like '12.34ns'.
wave_path *string
backend_preferencestring
compile_contextobject
compile_logstring
design_handlestringExplicit independent context; replaces compile_log and legacy hierarchy prerequisite.
history_start_psRequired explicit history window start in history mode. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit literal like '12.34ns'.
kdb_pathstring
max_depthintegerMaximum trace depth. Default: 20
max_eventsinteger
max_nodesinteger
max_read_bytesintegerCumulative estimated decoded event byte budget in history mode.
modestring
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
phasestringHistory observation phase; before excludes events exactly at time_ps.
retry_npiboolean
signal_bitsarrayHistory-only ordered selection in declared coordinates. signal_path remains the exact dump declaration.
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

get_tb_subtree

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Return root plus depth levels; max_nodes includes root. New routes return schema_version=2; legacy handle shape is retained. bounded count is a lower bound at unvisited frontiers; exact traverses undisplayed descendants within work/time budgets. Raw NPI locations with *_location_unbound gaps are unverified locators. Inspect coverage/count limits; source fallback uses a bounded semantic artifact.

ParameterTypeDescription
backend_preferencestring
compile_logstring
count_modestringdesign_handle only; exact counting may traverse undisplayed descendants.
depthinteger-1 = unbounded; otherwise number of levels to include
design_handlestring
handlestringhierarchy_handle from build_tb_hierarchy
kdb_pathstring
max_nodesintegerhard cap on emitted nodes
retry_npiboolean
rootstringdotted instance path (e.g. 'top.u_cpu'); empty = top module
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

lookup_tb_files

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. AND compiled-file filters; at least one required. Name/path-only filters use metadata without KDB/backend work; semantic fields stay null. has_module/contains_uvm/file_type need semantic evidence: unknown is not a negative match. Read ownership_basis, unknown_filter_files, semantic_work_scope and separate declaration/import/UVM coverage. bounded stops at an omitted match; exact inspects all candidates within budgets. New schema_version=2; legacy handle shape remains.

ParameterTypeDescription
backend_preferencestring
basenamestringexact basename match
compile_logstring
contains_uvmbooleanproved UVM usage; unknown semantic coverage cannot prove false
count_modestringdesign_handle only; exact counting may inspect all matching compile members.
design_handlestring
file_typestringclassification from the selected source provider, not compiler file-type hints
handlestring
has_modulestringfile defines this module
kdb_pathstring
limitinteger
name_containsstring
path_containsstring
retry_npiboolean
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

find_tb_instance

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Find by exact path OR module, never both. Exact paths do not enumerate children; module searches are bounded. exact count requests complete counting within budgets. New schema_version=2 carries semantic identities, separate instance/definition locations, count and coverage limits; legacy handle shape remains. Raw *_location_unbound paths are unverified source locators.

ParameterTypeDescription
backend_preferencestring
compile_logstring
count_modestringdesign_handle only; output limit is separate from work limits.
design_handlestring
handlestring
kdb_pathstring
limitinteger
modulestringmodule name; returns all instances
pathstringexact dotted instance path
retry_npiboolean
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

get_tb_file_detail

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Read module/class/interface declarations for an exact compiled path or alias. Nonmembers return basename suggestions without backend work. New schema_version=2 reports ownership_basis, semantic_work_scope, symbol_inventory_complete and semantic_gaps; legacy handle shape remains. Budgeted native namespace lookup may omit uninstantiated declarations/imports/variables; unprocessed files and unelaborated bodies cannot prove absence.

ParameterTypeDescription
path *string
backend_preferencestring
compile_logstring
design_handlestring
handlestring
kdb_pathstring
retry_npiboolean
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

get_tb_class_hierarchy

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Static inheritance, not runtime UVM topology. root_class accepts symbol ID, qualified name or unambiguous short name. New schema_version=2; legacy shape remains. Derived discovery may need budgeted global inventory. total counts rendered nodes; class_inventory_* describes declaration coverage. External reference bases are not recovered declarations. declaration bases carry observed base_value_parameters/status/gaps; specialization bases carry actual type bindings. Generic defaults are not derived actuals; Slang canonical ID…

ParameterTypeDescription
backend_preferencestring
compile_logstring
depthinteger
design_handlestring
handlestring
kdb_pathstring
max_nodesintegerdesign_handle only; output limit is separate from inventory work.
retry_npiboolean
root_classstring
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

dump_tb_section

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Export one named section. compile_result/include_tree/filelist_tree use metadata without backend work. Semantic sections may traverse globally within work/time budgets; max_items limits display only. component_tree_full requests exact descendant counting. export_complete=false remains partial even with exact counts. Class sections describe static inheritance; declarations retain coverage gaps. New schema_version=2; legacy handle shape remains.

ParameterTypeDescription
section *string
backend_preferencestring
compile_logstring
design_handlestring
handlestring
kdb_pathstring
max_itemsintegerdesign_handle only; hard output cap, not a guarantee of complete export.
retry_npiboolean
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring

cursor_set

Register a named time anchor (in ps) for the current session. Other tools that take a time may reference '@<name>' instead of copying ps integers across calls. Cursors are process-scoped and dropped on server restart. Names must match [A-Za-z_][A-Za-z0-9_-]*.

ParameterTypeDescription
name *stringCursor name.
time_ps *integerAnchor time in ps. Must be >= 0.
notestringOptional human-readable note.

cursor_list

List all cursors registered in the current session, ordered by time.

cursor_delete

Delete a named cursor. Returns whether the cursor existed.

ParameterTypeDescription
name *stringCursor name to delete.

diff_first_divergence

Compare signals or independently bound SV expressions for the first observed known-value difference, with explicit coverage and earliest_difference_proven. X/Z, missing values, truncation and time precision gaps never prove equality. Works across two waveforms (passing run vs failing run) or within one waveform between two signals (expected vs actual). Auto-registers a cursor at the divergence time so downstream calls can reference it by name. Reports actual event-page capability and read volume in reading. When present, first_divergence_time_fs is exact; the integer-ps cursor rounds up and ma…

trace_divergence

Use real signal paths as roots; supported RTL expressions are extracted internally. Verify a waveform difference and backtrace its active data/control dependencies on both sides within explicit time/work limits. Uses the normal trusted NPI, Source Graph, Static route. Each side independently accepts a design_handle from prepare_design_context, or its exact legacy compile context with a current build_tb_hierarchy result. A design_handle may omit compile_log and cannot be combined with legacy identity tokens. Explicit signal/scope mappings are required across different designs. Reports evidence,…

ParameterTypeDescription
side_a *
side_b *
comparison
cursor_name
cursor_note
end_time_ps
limits
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
reference_sidestring
scope_pairsarray
signal_pairsarray
start_time_ps

period

Estimate a 1-bit signal or SV expression's dominant period inside a window and flag the first beat that deviates from it. Use for rhythm/throughput questions an LLM cannot eyeball from a transition dump: stalled clocks, dropped burst beats, backpressure bubbles, irregular strobes. The dominant period is the median edge-to-edge interval; the first off-beat is auto-registered as a cursor. Reads existing waveforms only — does NOT rerun simulation. Signals: paths, selections or {expr,bindings,types}; see input $defs for typing/arrays. Check expressions.coverage_status/gaps: partial/not_observed…

ParameterTypeDescription
signal *Full hierarchical signal path.
wave_path *stringWaveform (FSDB or VCD).
cursor_namestringOptional explicit cursor name for the first off-beat. Defaults to beat_<sha8>.
cursor_notestringOptional note attached to the registered cursor.
edgestringEdge to count. 'any' for multi-bit/strobe signals. Default posedge.
end_time_psWindow end. -1 means end of simulation. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit literal like '12.34ns'.
start_time_psWindow start. Default 0. Accepts an integer (ps), a cursor reference like '@div_3a7c', or a unit literal like '12.34ns'.
tolerance_fracnumberFraction of the period a beat may deviate before counting as an off-beat. Default 0.05 (5%).

suggest_handshakes

Scan a waveform and propose ready-to-use inspect_handshake bundles: it pairs *valid/*ready signals by scope and stem, finds the clock, and groups the channel payload buses (the signals that must hold steady during a stall). Use this BEFORE inspect_handshake so you don't have to hand-assemble {clock, valid, ready, payload} signal paths. Covers AXI *valid/*ready, generic valid/ready, and req/ack. It does NOT synthesise an AHB 'valid' (there is no literal valid signal — it is htrans != IDLE); use suggest_protocol_bundles for AHB/APB. Port _i/_o suffixes retain actual paths and directions; ambig…

ParameterTypeDescription
wave_path *stringWaveform (FSDB or VCD).
max_candidatesintegerMax bundles to return. Default 8.
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
scopestringOptional hierarchy prefix to restrict candidates (e.g. 'tb_top.u_dut').

suggest_protocol_bundles

Scan a waveform for protocol-specific AHB/APB bundles. AHB candidates return ready-to-use inspect_handshake args with valid_htrans + ready + payload (address-phase control), plus hwrite/write_data (HWDATA, for the write data-phase hold check) ONLY on initiator-side interfaces (a responder's HWDATA is an interconnect-mux output that glitches at the clock edge, so the check is withheld there to stay zero-FP), because AHB has no literal valid signal. APB candidates return psel/penable/pready facts and loudly report that inspect_handshake still needs a derived valid signal for psel && penable. Dir…

ParameterTypeDescription
protocol *stringProtocol bundle family to discover.
wave_path *stringWaveform (FSDB or VCD).
max_candidatesintegerMax bundles to return. Default 8.
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
scopestringOptional hierarchy prefix to restrict candidates (e.g. 'tb_top.u_dut').

sweep_handshakes

Samples strictly before each selected physical clock edge (sampling_phase=before). Bounded handshake anomaly sweep: discover valid/ready interface and every AHB interface, then inspect each over the window in one call, returning a comparative fact table (per-interface stalls, deadlock signature ended_in_stall, x-while-valid, payload-hold, write-data-hold, premature valid deassertion, backpressure) ordered by a transparent mechanical key. Use for timeout/hang when the responsible interface is unknown. Interpret flagged_count with coverage_status: zero_coverage means no protocol interfaces were…

ParameterTypeDescription
wave_path *stringWaveform (FSDB or VCD).
edgestringClock edge to sample on. Default posedge.
end_time_psWindow end. -1 = end of trace. Accepts ps int, '@cursor', or unit literal.
max_interfacesintegerInterface cap (default 64). Increase for a cap-only gap; discovery/transition gaps need scope/window changes.
max_wait_cyclesintegerStall length (cycles) above which a stall becomes a long_stall finding. Default 16.
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
scopestringOptional hierarchy prefix to limit the sweep (e.g. 'tb_top.u_dut'). If the scope contains no discovered interfaces the result reports coverage_status=zero_coverage; retry unscoped or with a parent/int…
start_time_psWindow start (ps int, '@cursor', or unit literal like '12.3ns'). Default 0.

verify_window

Check existing waveforms. Template modes: always, never, eventually, implication, numeric sequence. Terms {signal,op,value} or typed {expr,...} combine with AND. Implication checks every edge by default; response bounds select exact delays. Hold checks need overlap=false, within_cycles>=1. Inspect holds, vacuous, unknown and coverage together; partial holds excludes nothing. Driver links are evidence. property: use an explain_property include_check_plan handle plus failure event/time or log_path. Automatically locate history/attempts; scope/bindings resolve names. Read status, coverage and gap…

reconstruct_transactions

Reconstruct transactions using signal paths or SV expressions for channel fields. Samples acceptance and fields strictly before each selected physical clock edge (sampling_phase=before); all changes at that timestamp are excluded. Reconstruct id-correlated request/response transactions from two handshake channels: walk every clock edge, match accepted request beats to completion beats by id, and return per-transaction latency plus aggregate facts (outstanding curve incl. per-id peak, ordering, window-local unmatched endpoints). Inspect coverage_status and analysis: state/read budgets return a…

inspect_handshake

Inspect a handshake with signal paths or SV expressions for valid, ready and payload; clocks/control must have the required bit width. Samples strictly before each selected physical clock edge (sampling_phase=before); all changes at that timestamp are excluded. Classify a clocked valid/ready handshake cycle-by-cycle and report protocol facts that leave no value pattern in scoreboard logs: stalls (valid high, ready low), the longest/over-threshold stall windows, backpressure imbalance (ready high, valid low), and — when payload signals are given — payload-hold violations (a payload that cha…

inspect_tlul

Inspect TL-UL fields mapped to signal paths, fixed selections or SV expressions. Uses strict before-edge sampling for A/D fields and nested checks (sampling_phase=before). Inspect explicitly mapped TL-UL A/D fields with the existing handshake and transaction engines. Missing mappings return mapping_required; packed widths are never guessed. Reports accepted fields, stalls, source pairing and latency, reset/unknown history, carry-in and tail boundaries. Read checks and gaps; no integrity or full compliance claim. Signals: paths, selections or {expr,bindings,types}; see input $defs for typing/ar…

ParameterTypeDescription
clock *
wave_path *string
edgestring
end_time_ps
fieldsobject
max_cyclesinteger
max_transactionsintegerDisplay cap only; every admitted sample contributes to analysis. Read analysis.stop_reason separately from display_status.
max_wait_cyclesinteger
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
reset
reset_active_lowboolean
start_time_ps

resolve_packed_fields

compile_log or kdb_path+top_hint: NPI, then automatic source fallback. Resolve packed members using actual compiled type membership, instance specialization, bit identity and exact dump range. Unsupported NPI layouts may use bounded Source Graph. mapping_required means identity/type/range could not be proved. Returned selections are a compile observation: re-resolve after input changes; no waveform/source version association is inferred.

ParameterTypeDescription
fields *array
signal_path *stringExact dump declaration path.
source_signal *stringExact whole aggregate in the compiled hierarchy.
wave_path *string
backend_preferencestring
compile_logstring
design_handlestring
kdb_pathstring
output_formatstringfull: original result. compact: lossless traceweave.compact.v1 {result,references}; refs are response-local JSON pointers, not cursors/handles. Same coverage/display limits.
retry_npiboolean
simulatorstring
supplementary_compile_logsarray
timeout_secnumber
top_hintstring