Known issues
What doesn't work yet, how to recognize it, and what to do about it.
This page is the open list: things that may still affect you. Fixed bugs live on closed GitHub issues; pull the latest main to pick them up.
If you hit something not listed here, please file an issue at simtenHQ/simten. Concrete repros are gold.
Correctness
Elaboration edge cases surfaced by audit #140
A focused audit of elaboration.ts (after fixing #138) surfaced five narrow-but-real silent-correctness gaps; the width ones (#144, #145) are fixed. They are deferred to post-beta because they only bite specific unusual patterns; none affect typical circuits (gates, adders, registers, regular composites with internal nodes and gated outputs). Each is locked in by an it.fails(...) test in composite-patterns.test.ts that flips green when the fix lands.
Post-stitch multi-driver silently accepted (#143)
The multi-driver check runs per-circuit at circuit() definition time, not on the flattened netlist. If two primitives end up driving the same target through a feedthrough boundary, the conflict surfaces only after stitching and isn't caught.
How to recognize it: wrong outputs in a circuit that drives a composite's output port from outside the composite (e.g. inputs.B.to(p.y) where y is p's output). Workaround: don't drive a composite output port externally; the convention is that composite outputs are produced by the composite, not consumed as targets. The TS port-direction guard and the per-circuit multi-driver check together steer you away from this shape; the runtime gap only matters at API edge cases.
Deeply nested feedthrough composites produce a malformed netlist (#146)
At three or more levels of composites whose only output mechanism is a feedthrough (inputs.x.to(outputs.y), no gate at any level), elaboration produces a flat netlist where an internal primitive input port appears as a connection source and the top output has two drivers. Silent wrong values at simulation. Sibling class to #138: depth-2 was fixed; depth ≥ 3 wasn't covered.
How to recognize it: wrong outputs in a circuit that stacks ≥ 3 levels of pure-feedthrough composites (board-of-board-of-board layering, repeated abstraction wrappers without internal logic). Workaround: include at least one gate (Not → Not, Buffer, anything non-trivial) at one of the inner levels, or flatten the wrapping to ≤ 2 nested levels. Gated nesting at any depth elaborates correctly.
Node-less composite with only a passthrough drops the signal (#147)
A composite with nodes: {} and only an inputs.x.to(outputs.y) connection, essentially a "labeled wire" composite, elaborates without error but the simulator returns 0 instead of the input value.
How to recognize it: a passthrough composite with no internal nodes produces 0 at its output regardless of input. Workaround: add at least one internal node to any composite, even a dummy gate wired off to one side. The Passthrough fixture in chained-passthrough.test.ts uses the canonical workaround pattern: inputs.x.to(d.in) against a Not whose output is unused.
Verilog export
Hierarchical mode not yet implemented
verilog_export currently emits a single flat module. The mode: 'hierarchical' option is accepted but not yet implemented (see packages/core/src/verilog/exporter.ts); composite circuits are inlined into the top module rather than emitted as separate module declarations.
How to recognize it: the exported Verilog contains a single top-level module regardless of how deeply nested the source circuit is. Workaround: flat export is fully functional for synthesis (Yosys and nextpnr accept it); use it as-is. If you need hierarchical Verilog for readability or third-party tool consumption, post-process the output or open an issue.
Verilog import
Import runs your RTL through Yosys and lifts the resulting netlist into simten source. The whole
project goes in (every .v under a folder, plus parameters and any $readmemh data) and Yosys
prunes whatever the top module doesn't reach. What follows is what the result can and can't do
once it's in the simulator.
It is not a Verilator replacement
If you are importing your own RTL to debug it, simten is strictly worse than the tool you already have: roughly a thousand times slower, two-state, and single-clock. The value here is seeing a design (clicking into a running CPU down to the gates, on a canvas, in a browser), not verifying one. Verify in Verilator or Icarus; import to look at it.
Two-state: x and z both read as 0
The engine has no unknown value. An uninitialised register reads 0 rather than x, so the
X-propagation that catches missing resets in a conventional simulator finds nothing here; simten
will confidently agree with a wrong 0.
How to recognize it: a design that fails on hardware over a missing reset simulates cleanly. Workaround: reset everything you rely on, and treat a clean simten run as evidence about structure rather than about initialisation.
One clock domain
Sequential logic runs on a single implicit clock, stepped by tick(). Clock ports on the imported
module are dropped with a warning, and a derived clock (a divider or a gated clock feeding a
register) throws rather than lifting into something that looks right and isn't. That rules out
CDC, async FIFOs, DDR interfaces and multi-clock SoCs.
How to recognize it: an import fails with a derived-clock error. Workaround: rewrite clock
dividers and clock gating as clock enables, which is better practice anyway. Genuine multi-clock
plumbing belongs in a hand-written wrapper around the imported design; the precedent is
hardware/ulx3s/projects/snake/snake_top.v, which wraps an EHXPLLL around a single-clock simten
core.
A bare CPU core can't run a program
serv_rf_top asserts o_ibus_cyc and waits forever for an ack that nothing produces. This is not
a simten limitation; Verilator users hit the same wall, which is why these projects ship SoC
wrappers.
How to recognize it: the imported core's outputs settle and never change again.
Workaround: import the system, not the core: servant rather than serv_rf_top,
picosoc rather than picorv32. Wire its serial pin to UART_RX({ cyclesPerBit }) and on to a
Console to read what the program prints.
$display output is dropped
Yosys lifts $display/$write to $print cells, which have no hardware meaning. They are skipped
with a warning naming the module and source line rather than failing the import, so a debug
statement doesn't take a whole design down, but the output is gone.
How to recognize it: an import warning like servant_ram: dropped 1 $display/$write statement(s). Workaround: none; read the design's real outputs instead.
Imported designs usually can't be exported back to Verilog
Yosys elaboration produces bit-wiring primitives (Slice, ZeroExtend, SignExtend, Pmux_*)
that the Verilog exporter has no mapping for. Export refuses rather than emitting a file that
parses and does the wrong thing.
How to recognize it: the Verilog button reads Can't export: N unsupported nodes (…).
Workaround: none; the original RTL is the thing to synthesize. Round-tripping through import
was never the point.
Buses wider than 32 bits are the other thing worth knowing about before you import; see
Buses wider than 32 bits don't simulate below. It is why
picorv32 needs ENABLE_COUNTERS=0 to run, and why bit-serial designs like SERV sail through.
Sim-only primitives (not synthesizable)
Some stdlib primitives exist for visualisation/debugging and are not part of the Verilog export. They simulate fine, but they will be excluded from any synthesized output. They are marked meta: { synthesizable: false } in @simten/core/std:
Console: text output (display)UART_RX: serial pin to bytes (pairs withConsolefor imported SoCs)HexDisplay,SevenSegment: numeric readoutsScreen,RasterDisplay: framebuffer surfacesProbe: debug observation
How to recognize it: the circuit simulates and renders, but verilog_export (or the FPGA build) either omits the node or errors. Workaround: wrap simulation-only display logic behind a top-level signal you can leave unwired on synthesis, or mark the wrapper circuit meta: { synthesizable: false } so it's expected.
Browser sandbox limits
The /circuit page (and the show_circuit MCP canvas) runs your code inside a cross-origin sandbox iframe (see Architecture). A few things follow from that:
npm imports require network (esm.sh)
import { x } from 'some-pkg' in a circuit is resolved at elaboration time via esm.sh. If you're offline, or esm.sh is unreachable, or the package isn't published in an esm-compatible shape, the binding will be undefined and you'll see x is not defined in the editor.
How to recognize it: ReferenceError on the imported binding. Workaround: check the package on esm.sh directly (e.g. https://esm.sh/<pkg>); use a known-good version pin ('pkg@4.3.2'); for Node-only packages, fall back to baking the data into a Constant/ROM outside the browser path.
Cross-file (multi-file) imports aren't resolved in the browser
Circuit code in the /circuit editor, and the source show_circuit pushes to the canvas, runs with its import statements stripped and the @simten/core stdlib injected into scope (browser: apps/sandbox/src/rewrite-imports.ts). So a circuit may import from @simten/core/* (resolved from injected scope) and bare npm specifiers (resolved via esm.sh), but it cannot import another local file (./helper.ts, ../shared.circuit.ts): the relative specifier resolves to nothing (there's no filesystem in the sandbox), so the binding is undefined.
The host tools don't share this limit. check_circuit, simulate_circuit and verify_circuit load a circuit file that has imports as a real module, with Node module resolution, so relative imports, helpers and npm packages work there as they do under tsx. Source text passed as source (rather than filePath) still runs through the import-stripping executor.
How to recognize it: X is not defined / undefined for a binding imported from a relative path, on the canvas or in the /circuit editor, while simulate_circuit on the same file works. Workaround: keep circuits you want on the canvas single-file, importing only from @simten/core/*, or promote shared circuits into @simten/core/std so they resolve via injected scope. A real fix would bundle the entry and its local files before sending them to the sandbox; tracked as a future enhancement.
Buffer is Node-only
A common gotcha when porting a verify testbench to a browser demo: Buffer.from([...]) works under tsx/node but is not defined in the browser sandbox. Use Uint8Array.of(...) / new Uint8Array([...]) instead; most npm crypto/hash packages accept it at runtime even when their TypeScript types only declare Buffer.
Worker compile timeout (5s)
Every circuit compile/elaborate runs inside a worker that the sandbox will kill after ~5 seconds. An infinite loop or runaway computation inside a connect callback (e.g. a for that builds an unbounded number of connections) will surface as a Worker restarted error rather than hanging the tab.
How to recognize it: the editor shows Worker restarted after a few seconds. Workaround: check the loops in your connect for bounds; remember connect runs at elaboration, so all its iteration must terminate.
postMessage … could not be cloned console warning
You may see a postMessage warning in the browser console: something the iframe sandbox tried to post wasn't structured-cloneable. It's benign: it appears on both the hosted /circuit page and the local MCP viewer (it isn't introduced by either), and it doesn't affect compilation, simulation, or rendering.
How to recognize it: a one-off … could not be cloned warning in DevTools, with no visible effect on the canvas. Workaround: none needed; safe to ignore. Tracked as low-priority.
Editor type checking
Screen squiggles: lib.dom's Screen shadows the stdlib component
The /circuit editor type-checks with TypeScript's full default lib, which includes lib.dom, and lib.dom declares a global var Screen (the window.Screen constructor). That shadows the stdlib Screen component's global typing, so Screen in a node list shows a type error even though the circuit compiles and simulates fine (execution strips types and injects the real component; the editor's diagnostics are cosmetic here). Screen is the only stdlib name with this value-level collision; Console, Input, etc. only collide with DOM interfaces, which is harmless.
How to recognize it: a squiggle on Screen while the circuit runs normally. Workaround: ignore it; runtime is unaffected. Don't try to fix it by dropping lib.dom from the editor's compiler options: Monaco's worker fails to load replacement libs and you lose Array/string typing entirely, which is far worse.
Simulator limits
Propagation cap
Each set() / clock tick drives an event-driven propagation queue. After 64 node evaluations per node in the circuit (at least 10 000) in a single propagation pass, the simulator throws, naming the nodes that are still changing:
Propagation did not stabilize after 10000 evaluations: a combinational loop is oscillating. Still changing: n1, n2.This is a safety net for combinational feedback loops with no register breaking them (an inverter whose output feeds its own input, etc.). It scales with the circuit, so it is not a depth or size limit.
How to recognize it: the error message above. Workaround: find the combinational loop; break it with a Register or DFlipFlop.
get() only reads top-level ports and switches
simulate(C).get('foo') reads the top-level ports of C and the Switch and Input nodes set drives. Any other name, including an internal node's port ('subModule.out'), throws an error that lists the names it can read.
How to recognize it: an error like get('out'): MyCircuit has no port, Switch or Input named 'out'. Its inputs: a, b. Its Switches and Inputs: (none). Its outputs: sum, carry. Workaround: expose the value you need as a top-level output of the circuit under test (wrap it in a probe harness with the signal piped out). Simten's own tests read internal ports with nodesOf(sim).ports().get('subModule.out') from @simten/core/internal, which works but carries no stability promise: the paths are elaboration details.
Buses wider than 32 bits don't simulate
The numeric engine stores every net as an unsigned 32-bit value and evaluates with JavaScript bitwise operators. Compiling a circuit with a port wider than 32 bits for simulation is an error naming the port. Export, import, and FPGA synthesis are unaffected: they carry the full width; only the in-engine simulator has the ceiling.
How to recognize it: simulate() / verify_circuit fails with ... is bus(64); buses must be 1 to 32 bits wide. This is why imports of wide-bus designs (e.g. a matrix-vector unit) lift and export fine but can't be run through the TS simulator. Workaround: keep simulated buses at 32 bits or fewer (split wide datapaths into lanes), or verify wide designs through the Verilog path (export and cross-check against Icarus Verilog) instead of the TS simulator. A real fix means representing wide nets as BigInt or word arrays through the engine and evaluators.