|
Sci-SDK Library
SDK for Sci-Compiler projects
|
Logic Analyser decoded data type. More...
#include <scisdk_defines.h>
Public Attributes | ||
| uint32_t | magic | |
| uint32_t * | data | |
| uint64_t | timecode | |
| struct { | ||
| uint32_t samples | ||
| uint32_t ntraces | ||
| uint32_t words_per_sample | ||
| } | info | |
Logic Analyser decoded data type.
This type is used to store decoded data from logic analyser. The data in this structure contains raw samples from the logic analyser. Each logical sample can occupy multiple 32-bit words if ntraces > 32. The user can extract individual signals using bitstart and bitwidth information from ChannelsList in JSON.
Note: nsamples in JSON is the total number of 32-bit words from FIFO. The actual number of logical samples = nsamples_json / words_per_sample.
Example with JSON nsamples=2048, 44 digital traces:
data[0] = sample 0, bits 0-31 data[1] = sample 0, bits 32-43 (remaining 12 bits) data[2] = sample 1, bits 0-31 data[3] = sample 1, bits 32-43 ... data[2046] = sample 1023, bits 0-31 data[2047] = sample 1023, bits 32-43
To extract signal i from logical sample j:
| uint32_t* SCISDK_LOGICANALYSER_DECODED_BUFFER::data |
Pointer to data allocated by the AllocateBuffer function
| struct { ... } SCISDK_LOGICANALYSER_DECODED_BUFFER::info |
| uint32_t SCISDK_LOGICANALYSER_DECODED_BUFFER::magic |
Magic number to identify the data type
| uint32_t SCISDK_LOGICANALYSER_DECODED_BUFFER::ntraces |
Number of digital traces (signals) defined in ChannelsList
| uint32_t SCISDK_LOGICANALYSER_DECODED_BUFFER::samples |
Number of samples in buffer
| uint64_t SCISDK_LOGICANALYSER_DECODED_BUFFER::timecode |
Timecode of the first sample
| uint32_t SCISDK_LOGICANALYSER_DECODED_BUFFER::words_per_sample |
Number of 32-bit words per sample (calculated as (ntraces + 31) / 32)