Versal Prime-VMK180 Evaluation Kit Tutorial

Using Vivado to Build the Hardware Design

Using Vivado to Build the Hardware Design

Introduction

This tutorial shows how to build the hardware design for applications running on VMK180 Evaluation Kit.

Prerequisites

  • Vivado Design Suite 2021.2

Accessing the Tutorial Reference Files

Note: Skip the following steps if the design files have already been cloned and extracted to a working repository

  1. To access the reference files, type the following into a terminal:

git clone --branch 2021.2 --recursive https://github.com/Xilinx/vmk180-trd.git

Enable Versal device support

To enable VMK180 ES1 board/device support, you need to create two tcl initialization scripts, one for Vivado and one for HLS. Add the following line to each of the tcl scripts:

  enable_beta_device xcvm1802-vsva2197-2MP-e-S-es1

The initialization tcl script for Vivado shall be placed at:

  • Linux: $HOME/.Xilinx/Vivado/Vivado_init.tcl

  • Windows: %APPDATA%/Roaming/Xilinx/Vivado/Vivado_init.tcl

Similarly, the initialization tcl script for HLS shall be placed at:

  • Linux: $HOME/.Xilinx/HLS_init.tcl

  • Windows: %APPDATA%/Roaming/Xilinx/HLS_init.tcl

Navigate to the vmk180-trd which is the working directory.

Generating an Extensible XSA

  1. Go to the platform directory specific to the application

    cd $working_dir/platforms/vivado/<platform_name>
    

    Applications and their corresponding platform names are listed in the table below

Application Platform name
VMK180 (Multimedia-PCIe) TRD vmk180_trd, vmk180_es1_trd
  1. To build the XSA, Source Vivado and run the following command. The Makefile uses scripts/main.tcl file to create a Vivado project, populate the block design and finally build a XSA. The XSA generation may take couple of hours depending on the system specification

    make xsa
    
  2. The generated XSA will be located at:

    $working_dir/platforms/vivado/<platform_name>/project/<platform_name>.xsa
    

Note: The steps under Modifying the Vivado design and creating a new XSA are optional and are required only if you need to change the platform design.

Modifying the Vivado design and creating a new XSA

  1. Go to the directory specific to the platform design

    cd $working_dir/platforms/vivado/<platform_name>
    
  2. To open the Vivado project, first open the Vivado GUI, then run the following command from the Vivado tcl console:

    open_project ./project/<platform_name>.xpr
    
  3. In the Flow Navigator pane on the left-hand side under IP integrator, click on Open Block Design. An IP integrator block design becomes visible that contains the Processing System (PS) IP and other PL IPs.

  4. To view the Platform interfaces that are enabled for the Vitis compiler to stitch in accelerators, on the tool bar at the top click on Window > Platform Setup. Platform interfaces that are enabled are

  • Clocks: To drive clock inputs on the accelerator.

  • Master AXI: AXI memory-mapped master ports on the Interconnect IP to drive the accelerator’s control port.

  • Slave AXI: AXI memory-mapped slave ports driven by the accelerator’s read/write data ports.

  1. You can now modify the block design and validate it (tool bar at the top: Tools → Validate design). Then, click on Run Synthesis to complete synthesis

  2. To write out a new extensible platform XSA file, run the following command from the Vivado tcl console:

    write_hw_platform -force -hw -file <platform_name>.xsa
    

The generated XSA or the modified XSA file can now be used to create a Vitis Platform

References

For more information on how to setup Platform Interfaces refer to Xilinx Vitis Unified Software Platform Documentation UG1393

License

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.

You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright© 2021 Xilinx