-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathREADME
43 lines (27 loc) · 1.28 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# CSPICE
A simple SPICE in C/C++
(C) 2010 Andrew Liu <andrewliu33 gmail.com>
(C) 2010 Stimim Chen <death1048576 gmail.com>
## Compile
Tools like lex and yacc are used in parsing, please install `flex' and `bison'.
Simply just `make', tested on 32/64bit GNU/Linux.
## Usage
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/).
## Support elements and simulations
### Support elements
Resistor, Inductor, Capacitor, Voltage Control Current Source, Voltage source input, Current source input
### Support simulations
Transient response, Frequency response
## Netlist format
# 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