3.5.1.21.5 AXI4 Initiator Argument's Pointer Address Driver Functions

As explained in AXI4 Initiator Interface, an argument using AXI4 initiator interface will have an associated interface for setting the base pointer address. The base pointer address is where the argument data can be found by the accelerator. Typically the pointer address is an address in the processor memory that the accelerator will directly access via the AXI4 initiator interface. When this pointer address interface is configured to AXI4 target, the driver function below is generated for setting the pointer address:
Table 3-11. AXI4 Initiator Argument's Pointer Address Driver Functions
Operating SystemFunction SignatureDescription
Linuxvoid <TopFunc>_write_<PtrArg>_ptr_addr(void* arg_virt_addr, void *virt_addr);

This function sets the address for <PtrArg> using arg_virt_addr. The virt_addr argument is the memory-mapped virtual base address of the top-level module.

arg_virt_addr is a virtual address and internally it will be mapped to a physical address before sending it to the SmartHLS module, which uses that address to access the content of <PtrArg>.

When the SmartHLS project's type is set to Icicle_SoC (see set_project), the driver is assumed to run on a Linux Operating System and the CPU's memory referenced by the pointer argument <PtrArg> must be allocated using hls_malloc() function (see Memory Allocation Library) and released using hls_free().

Baremetal void <TopFunc>_write_<PtrArg>_ptr_addr(void* arg_virt_addr, uint32_t base_addr);This function sets the address for <PtrArg> using arg_virt_addr, and the base_addr argument is the physical memory base address of the top-level module.

Note that when the HLS project's target flow is set to Icicle_SoC (see set_project), the driver is assumed to run on a Linux Operating System (see Step 5: Flashing the Linux Image to the Board), and the processor memory referenced by the pointer argument (MyPtrArg) must be allocated by the hls_malloc function (see Memory Allocation Library).