App Namespace - 2020.2 English

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

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

Inside the Xilinx Tcl Store, a Tcl script belongs to an app, and an app (for example, template) is provided by a company (for example, mycompany). An app is an organizational container that offers some type of functionality. To avoid naming collision, each app has its own namespace. The full namespace qualifier for an app is:

::tclapp::<company>::<app> 

or

::tclapp::mycompany::template 

See the examples below:

namespace eval ::tclapp::mycompany::template {namespace export my_command1
}
proc ::tclapp::mycompany::template::my_command1 { args } {
}

The above code creates the proc my_command1 under the namespace ::tclapp::mycompany::template. Since my_command1 is expected to be executed by the user, it needs to be exported out of the app namespace. That is done with namespace export my_command1.