-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest005_inverter_modified.spice
93 lines (71 loc) · 1.79 KB
/
test005_inverter_modified.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
*** TEST 005 : INVERTER ***
*
* ngSPICE test for PLS experiments
*
* INVERTER PLS test - gate area illuminated
*
* Author: Jan Belohoubek, 01/2020
*
* https://users.fit.cvut.cz/~belohja4/
*
*
* **************************************
.include ../models.lib
.include ../tsmc180nmcmos.lib
.include models/inverter_modified.spice
* **************************************
* --- Test ---
* **************************************
* --- Settings
.param showPlots = 1
.param writeFile = 1
* redefine ...
.include test00X_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)
.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
* --- circuit layout model
Xbuff A O VSS VDD BUFF
* **************************************
* --- 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(Xbuff.O1)[$&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