-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathop_amp_2simultan_eq_2opamp_8tran_Hspice.spice.txt
108 lines (67 loc) · 2.38 KB
/
op_amp_2simultan_eq_2opamp_8tran_Hspice.spice.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
.OPTION LIMPTS = 501
VDD 4 0 DC 2.5 AC 1.0
VSS 0 5 DC 2.5
* solve 2x + 3y = 40
* 2x + y = 5
* begin
xamp1 inp inm out 4 5 opamp
rf inm out 100k
r1 out2 inm 66.7k
rpf inp 0 100k
Vcoeff vrp1 0 dc 2
*VDCfromop vfrom 0 dc 2
*xtest vrp1 out settling_test v0=0 v1=2 interval=10u
rp1 vrp1 inp 100k
rpy inp 0 200k
* end
* opamp for Y coordinate
* begin
xamp2 inp2 inm2 out2 4 5 opamp
rf2 inm2 out2 100k
r12 out inm2 50k
rpf2 inp2 0 100k
Vcoeff2 vrp2 0 dc 0.5
*xtest2 vrp2 out2 settling_test v0=0 v1=0.5 interval=10u
rp12 vrp2 inp2 100k
rpy2 inp2 0 100k
.subckt opamp 1 2 6 8 9
M1 4 2 3 3 NMOS1 W = 3U L = 1U AD = 18P AS = 18P PD = 18U PS = 18U
M2 5 1 3 3 NMOS1 W = 3U L = 1U AD = 18P AS = 18P PD = 18U PS = 18U
M3 4 4 8 8 PMOS1 W = 15U L = 1U AD = 90P AS = 90P PD = 42U PS = 42U
M4 5 4 8 8 PMOS1 W = 15U L = 1U AD = 90P AS = 90P PD = 42U PS = 42U
M5 3 7 9 9 NMOS1 W = 4.5U L = 1U AD = 27P AS = 27P PD = 21U PS = 21U
M6 6 5 8 8 PMOS1 W = 94U L = 1U AD = 564P AS = 564P PD = 200U PS = 200U
M7 6 7 9 9 NMOS1 W = 14U L = 1U AD = 84P AS = 84P PD = 40U PS = 40U
M8 7 7 9 9 NMOS1 W = 4.5U L = 1U AD = 27P AS = 27P PD = 21U PS = 21U
CC 5 6 3.0P
.MODEL NMOS1 NMOS VTO = 0.70 KP = 110U GAMMA = 0.4 LAMBDA = 0.04 PHI =
+ 0.7 MJ = 0.5 MJSW = 0.38 CGBO = 700P CGSO = 220P CGDO = 220P CJ
+ = 770U CJSW = 380P LD = 0.016U TOX = 14N
.MODEL PMOS1 PMOS VTO = -0.70 KP = 50U GAMMA = 0.57 LAMBDA = 0.05 PHI =
+ 0.8 MJ = 0.5 MJSW = 0.35 CGBO = 700P CGSO = 220P CGDO = 220P CJ
+ = 560U CJSW = 350P LD = 0.014U TOX = 14N
IBIAS 8 7 30U
.ENDS
* end
*.DC Vcoeff -1 20 0.1
*.DC Vcoeff2 -1 5 0.1
.PROBE V(out)
.PROBE V(out2)
* diverges if simulated for more than 4u
.tran 10p 6u 0.0 0.01u
.measure tran curr_vdd1 avg I(VDD) FROM=1ns TO=6u
.measure tran pwr_vdd1 PARAM='curr_vdd1*2.5'
.measure tran curr_vss1 avg I(VSS) FROM=1ns TO=6u
.measure tran pwr_vss1 PARAM='curr_vss1*2.5'
.measure tran curr_vco1 avg I(Vcoeff) FROM=1ns TO=6u
.measure tran pwr_vco1 PARAM='curr_vco1*2'
.measure tran curr_vco2 avg I(Vcoeff2) FROM=1ns TO=6u
.measure tran pwr_vco2 PARAM='curr_vco2*0.5'
.measure tran total_pwr PARAM='pwr_vdd1+pwr_vss1+pwr_vco1+pwr_vco2'
***--------------------------
.OPTION INGOLD=2 ARTIST=2 PSF=2 PROBE=0 GMMIN=1e-15 METHOD=GEAR
.OPTION POST
*.TEMP 30
.OPTIONS SCALE = 1.00
.SAVE
.end