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 = {}
|
cell = {}
|
||||||
for pin_name in pin_names:
|
for pin_name in pin_names:
|
||||||
cell[str(pin_name)]=[]
|
cell[str(pin_name)]=[]
|
||||||
pin_shape=cell_vlsi.getPinShape(str(pin_name))
|
pin_list=cell_vlsi.getPinShape(str(pin_name))
|
||||||
(layer,boundary)=pin_shape
|
for pin_shape in pin_list:
|
||||||
rect=[vector(boundary[0],boundary[1]),vector(boundary[2],boundary[3])]
|
(layer,boundary)=pin_shape
|
||||||
# this is a list because other cells/designs may have must-connect pins
|
rect=[vector(boundary[0],boundary[1]),vector(boundary[2],boundary[3])]
|
||||||
cell[str(pin_name)].append(pin_layout(pin_name, rect, layer))
|
# 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
|
return cell
|
||||||
|
|
||||||
def get_libcell_pins(pin_list, name, units):
|
def get_libcell_pins(pin_list, name, units):
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,9 @@ class VlsiLayout:
|
||||||
self.tempCoordinates=None
|
self.tempCoordinates=None
|
||||||
self.tempPassFail = True
|
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 = {}
|
self.pins = {}
|
||||||
|
|
||||||
def rotatedCoordinates(self,coordinatesToRotate,rotateAngle):
|
def rotatedCoordinates(self,coordinatesToRotate,rotateAngle):
|
||||||
|
|
@ -661,19 +663,22 @@ class VlsiLayout:
|
||||||
"""
|
"""
|
||||||
Search for a pin label and return the largest enclosing rectangle
|
Search for a pin label and return the largest enclosing rectangle
|
||||||
on the same layer as the pin label.
|
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_pin = None
|
max_pins = []
|
||||||
max_area = 0
|
for pin_list in pin_map:
|
||||||
for pin in pin_list:
|
max_pin = None
|
||||||
(layer,boundary) = pin
|
max_area = 0
|
||||||
new_area = boundaryArea(boundary)
|
for pin in pin_list:
|
||||||
if max_pin == None or new_area>max_area:
|
(layer,boundary) = pin
|
||||||
max_pin = pin
|
new_area = boundaryArea(boundary)
|
||||||
max_area = new_area
|
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):
|
def getAllPinShapes(self, pin_name):
|
||||||
|
|
@ -683,9 +688,10 @@ class VlsiLayout:
|
||||||
"""
|
"""
|
||||||
shape_list = []
|
shape_list = []
|
||||||
pin_map = self.pins[pin_name]
|
pin_map = self.pins[pin_name]
|
||||||
for pin in pin_map:
|
for pin_list in pin_map:
|
||||||
(pin_layer, boundary) = pin
|
for pin in pin_list:
|
||||||
shape_list.append(pin)
|
(pin_layer, boundary) = pin
|
||||||
|
shape_list.append(pin)
|
||||||
|
|
||||||
return shape_list
|
return shape_list
|
||||||
|
|
||||||
|
|
@ -718,7 +724,7 @@ class VlsiLayout:
|
||||||
self.pins[label_text]
|
self.pins[label_text]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.pins[label_text] = []
|
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].
|
Pin can either be a label or a location,layer pair: [[x,y],layer].
|
||||||
"""
|
"""
|
||||||
debug.info(1,"Finding pins for {}.".format(pin_name))
|
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)
|
self.retrieve_pins(pin_name)
|
||||||
print_time("Retrieve pins", datetime.datetime.now(), start_time)
|
|
||||||
start_time = datetime.datetime.now()
|
|
||||||
self.analyze_pins(pin_name)
|
self.analyze_pins(pin_name)
|
||||||
print_time("Analyze pins", datetime.datetime.now(), start_time)
|
|
||||||
|
|
||||||
def find_blockages(self):
|
def find_blockages(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue