3.5.1.21.6 Top-level Driver Functions
(Ask a Question)Operating System | Function Signature | Description |
---|---|---|
Linux | RETYPE <TopFunc>_hls_driver(..., uint32_t
base_addr = <TopFunc>_BASE_ADDR); | This function initializes all input argument data, starts the SmartHLS module, waits for its completion, and retrieves the output argument data and return value of the function. It can be used as a direct replacement to the original top-level function, and has the same arguments and return type as the top-level function. |
Baremetal | ||
Linux | void <TopFunc>_write_input_and_start(..., void
*virt_addr); |
This function initializes all input argument data and starts the SmartHLS module. It is a non-blocking call that can be used to start the SmartHLS module and continue to execute other parts of the software while the SmartHLS module is running. The arguments of this function include the input arguments of the top-level function. When DMA is used for Baremetal, the physical base address of the
Soft-DMA core IP ( |
Baremetal |
Without DMA:
| |
With DMA:
| ||
Linux | RETYPE <TopFunc>_join_and_read_output(..., void
*virt_addr); | This blocking function waits for the SmartHLS module to finish the execution,
and retrieves output argument data and return value (if not void).
The arguments are the same arguments of the top-level function. When
DMA is used for Baremetal, the physical base address of the Soft-DMA
core IP (DMA_ADDR_<HLS_PROJ_NAME> ) is also
passed as an argument. |
Baremetal |
Without DMA:
| |
With DMA:
|
The above top-level driver functions use the individual argument or module control drivers (as described in above sections) under the hood.
To make all interfaces accessible by an attached processor, one can use the default interface pragma to set the default interface to AXI4 target for all arguments and module control (see Default All Interfaces to Use AXI4 Target ), and then add pragmas for axi_initiator
interface or to configure non-default options.