def _run_quartus(build_name, quartus_path):
build_script_contents = """# Autogenerated by mibuild
-quartus_map {build_name}.qpf
-quartus_fit {build_name}.qpf
-quartus_asm {build_name}.qpf
-quartus_sta {build_name}.qpf
+quartus_map --read_settings_files=on --write_settings_files=off {build_name} -c {build_name}
+quartus_fit --read_settings_files=off --write_settings_files=off {build_name} -c {build_name}
+quartus_asm --read_settings_files=off --write_settings_files=off {build_name} -c {build_name}
+quartus_sta {build_name} -c {build_name}
""".format(build_name=build_name)
build_script_file = "build_" + build_name + ".sh"
_run_quartus(build_name, quartus_path)
os.chdir("..")
-
- def build_arg_ns(self, ns, *args, **kwargs):
- for n in ["build_dir", "build_name", "quartus_path"]:
- kwargs[n] = getattr(ns, n)
- kwargs["run"] = not ns.no_run
- self.build(*args, **kwargs)
-
- def add_arguments(self, parser):
- parser.add_argument("--build-dir", default="build", help="Set the directory in which to generate files and run Quartus")
- parser.add_argument("--build-name", default="top", help="Base name for the generated files")
- parser.add_argument("--quartus-path", default="/opt/Altera", help="Quartus installation path (without version directory)")
- parser.add_argument("--no-run", action="store_true", help="Only generate files, do not run Quartus")