Hspice/Ngspice Toolbox for Matlab

The Hspice/Ngspice Toolbox for matlab and Octave is a collection of matlab routines that allow the user to manipulate and view signals generated by Hspice and Ngspice

1. Download and Install the toolbox

  • download the file hspice_toolbox.tar.gz from here

  • expand and untar the file in some_location for which you have read and write access

tar -xzvf hspice_toolbox.tar.gz

Platform Compatibility

All files should work across different computer platforms, though the loadsig mexfile should generally be recompiled.

To compile the loadsig function for a different platform, from within Matlab go to the directory containing loadsig.c, and then type:

mex loadsig.c

Note that you can also compile loadsig in Octave in the exact same manner since the loadsig.c source code is compatible with both Matlab and Octave

To check your computer platform, from within Matlab type:

computer('arch')

Examples of computer platforms

Ubuntu on intel processor: glnxa64
macOS on intel processor: maci64
macOS on M1 processor: maca64
Windows: win64