3.6.1.17 AXI4 Initiator Interface for Pointer Argument

Syntax
#pragma HLS interface argument(<arg_name>) type(axi_initiator) ptr_addr_interface(<simple|axi_target>) num_elements(<int>) max_burst_len(<int>) max_outstanding_reads(<int>) max_outstanding_writes(<int>)
Description
This pragma specifies the AXI4 initiator interface type for a pointer (including array, struct, class types) argument. For more details, see the AXI4 Initiator Interface section. This pragma is ignored if the enclosing function is not specified as the top-level.
Parameters
ParameterValueOptionalDefaultDescription
argumentstringNo-Argument name
typeaxi_targetNo-Interface type
num_elementsintegerYes-Specifies the number of elements of the argument array. Can override the array size in the argument. Only needed by the Simulate HLS Hardware (SW/HW Co-Simulation) feature and does not affect HLS-generated RTL.
ptr_addr_interfacesimple|axi_targetYes-Specifies the interface type for setting the base address of the accessing memory. The default type is simple but is changed to axi_target if Default All Interfaces to Use AXI4 Target is set.
max_burst_lenintegerYes16Specifies the maximum burst length for each AXI initiator transaction. Transfers that are larger than the maximum burst length will be split into multiple AXI transactions. The permitted values are between 1 and 256.
max_outstanding_readsintegerYes1Specifies the maximum amount of read burst requests to external AXI4 Targets that can be left outstanding (waiting for response) before the accelerator stalls. This infers a FIFO of size max_outstanding_reads*addr_size for the AR channel, and a FIFO of size max_outstanding_reads*max_burst_len*word_size for the R channel. The permitted values are between 1 and 8.
max_outstanding_writesintegerYes1Specifies the maximum amount of write burst requests to external AXI4 Targets that can be left outstanding (waiting for response) before the accelerator stalls. This infers a FIFO of size max_outstanding_writes*addr_size for the AW channel, and a FIFO of size max_outstanding_writes*max_burst_len*word_size for the W channel. The permitted values are between 1 and 8.
add_4k_boundary_protectionboolYestrueSpecifies whether or not SmartHLS should generate additional logic to protect AXI4 initiator burst transactions from crossing 4K boundaries for this argument. Setting this field to false will remove this alignment logic, but the user must then make sure that any pointer addresses given to the SmartHLS module will not result in bursting accross a 4K address boundary (a violation of the AXI4 spec.
Position
At the beginning of the function definition block.
Examples
int fun(int a[]) {
#pragma HLS function top
#pragma HLS interface argument(a) type(axi_initiator) num_elements(100) ptr_addr_interface(axi_target) max_burst_len(8)
#pragma HLS interface argument(a) type(axi_initiator) num_elements(100) max_outstanding_reads(4) max_outstanding_writes(4)
  ...
}