]> sigrok.org Git - libsigrokdecode.git/commit - decoders/parallel/pd.py
parallel: unbreak and improve "word" de-multiplexing
authorGerhard Sittig <redacted>
Fri, 22 Dec 2017 14:16:27 +0000 (15:16 +0100)
committerUwe Hermann <redacted>
Mon, 1 Jan 2018 21:15:51 +0000 (22:15 +0100)
commitca24954fa8c82919446eec8114e4007f0b024797
tree7d6097e657d5a5fbc2098405be79c983539c6811
parenta0b7e07f5576605141e543f9d81a220a920edc27
parallel: unbreak and improve "word" de-multiplexing

The previous implementation prepared but never fully enabled the
accumulation of several multi-bit items into words that span multiple
bus cycles (think: address or data de-multiplexing on memory busses).

Complete the accumulation, and fixup the end samplenumber for word
annotations. Fixup the endianess logic (the condition was inverted).
Rephrase calculation to be more Python idiomatic.

Default to word size zero, and only emit word annotations for non-zero
word size specs. This keeps the implementation backwards compatible and
still passes the test suite. Default behaviour is most appropriate for
interactive use in GUI environments, while automated processing will
find consistent behaviour across all setups (non-multiplexed busses, and
multiplexed busses with "words" that span one or multiple cycles).
decoders/parallel/pd.py