MLIR-AIE 1.4.5.dev
xilinx::AIE::ShimTransferSpans Class Reference

When the runtime sequences have each shim end's transfers in flight, so that ends never in flight together can take turns on one shim channel. More...

#include "aie/Dialect/AIE/Transforms/AIEShimSharing.h"

Classes

struct  End
 A shim end a runtime sequence transfers through. More...

Public Member Functions

 ShimTransferSpans (DeviceOp device, llvm::function_ref< std::optional< End >(mlir::StringAttr)> endOf)
 endOf maps a symbol a runtime sequence transfers through to the objectFIFO end it belongs to, or nothing when it belongs to none.
bool apart (mlir::StringAttr a, mlir::StringAttr b) const
 Whether the ends of a and b are never in flight together.
llvm::SmallVector< llvm::SmallVector< unsigned > > groups (llvm::ArrayRef< mlir::StringAttr > ends) const
 Splits ends into groups whose members are pairwise apart, each group taking one channel: first fit, in name order.

Detailed Description

When the runtime sequences have each shim end's transfers in flight, so that ends never in flight together can take turns on one shim channel.

Different runtime sequences never overlap (a dispatch finishes its transfers before the next starts). Within one, a receiving end's transfers must all be awaited or freed before the other's first, and a loop spans its body; a sending end stays in flight to the end of its sequence, as a shim MM2S task reports itself complete before its words leave the shim. Ends are known by their objectFIFO's name, before or after split. The placer and objectFIFO allocation both decide by this, so they agree.

Definition at line 30 of file AIEShimSharing.h.

Constructor & Destructor Documentation

◆ ShimTransferSpans()

ShimTransferSpans::ShimTransferSpans ( DeviceOp device,
llvm::function_ref< std::optional< End >(mlir::StringAttr)> endOf )

endOf maps a symbol a runtime sequence transfers through to the objectFIFO end it belongs to, or nothing when it belongs to none.

Definition at line 18 of file AIEShimSharing.cpp.

Member Function Documentation

◆ apart()

bool ShimTransferSpans::apart ( mlir::StringAttr a,
mlir::StringAttr b ) const

Whether the ends of a and b are never in flight together.

Definition at line 76 of file AIEShimSharing.cpp.

Referenced by groups().

◆ groups()

SmallVector< SmallVector< unsigned > > ShimTransferSpans::groups ( llvm::ArrayRef< mlir::StringAttr > ends) const

Splits ends into groups whose members are pairwise apart, each group taking one channel: first fit, in name order.

Returns indices into ends.

Definition at line 98 of file AIEShimSharing.cpp.

References apart().


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