21.1.13 Exporting Tcl Scripts
(Ask a Question)You can write out a Tcl script file that contains the commands executed in the current session. You can then use this exported Tcl script to re-execute the same commands interactively or in batch. You can also use this exported script to become more familiar with Tcl syntax.
You can export Tcl scripts from the Project Manager.
To export a Tcl session script from the Project Manager:
- From the File menu, choose Export Script File. The Export Script dialog box appears.
- Click OK. The Script Export Options dialog box appears:
- Check the Include Commands from Current Design [Project] Only checkbox. This option applies only if you opened more than one design or project in your current session. If so, and you do not check this box, Project Manager exports all commands from your current session.
- Select the radio button for the appropriate filename formatting. To export filenames relative to the current working directory, select Relative filenames (default) formatting. To export filenames that include a fully specified path, select Qualified filenames (full path; including directory name) formatting.
- Choose Relative filenames if you do not intend to move the Tcl script from the saved location, or Qualified filenames if you plan to move the Tcl script to another directory or machine.
-
Click OK. Project Manager saves the Tcl script with the specified
filename.
Note:
- When exporting Tcl scripts, Project Manager always encloses filenames in curly braces to ensure portability.
- Libero SoC software does not write out any Tcl variables or flow-control statements to the exported Tcl file, even if you had executed the design commands using your own Tcl script. The exported Tcl file only contains the tool commands and their accompanying arguments.