#Inverter 

go athena
#
set STI=0.5
set Lg=0.2
set Lsd=0.2
set Ldd=0.2
set Tpoly=-0.2
set Tox=-0.003
Set NMOS=$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg"

line x loc=0 spac=0.06
#width of STI N
line x loc=$"STI" spac=0.06
#width of NMOS Source
line x loc=$"STI"+$"Lsd" spac=0.06
#width of NMOS Source LDD
line x loc=$"STI"+$"Lsd"+$"Ldd" spac=0.02
#width of NMOS hChannel
line x loc=$"STI"+$"Lsd"+$"Ldd"+($"Lg"*0.5) spac=0.02
#width of NMOS Channel
line x loc=$"STI"+$"Lsd"+$"Ldd"+$"Lg" spac=0.02
#width of NMOS Drain LDD
line x loc=$"STI"+$"Lsd"+($"Ldd"*2)+$"Lg" spac=0.06
#width of NMOS Drain 
line x loc=$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" spac=0.06
#width of STI NP
line x loc=$"NMOS"+$"STI" spac=0.06
#width of PMOS Source
line x loc=$"NMOS"+$"STI"+$"Lsd" spac=0.06
#width of PMOS Source LDD
line x loc=$"NMOS"+$"STI"+$"Lsd"+$"Ldd" spac=0.02
#width of pMOS hChannel
line x loc=$"NMOS"+$"STI"+$"Lsd"+$"Ldd"+($"Lg"*0.5) spac=0.02
#width of pMOS Channel
line x loc=$"NMOS"+$"STI"+$"Lsd"+$"Ldd"+$"Lg" spac=0.02
#width of PMOS Drain LDD
line x loc=$"NMOS"+$"STI"+$"Lsd"+($"Ldd"*2)+$"Lg" spac=0.06
#width of PMOS Drain 
line x loc=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" spac=0.06
#width of STI P
line x loc=$"NMOS"+($"STI"*2)+($"Lsd"*2)+($"Ldd"*2)+$"Lg" spac=0.06


line y loc=0.0 spac=0.005
line y loc=0.25 spac=0.005
line y loc=0.5 spac=0.005
line y loc=1 spac=0.15

#Defining the Initial Substrate 
init silicon c.boron=1e14 orientation=100 two.d space.mult=2
save outf=01.str

# 
#diffus time=290 seconds temp=900 weto2 press=1 
diffuse temp=900 time=30 dryo2 %hcl=3
save outf=02.str
extract name="padoxxide" thickness material="oxide" mat.occno=1 x.val=0.05

# 
deposit nitride thick=0.4 divisions=10
save outf=03.str

# 
deposit photoresist thick=1 POSITIVE
save outf=04.str

# 
etch photoresist start x=0.00 y=-2.00 
etch              cont x=$"STI" y=-2.00 
etch              cont x=$"STI" y=1.00 
etch              done x=0.00 y=1.00 

etch photoresist start x=$"NMOS" y=-2.00 
etch              cont x=$"NMOS"+$"STI" y=-2.00 
etch              cont x=$"NMOS"+$"STI" y=1.00 
etch              done x=$"NMOS" y=1.00 

etch photoresist start x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+($"STI"*2)+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+($"STI"*2)+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=1.00 
etch              done x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=1.00 
save outf=05.str

# 
etch nitride dry thick=0.5 
save outf=06.str

# 
etch oxide dry thick=0.02 
save outf=07.str

#
#etch photoresist all 
strip photo
save outf=08.str

# 

rate.etch machine=trench_etch rie silicon iso=0.1 dir=0.9 u.m
rate.etch machine=trench_etch rie oxide iso=0.1 dir=0.9 u.m
etch machine=trench_etch time=0.42 minute dx.mult=0.5

save outf=09.str

# 
#rate.depo machine=TEOS oxide a.s cvd dep.rate=2.5 step.cov=2
#deposit machine=TEOS time=23 minutes divisions=10 
deposit oxide thick=0.55 div=10 
save outf=10.str

# 
rate.polish machine=CMP oxide u.h max.hard=3 min.hard=3 isotropical=0.5
polish machine=CMP time=9.55 minutes 
save outf=11.str
#
strip nitride 
etch oxide above p1.y=0.0058
save outf=12.str
#
deposit oxide thick=0.015 divisions=1 
save outf=13.str
#
deposit photoresist thick=1 POSITIVE
save outf=14.str
#
etch photoresist start x=$"NMOS"+$"STI" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=1.00 
etch              done x=$"NMOS"+$"STI" y=1.00 
save outf=15.str
#
# 
implant phosphor dose=8.0e12 energy=70 tilt=0 rotation=0 crystal 
save outf=16.str
#
strip photo
save outf=17.str
#
diffus temp=950 time=30 
save outf=18.str
#
deposit photoresist thick=1 POSITIVE
save outf=19.str
#
etch photoresist start x=$"STI" y=-2.00 
etch              cont x=$"NMOS" y=-2.00 
etch              cont x=$"NMOS" y=1.00 
etch              done x=$"STI" y=1.00 
save outf=20.str
# 
implant boron dose=8.0e12 energy=35 tilt=0 rotation=0 crystal 
save outf=21.str
#
strip photo
save outf=22.str
#
diffus temp=950 time=150 
save outf=23.str

#
etch oxide above p1.y=0.0058
save outf=24.str
#
deposit oxide thick=0.015 divisions=5 
save outf=25.str
#
deposit photoresist thick=1 POSITIVE
save outf=26.str
#
etch photoresist start x=$"NMOS"+$"STI" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=1.00 
etch              done x=$"NMOS"+$"STI" y=1.00 
save outf=27.str
#
implant phosphor dose=8e12 energy=10 tilt=0 rotation=0 crystal 
save outf=28.str
#
strip photo
save outf=30.str
#
diffuse temp=950 time=5 
save outf=29.str
#
deposit photoresist thick=1 POSITIVE
save outf=31.str
#
etch photoresist start x=$"STI" y=-2.00 
etch              cont x=$"NMOS" y=-2.00 
etch              cont x=$"NMOS" y=1.00 
etch              done x=$"STI" y=1.00 
save outf=32.str
#
implant boron dose=8e12 energy=10 tilt=0 rotation=0 crystal
save outf=33.str
#
strip photo
save outf=34.str
#
diffus temp=950 time=10 
save outf=35.str
#
etch oxide above p1.y=0.0058
save outf=36.str
#
# 
deposit oxide thick=0.003 divisions=5 

#diffuse temp=950 time=4 dry
#diffus time=4 temp=925 dryo2 press=1.00 hcl=3
save outf=37.str
extract name="gateox" thickness oxide mat.occno=1 x.val=$"STI"+$"Lsd"+$"Ldd"+($"Lg"*0.5)
#
deposit poly thick=0.4 div=8
save outf=38.str
#
deposit photoresist thick=1 POSITIVE
save outf=39.str
#
etch photoresist start x=0.00 y=-2.00 
etch              cont x=$"STI"+$"Lsd"+$"Ldd" y=-2.00 
etch              cont x=$"STI"+$"Lsd"+$"Ldd" y=1.00 
etch              done x=0.00 y=1.00 

etch photoresist start x=$"STI"+$"Lsd"+$"Ldd"+$"Lg"  y=-2.00 
etch              cont x=$"NMOS"+$"STI"+$"Lsd"+$"Ldd" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+$"Lsd"+$"Ldd" y=1.00 
etch              done x=$"STI"+$"Lsd"+$"Ldd"+$"Lg" y=1.00 

etch photoresist start x=$"NMOS"+$"STI"+$"Lsd"+$"Ldd"+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+($"STI"*2)+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+($"STI"*2)+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=1.00 
etch              done x=$"NMOS"+$"STI"+$"Lsd"+$"Ldd"+$"Lg" y=1.00 
save outf=40.str
#
etch poly        start x=0.00 y=-2.00 
etch              cont x=$"STI"+$"Lsd"+$"Ldd" y=-2.00 
etch              cont x=$"STI"+$"Lsd"+$"Ldd" y=1.00 
etch              done x=0.00 y=1.00 

etch poly        start x=$"STI"+$"Lsd"+$"Ldd"+$"Lg"  y=-2.00 
etch              cont x=$"NMOS"+$"STI"+$"Lsd"+$"Ldd" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+$"Lsd"+$"Ldd" y=1.00 
etch              done x=$"STI"+$"Lsd"+$"Ldd"+$"Lg" y=1.00 

etch poly        start x=$"NMOS"+$"STI"+$"Lsd"+$"Ldd"+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+($"STI"*2)+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+($"STI"*2)+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=1.00 
etch              done x=$"NMOS"+$"STI"+$"Lsd"+$"Ldd"+$"Lg" y=1.00 
save outf=41.str
#
strip photo
save outf=42.str
# 
deposit photoresist thick=1 POSITIVE
save outf=43.str
#
etch photoresist start x=$"STI" y=-2.00 
etch              cont x=$"NMOS" y=-2.00 
etch              cont x=$"NMOS" y=1.00 
etch              done x=$"STI" y=1.00 
save outf=44.str
#
implant phosphor dose=5.0e13 energy=10 tilt=0 rotation=0 crystal pearson 
save outf=45.str
#
strip photo
save outf=46.str
#
deposit photoresist thick=1 POSITIVE
save outf=47.str
#
etch photoresist start x=$"NMOS"+$"STI" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=1.00 
etch              done x=$"NMOS"+$"STI" y=1.00 
save outf=48.str
#
# 
implant boron dose=5.0e13 energy=3 tilt=0 rotation=0 crystal pearson 
save outf=49.str
#
strip photo
save outf=50.str
#
method fermi compress
diffuse time=3 temp=900 weto2 press=1.0
save outf=51.str
 
deposit nitride thick=0.18 divisions=10 
save outf=52.str
#
# 
etch nitride dry thick=0.2 
save outf=53.str

deposit photoresist thick=1 POSITIVE
save outf=54.str
#
etch photoresist start x=$"STI" y=-2.00 
etch              cont x=$"NMOS" y=-2.00 
etch              cont x=$"NMOS" y=1.00 
etch              done x=$"STI" y=1.00 
save outf=55.str
#
implant arsenic dose=5.0e15 energy=30 tilt=0 rotation=0 crystal pearson 
save outf=56.str
#
strip photo
save outf=57.str
#
deposit photoresist thick=1 POSITIVE
save outf=58.str
#
etch photoresist start x=$"NMOS"+$"STI" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=-2.00 
etch              cont x=$"NMOS"+$"STI"+($"Lsd"*2)+($"Ldd"*2)+$"Lg" y=1.00 
etch              done x=$"NMOS"+$"STI" y=1.00 
save outf=59.str
#
# 
implant boron dose=5.0e15 energy=5 tilt=0 rotation=0 crystal pearson 
save outf=60.str
#
strip photo
save outf=61.str
#
etch oxide thick=0.016 
save outf=62.str
#

