Skip to content

Commit

Permalink
Homogenous protection around TSVs
Browse files Browse the repository at this point in the history
  • Loading branch information
alelandra committed Oct 9, 2023
1 parent 5eed17a commit 8b62e04
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions klayout_package/python/kqcircuits/elements/tsvs/tsv_ellipse.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
# for individuals (meetiqm.com/developers/clas/individual) and organizations (meetiqm.com/developers/clas/organization).

import math

import numpy

from kqcircuits.elements.tsvs.tsv import Tsv
from kqcircuits.pya_resolver import pya
from kqcircuits.util.parameters import Param, pdt
from kqcircuits.elements.tsvs.tsv import Tsv


class TsvEllipse(Tsv):
Expand All @@ -42,26 +44,21 @@ def create_tsv_connector(self):
# shorthand
r = self.tsv_diameter / 2
w = self.tsv_elliptical_width / 2
m = self.margin
n = self.n

# parametric representation is taken from https://en.wikipedia.org/wiki/Superellipse
p1 = 6
p2 = 2
# Protection layer
tsv_pts_avoidance = [pya.DPoint(
numpy.abs(math.cos(a)) ** (2 / p1) * (w + m) * numpy.sign(math.cos(a)),
numpy.abs(math.sin(a)) ** (2 / p2) * (r + m) * numpy.sign(math.sin(a))) for a in
(x / n * 2 * math.pi for x in range(0, n + 1))]

tsv_pts = [
pya.DPoint(numpy.abs(math.cos(a)) ** (2 / p1) * w * numpy.sign(math.cos(a)),
numpy.abs(math.sin(a)) ** (2 / p2) * r * numpy.sign(math.sin(a))) for
a in (x / n * 2 * math.pi for x in range(0, n + 1))]

shape = pya.DPolygon(tsv_pts_avoidance)
# ground avoidance layer 1t1 face
self.cell.shapes(self.get_layer("ground_grid_avoidance")).insert(shape)
self.cell.shapes(self.get_layer("ground_grid_avoidance", 1)).insert(shape)
self.cell.shapes(self.get_layer("through_silicon_via")).insert(pya.DPolygon(tsv_pts))
self.cell.shapes(self.get_layer("through_silicon_via", 1)).insert(pya.DPolygon(tsv_pts))
tsv_region = pya.Region(pya.DPolygon(tsv_pts).to_itype(self.layout.dbu))

self.cell.shapes(self.get_layer("ground_grid_avoidance")).insert(
tsv_region.sized(self.margin / self.layout.dbu, self.margin / self.layout.dbu, 2))
self.cell.shapes(self.get_layer("ground_grid_avoidance", 1)).insert(
tsv_region.sized(self.margin / self.layout.dbu, self.margin / self.layout.dbu, 2))
self.cell.shapes(self.get_layer("through_silicon_via")).insert(tsv_region)
self.cell.shapes(self.get_layer("through_silicon_via", 1)).insert(tsv_region)

0 comments on commit 8b62e04

Please sign in to comment.