platforminfo Utility

Useplatforminfoto query the platforms that yourSDx™installation is configured to use. The following command options are available to use withplatforminfo:

Command Options

  • -h [ --help ]: Print help message and exit.
  • -k [ --keys ]: Get keys for a given platform. Returns a list of JSON paths.
  • -l [ --list ]: List platforms. Searches the user repo paths $PLATFORM_REPO_PATHS and then the install locations to find.xpfmfiles.
  • -e [ --extended ]: List platforms with extended information. Use with '--list'.
  • -d [ --hw ]: Hardware platform definition (*.dsa) on which to operate. The value must be a full path, including file name and.dsaextension.
  • -s [ --sw ]: Software platform definition (*.spfm) on which to operate. The value must be a full path, including file name and.spfmextension.
  • -p [ --platform ]:Xilinx®platform definition (*.xpfm) on which to operate. The value for--platformcan be a full path including file name and.xpfmextension, as shown in example 1 below. If supplying a file name and.xpfmextension without a path, this utility will search only the current working directory. You can also specify just the base name for the platform. When the value is a base name, this utility will search the $PLATFORM_REPO_PATHS, and the install locations, to find a corresponding.xpfmfile, as shown in example 2 below.
    Example 1: --platform /opt/xilinx/platforms/xilinx_u200_xdma_201830_1.xpfm Example 2: --platform xilinx_u200_xdma_201830_1
  • -o [ --output ]: Specify an output file to write the results to. By default the output is returned to the terminal (stdout).
  • -j [ --json ]: Specify JSON format for the generated output. When used with no value, theplatforminfoutility prints the entire platform in JSON format. This option also accepts an argument that specifies a JSON path, as returned by the-koption. The JSON path, when valid, is used to fetch a JSON subtree, list, or value.
    Example 1: platforminfo --json="hardwarePlatform" --platform  Example 2: Specify the index when referring to an item in a list. platforminfo --json="hardwarePlatform.devices[0].name" --platform  Example 3: When using the short option form (-j), the value must follow immediately. platforminfo -j"hardwarePlatform.systemClocks[]" -p 
  • -v [ --verbose ]: Specify more detailed information output. The default behavior is to produce a human-readable report containing the most important characteristics of the specified platform.
Note:Except when using the --helpor --listoptions, a platform must be specified. You can specify the platform using the --platformoption, or using either --hw, --sw. You can also simply insert the platform name or full path into the command line positionally.

Examples

The following example writes JSON formatted output for the platform to the specified file:
platforminfo -j xilinx_vcu1525_xdma_201830_1 -o ./vcu1525.json
This example returns the metadata keys for the specified platform, and the second command writes the information to the specified file:
platforminfo -k zcu106 platforminfo -k zcu102 -o ./zcu106_keys.txt
The following returns the System Clocks on the specified platform:
platforminfo -j"hardwarePlatform.systemClocks[]" -p xilinx_u250_xdma_201830_1