Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Digital Synthesize

digital_synthesize

Synthesize Verilog into a gate-level netlist with Yosys, then report cell counts by type, wire count, longest combinational path, and unit-gate area estimate for design analysis.

Instructions

Synthesise Verilog with Yosys to a generic gate-level netlist and report what came out: cell counts by type, wires, the longest combinational path in gate levels (Yosys ltp, flip-flops cut), and a unit-gate area estimate (a toolkit convention: NOT/AND/OR/NAND/NOR 1, XOR/XNOR 2, MUX 3, flip-flop 5; see data.area_model; not silicon area). Give Verilog as text in 'source' or as file paths in 'files' (.v/.sv, up to 20, 1 MB in all) and the name of the top module. 'target': 'structural' (no optimiser: the operators are expanded and the count follows the source exactly), 'optimized' (Yosys's default synth with ABC; smaller, but the count depends on ABC and the Yosys version), or 'abc_simple', 'abc_gates', 'abc_aig', 'abc_cmos2', 'abc_nand' (a chosen generic gate library). Same input, same Yosys version: same counts. The gate-level netlist (Verilog and JSON), the Yosys script and the log tail are written as artifacts. Needs Yosys installed by the user (see toolkit_doctor). `include and file-touching system tasks in the source are refused.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "top": "<top>"
    },
    "name": "digital_synthesize"
  }
}

Input Schema

NameRequiredDescriptionDefault
topYesName of the top module (letters, digits, underscore; at most 64 characters)
filesNoPaths of Verilog files (.v or .sv), separated by ';' or line breaks, or a JSON list. Up to 20; 1 MB in all with 'source'
sourceNoVerilog source text. Empty if 'files' is given
targetNo'optimized' (default), 'structural', 'abc_simple', 'abc_gates', 'abc_aig', 'abc_cmos2' or 'abc_nand'optimized
languageNo'verilog' (Verilog-2005, default) or 'systemverilog' (Yosys's limited SystemVerilog subset)verilog
timeout_secondsNoTime limit for Yosys, 1 to 120 seconds (default 30); a design that needs more is refused

Output Schema

NameRequiredDescriptionDefault
okYes
dataNoNon-quantity payload (reports, listings)
errorNo
valueNoPrimary quantity result
valuesNoAll named quantity results (includes the primary)
warningsNo
artifactsNo
provenanceYesWhat produced the result and from which inputs.
review_statusNounreviewed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden and does so: it discloses that artifacts are written (netlist in Verilog and JSON, the Yosys script, the log tail), that Yosys must be user-installed, that `include and file-touching system tasks are refused, that oversized designs are refused, and that results are deterministic only for a fixed Yosys version. It even flags the area figure as a toolkit convention rather than silicon area, preventing a serious misinterpretation of the output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded correctly: what it does and what it reports come first, inputs and target semantics after. It is a single dense block with heavy parenthetical/semicolon stacking, which is efficient but makes the mode-by-mode explanation harder to scan than a short list would be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with no annotations and an output schema, this is nearly complete: inputs, restrictions, environment prerequisite, artifact production, and the area-model caveat are all covered. The remaining gap is that artifact locations/names are not stated, so an agent does not know how to retrieve the generated netlist or log.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description earns above that by explaining what each 'target' mode actually does to the netlist and why counts differ under ABC, which the schema only enumerates as bare strings. Some details (20 files, 1 MB) merely restate the schema, and 'timeout_seconds' and 'language' are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Synthesise Verilog with Yosys to a generic gate-level netlist') and enumerates the reported metrics (cell counts by type, wires, longest combinational path, unit-gate area). It never contrasts itself with the clearly related siblings digital_check or digital_equivalent, so an agent must infer which of the digital_* tools to reach for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied rather than stated: no explicit 'use this when you need gate counts, use digital_check for linting / digital_equivalent for formal comparison'. The description does give strong guidance for choosing among 'target' values (structural = source-faithful count, optimized = ABC-dependent, abc_* = specific gate library) and points at toolkit_doctor for the Yosys prerequisite.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools