class AlteraPlatform(GenericPlatform):
bitstream_ext = ".sof"
+ create_rbf = True
def __init__(self, *args, toolchain="quartus", **kwargs):
GenericPlatform.__init__(self, *args, **kwargs)
tools.write_to_file("{}.qsf".format(build_name), "\n".join(lines))
-def _run_quartus(build_name, quartus_path):
+def _run_quartus(build_name, quartus_path, create_rbf):
build_script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\n"
build_script_contents += """
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}
+quartus_sta {build_name} -c {build_name}"""
+ if create_rbf:
+ build_script_contents +="""
if [ -f "{build_name}.sof" ]
then
quartus_cpf -c {build_name}.sof {build_name}.rbf
fi
-""".format(build_name=build_name) # noqa
+"""
+ build_script_contents = build_script_contents.format(build_name=build_name) # noqa
build_script_file = "build_" + build_name + ".sh"
tools.write_to_file(build_script_file,
build_script_contents,
_build_sdc(self.clocks, self.false_paths, v_output.ns, build_name)
if run:
- _run_quartus(build_name, toolchain_path)
+ _run_quartus(build_name, toolchain_path, platform.create_rbf)
os.chdir(cwd)