The AxiStreamBatcher firmware module takes incoming AxiStreams AXI stream and combines multiple sub-frames (packets) into a larger super-frame. The AxiStreamDebatcher does the reverse, deassembling the super-frame into the original frames.
The batching protocol also takes includes the some of the AXI-Stream's sideband data (TDEST and TUSER) and inserts it in the data stream as part of the batching formatinformation into the sub-frame tail.
The batching protocol is intended for use in firmware only and expects the debatching to be done in the software. Debatching not done in firmware due to the caching requirements at the sub-frame tail.
The batching protocol does not support partial frame interleaving for the sub-frames. A sub-frame must be an entire AXI stream frame.
Together these features are very useful for sending high rate (>1MHz), small AXI-Stream frame into a CPU.
Version 1 of the packetizer has been designed to allow interleaving of AXI streams
...
Name | Description |
---|---|
MAX_NUMBER_SUB_FRAME_G | Max. number of sub-frames in a super-frame |
MAX_SUPER_FRAME_THRESHOLD_G | Sets the super-frame threshold (in units of bytes) to terminate the super-frame at the end of the current sub-frame |
MAX_CLK_GAP_G | Sets the max. number of clocks cycle between sub-frame to terminate the current super-frame |
AXIS_CONFIG_G | Defines the AXI stream configuration and used to determine the AXI stream width from AXI_CONFIG_G.TDATA_BYTES_C |
The firmware batcher combines sub-The batcher combines frames in to larger super-frame. The super-frame has a 8 (or 16) byte header only 1 header per super-frame (no tail) as follows:
Bits | Name | Description | ||
---|---|---|---|---|
3:0 | VERSION | Version info. Should always be 0x1 | ||
7:4 | TYPE | WIDTH | log2( (AXI stream bit width) /16-bits)
| |
3115:168 | SEQ | Packet sequence number of super-frame | ||
44:32 | TIMEOUT_CFG |
| ||
Other | Reserved | All reserved bits (undefined) bit set to zero |
Notes
If TYPE = 16-bit AXI stream, then appended header is 2 bytes.
If TYPE = 32-bit AXI stream, then appended header is 4 bytes.
If TYPE = 64-bit AXI stream, then appended tail header is 8 bytes.
If TYPE = 128-bit AXI stream, then appended tail header is 16 bytes.
If TYPE = 256-bit AXI stream, then appended header is 32 bytes.
...
If TYPE = 512-bit AXI stream, then appended header is 64 bytes.
...
Each sub-frame within the super-frame is appended 8 (or 16) byte tail appendedappended with a tail (no header) as follows:
Bits | Name | Description | |||
---|---|---|---|---|---|
731:0 | SIZE | Number of valid bytes in the sub-frame | |||
39:32 | TDEST | TDEST of AXI-Stream sub-frame | |||
1547:840 | TUSER_FIRST | TUSER of the AXI-Stream sub-frame | |||
2355:1648 | TUSER_LAST | TUSER of last transaction of the AXI-Stream sub-frame. | |||
2859:24 | LAST_BYTE_CNT | Number of valid bytes in last transaction of frame | |||
29 | TIMEOUT | Indicates timeout event forced termination of super-frame | |||
30 | SOF | Indicates that this is the start packet of a frame. | |||
31 | EOF | Indicates that this is the last packet of a frame. | |||
56 | WIDTH | log2( (AXI stream bit width) /16-bits)
| 63:32 | SIZE | Number of valid bytes in the sub-frame |
Other | Reserved | All reserved bits (undefined) bit set to zero |
If TYPE = 16-bit AXI stream, then appended tail is 8 bytes.
If TYPE = 32-bit AXI stream, then appended tail is 8 bytes.
If TYPE = 64-bit AXI stream, then appended tail is 8 bytes.
If TYPE = 128-bit AXI stream, then appended tail is 16 bytes.
If TYPE = 256-bit AXI stream, then appended header is 32 bytes.
If TYPE = 512-bit AXI stream, then appended header is 64 bytes.
...
Larry Ruckman
ruckman@slac.stanford.edu