Documentation

Sparkle.Core.SimVerilator

One input port: name (matches the .sv port) and bit-width. The width drives the C++ type chosen for the jit_set_input switch case (uint8_t, uint16_t, uint32_t, or uint64_t).

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Verilator simulator state. Just a JITHandle because the Verilator-backed .so exposes the JIT C ABI.

      Instances For
        def Sparkle.Core.Sim.Verilator.of (svPath top : String) (inputs outputs : List PortSpec) (objDir : String := "/tmp/sparkle_verilator") :

        Build a Verilator-backed .so from a Sparkle-generated .sv, then load it via the existing JIT FFI.

        • svPath — path to a .sv written by, e.g., Sparkle.Backend.Verilog.writeVerilogFile.
        • top — top-module name (matches what's in the .sv).
        • inputs / outputs — port lists excluding clk / rst (matching the JIT's jit_set_input / jit_get_output indexing).
        • objDir — temp directory for Verilator artefacts.

        Returns a Simulator whose handle is opened against the just-built .so.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.