diff --git a/compiler/tests/03_ptx_1finger_nmos_test.py b/compiler/tests/03_ptx_1finger_nmos_test.py index 3e78a693..505bb5f7 100644 --- a/compiler/tests/03_ptx_1finger_nmos_test.py +++ b/compiler/tests/03_ptx_1finger_nmos_test.py @@ -29,110 +29,6 @@ class ptx_test(unittest.TestCase): OPTS.check_lvsdrc = True globals.end_openram() - - def add_mods(self, fet): - self.create_contacts() - self.add_well_extension(fet) - self.add_wire_extension(fet) - self.add_well_tiedown(fet) - self.add_poly_tiedown(fet) - - def create_contacts(self): - layer_stack = ("active", "contact", "metal1") - self.well_contact = contact.contact(layer_stack) - - layer_stack = ("poly", "contact", "metal1") - self.poly_contact = contact.contact(layer_stack) - - def add_well_tiedown(self, fet): - offset = [fet.active_contact_positions[0][0], - fet.active_contact_positions[0][1] + fet.well_height] - fet.add_inst(name="well_tap", - mod=self.well_contact, - offset=offset, - mirror="R0", - rotate=0) - fet.well_contact = self.well_contact - fet.well_tiedown_location = offset - - def add_well_extension(self, fet): - well_define = {"pmos": "nwell", - "nmos": "pwell"} - well_type = well_define[fet.tx_type] - offset = getattr(fet,"{}_position".format(well_type)) - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(fet.tx_type[0])], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - - well_type = "{0}well".format(fet.tx_type[0]) - offset[1] = offset[1] - 3 * fet.well_height - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(well_define[fet.tx_type][ - 0])], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - - def add_wire_extension(self, fet): - xcorrect = (fet.active_contact.width / 2) - (tech.drc["minwidth_metal1"] / 2) - offset = [fet.active_contact_positions[0][0] + xcorrect, - fet.active_contact_positions[0][1]] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=fet.well_height) - - offset = [fet.active_contact_positions[-1][0] + xcorrect, - fet.active_contact_positions[-1][1] - 2 * fet.well_height] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=2 * fet.well_height) - - offset = [fet.poly_positions[-1][0], - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_rect(layerNumber=tech.layer["poly"], - offset=offset, - width=tech.drc["minwidth_poly"], - height=fet.well_height) - - def add_poly_tiedown(self, fet): - xcorrect = abs(self.poly_contact.upper_layer_vertical_enclosure - - self.poly_contact.lower_layer_vertical_enclosure) - offset = [fet.poly_positions[-1][0] - xcorrect, - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_inst(name="poly_contact", - mod=self.poly_contact, - offset=offset, - mirror="R270") - - - offset = [fet.active_contact_positions[-1][0], fet.active_contact_positions - [-1][1] - 2 * fet.well_height - self.well_contact.height] - fet.poly_tiedown_location = offset - fet.add_inst(name="n_tiedown", - mod=self.well_contact, - offset=offset) - tech.ptx_port.add_custom_layer(fet) - def local_check(self, fet): tempspice = OPTS.openram_temp + "temp.sp" tempgds = OPTS.openram_temp + "temp.gds" diff --git a/compiler/tests/03_ptx_1finger_pmos_test.py b/compiler/tests/03_ptx_1finger_pmos_test.py index 06b0a9d9..5bd8d722 100644 --- a/compiler/tests/03_ptx_1finger_pmos_test.py +++ b/compiler/tests/03_ptx_1finger_pmos_test.py @@ -29,110 +29,6 @@ class ptx_test(unittest.TestCase): OPTS.check_lvsdrc = True globals.end_openram() - - def add_mods(self, fet): - self.create_contacts() - self.add_well_extension(fet) - self.add_wire_extension(fet) - self.add_well_tiedown(fet) - self.add_poly_tiedown(fet) - - def create_contacts(self): - layer_stack = ("active", "contact", "metal1") - self.well_contact = contact.contact(layer_stack) - - layer_stack = ("poly", "contact", "metal1") - self.poly_contact = contact.contact(layer_stack) - - def add_well_tiedown(self, fet): - offset = [fet.active_contact_positions[0][0], - fet.active_contact_positions[0][1] + fet.well_height] - fet.add_inst(name="well_tap", - mod=self.well_contact, - offset=offset, - mirror="R0", - rotate=0) - fet.well_contact = self.well_contact - fet.well_tiedown_location = offset - - def add_well_extension(self, fet): - well_define = {"pmos": "nwell", - "nmos": "pwell"} - well_type = well_define[fet.tx_type] - offset = getattr(fet,"{}_position".format(well_type)) - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(fet.tx_type[0])], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - - well_type = "{0}well".format(fet.tx_type[0]) - offset[1] = offset[1] - 3 * fet.well_height - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(well_define[fet.tx_type][ - 0])], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - - def add_wire_extension(self, fet): - xcorrect = (fet.active_contact.width / 2) - (tech.drc["minwidth_metal1"] / 2) - offset = [fet.active_contact_positions[0][0] + xcorrect, - fet.active_contact_positions[0][1]] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=fet.well_height) - - offset = [fet.active_contact_positions[-1][0] + xcorrect, - fet.active_contact_positions[-1][1] - 2 * fet.well_height] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=2 * fet.well_height) - - offset = [fet.poly_positions[-1][0], - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_rect(layerNumber=tech.layer["poly"], - offset=offset, - width=tech.drc["minwidth_poly"], - height=fet.well_height) - - def add_poly_tiedown(self, fet): - xcorrect = abs(self.poly_contact.upper_layer_vertical_enclosure - - self.poly_contact.lower_layer_vertical_enclosure) - offset = [fet.poly_positions[-1][0] - xcorrect, - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_inst(name="poly_contact", - mod=self.poly_contact, - offset=offset, - mirror="R270") - - - offset = [fet.active_contact_positions[-1][0], fet.active_contact_positions - [-1][1] - 2 * fet.well_height - self.well_contact.height] - fet.poly_tiedown_location = offset - fet.add_inst(name="n_tiedown", - mod=self.well_contact, - offset=offset) - tech.ptx_port.add_custom_layer(fet) - def local_check(self, fet): tempspice = OPTS.openram_temp + "temp.sp" tempgds = OPTS.openram_temp + "temp.gds" diff --git a/compiler/tests/03_ptx_3finger_nmos_test.py b/compiler/tests/03_ptx_3finger_nmos_test.py index 323c1798..40e61ff9 100644 --- a/compiler/tests/03_ptx_3finger_nmos_test.py +++ b/compiler/tests/03_ptx_3finger_nmos_test.py @@ -31,109 +31,6 @@ class ptx_test(unittest.TestCase): OPTS.check_lvsdrc = True globals.end_openram() - def add_mods(self, fet): - self.create_contacts() - self.add_well_extension(fet) - self.add_wire_extension(fet) - self.add_well_tiedown(fet) - self.add_poly_tiedown(fet) - - def create_contacts(self): - layer_stack = ("active", "contact", "metal1") - self.well_contact = contact.contact(layer_stack) - - layer_stack = ("poly", "contact", "metal1") - self.poly_contact = contact.contact(layer_stack) - - def add_well_tiedown(self, fet): - offset = [fet.active_contact_positions[0][0], - fet.active_contact_positions[0][1] + fet.well_height] - fet.add_inst(name="well_tap", - mod=self.well_contact, - offset=offset, - mirror="R0", - rotate=0) - fet.well_contact = self.well_contact - fet.well_tiedown_location = offset - - def add_well_extension(self, fet): - well_define = {"pmos": "nwell", - "nmos": "pwell"} - well_type = well_define[fet.tx_type] - offset = getattr(fet,"{}_position".format(well_type)) - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(fet.tx_type[0])], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - - well_type = "{0}well".format(fet.tx_type[0]) - offset[1] = offset[1] - 3 * fet.well_height - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(well_define[fet.tx_type][ - 0])], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - - def add_wire_extension(self, fet): - xcorrect = (fet.active_contact.width / 2) - (tech.drc["minwidth_metal1"] / 2) - offset = [fet.active_contact_positions[0][0] + xcorrect, - fet.active_contact_positions[0][1]] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=fet.well_height) - - offset = [fet.active_contact_positions[-1][0] + xcorrect, - fet.active_contact_positions[-1][1] - 2 * fet.well_height] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=2 * fet.well_height) - - offset = [fet.poly_positions[-1][0], - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_rect(layerNumber=tech.layer["poly"], - offset=offset, - width=tech.drc["minwidth_poly"], - height=fet.well_height) - - def add_poly_tiedown(self, fet): - xcorrect = abs(self.poly_contact.upper_layer_vertical_enclosure - - self.poly_contact.lower_layer_vertical_enclosure) - offset = [fet.poly_positions[-1][0] - xcorrect, - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_inst(name="poly_contact", - mod=self.poly_contact, - offset=offset, - mirror="R270") - - - offset = [fet.active_contact_positions[-1][0], fet.active_contact_positions - [-1][1] - 2 * fet.well_height - self.well_contact.height] - fet.poly_tiedown_location = offset - fet.add_inst(name="n_tiedown", - mod=self.well_contact, - offset=offset) - tech.ptx_port.add_custom_layer(fet) - def local_check(self, fet): tempspice = OPTS.openram_temp + "temp.sp" tempgds = OPTS.openram_temp + "temp.gds" diff --git a/compiler/tests/03_ptx_3finger_pmos_test.py b/compiler/tests/03_ptx_3finger_pmos_test.py index 53123aa8..f49c55e9 100644 --- a/compiler/tests/03_ptx_3finger_pmos_test.py +++ b/compiler/tests/03_ptx_3finger_pmos_test.py @@ -31,109 +31,6 @@ class ptx_test(unittest.TestCase): OPTS.check_lvsdrc = True globals.end_openram() - def add_mods(self, fet): - self.create_contacts() - self.add_well_extension(fet) - self.add_wire_extension(fet) - self.add_well_tiedown(fet) - self.add_poly_tiedown(fet) - - def create_contacts(self): - layer_stack = ("active", "contact", "metal1") - self.well_contact = contact.contact(layer_stack) - - layer_stack = ("poly", "contact", "metal1") - self.poly_contact = contact.contact(layer_stack) - - def add_well_tiedown(self, fet): - offset = [fet.active_contact_positions[0][0], - fet.active_contact_positions[0][1] + fet.well_height] - fet.add_inst(name="well_tap", - mod=self.well_contact, - offset=offset, - mirror="R0", - rotate=0) - fet.well_contact = self.well_contact - fet.well_tiedown_location = offset - - def add_well_extension(self, fet): - well_define = {"pmos": "nwell", - "nmos": "pwell"} - well_type = well_define[fet.tx_type] - offset = getattr(fet,"{}_position".format(well_type)) - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(fet.tx_type[0])], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - - well_type = "{0}well".format(fet.tx_type[0]) - offset[1] = offset[1] - 3 * fet.well_height - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(well_define[fet.tx_type][ - 0])], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - - def add_wire_extension(self, fet): - xcorrect = (fet.active_contact.width / 2) - (tech.drc["minwidth_metal1"] / 2) - offset = [fet.active_contact_positions[0][0] + xcorrect, - fet.active_contact_positions[0][1]] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=fet.well_height) - - offset = [fet.active_contact_positions[-1][0] + xcorrect, - fet.active_contact_positions[-1][1] - 2 * fet.well_height] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=2 * fet.well_height) - - offset = [fet.poly_positions[-1][0], - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_rect(layerNumber=tech.layer["poly"], - offset=offset, - width=tech.drc["minwidth_poly"], - height=fet.well_height) - - def add_poly_tiedown(self, fet): - xcorrect = abs(self.poly_contact.upper_layer_vertical_enclosure - - self.poly_contact.lower_layer_vertical_enclosure) - offset = [fet.poly_positions[-1][0] - xcorrect, - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_inst(name="poly_contact", - mod=self.poly_contact, - offset=offset, - mirror="R270") - - - offset = [fet.active_contact_positions[-1][0], fet.active_contact_positions - [-1][1] - 2 * fet.well_height - self.well_contact.height] - fet.poly_tiedown_location = offset - fet.add_inst(name="n_tiedown", - mod=self.well_contact, - offset=offset) - tech.ptx_port.add_custom_layer(fet) - def local_check(self, fet): tempspice = OPTS.openram_temp + "temp.sp" tempgds = OPTS.openram_temp + "temp.gds" diff --git a/compiler/tests/03_ptx_4finger_nmos_test.py b/compiler/tests/03_ptx_4finger_nmos_test.py index a64128b4..f5ca9752 100644 --- a/compiler/tests/03_ptx_4finger_nmos_test.py +++ b/compiler/tests/03_ptx_4finger_nmos_test.py @@ -31,109 +31,6 @@ class ptx_test(unittest.TestCase): OPTS.check_lvsdrc = True globals.end_openram() - def add_mods(self, fet): - self.create_contacts() - self.add_well_extension(fet) - self.add_wire_extension(fet) - self.add_well_tiedown(fet) - self.add_poly_tiedown(fet) - - def create_contacts(self): - layer_stack = ("active", "contact", "metal1") - self.well_contact = contact.contact(layer_stack) - - layer_stack = ("poly", "contact", "metal1") - self.poly_contact = contact.contact(layer_stack) - - def add_well_tiedown(self, fet): - offset = [fet.active_contact_positions[0][0], - fet.active_contact_positions[0][1] + fet.well_height] - fet.add_inst(name="well_tap", - mod=self.well_contact, - offset=offset, - mirror="R0", - rotate=0) - fet.well_contact = self.well_contact - fet.well_tiedown_location = offset - - def add_well_extension(self, fet): - well_define = {"pmos": "nwell", - "nmos": "pwell"} - well_type = well_define[fet.tx_type] - offset = getattr(fet,"{}_position".format(well_type)) - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(fet.tx_type[0])], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - - well_type = "{0}well".format(fet.tx_type[0]) - offset[1] = offset[1] - 3 * fet.well_height - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(well_define[fet.tx_type][ - 0])], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - - def add_wire_extension(self, fet): - xcorrect = (fet.active_contact.width / 2) - (tech.drc["minwidth_metal1"] / 2) - offset = [fet.active_contact_positions[0][0] + xcorrect, - fet.active_contact_positions[0][1]] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=fet.well_height) - - offset = [fet.active_contact_positions[-1][0] + xcorrect, - fet.active_contact_positions[-1][1] - 2 * fet.well_height] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=2 * fet.well_height) - - offset = [fet.poly_positions[-1][0], - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_rect(layerNumber=tech.layer["poly"], - offset=offset, - width=tech.drc["minwidth_poly"], - height=fet.well_height) - - def add_poly_tiedown(self, fet): - xcorrect = abs(self.poly_contact.upper_layer_vertical_enclosure - - self.poly_contact.lower_layer_vertical_enclosure) - offset = [fet.poly_positions[-1][0] - xcorrect, - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_inst(name="poly_contact", - mod=self.poly_contact, - offset=offset, - mirror="R270") - - - offset = [fet.active_contact_positions[-1][0], fet.active_contact_positions - [-1][1] - 2 * fet.well_height - self.well_contact.height] - fet.poly_tiedown_location = offset - fet.add_inst(name="n_tiedown", - mod=self.well_contact, - offset=offset) - tech.ptx_port.add_custom_layer(fet) - def local_check(self, fet): tempspice = OPTS.openram_temp + "temp.sp" tempgds = OPTS.openram_temp + "temp.gds" diff --git a/compiler/tests/03_ptx_4finger_pmos_test.py b/compiler/tests/03_ptx_4finger_pmos_test.py index 43931cc3..d35a442f 100644 --- a/compiler/tests/03_ptx_4finger_pmos_test.py +++ b/compiler/tests/03_ptx_4finger_pmos_test.py @@ -31,109 +31,6 @@ class ptx_test(unittest.TestCase): OPTS.check_lvsdrc = True globals.end_openram() - def add_mods(self, fet): - self.create_contacts() - self.add_well_extension(fet) - self.add_wire_extension(fet) - self.add_well_tiedown(fet) - self.add_poly_tiedown(fet) - - def create_contacts(self): - layer_stack = ("active", "contact", "metal1") - self.well_contact = contact.contact(layer_stack) - - layer_stack = ("poly", "contact", "metal1") - self.poly_contact = contact.contact(layer_stack) - - def add_well_tiedown(self, fet): - offset = [fet.active_contact_positions[0][0], - fet.active_contact_positions[0][1] + fet.well_height] - fet.add_inst(name="well_tap", - mod=self.well_contact, - offset=offset, - mirror="R0", - rotate=0) - fet.well_contact = self.well_contact - fet.well_tiedown_location = offset - - def add_well_extension(self, fet): - well_define = {"pmos": "nwell", - "nmos": "pwell"} - well_type = well_define[fet.tx_type] - offset = getattr(fet,"{}_position".format(well_type)) - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(fet.tx_type[0])], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=2 * fet.well_height) - - well_type = "{0}well".format(fet.tx_type[0]) - offset[1] = offset[1] - 3 * fet.well_height - if tech.info["has_{0}".format(well_type)]: - fet.add_rect(layerNumber=tech.layer[well_type], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["{0}implant".format(well_define[fet.tx_type][ - 0])], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - fet.add_rect(layerNumber=tech.layer["vtg"], - offset=offset, - width=fet.well_width, - height=3 * fet.well_height) - - def add_wire_extension(self, fet): - xcorrect = (fet.active_contact.width / 2) - (tech.drc["minwidth_metal1"] / 2) - offset = [fet.active_contact_positions[0][0] + xcorrect, - fet.active_contact_positions[0][1]] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=fet.well_height) - - offset = [fet.active_contact_positions[-1][0] + xcorrect, - fet.active_contact_positions[-1][1] - 2 * fet.well_height] - fet.add_rect(layerNumber=tech.layer["metal1"], - offset=offset, - width=tech.drc["minwidth_metal1"], - height=2 * fet.well_height) - - offset = [fet.poly_positions[-1][0], - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_rect(layerNumber=tech.layer["poly"], - offset=offset, - width=tech.drc["minwidth_poly"], - height=fet.well_height) - - def add_poly_tiedown(self, fet): - xcorrect = abs(self.poly_contact.upper_layer_vertical_enclosure - - self.poly_contact.lower_layer_vertical_enclosure) - offset = [fet.poly_positions[-1][0] - xcorrect, - fet.poly_positions[-1][1] - (fet.well_height)] - fet.add_inst(name="poly_contact", - mod=self.poly_contact, - offset=offset, - mirror="R270") - - - offset = [fet.active_contact_positions[-1][0], fet.active_contact_positions - [-1][1] - 2 * fet.well_height - self.well_contact.height] - fet.poly_tiedown_location = offset - fet.add_inst(name="n_tiedown", - mod=self.well_contact, - offset=offset) - tech.ptx_port.add_custom_layer(fet) - def local_check(self, fet): tempspice = OPTS.openram_temp + "temp.sp" tempgds = OPTS.openram_temp + "temp.gds" diff --git a/technology/freepdk45/tech/__init__.py b/technology/freepdk45/tech/__init__.py index 798e230d..6b2d03b3 100644 --- a/technology/freepdk45/tech/__init__.py +++ b/technology/freepdk45/tech/__init__.py @@ -1,9 +1,6 @@ """ -Python GDS Mill Package - -GDS Mill is a Python package for the creation and manipulation of binary GDS2 layout files. +Import tech specific modules. """ from tech import * -from ptx_port import * diff --git a/technology/freepdk45/tech/ptx_port.py b/technology/freepdk45/tech/ptx_port.py deleted file mode 100644 index 3f0f7cfb..00000000 --- a/technology/freepdk45/tech/ptx_port.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -This class should be called in the ptx function to draw addtional layer as some layer may not exist in the freePDK technology -""" -import globals -import design -import tech - -#class ptx_port: -# def __init__(self,name): -# self.name=name -# self.width=0 -# self.height=0 - # def draw(self,instance_to_draw,offset,tx_type,height,width,tx=1): - - #Draw wire to connect mulit active - - #self.add_rect(tech.layer["metal1"],[contact_offset[0],-wire_to_ptx],width,tech.drc["minwidth_metal1"]) - # BINWU: Fix extra stuff - #print"Freepdk no drawing required" -# pass - -def add_custom_layer(fet): - pass diff --git a/technology/scn3me_subm/tech/__init__.py b/technology/scn3me_subm/tech/__init__.py index 798e230d..6b2d03b3 100755 --- a/technology/scn3me_subm/tech/__init__.py +++ b/technology/scn3me_subm/tech/__init__.py @@ -1,9 +1,6 @@ """ -Python GDS Mill Package - -GDS Mill is a Python package for the creation and manipulation of binary GDS2 layout files. +Import tech specific modules. """ from tech import * -from ptx_port import * diff --git a/technology/scn3me_subm/tech/ptx_port.py b/technology/scn3me_subm/tech/ptx_port.py deleted file mode 100755 index a10a18a8..00000000 --- a/technology/scn3me_subm/tech/ptx_port.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -This class should be called in the ptx function to draw addtional layer as some layer may not exist in the cmrf7sf technology -""" -import globals -import design -import tech - - - -class ptx_port: - def __init__(self,name): - self.name=name - self.width=0 - self.height=0 - - - - def draw(self,instance_to_draw,offset,tx_type,height,width,tx=1): - self.height=height - self.width=width - self.offset=offset - if tx_type == "pmos": - # draw BP layer - if tx==1: - instance_to_draw.add_rect(tech.layer["BP"],[offset[0]-tech.drc["BP_enclosure_active"],offset[1]-tech.drc["BP_enclosure_gate"]],width+2*tech.drc["BP_enclosure_active"],height+2*tech.drc["BP_enclosure_gate"]) - else: - instance_to_draw.add_rect(tech.layer["BP"],[offset[0]-tech.drc["BP_enclosure_active"],offset[1]-tech.drc["BP_enclosure_active"]],width+2*tech.drc["BP_enclosure_active"],height+2*tech.drc["BP_enclosure_active"]) - -