The Hybrid Workflow

Intarva’s greatest strength is the **Hybrid Logic Engine**. You aren’t limited to a single language—you can run MicroPython on your Pico while simultaneously using JavaScript to orchestrate global system behavior.

1. The Unified Netlist

In Intarva, every wire connection is part of a global **Netlist**. When a board drives a pin HIGH in MicroPython, the engine immediately calculates the effect on every other connected component.

Synchronous Sync

Logic changes are propagated between board workers and the JS main thread in **sub-millisecond intervals**. If your Python code blinks an LED, your JS code can “see” that state change instantly.

WASM Architecture

Both languages run as highly-optimized **WebAssembly (WASM)** workers. This allows the simulation to run at host-machine speeds, often outperforming physical hardware during complex calculations.

2. How Data Flows

Understanding the communication loop is key to building complex multi-board systems:

Action What Happens Internally
Python: pin.on() Worker sends a PIN_DRIVE message to the Core Manager.
Core Engine The Netlist Solver resolves the voltage for that entire Net.
JS SDK: on('change') The main thread receives a NET_UPDATE and triggers any JS listeners.
Visual UI The LED component in the browser updates its color to reflect the new state.

3. Scaling & Resolution

To maintain compatibility between the 12-bit hardware registers of the Pico and the 64-bit environment of JavaScript, Intarva uses a Normalized 16-bit Scaling System (0-65535).

  • Digital: 0V = 0, 3.3V = 65535.
  • Analog: Any voltage between 0 and 3.3V is scaled linearly into the 16-bit range.
  • Z-State: A floating/high-impedance pin defaults to 65535 (Pull-up behavior) in the worker’s shared memory.