API & MCP

Everything a person can do on Ohmforge Logic Simulator (VCD), a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Ohmforge Logic Simulator (VCD)

Simulate a digital circuit written as a small text netlist: gates, tri-state buffers, multiplexers, latches, D/JK/T flip-flops, counters and shift registers with propagation delays and four-valued logic (0, 1, x, z). You get a timing diagram, a timing table, a VCD file for GTKWave or PulseView, setup/hold violations and, for combinational circuits, the truth table.

Inputs of Ohmforge Logic Simulator (VCD)
FieldTypeDefaultDescription
netlisttextarea"name Half adder\ninput A B\noutput S C\nxor U1 S A B delay=2\nand U2 C A B delaNetlist. Native format or a structural Verilog subset (one module of single-bit nets: input/output/wire/reg, gate primitives, assign with & | ^ ~ ?: and #delay, always @(posedge clk [or posedge rst]) with <= and if/else; stimuli then go into the extra lines). Native format, one statement per line. Elements: TYPE NAME then nets (output first) or PIN=net, plus delay=N (or rise=/fall=), e.g. "and U1 Y A B delay=2", "dff F1 Q=q D=d CLK=clk RST=r setup=3". Types: and or nand nor xor xnor not buf bufif1 bufif0 notif1 notif0 mux2 mux4 dlatch srlatch dff jkff tff counter shiftreg. Sources: input, clock NET period=10 duty=0.5, stim NET 0:0 10:1, count A B period=10, const NET 1. Also output, bus, timescale, duration, name. # starts a comment.
stimulitextarea—Extra stimulus lines (optional). Appended to the netlist, e.g. "stim A 0:0 15:1 30:x". Handy for trying other inputs on the same circuit.
durationinteger0Duration (time units, 0 = from the netlist). Integer time units of the timescale. 0 uses the netlist's duration line, the end of a count pattern, or 1.25 × the last stimulus.
signalstext—Signals to show (optional). Comma-separated net or bus names for the diagram and table; empty shows all. The VCD always contains every net.

Example request

Half adder with gate delays (XOR glitch window)

curl -X POST https://ohmforgelogicsimulator.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"netlist":"name Half adder\ninput A B\noutput S C\nxor U1 S A B delay=2\nand U2 C A B delay=1\ncount A B period=10"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "ohmforge-logic-simulator": { "type": "http", "url": "https://ohmforgelogicsimulator.usefulweb.site/mcp" }
  }
}