Skip to main content

Module integrator

Module integrator 

Source
Expand description

The ZOH integrator lane — counted Euler loops as OTA-C integration.

The recognized idiom is explicit Euler: Set x to x + <h·f(state)> inside a counted Repeat, possibly over SEVERAL mutable states (a cross-coupled oscillator is two). Each state lives in a sample-and-hold; each frame the OTA legs integrate the held inputs for the settling window and the S&H commits — zero-order hold, so the per-frame update is EXACT arithmetic and the certified semantics is the VM’s Euler trajectory, not an ODE-solver approximation. The physical gate is the OTA rate identity: a programmed per-frame gain c over frame time T demands gm/C = |c|/T, which must sit in the target’s realizable integrator_k_range — refused typed otherwise.

Structurally this is the reduction lane without a stream: state parameters enter through the DAC once (frame 0), the trajectory never leaves the analog plane, and one ADC reads the result after the declared frame count.

Structs§

AnalogIntegrator
A lowered ZOH integrator. Tick-input convention: In(s) = held state s; outs[s] = the next value of state s; the declared result is outs-resolved result_state.

Enums§

InitSrc
A state’s initial value: a function parameter (DAC-driven at frame 0) or a constant.

Functions§

analog_integrator_from_source
Lower a counted Euler loop over float state(s) to a ZOH integrator on target.
eval_analog_integrated
Ideal trajectory: the VM’s Euler loop, frame by frame (bit-exact — same f64 ops in order).
eval_analog_integrated_quantized
The physical trajectory: initial states DAC-quantized once, the whole trajectory continuous in the S&H (weight-quantized tick), one ADC at the end.
integrator_error_budget
The iterated integrator budget: the shared ε engine run once per frame over the held state vector — initial DAC errors on the parameter states carry through every frame, the weight-snap deviation injects per frame, one ADC half-LSB lands at the end.
integrator_scale_pass
Schedule + certify: iterate the interval trajectory over the declared frames, hull per net and per state, choose the block scale over everything, and emit the certificate.