A simple SPICE in C/C++
(C) 2010 Andrew Liu (C) 2010 Stimim Chen
Tools like lex and yacc are used in parsing, please install flex' and
bison'.
Simply just `make', tested on 32/64bit GNU/Linux.
cspice [NETLIST] [PLOT]
The output format is a gnuplot setting file, using `gnuplot [PLOT]' to plot the output of simulation. For more information of gnuplot, please check the website (http://sourceforge.net/projects/gnuplot/files/gnuplot/4.4.2/).
Resistor, Inductor, Capacitor, Voltage Control Current Source, Voltage source input, Current source input
Transient response, Frequency response
# Elements
V[ID] [NODE1] [NODE2] [VALUE] # Voltage source
I[ID] [NODE1] [NODE2] [VALUE] # Current source
R[ID] [NODE1] [NODE2] [VALUE] # Resistor
L[ID] [NODE1] [NODE2] [VALUE] # Inductor
C[ID] [NODE1] [NODE2] [VALUE] # Capacitor
G[ID] [NODE1] [NODE2] [NODE3] [NODE4] [VALUE]
# VCCS: (V3-V4) = (VALUE) * (V1 - V2)
# Simulations
FREQ [START] [END] [STEP] [SRC] [OUTPUT] # Frequency response
TIME [START] [END] [STEP] [OUTPUT] # Transient response