Skip to main content
Glama

watch_signal

Automatically stops simulation when a RTL signal matches a specified condition, enabling efficient debugging without manual probing.

Instructions

Set a watchpoint to stop simulation when a signal matches a condition.

The simulation will automatically stop at the exact clock edge where the condition becomes true. Much more efficient than manual probing.

Args: signal: Full hierarchical signal path (e.g. "top.dut.r_state[3:0]"). op: Comparison operator ("==", "!=", ">", "<", ">=", "<="). value: Target value in Verilog format (e.g. "8'h10", "4'b1010").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signalYes
opNo==
valueNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The watch_signal function executes the tool logic by setting a watchpoint via the bridge.
    async def watch_signal(signal: str, op: str = "==", value: str = "") -> str:
        """Set a watchpoint to stop simulation when a signal matches a condition.
    
        The simulation will automatically stop at the exact clock edge where
        the condition becomes true. Much more efficient than manual probing.
    
        Args:
            signal: Full hierarchical signal path (e.g. "top.dut.r_state[3:0]").
            op: Comparison operator ("==", "!=", ">", "<", ">=", "<=").
            value: Target value in Verilog format (e.g. "8'h10", "4'b1010").
        """
        bridge = _get_bridge()
        result = await bridge.execute(f"__WATCH__ {signal} {op} {value}")
        return f"Watchpoint set: {result}"
  • The watch_signal tool is registered using the @mcp.tool() decorator.
    @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hslee-cmyk/xcelium-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server