emit_verilog
Generate a Verilog core from Amaranth, MyHDL, or Verilog project code, validate ports against Tiny Tapeout pins, regenerate the wrapper, and lint with Verilator and Yosys.
Instructions
Turn the project's design into Verilog and check it. For Amaranth and MyHDL this runs your hdl/.py in a container and writes the generated core to src/.v; a Verilog project's src/.v is used as it is. The tool then checks the core's ports against the Tiny Tapeout pins (names, directions, widths), regenerates the tt_um_ wrapper in src/project.v, and lints everything with Verilator (-Wall; latches are errors) and Yosys check -assert (multiple drivers and logic loops are errors). ok is false for a Python error (with file and line), bad ports, or any lint finding; details.lint lists {severity, code, file, line, col, msg}. Takes a few seconds to a minute; the first call is the slowest.
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": {
"project": "<project>"
},
"name": "emit_verilog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| details | No | ||
| summary | Yes | ||
| artifacts | No | ||
| next_hints | No |