Provide more stats in -v output

This commit is contained in:
Matt Guthaus 2018-12-06 14:11:15 -08:00
parent 514f6fda27
commit c51752d245
2 changed files with 19 additions and 12 deletions

View File

@ -236,16 +236,17 @@ class router(router_tech):
This will try to separate all grid pins by the supplied number of separation This will try to separate all grid pins by the supplied number of separation
tracks (default is to prevent adjacency). tracks (default is to prevent adjacency).
""" """
debug.info(1,"Separating adjacent pins.")
# Commented out to debug with SCMOS # Commented out to debug with SCMOS
#if separation==0: #if separation==0:
# return # return
pin_names = self.pin_groups.keys() pin_names = self.pin_groups.keys()
for pin_name1 in pin_names: for i,pin_name1 in enumerate(pin_names):
for pin_name2 in pin_names: for j,pin_name2 in enumerate(pin_names):
if pin_name1==pin_name2: if i==j:
continue continue
if i>j:
return
self.separate_adjacent_pin(pin_name1, pin_name2, separation) self.separate_adjacent_pin(pin_name1, pin_name2, separation)
def separate_adjacent_pin(self, pin_name1, pin_name2, separation): def separate_adjacent_pin(self, pin_name1, pin_name2, separation):
@ -256,14 +257,19 @@ class router(router_tech):
Try to do this intelligently to keep th pins enclosed. Try to do this intelligently to keep th pins enclosed.
""" """
debug.info(1,"Comparing {0} and {1} adjacency".format(pin_name1, pin_name2)) debug.info(1,"Comparing {0} and {1} adjacency".format(pin_name1, pin_name2))
removed_grids = 0
for index1,pg1 in enumerate(self.pin_groups[pin_name1]): for index1,pg1 in enumerate(self.pin_groups[pin_name1]):
for index2,pg2 in enumerate(self.pin_groups[pin_name2]): for index2,pg2 in enumerate(self.pin_groups[pin_name2]):
adj_grids = pg1.adjacent_grids(pg2, separation) adj_grids = pg1.adjacent_grids(pg2, separation)
removed_grids += len(adj_grids)
# These should have the same length, so... # These should have the same length, so...
if len(adj_grids)>0: if len(adj_grids)>0:
debug.info(3,"Adjacent grids {0} {1} adj={2}".format(index1,index2,adj_grids)) debug.info(3,"Adjacent grids {0} {1} adj={2}".format(index1,index2,adj_grids))
self.remove_adjacent_grid(pg1, pg2, adj_grids) self.remove_adjacent_grid(pg1, pg2, adj_grids)
debug.info(1,"Removed {} adjacent grids.".format(removed_grids))
def remove_adjacent_grid(self, pg1, pg2, adj_grids): def remove_adjacent_grid(self, pg1, pg2, adj_grids):
""" """
Remove one of the adjacent grids in a heuristic manner. Remove one of the adjacent grids in a heuristic manner.

View File

@ -101,7 +101,7 @@ class supply_router(router):
# These are the wire tracks # These are the wire tracks
wire_tracks = self.supply_rail_tracks[pin_name] wire_tracks = self.supply_rail_tracks[pin_name]
routed_count=0
for pg in self.pin_groups[pin_name]: for pg in self.pin_groups[pin_name]:
if pg.is_routed(): if pg.is_routed():
continue continue
@ -109,6 +109,7 @@ class supply_router(router):
# First, check if we just overlap, if so, we are done. # First, check if we just overlap, if so, we are done.
overlap_grids = wire_tracks & pg.grids overlap_grids = wire_tracks & pg.grids
if len(overlap_grids)>0: if len(overlap_grids)>0:
routed_count += 1
pg.set_routed() pg.set_routed()
continue continue
@ -116,7 +117,7 @@ class supply_router(router):
#pg.create_simple_overlap_enclosure(pg.grids) #pg.create_simple_overlap_enclosure(pg.grids)
#pg.add_enclosure(self.cell) #pg.add_enclosure(self.cell)
debug.info(1,"Routed {} simple overlap pins".format(routed_count))
def finalize_supply_rails(self, name): def finalize_supply_rails(self, name):
""" """
@ -366,7 +367,7 @@ class supply_router(router):
""" """
remaining_components = sum(not x.is_routed() for x in self.pin_groups[pin_name]) remaining_components = sum(not x.is_routed() for x in self.pin_groups[pin_name])
debug.info(1,"Routing {0} with {1} pin components to route.".format(pin_name, debug.info(1,"Maze routing {0} with {1} pin components to connect.".format(pin_name,
remaining_components)) remaining_components))
for index,pg in enumerate(self.pin_groups[pin_name]): for index,pg in enumerate(self.pin_groups[pin_name]):