cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
3,908 Views
Registered: ‎05-29-2018

Running the TCL console from cmd

Jump to solution

Hi,

 

I'm trying to automate a process where I am calling different Vivado tcl functions (write_project_tcl for instance) and a Python script (to automatically modify the tcl script generated by the write_project_tcl function). I've tried to write a batch file that would first call the Vivado function and then run the python script, but the function write_project_tcl is unknown from Windows and it can be only run when using the Vivado tcl console. Is there a way to run this console directly from the cmd prompt/use some Vivado functions within a batch file? Or is it possible to run a python script from the tcl console?

 

Thanks

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
4,447 Views
Registered: ‎05-29-2018

I have found a way to solve this issue by simply updating the environment variable 'path' so it contains the following path "C:\Xilinx\Vivado\2016.4\bin" which is obviously where Vivado is installed on my computer. Then it is possible to open a Vivado tcl console (with all vivado commands available) from the cmd prompt using something syntax like this :

 

vivado -mode tcl -write_project_tcl

 

It is also possible to run a python script from the Vivado tcl console using the following syntax:

 

exec python ./filename.py

 

Hope this helps someone else!

 

View solution in original post

6 Replies
Highlighted
Contributor
Contributor
4,448 Views
Registered: ‎05-29-2018

I have found a way to solve this issue by simply updating the environment variable 'path' so it contains the following path "C:\Xilinx\Vivado\2016.4\bin" which is obviously where Vivado is installed on my computer. Then it is possible to open a Vivado tcl console (with all vivado commands available) from the cmd prompt using something syntax like this :

 

vivado -mode tcl -write_project_tcl

 

It is also possible to run a python script from the Vivado tcl console using the following syntax:

 

exec python ./filename.py

 

Hope this helps someone else!

 

View solution in original post

Highlighted
Contributor
Contributor
3,586 Views
Registered: ‎07-08-2018

Hi marcel42,

  I meet the same problem in ISE, but follow your step I still can not solve the problem. Do you have any suggestions? Thank you!

0 Kudos
Highlighted
Moderator
Moderator
3,578 Views
Registered: ‎11-04-2010
Maybe you can try the below steps:
1. Set the ISE environment:
C:\Xilinx\14.X\ISE_DS\settings64.bat
2. Launch ISE in TCL mode:
xtclsh XX.tcl <options>
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Contributor
Contributor
3,553 Views
Registered: ‎07-08-2018
Hi hongh,
Actually I had tried that way, but I don't know how to operate the settings64.bat file and where to run the xtclsh. Would you mind giving me some more specific details? Thank you!
0 Kudos
Highlighted
Moderator
Moderator
3,548 Views
Registered: ‎11-04-2010
Hi, @yf201306 ,
Both commands can be executed in DOS Terminal(Windows).
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Contributor
Contributor
3,531 Views
Registered: ‎07-08-2018

Thank you, perfectly solved my problem! 

0 Kudos