1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
|
gwave - a viewer for the output of spice-like simulators and other
sorts of of analog data.
Copyright 1998-2019 Steve Tell
tell@telltronics.org
building and Installation:
See the INSTALL file
** Alpha version warning: gwave-20190116
** Some features are not working in this version, notably plotting and export.
Usage:
gwave [options] [waveform-file ...]
The gwave main window is dominated by one or more "WavePanels" or
graticules in which waveforms can be displayed. WavePanels can be
added and deleted with the menus.
As waveform files are loaded from the command line or File->Read menu
item, a window containing a scrolling list of variables in the file
pops up. Use the left mouse button to drag-and-drop variables into
the WavePanels. Double-clicking a variable in the the list adds it to
the currently selected panel. If you choose to close the variable
list to neaten up your desktop, or lose the list under other windows,
use the View->Variable List menu to open it again or bring it to
the top.
To the left side of the WavePanels are scrolling lists of buttons
corresponding to each waveform shown in the panel. A waveform shown
in a panel is called a VisibleWave.
There are two GUI functions overloaded onto the button for a
VisibleWave:
- Click with the left mousebutton to "select" one or more VisibleWaves.
- Press and hold the right mousebutton to pop up a menu of operations
related to that particular VisibleWave.
To remove waves from the display , select one or more of them and then
press the "delete" button at the top of the main window. Alternately, use
the delete item on the VisibleWave-button popup menu.
Click on the waveform panels with the left and center mouse buttons to
set two cursors for measuring. Hold down these mouse buttons to drag
the cursors.
Pressing and holding the right mouse button while the cursor is in a
waveform panel brings up a popup menu. From this menu you can insert
and delete waveform panels. Some of the zoom commands are also
replicated on this menu.
Zooming of the Y axis to magnify a signal verticaly is only available
on the wavepanel popup-menu because it affects each wavepanel
seperately. By default, each wavepanel automaticly scales to enclose
the minimum and maximum values of the signals displayed in it. Adding
or removing signals may change the y-axis extents. After a Y-zoom or
XY-zoom operation, the Y axis for that particular wavepanel changes to
"manual" mode and remains fixed. To restore the panel to full-size
with automatic Y zooming, select the "Zoom Y Full + Auto" menu option.
Exporting data.
A selected subset of the data from a waveform file may be exported in
a tabular ascii format for postprocessing by external programs.
Select "Export Data..." from the File menu of the waveform variable
list window.
In the current version of gwave, data from multiple files, or from
multiple independent variables within a single file, cannot be
combined and exported to a single file.
Plotting.
A view of the displayed waveforms can be plotted to postscript,
bitmap, and other formats for printing and documenataion.
All plot rendering is handled by external programs; currently gnu graph
and gnuplot are supported.
Choose the "Plot..." item from the main window or from any wavepanel's
popup menu.
Only a subset of the features of the external plot-rendering tools are
directly available from the plot dialog box. To make more advanced
use of these tools, select "Keep Tempfiles" in the plot dialog box.
This will preserve all of the temporary files and scripts used to
drive the external plot-rendering tool. These files will have names
generated from the name of the plot output by appending suffixes. Consult
the documentation for each plot-rendering tool for information on additional
options that can be used in the script files.
Additional plot-rendering tools can be supported by writing an
appropriate scheme module; see export-gnugraph.scm and export-gnuplot.scm
for examples.
Configuration save/restore
A gwave panel and VisibleWave setup can be saved and restored. To save
all settings for all data files, use the "Save Configuration as Script" from
the man window's File menu. To save the configuration for one file only,
use the "Save" option on that file's scrolling variable-list window.
Scripts saved by either method can be run to restore gwave
configuration in two ways:
- From the main window of a fresh gwave session, use the "File->Execute
Script" menu item.
- From the unix shell command line. Either type "gwave -s <script>," or
simply type the name of the script. Either way, gwave will start and run the
named script, producing wave panels set up exactly as they were when saved.
Scripts written by gwave that restore only a single file's
configuration can also be applied to another file, provided that the
second data file has variables with the same names as those in the
first. Load the new data file, using the main window File->Read menu
item. Then, from the variable-list File menu, pick "Apply Script to
File" and choose the script. Variables in the new data file will be
displayed in panels in the same manner as those from the original
file. This can be extremely useful, say for comparing the results of
simulating the same circuit under different temperature or component-value
conditions.
In addition to the configuration-script-writing facilities described
here, you are welcome to create your own guile scripts for specialized
gwave applications. For general guile information, see
http://www.gnu.org/software/guile/guile.html
For information on gwave-specfic features available for scripting
gwave using guile, see the text files gwave-concepts.txt,
gwave-hooks.txt, gwave-procedures.txt, and gwave-variables.txt All of
gwave's menus and many of its user-interface features are written in
guile; the code in the scheme subdirectory may also be useful as an
example.
Remote Control
A running gwave process may be remotely controlled by any process that
has permission to connect to the same X server. Use the "xauth" and
"xhost" utilities carefully to control access to your X server at all
times. This is especialy true when running gwave; anyone who can
connect to your X server can cause your gwave to execute arbitrary
guile code.
The gwave-exec command sends a single guile expression to gwave to
be executed, and displays the result and output of that command.
For example
gwave-exec '(x-zoom! 10e-6 20e-6)'
will zoom gwave's display so that the region of time from 10 to 20
nanoseconds is visible.
The gwaverepl program enters an interactive "read-evaluate-print" loop
in which multiple guile expressions may be entered. Each expression
is evaultated, and the results printed. Gwaverepl uses the GNU
Readline facility for input line-editing and history scrollback, so
all of the usual emacs (or vi) editing keys may be used. Type the
End-Of-File character (usually Control-D) to exit gwaverepl.
Bug: do not use gwave-exec or gwaverepl when running multiple
instances of gwave at a time on the same X server.
Waveform Input files.
Gwave understands CAzM transient output (.N/.B/.W) files, the binary
and ascii outputs from HSPICE (.tr0, .sw0, and .ac0) files, Ascii
nanosim "out" format, and tabular ascii files with a header line.
Gwave tries to guess the type of the file based on filename, and then
tries all file formats until one succedes.
Details on using Gwave with the output of various simulators:
Berkeley Spice3F5 and ng-spice. Gwave can read both the the ascii and
binary forms of the spice "rawfile" output. If difficulty is
encountered with the binary format, Try selecting the ascii form by
setting the environment variable SPICE_ASCIIRAWFILE to "1" before
running spice3.
Reading of binary rawfiles has only been tested with both ng-spice and
gwave running on a little-endian machine. Your mileage may vary (but
please send bug reports!)
GnuCAP (http://www.gnu.org/software/gnucap), and its predecessor
ACS (Al's Circuit Simulator, http://www.geda.seul.org/tools/acs/index.html)
Gwave should identify and read ACS/GnuCAP output files, generated with
the '>' option to a .tran statement.
Synopsys (formerly Avanti, formerly Meta Software) HSPICE.
Gwave should work with both ascii and binary output in the form of
.tr0/.sw0/.ac0 files. If one form doesn't work for you, try the other form.
I used to have problems with some .ac0 files but I believe this is fixed.
Try putting ".options probe" in your input file if you have troubles.
Tanner Research T-Spice.
It has been a while since I tried tspice, but gwave should read the output,
at least from transient analysis runs. T-Spice output is in a variant of the
CAzM format, not surprising since Tanner bought the rights to CAzM from MCNC.
Silvaco SmartSpice
Gwave works with the variant of berkeley spice rawfile format produced
by SmartSpice. Both ascii and binary files should work, although this
hasn't been tested recently.
Apache Design Automation NSPICE
Nspice produces yet another variant of the berkeley spice3 rawfile format.
Both ascii and binary files should work.
Synopsys Nanosim
GWave can read the ".out" format from nanosim.
Your own custom waveforms:
The easiest of the input formats to generate with simple scripts and
other tools is the "ascii" format. See the ACS-simulator output file
tpwl.acs in the examples directory for an example of this format. The
first line lists the variable names, seperated by whitespace. The
variable in the first column is assumed to be the independent
variable, for example "time." Subsequent lines in the file contain
the data, one timestep per line. The independent variable must be
nondecreasing. Lines in the file can be arbitrarily long.
Note that the '#' in examples/tpwl.acs is for the benefit of other
tools (such as gnuplot), that don't expect column titles or variable
names in the file. To gwave, the first line is not a comment but
contains whitespace-seperated fields naming the variables. The result
is that gwave thinks the independent variable name is "#Time," but
don't let that bother you.
Bugs:
An oft-reported problem in gwave is that the scrolling variable list
window is unable to scroll and show more than one screen of variables
when your simulation has a very large number of them. This is
actually a limitation in the Gtk+ toolkit; srolling windows can't be
taller than the 32,768 pixel limitation of X11 ofscreen pixmaps.
Workaround: probe fewer variables, or use sp2sp to select only the
ones you need.
----------------------------------------------------------------------
The sp2sp utility.
In addition to gwave, I've included a utility program called "sp2sp"
(for spice-to-spice). It uses the same spicefile reaer code to
convert among some of the goofy raw file formats output by spice-like
simulators. Its primary output format is the simple "ascii" format,
consisting of one line per step, with whitespace-seperated columns.
This format can be read by gwave, but is also ideal for feeding to
awk, perl, or gnuplot.
A complete manual page for sp2sp is provided and installed, but here are
a few hints:
Unlike gwave itself, sp2sp does not autodetect the file format. Use
the -t option to specify the input file format.
sp2sp can produce arbitrarily long output lines. This can cause
trouble with very old versions of some unix utilities.
Example sp2sp usage:
sp2sp -t hspice aoi.W.tr0
----------------------------------------------------------------------
This tool is far from complete. Partial contents of the To Do list:
- better handling of datafiles containing complex numbers. Currently,
these files are read, but only the real part can be displayed.
Workaround: Sp2sp prints out both the real and imaginary parts; convert
the file to generic ascii format using sp2sp.
- Send feedback and error messages from loading of files to a popup window
or status line instead of to stdout or stderr.
- Drag-and-drop to move waveform from one panel to another
- More guile methods to round out the interface, including:
access to selected-VisibleWave list, others.
- Drawing a labeled graticule in the waveform area
- Seperate lists for selecting voltage/current/etc. types of variables
- Documentation, both user's manual and programmer's manual.
Autodocs for guile primitives need to be extracted into text files.
----------------------------------------------------------------------
Acknowledgements
Thanks to my colleagues at work including John Poulton, John Eyles,
Fred Heaton, Trey Greer, and Teva Stone for giving gwave heavy use
over the last several years.
Thanks to Greg Badros and Maciej Stachowiak for the SCWM window
manager, which inspired me to use guile as the extension language for
gwave. A number of code fragments and a bit of the general style of
the Guile/C interaction was borrowed from SCWM. Any misinterpretation
and bugs introduced along the way are most certainly my fault.
And last but not least, thanks to the authors of Gtk+, Guile, and
Guile-gnome-platform for some great building blocks.
----------------------------------------------------------------------
This file is part of gwave.
Gwave is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Gwave is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with gwave. If not, see <http://www.gnu.org/licenses/>.
|