Skip to content

Commit

Permalink
Merge branch 'SiEPIC:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
felme1 authored Nov 5, 2024
2 parents 4d9b815 + efe8a1c commit 558d01c
Show file tree
Hide file tree
Showing 44 changed files with 70 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ The verification and merging is performed using GitHub actions. The repository i

## Latest Merge Layout File
<!-- start-link -->
https://github.com/SiEPIC/openEBL-2024-10-SiN/actions/runs/11646760825/artifacts/2137022679
https://github.com/SiEPIC/openEBL-2024-10-SiN/actions/runs/11660615989/artifacts/2139743493
<!-- end-link -->
Binary file modified framework/EBL_Framework_1cm_PCM_static.oas
Binary file not shown.
82 changes: 57 additions & 25 deletions merge/EBeam_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
cell_Gap_Width = 8e3
cell_Gap_Height = 8e3
chip_Width = 8650000
chip_Height1 = 8490000
chip_Height2 = 8780000
# chip_Height1 = 8490000
chip_Height2 = 8890000
chip_Height2 = 9000000
br_cutout_x = 7484000
br_cutout_y = 898000
br_cutout2_x = 7855000
Expand Down Expand Up @@ -115,12 +116,40 @@ def log(text):
# Load all the GDS/OAS files from the "submissions" folder:
path2 = os.path.abspath(os.path.join(path,"../submissions"))
_, _, files = next(os.walk(path2), (None, None, []))

# Start with the edge coupled FaML devices
files_in_alphabetical = []
for f in sorted(files):
if 'FaML' in f:
files_in.append(os.path.join(path2,f))
if '.oas' in f.lower() or '.gds' in f.lower():
if 'FaML' in f:
fpath = os.path.join(path2,f)
layout2 = pya.Layout()
layout2.read(fpath)
top_cells = layout2.top_cells()
top_cells.sort(key=lambda x: x.child_instances())
w = top_cells[-1].bbox().width()
files_in_alphabetical.append ([w,fpath])
# Then sort by cell width
for f in sorted(files_in_alphabetical, key = lambda x: x[0]):
files_in.append(os.path.join(path2,f[1]))

# Then all regular designs
files_in_alphabetical = []
for f in sorted(files):
if 'FaML' not in f:
files_in.append(os.path.join(path2,f))
if '.oas' in f.lower() or '.gds' in f.lower():
# print(f, path2)
if 'FaML' not in f:
fpath = os.path.join(path2,f)
layout2 = pya.Layout()
layout2.read(fpath)
top_cells = layout2.top_cells()
top_cells.sort(key=lambda x: x.child_instances())
w = top_cells[-1].bbox().width()
files_in_alphabetical.append ([w,fpath])
# Then sort the regular designs by cell width
for f in sorted(files_in_alphabetical, key = lambda x: x[0]):
files_in.append(os.path.join(path2,f[1]))


# Create course cells using the folder name under the top cell
cell_edXphot1x = layout.create_cell("edX")
Expand All @@ -144,7 +173,10 @@ def log(text):

# Origins for the layouts
x,y = 110e3,cell_Height+cell_Gap_Height
previous_top_FaML = None
previous_bottom_FaML = None

# Keep track of the width of the cells, for each column
max_cell_Width = 0

import subprocess
import pandas as pd
Expand Down Expand Up @@ -332,43 +364,42 @@ def sub_instances(instance,name):
f[1] *= inst.trans
found_instances.append(f) # .transform(inst.trans))
return found_instances

# found_faml_instances = sub_instances(layout2.top_cells()[0], name = 'ebeam_dream_FaML_SiN_1550_BB')
found_faml_instances = sub_instances(subcell2, name = 'ebeam_dream_FaML_SiN_1550_BB')
#for f in found_faml_instances:
# log(' - Found FaML instance: %s, %s' % (f.to_s(), f.cell.name))
found_faml_instances.sort(key=lambda x: -x[1].disp.y)
found_faml_instances.sort(key=lambda x: x[1].disp.y)
for f in found_faml_instances:
log(' - Found FaML instance (sorted): %s, %s' % (f[0].to_s(), f[0].cell.name))
top_FaML = found_faml_instances[0][1].disp.y

bottom_FaML = found_faml_instances[0][1].disp.y
else:
x_offset = 0

# Track the maximum width of the cells, for each column
max_cell_Width = max(max_cell_Width, subcell2.bbox().right + x_offset)

def next_position(x, y, cell_Gap_Height, cell_Gap_Width, chip_Height, cell_Height, cell_Width):
# Measure the height of the cell that was added, and move up
y += cell_Gap_Height
if y + cell_Height > chip_Height:
y = cell_Height + cell_Gap_Height
x += cell_Width + cell_Gap_Width
return x, y
cell_Width = 0
return x, y, cell_Width

interacting = True
while interacting:
r2 = pya.Region(pya.Box(x+x_offset,y, x+x_offset+bbox2.width(),y+bbox2.height()))
interacting = r2.interacting(r1)
if interacting:
# print(" - Overlapping Floorplan: %s" % r2.interacting(r1))
x,y = next_position(x, y, cell_Gap_Height, cell_Gap_Width, chip_Height2, cell_Height, cell_Width)
x,y, max_cell_Width = next_position(x, y, cell_Gap_Height, cell_Gap_Width, chip_Height2, cell_Height, max_cell_Width)

if course == 'FaML':
# Check and snap to 127 µm pitch
if previous_top_FaML:
FaML_delta = top_FaML+y - previous_top_FaML
if previous_bottom_FaML:
FaML_delta = bottom_FaML + y - previous_bottom_FaML
log(' - FaML count: %s' % (FaML_delta/127e3) )
if FaML_delta % 127e3 > 0:
# log(' - Adjancent designs do not have matching FaML pitch: %s error' % (FaML_delta) )
y_add = 127e3 - FaML_delta % 127e3
y_add = - FaML_delta % 127e3 # + 127e3
log(' - shifting design up by %s µm, to have matching FaML pitch.' % (y_add/1e3) )
y += y_add

Expand All @@ -378,11 +409,6 @@ def next_position(x, y, cell_Gap_Height, cell_Gap_Width, chip_Height, cell_Heigh
cell_course.insert(CellInstArray(subcell2.cell_index(), t))

log(' - Design placed at position: %s, %s' % (x,y) )

if course == 'FaML':
# record placement of FaML
previous_top_FaML = found_faml_instances[0][1].disp.y + y
log(' - top FaML position: %s' % (previous_top_FaML) )

# Measure the height of the cell that was added, and move up
#y += max (cell_Height, subcell.bbox().height()) + cell_Gap_Height
Expand All @@ -394,7 +420,8 @@ def next_position(x, y, cell_Gap_Height, cell_Gap_Width, chip_Height, cell_Heigh
# move right and bottom when we reach the top of the chip
if y + cell_Height > chip_Height2:
y = cell_Height + cell_Gap_Height
x += cell_Width + cell_Gap_Width
x += max_cell_Width + cell_Gap_Width
max_cell_Width = 0
'''
if y + cell_Height > chip_Height1 and x == 0:
y = cell_Height + cell_Gap_Height
Expand All @@ -414,6 +441,11 @@ def next_position(x, y, cell_Gap_Height, cell_Gap_Width, chip_Height, cell_Heigh
if x + cell_Width > br_cutout2_x and y < br_cutout2_y:
y = br_cutout2_y
'''

if course == 'FaML':
# record placement of FaML
previous_bottom_FaML = found_faml_instances[0][1].disp.y + y
log(' - bottom FaML position: %s' % (bottom_FaML) )
else:
log(" - WARNING: Top cell not merged (%s)" % cell.name)

Expand Down
Binary file added submissions/EBeam_FatemehKalantari_SiN.gds
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI1_1550_FaML.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI2_1550_FaML.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI3_1550_FaML_0.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI3_1550_FaML_1.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI3_1550_FaML_2.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI3_1550_FaML_3.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI3_1550_FaML_4.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI3_1550_FaML_5.oas
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI4_1550_FaML_0.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI4_1550_FaML_1.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI4_1550_FaML_2.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI_1310.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI_1550.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_MZI_loopback_1550_FaML.oas
Binary file not shown.
Binary file modified submissions/EBeam_LukasChrostowski_loopback_1550_FaML.oas
Binary file not shown.
Binary file added submissions/EBeam_Xin_FaML_ring_r50gap200.oas
Binary file not shown.
Binary file added submissions/EBeam_Xin_FaML_ring_r50gap300.oas
Binary file not shown.
Binary file added submissions/EBeam_Xin_FaML_ring_r50gap400.oas
Binary file not shown.
Binary file added submissions/EBeam_Xin_FaML_ring_r50gap500.oas
Binary file not shown.
Binary file added submissions/EBeam_Xin_rings_rsweepgapsweep150.oas
Binary file not shown.
Binary file added submissions/EBeam_Xin_rings_rsweepgapsweep350.oas
Binary file not shown.
Binary file added submissions/EBeam_Xin_rings_rsweepgapsweep550.oas
Binary file not shown.
Binary file added submissions/EBeam_amesh_kahloon.oas
Binary file not shown.
Binary file added submissions/EBeam_amesh_kahloon_1.oas
Binary file not shown.
Binary file added submissions/EBeam_cael3_v4.gds
Binary file not shown.
Binary file added submissions/EBeam_majidtaghavi3_SiN_1.gds
Binary file not shown.
Binary file added submissions/Ebeam_cael3_v2.gds
Binary file not shown.
Binary file added submissions/Ebeam_cael3_v3.gds
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'''
--- Simple MZI, tested using Facet-Attached Micro Lenses (FaML) ---
by Lukas Chrostowski, 2024
Example simple script to
Expand Down Expand Up @@ -64,7 +64,7 @@
and Draw the floor plan
'''
cell, ly = new_layout(tech_name, top_cell_name, GUI=True, overwrite = True)
floorplan(cell, 1000e3, 244e3)
floorplan(cell, 600e3, 229e3)

dbu = ly.dbu

Expand All @@ -76,8 +76,9 @@
cell_ebeam_y = ly.create_cell('ANT_MMI_1x2_te1550_3dB_BB', 'EBeam-SiN')
cell_ebeam_delay = ly.create_cell('spiral_paperclip', 'EBeam_Beta',
{'waveguide_type':waveguide_type_delay,
'length':311,
'length':118,
'loops':8,
'port_vertical':True,
'flatten':True})

#######################
Expand All @@ -86,7 +87,8 @@
# draw two edge couplers for facet-attached micro-lenses
inst_faml = FaML_two(cell,
label = "opt_in_TE_1550_FaML_mzi2_%s" % designer_name,
cell_params = None
cell_params = None,
y_offset = 51e3,
)
#c = inst_faml[0].cell
#c.name = 'FaML2'
Expand All @@ -95,12 +97,12 @@
instY2 = connect_cell(inst_faml[0], 'opt1', cell_ebeam_y, 'pin1')
instY1 = connect_cell(inst_faml[1], 'opt1', cell_ebeam_y, 'pin1')
# Spiral:
instSpiral = connect_cell(instY2, 'pin2', cell_ebeam_delay, 'optA')
instSpiral.transform(pya.Trans(110e3,50e3))
instSpiral = connect_cell(instY2, 'pin2', cell_ebeam_delay, 'optB')
instSpiral.transform(pya.Trans(100e3,48e3))
# Waveguides:
connect_pins_with_waveguide(instY1, 'pin2', instY2, 'pin3', waveguide_type=waveguide_type1)
connect_pins_with_waveguide(instY2, 'pin2', instSpiral, 'optA', waveguide_type=waveguide_type1)
connect_pins_with_waveguide(instY1, 'pin3', instSpiral, 'optB', waveguide_type=waveguide_type1,turtle_A=[50,90])
connect_pins_with_waveguide(instY2, 'pin2', instSpiral, 'optB', waveguide_type=waveguide_type1)
connect_pins_with_waveguide(instY1, 'pin3', instSpiral, 'optA', waveguide_type=waveguide_type1,turtle_A=[50,90])


# Zoom out
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

# Export for fabrication, removing PCells
path = os.path.dirname(os.path.realpath(__file__))
for i in range(10):
for i in range(6):
filename, extension = os.path.splitext(os.path.basename(__file__))
filename+=f'_{i}'
if export_type == 'static':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
and Draw the floor plan
'''
cell, ly = new_layout(tech_name, top_cell_name, GUI=True, overwrite = True)
floorplan(cell, 605e3, 410e3)
floorplan(cell, 220e3, 180e3)

dbu = ly.dbu

Expand Down
Binary file removed submissions/openEBL_snewman_SiN_DCA2.gds
Binary file not shown.
Binary file modified submissions/openEBL_snewman_SiN_MRRA1.gds
Binary file not shown.
Binary file modified submissions/openEBL_snewman_SiN_MRRA2.gds
Binary file not shown.
Binary file modified submissions/openEBL_snewman_SiN_MRRA3.gds
Binary file not shown.
Binary file modified submissions/openEBL_snewman_SiN_MRRA4.gds
Binary file not shown.

0 comments on commit 558d01c

Please sign in to comment.