TclSpice > Documents > SpiceWish Tutorial

Table of Contents



Initializing SpiceWish

 
package require spice
spice_init_gui example.cir

Screen shots


Running and Halting simulations

Once the Control GUI is loaded the simulation can be run and halted via the GUI's Run and Halt buttons, by the hot keys 'control-r' and 'control-h', or via the command line with spicewish::run and spicewish::halt.


Plotting spice nodes

Selecting Plot from the Control GUI menu will load the Node Selection Dialog listing all the available spice nodes. Clicking button 1 on the required node will highlight its text. Once all the required nodes are highlighted selecting Plot on the dialog will create a new viewer plotting all the nodes.


Adding/Removing additional traces to viewers

Selecting 'Trace -> Add/Remove traces' from the viewers menu loads the Node Selection Dialog with the viewers nodes highlighted. Additional nodes can be selected and current nodes can be deselected by clicking button 1. Select Update to refresh the viewers traces.


Updating viewers

When the simulation is running the current viewers traces can be updated through the viewers menu 'Traces -> Update', alternatively the 'control-u' hot key can be used.
The simulation can be resumed via the Control GUI or by hot keys 'contol-r' and 'contorl-h'. When a simulation halts all the viewers traces are automatically updated.


Zoom controls

To zoom with the mouse, position the mouse cursor to the left side of the desired zoom interval, clicking button 1 will create a zoom box, drag the zoom box to the right hand side of the desired zoom interval and click button 1.

To zoom out back to level 0, or cancel the zoom box click button 3.


Taking measurements

Each viewer has a measurement bar displaying six values x1, x2, y1, y2, dx and dy. The measurement values work on the dimensions of the zoom box as described above.

Clicking button 1 over a measurements label will print the value to the console.

The frequency value of dx is printed to the console by clicking button 2 over the dx measurement label.


Arranging Traces

SpiceWish has a sophisticated trace placement grid, in which the viewer is split up into 16 regions(slots). Traces can be grouped together in slot.


Viewing/Editing the spice file

The Control GUI has a built in spice file editor widget which can be toggled on and off by selecting Editor from the GUI or the 'contorl-e' hot key. The Editor also generates a seperate tab for any .include files.


Hot Keys

For ease of use the most commonly used commands have been given a keyboard shortcut.

Key

Widget

Command

control-r

Control GUI / Viewers

Run/Resumes the simulation

control-h

Control GUI / Viewers

Halts the simulation and updates all the viewers traces

control-u

Control GUI / Viewers

Updates all the viewers traces

control-p

Control GUI

Loads the Node Selection Dialog

control-e

Control GUI

Toggles the Editor widget on and off

control-t

Viewers

Toggles the viewers TracePlace grid on and off

control-m

Viewers

Toggles viewers menu and measurments bar on and off

control-c

Viewers

Raises the Control GUI


Command line driving

All SpiceWish's main procedures are exported with the namespace spicewish:: A detailed list with descriptions and usage's can be found here.


Run Scripts

Tcl scripts can easily be generated to automate the process of running the simulation and selecting nodes. (example.cir )

Example 1:

Example 2: