Data Folder in Libraries - 2024.1 English

Porting Guide for embeddedsw Components System Device Tree Based Build Flow (UG1647)

Document ID
UG1647
Release Date
2024-06-21
Version
2024.1 English

In the new flow, the data folder contains a single YAML file that replaces the older proprietary metadata files (*.mld, *.tcl). As an example, XilFPGA library has a xilfpga.yaml file in the data folder.

  • The YAML contains the following three sections:
    • Headers, copyrights, versions, and generic information such as maintainer and type.
      
      # SPDX-License-Identifier: MIT
      %YAML 1.2
      ---
      title: <Description of the yaml file>
      maintainers:
          - Name(s) of the maintainer(s)
      type: <Describes the type of baremetal module the yaml file describes, e.g, driver/library>
      description: < A brief description of the library >
    • Specifications that help in selecting the library for a given platform (processor/OS configuration).
      supported_processors:
          - <The list of CPUs the library supports>
      supported_os:
          - <The list of OSes the library supports>
    • Specification(s) that describes the dependencies of the library. A library can depend on other driver/IP configurations which must be present in the device tree for the library to be used. In addition, a library can also depend on other libraries.
      depends:
      # Used in libraries like xilmailbox which depends on ipi or xiltimer which depends on timer related drivers
          <driver_name1>
              - <List of properties of driver/IP1 that library relies upon>
          <driver_name2>
              - <List of properties of driver/IP2 that library relies upon>
       
      depends_libs:
          <Library 1 that should be picked>: {}
          <Library 2 that should be picked>: {}
  • Specifications that describe library example and their dependencies. Examples can depend on other supporting .h or .c files. There can be few examples only valid for few platforms. Examples listed here are also listed under the import example section in the GUI of the Vitis unified software platform 2023.2. Refer to the sample xilfpga.yaml below for more information.
    examples:
        <Example name>:
            - <supported_platforms>:
                - <has to be mentioned only when example is applicable to specific platform>
            - <dependency_files>:
                - <List of supported files that need to be pulled while creating the example>
  • The sample XILFPGA YAML has the following contents in xilfpga.yaml.
    
    # SPDX-License-Identifier: MIT
    %YAML 1.2
    ---
    title: Bindings for xilfpga library.
     
    maintainers:
        - Zxcv Yuiop <zxcv.yuiop@domain.com>
     
    type: library
     
    description: |-
        XilFPGA library provides an interface to the Linux or bare-metal users for configuring the PL over PCAP from PS.
     
    supported_processors:
        - psu_cortexa53
        - psu_cortexr5
        - psu_pmu
        - psv_cortexa72
        - psv_cortexr5
     
    supported_os:
        - standalone
        - freertos10_xilinx
     
    depends_libs:
        xilsecure: {}
        xilmailbox: {}
     
    examples:
        xfpga_partialbitstream_load_example.c: []
        xfpga_readback_example.c:
            - supported_platforms:
                - ZynqMP
        xfpga_reg_readback_example.c:
            - supported_platforms:
                - ZynqMP
        xfpga_load_bitstream_example.c:
            - supported_platforms:
                - ZynqMP
                - Versal