cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
390 Views
Registered: ‎05-07-2018

Nested TCL scripts

Jump to solution

I would like to call a TCL script from within a TCL script.  Not sure if Vivado supports this.  If not, am I stuck splitting my overall TCL command sequences between multiple TCL scripts and calling them all from a single vivado command like this:

vivado -mode batch -source init.tcl build.tcl sim.tcl

???

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Guide
Guide
344 Views
Registered: ‎01-23-2009

Re: Nested TCL scripts

Jump to solution

A Tcl script can be invoked from inside another Tcl script (or from the command line) using the Tcl command "source".

source <tcl_script>

This will transfer control to the <tcl script> execute the commands there until they complete, and then return control bacl to the script (or command line) that executed the "source" command.

Avrum

View solution in original post

0 Kudos
4 Replies
Highlighted
Teacher
Teacher
370 Views
Registered: ‎07-09-2009

Re: Nested TCL scripts

Jump to solution
https://www.tcl.tk/man/tcl8.5/tutorial/Tcl26.html

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Highlighted
Mentor
Mentor
354 Views
Registered: ‎06-16-2013

Re: Nested TCL scripts

Jump to solution

Hi @corydearing 

 

Try the following.

 

1. Create the following file as main tcl file.

 

source init.tcl

source build.tcl

source sim.tcl

 

2. Run the following command to launch vivado.

 

vivado -mode batch -source main.tcl

 

Best regards,

Highlighted
Guide
Guide
345 Views
Registered: ‎01-23-2009

Re: Nested TCL scripts

Jump to solution

A Tcl script can be invoked from inside another Tcl script (or from the command line) using the Tcl command "source".

source <tcl_script>

This will transfer control to the <tcl script> execute the commands there until they complete, and then return control bacl to the script (or command line) that executed the "source" command.

Avrum

View solution in original post

0 Kudos
Highlighted
Teacher
Teacher
338 Views
Registered: ‎07-09-2009

Re: Nested TCL scripts

Jump to solution
oops, your right, my link was for external exe files . !!
teach me to not read when Im tired,
<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos