4 # Template File for MOS Structures
6 puts "Generate GSS input file..."
8 #COMMENT Derived Quantities and Definitions
9 # WD = depletion width under the drain (microns)
10 # SUBDEP = substrate depth (microns)
11 # LMID = distance to middle of gate
12 # from source edge (microns)
13 # LMAX = width of device (microns)
14 # EPS = roundoff error
15 set WD
[expr 3.6E7
*sqrt
((.8+abs
($VDBMAX))/$NSUB)]
16 set SUBDEP
[expr int
(2*($SDJUNC+$WD+1.5))/2]
17 set LMID
[expr $LSOURCE+$LGATE/2]
18 set LMAX
[expr $LSOURCE+$LGATE+$LDRAIN]
21 #COMMENT Only consider LDD implants if LDDPEAK >= NSUB.
23 # LDF ==> No LDD implant
24 if {$LDDPEAK > $NSUB} {
32 #COMMENT Transistor type.
33 if {$TRANTYPE == "PMOS"} {
41 #COMMENT Threshold implant impurity type.
51 #COMMENT More Derived Quantities
52 # SDDIF = source/drain out-diffusion distance (microns)
53 # LDDIF = lightly doped drain
54 # out-diffusion distance (microns)
56 set NSRF
[expr $NSUB+$VTPEAK]
57 if { $NMOS && $VTN } {
58 set NSRF
[expr abs
($NSUB-$VTPEAK)]
60 if { $PMOS && $VTP } {
61 set NSRF
[expr abs
($NSUB-$VTPEAK)]
65 set TMP
[expr $VTPEAK*exp
(- pow
($SDJUNC/$VTCHAR,2))]
66 if { $NMOS && $VTP } {
67 set NSDJ
[expr $NSUB+$TMP]
69 if { $PMOS && $VTN } {
70 set NSDJ
[expr $NSUB+$TMP]
72 set SDYC
[expr $SDJUNC/sqrt
(log
($SDPEAK/$NSDJ))]
73 set SDXC
[expr $SDYC*$LATD]
74 set SDDIF
[expr $SDXC*sqrt
(log
($SDPEAK/$NSRF))]
78 set TMP
[expr $VTPEAK*exp
(- pow
($LDDJUNC/$VTCHAR,2))]
79 if { $NMOS && $VTP } {
80 set NLDJ
[expr $NSUB+$TMP]
82 if { $PMOS && $VTN } {
83 set NLDJ
[expr $NSUB+$TMP]
85 set LDYC
[expr $LDDJUNC/sqrt
(log
($LDDPEAK/$NLDJ))]
86 set LDXC
[expr $LDYC*$LATD]
87 set LDDIF
[expr $LDXC*sqrt
(log
($LDDPEAK/$NSRF))]
94 #COMMENT More definitions
95 # LSSDIF = distance from source edge
96 # to edge of source diffusion
97 # LDDDIF = distance from drain edge
98 # to edge of drain diffusion
99 # SCE2JD = source contact edge
100 # to junction distance (microns)
101 # DCE2JD = drain contact edge
102 # to junction distance (microns)
103 # SCESP = grid spacing at source contact edge (microns)
104 # DCESP = grid spacing at drain contact edge (microns)
105 # LSLDIF = distance from source edge
106 # to edge of LDD diffusion
107 # LDLDIF = distance from drain edge
108 # to edge of LDD diffusion
110 set LSSDIF
[expr $LSOURCE-$LSPACER+$SDDIF]
111 set LDDDIF
[expr $LDRAIN-$LSPACER+$SDDIF]
112 set SCE2JD
[expr $LSSDIF-$LSCONT]
113 set DCE2JD
[expr $LDDDIF-$LDCONT]
114 set SCESP
[expr $SCE2JD-($SCE2JD-$JUNCSP)/$RATIO]
115 set DCESP
[expr $DCE2JD-($DCE2JD-$JUNCSP)/$RATIO]
116 set LSLDIF
[expr $LSOURCE+$LDDIF]
117 set LDLDIF
[expr $LDRAIN+$LDDIF]
121 #COMMENT Evaluate Statement Mask Logicals
122 # A ==> (SDDIF+JUNCSP) < LSPACER
123 # A1 ==> (SDDIF+JUNCSP) >= LSPACER
124 # B ==> A1 & (SDDIF < (LSPACER+JUNCSP))
125 # B1 ==> B & LDT & (2*JUNCSP < LDDIF)
126 # B2 ==> B & LDT & (2*JUNCSP >= LDDIF)
127 # C ==> A1 & (SDDIF >= (LSPACER+JUNCSP))
128 # C1 ==> C & LDT & ((SDDIF+2*JUNCSP) < (LDDIF+LSPACER))
129 # C2 ==> C & LDT & ((SDDIF+2*JUNCSP) >= (LDDIF+LSPACER))
130 # D ==> LDT & (SDDIF < (LSPACER+LDDIF))
131 # D1 ==> LDT & (SDDIF >= (LSPACER+LDDIF))
132 # E ==> D & (LDDJUNC < SDJUNC)
133 # E1 ==> D & (LDDJUNC >= SDJUNC)
154 set TMP
[expr int
(($SDDIF+$JUNCSP+$EPS)/($LSPACER+$EPS))]
156 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
165 set WD
[expr ($LSPACER-$SDDIF+$LDDIF)/2]
166 set SPC
[expr $WD-($WD-$JUNCSP)/$RATIO]
167 set SPT
[expr $LSSDIF+$WD]
168 set DPT
[expr $LDDDIF+$WD]
172 # G ==> A & LDT & ((SDDIF+WD+SPC) < LSPACER)
173 # G1 ==> A & LDT & ((SDDIF+WD+SPC) >= LSPACER)
174 # G2 ==> G1 & ((SDDIF+WD) < (LSPACER+SPC))
175 # G3 ==> G1 & ((SDDIF+WD) >= (LSPACER+SPC))
178 set TMP
[expr int
($SDDIF/($LSPACER+$JUNCSP))]
179 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
189 set TMP
[expr int
((2*$JUNCSP)/$LDDIF)]
190 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
200 set TMP
[expr int
(($SDDIF+2*$JUNCSP)/($LDDIF+$LSPACER))
201 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
211 set TMP
[expr int
($SDDIF/($LSPACER+$LDDIF))]
212 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
222 set TMP
[expr int
($LDDJUNC/$SDJUNC) ]
223 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
233 set TMP
[expr int
(($SDDIF+$WD+$SPC)/$LSPACER) ]
234 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
244 set TMP
[expr int
(($SDDIF+$WD)/($LSPACER+$SPC))]
245 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
254 set FileID
[open $FileName w
]
255 puts "Write GSS input statements to $FileName"
257 #-----------------------
259 #-----------------------
260 puts $FileID "MESH Type=GSS ModelFile=$TRANTYPE.cgns Triangle=pzAY"
262 #-----------------------
264 #-----------------------
265 puts $FileID "#---------------------------------------------------"
267 set TMP
[expr int
($SCESP/$LSCONT) ]
268 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
278 puts $FileID "XMESH X.MAX=$LSCONT H2=$WD RATIO=$RATIO"
281 puts $FileID "XMESH X.MAX=$LSSDIF H2=$JUNCSP RATIO=$RATIO"
285 puts $FileID "XMESH X.MAX=$SPT H1=$JUNCSP RATIO=$RATIO"
286 puts $FileID "XMESH X.MAX=$LSOURCE H1=$SPC RATIO=1/$RATIO"
287 puts $FileID "XMESH X.MAX=$LSLDIF H2=$JUNCSP RATIO=$RATIO"
291 puts $FileID "XMESH X.MAX=$LSOURCE H1=$JUNCSP RATIO=$RATIO"
292 puts $FileID "XMESH X.MAX=$LSLDIF H2=$JUNCSP RATIO=$RATIO"
296 puts $FileID "XMESH X.MAX=$LSOURCE H1=$JUNCSP RATIO=$RATIO"
297 puts $FileID "XMESH X.MAX=$SPT H2=$SPC RATIO=1/$RATIO"
298 puts $FileID "XMESH X.MAX=$LSLDIF H2=$JUNCSP RATIO=$RATIO"
302 puts $FileID "XMESH X.MAX=$LMID H1=$JUNCSP RATIO=$RATIO"
303 puts $FileID "XMESH X.MAX=$LMAX-$LDLDIF H2=$JUNCSP RATIO=$RATIO"
307 puts $FileID "XMESH X.MAX=$LMAX-$DPT H1=$JUNCSP RATIO=$RATIO"
308 puts $FileID "XMESH X.MAX=$LMAX-$LDRAIN H1=$SPC RATIO=1/$RATIO"
309 puts $FileID "XMESH X.MAX=$LMAX-$LDDDIF H2=$JUNCSP RATIO=$RATIO"
313 puts $FileID "XMESH X.MAX=$LMAX-$LDRAIN H1=$JUNCSP RATIO=$RATIO"
314 puts $FileID "XMESH X.MAX=$LMAX-$LDDDIF H2=$JUNCSP RATIO=$RATIO"
318 puts $FileID "XMESH X.MAX=$LMAX-$LDRAIN H1=$JUNCSP RATIO=$RATIO"
319 puts $FileID "XMESH X.MAX=$LMAX-$DPT H2=$SPC RATIO=1/$RATIO"
320 puts $FileID "XMESH X.MAX=$LMAX-$LDDDIF H2=$JUNCSP RATIO=$RATIO"
324 set TMP
[expr $LSPACER-$SDDIF]
325 set GCESP
[expr $TMP-($TMP-$JUNCSP)/$RATIO]
326 puts $FileID "XMESH X.MAX=$LSOURCE H1=$JUNCSP RATIO=$RATIO"
327 puts $FileID "XMESH X.MAX=$LMID H1=$GCESP RATIO=$RATIO"
328 puts $FileID "XMESH X.MAX=$LMAX-$LDRAIN H2=$GCESP RATIO=$RATIO"
329 puts $FileID "XMESH X.MAX=$LMAX-$LDDDIF H2=$JUNCSP RATIO=$RATIO"
332 if {$A} { puts $FileID "XMESH X.MAX=$LMAX-$LDCONT H1=$JUNCSP RATIO=$RATIO" }
334 if {$B} { puts $FileID "XMESH X.MAX=$LSOURCE H2=$JUNCSP RATIO=$RATIO"}
335 if {$B1} { puts $FileID "XMESH WIDTH=$LDDIF/2 H1=$JUNCSP RATIO=$RATIO"}
336 if {$B1} { puts $FileID "XMESH WIDTH=$LDDIF/2 H2=$JUNCSP RATIO=$RATIO"}
337 if {$B} { puts $FileID "XMESH X.MAX=$LMID H1=$JUNCSP RATIO=$RATIO"}
338 if {$B1} { puts $FileID "XMESH X.MAX=$LMAX-$LDLDIF H2=$JUNCSP RATIO=$RATIO"}
339 if {$B1} { puts $FileID "XMESH WIDTH=$LDDIF/2 H1=$JUNCSP RATIO=$RATIO"}
340 if {$B1} { puts $FileID "XMESH WIDTH=$LDDIF/2 H2=$JUNCSP RATIO=$RATIO"}
341 if {$B2} { puts $FileID "XMESH X.MAX=$LMAX-$LDRAIN H2=$JUNCSP RATIO=$RATIO"}
342 if {$B && $LDF} { puts $FileID "XMESH X.MAX=$LMAX-$LDRAIN H2=$JUNCSP RATIO=$RATIO"}
343 if {$B} { puts $FileID "XMESH X.MAX=$LMAX-$LDCONT H1=$JUNCSP RATIO=$RATIO"}
346 set TMP
[expr $SDDIF-$LSPACER]
347 set GCESP
[expr $TMP-($TMP-$JUNCSP)/$RATIO]
348 puts $FileID "XMESH X.MAX=$LSOURCE H1=$SCESP H2=$GCESP"
349 puts $FileID "XMESH X.MAX=$LSSDIF H2=$JUNCSP RATIO=$RATIO"
351 if {$C1} {puts $FileID "XMESH WIDTH=[expr ($LDDIF-$SDDIF+$LSPACER)/2] H1=$JUNCSP RATIO=$RATIO"}
352 if {$C1} {puts $FileID "XMESH WIDTH=[expr ($LDDIF-$SDDIF+$LSPACER)/2] H2=$JUNCSP RATIO=$RATIO"}
353 if {$C} {puts $FileID "XMESH X.MAX=$LMID H1=$JUNCSP RATIO=$RATIO"}
354 if {$C1} {puts $FileID "XMESH X.MAX=$LMAX-$LDLDIF H2=$JUNCSP RATIO=$RATIO"}
355 if {$C1} {puts $FileID "XMESH WIDTH=[expr ($LDDIF-$SDDIF+$LSPACER)/2] H1=$JUNCSP RATIO=$RATIO"}
356 if {$C1} {puts $FileID "XMESH WIDTH=[expr ($LDDIF-$SDDIF+$LSPACER)/2] H2=$JUNCSP RATIO=$RATIO"}
357 if {$C2} {puts $FileID "XMESH X.MAX=$LMAX-$LDDDIF H2=$JUNCSP RATIO=$RATIO"}
358 if {$C && $LDF} {puts $FileID "XMESH X.MAX=$LMAX-$LDDDIF H2=$JUNCSP RATIO=$RATIO"}
359 if {$C} {puts $FileID "XMESH X.MAX=$LMAX-$LDRAIN H1=$JUNCSP RATIO=$RATIO"}
360 if {$C} {puts $FileID "XMESH X.MAX=$LMAX-$LDCONT H1=$GCESP H2=$DCESP"}
363 set TMP
[expr int
($DCESP/$LDCONT)]
364 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
369 if {$X1} {set WD
[expr $LDCONT]}
371 puts $FileID "XMESH X.MAX=$LMAX H1=$WD RATIO=$RATIO"
373 #-----------------------
375 #-----------------------
376 #COMMENT JUNC1 = deepest vertical junction location
377 # JUNC2 = shallowest vertical junction location
379 puts $FileID "#---------------------------------------------------"
380 set JUNC1
[expr $SDJUNC]
381 set JUNC2
[expr $SDJUNC]
382 if {$E} {set JUNC2
[expr $LDDJUNC]}
383 if {$E1} {set JUNC1
[expr $LDDJUNC]}
384 if {$E1} {set JUNC2
[expr $SDJUNC]}
386 #COMMENT F ==> D & ((JUNC2+2*JUNCSP) < JUNC1)
387 #+ F1 ==> D & ((JUNC2+2*JUNCSP) >= JUNC1)
390 set TMP
[expr int
(($JUNC2+2*$JUNCSP)/$JUNC1)]
391 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
400 puts $FileID "YMESH Y.TOP=0.1+$TOX Y.BOTTOM=$TOX N.SPACES=1"
401 puts $FileID "YMESH Y.BOTTOM=0 N.SPACES=1"
403 if {$F} {puts $FileID "YMESH Y.BOTTOM=-$JUNC2 H1=$CHANSP H2=$JUNCSP #RATIO=$RATIO"}
404 if {$F} {puts $FileID "YMESH Y.BOTTOM=-$JUNC1 H1=$JUNCSP H2=$JUNCSP #RATIO=$RATIO"}
405 if {$F1} {puts $FileID "YMESH Y.BOTTOM=-$JUNC1 H1=$CHANSP H2=$JUNCSP #RATIO=$RATIO"}
406 if {$D1} {puts $FileID "YMESH Y.BOTTOM=-$JUNC1 H1=$CHANSP H2=$JUNCSP #RATIO=$RATIO"}
407 if {$LDF} {puts $FileID "YMESH Y.BOTTOM=-$JUNC1 H1=$CHANSP H2=$JUNCSP #RATIO=$RATIO"}
409 puts $FileID "YMESH Y.BOTTOM=-$SUBDEP H1=$JUNCSP RATIO=$RATIO"
410 puts $FileID "YMESH Y.BOTTOM=-$SUBDEP-0.1 N.SPACES=1"
412 #-----------------------
414 #-----------------------
415 puts $FileID "#---------------------------------------------------"
417 set WD
[expr (($RATIO+$EPS)*$JUNCSP-$CHANSP)/($RATIO+$EPS-1)]
418 set TMP
[expr int
(2*$WD/$JUNC2)]
419 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
426 if {$X1} {set WD
[expr $JUNC2/2]}
428 puts $FileID "ELIMINATE Direction=ROWS Y.TOP=-$EPS Y.BOTTOM=-$WD X.MIN=0 X.MAX=$LSOURCE-$EPS"
429 puts $FileID "ELIMINATE Direction=ROWS Y.TOP=-$EPS Y.BOTTOM=-$WD X.MIN=[expr $LMAX-$LDRAIN+$EPS] X.MAX=$LMAX"
431 set Z1
[expr 1.5*$JUNCSP]
432 set Z2
[expr $JUNCSP*(2*($RATIO+$EPS)-1)/($RATIO+$EPS-1)]
434 set XMN
[expr $LSSDIF+$Z2]
435 set XMX
[expr $LMAX-$LDDDIF-$Z2]
436 set YMN
[expr $SDJUNC-$Z1]
437 set YMX
[expr $SDJUNC+$Z1]
440 set XMN
[expr $LSLDIF+$Z2]
441 set XMX
[expr $LMAX-$LDLDIF-$Z2]
442 set YMN
[expr $LDDJUNC-$Z1]
443 set YMX
[expr $LDDJUNC+$Z1]
446 #COMMENT Make sure we can really do this eliminate.
447 set TMP
[expr int
($XMN/$LMID)]
448 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
454 if {$X1} { puts $FileID "ELIMINATE Direction=ROWS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN Y.BOTTOM=-$YMX" }
456 #-----------------------
458 #-----------------------
459 #COMMENT The program treats the B2 and C2 cases as if there were
460 # only one lateral junction, whether there is an LDD
461 # implant or not. Furthermore, the B2 case puts the
462 # finest lateral spacing at LSOURCE and LMAX-LDRAIN.
464 set DSSDIF
[expr $LSSDIF]
465 set DDDDIF
[expr $LDDDIF]
466 set DSLDIF
[expr $LSLDIF]
467 set DDLDIF
[expr $LDLDIF]
470 set DSSDIF
[expr $LSOURCE]
471 set DDDDIF
[expr $LDRAIN]
472 set DSLDIF
[expr $DSSDIF]
473 set DDLDIF
[expr $DDDDIF]
477 set DSLDIF
[expr $DSSDIF]
478 set DDLDIF
[expr $DDDDIF]
481 set Z3
[expr 2*$JUNCSP*(1+$RATIO)]
482 set Z4
[expr $Z2+$JUNCSP*(1+$RATIO+$RATIO*$RATIO)]
487 set TMP
[expr int
(($DSSDIF+$Z3)/($DSLDIF))]
488 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
498 set XMN
[expr $DSSDIF-$Z1]
499 set XMX
[expr $DSSDIF+$Z1]
500 set YMN
[expr $SDJUNC+$Z2]
502 set XMN
[expr $DSLDIF-$Z1]
503 set XMX
[expr $DSLDIF+$Z1]
504 set YMN
[expr $LDDJUNC+$Z2]
506 puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN"
508 set XMN
[expr $LMAX-$DDDDIF-$Z1]
509 set XMX
[expr $LMAX-$DDDDIF+$Z1]
511 set XMN
[expr $LMAX-$DDLDIF-$Z1]
512 set XMX
[expr $LMAX-$DDLDIF+$Z1]
514 puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN"
516 if {$D} { set YMN
[expr $LDDJUNC+$Z2]}
520 set TMP
[expr int
(($DSLDIF)/($DSSDIF+$Z4))]
521 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
528 if {$X1} { set YMN
[expr $SDJUNC+$JUNCSP*(1.5+$RATIO)] }
530 set XMN
[expr $DSLDIF-$Z1]
531 set XMX
[expr $DSLDIF+$Z1]
534 set XMN
[expr $DSSDIF-$Z1]
535 set XMX
[expr $DSSDIF+$Z1]
537 if {$D} { puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN"}
539 set XMN
[expr $LMAX-$DDLDIF-$Z1]
540 set XMX
[expr $LMAX-$DDLDIF+$Z1]
543 set XMN
[expr $LMAX-$DDDDIF-$Z1]
544 set XMX
[expr $LMAX-$DDDDIF+$Z1]
546 if {$D} { puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN "}
549 #-----------------------
551 set XMN
[expr $DSSDIF-$Z1]
552 set XMX
[expr $DSLDIF+$Z1]
554 if {$E} { set YMN
[expr $SDJUNC+$Z2]}
555 if {$E1} { set YMN
[expr $LDDJUNC+$Z2]}
557 puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN"
559 set XMN
[expr $LMAX-$DDLDIF-$Z1]
560 set XMX
[expr $LMAX-$DDDDIF+$Z1]
561 puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN"
564 #-----------------------
565 #COMMENT Second pass of eliminates.
567 if {$LDF} { set DSLDIF
[expr $DSSDIF]}
568 if {$LDF} { set DDLDIF
[expr $DDDDIF]}
569 if {$D1} { set DSLDIF
[expr $DSSDIF]}
570 if {$D1} { set DDLDIF
[expr $DDDDIF]}
572 set WD
[expr ($DSLDIF-$DSSDIF)/2]
574 set SPC
[expr $JUNCSP]
575 set TMP
[expr int
($WD/$JUNCSP)]
576 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
582 if {$X1} { set SPC
[expr $WD-($WD-$JUNCSP)/$RATIO] }
584 set WD
[expr (($RATIO+$EPS)*4*$SPC-$JUNCSP)/($RATIO+$EPS-1)]
585 set YMN
[expr $JUNC1+$WD]
587 #COMMENT Only do the eliminate if YMN < SUBDEP.
588 set TMP
[expr int
($YMN/$SUBDEP)]
589 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
595 if {$X1} { set XMX
[expr $DSLDIF+$WD] }
597 #COMMENT See if a single eliminate can be done or if we need to
598 #+ do separate eliminates for the left and right sides.
603 set TMP
[expr int
($XMX/$LMID)]
604 if { [expr int
((2+$TMP)/(1+$TMP))%2] == 1} {
613 #COMMENT Separate eliminates for the left and right.
615 set XMN
[expr $DSSDIF-$WD]
616 puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN"
617 set XMN
[expr $LMAX-$DDLDIF-$WD]
618 set XMX
[expr $LMAX-$DDDDIF+$WD]
619 puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN"
622 #COMMENT Single eliminate.
624 set XMN
[expr $DSSDIF-$WD-$EPS]
625 set XMX
[expr $LMAX-$DDDDIF+$WD+$EPS]
626 puts $FileID "ELIMINATE Direction=COLUMNS X.MIN=$XMN X.MAX=$XMX Y.TOP=-$YMN"
630 #-----------------------
632 #-----------------------
633 puts $FileID "#---------------------------------------------------"
634 puts $FileID "REGION Label=Silicon Material=Si"
635 puts $FileID "REGION Label=Oxide Material=Ox IY.MAX=2"
637 #-----------------------
639 #-----------------------
640 puts $FileID "REGION Label=Drain IY.MAX=2 X.MIN=$LMAX-$LDCONT Material=Elec"
641 puts $FileID "REGION Label=Gate IY.MAX=1 X.MIN=$LSOURCE X.MAX=$LMAX-$LDRAIN Material=Elec"
642 puts $FileID "REGION Label=Source IY.MAX=2 X.MAX=$LSCONT Material=Elec"
643 puts $FileID "REGION Label=Substrate Y.MAX=-$SUBDEP+0.0001 Material=Elec"
645 #-----------------------
647 #-----------------------
648 if {$VTTYPE == "P"} {
656 set SUBTYP
"Acceptor"
663 #-----------------------
665 #-----------------------
666 puts $FileID "#---------------------------------------------------"
667 puts $FileID "PROFILE Type=Uniform Ion=$SUBTYP N.PEAK=$NSUB X.MIN=0.0 X.MAX=$LMAX Y.TOP=0.0 Y.BOTTOM=-$SUBDEP"
670 puts $FileID "PROFILE Type=Gauss Ion=$VTTYP N.PEAK=$VTPEAK Y.CHAR=$VTCHAR X.MIN=0.0 X.MAX=$LMAX"
674 puts $FileID "PROFILE Type=Gauss Ion=$SDTYP N.PEAK=$LDDPEAK Y.CHAR=$LDYC X.CHAR=[expr $LATD*$LDYC] \
675 X.MIN=0.0 X.MAX=$LSOURCE"
676 puts $FileID "PROFILE Type=Gauss Ion=$SDTYP N.PEAK=$LDDPEAK Y.CHAR=$LDYC X.CHAR=[expr $LATD*$LDYC] \
677 X.MIN=[expr $LMAX-$LDRAIN] X.MAX=[expr $LMAX-$LDRAIN+$LDRAIN]"
680 puts $FileID "PROFILE Type=Gauss Ion=$SDTYP N.PEAK=$SDPEAK Y.CHAR=$SDYC X.CHAR=[expr $LATD*$SDYC] \
681 X.MIN=0.0 X.MAX=[expr $LSOURCE-$LSPACER]"
682 puts $FileID "PROFILE Type=Gauss Ion=$SDTYP N.PEAK=$SDPEAK Y.CHAR=$SDYC X.CHAR=[expr $LATD*$SDYC] \
683 X.MIN=[expr $LMAX-$LDRAIN+$LSPACER] X.MAX=[expr $LMAX-$LDRAIN+$LSPACER+$LDRAIN-$LSPACER]"
686 #-----------------------
687 # Boundary Conditions
688 #-----------------------
689 # WF = Work Function (V)
690 if {$GATE == "PPoly"} {
692 } elseif
{$GATE == "NPoly"} {
694 } elseif
{$GATE == "Al"} {
698 puts $FileID "#---------------------------------------------------"
699 puts $FileID "BOUNDARY Type = InsulatorInterface ID = IF_Oxide_to_Silicon QF=0"
700 puts $FileID "CONTACT Type = GateContact ID = Gate WorkFunction=$WF"
701 puts $FileID "CONTACT Type = OhmicContact ID = Substrate"
702 puts $FileID "CONTACT Type = OhmicContact ID = Source"
703 puts $FileID "CONTACT Type = OhmicContact ID = Drain"
705 #-----------------------
707 #-----------------------
708 puts $FileID "#---------------------------------------------------"
709 puts $FileID "PLOT Variable=DeviceMesh"
711 #-----------------------
712 # Solve Equilibrium State
713 #-----------------------
714 puts $FileID "METHOD Type = DDML1 Scheme = Newton NS=Basic LS=GMRES"
715 puts $FileID "SOLVE Type = TRANSIENT TStart = 0 TStep=1e-11 TStop = 3e-10"
716 puts $FileID "SOLVE Type = EQUILIBRIUM"
717 puts $FileID "EXPORT CoreFile = $TRANTYPE.init.cgns"
718 puts $FileID "PLOT Variable=Na Resolution=RES.High AzAngle=120 ElAngle=60"
719 puts $FileID "PLOT Variable=Nd Resolution=RES.High AzAngle=120 ElAngle=60"
720 puts $FileID "PLOT Variable=Potential Resolution=RES.High AzAngle=240 ElAngle=20"
721 puts $FileID "PLOT Variable=ElecDensity Resolution=RES.High AzAngle=240 ElAngle=20"
722 puts $FileID "PLOT Variable=HoleDensity Resolution=RES.High AzAngle=240 ElAngle=20"