Docs / API Reference

API Reference

Complete reference for the NMC Python SDK (import neurmorph), the CLI, the C runtime API (nrm_runtime.h), and the HAL shim interface.

Python SDK

Install with pip install nmc-cli. The SDK exposes compilation, calibration, inspection, and device management functions.

Functionneurmorph.compile(model_path, target, calibrate=True, cal_file=None)

Compile a TorchScript or ONNX model to a .snn binary. Returns a CompileResult object with output path, accuracy delta, and memory stats.

Functionneurmorph.inspect(snn_path)

Parse a .snn binary and return a ModelInfo object with neuron count, layer topology, SRAM requirements, and calibration checksum.

Functionneurmorph.deploy(snn_path, device)

Flash a compiled .snn binary to a connected eval kit device. Device string format: nt3000:usb0.

CLI Reference

The nmc CLI is installed alongside the Python package. All commands support --json for machine-readable output and --verbose for pass-level diagnostics.

C Runtime API

Include nrm_runtime.h in your embedded project. Requires a HAL shim implementation for your target chip.

HAL Shim API

Port the runtime to a new chip by implementing the 8-function HAL shim. Provide your implementations in a C source file and link against the runtime library.