diff --git a/ubcpdk/__init__.py b/ubcpdk/__init__.py index d1b681ee..85ab66a7 100644 --- a/ubcpdk/__init__.py +++ b/ubcpdk/__init__.py @@ -44,6 +44,7 @@ layer_stack=LAYER_STACK, layer_colors=LAYER_COLORS, sparameters_path=PATH.sparameters, + interconnect_cml_path=PATH.interconnect_cml_path, ) PDK.register_cells_yaml(dirpath=pathlib.Path(__file__).parent.absolute()) PDK.activate() diff --git a/ubcpdk/components/cells.py b/ubcpdk/components/cells.py index 544d3882..dab22605 100644 --- a/ubcpdk/components/cells.py +++ b/ubcpdk/components/cells.py @@ -15,9 +15,9 @@ def y_splitter() -> Component: um = 1e-6 -add_siepic_labels = gf.partial( - add_siepic_labels, label_layer=LAYER.DEVREC, library="Design Kits/ebeam" -) +# add_siepic_labels = gf.partial( +# add_siepic_labels, label_layer=LAYER.DEVREC, library="Design Kits/ebeam" +# ) straight = gf.partial( gf.components.straight, @@ -70,11 +70,10 @@ def y_splitter() -> Component: "ebeam_y_1550.gds", doc="Y junction TE1550 50/50 power.", name="ebeam_y_1550", - model="ebeam_y_1550", - layout_model_port_pairs=( - ("opt1", "opt_a1"), - ("opt2", "opt_b1"), - ("opt3", "opt_b2"), + interconnect=dict( + model="ebeam_y_1550", + layout_model_port_pairs=dict(opt1="opt_a1", opt2="opt_b1", opt3="opt_b2"), + properties=dict(annotate=True), ), ) crossing = gf.partial( diff --git a/ubcpdk/components/grating_couplers.py b/ubcpdk/components/grating_couplers.py index 59902d91..b9aa4f87 100644 --- a/ubcpdk/components/grating_couplers.py +++ b/ubcpdk/components/grating_couplers.py @@ -11,9 +11,7 @@ import_gc = gf.partial( gf.import_gds, gdsdir=PATH.gds, - library="Design kits/ebeam", decorator=decorator, - layout_model_port_pairs=(("opt1", "opt_wg"),), ) gc_te1550 = gf.partial( @@ -21,17 +19,25 @@ gdspath="ebeam_gc_te1550.gds", polarization="te", wavelength=1.55, - model="ebeam_gc_te1550", name="ebeam_gc_te1550", + interconnect=dict( + model="ebeam_gc_te1550", + library="Design kits/ebeam", + layout_model_port_pairs=dict(opt1="opt_wg"), + ), ) gc_te1550_broadband = gf.partial( import_gc, gdspath="ebeam_gc_te1550_broadband.gds", name="ebeam_gc_te1550_broadband", - model="ebeam_gc_te1550_broadband", polarization="te", wavelength=1.55, + interconnect=dict( + model="ebeam_gc_te1550_broadband", + library="Design kits/ebeam", + layout_model_port_pairs=dict(opt1="opt_wg"), + ), ) diff --git a/ubcpdk/config.py b/ubcpdk/config.py index 7f226260..58bd9f6a 100644 --- a/ubcpdk/config.py +++ b/ubcpdk/config.py @@ -37,6 +37,7 @@ class Path: data = samples / "data" gds = module / "gds" sparameters = repo / "sparameters" + interconnect_cml_path = module / "simulation" / "lumerical" / "EBeam.cml" modes = repo / "modes" mask = module / "samples" / "extra" / "ubc1" diff --git a/ubcpdk/klayout/tech/EBeam.cml b/ubcpdk/simulation/lumerical/EBeam.cml similarity index 100% rename from ubcpdk/klayout/tech/EBeam.cml rename to ubcpdk/simulation/lumerical/EBeam.cml diff --git a/ubcpdk/klayout/tech/lumerical_process_file.lbr b/ubcpdk/simulation/lumerical/lumerical_process_file.lbr similarity index 100% rename from ubcpdk/klayout/tech/lumerical_process_file.lbr rename to ubcpdk/simulation/lumerical/lumerical_process_file.lbr diff --git a/ubcpdk/tech.py b/ubcpdk/tech.py index 272f73e2..7c47892c 100644 --- a/ubcpdk/tech.py +++ b/ubcpdk/tech.py @@ -113,16 +113,13 @@ class Tech(BaseModel): strip_wg_simulation_info = dict( model="ebeam_wg_integral_1550", - library="Design kits/ebeam", - layout_model_property_pairs=( - # (layout_property_name, interconnect_property_name) - ("length", "wg_length", 1e-6), - ("width", "wg_width", 1e-6), + layout_model_property_pairs=dict( + # interconnect_property_name=(layout_property_name, scaling_value) + wg_length=("length", 1e-6), + wg_width=("width", 1e-6), ), - layout_model_port_pairs=(("o1", "port 1"), ("o2", "port 2")), - spice_params=["wg_length", "wg_width"], - component_type=["optical"], - properties=(("annotate", False),), + layout_model_port_pairs=dict(o1="port 1", o2="port 2"), + properties=dict(annotate=False), ) get_sparameters_data_lumerical = gf.partial( @@ -136,14 +133,14 @@ class Tech(BaseModel): gf.cross_section.strip, layer=LAYER.WG, width=TECH.WG["width"], - info=strip_wg_simulation_info, + info=dict(interconnect=strip_wg_simulation_info), add_pins=add_pins_siepic, ) strip = gf.partial( gf.cross_section.strip, layer=LAYER.WG, width=TECH.WG["width"], - info=strip_wg_simulation_info, + info=dict(interconnect=strip_wg_simulation_info), add_pins=add_pins_siepic, ) strip_no_pins = gf.partial( diff --git a/update_source.sh b/update_source.sh index 8fb3d770..f8417c8f 100755 --- a/update_source.sh +++ b/update_source.sh @@ -7,6 +7,7 @@ export GIT_REPO=https://github.com/SiEPIC/SiEPIC_EBeam_PDK export REPO_TECH=SiEPIC_EBeam_PDK-${VERSION}/klayout_dot_config/tech/EBeam export UBC_TECH=ubcpdk/klayout/tech +export LUM_DIR=ubcpdk/simulation/lumerical export GDS_DIR=ubcpdk/gds @@ -17,8 +18,8 @@ tar -xvf v${VERSION}.tar.gz # Copy files from tech cp -r ${REPO_TECH}/klayout_Layers_EBeam.lyp ${UBC_TECH}/layers.lyp cp -r ${REPO_TECH}/EBeam.lyt ${UBC_TECH}/tech.lyt -cp -r ${REPO_TECH}/EBeam_v${CML_VER}.cml ${UBC_TECH}/EBeam.cml -cp -r ${REPO_TECH}/lumerical_process_file.lbr ${UBC_TECH}/lumerical_process_file.lbr +cp -r ${REPO_TECH}/EBeam_v${CML_VER}.cml ${LUM_DIR}/EBeam.cml +cp -r ${REPO_TECH}/lumerical_process_file.lbr ${LUM_DIR}/lumerical_process_file.lbr # TODO: Make this work with the naming used by SiEPIC # gf gds layermap_to_dataclass ${UBC_TECH}/layers.lyp