The MAD format specification involves the MAD file format specification and the Tcl file format specification.
MAD File Format Specification
The MAD file format specification describes the parameters using a sample MAD file and its corresponding Tcl file.
The following example shows a MAD file for a sample application called my_application.
option psf_version = 2.1;
option is a keyword identified by the tool. The option name following the option keyword is a directive to the tool to do a specific action.
The psf_version of the MAD file is defined to be 2.1 in this example. This is the only option that can occur before a BEGIN APPLICATION construct .
BEGIN APPLICATION my_application
The BEGIN APPLICATION construct defines the start of an application named my_application.
option NAME = myapplication option DESCRIPTION = "My custom application" END APPLICATION
Note: The application NAME should match the return value of the Tcl process swapp_get_name in the application Tcl file described above.
Tcl File Format Specification
Each application has a Tcl file associated with the MAD file. This Tcl file has the following sections:
- DRC Section: This section contains Tcl routines that validate your hardware and software instances and their configuration needed for the application.
- Generation Section: This section contains Tcl routines that generate the application header and C files based on the hardware and software configuration.