IRON 1a5eed49d3c0721a318ac369f725acc96b7c4584
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
iron.dataflow.flow.PacketFlow Class Reference
Inheritance diagram for iron.dataflow.flow.PacketFlow:
Inheritance graph
[legend]
Collaboration diagram for iron.dataflow.flow.PacketFlow:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, int pkt_id, src, dst, *WireBundle src_port=WireBundle.DMA, int src_channel=0, WireBundle dst_port=WireBundle.DMA, int dst_channel=0, Sequence[PacketDest] extra_dsts=(), bool keep_pkt_header=False, str|None shim_symbol=None)
 
int pkt_id (self)
 
 op (self)
 
 all_tiles (self)
 
None resolve (self, ir.Location|None loc=None, ir.InsertionPoint|None ip=None)
 
- Public Member Functions inherited from iron.resolvable.Resolvable
list tiles (self)
 

Protected Attributes

 _pkt_id
 
 _src
 
 _dst
 
 _src_port
 
 _src_channel
 
 _dst_port
 
 _dst_channel
 
 _keep_pkt_header
 
 _shim_symbol
 
 _op
 
 _extra_dsts
 

Detailed Description

An explicit packet-switched route with caller-controlled ``pkt_id``.

Peer of :class:`Flow` for the packet-switched case.  Unlike the
``--packet-sw-objFifos`` global lowering (which auto-assigns sequential
packet IDs to every ObjectFifo in the design), :class:`PacketFlow`
exposes the packet ID directly so the same ID can be reused across
stages and used as a routing decision (e.g. memtile dispatch by
``pkt_id`` to one of several compute cores).

Lowers to a single ``aie.packetflow`` op containing one
``aie.packet_source`` and one or more ``aie.packet_dest`` ops in its
region.

Constructor & Destructor Documentation

◆ __init__()

iron.dataflow.flow.PacketFlow.__init__ (   self,
int  pkt_id,
  src,
  dst,
*WireBundle   src_port = WireBundle.DMA,
int   src_channel = 0,
WireBundle   dst_port = WireBundle.DMA,
int   dst_channel = 0,
Sequence[PacketDest]   extra_dsts = (),
bool   keep_pkt_header = False,
str | None   shim_symbol = None 
)
Construct a PacketFlow.

Args:
    pkt_id: The packet ID — the same byte the routing fabric uses to
        dispatch.  Caller controls the value (often reused across
        stages so a memtile can re-emit packets keeping the original
        ID for downstream routing).
    src, dst: Source / primary destination tiles.
    src_port / src_channel / dst_port / dst_channel: As for :class:`Flow`.
    extra_dsts: Additional destination endpoints if this packet needs
        to fan out.  Each is a :class:`PacketDest`.
    keep_pkt_header: If ``True``, downstream tile receives the 4-byte
        packet header alongside the payload (useful when the receiver
        needs to re-emit with the same pkt_id).  Defaults to ``False``.
    shim_symbol: Same meaning as on :class:`Flow` — auto-emit a
        matching ``aie.shim_dma_allocation`` when one endpoint is a
        shim tile.

Member Function Documentation

◆ all_tiles()

iron.dataflow.flow.PacketFlow.all_tiles (   self)

◆ op()

iron.dataflow.flow.PacketFlow.op (   self)

◆ pkt_id()

int iron.dataflow.flow.PacketFlow.pkt_id (   self)

◆ resolve()

None iron.dataflow.flow.PacketFlow.resolve (   self,
ir.Location | None   loc = None,
ir.InsertionPoint | None   ip = None 
)
Resolve the current object into one or more MLIR operations.
Should only be called within an MLIR context.

Args:
    loc (ir.Location | None, optional): Location is used by MLIR object during construction in some cases. Defaults to None.
    ip (ir.InsertionPoint | None, optional): InsertionPoint is used by MLIR object during construction in some cases. Defaults to None.

Reimplemented from iron.resolvable.Resolvable.

Member Data Documentation

◆ _dst

iron.dataflow.flow.PacketFlow._dst
protected

◆ _dst_channel

iron.dataflow.flow.PacketFlow._dst_channel
protected

◆ _dst_port

iron.dataflow.flow.PacketFlow._dst_port
protected

◆ _extra_dsts

iron.dataflow.flow.PacketFlow._extra_dsts
protected

◆ _keep_pkt_header

iron.dataflow.flow.PacketFlow._keep_pkt_header
protected

◆ _op

iron.dataflow.flow.PacketFlow._op
protected

◆ _pkt_id

iron.dataflow.flow.PacketFlow._pkt_id
protected

◆ _shim_symbol

iron.dataflow.flow.PacketFlow._shim_symbol
protected

◆ _src

iron.dataflow.flow.PacketFlow._src
protected

◆ _src_channel

iron.dataflow.flow.PacketFlow._src_channel
protected

◆ _src_port

iron.dataflow.flow.PacketFlow._src_port
protected

The documentation for this class was generated from the following file: