Quartus® Prime Pro Edition User Guide: Platform Designer

ID 683609
Date 7/07/2025
Public
Document Table of Contents

6.9.2. Operation— Avalon® -ST Bytes to Packets Converter IP

The Avalon® -ST Bytes to Packets Converter IP receives streams of bytes and transforms them into packets. When parsing incoming bytestreams, the IP decodes special characters in the following manner, with higher priority operations listed first:
  • Escape (0x7d)—The IP drops the byte. The next byte is XOR'ed with 0x20.
  • Start of packet (0x7a)—The IP drops the byte and marks the next payload byte as the start of a packet by asserting the startofpacket signal on the Avalon® -ST source interface.
  • End of packet (0x7b)—The IP drops the byte and marks the following byte as the end of a packet by asserting the endofpacket signal on the Avalon® -ST source interface. For single beat packets, both the startofpacket and endofpacket signals are asserted in the same clock cycle.

    There are two possible cases if the payload is a special character:

    • The byte sent after end of packet is ESC'ed and XOR'ed with 0x20.
    • The byte sent after end of packet is assumed to be the last byte regardless of whether or not it is a special character.
    Note: The escape character should be used after an end of packet if the next character requires it.
  • Channel number indicator (0x7c)—The core drops the byte and takes the next non-special character as the channel number.
Figure 282. Examples of Bytestreams