Function Argument Map
The SDSoC system compiler requires a mapping from any function prototypes in the library onto the hardware interface defined by the IP block that implements the function. This information is captured in a "function map" XML file. XML attribute literals, for example array sizes, must be constants and not macros (the SDSoC environment does not use macros in header files to resolve literals in the XML file).
The information includes the following.
- XML namespace - the namespace must be defined as
xmlns:xd="http://www.xilinx.com/xd"
- Function name – the name of the function mapped onto a component
- Component reference – the IP type name from the IP-XACT Vendor-Name-Library-Version identifier.
- If the function is associated with a platform, then the component reference is the platform name. For example, seeIntroduction.
- C argument name – an address expression for a function argument, for example
x
(pass scalar by value) or*p
(pass by pointer).Note:argument names in the function map must be identical to the argument in the function definition, and they must occur in precisely the same order. - Function argument direction – either
in
(an input argument to the function) orout
(an output argument to the function). Currently the SDSoC environment does not supportinout
function arguments. - Bus interface – the name of the IP port corresponding to a function argument. For a platform component, this name is the platform interface
xd:name
, not the actual port name on the corresponding platform IP. - Port interface type – the corresponding IP port interface type, which currently must be either
aximm
(slave only),axis
. - Address offset – hex address, for example, 0x40, required for arguments mapping onto
aximm
slave ports (this must be a constant). - Data width – number of bits per datum (this must be a constant).
- Array size – number of elements in an array argument (this must be a constant).
The function mapping for a configuration of the Vivado FIR Filter Compiler IP fromsamples/fir_lib/buildis shown below.