cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
1,059 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
Highlighted
Xilinx Employee
Xilinx Employee
1,046 Views
Registered: ‎05-22-2018

Re: Running Vivado Tcl command from bash shell

0 Kudos
Highlighted
1,040 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
Highlighted
Scholar
Scholar
997 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