Skip to content

Commit

Permalink
Refactor produce_structures() a bit
Browse files Browse the repository at this point in the history
so that ground bump generation happens after it.
  • Loading branch information
iqmtestd committed Dec 8, 2023
1 parent f5cb470 commit 29fd563
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions klayout_package/python/kqcircuits/chips/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def merge_layout_layers(self):
def produce_structures(self):
"""Produces chip frame and possibly other structures before the ground grid.
This method is called in build(). Override this method to produce a different set of chip frames.
This method is called in post_build(). Override this method to produce a different set of chip frames.
"""

for i, face in enumerate(self.frames_enabled):
Expand Down Expand Up @@ -274,9 +274,6 @@ def produce_structures(self):
tsv_box = self.get_box(1).enlarged(pya.DVector(-self.edge_from_tsv, -self.edge_from_tsv))
self._produce_ground_tsvs(face_id=[3, 1], tsv_box=tsv_box)

if self.with_gnd_bumps:
self._produce_ground_bumps()

def get_box(self, face=0):
"""
Get the chip frame box for the specified face, correctly resolving defaults.
Expand Down Expand Up @@ -352,6 +349,8 @@ def _produce_ground_bumps(self):

def post_build(self):
self.produce_structures()
if self.with_gnd_bumps:
self._produce_ground_bumps()
if self.with_grid:
self.produce_ground_grid()
if self.merge_base_metal_gap:
Expand Down

0 comments on commit 29fd563

Please sign in to comment.