Penumbra UNet: FPGA-Accelerated Mask Optimization
A compressed U-Net neural network for on-chip FPGA acceleration of Inverse Lithography Technology (ILT) mask optimization, targeting the Xilinx VU47P (AWS F2).
Overview
Penumbra UNet compresses a full-size teacher network by 64Γ (7.8M β 122K parameters) to fit entirely in on-chip BRAM, enabling a fully on-chip dataflow that eliminates external DRAM access.
Architecture
Network Structure
U-Net encoder-decoder with extreme parameter compression:
Encoder:
- Conv 1β8 channels, 64Γ64 + MaxPool β 32Γ32
- Conv 8β16 channels, 32Γ32 + MaxPool β 16Γ16
- Conv 16β32 channels, 16Γ16 + MaxPool β 8Γ8
Bottleneck:
- Conv 32β64 channels, 8Γ8
Decoder:
- Upsample + skip concatenation + Conv 96β32 channels, 16Γ16
- Upsample + skip concatenation + Conv 48β16 channels, 32Γ32
- Upsample + skip concatenation + Conv 24β8 channels, 64Γ64
Output:
- Conv 1Γ1 + Sigmoid β 64Γ64
Compression summary:
| Metric | Full model | Penumbra UNet |
|---|---|---|
| Parameters | 7.8M | 122K |
| Input tile | 512Γ512 | 64Γ64 |
| Max channels | 512 | 64 |
Tiling & Reassembly
Input 512Γ512 masks are decomposed into 16Γ16 grid of 64Γ64 tiles (256 total):
- Overlap: 16-pixel reflection padding for boundary handling
- Usable core: 32Γ32 center pixels per tile
- Batch processing: 256 tiles β 4 sequential batches of 64
Reassembly uses only differentiable operations (slice, reshape, permute) to enable end-to-end gradient flow:
(256, 1, 64, 64) [all tiles]
β center-crop
(256, 1, 32, 32) [usable cores]
β reshape + permute
(1, 1, 512, 512) [full mask]
Training
Phase 1: Knowledge Distillation
- Epochs: 16
- Input: 64Γ64 crops
- Loss: Ξ±-blended (Ξ± decays 0.7β0)
L = Ξ±Β·MSE(student, teacher) + (1-Ξ±)Β·MSE(student, ground_truth) - Optimizer: Adam (lr=1e-3), cosine-annealing schedule
- Teacher: Frozen full-size NeuralILT model
Phase 2: Physics-Informed Fine-Tuning
- Epochs: 4
- Pipeline: Full tiled forward pass through differentiable lithography simulator
- Loss: Print fidelity + process variation
L = MSE(P_nom, target) + MSE(P_max, P_min) - Optimizer: Adam (lr=1e-4), StepLR (Ξ³=0.1 at epoch 2)
- Gradients: Flow through tiled reassembly to all network weights
Code Organization
hls4ml_penumbra/
βββ firmware/ # Generated HLS C++ project
β βββ myproject.cpp # Top-level module
β βββ myproject.h # Interface & config
β βββ weights/ # Quantized weights
β βββ ap_types/ # Xilinx AP types (ap_fixed, ap_int)
β βββ utils/ # HLS utilities
βββ myproject_prj/ # Vivado HLS project
β βββ solution1/
β βββ impl/ # Implementation artifacts
βββ logs/ # Build logs
βββ [HLS build outputs]
Author: Roberto TreviΓ±o Cervantes
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support