Skip to content

Akbar-0/computational-lithography

Repository files navigation

Computational Lithography Toolkit

Educational implementation of optical proximity correction (OPC) and inverse lithography technology (ILT) for semiconductor manufacturing.

Features

  • Hopkins imaging model simulation
  • Rule-based OPC (bias, assist features)
  • Model-based OPC
  • Gradient-based ILT
  • Process window metrics

Installation

# Clone the repository
git clone https://github.com/Akbar-0/computational-lithography.git
cd computational-lithography

# Install in development mode
pip install -e .

# Or install with development dependencies
pip install -e ".[dev]"

Quick Start

Basic Lithography Simulation

import numpy as np
from comp_litho import HopkinsModel

# Create imaging model (ArF 193nm lithography)
model = HopkinsModel(
	wavelength=193.0,  # ArF excimer laser
	NA=1.35,           # Numerical aperture
	sigma=0.8,         # Partial coherence
	pixel_size=2.0,    # 2nm pixels
)

# Create a simple mask pattern
mask = np.zeros((256, 256))
mask[:, 100:150] = 1  # Vertical line

# Simulate aerial image
aerial_image = model.simulate(mask, defocus=0.0, dose=1.0)

# Simulate resist development
resist_pattern = model.simulate_resist(aerial_image, threshold=0.5)

# Measure critical dimension
cd = model.calculate_cd(resist_pattern, direction='x')
print(f"Critical dimension: {cd:.2f} nm")

Rule-Based OPC

from comp_litho import HopkinsModel, RuleBasedOPC

# Create imaging model and OPC engine
model = HopkinsModel(wavelength=193.0, NA=1.35, sigma=0.8)
opc = RuleBasedOPC(bias=5.0, sraf_enabled=True)

# Apply OPC corrections
target = create_your_pattern()
opc_mask = opc.correct(target, pixel_size=2.0)

# Simulate corrected mask
aerial = model.simulate(opc_mask)
resist = model.simulate_resist(aerial)

Model-Based OPC

from comp_litho import HopkinsModel, ModelBasedOPC

model = HopkinsModel(wavelength=193.0, NA=1.35)
opc = ModelBasedOPC(
	imaging_model=model,
	target_cd=100.0,
	tolerance=2.0,
	max_iterations=10
)

# Optimize mask to match target
target = create_your_pattern()
optimized_mask = opc.correct(target, pixel_size=2.0, verbose=True)

Inverse Lithography Technology (ILT)

from comp_litho import HopkinsModel, GradientILT

model = HopkinsModel(wavelength=193.0, NA=1.35)
ilt = GradientILT(
	imaging_model=model,
	learning_rate=0.05,
	regularization=0.001,
	max_iterations=100
)

# Find optimal mask for target pattern
target = create_your_pattern()
ilt_mask = ilt.optimize(target, verbose=True)

# Binarize for manufacturing
binary_mask = ilt.binarize_mask(ilt_mask)

Process Window Analysis

from comp_litho import HopkinsModel, ProcessWindow

model = HopkinsModel(wavelength=193.0, NA=1.35)
pw = ProcessWindow(
	imaging_model=model,
	dose_range=(0.9, 1.1),
	focus_range=(-100, 100),
	cd_tolerance=5.0
)

mask = create_your_mask()

# Calculate metrics
dof = pw.calculate_dof(mask, target_cd=100.0)
el = pw.calculate_exposure_latitude(mask, target_cd=100.0)
pw_area = pw.calculate_overlapping_process_window(mask, target_cd=100.0)

print(f"Depth of Focus: {dof:.2f} nm")
print(f"Exposure Latitude: {el:.2f}%")
print(f"Process Window: {pw_area*100:.1f}%")

Examples

Complete examples are available in the examples/ directory:

  • 01_basic_simulation.py - Basic Hopkins model simulation
  • 02_rule_based_opc.py - Rule-based OPC demonstration
  • 03_gradient_ilt.py - Gradient-based ILT optimization
  • 04_process_window.py - Process window analysis

Run an example:

cd examples
python 01_basic_simulation.py

Running Tests

# Install pytest if needed
pip install pytest

# Run all tests
pytest tests/ -v

# Run specific test file
pytest tests/test_imaging.py -v

Theory

Hopkins Imaging Model

The Hopkins model describes partially coherent imaging in lithography systems. The aerial image intensity is computed as:

$$I(\mathbf{r}) = \iint S(\mathbf{f}_1, \mathbf{f}_2) M(\mathbf{f}_1) M^{\ast}(\mathbf{f}_2) P(\mathbf{f}_1) P^{\ast}(\mathbf{f}_2) e^{i2\pi(\mathbf{f}_1 - \mathbf{f}_2) \cdot \mathbf{r}} d\mathbf{f}_1 d\mathbf{f}_2$$

where:

  • $S$ is the source distribution
  • $M$ is the mask spectrum
  • $P$ is the pupil function
  • $\mathbf{r}$ is the position on the wafer

Optical Proximity Correction (OPC)

OPC compensates for optical proximity effects by pre-distorting the mask pattern. Two approaches are implemented:

  1. Rule-based OPC: Uses geometric rules (bias, serifs, SRAFs)
  2. Model-based OPC: Iteratively adjusts mask using lithography simulation feedback

Inverse Lithography Technology (ILT)

ILT formulates mask design as an inverse problem, finding the optimal mask $m$ that minimizes:

$$L(m) = |I(m) - t|^2 + \lambda R(m)$$

where:

  • $I(m)$ is the simulated image from mask $m$
  • $t$ is the target pattern
  • $R(m)$ is a regularization term
  • $\lambda$ is the regularization weight

The optimization uses gradient descent to iteratively improve the mask.

Process Window

The process window quantifies robustness to process variations (dose and focus). Key metrics:

  • Depth of Focus (DOF): Range of focus yielding acceptable CD
  • Exposure Latitude (EL): Range of dose yielding acceptable CD
  • NILS: Normalized image log slope (edge sharpness metric)

Project Structure

computational-lithography/
├── src/comp_litho/         # Main package
│   ├── __init__.py         # Package initialization
│   ├── imaging.py          # Hopkins imaging model
│   ├── opc.py              # OPC implementations
│   ├── ilt.py              # ILT implementation
│   └── metrics.py          # Process window metrics
├── examples/               # Example scripts
├── tests/                  # Unit tests
├── requirements.txt        # Dependencies
├── setup.py               # Package setup
└── README.md              # This file

Requirements

  • Python >= 3.8
  • NumPy >= 1.24.0
  • SciPy >= 1.10.0
  • Matplotlib >= 3.7.0
  • scikit-image >= 0.20.0
  • gdspy >= 1.6.0 (for GDS layout handling)

Contributing

This is an educational project. Contributions, bug reports, and suggestions are welcome!

License

See LICENSE file for details.

References

  1. Wong, A. K. (2001). Resolution Enhancement Techniques in Optical Lithography. SPIE Press.
  2. Poonawala, A., & Milanfar, P. (2007). "Mask design for optical microlithography—An inverse imaging problem." IEEE Transactions on Image Processing.
  3. Mack, C. A. (2007). Fundamental Principles of Optical Lithography. Wiley.

Roadmap

Future enhancements:

  • Source-mask optimization (SMO)
  • Curvilinear ILT with manufacturing constraints
  • Advanced pupil filters (phase-shift masks, off-axis illumination)
  • 3D resist simulation
  • GDS file import/export
  • GPU acceleration

About

The project implements state-of-the-art computational lithography algorithms used in semiconductor manufacturing, complete with educational documentation and working examples!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages