LoadCircuit(circuit, "v") circuit.lev() circuit.SCOAP_CC() circuit.SCOAP_CO() if args.func == "genTP": """ generate original test pattern file, orig-TP Important note, if synv is selected, will generate for the synthesized version But it does not have any differece! """ path = "../data/patterns/{}_TP{}.tp".format(args.ckt, args.tp) print("generating test patterns for {} with {} tps in {}".format( ckt_name, args.tp, path)) circuit = Circuit(ckt_name) LoadCircuit(circuit, "v") circuit.lev() circuit.gen_tp_file(args.tp, path) elif args.func == "saveStatTP": """ generate stafan stat file based on orig-TPs, and given tp The version must be added to the name of .stat file""" tp_path = "../data/patterns/{}_TP{}.tp".format(args.ckt, args.tpLoad) if not os.path.exists(tp_path): raise NameError("no file found in {}".format(tp_path)) config.STAFAN_C_MIN = 1.0 / (10 * args.tp) time_start = time.time() circuit = Circuit(ckt_name) LoadCircuit(circuit, "v") circuit.lev() circuit.SCOAP_CC() circuit.SCOAP_CO()