diff --git a/Lumerical_EBeam_CML/EBeam/wg_heater.ice b/Lumerical_EBeam_CML/EBeam/wg_heater.ice new file mode 100644 index 00000000..d17054b0 Binary files /dev/null and b/Lumerical_EBeam_CML/EBeam/wg_heater.ice differ diff --git a/Lumerical_EBeam_CML/EBeam_v2023_01_12.cml.REMOVED.git-id b/Lumerical_EBeam_CML/EBeam_v2023_01_12.cml.REMOVED.git-id deleted file mode 100644 index 7aa60319..00000000 --- a/Lumerical_EBeam_CML/EBeam_v2023_01_12.cml.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -04f359a9db457c72721fc48ee0fe45201dfc7316 \ No newline at end of file diff --git a/Lumerical_EBeam_CML/EBeam_v2023_02_23.cml.REMOVED.git-id b/Lumerical_EBeam_CML/EBeam_v2023_02_23.cml.REMOVED.git-id new file mode 100644 index 00000000..b8babde8 --- /dev/null +++ b/Lumerical_EBeam_CML/EBeam_v2023_02_23.cml.REMOVED.git-id @@ -0,0 +1 @@ +0e910ef82b23e859cd5b19ef7416fc1dbbf826a9 \ No newline at end of file diff --git a/klayout/EBeam/EBeam_v2023_01_12.cml.REMOVED.git-id b/klayout/EBeam/EBeam_v2023_01_12.cml.REMOVED.git-id deleted file mode 100644 index 7aa60319..00000000 --- a/klayout/EBeam/EBeam_v2023_01_12.cml.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -04f359a9db457c72721fc48ee0fe45201dfc7316 \ No newline at end of file diff --git a/klayout/EBeam/EBeam_v2023_02_23.cml.REMOVED.git-id b/klayout/EBeam/EBeam_v2023_02_23.cml.REMOVED.git-id new file mode 100644 index 00000000..b8babde8 --- /dev/null +++ b/klayout/EBeam/EBeam_v2023_02_23.cml.REMOVED.git-id @@ -0,0 +1 @@ +0e910ef82b23e859cd5b19ef7416fc1dbbf826a9 \ No newline at end of file diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/wg_heater.py b/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py similarity index 63% rename from klayout/EBeam/pymacros/pcells_EBeam_Beta/wg_heater.py rename to klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py index 0387b108..23ca7b2f 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/wg_heater.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py @@ -49,9 +49,11 @@ def __init__(self): self.param("mllayer", self.TypeLayer, "Metal contact layer", default=TECHNOLOGY['M2_router']) self.param("metal_width", self.TypeDouble, "Metal contact width", default=10) + self.param("wg_width", self.TypeDouble, "Waveguide width (microns)", default = 0.5, readonly=True) self.param("pinrec", self.TypeLayer, "PinRec Layer", default = TECHNOLOGY['PinRec']) self.param("devrec", self.TypeLayer, "DevRec Layer", default = TECHNOLOGY['DevRec']) self.param("pinrecm", self.TypeLayer, "PinRecM Layer (metal)", default=TECHNOLOGY['PinRecM']) + self.param("text", self.TypeLayer, "Text Layer", default = LayerInfo(10, 0)) self.cellName="wg_heater" @@ -60,8 +62,11 @@ def display_text_impl(self): return "%s_%s" % (self.cellName, self.length) def coerce_parameters_impl(self): - self.path = DPath([DPoint(0,0), DPoint(self.length,0)], 0.5) - print(self.waveguide_type) + params = [t for t in self.waveguide_types if t['name'] == self.waveguide_type] + if not params: + raise Exception ('Waveguides.XML not correctly configured') + from SiEPIC.extend import to_itype + self.wg_width = float(params[0]['width']) def can_create_from_shape_impl(self): return self.shape.is_path() @@ -82,15 +87,22 @@ def produce_impl(self): if self.layout.technology_name == '': self.layout.technology_name = self.technology_name - from SiEPIC.extend import to_itype - from SiEPIC.utils.layout import make_pin + + # fetch the parameters dbu = self.layout.dbu - - - # Draw the waveguide geometry, new function in SiEPIC-Tools v0.3.90 - from SiEPIC.utils.layout import layout_waveguide4 - self.waveguide_length = layout_waveguide4(self.cell, self.path, self.waveguide_type, debug=False) + ly = self.layout + shapes = self.cell.shapes + from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + TECHNOLOGY = get_technology_by_name('EBeam') + params = [t for t in self.waveguide_types if t['name'] == self.waveguide_type] + layer = [wg['layer'] for wg in params[0]['component']] + try: + layer.remove('DevRec') + except: + pass + if not layer: + raise Exception ('Waveguides.XML not correctly configured') # fetch design layers LayermlN = self.layout.layer(self.mllayer) @@ -98,6 +110,18 @@ def produce_impl(self): LayerPinRecN = self.layout.layer(self.pinrec) LayerDevRecN = self.layout.layer(self.devrec) LayerPinRecM = self.layout.layer(self.pinrecm) + LayerWG = ly.layer(TECHNOLOGY[layer[0]]) + LayerTextN = ly.layer(self.text) + + + from SiEPIC.extend import to_itype + from SiEPIC.utils.layout import make_pin + dbu = self.layout.dbu + w = to_itype(self.wg_width,dbu) + + # Draw the waveguide geometry + path = DPath([DPoint(0,0), DPoint(self.length,0)], self.wg_width) + self.cell.shapes(LayerWG).insert(path.simple_polygon()) # draw metal heater path = DPath([DPoint(0,0), DPoint(self.length,0)], self.mh_width) @@ -117,4 +141,32 @@ def produce_impl(self): make_pin(self.cell, "elec1", [self.metal_width / 2, self.mh_width/2], ml_width, LayerPinRecM, 90) make_pin(self.cell, "elec2", [self.length-self.metal_width / 2, self.mh_width/2], ml_width, LayerPinRecM, 90) - # print("EBeam.%s: length %.3f um, complete" % (self.cellName, self.waveguide_length)) + # Create the pins on the waveguides + make_pin(self.cell, "opt1", [0,0], w, LayerPinRecN, 180) + make_pin(self.cell, "opt2", [to_itype(self.length,dbu),0], w, LayerPinRecN, 0) + + # Compact model information + t = Trans(Trans.R0, 0, 0) + cml = 'EBeam' + if cml: + text = Text ('Lumerical_INTERCONNECT_library=Design kits/%s' % cml, t) + shape = shapes(LayerDevRecN).insert(text) + shape.text_size = 0.1/dbu + t = Trans(Trans.R0, 0, w*2) + model = 'wg_heater' + if model: + text = Text ('Component=%s' % model, t) + shape = shapes(LayerDevRecN).insert(text) + shape.text_size = 0.1/dbu + t = Trans(Trans.R0, 0, -w*2) + text = Text \ + ('Spice_param:wg_length=%.3fu' %\ + (self.length), t ) + shape = shapes(LayerDevRecN).insert(text) + shape.text_size = 0.1/dbu + + # Create the device recognition layer -- make it 1 * wg_width away from the waveguides. + h = max(w*3*dbu, self.mh_width/2) + box1 = Box(0, -to_itype(h,dbu), to_itype(self.length,dbu), to_itype(h,dbu)) + shapes(LayerDevRecN).insert(box1) +