Allow multiple must-connect pins with the same label.

This commit is contained in:
Matt Guthaus 2018-11-07 13:05:13 -08:00
parent 8d753b5ac7
commit f04e76a54f
3 changed files with 28 additions and 27 deletions

View File

@ -100,7 +100,8 @@ def get_gds_pins(pin_names, name, gds_filename, units):
cell = {}
for pin_name in pin_names:
cell[str(pin_name)]=[]
pin_shape=cell_vlsi.getPinShape(str(pin_name))
pin_list=cell_vlsi.getPinShape(str(pin_name))
for pin_shape in pin_list:
(layer,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

View File

@ -60,7 +60,9 @@ class VlsiLayout:
self.tempCoordinates=None
self.tempPassFail = True
# This is the pin map
# This is a dict indexed by the pin labels.
# It contains a list of list of shapes, one for each occurance of the label.
# Multiple labels may be disconnected.
self.pins = {}
def rotatedCoordinates(self,coordinatesToRotate,rotateAngle):
@ -661,9 +663,11 @@ class VlsiLayout:
"""
Search for a pin label and return the largest enclosing rectangle
on the same layer as the pin label.
Signal an error if there are multiple labels on different layers.
If there are multiple pin lists, return the max of each.
"""
pin_list = self.getAllPinShapes(pin_name)
pin_map = self.pins[pin_name]
max_pins = []
for pin_list in pin_map:
max_pin = None
max_area = 0
for pin in pin_list:
@ -672,8 +676,9 @@ class VlsiLayout:
if max_pin == None or new_area>max_area:
max_pin = pin
max_area = new_area
max_pins.append(max_pin)
return max_pin
return max_pins
def getAllPinShapes(self, pin_name):
@ -683,7 +688,8 @@ class VlsiLayout:
"""
shape_list = []
pin_map = self.pins[pin_name]
for pin in pin_map:
for pin_list in pin_map:
for pin in pin_list:
(pin_layer, boundary) = pin
shape_list.append(pin)
@ -718,7 +724,7 @@ class VlsiLayout:
self.pins[label_text]
except KeyError:
self.pins[label_text] = []
self.pins[label_text].extend(pin_shapes)
self.pins[label_text].append(pin_shapes)

View File

@ -127,14 +127,8 @@ class router(router_tech):
Pin can either be a label or a location,layer pair: [[x,y],layer].
"""
debug.info(1,"Finding pins for {}.".format(pin_name))
import datetime
from globals import print_time
start_time = datetime.datetime.now()
self.retrieve_pins(pin_name)
print_time("Retrieve pins", datetime.datetime.now(), start_time)
start_time = datetime.datetime.now()
self.analyze_pins(pin_name)
print_time("Analyze pins", datetime.datetime.now(), start_time)
def find_blockages(self):
"""