HAP-Based eVA Runtime Interface
VisualApplets controls synthesis and implementation of the FPGA design. The resulting design is saved in a proprietary Basler file format (*.hap). This format contains the configuration bitstream for the FPGA and means for realizing a design-specific software interface.
In general, VisualApplets operators contain dynamic parameters which can be modified during runtime. The HAP file contains all necessary information for accessing design specific parameters easily.
For proper function of the runtime software on the user platform, the following requirements must be fulfilled:
- The user needs access to the FPGA bitstream as he needs to do the configuration. For that purpose, the runtime interface provides the function
vaRt_GetConfig(). - For accessing the slave interface for the design registers, the user must implement the functions
WriteReg32(),ReadReg32(), or optionallyWriteReg64()andReadReg64(). The runtime software is notified about these functions when the functionvaRt_InitParams()is called.
Then the VisualApplets bitstream can be configured and the runtime software can write and read design parameters.
The register access functions must comply with following function types:
typedef int ReadReg32(void* device, const uintptr_t address, uint32_t *value)
typedef int WriteReg32(void* device, const uintptr_t address, uint32_t value)
typedef int ReadReg64(void* device, const uintptr_t address, uint64_t *value)
typedef int WriteReg64(void* device, const uintptr_t address, uint64_t value)
The software interface library provides additional functions for controlling the VisualApplets design. In the following table, the full set of access functions is listed:
|
Nr. |
Function |
Description |
|---|---|---|
|
1 |
vaRt_OpenHap() |
Opens the hardware applet ‘*.hap’ and returns a pointer to the HAP structure which serves as a handle for further accesses. |
|
2 |
vaRt_CloseHap() |
Closes the hardware applet which has been opened by vaRt_OpenHap. |
|
3 |
vaRt_GetConfig() |
Returns a pointer to the configuration bit stream for the FPGA. |
|
4 |
vaRt_GetAppletProperty() |
Query function for applet properties like the maximum frequency of the clock net iDesignClk of the applet, information about the target platform, and version information. |
|
5 |
vaRt_GetProcessCount() |
Returns the number of processes of which the design is composed. |
|
6 |
vaRt_GetIoPortCount() |
Returns the number of used external interface ports. All kinds of interface ports are joined in a list where the position in the list is the logical number of the port. Port names and properties can be obtained by below specified functions “vaRt_GetIoPort…”. |
|
7 |
vaRt_GetIoPortName() |
Get the name of the interface port with the given logical port number. |
|
8 |
vaRt_GetIoPortProperty() |
Query I/O port properties like the name of a connected operator, the process which controls this port, and the current image format setting for this port. |
|
9 |
vaRt_GetParamCount() |
Returns the number of parameters of a design. |
|
10 |
vaRt_GetParamName() |
For a given parameter number the corresponding name is returned. |
|
11 |
vaRt_GetParamId() |
For a given parameter number the parameter ID is returned. |
|
12 |
vaRt_GetParamIdByName() |
For a given parameter name the parameter ID is returned. |
|
13 |
vaRt_GetParamProperty() |
Query parameter properties. |
|
14 |
vaRt_InitParams() |
Configure parameter interface and initialize parameters to default values. |
|
15 |
vaRt_GetParam() |
Query parameter value. |
|
16 |
vaRt_GetParamArray() |
Query array of parameters. |
|
17 |
vaRt_SetParam() |
Set parameter value. |
|
18 |
vaRt_SetParamArray() |
Set array of parameters. |
|
19 |
vaRt_SetGlobalEnable() |
Set the Master Enable signal. |
|
20 |
vaRt_SetProcessEnable() |
Activate a process of the Visual Applets design. |
|
21 |
vaRt_ResetProcess() |
Perform a reset of a Visual Applets design process. |
|
22 |
vaRt_GetErrorDescription() |
Query description for given error code. |