def run_synplify_batch(iPrj): run = '"%s" %s %s %s %s' % ( iPrj["pathTool"], "-product synplify_premier", "-licensetype synplifypremier", "-batch", "synthesis.prj", ) subprocess.Popen(run, env=xilinx_env.get()) loge = "" for i in range(13): time.sleep(3) try: loge = open(iPrj["pathLog"], "r") except IOError as e: log.debug(e) continue if loge: break if not loge: log.error("Cant start synthesis see " + synthesisPath + "/stdout.log") return done = False while True: where = loge.tell() res = loge.readline() if res.find("Mapper successful!") != -1: done = True if "@E" in res: done = True if res.endswith("\n"): print res elif done: break else: loge.seek(where) time.sleep(1) loge.close()
def run_synplify_gui(iPrj): subprocess.check_call([iPrj["pathTool"], iPrj["pathScript"]], env=xilinx_env.get())