Coding Guidelines - 2020.2 English

Vivado Design Suite User Guide: Using Tcl Scripting (UG894)

Document ID
UG894
Release Date
2021-03-30
Version
2020.2 English

The Xilinx Tcl Store is an open source repository that allows internal and external users to contribute Tcl scripts for use by the Xilinx community. To prevent redundant efforts and ensure consistency, a gatekeeping committee reviews requests from contributors. Refer to the online wiki for further information on this process (https://github.com/Xilinx/XilinxTclStore/wiki/Xilinx-Tcl-Store-Home).

This section reviews the various coding guidelines that a Tcl script must follow before being added to the Xilinx Tcl Store. Those guidelines ensure, for instance, that the script is compliant with the underlying Xilinx Tcl Store mechanism or that there is no name collision between proc names and variables across all the apps and Tcl scripts. However, this section does not cover the process you must follow to contribute to the Tcl Store. The online Wiki covers that aspect.

The Xilinx Tcl Store includes many Tcl scripts that can be used as reference and as example code. In addition, a template app that can be found under:

<VIVADO_INSTALL>/data/XilinxTclStore/tclapp/mycompany/template/*

This template illustrates the directory structure that a new app must follow along with sample scripts. This section uses the following script as example code and reference:

<VIVADO_INSTALL>/data/XilinxTclStore/tclapp/mycompany/template/myscript1.tcl

The example code in this section assumes that the app name is template and that the app is provided and maintained by a company named mycompany.

Terminology

  • A user proc is referred to in this guide as a proc that is expected to be executed by the user.
  • A helper proc is a proc that can be used behind the scenes by a user proc to perform a task. However, a helper proc is not expected to be directly executed by the user. Helper procs are not included in the Help system.