BEOL/FEOL metal fill with recursive partitioning (C++)#2
Draft
sethupathib wants to merge 5 commits into
Draft
Conversation
- Minimal GDSII reader/writer, polygon rasterization - Windowed density via summed-area tables - Keep-out dilation + per-window density-driven fill placement - Recursive quadtree partitioning with lattice-aligned cuts + halo context, merged by concatenation (verified equivalent to a global fill) - Gradient-aware iterative DRC-driven fill (min/max/gradient/spacing/min-area) - OpenMP-parallel across partitions; compute isolated behind FillBackend for a future CUDA/GPU backend - Tools: make_dummy_gds, run_fill, render_layer; unit + e2e tests Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
- 3x3 SM tiles with SRAM macros (register file + shared memory) + logic - routing channels, clock/spine routes, and a sparse top-metal power grid - gives each layer a distinct density profile for realistic fill testing - add 'make gpu-demo' target; fills cleanly with 0 DRC violations Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
New C++17 project in
gpu_metal_fill/: a dependency-free dummy metal fill engine for FEOL base layers (OD,PO) and BEOL metals (M1..M14). It uses recursive quadtree partitioning (like commercial fill flows) so leaves can be filled independently/in parallel and then merged. It also ships a synthetic GPU-block GDS generator for realistic testing.GPU offload is intentionally deferred: the compute-heavy stages are isolated behind a
FillBackendinterface (CPU/OpenMP now, CUDA later).Pipeline (per layer)
minor too far below a denser neighbor (gradient), refill until converged.Recursive partitioning (correctness at boundaries)
lcm(density_window, fill_pitch)so windows and fill positions are identical globally vs per-partition.partition == global(merged result identical to a single-shot fill).Synthetic GPU block (
make_gpu_block)A structurally realistic (not real) GPU block: 3×3 SM tiles each with SRAM macros (register file + shared memory) and standard-cell logic, routing channels, clock/spine routes (M9/M10), and a sparse top-metal power grid (M11–M14). Each layer gets a distinct density profile.
Result on the generated block (180×180 µm, 15,885 polygons, 52 partitions/layer): 1.39M fill shapes, 0 DRC violations.
M1 (logic + SRAM macros) and M12 (power grid) — red = quadtree partition cores, navy = existing, orange = dummy fill (note keep-out halos around the power straps):
GPU block M1 before
GPU block M1 after
GPU block M12 power grid after
Full GPU-block report: gpu_fill_report.txt
Build / run
Notes
layermap.cppare illustrative, not a real PDK.To show artifacts inline, enable in settings.