3.5.1.21 API Driver Functions for AXI4 Target
(Ask a Question)SmartHLS™ offers a comprehensive suite of C/C++ functions that serve as an Application Program Interface (API) to interface with the RTL modules produced by the SmartHLS tool. This API is dynamically tailored to accommodate different operating environments, whether the CPU is operating under a Linux-based system or in a bare-metal context. The generated API functions are reflective of the top-level functions defined within SmartHLS, adhering to naming conventions that incorporate the original function name, the data transfer type, and the specific argument types and names.
For systems running Linux, the API is designed to interact with virtual memory addresses, providing a layer of abstraction that facilitates ease of use within the operating system's memory management framework. Conversely, for bare-metal systems, the API functions are mapped directly to the physical base addresses of the RTL modules within the CPU's memory map, ensuring direct and efficient access to the hardware.
The distinction between axi target and axi initiator argument types further influences the API's structure, ensuring that the interface is optimized for the intended data transfer operations. Each top-level function's API is meticulously crafted to provide robust control, drive functionality, and enable status monitoring of the corresponding RTL module, thereby streamlining the integration of SmartHLS-generated hardware accelerators into a variety of computational environments.