def get_phase_max_util(phase): wload = phase['wload'] # Take into account the duty cycle of the phase avg = wload.unscaled_duty_cycle_pct( plat_info=self.plat_info, ) * PELT_SCALE / 100 # Also take into account the period and the swing of PELT # around its "average" swing = pelt_swing( period=wload.period, duty_cycle=wload.duty_cycle_pct / 100, kind='above', ) return avg + swing
def get_pelt_swing(cls, pct): return pelt_swing( period=cls.TASK_PERIOD, duty_cycle=pct / 100, kind='above', ) / PELT_SCALE * 100