Open sbourdeauducq opened 7 years ago
So a self-synchronizing variable-length encoding? Something like this:
0by0xxxxxx
: 6 data bits0by10xxxxx
: 5 data bits0by110xxxx
: 4 data bits0by1110xxx
: 3 data bits0by11110xx
: 2 data bits0by111110x
: 1 data bit0by1111110
: 0 data bitswhere y
indicates whether this is the initial byte or continuation byte, and a 0 data bit byte indicating the end of the sequence.
It would be nice if DMA (input and output), Analyzer, and DRTIO all three could use the same (or at least very similar) serialization formats.
@whitequark y
?
There cannot be a lot in common, except for trivialities (e.g. the order of those few fields that are common), and more importantly for the way the variable length is communicated.
@jordens yes, y
.
And the analyzer is the only one that requires the variable length encoding to be self-synchronizing, so it's not clear that even that should be shared.
Well, it is definitely less error-prone to have one variable-length encoder than two, on both sides.
The analyzer record format doesn't have enough data bits for SAWG events.
Fixing this requires defining a new record format that ideally:
Then it needs to be implemented in gateware and in
artiq_coreanalyzer
.