![]() |
AI Engine API User Guide (AIE) 2023.1
|
ADF graphs use data flow abstractions to read input data and write output data. AIE API extends such abstractions to work with its aie::vector and aie::accum data types.
Classes | |
struct | aie::tlast< T, Bool > |
interface | TLast |
Functions | |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin (adf::io_buffer< T, Dir, Config > &port) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin (const adf::io_buffer< T, Dir, Config > &port) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_circular (adf::io_buffer< T, Dir, Config > &port) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_circular (const adf::io_buffer< T, Dir, Config > &port) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_random_circular (adf::io_buffer< T, Dir, Config > &port) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_random_circular (const adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_restrict_vector (adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_restrict_vector (const adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_vector (adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_vector (const adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_vector_circular (adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_vector_circular (const adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_vector_random_circular (adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::begin_vector_random_circular (const adf::io_buffer< T, Dir, Config > &port) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::cbegin (const adf::io_buffer< T, Dir, Config > &port) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::cbegin_circular (const adf::io_buffer< T, Dir, Config > &port) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::cbegin_random_circular (const adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::cbegin_restrict_vector (const adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::cbegin_vector (const adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::cbegin_vector_circular (const adf::io_buffer< T, Dir, Config > &port) |
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , typename Dir , typename Config > | |
constexpr auto | aie::cbegin_vector_random_circular (const adf::io_buffer< T, Dir, Config > &port) |
template<aie::AccumElemBaseType T, unsigned N> | |
constexpr output_stream< T > & | operator<< (output_stream< T > &w, const aie::accum< T, N > &acc) |
template<typename T , unsigned N> | |
constexpr output_stream< T > & | operator<< (output_stream< T > &w, const aie::vector< T, N > &v) |
template<typename T > | |
constexpr output_stream< T > & | operator<< (output_stream< T > &w, const T &v) |
template<typename T , aie::TLast< T > TL> | |
constexpr output_stream< T > & | operator<< (output_stream< T > &w, const TL &tl) |
template<aie::AccumElemBaseType T, unsigned N> | |
constexpr output_stream< T > * | operator<< (output_stream< T > *w, const aie::accum< T, N > &acc) |
template<typename T , unsigned N> | |
constexpr output_stream< T > * | operator<< (output_stream< T > *w, const aie::vector< T, N > &v) |
template<typename T > | |
constexpr output_stream< T > & | operator<< (output_stream< T > *w, const T &v) |
template<typename T , aie::TLast< T > TL> | |
constexpr output_stream< T > * | operator<< (output_stream< T > *w, const TL &tl) |
template<unsigned N, aie::AccumElemBaseType T> | |
constexpr input_stream< T > & | operator>> (input_stream< T > &w, aie::accum< T, N > &acc) |
template<unsigned N, typename T > | |
constexpr input_stream< T > & | operator>> (input_stream< T > &w, aie::vector< T, N > &v) |
template<typename T , aie::TLast< T > TL> | |
constexpr input_stream< T > & | operator>> (input_stream< T > &w, const TL &tl) |
template<typename T > | |
constexpr input_stream< T > & | operator>> (input_stream< T > &w, T &v) |
template<unsigned N, aie::AccumElemBaseType T> | |
constexpr input_stream< T > * | operator>> (input_stream< T > *w, aie::accum< T, N > &acc) |
template<unsigned N, typename T > | |
constexpr input_stream< T > * | operator>> (input_stream< T > *w, aie::vector< T, N > &v) |
template<typename T , aie::TLast< T > TL> | |
constexpr input_stream< T > * | operator>> (input_stream< T > *w, const TL &tl) |
template<typename T > | |
constexpr input_stream< T > & | operator>> (input_stream< T > *w, T &v) |
template<unsigned N, aie_stream_resource_in Resource = aie_stream_resource_in::none, typename T > | |
aie::vector< T, N > | readincr_v (input_stream< T > *w) |
template<unsigned N, aie::AccumElemBaseType T> | |
aie::accum< T, N > | readincr_v (input_stream< T > *w) |
template<unsigned N, aie_stream_resource_in Resource = aie_stream_resource_in::none, typename T > | |
aie::vector< T, N > | readincr_v (input_stream< T > *w, bool &tlast) |
template<unsigned N, aie_dm_resource Resource = aie_dm_resource::none, typename T > | |
aie::vector< T, N > | window_read_v (input_window< T > *w) |
template<unsigned N, aie_dm_resource Resource = aie_dm_resource::none, typename T > | |
void | window_read_v (input_window< T > *w, aie::vector< T, N > &value) |
template<unsigned N, aie_dm_resource Resource = aie_dm_resource::none, typename T > | |
aie::vector< T, N > | window_readdecr_v (input_window< T > *w) |
template<unsigned N, aie_dm_resource Resource = aie_dm_resource::none, typename T > | |
void | window_readdecr_v (input_window< T > *w, aie::vector< T, N > &value) |
template<unsigned N, aie_dm_resource Resource = aie_dm_resource::none, typename T > | |
aie::vector< T, N > | window_readincr_v (input_window< T > *w) |
template<unsigned N, aie_dm_resource Resource = aie_dm_resource::none, typename T > | |
void | window_readincr_v (input_window< T > *w, aie::vector< T, N > &value) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , unsigned N> | |
void | window_write (output_window< T > *w, const aie::vector< T, N > &value) |
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , unsigned N> | |
void | window_writeincr (output_window< T > *w, const aie::vector< T, N > &value) |
template<aie::AccumElemBaseType T, unsigned N> | |
void | writeincr (output_stream< T > *w, const aie::accum< T, N > &value) |
template<aie_stream_resource_out Resource = aie_stream_resource_out::none, typename T , unsigned N> | |
void | writeincr (output_stream< T > *w, const aie::vector< T, N > &value) |
template<aie_stream_resource_out Resource = aie_stream_resource_out::none, typename T , unsigned N> | |
void | writeincr (output_stream< T > *w, const aie::vector< T, N > &value, bool tlast) |
struct aie::tlast |
Type used to wrap objects read/written from/to streams that also encapsulates TLAST information. When passed into output AXI streams, this object will say whether TLAST is asserted after the write operation. When read from input AXI streams, the object will say whether TLAST was asserted by the writer.
Public Types | |
using | value_type = T |
Public Member Functions | |
tlast (const tlast &)=delete | |
constexpr | tlast (T value, Bool t_last) |
tlast & | operator= (const tlast &)=delete |
Public Attributes | |
Bool | t_last |
T | value |
using aie::tlast< T, Bool >::value_type = T |
|
delete |
|
inlineconstexpr |
Constructor used to initialize the object. For input AXI streams, both arguments are references to the variables where to store the read value and TLAST. For output AXI streams, these are the value and TLAST to be written.
|
delete |
Bool aie::tlast< T, Bool >::t_last |
T aie::tlast< T, Bool >::value |
interface aie::TLast |
Concept for tlast objects passed to << and >> operators with streams.
|
constexpr |
Returns a foward iterator over given io buffer. Requires given io buffer to have linear addressing mode.
Resource |
port | The io buffer |
|
constexpr |
Returns a foward const iterator over given io buffer. Requires given buffer port to have linear addressing mode.
Resource |
port | The io buffer |
|
constexpr |
Returns a foward circular iterator over given io buffer.
Resource |
port | The io buffer |
|
constexpr |
Returns a const foward circular iterator over given io buffer.
Resource |
port | The io buffer |
|
constexpr |
Returns a random iterator over given io buffer. If the port has circular addressing the iterator is a circular random iterator.
Resource |
port | The io buffer |
|
constexpr |
Returns a random const iterator over given io buffer. If the port has circular addressing the iterator is a circular random const iterator.
Resource |
port | The io buffer |
|
constexpr |
Returns a restrict vector iterator over given io buffer. Requires given io buffer to have linear addressing mode.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a const restrict vector iterator over given io buffer. Requires given buffer port to have linear addressing mode.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a vector iterator over given io buffer. Requires given io buffer to have linear addressing mode.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a const vector iterator over given io buffer. Requires given buffer port to have linear addressing mode.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a vector circular iterator over given io buffer.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a const vector circular iterator over given io buffer.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a vector random circular iterator over given io buffer.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a const vector random circular iterator over given io buffer.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a foward const iterator over given io buffer. Requires given buffer port to have linear addressing mode.
Resource |
port | The io buffer |
|
constexpr |
Returns a const foward iterator over given io buffer.
Resource |
port | The io buffer |
|
constexpr |
Returns a random const iterator over given io buffer. If the port has circular addressing the iterator is a circular random const iterator.
Resource |
port | The io buffer |
|
constexpr |
Returns a const restrict vector iterator over given io buffer. Requires given buffer port to have linear addressing mode.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a const vector iterator over given io buffer. Requires given buffer port to have linear addressing mode.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a const vector circular iterator over given io buffer.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Returns a const vector random circular iterator over given io buffer.
Elems | The size of the vector |
Resource | Bank annotation |
port | The io buffer |
|
constexpr |
Writes an accumulator into the output cascade stream
w | Output stream |
acc | Accumulator to be written |
|
constexpr |
Writes a vector into the output AXI stream. TLAST is not asserted.
w | Output stream |
v | Vector to be written |
|
constexpr |
Writes a value into the output AXI stream. TLAST is not asserted.
w | Output stream |
v | Value to be written |
|
constexpr |
Writes a value or vector into the output AXI stream. The tlast object says whether TLAST is asserted.
w | Output stream |
tl | Object that contains the value or vector to be written and whether TLAST is asserted. |
|
constexpr |
Writes an accumulator into the output cascade stream
w | Output stream |
acc | Accumulator to be written |
|
constexpr |
Writes a vector into the output AXI stream. TLAST is not asserted.
w | Output stream |
v | Vector to be written |
|
constexpr |
Writes a value into the output AXI stream. TLAST is not asserted.
w | Output stream |
v | Value to be written |
|
constexpr |
Writes a value into the output AXI stream. The tlast object says whether TLAST is asserted.
w | Output stream |
tl | Object that contains the value to be written and whether TLAST is asserted. |
|
constexpr |
Reads an accumulator from the input cascade stream.
w | Input stream |
acc | Accumulator read from stream. Output argument. |
|
constexpr |
Reads a vector from the input AXI stream.
w | Input stream |
v | Vector read from stream. Output argument. |
|
constexpr |
Reads a value or vector from the input AXI stream. The tlast object says whether TLAST is asserted.
w | Input stream |
tl | Object that contains the value or vector read from stream. Output argument. |
|
constexpr |
Reads a value from the input AXI stream.
w | Input stream |
v | Value read from stream. Output argument. |
|
constexpr |
Reads an accumulator from the input cascade stream.
w | Input stream |
acc | Accumulator read from stream. Output argument. |
|
constexpr |
Reads a vector from the input AXI stream.
w | Input stream |
v | Vector read from stream. Output argument. |
|
constexpr |
Reads a value or vector from the input AXI stream. The tlast object says whether TLAST is asserted.
w | Input stream |
tl | Object that contains the value or vector read from stream. Output argument. |
|
constexpr |
Reads a value from the input AXI stream.
w | Input stream |
v | Value read from stream. Output argument. |
aie::vector< T, N > readincr_v | ( | input_stream< T > * | w | ) |
Reads a vector from the input AXI stream.
N | Size of the vector to be read |
Resource | Stream in resource. This information can be leveraged by the compiler to schedule stream reads in parallel when possible |
w | Input stream |
aie::accum< T, N > readincr_v | ( | input_stream< T > * | w | ) |
Reads an accumulator from the input cascade stream.
w | Input stream |
aie::vector< T, N > readincr_v | ( | input_stream< T > * | w, |
bool & | tlast | ||
) |
Reads a vector from the input AXI stream and returns whether TLAST has been asserted.
N | Size of the vector to be read |
Resource | Stream in resource. This information can be leveraged by the compiler to schedule stream reads in parallel when possible |
w | Input stream |
tlast | Output argument that tells whether TLAST has been asserted. |
aie::vector< T, N > window_read_v | ( | input_window< T > * | w | ) |
Read a vector from an input window.
N | Size of the vector to be read |
w | Input window |
void window_read_v | ( | input_window< T > * | w, |
aie::vector< T, N > & | value | ||
) |
Read a vector from an input window.
w | Input window |
value | Output parameter that contains the read vector |
aie::vector< T, N > window_readdecr_v | ( | input_window< T > * | w | ) |
Read a vector from an input window and decrement the window pointer.
N | Size of the vector to be read |
w | Input window |
void window_readdecr_v | ( | input_window< T > * | w, |
aie::vector< T, N > & | value | ||
) |
Read a vector from an input window and decrement the window pointer.
w | Input window |
value | Output parameter that contains the read vector |
aie::vector< T, N > window_readincr_v | ( | input_window< T > * | w | ) |
Read a vector from an input window and increment the window pointer.
N | Size of the vector to be read |
w | Input window |
void window_readincr_v | ( | input_window< T > * | w, |
aie::vector< T, N > & | value | ||
) |
Read a vector from an input window and increment the window pointer.
w | Input window |
value | Output parameter that contains the read vector |
void window_write | ( | output_window< T > * | w, |
const aie::vector< T, N > & | value | ||
) |
Write a vector into an output window.
w | Output window |
value | Vector to be written |
void window_writeincr | ( | output_window< T > * | w, |
const aie::vector< T, N > & | value | ||
) |
Write a vector into an output window and increment the window pointer.
w | Output window |
value | Vector to be written |
void writeincr | ( | output_stream< T > * | w, |
const aie::accum< T, N > & | value | ||
) |
Writes an accumulator into the output cascade stream.
w | Output stream |
value | Accumulator to be written |
void writeincr | ( | output_stream< T > * | w, |
const aie::vector< T, N > & | value | ||
) |
Writes a vector into the output AXI stream. TLAST is not asserted.
Resource | Stream out resource. This information can be leveraged by the compiler to schedule stream writes in parallel when possible |
w | Output stream |
value | Vector to be written |
void writeincr | ( | output_stream< T > * | w, |
const aie::vector< T, N > & | value, | ||
bool | tlast | ||
) |
Writes a vector into the output AXI stream. An additional argument says whether TLAST is asserted.
Resource | Stream out resource. This information can be leveraged by the compiler to schedule stream writes in parallel when possible |
w | Output stream |
value | Vector to be written |
tlast | TLAST is asserted if true |