Command-Line Tools

XRT.jl offers support for some frequently used command-line utilities delivered by XRT directly from Julia. As long as it is possible, the functionalities are implemented in Julia itself. Otherwise, a call to the corresponding command-line program is started.

xbutil

The xbutil functions of XRT.jl are described below. See XRT.jl Public API for implementation details.

  • examine

The examine command of XRT is used to find details and information about available devices. The reports can be generated by calling the fields of an XRT.XilinxDevice within the Julia REPL. E.g., the following call will generate the thermal report.

julia> XRT.device().thermal
  • program

The program command xbutil can be executed as described below. The provided function is an alias for the load_xclbin! function.

julia> XRT.program!(path; device)
  • reset

The reset command is used to perform a hot-reset on a device. Note: To call this function from XRT.jl can be very dangerous if some device allocations are still available. It is therefore not recommended to call up the function in productive usage. The function will temporarily free the allocations used by the XRT.devices functions. Make sure not to store a copy or a reference on the device to be reset. If there are any, set all to nothing and call up the garbage collector.

julia> XRT.reset!(index)
  • validate

The validate function of XRT.jl directly opens a shell and runs xbutil validate with given parameters. The command loads a precompiled bitstream on the device and executes some predefined tests. The available tests are contained in the XRT.XbutilTest module but can also be listed as string values. Optionally, a path to a file in which the test results are to be written can be specified. The function can be called from Julia by calling:

julia> XRT.validate!(tests...; device, output)
  • version

The version of the current XRT installation and its drivers can be obtained by calling:

julia> XRT.version()

This function returns the version information provided by xbutil. See XRT.versioninfo() for XRT.jl's own implementation.

  • configure

The configure command is currently not supported by XRT.jl because the execution requires superuser rights.

xclbinutil

Different sections of the Xclbin metadata can be inspected in a human-readable format by using the XRT.Xclbin type, or alternatively the Custom XCLBIN Parser, which just allows raw JSON format. If the results of these functions do not satisfy the requirements, it is also possible to call xclbinutil with the --info flag. An output path can optionally be specified:

julia> XRT.info(xclbin; output)

The metadata sections can alternatively be extracted using the --dump-section flag of xclbin. Available sections are contained in the XRT.SectionType module.

julia> XRT.dump_section(xclbin, section, format, outputfile)

Finally, a function is available to migrate the outdated XRT container format to the current one.

julia> XRT.migrate_forward(old_xclbin_path, new_xclbin_path)

xbmgmt

The xbmgmt program is currently not supported by XRT.jl as it requires superuser rights.