MLD Keywords - 2024.1 English

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2024-05-30
Version
2024.1 English

The keywords that are used in an MLD file are as follows:

BEGIN

The BEGIN keyword begins one of the following: os, library, driver, block, category, interface, and array.

END

The END keyword signifies the end of a definition block.

PSF_VERSION

Specifies the PSF version of the library.

DRC

Specifies the DRC function name. This is the global DRC function, which is called by the Vitis IDE configuration tool or the command-line tool. This DRC function is called once you enter all the parameters and MLD or MDD writers can verify that a valid OS, library, or driver can be generated with the given parameters.

Option

Specifies that the name following the keyword option is an option to the Vitis IDE tools.

OS

Specifies the type of OS. If it is not specified, then OS is assumed as standalone type of OS.

COPYFILES

Specifies the files to be copied for the OS, library, or driver. If ALL is used, then the tool copies all the OS, library, or driver files.

DEPENDS

Specifies the list of directories that needs to be compiled before the OS or library is built.

SUPPORTED_PERIPHERALS

Specifies the list of peripherals supported by the OS. The values of this option can be specified as a list, or as a regular expression. For example:

option supported_peripherals = (microblaze)

Indicates that the OS supports all versions of MicroBlaze. Regular expressions can be used in specifying the peripherals and versions. The regular expression (RE) is constructed as follows:

  • Single-Character REs:
    • Any character that is not a special character (to be defined) matches itself.
    • A backslash (followed by any special character) matches the literal character itself. That is, this “escapes” the special character.
    • The special characters are: + * ? . [ ] ^ $
    • The period (.) matches any character except the new line. For example, .umpty matches both Humpty and Dumpty.
    • A set of characters enclosed in brackets ([]) is a one-character RE that matches any of the characters in that set. For example, [akm] matches either an "a", "k", or "m".
    • A range of characters can be indicated with a dash. For example, [a-z] matches any lowercase letter. However, if the first character of the set is the caret (^), then the RE matches any character except those in the set. It does not match the empty string. Example: [^akm] matches any character except "a", "k", or "m". The caret loses its special meaning if it is not the first character of the set.
  • Multi-Character REs:
    • A single-character RE followed by an asterisk (*) matches zero or more occurrences of the RE. Thus, [a-z]* matches zero or more lower-case characters.
    • A single-character RE followed by a plus (+) matches one or more occurrences of the RE. Thus, [a-z]+ matches one or more lower-case characters.
    • A question mark (?) is an optional element. The preceeding RE can occur zero or once in the string, no more. Thus, xy?z matches either xyz or xz.
    • The concatenation of REs is a RE that matches the corresponding concatenation of strings. For example, [A-Z][a-z]* matches any capitalized word.
    • For example, the following matches a version of the axidma:
      option supported_peripherals = (axi_dma_v[3-9]_[0-9][0-9]_[a-z]
      axi_dma_v[3-9]_[0-9]);

LIBRARY_STATE

Specifies the state of the library. Following is the list of values that can be assigned to LIBRARY_STATE:

ACTIVE
An active library. By default the value of LIBRARY_STATE is ACTIVE.
DEPRECATED
This library is deprecated
OBSOLETE
This library is obsolete and will not be recognized by any tools. Tools error out on an obsolete library and a new library should be used instead.

APP_COMPILER_FLAGS

This option specifies what compiler flags must be added to the application when using this library. For example:

option APP_COMPILER_FLAGS = “-D MYLIBRARY”

The Vitis IDE tools can use this option value to automatically set compiler flags automatically for an application.

APP_LINKER_FLAGS

This option specifies that linker flags must be added to the application when using a particular library or OS. For example:

option APP_LINKER_FLAGS = “-lxilkernel”

The Vitis IDE tools can use this value to set linker flags automatically for an application.

BSP

Specifies a boolean keyword option that can be provided in the MLD file to identify when an OS component is to be treated as a third party BSP. For example:

option BSP = true;

This indicates that the Vitis tools will offer this OS component as a board support package. If set to false, the component is handled as a native embedded software platform.

OS_STATE

Specifies the state of the operating system (OS). Following is the list of values that can be assigned to OS_STATE:
ACTIVE
This is an active OS. By default the value of OS_STATE is ACTIVE.
DEPRECATED
This OS is deprecated.
OBSOLETE
This OS is obsolete and will not be recognized by the tools. Tools error out on an obsolete OS and a new OS must be specified.
OS_TYPE
Specifies the type of OS. This value is matched with SUPPORTED_OS_TYPES of the driver MDD file for assigning the driver. Default is standalone.
REQUIRES_INTERFACE
Specifies the interfaces that must be provided by other OSs, libraries, or drivers in the system.
REQUIRES_OS
Specifies the list of OSs with which the specified library will work. For example:
option REQUIRES_OS = (standalone xilkernel_v4_[0-9][0-9])

The Vitis IDE tools use this option value to determine which libraries are offered for a given operating system choice. The values in the list can be regular expressions as shown in the example.

Note: This option must be used on libraries only.
HELP
Specifies the HELP file that describes the OS, library, or driver.
DEP
Specifies the condition that must be satisfied before processing an entity. For example to include a parameter that is dependent on another parameter (defined as a DEP, for dependent, condition), the DEP condition should be satisfied. Conditions of the form (operand1 OP operand2) are the only supported conditions.
INTERFACE
Specifies the interfaces implemented by this OS, library, or driver. It describes the interface functions and header files used by the library/driver.
BEGIN INTERFACE <interface name>
option DEP=;<list of dependencies>;
PROPERTY HEADER=<name of header file where the function is
declared>;
FUNCTION NAME=<name of the interface function>, VALUE=<function
name of library/driver implementation> ;
END INTERFACE
HEADER
Specifies the HEADER file in which the interface functions would be defined.
FUNCTION
Specifies the FUNCTION implemented by the interface. This is a name-value pair in which name is the interface function name and value is the name of the function implemented by the OS, library, or driver.
CATEGORY
Defines an unconditional block. This block gets included based on the default value of the category or if included in the MSS file.
BEGIN CATEGORY <category name>
PARAM name = <category name>, DESC=<param description>,
TYPE=<category type>,
DEFAULT=<default>, GUI_PERMIT=<value>, DEP = <condition>
option DEPENDS=<list of dependencies>, DRC=<drc name>, HELP=<help
file>;
<parameters or categories description>
END CATEGORY

Nested categories are not supported through the syntax that specifies them. A category is selected in a MSS file by specifying the category name as a parameter with a boolean value TRUE. A category must have a PARAM with category name.

PARAM
The MLD file has a simple <name = value> format for most statements. The PARAM keyword is required before every such NAME, VALUE pair. The format for assigning a value to a parameter is param name = <name>, default = value. The PARAM keyword specifies that the parameter can be overwritten in the MSS file.
PROPERTY
Specifies the various properties of the entity defined with a BEGIN statement.
NAME
Specifies the name of the entity in which it was defined. (Examples: param and property.) It also specifies the name of the library if it is specified with option.
VERSION
Specifies the version of the library.
DESC
Describes the entity in which it was defined. (Examples: param and property.)
TYPE
Specifies the type for the entity in which it was defined. (Example: param) The following types are supported:
bool
Boolean (true or false)
int
integer
string
String value within “ " (quotes)
enum
List of possible values that a parameter can take
library
Specify other library that is needed for building the library/driver
peripheral_instance
Specify other hardware drivers that is needed for building the library
DEFAULT
Specifies the default value for the entity in which it was defined.
GUI_PERMIT
Specifies the permissions for modification of values. The following permissions exist:
NONE
The value cannot be modified at all.
ADVANCED_USER
The value can be modified by all. The Vitis IDE does not display this value by default. This is displayed only for the advanced option in the Vitis IDE.
ALL_USERS
The value can be modified by all. The Vitis IDE displays this value by default. This is the default value for all the values. If GUI_PERMIT = NONE, the category is always active.
ARRAY
ARRAY can have any number of PARAMs, and only PARAMs. It cannot haveCATEGORY as one of the fields of an array element. The size of the array can be defined as one of the properties of the array. An array with default values specified in the default property leads to its size property being initialized to the number of values. If there is no size property defined, a size property is created before initializing it with the default number of elements. Each parameter in the array can have a default value. In cases in which size is defined with an integer value, an array of size elements would be created wherein the value of each element would be the default value of each of the parameters.
BEGIN ARRAY <array name>
PROPERTY desc = <array description> ;
PROPERTY size = <size of the array>;
PROPERTY default = <List of Values for each element based on the
size of the array>
# array field description as parameters
PARAM name = <name of parameter>, desc = "description of param”,
type = <type of param>, default = <default value>
.....
END ARRAY