def itp_ctrl(status="open"): if status == "open": itp_sv.pythonsv_init() return itp, sv elif status == "close": itp_sv.pythonsv_exit() return True else: return False
def test_get_gv_state(initial_step=False): itp, sv = itp_sv.pythonsv_init() result_process(True, "Initialize ITP environment.", test_exit=True, is_step_complete=initial_step) itp.unlock() itp.forcereconfig() sv.refresh() tme_active = sv.socket0.uncore.memss.mc0.ch0.tme.tme_activate.show() print(tme_active) max_ratio = sv.socket0.pcudata.global_max_ratio_2 grtee_ratio = sv.socket0.pcudata.global_guaranteed_ratio_2 effect_ratio = sv.socket0.pcudata.global_max_efficiency_ratio_2 itp_sv.pythonsv_exit() return max_ratio, grtee_ratio, effect_ratio