Skip to content

Commit

Permalink
remove Radius check in Verification
Browse files Browse the repository at this point in the history
Disabled for EBeam PDK, since we now have S-Bends, and the checker doesn't recognize them.
  • Loading branch information
lukasc-ubc committed Oct 9, 2024
1 parent 574bbd0 commit 055eb7f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 23 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.12</version>
<version>0.5.13</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.12'
__version__ = "0.5.13"

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

Expand Down
15 changes: 8 additions & 7 deletions klayout_dot_config/python/SiEPIC/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3347,15 +3347,16 @@ def instantiate_all_library_cells(topcell, terminator_cells = None, terminator_l
x,y,xmax=0,0,0
for lib in pya.Library().library_ids():
li = pya.Library().library_by_id(lib)
if not li.is_for_technology(ly.technology_name) or li.name() == 'Basic':
print(' - skipping: %s' % li.name())
if not li.is_for_technology(ly.technology_name) or li.name() == "Basic":
print(" - skipping library: %s" % li.name())
continue

# all the pcells
print('All PCells: %s' % li.layout().pcell_names())
print(" - Library: %s" % li.name())
print(" All PCells: %s" % li.layout().pcell_names())
for n in li.layout().pcell_names():
print(" - PCell: ", li.name(), n)
pcell = ly.create_cell(n,li.name(), {})
print(" - PCell: ", li.name(), n)
pcell = ly.create_cell(n, li.name(), {})
if pcell:
subcell = ly.create_cell('c_'+n)
t = pya.Trans(pya.Trans.R0, pcell.bbox().left, pcell.bbox().bottom)
Expand All @@ -3381,8 +3382,8 @@ def instantiate_all_library_cells(topcell, terminator_cells = None, terminator_l
for c in li.layout().each_top_cell():
# instantiate
if not li.layout().cell(c).is_pcell_variant():
print(" - Fixed cell: ", li.name(), li.layout().cell(c).name)
pcell = ly.create_cell(li.layout().cell(c).name,li.name(), {})
print(" - Fixed cell: ", li.name(), li.layout().cell(c).name)
pcell = ly.create_cell(li.layout().cell(c).name, li.name(), {})
if not pcell:
pcell = ly.create_cell(li.layout().cell(c).name,li.name())
if pcell:
Expand Down
46 changes: 33 additions & 13 deletions klayout_dot_config/python/SiEPIC/verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,18 @@ def layout_check(cell=None, verbose=False, GUI=False, timing=False, file_rdb = N
if verification:
if verbose:
print(verification)

# perform minimum-radius-check: True or False
try:
minimum_radius_check = eval(
verification["verification"]["minimum-radius-check"]
)
except:
minimum_radius_check = True
else:
minimum_radius_check = True

if verification:
# define device-only layers
try:
deviceonly_layers = eval(verification['verification']['shapes-inside-components']['deviceonly-layers'])
Expand Down Expand Up @@ -389,19 +401,27 @@ def layout_check(cell=None, verbose=False, GUI=False, timing=False, file_rdb = N
# it could be done perhaps as a parameter (points)
if c.basic_name == "Waveguide" and c.cell.is_pcell_variant():
pcell_params = c.cell.pcell_parameters_by_name()
Dpath = pcell_params['path']
if 'radius' in pcell_params:
radius = pcell_params['radius']
else:
radius = 5
if verbose:
print(" - Waveguide: cell: %s, %s" % (c.cell.name, radius))

# Radius check:
if not Dpath.radius_check(radius):
rdb_item = rdb.create_item(rdb_cell.rdb_id(), rdb_cat_id_wg_radius.rdb_id())
rdb_item.add_value(pya.RdbItemValue( "The minimum radius is set at %s microns for this waveguide." % (radius) ))
rdb_item.add_value(pya.RdbItemValue(Dpath))
Dpath = pcell_params["path"]
if minimum_radius_check:
if "radius" in pcell_params:
radius = pcell_params["radius"]
else:
radius = 5
if verbose:
print(" - Waveguide: cell: %s, %s" % (c.cell.name, radius))

# Radius check:
if not Dpath.radius_check(radius):
rdb_item = rdb.create_item(
rdb_cell.rdb_id(), rdb_cat_id_wg_radius.rdb_id()
)
rdb_item.add_value(
pya.RdbItemValue(
"The minimum radius is set at %s microns for this waveguide."
% (radius)
)
)
rdb_item.add_value(pya.RdbItemValue(Dpath))

# Check for waveguides with too few bend points

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.12"
version = "0.5.13"
authors = [
{ name="Lukas Chrostowski", email="[email protected]" },
]
Expand Down

0 comments on commit 055eb7f

Please sign in to comment.