forked from SpiceSharp/SpiceSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.txt
66 lines (52 loc) · 2.24 KB
/
constants.txt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
*** CONVERTING USING SPICE2SPICESHARP ***
1) Use the following preprocessor defines for a SpiceDevice object
- The device definition (eg. bjt has DEV_bjt)
- AN_pz
- AN_noise
- NOBYPASS
- NEWTRUNC
- NEWCONV
- PREDICTOR
2) Specify the ITF file (eg. bjt has bjtitf.h)
3) Specify the definitions file (eg. bjt has bjtdefs.h)
4) Specify the device code folder
5) Create the SpiceClassGenerator using the SpiceDevice object
*** TRANSIENT SIMULATIONS ***
1) Calculate OP with MODETRANOP | MODEINITJCT -> MODETRANOP | MODEINITFLOAT
1') UseDC = true, UseSmallSignal = false, Domain = Time, InitJct -> InitFloat, UseIC = ?
2) Set mode MODETRAN | MODEINITTRAN for the first timepoint
2') ckt.Method = method, UseDC = false, UseIC = false
3) Converge
4) Set mode MODETRAN | MODEINITPRED for the next timepoint
4') Currently not changing to InitPred because I have not found any situation where state1 is not just copied to state0.
*** AC SIMULATIONS ***
1) Calculate OP with MODEDCOP | MODEINITJCT -> MODEDCOP | MODEINITFLOAT
1') UseDC = true, UseSmallSignal = false, Domain = Frequency
2) Load again using mode MODEDCOP | MODEINITSMSIG
2') UseSmallSignal = true
3) Calculate AC solution using mode MODEAC
*** DC SIMULATIONS ***
1) Set mode MODEDCTRANCURVE | MODEINITJCT
1') UseDC = true, UseSmallSignal = false, Domain = None
*** EXTRA ***
- MODEDC = MODEDCOP | MODETRANOP | MODEDCTRANCURVE
- INITF = MODEINITFLOAT | MODEINITJCT | MODEINITFIX | MODEINITSMSIG | MODEINITTRAN | MODEINITPRED
*** NOTES ***
MODEUIC = UseIC, but SpiceSharp will prioritize this variable in the following way:
- MODETRANOP + MODEUIC = MODEUIC
- MODETRAN + MODEUIC = MODEUIC
MODETRAN = method != null
MODETRANOP = Domain == Time && UseDC
MODEINITTRAN = method != null && method.SavedTime == 0.0
MODETRAN | MODETRANOP = Domain == Time
MODETRAN & MODEINITTRAN = MODEINITTRAN
MODETRAN | MODEINITTRAN = MODETRAN
ModeDC = UseDC
MODEDCOP = UseDC
MODEINITSMSIG = UseSmallSignal (inside load statements)
MODEAC = Never reached inside the simulation (?) so you can leave this out
MODEDCTRANCURVE = Domain == None
MODEINITJCT = Init == InitJct
MODEINITFLOAT = Init == InitFloat
MODEINITPRED = used in transient simulations, if it is just copying state1 in state0 you can ignore it
MODEINITFIX = Init == InitFix