diff --git a/compiler/router/router.py b/compiler/router/router.py index b9aa2518..d317d6b9 100644 --- a/compiler/router/router.py +++ b/compiler/router/router.py @@ -114,7 +114,7 @@ class router(router_tech): self.all_pins.update(pin_set) for pin in self.pins[pin_name]: - debug.info(2,"Retrieved pin {}".format(str(pin))) + debug.info(3,"Retrieved pin {}".format(str(pin))) @@ -123,6 +123,8 @@ class router(router_tech): Finds the pin shapes and converts to tracks. Pin can either be a label or a location,layer pair: [[x,y],layer]. """ + debug.info(1,"Finding pins for {}.".format(pin_name)) + self.retrieve_pins(pin_name) self.analyze_pins(pin_name) @@ -133,6 +135,7 @@ class router(router_tech): This doesn't consider whether the obstacles will be pins or not. They get reset later if they are not actually a blockage. """ + debug.info(1,"Finding blockages.") for layer in [self.vert_layer_number,self.horiz_layer_number]: self.retrieve_blockages(layer) @@ -203,15 +206,15 @@ class router(router_tech): if pg1.adjacent(pg2): combined = pin_group(pin_name, [], self) combined.combine_groups(pg1, pg2) - debug.info(2,"Combining {0} {1} {2}:".format(pin_name, index1, index2)) - debug.info(2, " {0}\n {1}".format(pg1.pins, pg2.pins)) - debug.info(2," --> {0}\n {1}".format(combined.pins,combined.grids)) + debug.info(3,"Combining {0} {1} {2}:".format(pin_name, index1, index2)) + debug.info(3, " {0}\n {1}".format(pg1.pins, pg2.pins)) + debug.info(3," --> {0}\n {1}".format(combined.pins,combined.grids)) remove_indices.update([index1,index2]) pin_groups.append(combined) break # Remove them in decreasing order to not invalidate the indices - debug.info(2,"Removing {}".format(sorted(remove_indices))) + debug.info(4,"Removing {}".format(sorted(remove_indices))) for i in sorted(remove_indices, reverse=True): del pin_groups[i] @@ -228,7 +231,7 @@ class router(router_tech): Make multiple passes of the combine adjacent pins until we have no more combinations or hit an iteration limit. """ - + debug.info(1,"Combining adjacent pins for {}.".format(pin_name)) # Start as None to signal the first iteration num_removed_pairs = None @@ -245,6 +248,7 @@ class router(router_tech): This will try to separate all grid pins by the supplied number of separation tracks (default is to prevent adjacency). """ + debug.info(1,"Separating adjacent pins.") # Commented out to debug with SCMOS #if separation==0: # return @@ -270,7 +274,7 @@ class router(router_tech): grids_g1, grids_g2 = pg1.adjacent_grids(pg2, separation) # These should have the same length, so... if len(grids_g1)>0: - debug.info(1,"Adjacent grids {0} {1} {2} {3}".format(index1,grids_g1,index2,grids_g2)) + debug.info(3,"Adjacent grids {0} {1} {2} {3}".format(index1,grids_g1,index2,grids_g2)) self.remove_adjacent_grid(pg1, grids_g1, pg2, grids_g2) def remove_adjacent_grid(self, pg1, grids1, pg2, grids2): @@ -292,12 +296,12 @@ class router(router_tech): # First, see if we can remove grids that are in the secondary grids # i.e. they aren't necessary to the pin grids if bigger_grids.issubset(bigger.secondary_grids): - debug.info(1,"Removing {} from bigger {}".format(str(bigger_grids), bigger)) + debug.info(3,"Removing {} from bigger {}".format(str(bigger_grids), bigger)) bigger.grids.difference_update(bigger_grids) self.blocked_grids.update(bigger_grids) return elif smaller_grids.issubset(smaller.secondary_grids): - debug.info(1,"Removing {} from smaller {}".format(str(smaller_grids), smaller)) + debug.info(3,"Removing {} from smaller {}".format(str(smaller_grids), smaller)) smaller.grids.difference_update(smaller_grids) self.blocked_grids.update(smaller_grids) return @@ -426,7 +430,7 @@ class router(router_tech): def convert_blockages(self): """ Convert blockages to grid tracks. """ - + debug.info(1,"Converting blockages.") for blockage in self.blockages: debug.info(3,"Converting blockage {}".format(str(blockage))) blockage_list = self.convert_blockage(blockage) @@ -684,6 +688,7 @@ class router(router_tech): """ Convert the pin groups into pin tracks and blockage tracks. """ + debug.info(1,"Converting pins for {}.".format(pin_name)) for pg in self.pin_groups[pin_name]: pg.convert_pin() @@ -733,7 +738,7 @@ class router(router_tech): debug.check(index{2} {3}".format(name,ll,ur,pin)) + debug.info(2,"Adding supply rail {0} {1}->{2} {3}".format(name,ll,ur,pin)) self.cell.add_layout_pin(text=name, layer=pin.layer, offset=pin.ll(), @@ -387,6 +387,7 @@ class supply_router(router): Route the horizontal and vertical supply rails across the entire design. Must be done with lower left at 0,0 """ + debug.info(1,"Routing supply rail {0}.".format(name)) # Compute the grid locations of the supply rails self.compute_supply_rails(name, supply_number) @@ -420,14 +421,14 @@ class supply_router(router): """ remaining_components = sum(not x.is_routed() for x in self.pin_groups[pin_name]) - debug.info(1,"Pin {0} has {1} remaining components to route.".format(pin_name, - remaining_components)) + debug.info(1,"Routing {0} with {1} pin components to route.".format(pin_name, + remaining_components)) for index,pg in enumerate(self.pin_groups[pin_name]): if pg.is_routed(): continue - debug.info(2,"Routing component {0} {1}".format(pin_name, index)) + debug.info(3,"Routing component {0} {1}".format(pin_name, index)) # Clear everything in the routing grid. self.rg.reinit() @@ -453,7 +454,7 @@ class supply_router(router): """ Add the supply rails of given name as a routing target. """ - debug.info(2,"Add supply rail target {}".format(pin_name)) + debug.info(4,"Add supply rail target {}".format(pin_name)) # Add the wire itself as the target self.rg.set_target(self.supply_rail_wire_tracks[pin_name]) # But unblock all the rail tracks including the space @@ -464,7 +465,7 @@ class supply_router(router): """ Add the supply rails of given name as a routing target. """ - debug.info(3,"Blocking supply rail") + debug.info(4,"Blocking supply rail") for rail_name in self.supply_rail_tracks: self.rg.set_blocked(self.supply_rail_tracks[rail_name])