From 3a87cb018157ddee296d088abe778b013e0dc444 Mon Sep 17 00:00:00 2001 From: Lukas Chrostowski Date: Mon, 20 Nov 2023 01:40:36 -0800 Subject: [PATCH] dbu default --- klayout_dot_config/grain.xml | 2 +- klayout_dot_config/python/SiEPIC/__init__.py | 2 +- klayout_dot_config/python/SiEPIC/utils/__init__.py | 14 +++++++------- klayout_dot_config/python/SiEPIC/utils/layout.py | 4 ++-- klayout_dot_config/python/pyproject.toml | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/klayout_dot_config/grain.xml b/klayout_dot_config/grain.xml index 62ecaa4d..220b2184 100644 --- a/klayout_dot_config/grain.xml +++ b/klayout_dot_config/grain.xml @@ -1,7 +1,7 @@ siepic_tools - 0.5.2 + 0.5.3 0.27 SiEPIC Tools 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. diff --git a/klayout_dot_config/python/SiEPIC/__init__.py b/klayout_dot_config/python/SiEPIC/__init__.py index 9a4b5b9a..b5f5fc9c 100644 --- a/klayout_dot_config/python/SiEPIC/__init__.py +++ b/klayout_dot_config/python/SiEPIC/__init__.py @@ -2,7 +2,7 @@ SiEPIC-Tools package for KLayout ''' -__version__ = '0.5.2' +__version__ = '0.5.3' print("KLayout SiEPIC-Tools version %s" %__version__) diff --git a/klayout_dot_config/python/SiEPIC/utils/__init__.py b/klayout_dot_config/python/SiEPIC/utils/__init__.py index 78a8fb87..feeb3f3c 100644 --- a/klayout_dot_config/python/SiEPIC/utils/__init__.py +++ b/klayout_dot_config/python/SiEPIC/utils/__init__.py @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: @@ -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 @@ -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)''' diff --git a/klayout_dot_config/python/SiEPIC/utils/layout.py b/klayout_dot_config/python/SiEPIC/utils/layout.py index cb7fefeb..12f6e5d4 100644 --- a/klayout_dot_config/python/SiEPIC/utils/layout.py +++ b/klayout_dot_config/python/SiEPIC/utils/layout.py @@ -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: @@ -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 diff --git a/klayout_dot_config/python/pyproject.toml b/klayout_dot_config/python/pyproject.toml index b872f8d7..47624f03 100644 --- a/klayout_dot_config/python/pyproject.toml +++ b/klayout_dot_config/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "SiEPIC" -version = "0.5.2" +version = "0.5.3" authors = [ { name="Lukas Chrostowski", email="lukasc@ece.ubc.ca" }, ]