sdx_pack Utility

The SDSoC™ tools include the sdx_pack command line utility for creating C-callable IP libraries for linking RTL IP into SDSoC applications using the sds++ system compiler.


sdx_pack -header <header.h/pp> -ip <component.xml> [-param <name>="value"] [configuration options]

Configuration Options

Table 1. Configuration Options
Option Valid Values Description
-add-ip-repo Valid path to the repository on the file system. Add IP repository to library
-header <header.h/.hpp> Header file with function declarations, Only one top header file allowed Required. Header file with function prototype
-ip <component.xml> N/A Required. IP packed by the Vivado® IP integrator
-param <name>="value" N/A IP parameter values
-func <function_name> N/A Required. Function name
-control <protocol>[=<port>[:offset]] N/A Required. IP control protocol options:
  • AXI
  • none
-lib <libname> Specify a library name. Use specified library name. If not specified, creates lib<header>.a by default.
-map <sw_name>=<hw_name>:direction[:<offset>[<aximm_name>:<direction>]] N/A Required. SW function argument to IP port mapping:<SW_Name>=<HW_Name>:direction[:offset[<aximm_name>:direction]
-target-cpu <cpu_type> N/A Specify target CPU:
  • cortex-a9
  • cortex-a53
  • cortex-r5
  • microblaze
-target-family <board_family> N/A Specify target board family; for example, zynq or zynquplus.
-target-os<name> N/A Specify target Operating System:
  • linux (default)
  • standalone (bare-metal)
-verbose N/A Print verbose output to STDOUT.
-version N/A Print the sdx_pack version information to STDOUT.
--help N/A Display information about this command.
sdx_pack --help


sdx_pack -header count.hpp -ip ../ip/component.xml -func count \
-control AXI=S_AXI:0 -target-cpu cortex-a9 -map start_value=S_AXI:in:0x8 -
map return=S_AXI:out:4 -target-os standalone


  • The count.hpp specifies the header file defining the function prototype for the count function.
  • The component.xml sdx_pack -header count.hpp -ip ../ip/comp of the IP generates the packaged Vivado IP for SDx.
  • The -control specifies the IP control protocol.
  • The –map specifies the mapping of an argument from the software function to a port on the Vivado IP. Notice the option is used twice in the example above to map start_value and return arguments to IP ports.
  • The –target-cpu option specifies the target operating system.
The sdx_pack utility automatically generates:
  • <function_name>.o: Compiled object code for the specified function. This file is generated under the .Xil/sdx folder.
  • <function_name>.fcnmap.xml: Mapping IP ports to function arguments. This file is generated under the .Xil/rtl folder.
  • <function_name>.params.xml: IP parameters. This file is generated under the .Xil/rtl folder.
  • <function_name>.cpp: C++ file with entry point. This file is generated under the .Xil/rtl folder.
Note: You need to create an archive file (.a) of the sdx_pack compiled object code (.o) using an appropriate GNU tool chain utility, like arm-none-eabi-ar. Therefore, this function can be linked to the appropriate IP during runtime. For multiple functions mapping to a single IP, currently sdx_pack has limited support, use sdslib instead.