AMD EDF - Dynamic Function eXchange Using AMD’s Yocto Project Recipes

Overview

This page describes how to implement Dynamic Function eXchange (DFX) on AMD devices using AMD Yocto Project recipes. It focuses on automating the device tree and dfx-mgr setup so partial bitstreams can be loaded and swapped at runtime in a Linux system.

Dynamic Function eXchange Flow Steps

Generate the pl.dtsi Using gen-machine-conf

Tool: gen-machine-conf.

For more background, see Generating a new Yocto Project Machine Configuration and Overview of gen-machine-conf.

Using the --template option:

$ gen-machine-conf parse-sdt \
    --template <sources/meta-amd-adaptive-socs/meta-amd-adaptive-socs-bsp/conf/machineyaml/template-yaml-file> \
    --hw-description <path-to-sdt-handoff-dir> \
    -O <machine-override> \
    --machine-name <machine-name>

Or, without a template, with a custom layer:

$ gen-machine-conf parse-sdt \
    --hw-description <path-to-sdt-handoff-dir> \
    -c <path-to-layer>/sources/meta-custom-bsp/conf \
    -g full \
    -O <machine-override> \
    --machine-name <machine-name>
  • The -g full option generates a complete device tree for the programmable logic.

  • The output pl.dtsi must match the hardware described in your post-boot module.

Tip

Finalize your hardware design before generating the pl.dtsi.

Integrate Dynamic Function eXchange with dfx-user-dts

Yocto class: dfx_user_dts.bbclass.

Instructions: README.dfx.user.dts.md.

Steps:

  1. Add the dfx-user-dts class to your Yocto recipe.

  2. Create a shell.json for the parent (static) design. Unlike the segmented-configuration flow, DFX requires a shell.json so dfx-mgr can describe the loadable region to the kernel and to user-space clients.

  3. Follow the README instructions to update your device tree for DFX. See Build Instructions to create Firmware Recipes using dfx_user_dts.bbclass.

Deploy and Run dfx-mgr

dfx-mgr manages loading of DFX configuration data at runtime. Place your partial bitstreams or configuration files (and the matching shell.json) in /lib/firmware/xilinx on the target device, then run dfx-mgr-client against the bundle:

# dfx-mgr-client -loadByName <package-name>
# dfx-mgr-client -load <ID>

Building a Compatible PL Design Payload and Creating a Firmware Bundle

For a VEK385 example showing how to build a compatible PL design payload and create a firmware bundle (device tree overlay), see Building a Compatible PL Design Payload and Creating a Firmware Bundle (Device Tree Overlay) in Hardware Application Development.

For deploying the PL firmware application onto a target, see Deploying the PL Firmware Application Onto Target in the same document.

References and Further Reading