{
  "openapi": "3.0.1",
  "info": {
    "title": "Verilog Simulator API: Testbench, Waveform, Lint & Synthesis",
    "description": "Run a Verilog or SystemVerilog testbench in the cloud and get pass or fail, the output, a waveform picture and a table of signal changes. Lint with Verilator and synthesize with Yosys for gate, flip-flop and FPGA LUT counts and a schematic. For AI agents that write HDL, CI and teaching.",
    "version": "0.1",
    "x-build-id": "91hgIddh87Yv3vgi5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~verilog-simulator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-verilog-simulator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jumblemog~verilog-simulator/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-verilog-simulator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jumblemog~verilog-simulator/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-verilog-simulator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "title": "Verilog source",
            "type": "string",
            "description": "The design, with or without its testbench in the same text. Verilog or SystemVerilog. Write `example` to try the built-in example, a UART transmitter with its testbench."
          },
          "testbench": {
            "title": "Testbench",
            "type": "string",
            "description": "The testbench, when you keep it apart from the design: a module without ports that drives the design and ends with $finish. Report failures with $error, $fatal or a line that says FAIL."
          },
          "files": {
            "title": "More files",
            "type": "object",
            "description": "Source, header and memory files by name, such as {\"alu.v\": \"module alu ...\", \"defs.vh\": \"`define W 8\", \"rom.hex\": \"00\\n1f\"}. `include and $readmemh find them by these names."
          },
          "urls": {
            "title": "Links to source files",
            "type": "array",
            "description": "Links to .v or .sv files or to ZIP archives of a project. GitHub file, folder and repository links, GitLab file links, Google Drive and Dropbox share links work.",
            "items": {
              "type": "string"
            }
          },
          "uploads": {
            "title": "Upload files",
            "type": "array",
            "description": "Upload .v or .sv files, or a ZIP archive of a project, from your computer."
          },
          "actions": {
            "title": "What to do",
            "type": "array",
            "description": "All three by default. Simulation needs a testbench; lint and synthesis need a design module.",
            "items": {
              "type": "string",
              "enum": [
                "simulate",
                "lint",
                "synthesize"
              ],
              "enumTitles": [
                "Simulate the testbench (Icarus Verilog)",
                "Lint the design (Verilator)",
                "Synthesize the design (Yosys)"
              ]
            },
            "default": [
              "simulate",
              "lint",
              "synthesize"
            ]
          },
          "target": {
            "title": "Synthesize for",
            "enum": [
              "generic",
              "ice40",
              "ecp5",
              "xilinx",
              "gowin"
            ],
            "type": "string",
            "description": "What the design is mapped to. Generic counts AND, OR, XOR, multiplexer gates and flip-flops; the FPGA families count look-up tables, flip-flops, carry cells, memory and DSP blocks.",
            "default": "generic"
          },
          "top": {
            "title": "Testbench module",
            "type": "string",
            "description": "The module to simulate. Left empty, it is found: a module nothing else uses, without ports, with an initial block."
          },
          "designTop": {
            "title": "Design's top module",
            "type": "string",
            "description": "The module to lint and synthesize. Left empty, it is the module the testbench instantiates, or the one nothing else uses."
          },
          "stopAfter": {
            "title": "Stop the simulation after",
            "type": "string",
            "description": "A simulated time such as 500ns, 20us or 1ms, for a testbench that never calls $finish or to look at the start of a long one. A plain number counts nanoseconds (time units, when the source has no `timescale)."
          },
          "timeoutSecs": {
            "title": "Time limit (seconds)",
            "minimum": 1,
            "maximum": 900,
            "type": "integer",
            "description": "Real seconds the simulation may run. A simulation that is still running then is stopped and reported as timed out, with the output and waveform it made so far. One cent covers 30 seconds of tool time; each further 30 seconds is one cent more.",
            "default": 30
          },
          "standard": {
            "title": "Language version",
            "enum": [
              "2012",
              "2009",
              "2005-sv",
              "2005",
              "2001",
              "1995"
            ],
            "type": "string",
            "description": "What the simulator accepts. SystemVerilog 2012 also takes plain Verilog; pick an older one to check that a design keeps to it.",
            "default": "2012"
          },
          "defines": {
            "title": "Defines",
            "type": "object",
            "description": "Macros for all three tools, as with +define+: {\"SIMULATION\": 1, \"WIDTH\": 16}."
          },
          "parameters": {
            "title": "Testbench parameters",
            "type": "object",
            "description": "Values for parameters of the testbench module: {\"CYCLES\": 1000}."
          },
          "designParameters": {
            "title": "Design parameters",
            "type": "object",
            "description": "Values for parameters of the design's top module in lint and synthesis: {\"WIDTH\": 32}. The simulation uses what the testbench sets."
          },
          "plusargs": {
            "title": "Plusargs",
            "type": "array",
            "description": "Arguments the testbench reads with $test$plusargs or $value$plusargs, such as seed=42 or verbose.",
            "items": {
              "type": "string"
            }
          },
          "failPattern": {
            "title": "Failure pattern",
            "type": "string",
            "description": "A regular expression: an output line that matches means the test failed. Left empty, lines with the words fail, failed, mismatch or error count, except those that report zero (\"0 errors\"). $error and $fatal always count. Send an empty text in the API to turn the word check off."
          },
          "passPattern": {
            "title": "Pass pattern",
            "type": "string",
            "description": "A regular expression that the output must match for the test to pass, such as ALL TESTS PASSED."
          },
          "outputs": {
            "title": "Files to make",
            "type": "array",
            "description": "The results always come as data. These are the files on top.",
            "items": {
              "type": "string",
              "enum": [
                "waveform",
                "vcd",
                "schematic",
                "netlist"
              ],
              "enumTitles": [
                "Waveform picture (PNG)",
                "Waveform file (VCD, for GTKWave or Surfer)",
                "Schematic of the design (SVG and PNG)",
                "Synthesized netlist (Yosys JSON and Verilog)"
              ]
            },
            "default": [
              "waveform",
              "schematic"
            ]
          },
          "waveSignals": {
            "title": "Signals to show",
            "type": "array",
            "description": "Names or patterns, in the order to show them: clk, state, dut.*, dut.fifo.count. Left empty: the testbench's own signals, clocks and resets first, then the design's signals one level down.",
            "items": {
              "type": "string"
            }
          },
          "waveFrom": {
            "title": "Waveform from",
            "type": "string",
            "description": "Start of the picture and the table, such as 200ns. Left empty: the start of the simulation."
          },
          "waveTo": {
            "title": "Waveform to",
            "type": "string",
            "description": "End of the picture and the table, such as 450ns. Left empty: the end of the simulation."
          },
          "radix": {
            "title": "Show values as",
            "enum": [
              "hex",
              "dec",
              "bin"
            ],
            "type": "string",
            "description": "How multi-bit values are written in the picture and the table.",
            "default": "hex"
          },
          "imageWidth": {
            "title": "Picture width (pixels)",
            "minimum": 600,
            "maximum": 4000,
            "type": "integer",
            "description": "Width of the waveform picture.",
            "default": 1600
          },
          "maxSignals": {
            "title": "Most signals",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Most signals in the picture and the table.",
            "default": 32
          },
          "maxTraceRows": {
            "title": "Most table rows",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Most rows of the table of signal changes in the result. 0 leaves the table out.",
            "default": 200
          },
          "maxOutputChars": {
            "title": "Most output characters",
            "minimum": 200,
            "maximum": 1000000,
            "type": "integer",
            "description": "Longer simulation output is shortened in the result (start and end kept) and saved in full as a file.",
            "default": 20000
          },
          "designs": {
            "title": "Several designs",
            "type": "array",
            "description": "Check several designs in one run: a list of objects with code, testbench, files or urls, and optionally a name and any other field of this form to override it, such as [{\"name\": \"adder\", \"code\": \"...\", \"testbench\": \"...\"}, {\"urls\": [\"https://.../fifo.zip\"], \"target\": \"ice40\"}]."
          },
          "maxDesigns": {
            "title": "Most designs per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "A safety limit for batches.",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}