mirror of https://github.com/VLSIDA/OpenRAM.git
Allow multiple must-connect pins with the same label.
This commit is contained in:
parent
8d753b5ac7
commit
f04e76a54f
|
|
@ -100,11 +100,12 @@ 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))
|
||||
(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
|
||||
cell[str(pin_name)].append(pin_layout(pin_name, rect, layer))
|
||||
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
|
||||
cell[str(pin_name)].append(pin_layout(pin_name, rect, layer))
|
||||
return cell
|
||||
|
||||
def get_libcell_pins(pin_list, name, units):
|
||||
|
|
|
|||
|
|
@ -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,19 +663,22 @@ 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)
|
||||
max_pin = None
|
||||
max_area = 0
|
||||
for pin in pin_list:
|
||||
(layer,boundary) = pin
|
||||
new_area = boundaryArea(boundary)
|
||||
if max_pin == None or new_area>max_area:
|
||||
max_pin = pin
|
||||
max_area = new_area
|
||||
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:
|
||||
(layer,boundary) = pin
|
||||
new_area = boundaryArea(boundary)
|
||||
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,9 +688,10 @@ class VlsiLayout:
|
|||
"""
|
||||
shape_list = []
|
||||
pin_map = self.pins[pin_name]
|
||||
for pin in pin_map:
|
||||
(pin_layer, boundary) = pin
|
||||
shape_list.append(pin)
|
||||
for pin_list in pin_map:
|
||||
for pin in pin_list:
|
||||
(pin_layer, boundary) = pin
|
||||
shape_list.append(pin)
|
||||
|
||||
return shape_list
|
||||
|
||||
|
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue