3.5.1.21.3 Scalar Argument Driver Functions

When a scalar argument is configured to use AXI4 target interface (see Scalar Argument), SmartHLS generates the following driver functions for the CPU to write and read the argument into and from the SmartHLS module, respectively.
Table 3-9. Scalar Argument Driver Functions
Operating SystemFunction SignatureDescription
Linuxvoid <TopFunc>_write_<ArgName>(TYPE val, void *virt_addr);This function writes the value 'val' to the scalar argument <ArgName>. This essentially causes an AXI Memory Map write transaction into the SmartHLS module's on-chip storage.
Baremetalvoid <TopFunc>_write_<ArgName>(TYPE val, uint32_t base_addr = <TopFunc>_BASE_ADDR);
LinuxRETYPE <TopFunc>_read_<ArgName>(void *virt_addr);This function reads the value of the <ArgName>. This is causes an AXI Memory Map read transaction from the SmartHLS module's on-chip storage.
BaremetalRETYPE <TopFunc>_read_<ArgName>(uint32_t base_addr = MYTOPFUNC_BASE_ADDR);