This package wraps NgSpice for Julia users
Author JuliaComputing
4 Stars
Updated Last
1 Year Ago
Started In
January 2021


Stable Dev Build Status Coverage

This repository provides a Julia wrapper for NgSpice library.


In a Julia REPL,

] add
using NgSpice

To start an an interactive mode,

using Plots
  • Hit ~ for initializing the NgSpice

Run the Ngspice simulations commands!
For example:

source /filepath/netlist # without quotes
display                  # prints all vectors and constants
plot vector1 vector2     # plots the real part of vector by default

Note: It is not necessary for .cir to be placed in bin folder as long as full path is specified.

Additional to usual plot parameters, different modes of retrieval can be set with:
plot -x space seperated vectorlist
where x takes following modes:

Modes Description
-r, --real Real part of vector
-i, --imaginary Imaginary part of vector
-m, --magnitude Magnitude of vector
-p, --phase Phase of vector

For a non-interactive and more Julia-like experience checkout this tutorial.

Additionally, to simulate a complex_circuit.sp file with multiple plotting statements, run

using NgSpice
using Plots

Used By Packages

No packages found.