Package: pecebl
peceblSimulation for eBeam Lithography using Casino3, Python, CUDA and FFT.This package requires a Nvidia's CUDA GPUcapableA third party software is needed for generating the psf data (i.e.Casino3).peceblgives some basic pattern designer like :dot, line, rectangle, ring, circle, move, replace, append.peceblshould make it easy:to simulate a pattern exposure by using the FFT convolution (pecebl.fft_ops.fft_exposure).to find the corrected dose distribution by using FFT deconvolution (pecebl.fft_ops.fft_pec).InstallationThis package requiresAnacondadistribution for PythonInstall the CUDA toolkit and NVIDIA driverIf not done, download and install CUDA toolkit for your platformhereCreate a python's virtual environmentwith my yml file:The easiest way to create your virtual environment is using myenvironment.ymlfile:conda env create -f environment.yml -n youreblenvor if you want to create it by yourself:conda create -n youreblenv python=3.7 cudatoolkit pyqt pywin32install peceblActivate your virtual environment:activate youreblenvNow you can installpeceblin local mode by cd to your local pecebl directory then enter:python setup.py installor using pip :pip install peceblcheck installationcheck your installation with :pecebl --showif everything is fine you will see an exposure example's plot.Getting startedI) Building the PSF dataWe will get at the end of this section a 2D matrix data with the psf at the center. Here are the steps to do:Decide the hardware parameters you want to use: the beam energy, the beam current. And the physical properties of your sample.Get the interaction between the electron beam and your sample. You can do it by experiment or by monte-carlo simulation likeCasino3. We call it thepsf function.Map thepsf functionto a 2D matrix of size equals to the writefield you want to simulate. We call it thePSF data.I-1) Setup the electron beamerWe use aZeiss Supra40SEM with30 kVand the7.5 µmaperturefrom pecebl.sem import supra40 as beamermeb = beamer.Supra40(30)meb.change_aperture(7.5)meb.info()I-2) Import data from Casino3 simulationWe use the psf file fromCasino3simulation inexamples/datafolder:ZEP520_1e7_30kV_100mrad_1ptfrom pecebl.psf_import.Casino import Casino3 as cs3sim=cs3('ZEP520_1e7_30kV_100mrad_1pt')The number of electron paths simulated in Casino3 was1e7. The beam writer Raith Elphy Plus has6 MHzof electronic speed.i_yfor locating at the peak of the psf andi_zfor placing at the middle depth of the ebeam resist. In this example, I useCasino3in a grid size of(x=8000, y=0.6, z=310)innmdivided by(nx=8000, ny=6, nz=6)dots, hencei_y=3andi_z=3. Now we can get thepsf_fct:psf_fct=get_psf_fct(1e7, sim, 6, meb.beam_current, i_y=3, i_z=3)I-3) Building the PSF dataNPis the number of pixels,WFis the writefield(nm). We can calculate thepixel_sizethen map the two columns datapsf_fctto a 2D matrixz_psfof size(WF, WF)$(nm^2)$ (or(NP, NP)$(pixel^2)$):NP = 2048; WF = 5000pixel_size=np.float32(WF/NP)from pecebl.ebl_kernels import kernels as kerz_psf=ker.build_psf(psf_fct, NP, WF, pixel_size, pg.dot(0,0)[0])II) Pattern designerII-1) Create a patternGet photonic crystalexample1centered at(0,0), hole radius48 nm, pitch170 nmand stepsize4 nmfrom pecebl.designer import PatternDesigner as pgfinal_pattern=pg.example1(a=170, r=48, ss=4)from pecebl.utils import *plt.plot(final_pattern[:,0], final_pattern[:,1], 'o', ms=1)plt.axis('equal');plt.show()Building the dose distributionWe need to 'cut' data in blocks and grid for parallel calculation on GPU.from sympy.ntheory import primefactorsprimefactors(final_pattern.shape[0])So we cut thefinal_patterninto grid of blocks size:(11*61, 3*137)Now we can get dose distribution data:dose_disis the initial dose distribution for our pattern. Default dose factor is1at each dot of the pattern.dose_dis = ker.build_dose_distribution(final_pattern, NP, WF, pixel_size, blockdim=(671,1), griddim=(411,1))We can change the exposure dose for $30\mu C/cm^2$ (ss = 4,speed = 6) by multiply a dwelltime factor:dose_dis *= dtfactor(30,4,meb.beam_current,6)III) Exposure processIII-1) Padding the PSF dataBefore applying theFFTtransformations, we need to transform thez_psfdata (Victor Podlozhnyuk white paper)ppsf=np.empty((NP,NP),np.float64)ppsf[:NP//2-1,NP//2+1:]=z_psf[NP//2+1:,:NP//2-1]ppsf[:NP//2-1,:NP//2+1]=z_psf[NP//2+1:,NP//2-1:]ppsf[NP//2-1:,:NP//2+1]=z_psf[:NP//2+1,NP//2-1:]ppsf[NP//2-1:,NP//2+1:]=z_psf[:NP//2+1,:NP//2-1]del z_psfIII-2) ExposureWe have the PSF and the dose distribution, we can do a FFT convolution to expose our pattern:from pecebl.fft_ops import fft_ops as fftz = fft.fft_exposure(ppsf, dose_dis)print(np.min(z.real),np.min(z.imag),np.max(z.real),np.max(z.imag))plt.imshow(z.real,origin='lower', extent=[-WF/2, WF/2, -WF/2, WF/2],interpolation="nearest", cmap=plt.cm.jet)plt.show()IV) DevelopThe development process is simplified by a threshold operation. We use a threshold of3 eVfor ZEP520A ebeam resist.th_resist = 3z_dev = (z.real> th_resist) * z.realz_dev[z_dev > 0] = 1plot the development result:plt.imshow(z_dev,origin='lower', extent=[-WF/2, WF/2, -WF/2, WF/2])plt.show()PECIn this section, we want to find the dose distribution matrix and we know the target exposure. The way to get this target exposure will be discussed later.
We start from previous section I) to get thez_psfand also its paddedppsfI) Import target exposureThe example is in the filenametarget_ebl_for_pec.npyimport zipfilezfile = zipfile.ZipFile("target_ebl_for_pec.zip","r")with zfile as zip_ref: zip_ref.extractall()z_target=np.load(zfile.namelist()[-1])plt.imshow(z_target,origin='upper', extent=[-WF/2, WF/2, -WF/2, WF/2],interpolation="nearest", cmap=plt.cm.jet)plt.show()II) Get PEC by deconvolutionpec = fft.fft_pec(ppsf,z_target)plotting:plt.imshow(pec.real,origin='upper', extent=[-WF/2, WF/2, -WF/2, WF/2],interpolation="nearest", cmap=plt.cm.jet)plt.show()Thepecfound by FFT deconvolution may contain negative values, with a simple operation we can avoid it. Depend on your hardware constraint you could make some adjustment then implement the resulting dose distribution to your hardware to obtain the desired exposure.