UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
614 Views
Registered: ‎07-08-2016

Running Vivado Tcl command from bash shell

I would like to call a Vivado Tcl command from a bash shell, but I can't get Vivado to read from stdin or a file descriptor. Do I really have to write the Tcl command to a file before it can be read by Vivado?

I would assume I could do something like this:

 

vivado -mode batch -source <(echo 'puts [version -short]')

 

or:

echo 'puts [version -short] | vivado -mode batch -source /dev/stdin

I can see from the output that file is sourced but the Tcl command is not executed. The only ways I can get this to work is to actually write the Tcl command to a file.

echo 'puts [version -short]' >tmp.tcl
vivado -mode batch -source tmp.tcl
rm -rf tmp.tcl

 

 

Tags (3)
0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
601 Views
Registered: ‎05-22-2018

Re: Running Vivado Tcl command from bash shell

0 Kudos
595 Views
Registered: ‎07-08-2016

Re: Running Vivado Tcl command from bash shell

I think this is a different problem. It is also not addressed in the other thread. I don't want to read the Tcl script from disk. Is it intentional that Vivado cannot read from a file descriptor such as /dev/stdin? 

0 Kudos
Scholar markcurry
Scholar
552 Views
Registered: ‎09-16-2009

Re: Running Vivado Tcl command from bash shell

The standard unix way to do this is usually to support a special filename '-' meaning read from stdin, (or write to stdout).

It doesn't look like Vivado supports this mode of operation.

Are you trying to feed dynamic commands (from some other utility) to Vivado?  A mkfifo might work for this case.  Else you just need to create the temporary file.

Regards,

Mark

0 Kudos