Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

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 , TID, TUSER) and inserts it in the data stream as part of the batching formatand TUSER) information 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

Details

Packet Header

Details

...

Firmware Generics

NameDescription
MAX_NUMBER_SUB_FRAME_GMax. number of sub-frames in a super-frame
MAX_SUPER_FRAME_THRESHOLD_GSets the super-frame threshold (in units of bytes) to terminate the super-frame at the end of the current sub-frame
MAX_CLK_GAP_GSets the max. number of clocks cycle between sub-frame to terminate the current super-frame
AXIS_CONFIG_GDefines the AXI stream configuration and used to determine the AXI stream width from AXI_CONFIG_G.TDATA_BYTES_C

Super-Frame Header

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:

BitsNameDescription
3:0VERSIONVersion info. Should always be 0x1
7:4TYPEWIDTHlog2( (AXI stream bit width) /16-bits)
  • 0x0: 16
0: 64
  • -bit AXI stream
1
  • 0x1:
128
  • 32-bit AXI stream
11:8CRC

0: No CRC
1: CRC Included

  • 0x2: 64-bit AXI stream
  • 0x3: 128-bit AXI stream
15:831:16SEQPacket sequence number of super-frame44:32TIMEOUT_CFG
  • Forwards the batcher's timeout configuration
  • zero value defined as no timeout used
  • In units of ms
  • 4.096 second max. timout
  • Used for diagnostics
    OtherReservedAll 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 header is 8 bytes. 

    • If TYPE = 128-bit AXI stream, then appended 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.

    ...

    Sub-Frame Tail

    Each packet sub-frame within the super-frame is appended 8 byte tail appendedwith a tail (no header) as follows:

    BitsNameDescription
    731:0TDESTSIZETDEST of AXI-Stream Number of valid bytes in the sub-frame
    1539:832TIDTDESTTID TDEST of AXI-Stream sub-frame
    2347:1640TUSER_FIRSTTUSER of the AXI-Stream sub-frame
    3155:2448TUSER_LASTTUSER of last transaction of the AXI-Stream sub-frame.
    4459:3256TIMER_VALUE
    • Time between header and tail
    • Units of ms
    • Used for diagnostics
    45SOFIndicates that this is the start packet of a frame.
    46EOFIndicates that this is the last packet of a frame.
    56:48LAST_BYTE_CNTNumber of valid bytes in last transaction of frame
    WIDTHlog2( (AXI stream bit width) /16-bits)
    • 0x0: 16-bit AXI stream
    • 0x1: 32-bit AXI stream
    • 0x2: 64-bit AXI stream
    • 0x3: 128-bit AXI stream
    OtherReservedAll reserved bits (undefined) bit set to zero

    Notes

    • If TYPE =

    ...

    • 16-bit AXI stream, then appended tail is 8 bytes. 

    • If TYPE =

    ...

    • 32-bit AXI stream, then appended tail is

    ...

    Notes

    • Having tUserFirst/SOF and tUserLast/EOF in a tail allows the packetizer to function in streaming fashion and not have to buffer each packet worth of data in a FIFO.
    • TDest, TId and TUserFirst are placed in the header of every packet, even though they don’t change after the first packet of the frame.
    • TUserLast data is only valid if the EOF bit is 1.

    CRC Notes

    ...

    • 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

    ...

     

    HeaderDataTail (32 lsb)
    0x8000000000000222
    0xAFFECAFEFEEDBEEF
    0x00080102

    ...

    0x8000000000000222
    0xAFFECAFEFEEDBEEF
    0x1E579C9C00080102

     

    • If CRC-support is not enabled in the firmware then the CRC bits are all zero and no CRC is checked on incoming traffic (but the CRC field must be zero).
    • If CRC-support is enabled in firmware then the peer must provide a CRC.
    • Note that the 8 - LAST_BYTE_CNT (arbitrary) bytes which are not part of the payload must be included in the CRC computation. While these bytes are not part of the payload they are still part of the (de-)packetizer frame

      .

    ...

    Contact

    Larry Ruckman

    ruckman@slac.stanford.edu