Comparison between Buffer Ports and Windows - 2023.1 English

AI Engine Kernel and Graph Programming Guide (UG1079)

Document ID
UG1079
Release Date
2023-06-23
Version
2023.1 English

Buffer ports are similar to window ports. They provide a way for a kernel to operate on a block of core memory. Differences are as follows:

  • Sizes and margins of buffer ports are in number of samples, whereas sizes and margins of window ports are in bytes.
  • Buffer port size can be specified as compile-time constants by kernel owner, which is not supported for window ports.
  • Buffer port size can be optionally specified in the graph whereas window sizes must be specified using connect statements by the graph author.
  • The margin of a buffer port is specified by the kernel author in the kernel signature and it is specified only for input buffer ports. The margin of a window port is specified in the graph using the connect construct.
  • Buffer port locking mechanism is specified by kernel owner whereas window locking mechanism is specified in graph connect construct.
  • Default buffer port addressing mode is linear and can be specified as circular addressing mode. Window supports circular addressing mode only.
  • For buffer port data access, a reference pointer or an iterator are supported to perform read or write operations. For window ports data access, the iteration operation is tied directly with the action of reading or writing APIs, such as window_readincr(), and window_writeincr().
  • Buffer ports can be multi-dimensional whereas windows can only be one-dimensional.
Note: Limitations on buffer port size, window size and margin size depend on hardware constraints, hence, there is no difference between buffer port and window in terms of minimum size.