-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest016_nand_all_ModifiedInput.spice
99 lines (77 loc) · 2.01 KB
/
test016_nand_all_ModifiedInput.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
*** TEST 016 : Symetrized NAND and inverter chains to emulate illumination-affected inputs ***
*
* ngSPICE test for PLS experiments
*
* NAND PLS test - gate area illuminated
*
* Author: Jan Belohoubek, 01/2020
*
* https://users.fit.cvut.cz/~belohja4/
*
*
* **************************************
.include ../models.lib
.include ../tsmc180nmcmos.lib
.include models/nand_all.spice
.include models/buffer_modified.spice
* **************************************
* --- Test ---
* **************************************
* --- Settings
.param showPlots = 1
.param writeFile = 1
* redefine ...
.include test01X_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)
*Vvin0 B 0 0 PWL(0ns 0V 30ns 0V 31ns SUPP)
* --- outputs
C1 VSS O 10fF
* --- circuit layout model
Xbuff A AO VSS VDD BUFF
Xbuff2 B BO VSS VDD BUFF
Xgate AO BO Y VSS VDD NAND2
Xinv O VSS Y VDD INVX1
Xinv2 O VSS Y VDD INVX1
* **************************************
* --- 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