Getting Started with PyOPUS

PyOPUS is a Python based platform for very sophisticated circuit optimization and simulation automation. The use of the Python library with the simulator requires a previous SPICE OPUS installation, then refer to the relative tutorial before proceeding. Below we show how to install PyOPUS on windows 7 (64 bit). All the softwares are 32-bit but they work fine on 64-bit. We’ ll have to install the following softwares:

Python 2.6.4Programming language
NumPy 1.3.0Package for scientific computing with Python
SciPy 0.7.1Python software for mathematics, science, and engineering
MatPlotLib 0.99.1Python 2D plotting library
wxPython 2.8Blending of the wxWidgets C++ class library with Python
PyOPUS 0.6 installerthe Windows32 PyOPUS installer

All these softwares can be downloaded here

The article refers to the softare versions of the table, but the procedure is the same for the updated versions.

Let’s start with the Python installation

the default destination directory is C:Python26

the full features installation requires about 50MegaByte

after the installation we have to add an enviroment variable: Start/Control Panel/System and Security/System/Advanced system settings, now click on Enviroment Variables button.

add to “Path” variable the value “C:Python26”

Getting Started with SPICE OPUS

SPICE OPUS is an acronym for SPICE engine for OPtimization UtilitieS. It’ s a recompilation of the original Berkeley’s source code for Windows 95/98/NT and Linux operating systems with Georgia Tech Research Institute’s XSPICE mixed-mode simulator.
You can simulate analog, digital, and analog+digital circuits using SPICE OPUS. It’s available for both Windows and Linux operating systems. It does not have a built-in schematic program for selecting components and drawing circuits. SPICE OPUS is being developed by Faculty of Electrical Engineering, University of Ljubljana, Slovenia and has over 10,000 users worldwide in the areas of research, education, and industry.

In this article we’ ll show the simple procedure to install SPICE OPUS on Windows (tested on Windows 7 64 bit) and how to describe a circuit to simulate, writing a .cir file with a text editor.

After downloading the program run the Setup.exe

you can change the installation directory by clicking on Browse button, by default it is installed in C:SpiceOpus


when the setup is complete, open the Start menu and go to Control Panel, choose “System and Security” and again “System”, once open this window,  click on “Advanced system settings”

the “System Properties”  window pops up:

click on “Enviroment Variables…”

Add a new system variable by clicking on the lower “New” button.

Name the variable OPUSHOME. The specified directory must be the Spice Opus installation directory. Click on OK. Confirm your changes by clicking on OK in the Environment variables dialog and once more in the

System Properties dialog.

Installation on Linux

Become root.

su –

Unpack the .tar.gz archive. A directory will be created with the name that looks like


Enter this directory.

cd spice_opusXXX_linux_DATE_TIME

Start the installation script (spice.install).

./spice_install INSTALL_PREFIX

INSTALL_PREFIX is the tree where Spice Opus will be installed. The recommended location is

/usr/local. The installation script removes any previous Spice Opus installation in that tree and

replaces it with the latest version. The binaries go to INSTALL_PREFIX/bin .

After the installation is finished, you can remove the spice_opusXXX_linux_DATE_TIME

directory that was created by unpacking the .tar.gz archive.

Setting up the environment

We shall assume that you are using BASH. Add the following two lines to /etc/profile (you

must be root in order to be able to do it).



where INSTALL_PREFIX is the tree where you installed Spice Opus.

It is also convenient if you add INSTALL_PREFIX/bin to your path. Add the following two

lines at the end of /etc/profile.


export PATH

Log out and log in again for the changes to take effect.