next up previous contents index
Next: Plots, Vectors and Expressions Up: The WRspice Shell Previous: Commands and Scripts   Contents   Index


The FIFO

When WRspice starts, it creates a ``named pipe''. For other than Windows, this looks to the user like a file named ``wrsfifo'' in the user's home directory, or wrsfifo1, wrsfifo2, etc., if there are multiple copies of WRspice running. In Windows, the file will instead have a name like `` \\.\ pipe \ wrsfifo'', which will again vary if there are multiple WRspice processes running.

If a variable named WRSPICE_FIFO is found in the environment, the text of this variable is taken as the base name for the fifo, instead of ``wrsfifo''. In Unix/Linux, this name can have a full path. All components of the path except for the file name must exist. If there is a conflict with an existing entity, an integer suffix will be added to make the name unique. In Windows, any path given is stripped and ignored.

A named pipe, or ``fifo'' has the property that text written to this ``file'' will be sourced into WRspice, as if the source command was used on a regular file containing the data written. In particular, if you are editing a SPICE file with your favorite text editor, you can ``save'' the text to this file name, and it gets sourced into WRspice. One should also save to a regular file, or changes may be lost!

When WRspice terminates normally, the fifo will be deleted. However, if WRspice crashes, or is killed by a signal, the fifo may be left behind, in which case it can be, and should be, deleted by the user. The fifo can be deleted using the same command as a regular file.

As WRspice is a single-threaded program, it will only be ``listening'' to the fifo when idle. Exactly what happens when WRspice is busy when data are written to the fifo is operating system dependent. Likely, the write will hang until WRspice goes into idle mode, i.e., the simulation or other operation completes.


next up previous contents index
Next: Plots, Vectors and Expressions Up: The WRspice Shell Previous: Commands and Scripts   Contents   Index
Stephen R. Whiteley 2017-02-22