Skip to content

Commit

Permalink
enable connect_pins_with_waveguide to work for compound waveguides
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafacc committed Dec 1, 2022
1 parent b63b373 commit 405c49d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions klayout_dot_config/python/SiEPIC/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,14 @@ def connect_pins_with_waveguide(instanceA, pinA, instanceB, pinB, waveguide = No
waveguide = waveguides[0]
print('error: waveguide type not found in PDK waveguides')
raise Exception('error: waveguide type (%s) not found in PDK waveguides' % waveguide_type)
# check if the waveguide type is compound waveguide
if 'compound_waveguide' in waveguide:
waveguide = [w for w in waveguides if w['name']==waveguide['compound_waveguide']['singlemode']]
waveguide = waveguide[0]
if verbose:
print('waveguide type: %s' % waveguide )
# Find the 'Waveguide' layer in the waveguide.XML definition, and use that for the width paramater.

waveguide_component = [c for c in waveguide['component'] if c['layer']=='Waveguide']
if len(waveguide_component) > 0:
width_um = waveguide_component[0]['width']
Expand Down

0 comments on commit 405c49d

Please sign in to comment.