From 877ea53b7f82c44b387e593659a591b1f7dd1ea3 Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 24 Jan 2020 21:24:44 +0000 Subject: [PATCH] Fix conflicting boundary name --- compiler/base/geometry.py | 2 ++ compiler/base/hierarchy_layout.py | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/compiler/base/geometry.py b/compiler/base/geometry.py index 46cfe7c7..f354cf02 100644 --- a/compiler/base/geometry.py +++ b/compiler/base/geometry.py @@ -69,7 +69,9 @@ class geometry: """ Transform with offset, mirror and rotation to get the absolute pin location. We must then re-find the ll and ur. The master is the cell instance. """ if OPTS.netlist_only: + self.boundary = [vector(0,0), vector(0,0)] return + (ll, ur) = [vector(0, 0), vector(self.width, self.height)] if mirror == "MX": diff --git a/compiler/base/hierarchy_layout.py b/compiler/base/hierarchy_layout.py index bfb1c2d2..a1b18ef3 100644 --- a/compiler/base/hierarchy_layout.py +++ b/compiler/base/hierarchy_layout.py @@ -31,7 +31,7 @@ class layout(): self.name = name self.width = None self.height = None - self.boundary = None + self.bounding_box = None self.insts = [] # Holds module/cell layout instances self.objs = [] # Holds all other objects (labels, geometries, etc) self.pin_map = {} # Holds name->pin_layout map for all pins @@ -574,7 +574,7 @@ class layout(): # If it's not a premade cell # and we didn't add our own boundary, # we should add a boundary just for DRC in some technologies - if not self.is_library_cell and not self.boundary: + if not self.is_library_cell and not self.bounding_box: # If there is a boundary layer, and we didn't create one, add one. if "stdc" in techlayer.keys(): boundary_layer = "stdc" @@ -1063,20 +1063,23 @@ class layout(): def add_boundary(self, ll=vector(0, 0), ur=None): """ Add boundary for debugging dimensions """ + if OPTS.netlist_only: + return + if "stdc" in techlayer.keys(): boundary_layer = "stdc" else: boundary_layer = "boundary" if not ur: - self.boundary = self.add_rect(layer=boundary_layer, - offset=ll, - height=self.height, - width=self.width) + self.bounding_box = self.add_rect(layer=boundary_layer, + offset=ll, + height=self.height, + width=self.width) else: - self.boundary = self.add_rect(layer=boundary_layer, - offset=ll, - height=ur.y-ll.y, - width=ur.x-ll.x) + self.bounding_box = self.add_rect(layer=boundary_layer, + offset=ll, + height=ur.y-ll.y, + width=ur.x-ll.x) def add_enclosure(self, insts, layer="nwell"): """ Add a layer that surrounds the given instances. Useful