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 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 interleaved AXI streams, which means the same continuous TDEST must be asserted for the entire sub-frame.  Different sub-frames can have different TDEST values.

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

...

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
AXI_CONFIG_GDefines the AXI stream configuration and used to determine the AXI stream width from AXI_CONFIG_G.TDATA_BYTES_C

...

Packet Header

The batcher combines frames in to larger super-frame. The super frame has a 8 (or 16) byte header as follows:

BitsNameDescription
3:0VERSIONVersion info. Should always be 0x1
7:4TYPEWIDTH
  • 0x0: 16-bit AXI stream
  • 0x3: 32-bit AXI stream
  • 0x7
0
  • : 64-bit AXI stream
1
  • 0xF: 128-bit AXI stream
3115:168SEQPacket 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 tail header is 8 bytes. 

    • If TYPE = 128-bit AXI stream, then appended tail header is 16 bytes.

    ...

    Packet Tail

    Each sub-frame within the super-frame is appended 8 (or 16) byte tail appended:

    BitsNameDescription
    7:0TDESTTDEST of AXI-Stream sub-frame
    15:8TUSER_FIRSTTUSER of the AXI-Stream sub-frame
    23:16TUSER_LASTTUSER of last transaction of the AXI-Stream sub-frame.
    2831:24LAST_BYTE_CNTNumber of valid bytes in last transaction of frame
    29TIMEOUTIndicates timeout event forced termination of super-frame
    30SOFIndicates that this is the start packet of a frame.
    31EOFIndicates that this is the last packet of a frame.sub-frame
    63:32SIZENumber of valid bytes in the sub-frame
    OtherReservedAll reserved bits (undefined) bit set to zero

    Notes

    • If TYPE =  6416-bit AXI stream, then appended tail is 8 bytes. 

    • If TYPE = 12832-bit AXI stream, then appended tail is 16 8 bytes.

    • TUserFirst data is only valid if the SOF bit is 1.
    • If TYPE = 64-bit AXI stream, then appended tail is 8 bytes. 

    • TUserLast data is only valid if the EOF bit is 1

      If TYPE = 128-bit AXI stream, then appended tail is 16 bytes.


    ...

    Contact

    Larry Ruckman

    ruckman@slac.stanford.edu