diff --git a/compiler/base/pin_layout.py b/compiler/base/pin_layout.py index 7a7ccd96..5199265b 100644 --- a/compiler/base/pin_layout.py +++ b/compiler/base/pin_layout.py @@ -120,10 +120,14 @@ class pin_layout: def contains(self, other): """ Check if a shape contains another rectangle """ + # If it is the same shape entirely, it is contained! + if self == other: + return True + # Can only overlap on the same layer if self.layer != other.layer: return False - + (ll,ur) = self.rect (oll,our) = other.rect diff --git a/compiler/router/pin_group.py b/compiler/router/pin_group.py index 55e31ab4..9203ed11 100644 --- a/compiler/router/pin_group.py +++ b/compiler/router/pin_group.py @@ -187,18 +187,17 @@ class pin_group: return p - def find_smallest_connector(self, enclosure_list): + def find_smallest_connector(self, pin_list, shape_list): """ - Compute all of the connectors between non-overlapping pins and enclosures. + Compute all of the connectors between the overlapping pins and enclosure shape list.. Return the smallest. """ smallest = None - for pin_list in self.pins: - for pin in pin_list: - for enclosure in enclosure_list: - new_enclosure = self.compute_connector(pin, enclosure) - if smallest == None or new_enclosure.area() {0}\n {1}".format(combined.pins,combined.grids)) remove_indices.update([index1,index2]) pin_groups.append(combined) diff --git a/compiler/router/supply_router.py b/compiler/router/supply_router.py index 6c40c788..84e59b04 100644 --- a/compiler/router/supply_router.py +++ b/compiler/router/supply_router.py @@ -91,7 +91,7 @@ class supply_router(router): self.route_simple_overlaps(vdd_name) self.route_simple_overlaps(gnd_name) - self.write_debug_gds("debug_simple_route.gds",stop_program=False) + #self.write_debug_gds("debug_simple_route.gds",stop_program=False) # Route the supply pins to the supply rails # Route vdd first since we want it to be shorter