Exchanging Data With the C0-microSD
Your host application and your device application exchange data through two dedicated buffers, and everything else builds on that.
- Inputs travel from the host into the 4 KiB
MOSIbuffer, which the device application reads askC0HALInputBufferFloat,kC0HALInputBufferUint32, and the other typed views of the same memory. - Results travel from the 4 KiB
MISObuffer, which the device application writes askC0HALOutputBufferFloatand friends, back to the host. - The host drives each exchange with
write_input_buffer(),calculate_command(), andread_output_buffer()from the Python host interface.
The C0-microSD needs no core control. The device application runs and polls for commands whenever the module is in Signaloid SoC mode, so the host only moves data and issues commands.
The Cookbook collects the recipes that put these buffers to work, and each applies to the C0-microSD as written.
- Sending Inputs to the Module, floats as distribution parameters, measured samples, whole distributions as Ux Binary Data, and integers as configuration.
- Returning Results to the Host, particle values, on-module statistics, sample batches, and full distributions.
- Using the Results on the Host,
printing Ux Strings and plotting distributions with the
signaloidpackage. - Debugging and Logging, reading the device log inside your host application.
For the layers underneath the recipes, see Using the Hardware Abstraction Layer for the device side, Using the Python Host Interface for the host side, and Host Interface and Protocol for the registers and offsets underneath both.