def compile_standard_libraries(vunit_obj, output_path): """ Compile Xilinx standard libraries using Vivado TCL command """ done_token = join(output_path, "all_done.txt") simulator_class = SIMULATOR_FACTORY.select_simulator() if not exists(done_token): print("Compiling standard libraries into %s ..." % abspath(output_path)) simname = simulator_class.name # Vivado calls rivierapro for riviera if simname == "rivierapro": simname = "riviera" run_vivado(join(dirname(__file__), "tcl", "compile_standard_libs.tcl"), tcl_args=[ simname, simulator_class.find_prefix().replace("\\", "/"), output_path ]) else: print("Standard libraries already exists in %s, skipping" % abspath(output_path)) for library_name in ["unisim", "unimacro", "unifast", "secureip", "xpm"]: path = join(output_path, library_name) if exists(path): vunit_obj.add_external_library(library_name, path) with open(done_token, "w") as fptr: fptr.write("done")
def compile_standard_libraries(vunit_obj, output_path): """ Compile Xilinx standard libraries using Vivado TCL command """ done_token = join(output_path, "all_done.txt") simulator_class = SIMULATOR_FACTORY.select_simulator() if not exists(done_token): print("Compiling standard libraries into %s ..." % abspath(output_path)) simname = simulator_class.name # Vivado calls rivierapro for riviera if simname == "rivierapro": simname = "riviera" run_vivado(join(dirname(__file__), "tcl", "compile_standard_libs.tcl"), tcl_args=[simname, simulator_class.find_prefix().replace("\\", "/"), output_path]) else: print("Standard libraries already exists in %s, skipping" % abspath(output_path)) for library_name in ["unisim", "unimacro", "unifast", "secureip", "xpm"]: path = join(output_path, library_name) if exists(path): vunit_obj.add_external_library(library_name, path) with open(done_token, "w") as fptr: fptr.write("done")
def main(): root = normpath(dirname(__file__)) project_name = "myproject" if exists(join(root, project_name)): rmtree(join(root, project_name)) run_vivado(join(root, "tcl", "generate_project.tcl"), tcl_args=[root, "myproject"])
def main(): root = Path(__file__).parent.resolve() project_name = "myproject" if (root / project_name).exists(): rmtree(root / project_name) run_vivado(root / "tcl" / "generate_project.tcl", tcl_args=[root, "myproject"])
def compile_standard_libraries(vunit_obj, output_path): """ Compile Xilinx standard libraries using Vivado TCL command """ done_token = Path(output_path) / "all_done.txt" simulator_class = SIMULATOR_FACTORY.select_simulator() if not done_token.exists(): print("Compiling standard libraries into %s ..." % str(Path(output_path).resolve())) simname = simulator_class.name # Vivado calls rivierapro for riviera if simname == "rivierapro": simname = "riviera" run_vivado( str(Path(__file__).parent / "tcl" / "compile_standard_libs.tcl"), tcl_args=[ simname, simulator_class.find_prefix().replace("\\", "/"), output_path, ], ) else: print("Standard libraries already exists in %s, skipping" % str(Path(output_path).resolve())) for library_name in ["unisim", "unimacro", "unifast", "secureip", "xpm"]: path = str(Path(output_path) / library_name) if Path(path).exists(): vunit_obj.add_external_library(library_name, path) with done_token.open("w") as fptr: fptr.write("done")