Skip to main content
Glama

load_systemverilog

Elaborate local SystemVerilog RTL sources into the active design session, enabling hierarchical, post-elaboration design queries.

Instructions

Elaborate local SystemVerilog sources into the active design session. Use this for SystemVerilog RTL; use load_vhdl for VHDL (beta), or load_verilog with load_liberty/load_primitives for a structural gate netlist. Requires at least files or flist and changes the in-memory design session. Anonymous lowered objects are addressable by #. defines are preprocessor -D entries ("NAME" or "NAME=VALUE"). allow_unknown_designs=True blackboxes any module still undefined instead of failing (e.g. undelivered hard macros in a partly-open-source design). blackbox_multi_writer_memories does the same for modules whose multi-writer memories naja cannot infer. intent=True retains naja's in-engine SNL↔slang link for get_intent.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "load_systemverilog"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoTop module name; omit to use najaeda's inferred top.
filesNoLocal SystemVerilog source file paths; optional when flist is provided.
flistNoPath to a simulator-style file list; optional when files are provided.
intentNoRetain the live SNL-to-slang link required by get_intent; uses more memory.
definesNoPreprocessor definitions as "NAME" or "NAME=VALUE" entries.
keep_assignsNoPreserve continuous assignments as explicit lowered objects.
default_timescaleNoFallback time scale for modules without an explicit time unit, e.g. 1ns/1ps; omit to use the frontend default.
allow_unknown_designsNoBlack-box unresolved module definitions instead of failing elaboration.
blackbox_multi_writer_memoriesNoBlack-box whole modules whose memories have unsupported multiple writers instead of failing.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.25
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "additionalProperties": true,
      +      "title": "Result",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "load_systemverilogOutput",
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / default_timescale
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Fallback time scale for modules without an explicit time unit, e.g. 1ns/1ps; omit to use the frontend default.",
      +  "title": "Default Timescale"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / blackbox_multi_writer_memories
      Added value: +{
      +  "default": false,
      +  "description": "Black-box whole modules whose memories have unsupported multiple writers instead of failing.",
      +  "title": "Blackbox Multi Writer Memories",
      +  "type": "boolean"
      +}
  4. Changed7 schema fields changedv0.1.9
    • addedInput schema / properties / allow_unknown_designs
      Added value: +{
      +  "default": false,
      +  "description": "Black-box unresolved module definitions instead of failing elaboration.",
      +  "title": "Allow Unknown Designs",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / defines
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Preprocessor definitions as \"NAME\" or \"NAME=VALUE\" entries.",
      +  "title": "Defines"
      +}
    • addedInput schema / properties / files / description
      Added value: +"Local SystemVerilog source file paths; optional when flist is provided."
    • addedInput schema / properties / flist / description
      Added value: +"Path to a simulator-style file list; optional when files are provided."
    • addedInput schema / properties / intent / description
      Added value: +"Retain the live SNL-to-slang link required by get_intent; uses more memory."
    • addedInput schema / properties / keep_assigns / description
      Added value: +"Preserve continuous assignments as explicit lowered objects."
    • addedInput schema / properties / top / description
      Added value: +"Top module name; omit to use najaeda's inferred top."
  5. First observedv0.1.8

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already establish that this mutates state (readOnlyHint=false) and is non-destructive, but the description adds important behavior beyond that: it changes the in-memory session, summarizes blackboxing semantics, explains the memory tradeoff for intent, and documents addressing of anonymous lowered objects.

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

Conciseness5/5

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

The description is dense but front-loaded: purpose first, then alternatives, prerequisite, and special flags. Every sentence carries useful operational information, and there is no filler.

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

Completeness5/5

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

For a 9-parameter mutation tool with an output schema and annotations, the description covers the key usage context, requirements, and non-obvious behavioral flags. Return-value details are appropriately left to the output schema.

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 the baseline is 3, but the description adds meaningful semantics for several parameters: files/flist are alternatives, defines use -D-style NAME or NAME=VALUE, allow_unknown_designs blackboxes unresolved modules, and intent retains a live link for get_intent. It does not add much for top, keep_assigns, or default_timescale beyond the schema.

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

Purpose5/5

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

States a specific verb ('Elaborate') and resource ('local SystemVerilog sources') and explicitly distinguishes itself from load_vhdl and load_verilog/load_liberty/load_primitives. An agent can identify the right loader without inspecting schemas.

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

Usage Guidelines5/5

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

Explicitly says to use this for SystemVerilog RTL, names the alternatives for VHDL and structural gate netlists, and states the files-or-flist requirement. It provides clear when-to-use and alternative guidance.

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