|
| 1 | +.. |
| 2 | + comment:: SPDX-License-Identifier: MIT |
| 3 | + comment:: Copyright (C) 2025 Advanced Micro Devices, Inc |
| 4 | +
|
| 5 | +######################### |
| 6 | +Bootstrapping with AVED |
| 7 | +######################### |
| 8 | + |
| 9 | +This tutorial walks an administrator through the one-time JTAG step |
| 10 | +required to install **AVED** (the Alveo Versal Example Design) on an |
| 11 | +AMD Alveo V80 board. AVED provides the AMC firmware and the PCIe |
| 12 | +management function (PF0, device ID ``0x50B4``) that the SLASH stack |
| 13 | +binds to via the ``ami`` kernel driver. |
| 14 | + |
| 15 | +When you need this tutorial |
| 16 | +=========================== |
| 17 | + |
| 18 | +The rest of the SLASH platform-setup flow — including |
| 19 | +``ami_tool cfgmem_program`` for writing the SLASH static shell — |
| 20 | +requires that ``ami`` is already bound to PF0. That, in turn, requires |
| 21 | +a valid AVED image in the V80's OSPI flash. Follow this tutorial when: |
| 22 | + |
| 23 | +- the V80 is **brand new** and has never had AVED programmed, or |
| 24 | +- the V80's OSPI flash has been corrupted or wiped and PF0 no longer |
| 25 | + enumerates over PCIe, or ami repports errors (such as ``NO_AMC```) |
| 26 | + |
| 27 | +Boards that already enumerate PF0 (visible as ``10ee:50b4`` in |
| 28 | +``lspci``) can skip this tutorial and go directly to |
| 29 | +:doc:`platform-setup`. |
| 30 | + |
| 31 | +Prerequisites |
| 32 | +============= |
| 33 | + |
| 34 | +**Hardware:** |
| 35 | + |
| 36 | +- AMD Alveo V80 installed in a PCIe slot. |
| 37 | +- USB cable from the host to the V80's onboard USB-JTAG. |
| 38 | + |
| 39 | +**Software:** |
| 40 | + |
| 41 | +- AMD Vivado 2025.1. |
| 42 | + |
| 43 | +Download the AVED Deployment Archive |
| 44 | +===================================== |
| 45 | + |
| 46 | +AVED is published by AMD as a prebuilt deployment archive. Download |
| 47 | +the archive for the V80 from the AVED documentation portal: |
| 48 | + |
| 49 | +- AVED documentation: https://xilinx.github.io/AVED/ |
| 50 | +- V80 member-portal page: https://www.xilinx.com/member/v80.html |
| 51 | + |
| 52 | +Extract the archive on the host. The relevant files for this tutorial |
| 53 | +are located under ``flash_setup/``: |
| 54 | + |
| 55 | +.. list-table:: |
| 56 | + :header-rows: 1 |
| 57 | + :widths: 40 60 |
| 58 | + |
| 59 | + * - File |
| 60 | + - Purpose |
| 61 | + * - ``flash_setup/versal_change_boot_mode.tcl`` |
| 62 | + - XSDB script that switches the Versal device to JTAG boot mode. |
| 63 | + * - ``flash_setup/v80_initialization.pdi`` |
| 64 | + - Initialization PDI loaded over JTAG before flashing OSPI. |
| 65 | + * - ``flash_setup/fpt_setup_<vbnv>_<release>.pdi`` |
| 66 | + - Flash Partition Table setup PDI written to OSPI. |
| 67 | + |
| 68 | +Switch the V80 to JTAG Boot Mode |
| 69 | +================================ |
| 70 | + |
| 71 | +By default the V80 boots from OSPI. To program a fresh board over |
| 72 | +JTAG, the Versal device must first be switched to JTAG boot mode. |
| 73 | +Source the Vivado settings, then launch ``xsdb`` and source the |
| 74 | +``versal_change_boot_mode.tcl`` script shipped with the archive: |
| 75 | + |
| 76 | +.. code-block:: bash |
| 77 | +
|
| 78 | + source <path-to-vivado>/settings64.sh |
| 79 | + xsdb |
| 80 | +
|
| 81 | +At the ``xsdb%`` prompt: |
| 82 | + |
| 83 | +.. code-block:: tcl |
| 84 | +
|
| 85 | + connect |
| 86 | + targets -set -filter {name =~ "Versal*"} |
| 87 | + source flash_setup/versal_change_boot_mode.tcl |
| 88 | +
|
| 89 | +The script reconfigures the boot-mode register on the Versal device |
| 90 | +so that subsequent JTAG operations from Hardware Manager will be |
| 91 | +accepted. |
| 92 | + |
| 93 | +See `AVED JTAG Boot Recovery |
| 94 | +<https://xilinx.github.io/AVED/amd_v80_gen5x8_exdes_1_20231204/AVED+JTAG+Boot+Recovery.html>`_ |
| 95 | +for the upstream reference. |
| 96 | + |
| 97 | +Program OSPI Flash via Vivado Hardware Manager |
| 98 | +============================================== |
| 99 | + |
| 100 | +With the V80 in JTAG boot mode, launch Vivado Hardware Manager and |
| 101 | +program the OSPI flash: |
| 102 | + |
| 103 | +1. Launch Vivado and open Hardware Manager |
| 104 | + (*Flow* → *Open Hardware Manager*). |
| 105 | +2. *Open Target* → *Auto Connect*. The V80 should appear as |
| 106 | + ``xcv80_1``. |
| 107 | +3. Right-click ``xcv80_1`` → *Add Configuration Memory Device*. |
| 108 | +4. Select the ``cfgmem-2048-ospi-x8-single`` part.` |
| 109 | +5. Program the configuration memory using |
| 110 | + ``flash_setup/fpt_setup_<vbnv>_<release>.pdi`` together with |
| 111 | + ``flash_setup/v80_initialization.pdi``. For the address range |
| 112 | + select **Entire Configuration Memory Device**. |
| 113 | +6. Wait for Hardware Manager to report **Flash Programming |
| 114 | + Completed Successfully**. |
| 115 | + |
| 116 | +For the upstream step-by-step reference, see `AVED Updating FPT Image |
| 117 | +in Flash <https://xilinx.github.io/AVED/amd_v80_gen5x8_24.1_20241002/AVED+Updating+FPT+Image+in+Flash.html>`_ |
| 118 | +and `AVED Device Programming |
| 119 | +<https://xilinx.github.io/AVED/amd_v80_gen5x8_exdes_2_20240408/AVED+-+Device+Programming.html>`_. |
| 120 | + |
| 121 | +Cold-Reboot the Host |
| 122 | +==================== |
| 123 | + |
| 124 | +A full power cycle is required after flashing — a soft ``reboot`` |
| 125 | +will not re-read the Versal boot-mode pins. Shut the host down |
| 126 | +completely, then power it back on: |
| 127 | + |
| 128 | +.. code-block:: bash |
| 129 | +
|
| 130 | + sudo shutdown -h now |
| 131 | +
|
| 132 | +After the host powers back on, the V80 boots from OSPI and AVED |
| 133 | +becomes active. |
| 134 | + |
| 135 | +Verify |
| 136 | +====== |
| 137 | + |
| 138 | +Confirm that PF0 enumerates on the PCIe bus: |
| 139 | + |
| 140 | +.. code-block:: bash |
| 141 | +
|
| 142 | + lspci -d 10ee:50b4 |
| 143 | +
|
| 144 | +You should see one entry per V80 board. If the ``ami`` driver is |
| 145 | +already installed on this host, ``ami_tool`` will also report the |
| 146 | +card: |
| 147 | + |
| 148 | +.. code-block:: bash |
| 149 | +
|
| 150 | + sudo ami_tool overview |
| 151 | +
|
| 152 | +The reported ``logic_uuid`` should match the UUID listed in the |
| 153 | +AVED archive's ``version.json``. |
| 154 | + |
| 155 | +.. note:: |
| 156 | + |
| 157 | + If you are following the package build flow on a fresh board, you |
| 158 | + will not have the ``ami`` driver or ``ami_tool`` installed yet. That |
| 159 | + is expected at this stage — confirming that the board enumerates on |
| 160 | + PCIe via ``lspci`` is sufficient. Continue on to :doc:`platform-setup` |
| 161 | + to install the SLASH stack, which brings in ``ami`` and ``ami_tool``. |
| 162 | + |
| 163 | +Next Steps |
| 164 | +========== |
| 165 | + |
| 166 | +With AVED bootstrapped and PF0 visible, continue with the regular |
| 167 | +platform-setup flow: |
| 168 | + |
| 169 | +- :doc:`platform-setup` — install the SLASH stack and program the |
| 170 | + SLASH static shell over PCIe with ``ami_tool cfgmem_program``. |
0 commit comments