Repository navigation
import_gdsii: Add cut_by and wrap_around to the layer stack - #57
Merged
Merged
Conversation
jeffhsu3
force-pushed
the
upstream/layer-cut-wrap
branch
2 times, most recently
from
September 3, 2026 17:37
9a0a708 to
b5be55d
Compare
Contributor
|
@jeffhsu3 - please remove |
Contributor
Author
|
Thanks sorry! |
dnltz
requested changes
Sep 25, 2026
jeffhsu3
force-pushed
the
upstream/layer-cut-wrap
branch
from
September 25, 2026 18:34
6b98a2e to
72517f9
Compare
dnltz
requested changes
Sep 28, 2026
dnltz
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Can you please delete the Claude-Session line from your commit? It's not visible to anyone except you and shouldn't be committed.
Some layers are not a flat slab of their own polygons. A gate cut removes part of a gate, and a FinFET gate does not sit on top of its fins but wraps down around them, so a plain extrusion leaves the fins sticking through it. Two optional layer-stack fields cover both: * cut_by lists layers subtracted from this layer before it is extruded. * wrap_around names a reference layer. The layer still caps the reference over its own z range, and a second slab carries the walls down beside the reference to z_extend below it, giving the Omega cross-section. Building the layer as a list of slabs is what makes wrap_around cheap: _build_mesh now welds several z ranges into one mesh and _slab_geometry holds what used to be its body, so the walls reuse the same hole triangulation and boundary walls as the cap. Both fields work for any PDK, including a custom config. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: jeffhsu3 <jeffhsu3@gmail.com>
Signed-off-by: jeffhsu3 <jeffhsu3@gmail.com>
Signed-off-by: jeffhsu3 <jeffhsu3@gmail.com>
jeffhsu3
force-pushed
the
upstream/layer-cut-wrap
branch
from
September 28, 2026 22:13
72517f9 to
637877f
Compare
Contributor
|
@jeffhsu3 thank you! |
dnltz
approved these changes
Sep 29, 2026
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.

Adds two optional layer-stack fields. Both are motivated by transistor layers, but neither is specific to a PDK.
cut_byA list of layers subtracted from this layer before it is extruded. The layer is built from
region - cut, so the removed area is genuinely absent from the mesh rather than covered up by something drawn on top of it.wrap_aroundNames a reference layer that this layer wraps down around instead of being extruded flat. The layer still caps the reference over its own z range, and a second slab carries the walls down beside the reference to
z_extendbelow it:That is what makes a FinFET gate read correctly. Without it the gate floats above the fins with them poking up through it.
You mentioned that transistor layers currently carry a very small offset to avoid render artifacts —
ihp-sg13g2.yamlhasActivatz: -0.3995andGatPolyatz: -0.399, half a nanometre apart.wrap_aroundis meant to be a version of that for the gate/reference case, since the two layers then no longer share a z range at all. I have not touched any existing config here; if it is useful I can look at whether any of them could drop their offset. This is one possible way to implement the fin/gates for ASAP7.Implementation
_build_meshnow takes a list of z-slabs and welds them into a single mesh, and_slab_geometryholds what used to be its body. That is what keepswrap_aroundcheap: the walls reuse the same hole triangulation and boundary-edge walls as the cap, fromimport_gdsii: Build the extruded layers with numpy. A layer with neither field is one slab and follows exactly the path it did before.Testing
I exercised both fields on sky130 through a custom config rather than only on ASAP7 —
polywrappingdiffand cut bylicon. The wrap produces the expected three z levels, a layer with neither field still produces two, and nopolyvertex lands inside aliconshape. Meshes come out with no degenerate faces and no loose vertices.toxpasses. Need to double check gate cut on ASAP7 though as its still listed in the layer window.🤖 Generated with Claude Code