Skip to content

Commit

Permalink
dbu default
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasc-ubc committed Nov 20, 2023
1 parent e0969da commit 3a87cb0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion klayout_dot_config/grain.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<salt-grain>
<name>siepic_tools</name>
<version>0.5.2</version>
<version>0.5.3</version>
<api-version>0.27</api-version>
<title>SiEPIC Tools</title>
<doc>Tools for designing Silicon Photonic Integrated Circuits, including waveguides, component simulations, functional verification, DRC verification, Functional verification, netlist extraction, circuit simulations. Layout can be implemented graphically or by programming in Python using the SiEPIC functions and KLayout Python API. Framework and examples for creating layouts using scripts. Includes a generic PDK (GSiP). Other PDKs are installed separately, and depend on SiEPIC-Tools.</doc>
Expand Down
2 changes: 1 addition & 1 deletion klayout_dot_config/python/SiEPIC/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SiEPIC-Tools package for KLayout
'''

__version__ = '0.5.2'
__version__ = '0.5.3'

print("KLayout SiEPIC-Tools version %s" %__version__)

Expand Down
14 changes: 7 additions & 7 deletions klayout_dot_config/python/SiEPIC/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ def angle_trunc(a, trunc):

from functools import lru_cache
@lru_cache(maxsize=None)
def points_per_circle(radius, dbu=None):
def points_per_circle(radius, dbu=0.001):
'''Calculate the recommended number of points in a circle, based on
http://stackoverflow.com/questions/11774038/how-to-render-a-circle-with-as-few-vertices-as-possible'''
# radius in microns
Expand All @@ -909,7 +909,7 @@ def points_per_circle(radius, dbu=None):

from functools import lru_cache
@lru_cache(maxsize=None)
def arc(r, theta_start, theta_stop, dbu=None):
def arc(r, theta_start, theta_stop, dbu=0.001):
'''function to draw an arc of waveguide
# radius: radius
# w: waveguide width
Expand All @@ -934,7 +934,7 @@ def arc(r, theta_start, theta_stop, dbu=None):

from functools import lru_cache
@lru_cache(maxsize=None)
def arc_xy(x, y, r, theta_start, theta_stop, DevRec=None, dbu=None):
def arc_xy(x, y, r, theta_start, theta_stop, DevRec=None, dbu=0.001):
'''function to draw an arc of waveguide
# radius: radius
# w: waveguide width
Expand Down Expand Up @@ -962,7 +962,7 @@ def arc_xy(x, y, r, theta_start, theta_stop, DevRec=None, dbu=None):

from functools import lru_cache
@lru_cache(maxsize=None)
def arc_wg(radius, w, theta_start, theta_stop, DevRec=None):
def arc_wg(radius, w, theta_start, theta_stop, DevRec=None, dbu=0.001):
'''function to draw an arc of waveguide
# radius: radius
# w: waveguide width
Expand All @@ -975,7 +975,7 @@ def arc_wg(radius, w, theta_start, theta_stop, DevRec=None):

# print("SiEPIC.utils arc_wg")
circle_fraction = abs(theta_stop - theta_start) / 360.0
npoints = int(points_per_circle(radius/1000) * circle_fraction)
npoints = int(points_per_circle(radius/1000, dbu=dbu) * circle_fraction)
if DevRec:
npoints = int(npoints / 3)
if npoints == 0:
Expand All @@ -994,7 +994,7 @@ def arc_wg(radius, w, theta_start, theta_stop, DevRec=None):

from functools import lru_cache
@lru_cache(maxsize=None)
def arc_wg_xy(x, y, r, w, theta_start, theta_stop, DevRec=None, dbu=None):
def arc_wg_xy(x, y, r, w, theta_start, theta_stop, DevRec=None, dbu=0.001):
'''function to draw an arc of waveguide
# x, y: location of the origin
# r: radius
Expand Down Expand Up @@ -1027,7 +1027,7 @@ def arc_wg_xy(x, y, r, w, theta_start, theta_stop, DevRec=None, dbu=None):

from functools import lru_cache
@lru_cache(maxsize=None)
def arc_bezier(radius, start, stop, bezier, DevRec=None, dbu=None):
def arc_bezier(radius, start, stop, bezier, DevRec=None, dbu=0.001):
'''Create a bezier curve. While there are parameters for start and stop in
degrees, this is currently only implemented for 90 degree bends
Radius in Database units (dbu)'''
Expand Down
4 changes: 2 additions & 2 deletions klayout_dot_config/python/SiEPIC/utils/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ def layout_waveguide_sbend_bezier(cell, layer, trans, w=0.5, wo=None, h=2.0, len
return poly_t


def layout_waveguide_sbend(cell, layer, trans, w=500, r=25000, h=2000, length=15000, insert=True):
def layout_waveguide_sbend(cell, layer, trans, w=500, r=25000, h=2000, length=15000, insert=True, dbu=0.001):
""" Lays out an s-bend
Args:
Expand Down Expand Up @@ -904,7 +904,7 @@ def layout_waveguide_sbend(cell, layer, trans, w=500, r=25000, h=2000, length=15

if (straight_l >= 0):
circle_fraction = abs(theta) / 360.0
npoints = int(points_per_circle(r*cell.layout().dbu) * circle_fraction)
npoints = int(points_per_circle(r*cell.layout().dbu, dbu=dbu) * circle_fraction)
if npoints == 0:
npoints = 1
da = 2 * pi / npoints * circle_fraction # increment, in radians
Expand Down
2 changes: 1 addition & 1 deletion klayout_dot_config/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "SiEPIC"
version = "0.5.2"
version = "0.5.3"
authors = [
{ name="Lukas Chrostowski", email="[email protected]" },
]
Expand Down

0 comments on commit 3a87cb0

Please sign in to comment.