-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCNFET.lib
1991 lines (1694 loc) · 137 KB
/
CNFET.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
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
********************************************************************
* Carbon-nanotube Field Effect Transistors
* HSPICE Models
* Version 2.2.1
*
*
* Copyright The Board Trustees of the Leland Stanford Junior University 2009
* Albert Lin, Gordon Wan, Jie Deng, Prof. H-S Philip Wong
*
*
* 09/09/2008 Last Modified by Albert Lin.
*
* Carbon-nanotube Field Effect Transistors HSPICE implementation
* based on "A Circuit-Compatible SPICE model for Enhancement Mode
* Carbon Nanotube Field Effect Transistors" by Jie Deng and
* H-S Philip Wong.
*
* File name: CNFET.lib
* Library name: CNFET
********************************************************************
********************************************************************
* LICENSE AGREEMENT
* Stanford Leland Junior University and the authors ("Stanford")
* provide these model files to you subject to the License Agreement,
* which may be updated by us from time to time without notice to you.
* The most-up-to-date License Agreement can be found at
* http://nano.stanford.edu/license.php
********************************************************************
********************************************************************
* Top Level Models:
* NCNFET: N-CNFET with Charge-Screening Effects
* from adjacent tubes.
* PCNFET: P-CNFET with Charge-Screening Effects
* from adjacent tubes.
* NCNFET_uniform: N-CNFET with Uniform Charge-Screening
* Effects from adjacent tubes.
* PCNFET_uniform: P-CNFET with Charge-Screening Effects
* from adjacent tubes.
********************************************************************
********************************************************************
* Standard Models:
* The standard models account for charge-screening effects among
* multiple tubes within the same FET device by
* differentiating between tubes at the edge, which are affected by
* one neighboring tube, and tubes in the middle, which are affected
* by two neighboring tubes.
*
* No 'CNTPos' param is used.
********************************************************************
********************************************************************
* Uniform-tubes Models (Simplified Version):
* These models simplify charge-screening effects among multiple
* tubes within the same FET device by treating all tubes uniformly.
*
* Set CNTPos=0 to treat all tubes as middle tubes, i.e. with
* two-sided screening effects.
* Set CNTPos=1 to treat all tubes as edge tubes, i.e. with one-sided
* screening effects.
********************************************************************
********************************************************************
* This model file ignores the coupling capacitance between two
* adjacent devices, e.g. nFET1, nFET2,...
*
* The coupling capacitance among the tubes under the same gate
* is in common-mode, thus zero.
********************************************************************
.LIB CNFET
.PROTECT
.OPTIONS PARHIER=LOCAL
.OPTIONS EPSMIN=1E-99
.OPTIONS EXPMAX=37
.INC 'PARAMETERS.lib'
* Last Modified: 09/09/2008 Albert Lin
********************************************************************
*
* N-CNFET Level 1 Sub-circuit Definition
*
********************************************************************
.SUBCKT NCNFET_L1 Drain Gate Source Sub CoupleNode Lg=L_channel Lgeff=Lceff Lss=L_sd Ldd=L_sd Efi=Efo Kgate=Kox Tox=4e-9 Csub=20e-12 Ccsd=0 CoupleRatio=0 Vfbn=0 GF=0 Pitch=20e-9 n1=19 n2=0 CNTPos=1
*********************************************************************
* Parameter definition
*********************************************************************
* Csub is CNT to Substrate capacitance per unit length,approximated as 20af/um with 10um thick SiO2, 40af/um with 130nm thick SiO2
*********************************************************************
* The actual channel length used in simulation
*********************************************************************
* If Lg>Lgmax, Lgate=Lgmax to approximate the long channel device current
.PARAM Lgate = 'MIN(Lg,Lgmax)'
*********************************************************************
* The Gate-CNT coupling capacitance
*********************************************************************
* The diameter of the CNT
.PARAM dia='a*SQRT(POW(n1,2)+n1*n2+POW(n2,2))/pi'
* The radius of the CNT.
.PARAM rad='dia/2'
* Oxide thickness
.PARAM Hei='Tox+rad'
* The inverse of the capacitance with the uniform Kgate dielectric material
.PARAM RCo='log(2*Hei/dia + SQRT(POW(2*Hei/dia,2)-1))'
* The inverese of the effects due to the image charge
.PARAM RCimg='beta*log(2*Hei/(3*dia) + 2/3)'
* The inverse of the capacitance with infinite spacing between CNTs
.PARAM RCinf='RCo+RCimg'
* The potential due to the adjacent CNT
.PARAM Vadjc='0.5*log((POW(Pitch,2)+2*(Hei-rad)*(Hei+SQRT(POW(Hei,2)-POW(rad,2))))/(POW(Pitch,2)+2*(Hei-rad)*(Hei-SQRT(POW(Hei,2)-POW(rad,2)))))'
* The potential due to the image charge of the adjacent CNT
.PARAM Vadji='0.5*beta*log((POW(Hei+dia,2)+POW(Pitch,2)) / (9*POW(rad,2)+POW(Pitch,2)))*TANH((Hei+rad)/(Pitch-dia))'
* The total potential contributed by the adjacent CNT and its image charge
.PARAM RCadj='Vadjc+Vadji'
* The ratio of image charge over real charge
.PARAM beta='(Kgate-Ksub)/(Kgate+Ksub)'
* Capacitance pre-factor
.PARAM Cprefactor='2*pi*Kgate*epso'
* The gate to EdgeCNT coupling capacitance
.PARAM Cedge='Cprefactor/(RCinf+RCadj)'
* The gate to MidCNT coupling capacitance
.PARAM Cmid='2*Cedge-Cprefactor/RCinf'
* The gate capacitance, Cedge if CNTPos=1, Cmid if CNTPos=0
.PARAM Ci='Cedge*CNTPos+Cmid*(1-CNTPos)'
* The coupling capacitance between the channel region of one CNT to the doped source/drain region of another CNT
.PARAM Cc='(Cedge/Cmid-1)*Cedge*LOG(2*Pitch/dia)/LOG(Pitch/dia + SQRT(POW(Pitch/dia,2)-1))'
* The total coupling capacitance between the channgel region of one CNT and the substrate, as well as source/drain islands
.PARAM Csub_tot='Csub + Ccsd'
* The ratio between actual gate capacitance and ideal gate capacitance
.PARAM Cratio='Ci*RCinf/Cprefactor'
**********************************************************************
* The E-K disperation relationship, linear approximation around Ef point
**********************************************************************
* The first perpendicular wave number
.PARAM K1='2*pi/(3*a*SQRT(POW(n1,2)+n1*n2+POW(n2,2)))'
* The 2nd perpendicular wave number
.PARAM K2='2*K1'
* The parallel wave number
.PARAM Kp1='2*pi/Lgate'
+ Kp2='2*Kp1'
+ Kp3='3*Kp1'
+ Kp4='4*Kp1'
+ Kp5='5*Kp1'
+ Kp6='6*Kp1'
+ Kp7='7*Kp1'
+ Kp8='8*Kp1'
+ Kp9='9*Kp1'
* The energy of the perpendicular component of the mth sub-band, above Ei
.PARAM E1='Vpi*pi/SQRT(3*(POW(n1,2)+n1*n2+POW(n2,2)))'
+ E2='2*E1'
* The energy of the (m,n)th sub-band, above Ei
.PARAM CoeffE='SQRT(3)/2*a*Vpi'
+ E11='CoeffE*SQRT(POW(K1,2)+POW(Kp1,2))'
+ E12='CoeffE*SQRT(POW(K1,2)+POW(Kp2,2))'
+ E13='CoeffE*SQRT(POW(K1,2)+POW(Kp3,2))'
+ E14='CoeffE*SQRT(POW(K1,2)+POW(Kp4,2))'
+ E15='CoeffE*SQRT(POW(K1,2)+POW(Kp5,2))'
+ E16='CoeffE*SQRT(POW(K1,2)+POW(Kp6,2))'
+ E17='CoeffE*SQRT(POW(K1,2)+POW(Kp7,2))'
+ E18='CoeffE*SQRT(POW(K1,2)+POW(Kp8,2))'
+ E19='CoeffE*SQRT(POW(K1,2)+POW(Kp9,2))'
+ E21='CoeffE*SQRT(POW(K2,2)+POW(Kp1,2))'
+ E22='CoeffE*SQRT(POW(K2,2)+POW(Kp2,2))'
+ E23='CoeffE*SQRT(POW(K2,2)+POW(Kp3,2))'
+ E24='CoeffE*SQRT(POW(K2,2)+POW(Kp4,2))'
+ E25='CoeffE*SQRT(POW(K2,2)+POW(Kp5,2))'
+ E26='CoeffE*SQRT(POW(K2,2)+POW(Kp6,2))'
+ E27='CoeffE*SQRT(POW(K2,2)+POW(Kp7,2))'
+ E28='CoeffE*SQRT(POW(K2,2)+POW(Kp8,2))'
+ E29='CoeffE*SQRT(POW(K2,2)+POW(Kp9,2))'
* The kinetic energy of the mth sub-band
.PARAM En11='E11-E1'
+ En12='E12-E1'
+ En13='E13-E1'
+ En14='E14-E1'
+ En15='E15-E1'
+ En16='E16-E1'
+ En17='E17-E1'
+ En18='E18-E1'
+ En19='E19-E1'
+ En21='E21-E2'
+ En22='E22-E2'
+ En23='E23-E2'
+ En24='E24-E2'
+ En25='E25-E2'
+ En26='E26-E2'
+ En27='E27-E2'
+ En28='E28-E2'
+ En29='E29-E2'
* The coefficients of Jmn
.PARAM CocoJ='SQRT(3)*a*pi*Vpi'
+ Coeff_J11 = 'Kp1/SQRT(POW(K1,2)+POW(Kp1,2))'
+ Coeff_J12 = 'Kp2/SQRT(POW(K1,2)+POW(Kp2,2))'
+ Coeff_J13 = 'Kp3/SQRT(POW(K1,2)+POW(Kp3,2))'
+ Coeff_J14 = 'Kp4/SQRT(POW(K1,2)+POW(Kp4,2))'
+ Coeff_J15 = 'Kp5/SQRT(POW(K1,2)+POW(Kp5,2))'
+ Coeff_J16 = 'Kp6/SQRT(POW(K1,2)+POW(Kp6,2))'
+ Coeff_J17 = 'Kp7/SQRT(POW(K1,2)+POW(Kp7,2))'
+ Coeff_J18 = 'Kp8/SQRT(POW(K1,2)+POW(Kp8,2))'
+ Coeff_J19 = 'Kp9/SQRT(POW(K1,2)+POW(Kp9,2))'
+ Coeff_J21 = 'Kp1/SQRT(POW(K2,2)+POW(Kp1,2))'
+ Coeff_J22 = 'Kp2/SQRT(POW(K2,2)+POW(Kp2,2))'
+ Coeff_J23 = 'Kp3/SQRT(POW(K2,2)+POW(Kp3,2))'
+ Coeff_J24 = 'Kp4/SQRT(POW(K2,2)+POW(Kp4,2))'
+ Coeff_J25 = 'Kp5/SQRT(POW(K2,2)+POW(Kp5,2))'
+ Coeff_J26 = 'Kp6/SQRT(POW(K2,2)+POW(Kp6,2))'
+ Coeff_J27 = 'Kp7/SQRT(POW(K2,2)+POW(Kp7,2))'
+ Coeff_J28 = 'Kp8/SQRT(POW(K2,2)+POW(Kp8,2))'
+ Coeff_J29 = 'Kp9/SQRT(POW(K2,2)+POW(Kp9,2))'
**********************************************************************
* The carrier effective mass of the 1st and the 2nd subband, for CNT
*********************************************************************
.PARAM meff1 = '2*h_ba*h_ba*K1/(SQRT(3)*a*q*Vpi)/1e40'
+ meff2 = '2*h_ba*h_ba*K2/(SQRT(3)*a*q*Vpi)/1e40'
**********************************************************************
* The transmission probability for BTBT
*********************************************************************
.PARAM Efield(Vds,phib) = '(Vds+Efi-phib)/L_relax'
+ Eg_eff1 = 'E1' $ Efi/(Vds+Efi-phib)'
+ Eg_eff2 = 'E2' $ Efi/(Vds+Efi-phib)'
+ Ef1(Efield,Vds,phib) = 'SQRT(2)*h_ba*Efield/(pi*SQRT(meff1*2*q*Eg_eff1))/1e20'
+ Ef2(Efield,Vds,phib) = 'SQRT(2)*h_ba*Efield/(pi*SQRT(meff2*2*q*Eg_eff2))/1e20'
+ Tbtbt1(Vds,phib) = 'pi*pi/9*EXP(-Eg_eff1/Ef1(Efield(Vds,phib),Vds,phib))'
+ Tbtbt2(Vds,phib) = 'pi*pi/9*EXP(-Eg_eff2/Ef2(Efield(Vds,phib),Vds,phib))'
*********************************************************************
* The current component of the mth sub-band.
*********************************************************************
.PARAM fermi_s11(delta_phib) = '1/(1+exp((E11-delta_phib)/kT))'
+ fermi_s12(delta_phib) = '1/(1+exp((E12-delta_phib)/kT))'
+ fermi_s13(delta_phib) = '1/(1+exp((E13-delta_phib)/kT))'
+ fermi_s14(delta_phib) = '1/(1+exp((E14-delta_phib)/kT))'
+ fermi_s15(delta_phib) = '1/(1+exp((E15-delta_phib)/kT))'
+ fermi_s16(delta_phib) = '1/(1+exp((E16-delta_phib)/kT))'
+ fermi_s17(delta_phib) = '1/(1+exp((E17-delta_phib)/kT))'
+ fermi_s18(delta_phib) = '1/(1+exp((E18-delta_phib)/kT))'
+ fermi_s19(delta_phib) = '1/(1+exp((E19-delta_phib)/kT))'
+ fermi_s21(delta_phib) = '1/(1+exp((E21-delta_phib)/kT))'
+ fermi_s22(delta_phib) = '1/(1+exp((E22-delta_phib)/kT))'
+ fermi_s23(delta_phib) = '1/(1+exp((E23-delta_phib)/kT))'
+ fermi_s24(delta_phib) = '1/(1+exp((E24-delta_phib)/kT))'
+ fermi_s25(delta_phib) = '1/(1+exp((E25-delta_phib)/kT))'
+ fermi_s26(delta_phib) = '1/(1+exp((E26-delta_phib)/kT))'
+ fermi_s27(delta_phib) = '1/(1+exp((E27-delta_phib)/kT))'
+ fermi_s28(delta_phib) = '1/(1+exp((E28-delta_phib)/kT))'
+ fermi_s29(delta_phib) = '1/(1+exp((E29-delta_phib)/kT))'
+ fermi_d11(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E11-delta_phib)/kT))'
+ fermi_d12(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E12-delta_phib)/kT))'
+ fermi_d13(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E13-delta_phib)/kT))'
+ fermi_d14(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E14-delta_phib)/kT))'
+ fermi_d15(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E15-delta_phib)/kT))'
+ fermi_d16(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E16-delta_phib)/kT))'
+ fermi_d17(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E17-delta_phib)/kT))'
+ fermi_d18(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E18-delta_phib)/kT))'
+ fermi_d19(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E19-delta_phib)/kT))'
+ fermi_d21(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E21-delta_phib)/kT))'
+ fermi_d22(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E22-delta_phib)/kT))'
+ fermi_d23(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E23-delta_phib)/kT))'
+ fermi_d24(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E24-delta_phib)/kT))'
+ fermi_d25(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E25-delta_phib)/kT))'
+ fermi_d26(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E26-delta_phib)/kT))'
+ fermi_d27(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E27-delta_phib)/kT))'
+ fermi_d28(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E28-delta_phib)/kT))'
+ fermi_d29(Vds,delta_phib) = 'exp(-Vds/kT)/(exp(-Vds/kT)+exp((E29-delta_phib)/kT))'
+ fermi_op10(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E1-delta_phib)/kT))'
+ fermi_op11(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E11-delta_phib)/kT))'
+ fermi_op12(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E12-delta_phib)/kT))'
+ fermi_op13(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E13-delta_phib)/kT))'
+ fermi_op14(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E14-delta_phib)/kT))'
+ fermi_op15(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E15-delta_phib)/kT))'
+ fermi_op16(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E16-delta_phib)/kT))'
+ fermi_op17(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E17-delta_phib)/kT))'
+ fermi_op18(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E18-delta_phib)/kT))'
+ fermi_op19(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E19-delta_phib)/kT))'
+ fermi_op20(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E2-delta_phib)/kT))'
+ fermi_op21(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E21-delta_phib)/kT))'
+ fermi_op22(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E22-delta_phib)/kT))'
+ fermi_op23(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E23-delta_phib)/kT))'
+ fermi_op24(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E24-delta_phib)/kT))'
+ fermi_op25(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E25-delta_phib)/kT))'
+ fermi_op26(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E26-delta_phib)/kT))'
+ fermi_op27(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E27-delta_phib)/kT))'
+ fermi_op28(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E28-delta_phib)/kT))'
+ fermi_op29(Vds,offset,delta_phib) = 'exp((offset-Vds)/kT)/(exp((offset-Vds)/kT)+exp((E29-delta_phib)/kT))'
* The factor DOS(m,n)/DOSo for channel region
+ FDOS10(offset) = '(E1-offset)/SQRT(abs(POW((E1-offset),2)-POW(E1,2)))*1e-14'
+ FDOS11(offset) = '(E11-offset)/SQRT(abs(POW((E11-offset),2)-POW(E1,2)))*max(En11-offset,1e-14)'
+ FDOS12(offset) = '(E12-offset)/SQRT(abs(POW((E12-offset),2)-POW(E1,2)))*max(En12-offset,1e-14)'
+ FDOS13(offset) = '(E13-offset)/SQRT(abs(POW((E13-offset),2)-POW(E1,2)))*max(En13-offset,1e-14)'
+ FDOS14(offset) = '(E14-offset)/SQRT(abs(POW((E14-offset),2)-POW(E1,2)))*max(En14-offset,1e-14)'
+ FDOS15(offset) = '(E15-offset)/SQRT(abs(POW((E15-offset),2)-POW(E1,2)))*max(En15-offset,1e-14)'
+ FDOS16(offset) = '(E16-offset)/SQRT(abs(POW((E16-offset),2)-POW(E1,2)))*max(En16-offset,1e-14)'
+ FDOS17(offset) = '(E17-offset)/SQRT(abs(POW((E17-offset),2)-POW(E1,2)))*max(En17-offset,1e-14)'
+ FDOS18(offset) = '(E18-offset)/SQRT(abs(POW((E18-offset),2)-POW(E1,2)))*max(En18-offset,1e-14)'
+ FDOS19(offset) = '(E19-offset)/SQRT(abs(POW((E19-offset),2)-POW(E1,2)))*max(En19-offset,1e-14)'
+ FDOS20(offset) = '(E2-offset)/SQRT(abs(POW((E2-offset),2)-POW(E2,2)))*1e-14'
+ FDOS21(offset) = '(E21-offset)/SQRT(abs(POW((E21-offset),2)-POW(E2,2)))*max(En21-offset,1e-14)'
+ FDOS22(offset) = '(E22-offset)/SQRT(abs(POW((E22-offset),2)-POW(E2,2)))*max(En22-offset,1e-14)'
+ FDOS23(offset) = '(E23-offset)/SQRT(abs(POW((E23-offset),2)-POW(E2,2)))*max(En23-offset,1e-14)'
+ FDOS24(offset) = '(E24-offset)/SQRT(abs(POW((E24-offset),2)-POW(E2,2)))*max(En24-offset,1e-14)'
+ FDOS25(offset) = '(E25-offset)/SQRT(abs(POW((E25-offset),2)-POW(E2,2)))*max(En25-offset,1e-14)'
+ FDOS26(offset) = '(E26-offset)/SQRT(abs(POW((E26-offset),2)-POW(E2,2)))*max(En26-offset,1e-14)'
+ FDOS27(offset) = '(E27-offset)/SQRT(abs(POW((E27-offset),2)-POW(E2,2)))*max(En27-offset,1e-14)'
+ FDOS28(offset) = '(E28-offset)/SQRT(abs(POW((E28-offset),2)-POW(E2,2)))*max(En28-offset,1e-14)'
+ FDOS29(offset) = '(E29-offset)/SQRT(abs(POW((E29-offset),2)-POW(E2,2)))*max(En29-offset,1e-14)'
* The factor DOS(m,n)/DOSo for drain side
+ FDOS_d10(Vds,delta_phib,offset) = '(E1+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E1+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E1+Vds-delta_phib-offset,1e-14)'
+ FDOS_d11(Vds,delta_phib,offset) = '(E11+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E11+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E11+Vds-delta_phib-offset,1e-14)'
+ FDOS_d12(Vds,delta_phib,offset) = '(E12+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E12+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E12+Vds-delta_phib-offset,1e-14)'
+ FDOS_d13(Vds,delta_phib,offset) = '(E13+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E13+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E13+Vds-delta_phib-offset,1e-14)'
+ FDOS_d14(Vds,delta_phib,offset) = '(E14+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E14+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E14+Vds-delta_phib-offset,1e-14)'
+ FDOS_d15(Vds,delta_phib,offset) = '(E15+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E15+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E15+Vds-delta_phib-offset,1e-14)'
+ FDOS_d16(Vds,delta_phib,offset) = '(E16+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E16+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E16+Vds-delta_phib-offset,1e-14)'
+ FDOS_d17(Vds,delta_phib,offset) = '(E17+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E17+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E17+Vds-delta_phib-offset,1e-14)'
+ FDOS_d18(Vds,delta_phib,offset) = '(E18+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E18+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E18+Vds-delta_phib-offset,1e-14)'
+ FDOS_d19(Vds,delta_phib,offset) = '(E19+E1+Vds-delta_phib-offset)/SQRT(abs(POW((E19+E1+Vds-delta_phib-offset),2)-POW(E1,2)))*max(E19+Vds-delta_phib-offset,1e-14)'
+ FDOS_d20(Vds,delta_phib,offset) = '(E2+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E2+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E2+Vds-delta_phib-offset,1e-14)'
+ FDOS_d21(Vds,delta_phib,offset) = '(E21+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E21+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E21+Vds-delta_phib-offset,1e-14)'
+ FDOS_d22(Vds,delta_phib,offset) = '(E22+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E22+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E22+Vds-delta_phib-offset,1e-14)'
+ FDOS_d23(Vds,delta_phib,offset) = '(E23+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E23+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E23+Vds-delta_phib-offset,1e-14)'
+ FDOS_d24(Vds,delta_phib,offset) = '(E24+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E24+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E24+Vds-delta_phib-offset,1e-14)'
+ FDOS_d25(Vds,delta_phib,offset) = '(E25+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E25+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E25+Vds-delta_phib-offset,1e-14)'
+ FDOS_d26(Vds,delta_phib,offset) = '(E26+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E26+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E26+Vds-delta_phib-offset,1e-14)'
+ FDOS_d27(Vds,delta_phib,offset) = '(E27+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E27+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E27+Vds-delta_phib-offset,1e-14)'
+ FDOS_d28(Vds,delta_phib,offset) = '(E28+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E28+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E28+Vds-delta_phib-offset,1e-14)'
+ FDOS_d29(Vds,delta_phib,offset) = '(E29+E2+Vds-delta_phib-offset)/SQRT(abs(POW((E29+E2+Vds-delta_phib-offset),2)-POW(E2,2)))*max(E29+Vds-delta_phib-offset,1e-14)'
* the AP MFP
+ l_ap11(Vds,delta_phib)='lambda_ap/(FDOS11(0)*(1-fermi_d11(Vds,delta_phib)))'
+ l_ap12(Vds,delta_phib)='lambda_ap/(FDOS12(0)*(1-fermi_d12(Vds,delta_phib)))'
+ l_ap13(Vds,delta_phib)='lambda_ap/(FDOS13(0)*(1-fermi_d13(Vds,delta_phib)))'
+ l_ap14(Vds,delta_phib)='lambda_ap/(FDOS14(0)*(1-fermi_d14(Vds,delta_phib)))'
+ l_ap15(Vds,delta_phib)='lambda_ap/(FDOS15(0)*(1-fermi_d15(Vds,delta_phib)))'
+ l_ap16(Vds,delta_phib)='lambda_ap/(FDOS16(0)*(1-fermi_d16(Vds,delta_phib)))'
+ l_ap17(Vds,delta_phib)='lambda_ap/(FDOS17(0)*(1-fermi_d17(Vds,delta_phib)))'
+ l_ap18(Vds,delta_phib)='lambda_ap/(FDOS18(0)*(1-fermi_d18(Vds,delta_phib)))'
+ l_ap19(Vds,delta_phib)='lambda_ap/(FDOS19(0)*(1-fermi_d19(Vds,delta_phib)))'
+ l_ap21(Vds,delta_phib)='lambda_ap/(FDOS21(0)*(1-fermi_d21(Vds,delta_phib)))'
+ l_ap22(Vds,delta_phib)='lambda_ap/(FDOS22(0)*(1-fermi_d22(Vds,delta_phib)))'
+ l_ap23(Vds,delta_phib)='lambda_ap/(FDOS23(0)*(1-fermi_d23(Vds,delta_phib)))'
+ l_ap24(Vds,delta_phib)='lambda_ap/(FDOS24(0)*(1-fermi_d24(Vds,delta_phib)))'
+ l_ap25(Vds,delta_phib)='lambda_ap/(FDOS25(0)*(1-fermi_d25(Vds,delta_phib)))'
+ l_ap26(Vds,delta_phib)='lambda_ap/(FDOS26(0)*(1-fermi_d26(Vds,delta_phib)))'
+ l_ap27(Vds,delta_phib)='lambda_ap/(FDOS27(0)*(1-fermi_d27(Vds,delta_phib)))'
+ l_ap28(Vds,delta_phib)='lambda_ap/(FDOS28(0)*(1-fermi_d28(Vds,delta_phib)))'
+ l_ap29(Vds,delta_phib)='lambda_ap/(FDOS29(0)*(1-fermi_d29(Vds,delta_phib)))'
* the OP MFP
+ l_op10(Vds,photon,delta_phib)='lambda_op/(FDOS10(photon)*(1-fermi_op10(Vds,photon,delta_phib)))'
+ l_op11(Vds,photon,delta_phib)='lambda_op/(FDOS11(photon)*(1-fermi_op11(Vds,photon,delta_phib)))'
+ l_op12(Vds,photon,delta_phib)='lambda_op/(FDOS12(photon)*(1-fermi_op12(Vds,photon,delta_phib)))'
+ l_op13(Vds,photon,delta_phib)='lambda_op/(FDOS13(photon)*(1-fermi_op13(Vds,photon,delta_phib)))'
+ l_op14(Vds,photon,delta_phib)='lambda_op/(FDOS14(photon)*(1-fermi_op14(Vds,photon,delta_phib)))'
+ l_op15(Vds,photon,delta_phib)='lambda_op/(FDOS15(photon)*(1-fermi_op15(Vds,photon,delta_phib)))'
+ l_op16(Vds,photon,delta_phib)='lambda_op/(FDOS16(photon)*(1-fermi_op16(Vds,photon,delta_phib)))'
+ l_op17(Vds,photon,delta_phib)='lambda_op/(FDOS17(photon)*(1-fermi_op17(Vds,photon,delta_phib)))'
+ l_op18(Vds,photon,delta_phib)='lambda_op/(FDOS18(photon)*(1-fermi_op18(Vds,photon,delta_phib)))'
+ l_op19(Vds,photon,delta_phib)='lambda_op/(FDOS19(photon)*(1-fermi_op19(Vds,photon,delta_phib)))'
+ l_op20(Vds,photon,delta_phib)='lambda_op/(FDOS20(photon)*(1-fermi_op20(Vds,photon,delta_phib)))'
+ l_op21(Vds,photon,delta_phib)='lambda_op/(FDOS21(photon)*(1-fermi_op21(Vds,photon,delta_phib)))'
+ l_op22(Vds,photon,delta_phib)='lambda_op/(FDOS22(photon)*(1-fermi_op22(Vds,photon,delta_phib)))'
+ l_op23(Vds,photon,delta_phib)='lambda_op/(FDOS23(photon)*(1-fermi_op23(Vds,photon,delta_phib)))'
+ l_op24(Vds,photon,delta_phib)='lambda_op/(FDOS24(photon)*(1-fermi_op24(Vds,photon,delta_phib)))'
+ l_op25(Vds,photon,delta_phib)='lambda_op/(FDOS25(photon)*(1-fermi_op25(Vds,photon,delta_phib)))'
+ l_op26(Vds,photon,delta_phib)='lambda_op/(FDOS26(photon)*(1-fermi_op26(Vds,photon,delta_phib)))'
+ l_op27(Vds,photon,delta_phib)='lambda_op/(FDOS27(photon)*(1-fermi_op27(Vds,photon,delta_phib)))'
+ l_op28(Vds,photon,delta_phib)='lambda_op/(FDOS28(photon)*(1-fermi_op28(Vds,photon,delta_phib)))'
+ l_op29(Vds,photon,delta_phib)='lambda_op/(FDOS29(photon)*(1-fermi_op29(Vds,photon,delta_phib)))'
* the OP MFP at drain side
+ ld_op10(Vds,photon,delta_phib)='lambda_op/(FDOS_d10(Vds,delta_phib,photon)*(1-fermi_op10(Vds,photon,delta_phib)))'
+ ld_op11(Vds,photon,delta_phib)='lambda_op/(FDOS_d11(Vds,delta_phib,photon)*(1-fermi_op11(Vds,photon,delta_phib)))'
+ ld_op12(Vds,photon,delta_phib)='lambda_op/(FDOS_d12(Vds,delta_phib,photon)*(1-fermi_op12(Vds,photon,delta_phib)))'
+ ld_op13(Vds,photon,delta_phib)='lambda_op/(FDOS_d13(Vds,delta_phib,photon)*(1-fermi_op13(Vds,photon,delta_phib)))'
+ ld_op14(Vds,photon,delta_phib)='lambda_op/(FDOS_d14(Vds,delta_phib,photon)*(1-fermi_op14(Vds,photon,delta_phib)))'
+ ld_op15(Vds,photon,delta_phib)='lambda_op/(FDOS_d15(Vds,delta_phib,photon)*(1-fermi_op15(Vds,photon,delta_phib)))'
+ ld_op16(Vds,photon,delta_phib)='lambda_op/(FDOS_d16(Vds,delta_phib,photon)*(1-fermi_op16(Vds,photon,delta_phib)))'
+ ld_op17(Vds,photon,delta_phib)='lambda_op/(FDOS_d17(Vds,delta_phib,photon)*(1-fermi_op17(Vds,photon,delta_phib)))'
+ ld_op18(Vds,photon,delta_phib)='lambda_op/(FDOS_d18(Vds,delta_phib,photon)*(1-fermi_op18(Vds,photon,delta_phib)))'
+ ld_op19(Vds,photon,delta_phib)='lambda_op/(FDOS_d19(Vds,delta_phib,photon)*(1-fermi_op19(Vds,photon,delta_phib)))'
+ ld_op20(Vds,photon,delta_phib)='lambda_op/(FDOS_d20(Vds,delta_phib,photon)*(1-fermi_op20(Vds,photon,delta_phib)))'
+ ld_op21(Vds,photon,delta_phib)='lambda_op/(FDOS_d21(Vds,delta_phib,photon)*(1-fermi_op21(Vds,photon,delta_phib)))'
+ ld_op22(Vds,photon,delta_phib)='lambda_op/(FDOS_d22(Vds,delta_phib,photon)*(1-fermi_op22(Vds,photon,delta_phib)))'
+ ld_op23(Vds,photon,delta_phib)='lambda_op/(FDOS_d23(Vds,delta_phib,photon)*(1-fermi_op23(Vds,photon,delta_phib)))'
+ ld_op24(Vds,photon,delta_phib)='lambda_op/(FDOS_d24(Vds,delta_phib,photon)*(1-fermi_op24(Vds,photon,delta_phib)))'
+ ld_op25(Vds,photon,delta_phib)='lambda_op/(FDOS_d25(Vds,delta_phib,photon)*(1-fermi_op25(Vds,photon,delta_phib)))'
+ ld_op26(Vds,photon,delta_phib)='lambda_op/(FDOS_d26(Vds,delta_phib,photon)*(1-fermi_op26(Vds,photon,delta_phib)))'
+ ld_op27(Vds,photon,delta_phib)='lambda_op/(FDOS_d27(Vds,delta_phib,photon)*(1-fermi_op27(Vds,photon,delta_phib)))'
+ ld_op28(Vds,photon,delta_phib)='lambda_op/(FDOS_d28(Vds,delta_phib,photon)*(1-fermi_op28(Vds,photon,delta_phib)))'
+ ld_op29(Vds,photon,delta_phib)='lambda_op/(FDOS_d29(Vds,delta_phib,photon)*(1-fermi_op29(Vds,photon,delta_phib)))'
* the effective mean path due to both AP/OP scattering
+ l_eff11(Vds,photon,delta_phib) = '1/(1/l_ap11(Vds,delta_phib)+1/l_op11(Vds,photon,delta_phib))'
+ l_eff12(Vds,photon,delta_phib) = '1/(1/l_ap12(Vds,delta_phib)+1/l_op12(Vds,photon,delta_phib))'
+ l_eff13(Vds,photon,delta_phib) = '1/(1/l_ap13(Vds,delta_phib)+1/l_op13(Vds,photon,delta_phib))'
+ l_eff14(Vds,photon,delta_phib) = '1/(1/l_ap14(Vds,delta_phib)+1/l_op14(Vds,photon,delta_phib))'
+ l_eff15(Vds,photon,delta_phib) = '1/(1/l_ap15(Vds,delta_phib)+1/l_op15(Vds,photon,delta_phib))'
+ l_eff16(Vds,photon,delta_phib) = '1/(1/l_ap16(Vds,delta_phib)+1/l_op16(Vds,photon,delta_phib))'
+ l_eff17(Vds,photon,delta_phib) = '1/(1/l_ap17(Vds,delta_phib)+1/l_op17(Vds,photon,delta_phib))'
+ l_eff18(Vds,photon,delta_phib) = '1/(1/l_ap18(Vds,delta_phib)+1/l_op18(Vds,photon,delta_phib))'
+ l_eff19(Vds,photon,delta_phib) = '1/(1/l_ap19(Vds,delta_phib)+1/l_op19(Vds,photon,delta_phib))'
+ l_eff21(Vds,photon,delta_phib) = '1/(1/l_ap21(Vds,delta_phib)+1/l_op21(Vds,photon,delta_phib))'
+ l_eff22(Vds,photon,delta_phib) = '1/(1/l_ap22(Vds,delta_phib)+1/l_op22(Vds,photon,delta_phib))'
+ l_eff23(Vds,photon,delta_phib) = '1/(1/l_ap23(Vds,delta_phib)+1/l_op23(Vds,photon,delta_phib))'
+ l_eff24(Vds,photon,delta_phib) = '1/(1/l_ap24(Vds,delta_phib)+1/l_op24(Vds,photon,delta_phib))'
+ l_eff25(Vds,photon,delta_phib) = '1/(1/l_ap25(Vds,delta_phib)+1/l_op25(Vds,photon,delta_phib))'
+ l_eff26(Vds,photon,delta_phib) = '1/(1/l_ap26(Vds,delta_phib)+1/l_op26(Vds,photon,delta_phib))'
+ l_eff27(Vds,photon,delta_phib) = '1/(1/l_ap27(Vds,delta_phib)+1/l_op27(Vds,photon,delta_phib))'
+ l_eff28(Vds,photon,delta_phib) = '1/(1/l_ap28(Vds,delta_phib)+1/l_op28(Vds,photon,delta_phib))'
+ l_eff29(Vds,photon,delta_phib) = '1/(1/l_ap29(Vds,delta_phib)+1/l_op29(Vds,photon,delta_phib))'
* The transmission probability, only OP scattering
+ T11(Vds,photon,delta_phib) = '1/(1+Lg/l_op11(Vds,photon,delta_phib))'
+ T12(Vds,photon,delta_phib) = '1/(1+Lg/l_op12(Vds,photon,delta_phib))'
+ T13(Vds,photon,delta_phib) = '1/(1+Lg/l_op13(Vds,photon,delta_phib))'
+ T14(Vds,photon,delta_phib) = '1/(1+Lg/l_op14(Vds,photon,delta_phib))'
+ T15(Vds,photon,delta_phib) = '1/(1+Lg/l_op15(Vds,photon,delta_phib))'
+ T16(Vds,photon,delta_phib) = '1/(1+Lg/l_op16(Vds,photon,delta_phib))'
+ T17(Vds,photon,delta_phib) = '1/(1+Lg/l_op17(Vds,photon,delta_phib))'
+ T18(Vds,photon,delta_phib) = '1/(1+Lg/l_op18(Vds,photon,delta_phib))'
+ T19(Vds,photon,delta_phib) = '1/(1+Lg/l_op19(Vds,photon,delta_phib))'
+ T21(Vds,photon,delta_phib) = '1/(1+Lg/l_op21(Vds,photon,delta_phib))'
+ T22(Vds,photon,delta_phib) = '1/(1+Lg/l_op22(Vds,photon,delta_phib))'
+ T23(Vds,photon,delta_phib) = '1/(1+Lg/l_op23(Vds,photon,delta_phib))'
+ T24(Vds,photon,delta_phib) = '1/(1+Lg/l_op24(Vds,photon,delta_phib))'
+ T25(Vds,photon,delta_phib) = '1/(1+Lg/l_op25(Vds,photon,delta_phib))'
+ T26(Vds,photon,delta_phib) = '1/(1+Lg/l_op26(Vds,photon,delta_phib))'
+ T27(Vds,photon,delta_phib) = '1/(1+Lg/l_op27(Vds,photon,delta_phib))'
+ T28(Vds,photon,delta_phib) = '1/(1+Lg/l_op28(Vds,photon,delta_phib))'
+ T29(Vds,photon,delta_phib) = '1/(1+Lg/l_op29(Vds,photon,delta_phib))'
* The current of substate (m,n)
+ current_sub11(Vds,photon,delta_phib)='(T11(Vds,photon,delta_phib)*fermi_s11(delta_phib) - T11(0,photon,delta_phib)*fermi_d11(Vds,delta_phib))*Coeff_J11'
+ current_sub12(Vds,photon,delta_phib)='(T12(Vds,photon,delta_phib)*fermi_s12(delta_phib) - T12(0,photon,delta_phib)*fermi_d12(Vds,delta_phib))*Coeff_J12'
+ current_sub13(Vds,photon,delta_phib)='(T13(Vds,photon,delta_phib)*fermi_s13(delta_phib) - T13(0,photon,delta_phib)*fermi_d13(Vds,delta_phib))*Coeff_J13'
+ current_sub14(Vds,photon,delta_phib)='(T14(Vds,photon,delta_phib)*fermi_s14(delta_phib) - T14(0,photon,delta_phib)*fermi_d14(Vds,delta_phib))*Coeff_J14'
+ current_sub15(Vds,photon,delta_phib)='(T15(Vds,photon,delta_phib)*fermi_s15(delta_phib) - T15(0,photon,delta_phib)*fermi_d15(Vds,delta_phib))*Coeff_J15'
+ current_sub16(Vds,photon,delta_phib)='(T16(Vds,photon,delta_phib)*fermi_s16(delta_phib) - T16(0,photon,delta_phib)*fermi_d16(Vds,delta_phib))*Coeff_J16'
+ current_sub17(Vds,photon,delta_phib)='(T17(Vds,photon,delta_phib)*fermi_s17(delta_phib) - T17(0,photon,delta_phib)*fermi_d17(Vds,delta_phib))*Coeff_J17'
+ current_sub18(Vds,photon,delta_phib)='(T18(Vds,photon,delta_phib)*fermi_s18(delta_phib) - T18(0,photon,delta_phib)*fermi_d18(Vds,delta_phib))*Coeff_J18'
+ current_sub19(Vds,photon,delta_phib)='(T19(Vds,photon,delta_phib)*fermi_s19(delta_phib) - T19(0,photon,delta_phib)*fermi_d19(Vds,delta_phib))*Coeff_J19'
+ current_sub21(Vds,photon,delta_phib)='(T21(Vds,photon,delta_phib)*fermi_s21(delta_phib) - T21(0,photon,delta_phib)*fermi_d21(Vds,delta_phib))*Coeff_J21'
+ current_sub22(Vds,photon,delta_phib)='(T22(Vds,photon,delta_phib)*fermi_s22(delta_phib) - T22(0,photon,delta_phib)*fermi_d22(Vds,delta_phib))*Coeff_J22'
+ current_sub23(Vds,photon,delta_phib)='(T23(Vds,photon,delta_phib)*fermi_s23(delta_phib) - T23(0,photon,delta_phib)*fermi_d23(Vds,delta_phib))*Coeff_J23'
+ current_sub24(Vds,photon,delta_phib)='(T24(Vds,photon,delta_phib)*fermi_s24(delta_phib) - T24(0,photon,delta_phib)*fermi_d24(Vds,delta_phib))*Coeff_J24'
+ current_sub25(Vds,photon,delta_phib)='(T25(Vds,photon,delta_phib)*fermi_s25(delta_phib) - T25(0,photon,delta_phib)*fermi_d25(Vds,delta_phib))*Coeff_J25'
+ current_sub26(Vds,photon,delta_phib)='(T26(Vds,photon,delta_phib)*fermi_s26(delta_phib) - T26(0,photon,delta_phib)*fermi_d26(Vds,delta_phib))*Coeff_J26'
+ current_sub27(Vds,photon,delta_phib)='(T27(Vds,photon,delta_phib)*fermi_s27(delta_phib) - T27(0,photon,delta_phib)*fermi_d27(Vds,delta_phib))*Coeff_J27'
+ current_sub28(Vds,photon,delta_phib)='(T28(Vds,photon,delta_phib)*fermi_s28(delta_phib) - T28(0,photon,delta_phib)*fermi_d28(Vds,delta_phib))*Coeff_J28'
+ current_sub29(Vds,photon,delta_phib)='(T29(Vds,photon,delta_phib)*fermi_s29(delta_phib) - T29(0,photon,delta_phib)*fermi_d29(Vds,delta_phib))*Coeff_J29'
* The subband current
+ current_sub_1(Vds,photon,delta_phib) = 'current_sub11(Vds,photon,delta_phib) + \\
current_sub12(Vds,photon,delta_phib) + \\
current_sub13(Vds,photon,delta_phib) + \\
current_sub14(Vds,photon,delta_phib) + \\
current_sub15(Vds,photon,delta_phib) + \\
current_sub16(Vds,photon,delta_phib) + \\
current_sub17(Vds,photon,delta_phib) + \\
current_sub18(Vds,photon,delta_phib) + \\
current_sub19(Vds,photon,delta_phib)'
+ current_sub_2(Vds,photon,delta_phib) = 'current_sub21(Vds,photon,delta_phib) + \\
current_sub22(Vds,photon,delta_phib) + \\
current_sub23(Vds,photon,delta_phib) + \\
current_sub24(Vds,photon,delta_phib) + \\
current_sub25(Vds,photon,delta_phib) + \\
current_sub26(Vds,photon,delta_phib) + \\
current_sub27(Vds,photon,delta_phib) + \\
current_sub28(Vds,photon,delta_phib) + \\
current_sub29(Vds,photon,delta_phib)'
*********************************************************************
* The total current of the first 2 sub-bands, with AP, OP backscattering
*********************************************************************
.PARAM JFET(Vds,photon,delta_phib)='coeffj*CocoJ/Lgate*(current_sub_1(Vds,photon,delta_phib) + current_sub_2(Vds,photon,delta_phib))'
*********************************************************************
* The total current of the first 2 sub-bands, of the n+ interconnect
*********************************************************************
.PARAM J1(Vds,phib) = 'coeffj*kT*(log(1+exp((E1-Efi-phib)/kT))-log(exp(-Vds/kT)+exp((E1-Efi-phib)/kT)))'
+ J2(Vds,phib) = 'coeffj*kT*(log(1+exp((E2-Efi-phib)/kT))-log(exp(-Vds/kT)+exp((E2-Efi-phib)/kT)))'
+ Jint(Vds,phib) = 'J1(Vds,phib)+J2(Vds,phib)'
*********************************************************************
* The BTBT current component of the mth sub-band
*********************************************************************
.PARAM Jbtbt_sub_1(Vds,Ids)='log((1+exp((Vds-E1+Ids*Rud-Efi)/kT))/(1+exp((E1+Ids*Rud-Efi)/kT)))*MAX(Vds-2*E1,0)/(Vds-2*E1)'
+ Jbtbt_sub_2(Vds,Ids)='log((1+exp((Vds-E2+Ids*Rud-Efi)/kT))/(1+exp((E2+Ids*Rud-Efi)/kT)))*MAX(Vds-2*E2,0)/(Vds-2*E2)'
*********************************************************************
* The total BTBT current
*********************************************************************
.PARAM J_btbt(Vds,Ids,phib)='0*coeffj*kT*(Jbtbt_sub_1(Vds,Ids)*Tbtbt1(Vds,phib) + \\
0*Jbtbt_sub_2(Vds,Ids)*Tbtbt2(Vds,phib))'
*********************************************************************
* The parameters for charge induced in the channel
*********************************************************************
.PARAM coeffc = '4*q/(3*pi*Vpi*d)' $ mode degeneracy already considered
* Number of the electrons in subband (m,n)
+ charge_sub10(Vd,Vs,delta_phib) = '1/(1+exp((E1-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E1-delta_phib)/kT))'
+ charge_sub11(Vd,Vs,delta_phib) = '1/(1+exp((E11-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E11-delta_phib)/kT))'
+ charge_sub12(Vd,Vs,delta_phib) = '1/(1+exp((E12-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E12-delta_phib)/kT))'
+ charge_sub13(Vd,Vs,delta_phib) = '1/(1+exp((E13-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E13-delta_phib)/kT))'
+ charge_sub14(Vd,Vs,delta_phib) = '1/(1+exp((E14-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E14-delta_phib)/kT))'
+ charge_sub15(Vd,Vs,delta_phib) = '1/(1+exp((E15-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E15-delta_phib)/kT))'
+ charge_sub16(Vd,Vs,delta_phib) = '1/(1+exp((E16-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E16-delta_phib)/kT))'
+ charge_sub17(Vd,Vs,delta_phib) = '1/(1+exp((E17-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E17-delta_phib)/kT))'
+ charge_sub18(Vd,Vs,delta_phib) = '1/(1+exp((E18-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E18-delta_phib)/kT))'
+ charge_sub19(Vd,Vs,delta_phib) = '1/(1+exp((E19-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E19-delta_phib)/kT))'
+ charge_sub20(Vd,Vs,delta_phib) = '1/(1+exp((E2-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E2-delta_phib)/kT))'
+ charge_sub21(Vd,Vs,delta_phib) = '1/(1+exp((E21-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E21-delta_phib)/kT))'
+ charge_sub22(Vd,Vs,delta_phib) = '1/(1+exp((E22-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E22-delta_phib)/kT))'
+ charge_sub23(Vd,Vs,delta_phib) = '1/(1+exp((E23-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E23-delta_phib)/kT))'
+ charge_sub24(Vd,Vs,delta_phib) = '1/(1+exp((E24-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E24-delta_phib)/kT))'
+ charge_sub25(Vd,Vs,delta_phib) = '1/(1+exp((E25-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E25-delta_phib)/kT))'
+ charge_sub26(Vd,Vs,delta_phib) = '1/(1+exp((E26-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E26-delta_phib)/kT))'
+ charge_sub27(Vd,Vs,delta_phib) = '1/(1+exp((E27-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E27-delta_phib)/kT))'
+ charge_sub28(Vd,Vs,delta_phib) = '1/(1+exp((E28-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E28-delta_phib)/kT))'
+ charge_sub29(Vd,Vs,delta_phib) = '1/(1+exp((E29-delta_phib)/kT)) + exp(-(Vd-Vs)/kT)/(exp(-(Vd-Vs)/kT)+exp((E29-delta_phib)/kT))'
* Charge coming from the source.
+ Qs_sub10(delta_phib) = '1/(1+exp((E1-delta_phib)/kT))'
+ Qs_sub11(delta_phib) = '1/(1+exp((E11-delta_phib)/kT))'
+ Qs_sub12(delta_phib) = '1/(1+exp((E12-delta_phib)/kT))'
+ Qs_sub13(delta_phib) = '1/(1+exp((E13-delta_phib)/kT))'
+ Qs_sub14(delta_phib) = '1/(1+exp((E14-delta_phib)/kT))'
+ Qs_sub15(delta_phib) = '1/(1+exp((E15-delta_phib)/kT))'
+ Qs_sub16(delta_phib) = '1/(1+exp((E16-delta_phib)/kT))'
+ Qs_sub17(delta_phib) = '1/(1+exp((E17-delta_phib)/kT))'
+ Qs_sub18(delta_phib) = '1/(1+exp((E18-delta_phib)/kT))'
+ Qs_sub19(delta_phib) = '1/(1+exp((E19-delta_phib)/kT))'
+ Qs_sub20(delta_phib) = '1/(1+exp((E2-delta_phib)/kT))'
+ Qs_sub21(delta_phib) = '1/(1+exp((E21-delta_phib)/kT))'
+ Qs_sub22(delta_phib) = '1/(1+exp((E22-delta_phib)/kT))'
+ Qs_sub23(delta_phib) = '1/(1+exp((E23-delta_phib)/kT))'
+ Qs_sub24(delta_phib) = '1/(1+exp((E24-delta_phib)/kT))'
+ Qs_sub25(delta_phib) = '1/(1+exp((E25-delta_phib)/kT))'
+ Qs_sub26(delta_phib) = '1/(1+exp((E26-delta_phib)/kT))'
+ Qs_sub27(delta_phib) = '1/(1+exp((E27-delta_phib)/kT))'
+ Qs_sub28(delta_phib) = '1/(1+exp((E28-delta_phib)/kT))'
+ Qs_sub29(delta_phib) = '1/(1+exp((E29-delta_phib)/kT))'
*********************************************************************
* The mth subband charge of the first 10 parallel bands
* valid for channel length Lgate from 10nm to 100nm
*********************************************************************
* The total charge in the channel, consider the first two sub-bands
*********************************************************************
.PARAM charge_sub_1(Vd,Vs,delta_phib) = 'charge_sub10(Vd,Vs,delta_phib) + charge_sub11(Vd,Vs,delta_phib) + \\
charge_sub12(Vd,Vs,delta_phib) + charge_sub13(Vd,Vs,delta_phib) + \\
charge_sub14(Vd,Vs,delta_phib) + charge_sub15(Vd,Vs,delta_phib) + \\
charge_sub16(Vd,Vs,delta_phib) + charge_sub17(Vd,Vs,delta_phib) + \\
charge_sub18(Vd,Vs,delta_phib) + charge_sub19(Vd,Vs,delta_phib)'
+ charge_sub_2(Vd,Vs,delta_phib) = 'charge_sub20(Vd,Vs,delta_phib) + charge_sub21(Vd,Vs,delta_phib) + \\
charge_sub22(Vd,Vs,delta_phib) + charge_sub23(Vd,Vs,delta_phib) + \\
charge_sub24(Vd,Vs,delta_phib) + charge_sub25(Vd,Vs,delta_phib) + \\
charge_sub26(Vd,Vs,delta_phib) + charge_sub27(Vd,Vs,delta_phib) + \\
charge_sub28(Vd,Vs,delta_phib) + charge_sub29(Vd,Vs,delta_phib)'
+ charge_total(Vd,Vs,delta_phib) = 'de_fac*q*(charge_sub_1(Vd,Vs,delta_phib) + charge_sub_2(Vd,Vs,delta_phib))/Lgate'
*********************************************************************
* The adjacent CNTs are tied to GND in one extreme case
*********************************************************************
*+ charge_channel(Vd,Vg,Vs,Vb,delta_phib) = 'Ci*(Vg-Vs-Vfbn)+Csub_tot*(Vb-Vs)-(Ci+Csub_tot)*delta_phib'
+ charge_channel(Vd,Vg,Vs,Vb,delta_phib) = 'Ci*(Vg-Vs-Vfbn)+Csub*(Vb-Vs)-(Ci+Csub)*delta_phib+CoupleRatio*Ccsd*(V(CoupleNode)-Vs-delta_phib)+(1-CoupleRatio)*Ccsd*(-delta_phib)'
*********************************************************************
* Charge accumulated at drain side due to optical scattering
*********************************************************************
* The reflection probability due to OP scattering
.PARAM Rd_op10(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op10(Vds,photon,delta_phib))'
+ Rd_op11(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op11(Vds,photon,delta_phib))'
+ Rd_op12(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op12(Vds,photon,delta_phib))'
+ Rd_op13(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op13(Vds,photon,delta_phib))'
+ Rd_op14(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op14(Vds,photon,delta_phib))'
+ Rd_op15(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op15(Vds,photon,delta_phib))'
+ Rd_op20(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op20(Vds,photon,delta_phib))'
+ Rd_op21(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op21(Vds,photon,delta_phib))'
+ Rd_op22(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op22(Vds,photon,delta_phib))'
+ Rd_op23(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op23(Vds,photon,delta_phib))'
+ Rd_op24(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op24(Vds,photon,delta_phib))'
+ Rd_op25(Vds,photon,delta_phib) = 'Ld_par/(Ld_par+ld_op25(Vds,photon,delta_phib))'
+ Qop_10(Vds,photon,delta_phib) = 'Qs_sub10(delta_phib)*Rd_op10(Vds,photon,delta_phib)'
+ Qop_11(Vds,photon,delta_phib) = 'Qs_sub11(delta_phib)*Rd_op11(Vds,photon,delta_phib)'
+ Qop_12(Vds,photon,delta_phib) = 'Qs_sub12(delta_phib)*Rd_op12(Vds,photon,delta_phib)'
+ Qop_13(Vds,photon,delta_phib) = 'Qs_sub13(delta_phib)*Rd_op13(Vds,photon,delta_phib)'
+ Qop_14(Vds,photon,delta_phib) = 'Qs_sub14(delta_phib)*Rd_op14(Vds,photon,delta_phib)'
+ Qop_15(Vds,photon,delta_phib) = 'Qs_sub15(delta_phib)*Rd_op15(Vds,photon,delta_phib)'
+ Qop_20(Vds,photon,delta_phib) = 'Qs_sub20(delta_phib)*Rd_op20(Vds,photon,delta_phib)'
+ Qop_21(Vds,photon,delta_phib) = 'Qs_sub21(delta_phib)*Rd_op21(Vds,photon,delta_phib)'
+ Qop_22(Vds,photon,delta_phib) = 'Qs_sub22(delta_phib)*Rd_op22(Vds,photon,delta_phib)'
+ Qop_23(Vds,photon,delta_phib) = 'Qs_sub23(delta_phib)*Rd_op23(Vds,photon,delta_phib)'
+ Qop_24(Vds,photon,delta_phib) = 'Qs_sub24(delta_phib)*Rd_op24(Vds,photon,delta_phib)'
+ Qop_25(Vds,photon,delta_phib) = 'Qs_sub25(delta_phib)*Rd_op25(Vds,photon,delta_phib)'
+ Qop_sub_1(Vds,photon,delta_phib) = 'q*(Qop_10(Vds,photon,delta_phib) + Qop_11(Vds,photon,delta_phib) + \\
Qop_12(Vds,photon,delta_phib) + Qop_13(Vds,photon,delta_phib) + \\
Qop_14(Vds,photon,delta_phib) + Qop_15(Vds,photon,delta_phib))'
+ Qop_sub_2(Vds,photon,delta_phib) = 'q*(Qop_20(Vds,photon,delta_phib) + Qop_21(Vds,photon,delta_phib) + \\
Qop_22(Vds,photon,delta_phib) + Qop_23(Vds,photon,delta_phib) + \\
Qop_24(Vds,photon,delta_phib) + Qop_25(Vds,photon,delta_phib))'
+ Qop(Vds,photon,delta_phib) = 'Qop_sub_1(Vds,photon,delta_phib) + Qop_sub_2(Vds,photon,delta_phib)'
*********************************************************************
* Charge induced on the gate.
*********************************************************************
+ Qg(Vg,Vs,delta_phib) = 'Ci*(Vg-Vs-Vfbn-delta_phib)'
*********************************************************************
* Charge induced on the substrate and source/drain island
*********************************************************************
+ Qb(Vb,Vs,delta_phib) = 'Csub_tot*(Vb-Vs-delta_phib)'
*********************************************************************
* The parameters to calculate trans-capacitance
*********************************************************************
* Number of the electrons in subband (m,n)
.PARAM trans_c_sub10(Vd,Vs,delta_phib) = 'exp((E1-delta_phib)/kT)/POW(1+exp((E1-delta_phib)/kT),2) + exp((E1-delta_phib+Vd-Vs)/kT)/POW(1+exp((E1-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub11(Vd,Vs,delta_phib) = 'exp((E11-delta_phib)/kT)/POW(1+exp((E11-delta_phib)/kT),2) + exp((E11-delta_phib+Vd-Vs)/kT)/POW(1+exp((E11-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub12(Vd,Vs,delta_phib) = 'exp((E12-delta_phib)/kT)/POW(1+exp((E12-delta_phib)/kT),2) + exp((E12-delta_phib+Vd-Vs)/kT)/POW(1+exp((E12-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub13(Vd,Vs,delta_phib) = 'exp((E13-delta_phib)/kT)/POW(1+exp((E13-delta_phib)/kT),2) + exp((E13-delta_phib+Vd-Vs)/kT)/POW(1+exp((E13-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub14(Vd,Vs,delta_phib) = 'exp((E14-delta_phib)/kT)/POW(1+exp((E14-delta_phib)/kT),2) + exp((E14-delta_phib+Vd-Vs)/kT)/POW(1+exp((E14-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub15(Vd,Vs,delta_phib) = 'exp((E15-delta_phib)/kT)/POW(1+exp((E15-delta_phib)/kT),2) + exp((E15-delta_phib+Vd-Vs)/kT)/POW(1+exp((E15-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub16(Vd,Vs,delta_phib) = 'exp((E16-delta_phib)/kT)/POW(1+exp((E16-delta_phib)/kT),2) + exp((E16-delta_phib+Vd-Vs)/kT)/POW(1+exp((E16-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub17(Vd,Vs,delta_phib) = 'exp((E17-delta_phib)/kT)/POW(1+exp((E17-delta_phib)/kT),2) + exp((E17-delta_phib+Vd-Vs)/kT)/POW(1+exp((E17-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub18(Vd,Vs,delta_phib) = 'exp((E18-delta_phib)/kT)/POW(1+exp((E18-delta_phib)/kT),2) + exp((E18-delta_phib+Vd-Vs)/kT)/POW(1+exp((E18-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub19(Vd,Vs,delta_phib) = 'exp((E19-delta_phib)/kT)/POW(1+exp((E19-delta_phib)/kT),2) + exp((E19-delta_phib+Vd-Vs)/kT)/POW(1+exp((E19-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub20(Vd,Vs,delta_phib) = 'exp((E2-delta_phib)/kT)/POW(1+exp((E2-delta_phib)/kT),2) + exp((E2-delta_phib+Vd-Vs)/kT)/POW(1+exp((E2-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub21(Vd,Vs,delta_phib) = 'exp((E21-delta_phib)/kT)/POW(1+exp((E21-delta_phib)/kT),2) + exp((E21-delta_phib+Vd-Vs)/kT)/POW(1+exp((E21-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub22(Vd,Vs,delta_phib) = 'exp((E22-delta_phib)/kT)/POW(1+exp((E22-delta_phib)/kT),2) + exp((E22-delta_phib+Vd-Vs)/kT)/POW(1+exp((E22-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub23(Vd,Vs,delta_phib) = 'exp((E23-delta_phib)/kT)/POW(1+exp((E23-delta_phib)/kT),2) + exp((E23-delta_phib+Vd-Vs)/kT)/POW(1+exp((E23-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub24(Vd,Vs,delta_phib) = 'exp((E24-delta_phib)/kT)/POW(1+exp((E24-delta_phib)/kT),2) + exp((E24-delta_phib+Vd-Vs)/kT)/POW(1+exp((E24-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub25(Vd,Vs,delta_phib) = 'exp((E25-delta_phib)/kT)/POW(1+exp((E25-delta_phib)/kT),2) + exp((E25-delta_phib+Vd-Vs)/kT)/POW(1+exp((E25-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub26(Vd,Vs,delta_phib) = 'exp((E26-delta_phib)/kT)/POW(1+exp((E26-delta_phib)/kT),2) + exp((E26-delta_phib+Vd-Vs)/kT)/POW(1+exp((E26-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub27(Vd,Vs,delta_phib) = 'exp((E27-delta_phib)/kT)/POW(1+exp((E27-delta_phib)/kT),2) + exp((E27-delta_phib+Vd-Vs)/kT)/POW(1+exp((E27-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub28(Vd,Vs,delta_phib) = 'exp((E28-delta_phib)/kT)/POW(1+exp((E28-delta_phib)/kT),2) + exp((E28-delta_phib+Vd-Vs)/kT)/POW(1+exp((E28-delta_phib+Vd-Vs)/kT),2)'
+ trans_c_sub29(Vd,Vs,delta_phib) = 'exp((E29-delta_phib)/kT)/POW(1+exp((E29-delta_phib)/kT),2) + exp((E29-delta_phib+Vd-Vs)/kT)/POW(1+exp((E29-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub10(Vd,Vs,delta_phib) = 'exp((E1-delta_phib+Vd-Vs)/kT)/POW(1+exp((E1-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub11(Vd,Vs,delta_phib) = 'exp((E11-delta_phib+Vd-Vs)/kT)/POW(1+exp((E11-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub12(Vd,Vs,delta_phib) = 'exp((E12-delta_phib+Vd-Vs)/kT)/POW(1+exp((E12-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub13(Vd,Vs,delta_phib) = 'exp((E13-delta_phib+Vd-Vs)/kT)/POW(1+exp((E13-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub14(Vd,Vs,delta_phib) = 'exp((E14-delta_phib+Vd-Vs)/kT)/POW(1+exp((E14-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub15(Vd,Vs,delta_phib) = 'exp((E15-delta_phib+Vd-Vs)/kT)/POW(1+exp((E15-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub16(Vd,Vs,delta_phib) = 'exp((E16-delta_phib+Vd-Vs)/kT)/POW(1+exp((E16-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub17(Vd,Vs,delta_phib) = 'exp((E17-delta_phib+Vd-Vs)/kT)/POW(1+exp((E17-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub18(Vd,Vs,delta_phib) = 'exp((E18-delta_phib+Vd-Vs)/kT)/POW(1+exp((E18-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub19(Vd,Vs,delta_phib) = 'exp((E19-delta_phib+Vd-Vs)/kT)/POW(1+exp((E19-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub20(Vd,Vs,delta_phib) = 'exp((E2-delta_phib+Vd-Vs)/kT)/POW(1+exp((E2-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub21(Vd,Vs,delta_phib) = 'exp((E21-delta_phib+Vd-Vs)/kT)/POW(1+exp((E21-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub22(Vd,Vs,delta_phib) = 'exp((E22-delta_phib+Vd-Vs)/kT)/POW(1+exp((E22-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub23(Vd,Vs,delta_phib) = 'exp((E23-delta_phib+Vd-Vs)/kT)/POW(1+exp((E23-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub24(Vd,Vs,delta_phib) = 'exp((E24-delta_phib+Vd-Vs)/kT)/POW(1+exp((E24-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub25(Vd,Vs,delta_phib) = 'exp((E25-delta_phib+Vd-Vs)/kT)/POW(1+exp((E25-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub26(Vd,Vs,delta_phib) = 'exp((E26-delta_phib+Vd-Vs)/kT)/POW(1+exp((E26-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub27(Vd,Vs,delta_phib) = 'exp((E27-delta_phib+Vd-Vs)/kT)/POW(1+exp((E27-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub28(Vd,Vs,delta_phib) = 'exp((E28-delta_phib+Vd-Vs)/kT)/POW(1+exp((E28-delta_phib+Vd-Vs)/kT),2)'
+ c_vds_sub29(Vd,Vs,delta_phib) = 'exp((E29-delta_phib+Vd-Vs)/kT)/POW(1+exp((E29-delta_phib+Vd-Vs)/kT),2)'
*********************************************************************
* The mth subband charge of the first 10 parallel bands
* valid for channel length Lgate from 10nm to 100nm
*********************************************************************
* The total charge in the channel, consider the first two sub-bands
*********************************************************************
.PARAM trans_charge_1(Vd,Vs,delta_phib) = 'trans_c_sub10(Vd,Vs,delta_phib) + trans_c_sub11(Vd,Vs,delta_phib) + \\
trans_c_sub12(Vd,Vs,delta_phib) + trans_c_sub13(Vd,Vs,delta_phib) + \\
trans_c_sub14(Vd,Vs,delta_phib) + trans_c_sub15(Vd,Vs,delta_phib) + \\
trans_c_sub16(Vd,Vs,delta_phib) + trans_c_sub17(Vd,Vs,delta_phib) + \\
trans_c_sub18(Vd,Vs,delta_phib) + trans_c_sub19(Vd,Vs,delta_phib)'
+ trans_charge_2(Vd,Vs,delta_phib) = 'trans_c_sub20(Vd,Vs,delta_phib) + trans_c_sub21(Vd,Vs,delta_phib) + \\
trans_c_sub22(Vd,Vs,delta_phib) + trans_c_sub23(Vd,Vs,delta_phib) + \\
trans_c_sub24(Vd,Vs,delta_phib) + trans_c_sub25(Vd,Vs,delta_phib) + \\
trans_c_sub26(Vd,Vs,delta_phib) + trans_c_sub27(Vd,Vs,delta_phib) + \\
trans_c_sub28(Vd,Vs,delta_phib) + trans_c_sub29(Vd,Vs,delta_phib)'
+ trans_charge(Vd,Vs,delta_phib) = 'de_fac*q/(Lgate*kT)*(trans_charge_1(Vd,Vs,delta_phib) + trans_charge_2(Vd,Vs,delta_phib))'
+ Vg_to_phib(Vd,Vs,delta_phib) = '(Ci + Csub_tot + trans_charge(Vd,Vs,delta_phib)) / Ci'
****************************************************************
.PARAM charge_vds_1(Vd,Vs,delta_phib) = 'c_vds_sub10(Vd,Vs,delta_phib) + c_vds_sub11(Vd,Vs,delta_phib) + \\
c_vds_sub12(Vd,Vs,delta_phib) + c_vds_sub13(Vd,Vs,delta_phib) + \\
c_vds_sub14(Vd,Vs,delta_phib) + c_vds_sub15(Vd,Vs,delta_phib) + \\
c_vds_sub16(Vd,Vs,delta_phib) + c_vds_sub17(Vd,Vs,delta_phib) + \\
c_vds_sub18(Vd,Vs,delta_phib) + c_vds_sub19(Vd,Vs,delta_phib)'
+ charge_vds_2(Vd,Vs,delta_phib) = 'c_vds_sub20(Vd,Vs,delta_phib) + c_vds_sub21(Vd,Vs,delta_phib) + \\
c_vds_sub22(Vd,Vs,delta_phib) + c_vds_sub23(Vd,Vs,delta_phib) + \\
c_vds_sub24(Vd,Vs,delta_phib) + c_vds_sub25(Vd,Vs,delta_phib) + \\
c_vds_sub26(Vd,Vs,delta_phib) + c_vds_sub27(Vd,Vs,delta_phib) + \\
c_vds_sub28(Vd,Vs,delta_phib) + c_vds_sub29(Vd,Vs,delta_phib)'
+ charge_vds(Vd,Vs,delta_phib) = ' de_fac*q/(Lgate*kT)*(charge_vds_1(Vd,Vs,delta_phib) + charge_vds_2(Vd,Vs,delta_phib))'
+ Vs_to_vg(Vd,Vs,delta_phib) = '(Ci + Csub_tot + charge_vds(Vd,Vs,delta_phib)) / Ci'
*********************************************************************
* The parasitic drain junction capacitance due to electron accumation with OP backscattering
*********************************************************************
.PARAM Cdj(Vds,photon,delta_phib)='Qop(Vds,photon,delta_phib)/(Vds+0.001)*max((1-exp(-100*(Vds+0.001))),1e-18)'
*********************************************************************
* End of parameter definition
*********************************************************************
*********************************************************************
* START OF DEVICE MODEL *
*********************************************************************
*********************************************************************
* The voltage controlled current source
*********************************************************************
GCNT Drain Source CUR='JFET(V(Drain,Source),photon,V(phib,Gnd))'
GBTBT Drain Source CUR='J_btbt(V(Drain,Source),I(GCNT),V(phib,Gnd))'
*********************************************************************
* Gate to Source/Drain/Sub capacitance
*********************************************************************
Csg Source Gate 'abs((Ci-(Ci+Csub_tot)/Vg_to_phib(V(Vdrain),V(Vsource),V(phib,Gnd)))*Lg/2)'
Cdg Drain Gate 'abs((Ci-(Ci+Csub_tot)/Vg_to_phib(V(Vdrain),V(Vsource),V(phib,Gnd)))*Lg/2)'
Cbg Gate mid2 'abs(Csub_tot/Vg_to_phib(V(Vdrain),V(Vsource),V(phib,Gnd))*Lg)'
Cgs Gate Source 'abs(Ci*(1-Vs_to_vg(V(Vdrain),V(Vsource),V(phib,Gnd))/Vg_to_phib(V(Vdrain),V(Vsource),V(phib,Gnd)))*Lg)'
Cgd Gate Drain 'abs(charge_vds(V(Vdrain),V(Vsource),V(phib,Gnd))/Vg_to_phib(V(Vdrain),V(Vsource),V(phib,Gnd))*Lg)'
Csb Source Sub 'abs((Csub_tot-(Ci+Csub_tot)/Vg_to_phib(V(Vdrain),V(Vsource),V(phib,Gnd))*Csub_tot/Ci)*Lg/2)'
Cdb Drain Sub 'abs((Csub_tot-(Ci+Csub_tot)/Vg_to_phib(V(Vdrain),V(Vsource),V(phib,Gnd))*Csub_tot/Ci)*Lg/2)'
Cdj Drain Gnd 'abs(Cdj(V(Drain,Source),photon,V(phib,Gnd))*Ld_par)'
* The coupling capacitance between metal Gate stack and doped S/D carbon nanotube
Cgss Gate Source '(Coeff1_Cgsd*Lss+Coeff2_Cgsd)*GF*Cratio'
Cgdd Gate Drain '(Coeff1_Cgsd*Ldd+Coeff2_Cgsd)*GF*Cratio'
*********************************************************************
* Substrate resistance
*********************************************************************
Rsub mid2 Sub 'Rsub'
*********************************************************************
* END OF DEVICE MODEL *
*********************************************************************
* delta_phib: a circuit for solving the equations
*********************************************************************
G_Qtotal Vdrain phib CUR='charge_channel(V(Vdrain),V(Vgate),V(Vsource),V(VsubM),V(phib,Gnd))'
G_Qchannel phib Gnd CUR='charge_total(V(Vdrain),V(Vsource),V(phib,Gnd))'
Rdummy1 phib Gnd 1e20 $ Dummy resistance.
*********************************************************************
* The dummy controlled voltage source to get Vds and delta_phib:
* a circuit for solving the equations
*********************************************************************
Edrain Vdrain Gnd VCVS Drain Gnd 1
Egate Vgate Gnd VCVS Gate Gnd 1
Esource Vsource Gnd VCVS Source Gnd 1
Esub VsubM Gnd VCVS Sub Gnd 1
.ENDS NCNFET_L1
********************************************************************
*
* End of N-CNFET Level 1 Sub-circuit Definition
*
********************************************************************
* Last Modified: 09/09/2008 Albert Lin
********************************************************************
*
* P-CNFET Level 1 Sub-circuit Definition
*
********************************************************************
.SUBCKT PCNFET_L1 Drain Gate Source Sub CoupleNode Lg=L_channel Lgeff=Lceff Lss=L_sd Ldd=L_sd Efi=Efo Kgate=Kox Tox=4e-9 Csub=20e-12 Ccsd=0 CoupleRatio=0 Vfbp=0 GF=0 Pitch=20e-9 n1=19 n2=0 CNTPos=1
*********************************************************************
* Parameter definition
*********************************************************************
* Csub is CNT to Substrate capacitance per unit length,approximated as 20af/um with 10um thick SiO2, 40af/um with 130nm thick SiO2
*********************************************************************
* The actual channel length used in simulation
*********************************************************************
* If Lg>Lgmax, Lgate=Lgmax to approximate the long channel device current
.PARAM Lgate = 'MIN(Lg,Lgmax)'
*********************************************************************
* The Gate-CNT coupling capacitance
*********************************************************************
* The diameter of the CNT
.PARAM dia='a*SQRT(POW(n1,2)+n1*n2+POW(n2,2))/pi'
* The radius of the CNT.
.PARAM rad='dia/2'
* Oxide thickness
.PARAM Hei='Tox+rad'
* The inverse of the capacitance with the uniform Kgate dielectric material
.PARAM RCo='log(2*Hei/dia + SQRT(POW(2*Hei/dia,2)-1))'
* The inverese of the effects due to the image charge
.PARAM RCimg='beta*log(2*Hei/(3*dia) + 2/3)'
* The inverse of the capacitance with infinite spacing between CNTs
.PARAM RCinf='RCo+RCimg'
* The potential due to the adjacent CNT
.PARAM Vadjc='0.5*log((POW(Pitch,2)+2*(Hei-rad)*(Hei+SQRT(POW(Hei,2)-POW(rad,2))))/(POW(Pitch,2)+2*(Hei-rad)*(Hei-SQRT(POW(Hei,2)-POW(rad,2)))))'
* The potential due to the image charge of the adjacent CNT
.PARAM Vadji='0.5*beta*log((POW(Hei+dia,2)+POW(Pitch,2)) / (9*POW(rad,2)+POW(Pitch,2)))*TANH((Hei+rad)/(Pitch-dia))'
* The total potential contributed by the adjacent CNT and its image charge
.PARAM RCadj='Vadjc+Vadji'
* The ratio of image charge over real charge
.PARAM beta='(Kgate-Ksub)/(Kgate+Ksub)'
* Capacitance pre-factor
.PARAM Cprefactor='2*pi*Kgate*epso'
* The gate to EdgeCNT coupling capacitance
.PARAM Cedge='Cprefactor/(RCinf+RCadj)'
* The gate to MidCNT coupling capacitance
.PARAM Cmid='2*Cedge-Cprefactor/RCinf'
* The gate capacitance, Cedge if CNTPos=1, Cmid if CNTPos=0
.PARAM Ci='Cedge*CNTPos+Cmid*(1-CNTPos)'
* The coupling capacitance between the channel region of one CNT to the doped source/drain region of another CNT
.PARAM Cc='(Cedge/Cmid-1)*Cedge*LOG(2*Pitch/dia)/LOG(Pitch/dia + SQRT(POW(Pitch/dia,2)-1))'
* The total coupling capacitance between the channgel region of one CNT and the substrate, as well as source/drain islands
.PARAM Csub_tot='Csub + Ccsd'
* The ratio between actual gate capacitance and ideal gate capacitance
.PARAM Cratio='Ci*RCinf/Cprefactor'
**********************************************************************
* The E-K disperation relationship, linear approximation around Ef point
**********************************************************************
* The first perpendicular wave number
.PARAM K1='2*pi/(3*a*SQRT(POW(n1,2)+n1*n2+POW(n2,2)))'
* The 2nd perpendicular wave number
.PARAM K2='2*K1'
* The parallel wave number
.PARAM Kp1='2*pi/Lgate'
+ Kp2='2*Kp1'
+ Kp3='3*Kp1'
+ Kp4='4*Kp1'
+ Kp5='5*Kp1'
+ Kp6='6*Kp1'
+ Kp7='7*Kp1'
+ Kp8='8*Kp1'
+ Kp9='9*Kp1'
* The energy of the perpendicular component of the mth sub-band, above Ei
.PARAM E1='Vpi*pi/SQRT(3*(POW(n1,2)+n1*n2+POW(n2,2)))'
+ E2='2*E1'
* The energy of the (m,n)th sub-band, above Ei
.PARAM CoeffE='SQRT(3)/2*a*Vpi'
+ E11='CoeffE*SQRT(POW(K1,2)+POW(Kp1,2))'
+ E12='CoeffE*SQRT(POW(K1,2)+POW(Kp2,2))'
+ E13='CoeffE*SQRT(POW(K1,2)+POW(Kp3,2))'
+ E14='CoeffE*SQRT(POW(K1,2)+POW(Kp4,2))'
+ E15='CoeffE*SQRT(POW(K1,2)+POW(Kp5,2))'
+ E16='CoeffE*SQRT(POW(K1,2)+POW(Kp6,2))'
+ E17='CoeffE*SQRT(POW(K1,2)+POW(Kp7,2))'
+ E18='CoeffE*SQRT(POW(K1,2)+POW(Kp8,2))'
+ E19='CoeffE*SQRT(POW(K1,2)+POW(Kp9,2))'
+ E21='CoeffE*SQRT(POW(K2,2)+POW(Kp1,2))'
+ E22='CoeffE*SQRT(POW(K2,2)+POW(Kp2,2))'
+ E23='CoeffE*SQRT(POW(K2,2)+POW(Kp3,2))'
+ E24='CoeffE*SQRT(POW(K2,2)+POW(Kp4,2))'
+ E25='CoeffE*SQRT(POW(K2,2)+POW(Kp5,2))'
+ E26='CoeffE*SQRT(POW(K2,2)+POW(Kp6,2))'
+ E27='CoeffE*SQRT(POW(K2,2)+POW(Kp7,2))'
+ E28='CoeffE*SQRT(POW(K2,2)+POW(Kp8,2))'
+ E29='CoeffE*SQRT(POW(K2,2)+POW(Kp9,2))'
* The kinetic energy of the mth sub-band
.PARAM En11='E11-E1'
+ En12='E12-E1'
+ En13='E13-E1'
+ En14='E14-E1'
+ En15='E15-E1'
+ En16='E16-E1'
+ En17='E17-E1'
+ En18='E18-E1'
+ En19='E19-E1'
+ En21='E21-E2'
+ En22='E22-E2'
+ En23='E23-E2'
+ En24='E24-E2'
+ En25='E25-E2'
+ En26='E26-E2'
+ En27='E27-E2'
+ En28='E28-E2'
+ En29='E29-E2'
* The coefficients of Jmn
.PARAM CocoJ='SQRT(3)*a*pi*Vpi'
+ Coeff_J11 = 'Kp1/SQRT(POW(K1,2)+POW(Kp1,2))'
+ Coeff_J12 = 'Kp2/SQRT(POW(K1,2)+POW(Kp2,2))'
+ Coeff_J13 = 'Kp3/SQRT(POW(K1,2)+POW(Kp3,2))'
+ Coeff_J14 = 'Kp4/SQRT(POW(K1,2)+POW(Kp4,2))'
+ Coeff_J15 = 'Kp5/SQRT(POW(K1,2)+POW(Kp5,2))'
+ Coeff_J16 = 'Kp6/SQRT(POW(K1,2)+POW(Kp6,2))'
+ Coeff_J17 = 'Kp7/SQRT(POW(K1,2)+POW(Kp7,2))'
+ Coeff_J18 = 'Kp8/SQRT(POW(K1,2)+POW(Kp8,2))'
+ Coeff_J19 = 'Kp9/SQRT(POW(K1,2)+POW(Kp9,2))'
+ Coeff_J21 = 'Kp1/SQRT(POW(K2,2)+POW(Kp1,2))'
+ Coeff_J22 = 'Kp2/SQRT(POW(K2,2)+POW(Kp2,2))'
+ Coeff_J23 = 'Kp3/SQRT(POW(K2,2)+POW(Kp3,2))'
+ Coeff_J24 = 'Kp4/SQRT(POW(K2,2)+POW(Kp4,2))'
+ Coeff_J25 = 'Kp5/SQRT(POW(K2,2)+POW(Kp5,2))'
+ Coeff_J26 = 'Kp6/SQRT(POW(K2,2)+POW(Kp6,2))'
+ Coeff_J27 = 'Kp7/SQRT(POW(K2,2)+POW(Kp7,2))'
+ Coeff_J28 = 'Kp8/SQRT(POW(K2,2)+POW(Kp8,2))'