Skip to content

Commit

Permalink
PCell spiral_paperclip update
Browse files Browse the repository at this point in the history
- PCell spiral_paperclip: added ports_opposite parameter, and updated unit testing
  • Loading branch information
lukasc-ubc committed Feb 12, 2024
1 parent aa46a3d commit 98b72d6
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 20 deletions.
2 changes: 1 addition & 1 deletion klayout/EBeam/pymacros/SiEPIC_EBeam_Library_ANT.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self):
print("Initializing '%s' Library." % library)

# Set the description
self.description = "v0.4.6, ANT components"
self.description = "v0.4.7, ANT components"

# Save the path, used for loading WAVEGUIDES.XML
import os
Expand Down
2 changes: 1 addition & 1 deletion klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def PCell_get_parameters ( pcell ):
"""

version = '0.4.6'
version = '0.4.7'

verbose=False

Expand Down
2 changes: 1 addition & 1 deletion klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self):
print("Initializing '%s' Library." % library)

# Set the description
self.description = "v0.4.6, Silicon Nitride"
self.description = "v0.4.7, Silicon Nitride"

# Save the path, used for loading WAVEGUIDES.XML
import os
Expand Down
2 changes: 1 addition & 1 deletion klayout/EBeam/pymacros/opics_ebeam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ def load_sparameters(

components_list = list(component_factory.keys())
__all__ = components_list
__version__ = "0.4.6"
__version__ = "0.4.7"

if __name__ == "__main__":
import SiEPIC.opics as op
Expand Down
44 changes: 30 additions & 14 deletions klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
- Pitch of the waveguides is determined by the DevRec layer
- When executed directly, the unit test instantiates all the waveguide types
by Lukas Chrostowski, 2023
PCell options:
- waveguide type
- ports_opposite = True: input on left, output on right
= False: both i/o on left
by Lukas Chrostowski, 2023-2024
'''


Expand All @@ -37,7 +41,7 @@ def __init__(self):
p = self.param("waveguide_type", self.TypeList, "Waveguide Type", default = self.waveguide_types[0]['name'])
for wa in self.waveguide_types:
p.add_choice(wa['name'],wa['name'])

self.param("ports_opposite", self.TypeBoolean, "Waveguide ports on opposite sides", default = False)
self.param("loops", self.TypeInt, "Number of loops", default = 2)
self.minlength = 2*float(self.waveguide_types[0]['radius'])
self.param("length", self.TypeDouble, "Inner length (min 2 x bend radius)", default = self.minlength)
Expand Down Expand Up @@ -155,8 +159,9 @@ def produce_impl(self):
points.append(DPoint(-length0-devrec*i,radius*2-offset+devrec*(i-1)+extra))
points.append(DPoint(-length0-devrec*i,-radius*2+offset-devrec*i-extra))
points.append(DPoint(length0+devrec*(i+1),-radius*2+offset-devrec*i-extra))
points.append(DPoint(length0+devrec*(i+1),radius*2-offset+devrec*(i+1)+extra))
points.append(DPoint(-length0-devrec*(i+1),radius*2-offset+devrec*(i+1)+extra))
if not ports_opposite:
points.append(DPoint(length0+devrec*(i+1),radius*2-offset+devrec*(i+1)+extra))
points.append(DPoint(-length0-devrec*(i+1),radius*2-offset+devrec*(i+1)+extra))
points.pop(0)
points.insert(0, DPoint(-length0-devrec*(i+1),-offset+radius*2+devrec*i+extra))

Expand All @@ -183,7 +188,10 @@ def produce_impl(self):

# Create the pins on the input & output waveguides
from SiEPIC.utils.layout import make_pin
make_pin(self.cell, "optA", [-length0-devrec*(i+1),radius*2-offset+devrec*(i+1)+extra], self.wg_width, LayerPinRecN, 180)
if ports_opposite:
make_pin(self.cell, "optA", [length0+devrec*(i+1),-radius*2+offset-devrec*i-extra], self.wg_width, LayerPinRecN, 0)
else:
make_pin(self.cell, "optA", [-length0-devrec*(i+1),radius*2-offset+devrec*(i+1)+extra], self.wg_width, LayerPinRecN, 180)
make_pin(self.cell, "optB", [-length0-devrec*(i+1),-offset+radius*2+devrec*i+extra], self.wg_width, LayerPinRecN, 180)


Expand Down Expand Up @@ -234,14 +242,22 @@ def __init__(self):
# Create spirals for all the types of waveguides
from SiEPIC.utils import load_Waveguides_by_Tech
waveguide_types = load_Waveguides_by_Tech(tech)
y = 0
for wg in waveguide_types:
pcell = ly.create_cell("spiral_paperclip", library, {
'waveguide_type':wg['name'],
'length':100,
'loops':1})
t = Trans(Trans.R0, 0, y - pcell.bbox().bottom)
inst = topcell.insert(CellInstArray(pcell.cell_index(), t))
y += pcell.bbox().height()+2000
xmax = 0
for ports_opposite in [True, False]:
for flatten in [True, False]:
y = 0
x = xmax
for wg in waveguide_types:
pcell = ly.create_cell("spiral_paperclip", library, {
'waveguide_type':wg['name'],
'length':100,
'loops':1,
'flatten':flatten,
'ports_opposite':ports_opposite})
t = Trans(Trans.R0, x, y - pcell.bbox().bottom)
inst = topcell.insert(CellInstArray(pcell.cell_index(), t))
y += pcell.bbox().height()+2000
xmax = max(xmax, x + inst.bbox().width())


zoom_out(topcell)
2 changes: 1 addition & 1 deletion klayout/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_ebeam_pdk</name>
<version>0.4.6</version>
<version>0.4.7</version>
<api-version>0.27</api-version>
<title>SiEPIC EBeam PDK</title>
<doc>A Process Design Kit for Silicon Photonics fabricated using Electron Beam Lithography (UW, ANT, SiEPICfab)</doc>
Expand Down
2 changes: 1 addition & 1 deletion klayout/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "siepic_ebeam_pdk"
version = "0.4.6"
version = "0.4.7"
authors = [
{ name="Lukas Chrostowski", email="lukasc@ece.ubc.ca" },
]
Expand Down

0 comments on commit 98b72d6

Please sign in to comment.