actions["build-csr-csv"] = True actions["build-csr-header"] = True actions["build-bitstream"] = True actions["load-bitstream"] = True if actions["build-bitstream"]: actions["build-csr-csv"] = True actions["build-csr-header"] = True actions["build-bitstream"] = True actions["load-bitstream"] = True if actions["clean"]: subprocess.call(["rm", "-rf", "build/*"]) if actions["build-csr-csv"]: csr_csv = cpuif.get_csr_csv(csr_regions) write_to_file(args.csr_csv, csr_csv) if actions["build-csr-header"]: csr_header = cpuif.get_csr_header(csr_regions, soc.get_constants(), with_access_functions=False) write_to_file(args.csr_header, csr_header) if actions["build-bitstream"]: vns = platform.build(soc, build_name=build_name) if hasattr(soc, "do_exit") and vns is not None: if hasattr(soc.do_exit, '__call__'): soc.do_exit(vns) if actions["load-bitstream"]: prog = platform.create_programmer() prog.load_bitstream("build/" + build_name + platform.bitstream_ext)
System Clk: {} MHz ===============================""".format(soc.clk_freq / 1000000)) # dependencies if actions["all"]: actions["build-csr-csv"] = True actions["build-bitstream"] = True actions["load-bitstream"] = True if actions["build-bitstream"]: actions["build-csr-csv"] = True actions["build-bitstream"] = True actions["load-bitstream"] = True if actions["clean"]: subprocess.call(["rm", "-rf", "build/*"]) if actions["build-csr-csv"]: csr_csv = cpuif.get_csr_csv(csr_regions) write_to_file(args.csr_csv, csr_csv) if actions["build-bitstream"]: vns = platform.build(soc, build_name=build_name, run=True) if hasattr(soc, "do_exit") and vns is not None: if hasattr(soc.do_exit, '__call__'): soc.do_exit(vns) if actions["load-bitstream"]: prog = platform.create_programmer() prog.load_bitstream("build/" + build_name + platform.bitstream_ext)