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
12 # of gate 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
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 out-diffusion
56 set NSRF
[expr $NSUB+$VTPEAK]
57 if {$NMOS && $VTN} { set NSRF
[expr abs
($NSUB-$VTPEAK)]}
58 if {$PMOS && $VTP} { set NSRF
[expr abs
($NSUB-$VTPEAK)]}
61 set TMP
[expr $VTPEAK*exp
(- pow
($SDJUNC/$VTCHAR,2))]
62 if {$NMOS && $VTP} { set NSDJ
[expr $NSUB+$TMP]}
63 if {$PMOS && $VTN} { set NSDJ
[expr $NSUB+$TMP]}
64 set SDYC
[expr $SDJUNC/sqrt
(log
($SDPEAK/$NSDJ))]
65 if {$LDT} {set NLDJ
[expr $NSUB]}
66 if {$LDT} {set TMP
[expr $VTPEAK*exp
(- pow
($LDDJUNC/$VTCHAR,2))]}
67 if {$LDT && $NMOS && $VTP} {set NLDJ
[expr $NSUB+$TMP]}
68 if {$LDT && $PMOS && $VTN} {set NLDJ
[expr $NSUB+$TMP]}
69 if {$LDT} {set LDYC
[expr $LDDJUNC/sqrt
(log
($LDDPEAK/$NLDJ))]}
71 set FileID
[open $FileName w
]
72 puts "Write GSS input statements to $FileName"
74 #-----------------------
76 #-----------------------
77 puts $FileID "MESH Type=GSS ModelFile=$TRANTYPE.cgns Triangle=pzAY"
78 puts $FileID "XMESH WIDTH=$LSCONT N.SPACES=[expr int($LSCONT/0.1)]"
79 puts $FileID "XMESH WIDTH=$LSOURCE-$LSCONT N.SPACES=[expr int(($LSOURCE-$LSCONT)/0.1)]"
80 puts $FileID "XMESH WIDTH=$LGATE/2 N.SPACES=[expr int($LGATE/0.2)]"
81 puts $FileID "XMESH WIDTH=$LGATE/2 N.SPACES=[expr int($LGATE/0.2)]"
82 puts $FileID "XMESH WIDTH=$LDRAIN-$LDCONT N.SPACES=[expr int(($LDRAIN-$LDCONT)/0.1)]"
83 puts $FileID "XMESH WIDTH=$LDCONT N.SPACES=[expr int($LDCONT/0.1)]"
85 puts $FileID "YMESH Y.TOP=0.1+$TOX Y.BOTTOM=$TOX N.SPACES=1"
86 puts $FileID "YMESH Y.BOTTOM=0.0 N.SPACES=1"
87 puts $FileID "YMESH DEPTH=$SDJUNC H1=$SDJUNC/8 H2=$SDJUNC/4"
88 puts $FileID "YMESH DEPTH=1-$SDJUNC H1=$SDJUNC/4 H2=0.2"
89 puts $FileID "YMESH Y.BOTTOM=-$SUBDEP H1=0.2 RATIO=1.2"
90 puts $FileID "YMESH Y.BOTTOM=-$SUBDEP-0.1 N.SPACES=1"
92 puts $FileID "ELIMINATE Direction=COLUMNS Y.TOP=-1.5"
94 #-----------------------
96 #-----------------------
97 puts $FileID "#---------------------------------------------------"
98 puts $FileID "REGION Label=Silicon Material=Si"
99 puts $FileID "REGION Label=Oxide Material=Ox IY.MAX=2"
101 #-----------------------
103 #-----------------------
104 puts $FileID "REGION Label=Drain IY.MAX=2 X.MIN=$LMAX-$LDCONT Material=Elec"
105 puts $FileID "REGION Label=Gate IY.MAX=1 X.MIN=$LSOURCE X.MAX=$LSOURCE+$LGATE Material=Elec"
106 puts $FileID "REGION Label=Source IY.MAX=2 X.MAX=$LSCONT Material=Elec"
107 puts $FileID "REGION Label=Substrate Y.MAX=-$SUBDEP+0.0001 Material=Elec"
109 #-----------------------
111 #-----------------------
112 if {$VTTYPE == "P"} {
119 set SUBTYP
"Acceptor"
127 #-----------------------
129 #-----------------------
130 puts $FileID "PROFILE Ion=$SUBTYP N.PEAK=$NSUB Type=Uniform X.MIN=0.0 X.MAX=$LMAX Y.TOP=0.0 Y.BOTTOM=-$SUBDEP"
132 puts $FileID "PROFILE Type=Gauss Ion=$VTTYP N.PEAK=$VTPEAK Y.CHAR=$VTCHAR X.MIN=0.0 X.MAX=$LMAX"
135 puts $FileID "PROFILE Type=Gauss Ion=$SDTYP N.PEAK=$LDDPEAK Y.CHAR=$LDYC X.CHAR=[expr $LATD*$LDYC] \
136 X.MIN=0.0 X.MAX=$LSOURCE"
137 puts $FileID "PROFILE Type=Gauss Ion=$SDTYP N.PEAK=$LDDPEAK Y.CHAR=$LDYC X.CHAR=[expr $LATD*$LDYC] \
138 X.MIN=[expr $LMAX-$LDRAIN] X.MAX=[expr $LMAX-$LDRAIN+$LDRAIN]"
141 puts $FileID "PROFILE Type=Gauss Ion=$SDTYP N.PEAK=$SDPEAK Y.CHAR=$SDYC X.CHAR=[expr $LATD*$SDYC] \
142 X.MIN=0.0 X.MAX=[expr $LSOURCE-$LSPACER]"
143 puts $FileID "PROFILE Type=Gauss Ion=$SDTYP N.PEAK=$SDPEAK Y.CHAR=$SDYC X.CHAR=[expr $LATD*$SDYC] \
144 X.MIN=[expr $LMAX-$LDRAIN+$LSPACER] X.MAX=[expr $LMAX-$LDRAIN+$LSPACER+$LDRAIN-$LSPACER]"
147 #-----------------------
149 #-----------------------
151 puts $FileID "REFINE Variable=Doping Measure=SignedLog Dispersion=3 Triangle=praz"
156 #-----------------------
158 #-----------------------
159 puts $FileID "#---------------------------------------------------"
160 puts $FileID "PLOT Variable=DeviceMesh"
162 #-----------------------
163 # Boundary Conditions
164 #-----------------------
165 # WF = Work Function (V)
166 if {$GATE == "PPoly"} {
168 } elseif
{$GATE == "NPoly"} {
170 } elseif
{$GATE == "Al"} {
174 puts $FileID "#---------------------------------------------------"
175 puts $FileID "BOUNDARY Type = InsulatorInterface ID = IF_Oxide_to_Silicon QF=0"
176 puts $FileID "CONTACT Type = GateContact ID = Gate WorkFunction=$WF"
177 puts $FileID "CONTACT Type = OhmicContact ID = Substrate"
178 puts $FileID "CONTACT Type = OhmicContact ID = Source"
179 puts $FileID "CONTACT Type = OhmicContact ID = Drain"
181 #-----------------------
183 #-----------------------
184 puts $FileID "#---------------------------------------------------"
185 puts $FileID "PLOT Variable=DeviceMesh"
187 #-----------------------
188 # Solve Equilibrium State
189 #-----------------------
190 puts $FileID "METHOD Type = DDML1 Scheme = Newton NS=Basic LS=GMRES"
191 puts $FileID "SOLVE Type = TRANSIENT TStart = 0 TStep=1e-11 TStop = 3e-10"
192 puts $FileID "SOLVE Type = EQUILIBRIUM"
193 puts $FileID "PLOT Variable=Na Resolution=RES.High AzAngle=120 ElAngle=60"
194 puts $FileID "PLOT Variable=Nd Resolution=RES.High AzAngle=120 ElAngle=60"
195 puts $FileID "PLOT Variable=Potential Resolution=RES.High AzAngle=240 ElAngle=20"
196 puts $FileID "PLOT Variable=ElecDensity Resolution=RES.High AzAngle=240 ElAngle=20"
197 puts $FileID "PLOT Variable=HoleDensity Resolution=RES.High AzAngle=240 ElAngle=20"
198 puts $FileID "EXPORT CoreFile = $TRANTYPE.init.cgns"