-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest052_stackOverlapsLight.spice
121 lines (91 loc) · 3.24 KB
/
test052_stackOverlapsLight.spice
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
109
110
111
112
113
114
115
116
117
118
119
120
121
*** TEST 051 : NMOS stack Overlaps under illumination evaluation ***
*
* ngSPICE test for PLS experiments
*
* ...
*
* Author: Jan Belohoubek, 01/2020
*
* https://users.fit.cvut.cz/~belohja4/
*
*
* **************************************
.include ../models.lib
.include ../tsmc180nmcmos.lib
.param pLaser = 300
* **************************************
* --- Test ---
* **************************************
* --- Settings
.param showPlots = 1
.param writeFile = 1
* redefine ...
.include test051_settings.inc
.csparam showPlots = {showPlots}
.csparam writeFile = {writeFile}
.global showPlots writeFile
* --- End of Settins
Vtrig LaserTrig 0 0 PWL(0ns 0V 40ns 0V 42ns SUPP 62ns SUPP 64ns 0V 100ns 0V)
Vprecharge CLK 0 0 PWL(0ns 0V 10ns 0V 11ns SUPP)
.param beamDistanceTop = 0
.param beamDistanceBot = 0
.global LaserTrig beamDistanceTop beamDistanceBot
* --- inputs
*Vvin0 A 0 0 PWL(0ns 0V 30ns 0V 31ns SUPP)
* --- outputs
C1 VSS O 10fF
Ro Y O 1
* Common "precharge" PMOS
Xpmos2 VDD CLK Y VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=2u ch_l=0.2u mos_ad=0.6p mos_pd=0u mos_as=1p mos_ps=0u
* common NMOS substarte virtual node
XpsubIn psubIn VSS PSUB_IN
.if (gateVersion == 0)
Xnmos1 MIDDLE A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=0.6p mos_pd=4.6u mos_as=1p mos_ps=5u
Xnmos2 Y B MIDDLE VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=1p mos_pd=5u mos_as=0.6p mos_ps=0u
.endif
.if (gateVersion == 1)
Xnmos1 MIDDLE A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=0.3p mos_pd=4.6u mos_as=1p mos_ps=5u
Xnmos2 Y B MIDDLE VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=1p mos_pd=5u mos_as=0.3p mos_ps=0u
.endif
.if (gateVersion == 2)
Xnmos1 MIDDLE A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=0.6p mos_pd=4.6u mos_as=1p mos_ps=5u
Xnmos2 Y B MIDDLE VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=1p mos_pd=5u mos_as=0p mos_ps=0u
.endif
.if (gateVersion == 3)
Xnmos1 MIDDLE A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=0p mos_pd=4.6u mos_as=1p mos_ps=5u
Xnmos2 Y B MIDDLE VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=1p mos_pd=5u mos_as=0.6p mos_ps=0u
.endif
* **************************************
* --- Simulation Settings ---
* **************************************
.tran 0.1ns 100ns
.param SIMSTEP = '100ns/0.1ns'
.csparam SIMSTEP = {SIMSTEP}
* **************************************
* --- Simulation Control ---
* **************************************
.control
run
if ('showPlots' > 0)
plot i(vvdd) i(vvss)
plot v(A)
plot v(O)
end
let timeIndex = 0
while time[timeIndex] < 55ns
let timeIndex= timeIndex + 1
end
print i(VVDD)[$&timeIndex]
print v(O)[$&timeIndex]
print v(Y)[$&timeIndex]
print time[$&timeIndex]
if ('writeFile' > 0)
wrdata ivdd.out i(vvdd)
wrdata ivss.out i(vvss)
end
if ('showPlots' < 1)
quit
end
.endc
.end