diff --git a/compiler/router/router.py b/compiler/router/router.py index 76f2e1cc..db0366b2 100644 --- a/compiler/router/router.py +++ b/compiler/router/router.py @@ -653,63 +653,49 @@ class router(router_tech): debug.info(2,"Analyzing pin groups for {}.".format(pin_name)) pin_set = self.pins[pin_name] - local_debug = False + local_debug = True # Put each pin in an equivalence class of it's own equiv_classes = [set([x]) for x in pin_set] if local_debug: - debug.info(0,"INITIAL\n",equiv_classes) + debug.info(0,"INITIAL\n"+pformat(equiv_classes)) - def compare_classes(class1, class2): - """ - Determine if two classes should be combined and if so return - the combined set. Otherwise, return None. - """ - if local_debug: - debug.info(0,"CLASS1:\n",class1) - debug.info(0,"CLASS2:\n",class2) - # Compare each pin in each class, - # and if any overlap, return the combined the class - for p1 in class1: - for p2 in class2: - if p1.overlaps(p2): - combined_class = class1 | class2 - if local_debug: - debug.info(0,"COMBINE:",pformat(combined_class)) - return combined_class - - if local_debug: - debug.info(0,"NO COMBINE") - return None - - - def combine_classes(equiv_classes): - """ Recursive function to combine classes. """ - local_debug = False - - if local_debug: - debug.info(0,"\nRECURSE:\n",pformat(equiv_classes)) - if len(equiv_classes)==1: - return(equiv_classes) - + first_run = True + while (first_run or len(equiv_classes)