Platform · Runtime
Edge Runtime
The event-driven execution engine that loads and runs .snn binaries on neuromorphic silicon. Written in C99, zero OS dependency, static memory layout — designed for bare-metal deployment where every microwatt matters.
Runtime State
Core Design
Runtime architecture
Event-driven dispatch
The runtime is dormant between spike events. When a spike arrives on the HAL input bus, the dispatcher wakes the affected neuron groups, runs the timestep window, and returns to sleep. Power draw during dormancy: <5 µW.
Static memory layout
All neuron state buffers, weight arrays, and spike queues are allocated at load time from a contiguous memory arena. No malloc after init. Memory footprint is deterministic and declared in the .snn header.
HAL shim interface
The runtime depends only on the HAL shim API: 8 function pointers covering spike I/O, memory access, timer, and power mode. Port to a new chip by implementing these 8 functions — no runtime code changes required.
Fault tolerance
Configurable watchdog hooks: spike-timeout detection, neuron saturation recovery, and checkpointed neuron state saves. Graceful degradation to reduced-accuracy mode on partial silicon failure.
Integration
Loading a .snn binary
#include "nrm_runtime.h"
#include "hal_nt3000.h"
nrm_model_t model;
nrm_arena_t arena;
int main(void) {
/* init HAL + allocate static arena */
hal_init();
nrm_arena_init(&arena, sram_base, 32768);
/* load compiled .snn binary */
nrm_load(&model, model_snn, &arena);
/* event loop — blocks on HAL IRQ */
while (1) {
nrm_step(&model);
}
}
Deploy your first model
The Quickstart walks through compile → deploy → verify in one session.