Replies: 1 comment
|
Feedback from SRM:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
TLDR
Lengthto 32-bit and the trailingChecksumto CRC-32, plus thedevice.ymlschema and the operational conventions needed to make this work end-to-end.Why now
The need is concrete: DAC stimulus waveforms, firmware blobs, SD-card uploads. The 254-byte regular-format ceiling has been a friction point for years. The previous
ExtendedLengthv1 specification was unimplemented across every device and client and was removed earlier this year at #209. The successor "Blob" thread at #186 has been open for around six months without convergence, accumulating several incompatible counter-proposals.This proposal is the result of design work that resolved the main points of contention by separating concerns that the original thread had conflated. The result is compact enough to land at the SRM rather than continue iterating in the original thread.
The proposal at a glance
The proposal introduces an
ExtendedLengthflag bit in theMessageTypefield of the 8-bit binary protocol. When the flag is set, theLengthfield is interpreted as a 32-bit little-endian integer and the trailingChecksumis interpreted as a CRC-32 with the IEEE 802.3 polynomial. Variable-length registers gain amaxLengthattribute indevice.yml. Whether a register's frames use regular or extended framing is derived mechanically from the schema, not declared. Device behaviour for extended-length registers, including the reply contract and a tiered core-support model, is specified in a separate Device Registers and Operation extension.Four issues:
Length, the CRC-32.Readrequests carry empty payloads and never set the flag.device.ymlschema for variable-length registers; folds with Support variable-length registers indevice.ymlregister specifications #116.The architectural reframing
The original "Blob" framing conflated three different concerns: a "Blob" message type at the wire level, a category of registers in the schema, and behavioural conventions for those registers. Every counter-proposal in the original thread had to touch all three at once, and the design space became combinatorially large.
The current proposal factors the work into three independent layers:
LengthandChecksumfield encodings. Nothing about registers.maxLengthattribute, plus the rule that encoding strategy is derived from the size. Nothing about device behaviour.Concretely this means that the term "blob register" is no longer formally defined anywhere. Registers have a
type, a length mode (lengthormaxLength), and a maximum size; whether a register requires extended framing is derived mechanically. Each issue can be reviewed independently of the others. Cross-references are captured in each issue'sRelated Issuessection. The 32-bit binary protocol is explicitly out of scope since it is not yet ratified and will be handled separately if and when it is.Key design decisions
Each item is a working baseline that downstream issues build on. The reasoning is in the relevant issue's Motivation and Alternatives sections.
MessageType(mask0x10). The flag preserves clean parser dispatch and keeps the existingRead/Write/Eventsemantics intact.Length, not 24-bit. A clean contiguous field rather than reusing the removedExtendedLengthbytes. Aesthetic alignment toward a future 32-bit protocol..NETSystem.IO.Hashingpackage, in the Pico SDK as DMA sniffer mode 0x0, and via standard table-based implementations elsewhere.maxLengthattribute, not a sentinel forlength. A new attribute mutually exclusive with the existing integerlength. Keeps JSON Schema validation clean and existing fixed-length declarations untouched.length × sizeof(type)ormaxLength × sizeof(type).device.ymldeclares any register that needs extended framing implement the full parser, the 32-bitLengtharithmetic, and CRC-32 computation.Accepted trade-offs
The proposal accepts three trade-offs that downstream tooling will feel.
Addressand bulk-loads each per-register stream into an N-dimensional matrix on read. Variable-length registers break the shape-alignment assumption. This is flagged as an open question with explicit decision points in Schema for variable-length registers #220 because the right resolution involves cross-stack alignment.Portfield today. The working position is that hubs are transparent for extended-length frames; this needs explicit confirmation since hub behaviour is currently underspecified across the rest of the Device Registers and Operation specification.Engagement by stack
This proposal touches multiple stacks unevenly. Each section below indicates which issues are most relevant.
harp-tech/core.atxmega(ATxmega-side firmware). Most directly affected by the resource constraints baked into the proposal: the no-mandatory-crypto rule and the tiered core-support split were chosen with ATxmega-class devices in mind. The Drawbacks section of Add ExtendedLength flag to the binary protocol #218 also calls out a specific ATxmega-side detail we could not verify during drafting, namely whether the AU variants' hardware CRC peripheral supports the IEEE 802.3 polynomial directly. Review of this detail by maintainers familiar with the AU CRC peripheral would be particularly valuable. The main reads are Add ExtendedLength flag to the binary protocol #218 for the binary protocol diff and Device operation conventions for extended-length registers #221 for the operational conventions.harp-tech/core.pico(Pico-side firmware). The Pico SDK DMA sniffer mode 0x0 is the IEEE 802.3 polynomial, so hardware-accelerated CRC is already available on both RP2040 and RP2350. The main read is Device operation conventions for extended-length registers #221 for the device-operation conventions, especially the reply contract and the overrun/timeout/cancellation/atomicity sub-section. Existing prototyping work that picked up the original Blob discussion can transition cleanly to the locked baseline.bonsai-rx/harpand adjacent Bonsai-side tooling. Most affected by the single-stream logging trade-off and the variable-length stream shape-alignment question. The main reads are Device operation conventions for extended-length registers #221 logging implications section and Schema for variable-length registers #220 logging compatibility unresolved question. Both raise concrete decisions for the Bonsai-side workflow.harp-tech/harp-pythonand other client codegen pipelines. The main reads are Schema for variable-length registers #220 for the schema additions and codegen impact, plus Add ExtendedLength flag to the binary protocol #218 for the framing rules. Each codegen pipeline already handles fixedlength; the variable-length path is a small extension rather than a rewrite.Open questions for SRM
The following items are held open for SRM. Each has a working position stated in the relevant issue.
What to do with this discussion
This discussion is a navigator, not a substitute for the issue bodies. A stakeholder who reads only this discussion will be oriented to the design and able to identify which issues most concern their stack, but the actual review and approval require reading the relevant issue body. The four issues are short and focused for exactly this reason.
#186 will be closed and redirected to the new set of issues once the SRM-side conversation has started.
All reactions