diff --git a/compiler/characterizer/delay.py b/compiler/characterizer/delay.py index 89bf3be6..d737d2c9 100644 --- a/compiler/characterizer/delay.py +++ b/compiler/characterizer/delay.py @@ -345,20 +345,19 @@ class delay(): target_period = 0.5 * (ub_period + lb_period) debug.info(1, "MinPeriod Search: {0}ns (ub: {1} lb: {2})".format(target_period, - ub_period, - lb_period)) + ub_period, + lb_period)) (success, delay_out) = self.try_period(feasible_period, target_period, data_value) if success: - if ch.relative_compare(ub_period, target_period): - # use the two values to compare, but only return the ub since it is guaranteed feasible - (success, delay_out) = self.try_period(feasible_period, ub_period, data_value) - return (ub_period, delay_out) - fail_flag = False ub_period = target_period else: lb_period = target_period + if ch.relative_compare(ub_period, lb_period): + # use the two values to compare, but only return the ub since it is guaranteed feasible + (success, delay_out) = self.try_period(feasible_period, ub_period, data_value) + return (ub_period, delay_out) self.error("Should not reach here.",-1) return (target_period, delay_out)