Skip to content

Commit

Permalink
PCell export
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasc-ubc committed Dec 22, 2023
1 parent 1be6c6b commit 17e314f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 7 additions & 2 deletions submissions/KLayout Python/EBeam_LukasChrostowski_MZI.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

designer_name = 'LukasChrostowski'
top_cell_name = 'EBeam_%s_MZI' % designer_name
export_type = 'PCell' # static: for fabrication, PCell: include PCells in file

import pya
from pya import *
Expand Down Expand Up @@ -156,10 +157,14 @@
# Zoom out
zoom_out(cell)

# Save
# Export for fabrication, removing PCells
path = os.path.dirname(os.path.realpath(__file__))
filename = os.path.splitext(os.path.basename(__file__))[0]
file_out = export_layout(cell, path, filename, relative_path = '..', format='oas', screenshot=True)
if export_type == 'static':
file_out = export_layout(cell, path, filename, relative_path = '..', format='oas', screenshot=True)
else:
file_out = os.path.join(path,'..',filename+'.oas')
ly.write(file_out)

# Verify
file_lyrdb = os.path.join(path,filename+'.lyrdb')
Expand Down
10 changes: 7 additions & 3 deletions submissions/KLayout Python/EBeam_LukasChrostowski_rings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

designer_name = 'LukasChrostowski'
top_cell_name = 'EBeam_%s_rings' % designer_name
export_type = 'PCell' # static: for fabrication, PCell: include PCells in file

import pya
from pya import *
Expand Down Expand Up @@ -156,17 +157,20 @@ def dbl_bus_ring_res():
num_errors = layout_check(cell=cell, verbose=False, GUI=True)
print('Number of errors: %s' % num_errors)

# Save
# Export for fabrication, removing PCells
path = os.path.dirname(os.path.realpath(__file__))
filename = os.path.splitext(os.path.basename(__file__))[0]
file_out = export_layout(cell, path, filename, relative_path = '..', format='oas', screenshot=True)
if export_type == 'static':
file_out = export_layout(cell, path, filename, relative_path = '..', format='oas', screenshot=True)
else:
file_out = os.path.join(path,'..',filename+'.oas')
ly.write(file_out)

from SiEPIC.verification import layout_check
print('SiEPIC_EBeam_PDK: example_Ring_resonator_sweep.py - verification')
file_lyrdb = os.path.join(path,filename+'.lyrdb')
num_errors = layout_check(cell = cell, verbose=False, GUI=True, file_rdb=file_lyrdb)


# Display the layout in KLayout, using KLayout Package "klive", which needs to be installed in the KLayout Application
if Python_Env == 'Script':
from SiEPIC.utils import klive
Expand Down

0 comments on commit 17e314f

Please sign in to comment.