4.2.3. Using Vivado to Generate Device Image and XSA for Baseline Subsystem Restart TRD - 4.2.3. Using Vivado to Generate Device Image and XSA for Baseline Subsystem Restart TRD - 2023.1 English - XD339

Versal Restart TRD (XD339)

Document_ID
XD339
Release_Date
2026-01-12
Version
2023.1 English

To run the Vivado portion manually, follow the instructions in this section.

  1. Copy the hardware sources to a filesystem with > 15GB space, called \(VSSR_WS in this document. Create a subdirectory for the hardware under \)VSSR_WS, called hw_ws. Copy the sources to this directory (fill in board and silicon type):

    cp -r $REPO_SRC/hw/<board>_<sil>_base $VSSR_WS/hw_ws
    cp -r $REPO_SRC/hw/{ip_repo,common} $VSSR_WS/hw_ws
    
  2. Open the Vivado GUI

    Set up the Vivado environment in a terminal window by sourcing <Vivado_install_path>/settings64.sh, then at the command prompt enter (fill in board and silicon type):

    cd $VSSR_WS/hw_ws/<board>_<sil>_base
    vivado -source ./scripts/build_proj.tcl
    

    A Vivado cockpit as shown below will open with Restart TRD project populated.

    Vivado cockpit
  3. Look at the block design

    In the Flow Navigator pane on the left-hand side under IP Integrator, click on Open Block Design. An IP Integrator (IPI) block design (versal_restart_trd.bd) becomes visible that contains the Control, Interface and Processing System (CIPS) IP, NOC IP and simple programmable logic design.

    IPI Block Design
  4. At this point you can opt for 2 options to Write Device Image and generate .xsa

Option 1 (Recommended): Run the implementation script

  1. To automatically run Vivado all the way through to Write Device Image and generate the XSA, type the following in the Tcl Console window, then skip to the next section:

    source ./scripts/run_impl.tcl
    

    When the script finishes, the file versal_restart_trd_wrapper.xsa will be available in $VSSR_WS/hw_ws/vivado/versal_restart_trd.runs/impl_1

Option 2 (Alternatively): Run the steps in the run_impl.tcl individually as below

  1. Implement the design

    Click on Generate Device Image in the Flow Navigator pane on the left-hand side under Program and Debug.

    When the process finishes, a dialog box will open, offering choices of what to do next. Hit Cancel. The device image (PDI) for the design will be generated and available at $VSSR_WS/hw_ws/vivado/versal_restart_trd.runs/impl_1/versal_restart_trd_wrapper.pdi. However, this PDI does not have the subsystems definitions included yet.

  2. After the device image is generated by Vivado, it will have to be updated with the subsystem.cdo overlay to define the subsystems and recovery options.

    • In the Tcl Console, change to the implementation directory:

      cd vivado/versal_restart_trd.runs/impl_1
      
    • Next generate a new PDI with the subsystem overlay included:

      exec -ignorestderr bootgen -arch versal -image versal_restart_trd_wrapper.bif -overlay_cdo ../../../overlay/subsystem.cdo -w -o versal_restart_trd_wrapper.pdi
      
  3. When new PDI is done, click on Open Implemented Design.

    Open Implemented Design
  4. Create the XSA

    • To create the XSA, click on File → Export → Export hardware. A window pops up. Click Next.

    • Select Include Device Image. Click Next.

    Export hardware Options
    • Change Export path to $VSSR_WS/hw_ws/vivado/versal_restart_trd.runs/impl_1. Click Next.

    Export Hardware Path
    • Click on Finish.

The file versal_restart_trd_wrapper.xsa will be available in $VSSR_WS/hw_ws/vivado/versal_restart_trd.runs/impl_1/

Note

Along with XSA, all the artifacts used by software tools (as part of handoff) are availabe in $VSSR_WS/hw_ws/vivado/versal_restart_trd.runs/impl_1/. Feel free to copy it as backup to regenerate PDI and xsa file later. This includes, pdi files, bif file to generate the pdi file and all the components of the pdi file like psm.elf, various cdo files, rnpi, etc.