home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 December / simtel1292_SIMTEL_1292_Walnut_Creek.iso / msdos / spredsht / profile.arc / EXAMPLE2.PRO < prev    next >
Text File  |  1989-02-25  |  4KB  |  147 lines

  1. : Profile, The 1D Scientific Spreadsheet 
  2. : by Gertjan L. Ouwerling, Electrical Materials Lab, Delft University
  3. : -------------------------------------------------------------------
  4. : Example 1: Generation of an impurity profile by expression evaluation
  5. :
  6. : Execute this example by typing:  prof example1.pro <enter>
  7. : NOTE: some steps may be slow without a co-processor!
  8. :
  9. : This profile program generates a doping profile as generated
  10. : by making one or two implants in uniformly doped background
  11. : material. (In this case, two implants is chosen).
  12. : The plotted result is shown following this text.
  13. :
  14. : -------------------------------------------------------------------
  15.  
  16. pause
  17.  
  18. : Declare Profile data columns (types) and variableso
  19.  
  20. type x dope absdope logdope efield psi chandope vg $
  21. var int ngrid $
  22. var real nrp1 rp1 drp1 nrp2 rp2 drp2 dsub dgate dback
  23.          wtot wsub wgate wsmooth
  24.          ptype ntype imp1type imp2type gatetype subtype backtype
  25.          gatepres imp1pres imp2pres subpres
  26.          mu emax vmax eps
  27.          $
  28.  
  29. : p-type dope is negative of sign, n-type positive
  30. : a scaling factor mu gives the length in cm
  31. : eps is set to the epsilon of Silicon
  32.  
  33. ptype = -1
  34. ntype = 1
  35. mu = 1E-04
  36. eps = eps0*epssi
  37.  
  38. pause
  39.  
  40. : p-gate area if x < 0
  41. : p-substrate area if x > wsub
  42. : n-channel area in between
  43. : use pos() and neg() function to distinguish
  44.  
  45. define isgate = neg(x)
  46. define issub  = pos(x-wsub)
  47. define ischan = pos(pos(x)+neg(x-wsub)-1.5)
  48.  
  49. pause
  50.  
  51. : formulas describing dopant concentration due to
  52. : two implantations (fimp1 and fimp2), background
  53. : channel doping (fback), gate doping (fgate) and
  54. : substrate doping (fsub). A function fsmooth is
  55. : used to smooth the transition between channel and
  56. : substrate.
  57.  
  58. define fimp1 = imp1type*imp1pres*nrp1*exp(min(sqr(x-rp1)/(2*sqr(drp1))))
  59. define fimp2 = imp2type*imp2pres*nrp2*exp(min(sqr(x-rp2)/(2*sqr(drp2))))
  60. define fgate = gatetype*dgate
  61. define fsub  = subtype *dsub
  62. define fback = backtype*dback
  63. define fsmooth = 1 - exp(min(sqr((x-wsub)/wsmooth)))
  64.  
  65. pause 
  66.  
  67. :
  68. : ********** definition of variable values **********
  69. :
  70. : The values below decribe the exact properties of the
  71. : doping profile that will be generated
  72. :
  73.  
  74. ngrid = 100
  75.  
  76. imp1type=ntype
  77. imp2type=ntype
  78. backtype=ntype
  79. gatetype=ptype
  80. subtype =ptype
  81.  
  82. : Set parameters of the double implant by executing assignments
  83. : that are collected in a separate file (subroutine like)
  84.  
  85. pause
  86.  
  87. exec example2.par
  88.  
  89. pause
  90.  
  91. : Definition of the xgrid:
  92. : ngrid lines of data space are allocated and the
  93. : x coordinate is filled according to the variable values.
  94. : The default data type count [0..ndata-1] is used as a
  95. : source for grid generation
  96.  
  97. alloc ngrid
  98. x = (count/ndata)*wtot
  99. x = x - (gatepres*wgate)
  100.  
  101. : the dope is computed using the predefined formulas
  102.  
  103. : THIS MAY TAKE A WHILE!
  104.  
  105. dope = fsmooth*((fgate*isgate)+(ischan*(fback+fimp1+fimp2))+(issub*fsub))
  106.  
  107. : for plotting purposes, the absolute value and the log of the dope
  108. : are computed
  109.  
  110. absdope = abs(dope)
  111. logdope = log(absdope+1e12)
  112.  
  113. pause
  114.  
  115. : the channel region is selected by setting gate and substrate
  116. : dope to zero in the data type chandope. Double integration gives
  117. : the electric field strength and the gate voltage for a fully
  118. : depleted channel (according to Poisson's equation).
  119.  
  120. chandope = dope*pos(dope*backtype)
  121. inte chandope x efield
  122. efield = efield*(q/eps)
  123. emax=efield
  124. efield=efield-emax
  125. efield = efield*pos(dope*backtype)
  126. inte efield x psi
  127. vmax=psi
  128.  
  129. : Print vmax by evaluating the simple expression "vmax"
  130.  
  131. vmax
  132.  
  133. pause
  134.  
  135. : A first impression of the result is gotten by viewing on the terminal
  136. : in the channel (x>0.0) and the substrate (x=10 mu).
  137. : Give  <enter>  to leave the Profile picture!
  138.  
  139. xls = 0.01*mu
  140. xrs = 10*mu
  141. view x absdope | psi $
  142.  
  143. : Give  quit <enter>  to leave Profile!
  144. : ===================================== 
  145.