-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.lib
604 lines (463 loc) · 20.2 KB
/
models.lib
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
* **************************************
*
* ngSPICE models for PLS experiments
*
* Author: Jan Belohoubek, 01/2019
*
* https://users.fit.cvut.cz/~belohja4/
*
*
* **************************************
* **************************************
* --- Common globals ---
* **************************************
.param SUPP = 1.8V
.csparam SUPP = {SUPP}
* default test input high/low values
.param INHIGH = 'SUPP'
.param INLOW = 0V
.csparam INHIGH = {INHIGH}
.csparam INLOW = {INLOW}
VVDD VDDR 0 SUPP
R_VDD VDDR VDD 0.001
VVSS VSS 0 0V
XpsubInCommon psubInCommon VSS PSUB_IN
.global psubInCommon
.global VDD VSS
.temp 25
* --- Technology selection
.param TECHNOLOGY_TSMC180nm = 0
.param TECHNOLOGY_PTM90nm = 1
.param TECHNOLOGY = 'TECHNOLOGY_TSMC180nm'
.param LENS_5X = 0
.param LENS_20X = 1
.param LENS_100X = 2
.param LENS = 'LENS_5X'
* --- PN area junction (use [um]!)
.if (TECHNOLOGY == TECHNOLOGY_TSMC180nm)
.param PsubNwellJunctionS_INVX1 = '3 * 5.7'
.csparam PsubNwellJunctionS_INVX1 = {PsubNwellJunctionS_INVX1}
.param PsubNwellJunctionS_NAND2X1 = '3 * 5.7'
.csparam PsubNwellJunctionS_NAND2X1 = {PsubNwellJunctionS_NAND2X1}
.param PsubNwellJunctionS_NAND3X1 = '4.8 * 5.7'
.csparam PsubNwellJunctionS_NAND3X1 = {PsubNwellJunctionS_NAND3X1}
.param PsubNwellJunctionS_NOR2X1 = '4 * 5.7'
.csparam PsubNwellJunctionS_NOR2X1 = {PsubNwellJunctionS_NOR2X1}
.param PsubNwellJunctionS_NOR3X1 = '7.5 * 5.7'
.csparam PsubNwellJunctionS_NOR3X1 = {PsubNwellJunctionS_NOR3X1}
* default value: for evaluation only!
.param NplusPsubJunctionS = '2 * 0.4'
.csparam NplusPsubJunctionS = {NplusPsubJunctionS}
.endif
* --- NMOS parameters
* W = width
* L = length
* PD = drain perimeter
* AD = drain area
* AS = source area
* PS = source perimeter
.if (TECHNOLOGY == TECHNOLOGY_TSMC180nm)
.param NMOSw = '2.0u'
.param NMOSl = '0.2u'
.param NMOSad = '1.2p'
.param NMOSpd = '5.2u'
.param NMOSas = '2p'
.param NMOSps = '10u'
.endif
* **************************************
* --- PLS Params ---
* **************************************
* --- laserPower in [mW] ---
.param pLaser = 50
.csparam pLaser = {pLaser}
* following parameters were found in:
* https://www.emse.fr/~dutertre/doc_recherche/J_2013_2_talk_ESREF13_paper35_Sarafianos_Dutertre.pdf
* --- equation (1) params N+/Psub ---
.param p = '4/1000000000'
.param q = '-5/10000000'
.param r = '9/1000000'
.param s = '4/1000000'
* --- equation (1) params P+/Nwell ---
.param p2 = '9/100000'
.param q2 = '2/10000'
.param r2 = '-5/1000000'
.param s2 = '1.2/1000'
* --- equation (1) params Nwell/Psub ---
.param p3 = '6/100000000000'
.param q3 = '9/1000000000'
.param r3 = '1/10000000'
.param s3 = '6/100000000'
* equation (2) N+/Psub ---
.param a = 'p * pLaser * pLaser + q * pLaser + r'
.csparam a = {a}
* equation (3)
.param b = 'pLaser * s'
.csparam b = {b}
* equation (2) P+/Nwell ---
.param a2 = 'p2 * pLaser/1000 * pLaser/1000 + q2 * pLaser/1000 + r2'
.csparam a2 = {a2}
* equation (3)
.param b2 = 'pLaser/1000 * s2'
.csparam b2 = {b2}
* equation (2) Nwell/Psub ---
.param a3 = '0.007'
.csparam a3 = {a3}
* equation (3)
.param b3 = '0.002'
.csparam b3 = {b3}
* --- equation (3) params: spatial dependence ---
.if (LENS == LENS_5X)
.param beta = '0.4'
.param gamma = '0.6'
.param c1 = '2.5'
.param c2 = '55'
.endif
.if (LENS == LENS_20X)
.param beta = '0.6'
.param gamma = '0.4'
.param c1 = '23.8'
.param c2 = '654'
.endif
.if (LENS == LENS_100X)
.param beta = '0.7'
.param gamma = '0.3'
.param c1 = '1000'
.param c2 = '15000'
.endif
* .param distance = '1'
* .param alpha = 'beta*exp(-1*distance*distance/c1)+gamma*exp(-1*distance*distance/c2)'
* **************************************
* --- Device models ---
* **************************************
* --- Ideal SW model ---
* roff rersistivity remains default
.model idealSw sw vt='SUPP/2' vh=0.1 ron=1
* **************************************
* --- Subckts ---
* **************************************
.subckt SUBCKT_Iph_nplus_psub nplus psubIn psub laser_trig transConductance = 1 constCurrent = 0 distance = 0 PNArea = NplusPsubJunctionS
Vvconst vconst 0 1.0V
* model was fitted for 10um PN junction -> the PNArea paramter must be /10
* model was fitted for laser width 3um -> the pulse width paramter must be /3
.if (pLaser > 0)
G1 nplus psubIn ctrl psubIn 'transConductance * (beta*exp(-1*distance*distance/c1)+gamma*exp(-1*distance*distance/c2)) * PNArea/10'
G2 nplus psubIn ctrl2 VSS 'constCurrent * (beta*exp(-1*distance*distance/c1)+gamma*exp(-1*distance*distance/c2)) * PNArea/10'
.endif
S1 nplus ctrl laser_trig VSS idealSw OFF
S2 ctrl psubIn VDD laser_trig idealSw ON
S3 vconst ctrl2 laser_trig VSS idealSw OFF
S4 ctrl2 VSS VDD laser_trig idealSw ON
.ends
.subckt SUBCKT_Iph_Psub_Nwell psub nwell laser_trig transConductance = 1 constCurrent = 0 distance = 0 PNArea = 1
Vvconst vconst 0 1.0V
* model was fitted for 12um x 12um PN junction -> the PNArea paramter must be /144
G1 psub nwell ctrl nwell 'transConductance * (beta*exp(-1*distance*distance/c1)+gamma*exp(-1*distance*distance/c2)) * PNArea/144'
G2 psub nwell VSS ctrl2 'constCurrent * (beta*exp(-1*distance*distance/c1)+gamma*exp(-1*distance*distance/c2)) * PNArea/144'
S1 psub ctrl laser_trig VSS idealSw OFF
S2 ctrl nwell VDD laser_trig idealSw ON
S3 vconst ctrl2 laser_trig VSS idealSw OFF
S4 ctrl2 VSS VDD laser_trig idealSw ON
.ends
.subckt SUBCKT_Iph_Pplus_Nwell pplus nwell laser_trig transConductance = 1 constCurrent = 0 distance = 0 PNArea = 1
Vvconst vconst 0 1.0V
* model was fitted for 10um PN junction -> the PNArea paramter must be /10
* model was fitted for laser width 3um -> the pulse width paramter must be /3
.if (pLaser > 0)
G1 nwell pplus nwell ctrl 'transConductance * (beta*exp(-1*distance*distance/c1)+gamma*exp(-1*distance*distance/c2)) * PNArea/10'
G2 nwell pplus ctrl2 VSS 'constCurrent * (beta*exp(-1*distance*distance/c1)+gamma*exp(-1*distance*distance/c2)) * PNArea/10'
.endif
S1 pplus ctrl laser_trig VSS idealSw OFF
S2 ctrl nwell VDD laser_trig idealSw ON
S3 vconst ctrl2 laser_trig VSS idealSw OFF
S4 ctrl2 VSS VDD laser_trig idealSw ON
.ends
.subckt SUBCKT_SD drain source psubOut
Vvopen vopen 0 0.8V
* Rctrl psub ctrl 0.001
Rsub psub psubOut 0.001
G2 psub source ctrl vopen 0.025
G1 drain psub ctrl vopen 0.025
* connect ctrl when above 0.8V
.model tmpSw sw vt=0.0V vh=0 ron=1
S1 psub ctrl psub vopen tmpSw OFF
S2 vopen ctrl vopen psub tmpSw ON
* following values are approximation from published graphs
* just read from bad graph by using my eyes ... :-(
**** G2 psub source ctrl vopen 0.025
**** * connect ctrl when above 0.8V
**** .model tmpSw sw vt=0.0V vh=0 ron=1
****
**** S1 psub ctrl psub vopen tmpSw OFF
**** S2 vopen ctrl vopen psub tmpSw ON
****
**** * I'm not sure here ...
**** R1 drain psub2 10k
**** S3 psub2 psub psub vopen tmpSw OFF
****
**** Rmeas psub psubOut 0.001
.ends
*
* Note: set param commonDrain/commonSource to 2 if drain/source is common for two transistors in series
*
* drain
* gate
* source
* psub NMOS substrate (in most cases use VSS)
* psubIn - virtual substarte node for photocurrent simulation
*
* commonDrain - is transistor drain common with neighbouring stacked transistor?
* commonSource - is transistor source common with neighbouring stacked transistor?
*
.subckt SUBCKT_NMOS drain gate source psub psubIn trig beamDistance = 0 placeDiodes = 1 commonDrain = 0 commonSource = 0 ch_w = NMOSw ch_l = NMOSl mos_ad = NMOSad mos_pd = NMOSpd mos_as = NMOSas mos_ps = NMOSps
* NMOS model
* based on https://tel.archives-ouvertes.fr/tel-00958998/document; page 56
* my French == NULL ... :-( This may be completelly buggy!
.if (TECHNOLOGY == TECHNOLOGY_TSMC180nm)
M1 drain gate source psubIn TSMC180nmN w = ch_w l = ch_l ad = mos_ad pd = mos_pd as = mos_as ps = mos_ps
.endif
.if (TECHNOLOGY == TECHNOLOGY_PTM90nm)
M1 drain gate source psubIn PTM90nmNMOS w = ch_w l = ch_l ad = mos_ad pd = mos_pd as = mos_as ps = mos_ps
.endif
* Xsd drain VSS psubIn SUBCKT_SD
Xsd drain source psubIn SUBCKT_SD
.if (placeDiodes > 0)
.if (mos_ad > 0p)
*XcsrcD drain psubIn psub trig SUBCKT_Iph_nplus_psub transConductance = a constCurrent = b distance = beamDistance PNArea = '(commonDrain * 1 + 1) * mos_ad * 10^12'
XcsrcD drain psubIn psub trig SUBCKT_Iph_nplus_psub transConductance = a constCurrent = b distance = beamDistance PNArea = 'mos_ad * 10^12'
.endif
.if (mos_as > 0p)
*XcsrcS source psubIn psub trig SUBCKT_Iph_nplus_psub transConductance = a constCurrent = b distance = beamDistance PNArea = '(commonSource * 1 + 1) * mos_as * 10^12'
XcsrcS source psubIn psub trig SUBCKT_Iph_nplus_psub transConductance = a constCurrent = b distance = beamDistance PNArea = 'mos_as * 10^12'
.endif
.endif
.ends
*
* NMOS substrate internal Virtual Node
*
* psubIn - virtual substarte node for photocurrent simulation
* psub - NMOS substrate rail connection (in most cases VSS)
*
.subckt PSUB_IN psubIn psub
R2 psubIn interRC 0.001
C1 interRC psub 1fF
*R3 psubIn psub 1k
R3 psubIn psub 500
.ends
*
* Note: set param commonDrain/commonSource to 2 if drain/source is common for two transistors in series
*
.subckt SUBCKT_PMOS drain gate source nwell psub trig beamDistance = 0 placeDiodes = 1 commonDrain = 0 commonSource = 0 ch_w = 2*NMOSw ch_l = NMOSl mos_ad = 2*NMOSad mos_pd = 2*NMOSpd mos_as = 2*NMOSas mos_ps = 2*NMOSps
* PMOS model -- simplified
* check for bugs!
.if (TECHNOLOGY == TECHNOLOGY_TSMC180nm)
M1 drain gate source nwell TSMC180nmP w = ch_w l = ch_l ad = mos_ad pd = mos_pd as = mos_as ps = mos_ps
.endif
.if (TECHNOLOGY == TECHNOLOGY_PTM90nm)
M1 drain gate source nwell PTM90nmPMOS w = ch_w l = ch_l ad = mos_ad pd = mos_pd as = mos_as ps = mos_ps
.endif
.if (placeDiodes > 0)
.if (mos_ad > 0p)
*XDiodeD pplusD nwell trig SUBCKT_Iph_Pplus_Nwell transConductance = a2 constCurrent = b2 distance = beamDistance PNArea = '(commonDrain * 1 + 1) * mos_ad * 10^12'
XDiodeD pplusD nwell trig SUBCKT_Iph_Pplus_Nwell transConductance = a2 constCurrent = b2 distance = beamDistance PNArea = 'mos_ad * 10^12'
.endif
.if (mos_as > 0p)
*XDiodeS pplusS nwell trig SUBCKT_Iph_Pplus_Nwell transConductance = a2 constCurrent = b2 distance = beamDistance PNArea = '(commonSource * 1 + 1) * mos_as * 10^12'
XDiodeS pplusS nwell trig SUBCKT_Iph_Pplus_Nwell transConductance = a2 constCurrent = b2 distance = beamDistance PNArea = 'mos_as * 10^12'
.endif
R1 pplusD drain 0.001
R2 pplusS source 0.001
.endif
* Excluded due-to data-independence
*Rnp nwell psub 100000
*XDiodePN psub nwell trig SUBCKT_Iph_Psub_Nwell transConductance = a3 constCurrent = b3 distance = beamDistance PNArea = 'PsubNwellJunctionS_INVX1'
.ends
*
* This is for two simple usage of models exported from layout editor
*
.subckt PMOS_MAGIC drain gate source nwell w = NMOSw l = NMOSl ad = NMOSad pd = NMOSpd as = NMOSas ps = NMOSps
Xpmos1 drain gate source nwell psub LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=w ch_l=l mos_ad=ad mos_pd=pd mos_as=as mos_ps=ps
.ends
*
* This is for two simple usage of models exported from layout editor
*
.subckt NMOS_MAGIC drain gate source psub w = NMOSw l = NMOSl ad = NMOSad pd = NMOSpd as = NMOSas ps = NMOSps
Xnmos1 drain gate source psub psubInCommon LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=w ch_l=l mos_ad=ad mos_pd=pd mos_as=as mos_ps=ps
.ends
*
* 2-input NAND Gate
*
.subckt NAND2X1 Y VSS A B VDD beamDistanceTop = 0 beamDistanceBot = 0
Xpmos1 Y A VDD VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=2u ch_l=0.2u mos_ad=0.6p mos_pd=2.6u mos_as=1p mos_ps=5u commonDrain = 1
Xpmos2 VDD B Y VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=2u ch_l=0.2u mos_ad=0.6p mos_pd=2.6u mos_as=1p mos_ps=5u commonDrain = 1
*XDiodePN VSS VDD LaserTrig SUBCKT_Iph_Psub_Nwell transConductance = a3 constCurrent = b3 distance = beamDistanceTop PNArea = 'PsubNwellJunctionS_NAND2X1'
Xnmos1 MIDDLE A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=0.3p mos_pd=2.3u mos_as=1p mos_ps=5u commonDrain = 1 commonSource = 0
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=2.3u commonDrain = 0 commonSource = 1
* common NMOS substarte virtual node
XpsubIn psubIn VSS PSUB_IN
C0 MIDDLE Y 0.01fF
C1 VSS Y 0.09fF
C2 Y B 0.10fF
C3 VSS A 0.05fF
C4 Y A 0.08fF
C5 Y VDD 0.57fF
C6 B A 0.22fF
C7 B VDD 0.27fF
C8 A VDD 0.20fF
C9 VSS VSS 0.17fF
C10 Y VSS 0.11fF
C11 B VSS 0.19fF
C12 A VSS 0.25fF
C13 VDD VSS 1.73fF
.ends
*
* 3-input NAND Gate
*
.subckt NAND3X1 Y VSS A B C VDD beamDistanceTop = 0 beamDistanceBot = 0
Xpmos1 Y A VDD VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=2u ch_l=0.2u mos_ad=0.8p mos_pd=3.4u mos_as=0.84p mos_ps=4.5u commonSource = 1
Xpmos2 VDD B Y VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=2u ch_l=0.2u mos_ad=0.7p mos_pd=3.4u mos_as=0.84p mos_ps=4.5u commonSource = 1 commonDrain = 1
Xpmos3 Y C VDD VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=2u ch_l=0.2u mos_ad=0.7p mos_pd=3.4u mos_as=0.84p mos_ps=4.4u commonDrain = 1
*XDiodePN VSS VDD LaserTrig SUBCKT_Iph_Psub_Nwell transConductance = a3 constCurrent = b3 distance = beamDistanceTop PNArea = 'PsubNwellJunctionS_NAND3X1'
Xnmos1 MIDDLE A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=3u ch_l=0.2u mos_ad=0.45p mos_pd=6.6u mos_as=1.82p mos_ps=3.4u commonDrain = 1 commonSource = 0
Xnmos2 MIDDLE2 B MIDDLE VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=3u ch_l=0.2u mos_ad=0.45p mos_pd=6.6u mos_as=0.45p mos_ps=3.4u commonDrain = 1 commonSource = 1
Xnmos3 Y C MIDDLE2 VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=3u ch_l=0.2u mos_ad=1.5p mos_pd=7u mos_as=0.45p mos_ps=3.4u commonDrain = 0 commonSource = 1
* common NMOS substarte virtual node
XpsubIn psubIn VSS PSUB_IN
C0 A B 0.31fF
C1 vdd A 0.27fF
C2 Y C 0.16fF
C3 Y B 0.02fF
C4 C B 0.10fF
C5 Y vdd 0.96fF
C6 vdd C 0.27fF
C7 vdd B 0.22fF
C8 vdd VSS 2.29fF
C9 Y VSS 0.09fF
C10 C VSS 0.15fF
C11 B VSS 0.17fF
C12 A VSS 0.11fF
.ends
*
* 2-input NOR Gate
*
.subckt NOR2X1 Y VSS A B VDD beamDistanceTop = 0 beamDistanceBot = 0
Xpmos1 MIDDLE A VDD VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=4u ch_l=0.2u mos_ad=0.6p mos_pd=8.6u mos_as=2.32p mos_ps=6.1u commonDrain = 1
Xpmos2 Y B MIDDLE VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=4u ch_l=0.2u mos_ad=2p mos_pd=9u mos_as=0.6p mos_ps=6.1u commonSource = 1
*XDiodePN VSS VDD LaserTrig SUBCKT_Iph_Psub_Nwell transConductance = a3 constCurrent = b3 distance = beamDistanceTop PNArea = 'PsubNwellJunctionS_NOR2X1'
Xnmos1 Y A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=1u ch_l=0.2u mos_ad=0.3p mos_pd=1.6u mos_as=0.66p mos_ps=4.6u commonDrain = 1
Xnmos2 VSS B Y VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=1u ch_l=0.2u mos_ad=0.3p mos_pd=1.6u mos_as=0.66p mos_ps=4.6u commonDrain = 1
* common NMOS substarte virtual node
XpsubIn psubIn VSS PSUB_IN
C0 Y B 0.12fF
C1 A B 0.18fF
C2 Y MIDDLE 0.01fF
C3 Y A 0.07fF
C4 B vdd 0.12fF
C5 Y vdd 0.43fF
C6 A vdd 0.12fF
C7 vdd VSS 1.91fF
C8 Y VSS 0.11fF
C9 B VSS 0.28fF
C10 A VSS 0.30fF
.ends
*
* 3-input NOR Gate
*
* Note: NOR3 is not symmetrized by hand!
*
*
.subckt NOR3X1 Y VSS A B C VDD beamDistanceTop = 0 beamDistanceBot = 0
Xpmos1 VDD A MIDDLE VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=3u ch_l=0.2u mos_ad=2.44p mos_pd=13.6u mos_as=4.78p mos_ps=21.2u
Xpmos2 MIDDLE A VDD VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=3u ch_l=0.2u mos_ad=0p mos_pd=0u mos_as=0p mos_ps=0u
Xpmos3 MIDDLE2 B MIDDLE VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=3u ch_l=0.2u mos_ad=4.8p mos_pd=21.2u mos_as=0p mos_ps=0u
Xpmos4 MIDDLE B MIDDLE2 VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=3u ch_l=0.2u mos_ad=0p mos_pd=0u mos_as=0p mos_ps=0u
Xpmos5 Y C MIDDLE2 VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=3u ch_l=0.2u mos_ad=1.8p mos_pd=7.2u mos_as=0p mos_ps=0u
Xpmos6 MIDDLE2 C Y VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=3u ch_l=0.2u mos_ad=0p mos_pd=0u mos_as=0p mos_ps=0u
*XDiodePN VSS VDD LaserTrig SUBCKT_Iph_Psub_Nwell transConductance = a3 constCurrent = b3 distance = beamDistanceTop PNArea = 'PsubNwellJunctionS_NOR3X1'
Xnmos1 Y A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=1u ch_l=0.2u mos_ad=1.1p mos_pd=6.2u mos_as=1.74p mos_ps=12.6u
Xnmos2 VSS B Y VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=1u ch_l=0.2u mos_ad=0p mos_pd=0u mos_as=0p mos_ps=0u
Xnmos3 Y C VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=1u ch_l=0.2u mos_ad=0p mos_pd=0u mos_as=0p mos_ps=0u
* common NMOS substarte virtual node
XpsubIn psubIn VSS PSUB_IN
C0 MIDDLE2 MIDDLE 0.94fF
C1 B vdd 0.22fF
C2 A vdd 0.24fF
C3 C B 0.16fF
C4 MIDDLE vdd 1.16fF
C5 MIDDLE2 vdd 0.45fF
C6 B Y 0.02fF
C7 MIDDLE2 C 0.02fF
C8 Y A 0.01fF
C9 MIDDLE2 Y 0.76fF
C10 C vdd 0.30fF
C11 Y vdd 0.51fF
C12 B A 0.23fF
C13 MIDDLE B 0.03fF
C14 C Y 0.12fF
C15 MIDDLE A 0.03fF
C16 MIDDLE2 B 0.02fF
C17 vdd VSS 3.59fF
C18 Y VSS 0.18fF
C19 C VSS 0.29fF
C20 MIDDLE2 VSS 0.00fF
C21 MIDDLE VSS 0.00fF
C22 B VSS 0.29fF
C23 A VSS 0.29fF
.ends
*
* INV Gate
*
.subckt INVX1 Y VSS A VDD beamDistanceTop = 0 beamDistanceBot = 0
Xpmos Y A VDD VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=2u ch_l=0.2u mos_ad=1p mos_pd=5u mos_as=1.16p mos_ps=6.6u
*XDiodePN VSS VDD LaserTrig SUBCKT_Iph_Psub_Nwell transConductance = a3 constCurrent = b3 distance = beamDistanceTop PNArea = 'PsubNwellJunctionS_INVX1'
Xnmos Y A VSS VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=1u ch_l=0.2u mos_ad=0.5p mos_pd=3u mos_as=0.66p mos_ps=4.6u
* common NMOS substarte virtual node
XpsubIn psubIn VSS PSUB_IN
C0 A Y 0.08fF
C1 A vdd 0.26fF
C2 Y vdd 0.55fF
C3 vdd VSS 1.64fF
C4 Y VSS 0.07fF
C5 A VSS 0.23fF
.ends
*
* 2-input XOR Gate
*
* Note: XOR is not symmetrized by hand!
*
.subckt XOR2X1 Y VSS A B VDD beamDistanceTop = 0 beamDistanceBot = 0
Xpmos0 VDD A A_NEG vdd VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=4u ch_l=0.2u mos_ad=6.24p mos_pd=25.2u mos_as=2p mos_ps=9u
Xpmos1 2 B_NEG vdd vdd VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=4u ch_l=0.2u mos_ad=1.2p mos_pd=8.6u mos_as=0p mos_ps=0u
Xpmos2 Y A 2 vdd VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=4u ch_l=0.2u mos_ad=4p mos_pd=10u mos_as=0p mos_ps=0u
Xpmos3 4 A_NEG Y vdd VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=4u ch_l=0.2u mos_ad=1.2p mos_pd=8.6u mos_as=0p mos_ps=0u
Xpmos4 vdd B 4 vdd VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=4u ch_l=0.2u mos_ad=0p mos_pd=0u mos_as=0p mos_ps=0u
Xpmos5 B_NEG B VDD VDD VSS LaserTrig SUBCKT_PMOS beamDistance = beamDistanceTop ch_w=4u ch_l=0.2u mos_ad=2p mos_pd=9u mos_as=0p mos_ps=0u
Xnmos0 VSS A A_NEG VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=3.44p mos_pd=17.2u mos_as=1p mos_ps=5u
Xnmos1 5 B_NEG 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=0p mos_ps=0u
Xnmos2 Y A_NEG 5 VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=2p mos_pd=6u mos_as=0p mos_ps=0u
Xnmos3 6 A Y VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=0.6p mos_pd=4.6u mos_as=0p mos_ps=0u
Xnmos4 VSS B 6 VSS psubIn LaserTrig SUBCKT_NMOS beamDistance = beamDistanceBot ch_w=2u ch_l=0.2u mos_ad=0p mos_pd=0u mos_as=0p mos_ps=0u
Xnmos5 B_NEG B VSS 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
* common NMOS substarte virtual node
XpsubIn psubIn VSS PSUB_IN
C0 B vdd 0.16fF
C1 B A_NEG 0.15fF
C2 B B_NEG 0.14fF
C3 B A 0.04fF
C4 Y vdd 0.26fF
C5 A_NEG vdd 0.94fF
C6 B_NEG vdd 0.91fF
C7 A vdd 0.13fF
C8 Y A_NEG 0.22fF
C9 Y B_NEG 0.05fF
C10 A_NEG B_NEG 0.68fF
C11 Y A 0.09fF
C12 A_NEG A 0.32fF
C13 B_NEG A 0.39fF
C14 vdd VSS 3.41fF
C15 Y VSS 0.07fF
C16 B VSS 0.29fF
C17 A_NEG VSS 0.34fF
C18 B_NEG VSS 0.30fF
C19 A VSS 0.49fF
.ends