Packetizer Protocol Core

For packetizer v1 links, Rogue provides rogue.protocols.packetizer.Core. This class owns the packetizer v1 controller, exposes the lower transport edge through transport(), and creates per-destination application endpoints with application(dest).

Use Core when software must match an existing packetizer v1 firmware or software peer. For new deployments where the protocol version is still open, Packetizer Protocol CoreV2 is usually the better choice.

Protocol Behavior

Packetizer v1 breaks one incoming frame into one or more transport packets and reassembles those packets on the receive side. It carries the usual AXI-Stream sideband metadata in the wire format:

  • TDest

  • TID

  • TUserFirst

  • TUserLast

  • EOF state

Each v1 packet contains:

  • An 8-byte header with version, frame number, packet number, TDest, TID, and TUserFirst.

  • A 1-byte tail with TUserLast and EOF.

The design tradeoff is that EOF and TUserLast live in a tail rather than in the header. That allows streaming behavior without buffering an entire packet payload before forwarding.

Operational Notes

  • TUserLast is only valid when EOF is asserted.

  • TDest, TID, and TUserFirst are repeated in each packet header even though they are frame-level attributes.

  • Destination endpoints are allocated lazily when application(dest) is called.

Key Constructor Arguments

Core(enSsi)

  • enSsi enables SSI framing behavior.

Common Controls

  • transport() returns the lower-layer stream edge.

  • application(dest) returns the destination endpoint for values 0..255.

  • getDropCount() reports the controller drop count.

  • setTimeout(timeout) forwards timeout tuning into the controller, in microseconds.

Python Example

import rogue.protocols.packetizer
import rogue.protocols.rssi

# Packetizer v1 core with SSI framing enabled.
pkt = rogue.protocols.packetizer.Core(True)

# Lower protocol layer.
rssi = rogue.protocols.rssi.Client(1472 - 8)
rssi.application() == pkt.transport()

# Outbound traffic enters destination channel 1.
data_source >> pkt.application(1)

# Inbound traffic from destination channel 0 is delivered to a sink.
pkt.application(0) >> reg_sink

C++ Example

#include <rogue/protocols/packetizer/Core.h>

namespace rpp = rogue::protocols::packetizer;

int main() {
    // Packetizer v1 core with SSI framing enabled.
    auto pkt = rpp::Core::create(true);

    // Access one application destination endpoint.
    auto app0 = pkt->application(0);
    (void)app0;

    // Query drop count for diagnostics.
    auto dropCount = pkt->getDropCount();
    (void)dropCount;

    // Lower-layer connection would be made through pkt->transport().
    return 0;
}

Threading And Lifecycle

Core does not start its own worker thread. Packetization and depacketization run in the caller context of the surrounding stream graph, while lifecycle management belongs to the lower transport layer attached to transport().

Compatibility Notes

Logging

Packetizer logging is emitted by the shared controller logger:

  • pyrogue.packetizer.Controller

Enable it before constructing packetizer objects:

import rogue

rogue.Logging.setFilter('pyrogue.packetizer', rogue.Logging.Debug)

This logger is the main source for packet-drop, framing, and timeout messages. There is no separate per-instance debug helper on Core.

API Reference