Add UDP packet format docs#205
Conversation
| - **Bits 0..=3**: Reserved for header type | ||
| - **Bits 4..=8**: Length of header | ||
| - **Bits 9..=10**: Not used | ||
| - **Bit 11**: Bad frame |
There was a problem hiding this comment.
What exactly constitutes a "bad frame"?
There was a problem hiding this comment.
This was what that bit was used for in DAE2/3. Not sure if it was actually implemented on those designs.
So far it isn't used and I have no plans to at the moment.
Could probably make bits 31-9 "not used"
There was a problem hiding this comment.
do we need a version number in the header for if we do change layout? Or can we be sure we will always be able to update all possible clients and not need to read any old data?
There was a problem hiding this comment.
or that a board with old firmware gets used and confuses/crashes new clients
There was a problem hiding this comment.
I think having a header type makes sense if it helps provides some flexibility in the future.
Not sure if we do want a separate marker for header length or if we combine the two.
There was a problem hiding this comment.
Isn't word 2 bits 4..=8 already "length of header"?
We could almost certainly accomodate different-length headers later if they had e.g. a different "header information" word (maybe later we have a 'EndOfRunHeaderV2' header type)?
There was a problem hiding this comment.
I guess i had a bit of a general design question here in that should we have a standard ISIS UDP header format that we use for anything we might do, be it detector streaming or something else in future, with the idea to be extensible and avoid the problem of some software misinterpreting a UDP packet. Maybe word 0 (marker byte) could do this to some level. Currently word 0 is fixed, word 1 is some detector specific flags, word 2 has a header type (4 bits) plus some other detector/dae specific stuff. It feels header type should be earlier on in the structure as it is more general than the information in word 1 if we think of header type as not just being "detector header type" but a general packet type?
| - **Bit 0**: FIFO veto | ||
| - **Bit 1**: SMP veto | ||
| - **Bit 2**: TS2 pulse veto | ||
| - **Bit 3**: Wrong pulse veto |
There was a problem hiding this comment.
What exactly is a "wrong pulse"?
Is this e.g. not the first TS1 pulse when someone has selected "First TS1" timing source?
| - **Bit 2**: TS2 pulse veto | ||
| - **Bit 3**: Wrong pulse veto | ||
| - **Bit 4**: Unused | ||
| - **Bit 5**: ISIS slow |
There was a problem hiding this comment.
What exactly does this mean?
|
|
||
| ### Word 15: checksum | ||
|
|
||
| - **Bits 0..=31**: Pre-DDR checksum |
There was a problem hiding this comment.
Think we decided to drop this checksum at this level...
| ### Word 8: protons-per-pulse | ||
|
|
||
| - **Bits 0..=7**: protons-per-pulse in this ISIS frame. | ||
| - **Bits 8..=31**: unused |
There was a problem hiding this comment.
DAE3 seems to send a 10 bit PPP looking at the packet definition, but i guess we don't expect to need that amount?
There was a problem hiding this comment.
The DAE3 maybe sends a 10 bit PPP but the two lowest bits are padded with 0s. If required I can pad it with 0s to make it 10 bit?
| ### Word 6: period number | ||
|
|
||
| - **Bits 0..=15**: Period number | ||
| - **Bits 16..=31**: Not used |
There was a problem hiding this comment.
in event mode period number is just an extra metadata tag - is it worth just letting it be 32 bits?
There was a problem hiding this comment.
Yea, just an extra metadata tag in event mode so I don't really mind either was on this.
Leaving it as 16 bits leaves us another 16 bits to do something else with at a later date without having to change the header length so keeps it a bit more flexible.
| - **Bits 6..=9**: External vetoes | ||
| - **Bits 10..=13**: Fast chopper vetoes | ||
| - **Bits 14..=15**: Reserved vetoes | ||
| - **Bits 16..=23**: Unused |
There was a problem hiding this comment.
Is there also a "isis not at 50hz" veto? (or is that "isis slow")
DaveTempleman
left a comment
There was a problem hiding this comment.
A few comments on some of the questions raised
| - **Bits 0..=3**: Reserved for header type | ||
| - **Bits 4..=8**: Length of header | ||
| - **Bits 9..=10**: Not used | ||
| - **Bit 11**: Bad frame |
There was a problem hiding this comment.
This was what that bit was used for in DAE2/3. Not sure if it was actually implemented on those designs.
So far it isn't used and I have no plans to at the moment.
Could probably make bits 31-9 "not used"
| ### Word 6: period number | ||
|
|
||
| - **Bits 0..=15**: Period number | ||
| - **Bits 16..=31**: Not used |
There was a problem hiding this comment.
Yea, just an extra metadata tag in event mode so I don't really mind either was on this.
Leaving it as 16 bits leaves us another 16 bits to do something else with at a later date without having to change the header length so keeps it a bit more flexible.
| ### Word 8: protons-per-pulse | ||
|
|
||
| - **Bits 0..=7**: protons-per-pulse in this ISIS frame. | ||
| - **Bits 8..=31**: unused |
There was a problem hiding this comment.
The DAE3 maybe sends a 10 bit PPP but the two lowest bits are padded with 0s. If required I can pad it with 0s to make it 10 bit?
| ### Word 2: Information | ||
|
|
||
| - **Bits 0..=3**: Reserved for header type | ||
| - **Bits 4..=8**: Length of header |
| - **Bit 0**: End of run header marker (active low) | ||
| - **Bit 1**: Veto frame packet header marker (active low) | ||
| - **Bit 2**: Sample environment packet header marker (active low) | ||
| - **Bit 3**: Not used | ||
| - **Bits 4..=31**: Always `0xFFFFFFF` |
There was a problem hiding this comment.
If all bits are high is that a neutron data packet?
| The data comes in over UDP packets, each of which is made up of 32-bit words. All data is transmitted in big-endian | ||
| format. |
There was a problem hiding this comment.
We can have multiple "messages" (headers + their data) within a single UDP packet, right?
| The data comes in over UDP packets, each of which is made up of 32-bit words. All data is transmitted in big-endian | ||
| format. |
There was a problem hiding this comment.
Can/will the UDP packets have trailing padding bytes?
No description provided.