GNU Spice GUI
User Manual


Table of Contents

1.   Introduction

2.   Menu Bar
2.1   File Menu
2.2   Simulate Menu
2.3   Settings Menu
2.3   Help Menu
3.   Tool Bar

4.   Main Window
4.1   Node List
4.2   Component List
4.3   Analysis Notebook
4.4   Console Notebook
4.5   Status Bar
5.   Files

6.   Software


1.       Introduction


GNU Spice GUI (gSpiceUI) is intended to provide a GUI for freely available electronic circuit simulation engines ie. GnuCAP and NG-Spice. (It should be noted that GNU-Cap is not derived from the SPICE code base but is an independent implementation of the principals used to analyses electronic circuits.) gSpiceUI uses gNetList to convert schematic files to netlists, gWave or Gaw to display simulation results and gSchem is the preferred schematic capture tool.

Here are two screen shots of gSpiceUI in action; the first with GNU-Cap as the simulation engine, the second with NG-Spice as the simulation engine. The GUI is designed to be as consistant as possible between analysis types and simulation engines. The intention is to abstract the technical particulars from the user so that the focus may be on the simulation rather than the simulation engine or even analysis type.

It is important to realise that a simulation engine "models" the performance of a system and therefore can never be 100% accurate. And the simulation engine itself is an implementation in software of the model and so is subject to bugs. Consequently, as the underlying model and implementation improve the modelling performance improves. One of the reasons for the choice of simulation engines to support was that they be in constant development. This is also one of the reasons for supporting more than one simulation engine; if the same or similar results can be achieved using two different simulation engines then it's likely that the simulation actually matches reality.

The skills and judgement of the user have a profound impact on the usefullness of simulation. It can be a technically demanding process requiring considerable thought, practice and persistence. The alternative is to go straight to building prototypes; inany case ultimately prototypes must be created to finalize a design. However simulation is generally a rewarding step in the development process even if it only provides a better understanding of the internal workings of a design.


Return to top

2.       Menu Bar


The menu bar provides access to almost all of the functionality provided by gSpiceUI. However there are a few functions that can only be accessed via command line options.

2.1     File Menu

This file menu contains options mainly associated with handling netlist and schematic files.

2.1.1   Open

Open a netlist (circuit description) file containing SPICE compatible component definitions. If the netlist contains simulation instructions gSpiceUI attempts to parse them and the settings are displayed in the GUI.

2.1.2   Import

Import one or more schematic files. gNetList is used to convert the schematic file/s to a single netlist file. The netlist file name is automatically derived from the first schematic file name in the list with the file extension changed to .ckt. Eg. if schem1.sch, schem2.sch, schem3.sch were specified as the schematic file names to be impoted the netlist file name would be schem1.ckt.

2.1.3   Reload

Reload the net list file. If the netlist was imported from one or more schematic files, the import operation will be repeated. As far as possible the simulation settings shown in the currently displayed analysis notebook page are retained.

When gSpiceUI is used to create a netlist file from scheamtic file/s it inserts a reference to the schematic file/s near the beginning of the netlist file. If the currently open netlist has this schematic reference, reload performs an import operation otherwise the netlist is simply reloaded. In either case the simulation settings shown in the currently displayed analysis notebook page are retained as far as possible.

2.1.4   Close

Close the currently open netlist file and resets all GUI parameters to default values.

2.1.5   Exit

Close all files and child applications, delete temporary files if required and exit the application.


Return to top

2.2     Simulate Menu

The simulate menu contains options associated with circuit simulation operations and provides access to useful applications on which gSpiecUI dependends.

2.2.1   Create

Create a simulation based on the values entered in the currently displayed analysis panel. The results of this operation are written to file and displayed in the Simulation text control. If a problem is encountered a message box will be display giving a brief explaination as to why the simualtion could not be created.

2.2.2   Run

Run a simulation. If the simulation has already been created it is run immediately. If the analysis panel values have been modified since the last create operation new create simulation operation is executed prior to running the simulation. The simulation text control can be edited by the user, if this is the case the contents of the simulation control are written to file and run as is, ignoring any changes that may have been made to the analysis panel.

2.2.3   Stop

Stop a running simulation immediately.

2.2.4   Edit Schem

Edit a schematic file using gSchem.

2.2.5   View Results

View the simulation results by envoking the a data viewer application eg. gWave. The file loaded into the viewer process at startup is dependent on some of the GUI selections. Generally the results file for the currently selected simulation engine will be loaded. The analysis type is dependent on the currently selected analysis page. If the results tab for the other simulation is currently displayed the results file will be for the other simulation engine.


Return to top

2.3     Settings Menu

The settings menu contains application configuration options.

2.3.1   Simulation Engine Choices

Radio buttons allowing the selection of the electronic circuit simulation engine to be used. The selected simulation engine name is displayed in the status line.

2.3.2   Preferences Dialog

The paths to the various utilities used by gSpiceUI may be manually set via this menu selection.

A check box allowing the tool tips to be enabled or disabled.


Return to top

2.4     Help Menu

The menu contains a link to the help contents, links to the electronic circuit simulation engine user manuals and a link to the application about dialogue.


Return to top

3.       Tool Bar


The tool bar contains buttons which give easy access to the most used application functions. The buttons are presented in groups associated with the different types of activities. Refer to the matching menu bar function in section


Return to top

4.       Main Window


The main window is made up of various display objects which are described in the following sub-sections. These are lists of possible test point, analysis settings, console output and a status bar.

The main window title always contains the application name and version information. In addition, if a file is open, be it a netlist or schematic/s, the name of a netlist file will be appended to the normal window title banner. This is the main file that gSpiceUI works on.


Return to top

4.1     Node List

Display the list of node labels extracted from the netlist file. One or more nodes may be selected (or deselected) by clicking on the node/s in the list with the mouse. The probes for the selected nodes will be calculated and included in the simulation results.

A single node may be selected from the list by left clicking on it with the mouse. To select multiple nodes press the control key and left click on the desired nodes with the mouse. To select a range of nodes left click on the desired range with the mouse while holding down the shift key.


Return to top

4.2     Component List

Display the list of components extracted from the netlist file. One or more components may be selected (or deselected) by clicking on the component/s in the list with the mouse. The probes for the selected components will be calculated and included in the simulation results. At present only two terminal components are included in this list.

A single component may be selected from the list by left clicking on it with the mouse. To select multiple components press the control key and left click on the desired components with the mouse. To select a range of components left click on the desired range with the mouse while holding down the shift key.


Return to top

4.3     Analysis Notebook

There are two different analysis notebooks which may be displayed associated with the two simulation engines supported by gSpiceUI ie. GNU-Cap and NG-Spice. Each analysis notebook contains analysis pages reflecting the different analysis types supported by the particular simulation engine.

4.3.1   Operating Point Analysis

GNU-Cap :

Performs a nonlinear DC steady state analysis. If a temperature range is given, it sweeps the temperature. Refer to the GNU-Cap User Manual, Section 2.31 OP Command, for a detailed description.

NG-Spice :

This analysis type is not directly supported by NG-Spice however similiar functionality is provided via the DC Analysis panel.

4.3.2   DC Analysis

GNU-Cap :

Performs a nonlinear DC steady state analysis, and sweeps the signal input, or a component value. Refer to the GNU-Cap User Manual, Section 2.11 DC Command, for a detailed description.

NG-Spice :

Determines the DC transfer curve (with capacitors open and inductors shorted). A source must be selected which may be an independent voltage or current source, a resistor or the circuit temperature. Refer to the NG-Spice User Manual, Analyses and Output Control, Analyses, DC Tranfer Function, for a detailed description.

4.3.3   AC Analysis

Not yet written.

4.3.4   Transient Analysis

Not yet written.

4.3.5   Fourier Analysis

Not yet written.


Return to top

4.4     Console Notebook

The console notebook contains various text controls which display text data generated by the different operations initiated by gSpiceUI.

4.4.1   Console

Display the console input/output for the last process executed by gSpiceUI. If an error occurs this is the first place to look for indications of what has gone wrong.

4.4.2   Circuit

Display the raw netlist file which was opened or imported via the file menu. The variables and values contained in the netlist file are those displayed in the GUI's display objects.

4.4.3   Simulation

Display the simulation file to be run. It is basically the netlist file plus simulator commands based on user input to the GUI objects. It can be manually edited by the user and will be run as is if the Run button is pressed. NOTE : if the create button is pressed the contents of this tab will be over-written destroying any user input.

4.4.4   GNU-Cap Results

Display the results from the last run of the GNU-Cap simulation engine. The raw data is reformatted to aid readability; non-data records are removed and the precision is set according the value set in the Preferences dialog. If required the raw output from the simulation engine may be viewed in the Console tab.

4.4.5   NG-Spice Results

Display the results from the last run of the NG-Spice simulation engine. The raw data is reformatted to aid readability; non-data records are removed and the precision is set according the value set in the Preferences dialog. If required the raw output from the simulation engine may be viewed in the Console tab.


Return to top

4.5     Status Bar

Not yet written.


Return to top

5.       Files


Whilst running gSpiceUI various files may be generated in the directory occupied by the schematic or netlist file/s. To illustrate consider the situation where the gSchem file test-amp1.sch (which may found in the sch/ directory) is imported and every possible type of simulation is run using both NG-Spice and GNU-Cap. The following is a list of all files which would be created :



  <path>/sch/test-amp1.sch   (The schematic file)
   
1.  <path>/sch/test-amp1.ckt   (Net list file with simulation commands)
2.  <path>/sch/gspiceui.log   (Temporary file containing raw process output)
3.  <path>/sch/test-amp1.gnucap.op   (Results file - operating point analysis)
4.  <path>/sch/test-amp1.gnucap.dc   (Results file - DC analysis)
5.  <path>/sch/test-amp1.gnucap.ac   (Results file - AC analysis)
6.  <path>/sch/test-amp1.gnucap.tr   (Results file - transient response analysis)
7.  <path>/sch/test-amp1.gnucap.fo   (Results file - fourier analysis)
8.  <path>/sch/test-amp1.ngspice.dc   (Results file - DC analysis)
9.  <path>/sch/test-amp1.ngspice.ac   (Results file - AC analysis)
10.  <path>/sch/test-amp1.ngspice.di   (Results file - distortion analysis)
11.  <path>/sch/test-amp1.ngspice.no   (Results file - noise analysis)
12.  <path>/sch/test-amp1.ngspice.pz   (Results file - pole-zero analysis)
13.  <path>/sch/test-amp1.ngspice.se   (Results file - sensitivity analysis)
14.  <path>/sch/test-amp1.ngspice.tr   (Results file - transient response analysis)
15.  <path>/sch/test-amp1.ngspice.tf   (Results file - transfer function analysis)

All file names begin with the prefix test-amp1 (taken from the schematic file name). File name extensions then depend on the file type. Files containing simulation results include the name of the simulation engine used to generate the data and an abbreviation indicating the analysis type.


Return to top

6.       Software


Note: The object models depicted here largely show the actual application architecture. However, the software is under development and is often in a state of flux, it will not always exactly match the information shown in the object models.

The following links are to object models depicting the static architecture of gSpiceUI :




Return to top

Last modified : 10/03/2010
Author : Mike Waters
E-Mail : m.waters@bom.gov.au