Using vwait in TCL scripts within the Vivado 2016.4 lab tools
I've been experimenting with scripting the Vivado lab tools to perform some hardware testing. As part of this, I have been trying to get the TCL engine in the lab tools to operate as a UART. Getting the TCL engine to open the COM port is straightforward enough and I can register a handler for received data to display returned data within Vivado. However, I am trying to implement a command/response protocol over the UART so I would like to use the vwait TCL command. I.e. issue the command and wait for the repsonse. Unfortunately, I get odd behaviour when I call vwait. I find that the Vivado lab tools become unstable and occasionally unresponsive. I assume that vwait is being used by the TCL engine to support other parts of the Lab Tools.
I am writing a script in a similar style to that demonstrated on the TCL web site.