03-19-2019 03:25 AM
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]')
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
03-19-2019 03:56 AM
03-19-2019 04:08 AM
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?
03-21-2019 02:58 PM
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.