sdx_pack Utility
TheSDSoC™tools include thesdx_pack
command line utility for creating C-Callable IP libraries for linking RTL IP intoSDSoCapplications using thesds++
system compiler.
Usage
sdx_pack -header -ip [-param ="value"] [configuration options]
Configuration Options
Option | Valid Values | Description |
---|---|---|
-header |
Header file with function declarations, Only one top header file allowed | Required. Header file with function prototype. |
-ip |
N/A | Required. IP packed by theVivado®IP integrator. |
-control |
N/A | Required. IP control protocol options:
|
-func |
N/A | Specify a list of C-Callable functions associated with the IP instance. For each function, use the[-func ... -map ... -func-end] option.To map each software function argument to an IP port, use |
-map |
N/A | Required for using-func . A software function argument to IP port mapping:
For example, |
-primary-clk |
N/A | Specify the primary clock interface and its minimum clock period in nanoseconds. |
-derived-clk |
N/A | Specify the phase-aligned derived clock interface, and its multiplier and divisor in integer. |
-primary-clk |
N/A | Specify the primary clock interface and its minimum clock period in nanoseconds. |
-derived-clk |
N/A | Specify the phase-aligned derived clock interface, and its multiplier and divisor in integer. |
-target-cpu |
N/A | Specifies target CPU:
|
-target-family |
N/A | Specifies target board family; for example,zynq orzynquplus . |
-target-os |
N/A | Specifies target Operating System:
|
-verbose |
N/A | Prints verbose output toSTDOUT. |
-version |
N/A | Prints thesdx_pack version information toSTDOUT. |
--help |
N/A | Displays information about this command:sdx_pack --help |
-query-target |
|
Query supportedboard_family ,cpu_type , andos_type of the IP. |
-query-interface |
|
Query interfaces and parameters of the IP, support multiple queries. |
-primary-clk |
N/A | Specify the primary clock interface and its minimum clock period in nanoseconds. Only one top primary clock is allowed, |
-derived-clk |
N/A | Specify the phase-aligned derived clock interface, and its multiplier and divisor in integer. |
sdx_pack Example
sdx_pack -header count.hpp -ip ../ip/component.xml -func count \ -control AXI=S_AXI:0 -map start_value=S_AXI:in:0x8 -map return=S_AXI:out:4 -func-end \ -target-cpu cortex-a9 -target-os standalone -target-family zynq
Where the flags that are used above are defined in the table.
sdx_pack
utility automatically generates:
: Compiled object code for the specified function. This file is generated under the.o .Xil/sdx
folder.
: Mapping IP ports to function arguments. This file is generated under the.fcnmap.xml .Xil/rtl
folder.
: IP parameters. This file is generated under the.params.xml .Xil/rtl
folder.
: C++ file with entry point. This file is generated under the.cpp .Xil/rtl
folder.
-query Option usage
sdx_pack -query-target -ip component.xml [-target-family ] [-target-cpu ]
This query only supports meaningful queries instead of all possible combinations. Only one-query-target
option supported at each query. Specifically, below is what-query-target
returns. This is consistent with theSDx™GUI for the application project.
-
-query-target family
-
It ignores all other options and returns all supported board families of the IP. In 2018.3, this family set must be a subset of {artix7, kintex7, kintexu, kintexuplus, spartan7, virtex7, virtexu, virtexuplus, virtexuplusHBM, zynq, zynquplus}.
Note:For a family with an "a" (automotive), "q" (space) prefix, or "l" (low power) suffix, then specify the family without the prefix or suffix. For example, targetazynq
, select zynq. -
-query-target cpu
-
It ignores all other options except
-target-family
.- If
-target-family
is specified, it returns all CPU types supported under this specific family. In 2018.3, this must be a subset of {cortex-a9, cortex-a53, cortex-r5, microblaze}. - If
-target-family
is not selected, then it returns all CPU types supported under all supported families. In 2018.3, this must be a subset of {cortex-a9, cortex-a53, cortex-r5, microblaze} {cortex-a9, cortex-a53, cortex-r5, microblaze}.
- If
-
-query-target os
-
If
-target-cpu
is specified, it returns all OS types supported under this specific CPU. In 2018.3, this must be a subset of {linux, standalone}.If
-target-family
is also specified, cpu_type must be a valid CPU in this specific board_family.- Else, if
-target-family
is specified, it returns all OS types supported under this specific family. In 2018.3, this must be a subset of {linux, standalone}. - Else, it returns all OS types supported under all supported families. In 2018.3, this must be a subset of {linux, standalone}
-map Option Usage
In this example, the hardware name for theAXI4-Liteinterface iss_axi_AXILiteS
.
Scalars are always mapped ontoAXI4-Liteinterfaces:
- To map an input scalar (e.g., int a), use
-map a=s_axi_AXILiteS:in:offset
. - To map an output scalar (e.g., int *a, or int &a), use
-map a=s_axi_AXILiteS:out:offset
. - To map a return scalar (the return type can only be scalar), use
-map return=s_axi_AXILiteS:out:offset
.
Arrays (e.g., int a[N]) can be mapped onto any type of interface. The exact interface and direction is specified by the IP.
To map an array ontoAXI4, use
-map a=s_axi_AXILiteS:in:offset,
. Do not map ontoAXI4(m_axi) when:direction control none
is used.To map an array ontoAXI4-Stream, use
-map a=
.:direction - To map an array (a small, constant-size array) ontoAXI4-Lite, use
-map a=s_axi_AXILiteS:in:offset
.Note:The array must be a one-dimensional array with a constant size. For example, int a[N], where N must be a constant (which can be either #define N 16 or constant int N = 16).