diff --git a/compiler/base/design.py b/compiler/base/design.py index c8bf3070..f5cc47fb 100644 --- a/compiler/base/design.py +++ b/compiler/base/design.py @@ -48,7 +48,10 @@ class design(hierarchy_design): self.add_pin_indices(prop.port_indices) self.add_pin_names(prop.port_map) self.add_pin_types(prop.port_types) - + + def debug_writer(self): + self.gds_write("/home/jesse/output/direct_rw.gds") + (width, height) = utils.get_libcell_size(self.cell_name, GDS["unit"], layer[prop.boundary_layer]) @@ -56,7 +59,12 @@ class design(hierarchy_design): self.pin_map = utils.get_libcell_pins(self.pins, self.cell_name, GDS["unit"]) + import gdsMill + reader = self.gds + writer = gdsMill.Gds2writer(reader) + writer.writeToFile('/home/jesse/output/direct_rw.gds') + self.gds_write("/home/jesse/output/direct_rw.gds") self.width = width self.height = height diff --git a/compiler/base/utils.py b/compiler/base/utils.py index ed016964..c1ac53eb 100644 --- a/compiler/base/utils.py +++ b/compiler/base/utils.py @@ -148,12 +148,15 @@ def get_gds_pins(pin_names, name, gds_filename, units): cell[str(pin_name)] = [] pin_list = cell_vlsi.getPinShape(str(pin_name)) for pin_shape in pin_list: - (lpp, boundary) = pin_shape - rect = [vector(boundary[0], boundary[1]), - vector(boundary[2], boundary[3])] - # this is a list because other cells/designs - # may have must-connect pins - cell[str(pin_name)].append(pin_layout(pin_name, rect, lpp)) + if pin_shape != None: + (lpp, boundary) = pin_shape + rect = [vector(boundary[0], boundary[1]), + vector(boundary[2], boundary[3])] + # this is a list because other cells/designs + # may have must-connect pins + if isinstance(lpp[1], list): + lpp = (lpp[0], None) + cell[str(pin_name)].append(pin_layout(pin_name, rect, lpp)) _GDS_PINS_CACHE[k] = cell return dict(cell) diff --git a/compiler/gdsMill/gdsMill/vlsiLayout.py b/compiler/gdsMill/gdsMill/vlsiLayout.py index bd9968dc..06e4cc66 100644 --- a/compiler/gdsMill/gdsMill/vlsiLayout.py +++ b/compiler/gdsMill/gdsMill/vlsiLayout.py @@ -3,7 +3,7 @@ from datetime import * import numpy as np import math import debug - +from tech import use_purpose, no_pin_shape class VlsiLayout: """Class represent a hierarchical layout""" @@ -215,9 +215,13 @@ class VlsiLayout: self.deduceHierarchy() # self.traverseTheHierarchy() self.populateCoordinateMap() - + #only ones with text for layerNumber in self.layerNumbersInUse: - self.processLabelPins((layerNumber, None)) + #if layerNumber not in no_pin_shape: + if layerNumber in use_purpose: + self.processLabelPins((layerNumber, use_purpose[layerNumber])) + else: + self.processLabelPins((layerNumber, None)) def populateCoordinateMap(self): def addToXyTree(startingStructureName = None,transformPath = None): @@ -903,6 +907,16 @@ def sameLPP(lpp1, lpp2): if lpp1[1] == None or lpp2[1] == None: return lpp1[0] == lpp2[0] + if isinstance(lpp1[1], list): + for i in range(len(lpp1[1])): + if lpp1[0] == lpp2[0] and lpp1[1][i] == lpp2[1]: + return True + + if isinstance(lpp2[1], list): + for i in range(len(lpp2[1])): + if lpp1[0] == lpp2[0] and lpp1[1] == lpp2[1][i]: + return True + return lpp1[0] == lpp2[0] and lpp1[1] == lpp2[1] diff --git a/technology/freepdk45/tech/tech.py b/technology/freepdk45/tech/tech.py index 436d2ff4..03cbf2f9 100644 --- a/technology/freepdk45/tech/tech.py +++ b/technology/freepdk45/tech/tech.py @@ -135,6 +135,8 @@ layer["m10"] = (29, 0) layer["text"] = (239, 0) layer["boundary"]= (239, 0) +use_purpose = {} + # Layer names for external PDKs layer_names = {} layer_names["active"] = "active" diff --git a/technology/scn3me_subm/tech/tech.py b/technology/scn3me_subm/tech/tech.py index 0bd12162..018a15da 100755 --- a/technology/scn3me_subm/tech/tech.py +++ b/technology/scn3me_subm/tech/tech.py @@ -63,6 +63,7 @@ layer["text"] = (63, 0) layer["boundary"] = (63, 0) layer["blockage"] = (83, 0) +use_purpose = {} ################################################### ##END GDS Layer Map ################################################### diff --git a/technology/scn4m_subm/tech/tech.py b/technology/scn4m_subm/tech/tech.py index 6591fbbc..8b857eb5 100644 --- a/technology/scn4m_subm/tech/tech.py +++ b/technology/scn4m_subm/tech/tech.py @@ -119,6 +119,8 @@ layer["m4"] = (31, 0) layer["text"] = (63, 0) layer["boundary"] = (63, 0) +use_purpose = {} + # Layer names for external PDKs layer_names = {} layer_names["active"] = "active"