output/vcd: support analog data, more channels, minor cleanup
Extend and rephrase the VCD output module, to support mixed signal data, support higher channel counts, and address other minor issues. Increase the number of VCD identifiers which can get generated. Bump the limit from 94 to 18346 channels. Prefer single letter names for backwards compatibility for the first channels. Use two or three letter identifiers as needed for higher channel counts. Add support for analog channels, and carefully organize a queue such that timestamps and their data only get written after input data for _all_ channels was received from the session feed. Provide IEEE754 double precision values for maximum compatibility with other VCD aware software, although sigrok internally passes analog data with single precision. This makes potential later adjustment transparent to external software. Factor out and rephrase code while we are here. This implementation avoids glib calls where they'd hurt performance. A local pool reduces malloc() pressure to increase throughput. String manipulation is tuned for simplicity and reduced cost. Special code paths were added to tune the use cases where mixed signals are not involved (immediate write to the output text, bypassing the output module's local queue). An srzip input implementation detail still makes the VCD output consume lots of memory during merge sort of channels' data. See bug #1566. Other nits got addressed in bypassing: Adjust data types. Separate the gathering of detail information and the construction of the VCD header text to simplify review and future maintenance. Skip VCD identifiers for disabled channels. Emit a final timestamp to flush the last sample, and communicate the total capture length. Update comments. Update the copyright for recent non-trivial changes.
This commit is contained in:
parent
0ab36d2f54
commit
8c5bd3d9c7
1136
src/output/vcd.c
1136
src/output/vcd.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue