Benchmark Metrics¶
Metrics¶
openlithohub.benchmark.metrics.epe
¶
Edge Placement Error (EPE) computation.
compute_epe(predicted, target, pixel_size_nm=1.0)
¶
Compute Edge Placement Error between predicted and target contours.
Extracts edges from both binary masks via Sobel operators, then computes the minimum Euclidean distance from each predicted edge pixel to the nearest target edge pixel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
predicted
|
Tensor
|
Binary mask of predicted pattern (H, W), values in {0, 1}. |
required |
target
|
Tensor
|
Binary mask of target/reference pattern (H, W), values in {0, 1}. |
required |
pixel_size_nm
|
float
|
Physical size of each pixel in nanometers. |
1.0
|
Returns:
| Type | Description |
|---|---|
dict[str, float]
|
Dictionary with 'epe_mean_nm', 'epe_max_nm', 'epe_std_nm'. |
Source code in src/openlithohub/benchmark/metrics/epe.py
openlithohub.benchmark.metrics.pvband
¶
Process Variation Band (PV Band) computation.
compute_pvband(mask, nominal_dose=1.0, dose_variation=0.05, defocus_range_nm=20.0, pixel_size_nm=1.0)
¶
Compute Process Variation Band width for a given mask.
PV Band measures the area between resist contours at process window extremes. Uses a simplified Gaussian forward model to simulate aerial images at different dose/focus corners, then computes the band between the outer (union) and inner (intersection) resist envelopes.
Source code in src/openlithohub/benchmark/metrics/pvband.py
openlithohub.benchmark.metrics.shot_count
¶
Shot count estimation for mask manufacturing cost.
estimate_shot_count(mask, writer_type='mbmw', min_shot_size_nm=5.0, pixel_size_nm=1.0)
¶
Estimate the number of shots needed to write a mask.
Shot count is a direct proxy for mask writing time and manufacturing cost.
For multi-beam mask writers (MBMW), each foreground pixel corresponds to one beam exposure position. Shot count equals the number of foreground pixels scaled by the ratio of pixel area to beam grid area.
For variable shaped beam (VSB) writers, shots are rectangular exposures. The estimate uses the mask complexity (perimeter/area ratio) to approximate the number of rectangles needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mask
|
Tensor
|
Binary mask tensor (H, W). |
required |
writer_type
|
str
|
'vsb' (variable shaped beam) or 'mbmw' (multi-beam). |
'mbmw'
|
min_shot_size_nm
|
float
|
Minimum addressable shot dimension. |
5.0
|
pixel_size_nm
|
float
|
Physical pixel size in nanometers. |
1.0
|
Returns:
| Type | Description |
|---|---|
dict[str, int | float]
|
Dictionary with 'shot_count' and 'estimated_write_time_s'. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If writer_type is not 'mbmw' or 'vsb'. |
Source code in src/openlithohub/benchmark/metrics/shot_count.py
openlithohub.benchmark.metrics.stochastic
¶
EUV stochastic robustness evaluation.
compute_stochastic_robustness(mask, num_trials=100, dose_photons_per_nm2=30.0, pixel_size_nm=1.0, seed=None)
¶
Evaluate mask robustness against EUV photon shot noise.
Simulates stochastic resist exposure via Poisson photon noise to quantify probability of micro-bridging and line breaks.
Source code in src/openlithohub/benchmark/metrics/stochastic.py
Compliance¶
openlithohub.benchmark.compliance.mrc
¶
Mask Rule Check (MRC) — minimum width/spacing for mask manufacturing.
MRCResult
dataclass
¶
check_mrc(mask, min_width_nm=40.0, min_spacing_nm=40.0, pixel_size_nm=1.0)
¶
Check mask against minimum width and spacing rules.
MRC violations are a hard-fail metric — a mask that violates these rules cannot be manufactured regardless of optical performance.
Width check: perform morphological opening (erosion then dilation) with radius = floor(min_width / (2 * pixel_size)). Features that survive opening are wide enough. Foreground pixels that disappear after opening are width violation pixels.
Spacing check: same logic on the inverted mask — gaps between features that disappear under opening are too narrow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mask
|
Tensor
|
Binary mask tensor (H, W) or (B, C, H, W). |
required |
min_width_nm
|
float
|
Minimum allowed feature width. |
40.0
|
min_spacing_nm
|
float
|
Minimum allowed spacing between features. |
40.0
|
pixel_size_nm
|
float
|
Physical pixel size for unit conversion. |
1.0
|
Returns:
| Type | Description |
|---|---|
MRCResult
|
MRCResult with pass/fail status and violation details. |
Source code in src/openlithohub/benchmark/compliance/mrc.py
openlithohub.benchmark.compliance.drc
¶
Design Rule Check (DRC) — layout-level geometric constraint validation.
DRCRuleDeck
dataclass
¶
DRCResult
dataclass
¶
Result of a Design Rule Check.
Source code in src/openlithohub/benchmark/compliance/drc.py
check_drc(mask, rule_deck='default', pixel_size_nm=1.0)
¶
Run Design Rule Check on a mask layout.
Checks: minimum width, minimum spacing, minimum area, notch detection.
Source code in src/openlithohub/benchmark/compliance/drc.py
Report¶
openlithohub.benchmark.report
¶
Evaluation report generation.
generate_report(metrics, output_format='table')
¶
Generate a formatted evaluation report from computed metrics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
metrics
|
dict[str, Any]
|
Dictionary of metric names to values. |
required |
output_format
|
str
|
'table' (rich terminal), 'json', or 'markdown'. |
'table'
|
Returns:
| Type | Description |
|---|---|
str
|
Formatted report string. |