This template class is used to build scalar data constraints on kernels, connections, and ports.
Scope
A constraint must appear inside a user graph constructor.
Member Functions
constraint<T> operator=(T)
This overloaded equality operator allows you to assign a value to a scalar constraint.
Constructors
The default constructor is not used. Instead the following special constructors are used with specific meaning.
void fabric<pl>(kernel&)
This constraint allows you to mark a kernel to be implemented on the internal programmable logic.
void fabric<aiengine>(kernel&)
This constraint allows you to mark a kernel to be implemented on the AI Engine (default).
constraint<std::string>& initialization_function(kernel&)
This constraint allows you to set a specific initialization function for each kernel. The constraint expects a string denoting the name of the initialization function. Where multiple kernels are packed on a core, each initialization function packed on the core is called exactly once. No kernel functions are scheduled until all the initialization functions packed on a core are completed.
constraint<float>& runtime<ratio>(kernel&)
This constraint allows you to set a specific core usage fraction for a kernel. This is computed as a ratio of the number of cycles taken by one invocation of a kernel (processing one block of data) to the cycle budget. The cycle budget for an application is typically fixed according to the expected data throughput and the block size being processed.
constraint<std::string>& source(kernel&)
This constraint allows you to specify the source file containing the definition of each kernel function. A source constraint must be specified for each kernel.
constraint<int>& fifo_depth(connect&)=[<depth> | (source_depth, dest_depth)]
This constraint allows you to specify the amount of slack to be inserted on a streaming connection to allow deadlock free execution.
void single_buffer(port<T>&)
This constraint allows you to specify single buffer constraint on a window port. By default, a window port is double buffered.
void initial_value(async_AIE_RTP_port)
This constraint allows you to set the initial value for an asynchronous AI Engine input run-time parameter port. It allows the destination kernel to start asynchronously with the specified initial value. You can set both scalar and array run-time parameters using this constraint.
Example scalar: initial_value(6).
Example array: initial_value({1,2,3})
void pl_axi_lite(pl_kernel) = true | false
This constraint allows you to specify whether a PL kernel uses the AXI4-Lite interface. If this constraint is not
specified, the AI Engine compiler uses the --pl-axi-lite
compiler option by default.
void pl_frequency(pl_kernel) = freq_in_MHz
This constraint allows you to set the frequency of a PL kernel in MHz.
constraint<int> stack_size(adf::kernel& k);
This constraint allows you to set stack size for individual kernel.
constraint<int> heap_size(adf::kernel& k);
This constraint allows you to set heap size for individual kernel.