From: vytautasb Date: Mon, 8 Apr 2019 10:34:59 +0000 (+0300) Subject: litex/build/altera/quartus: changes to make top level assigment in .qsf file with... X-Git-Tag: 24jan2021_ls180~1343^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=04939990ac5b4e29d47309318152bb8e6dc5e5c5;p=litex.git litex/build/altera/quartus: changes to make top level assigment in .qsf file with build name --- diff --git a/litex/build/altera/quartus.py b/litex/build/altera/quartus.py index 1ebc08da..6d36ce63 100644 --- a/litex/build/altera/quartus.py +++ b/litex/build/altera/quartus.py @@ -50,7 +50,7 @@ def _format_qsf(signame, pin, others, resname): return '\n'.join(fmt_c) -def _build_qsf(named_sc, named_pc): +def _build_qsf(named_sc, named_pc, build_name): lines = [] for sig, pins, others, resname in named_sc: if len(pins) > 1: @@ -64,7 +64,8 @@ def _build_qsf(named_sc, named_pc): lines.append("") lines.append("\n\n".join(named_pc)) - lines.append("set_global_assignment -name top_level_entity top") + # Set top level name to "build_name" in .qsf file instead always use "top" name + lines.append("set_global_assignment -name top_level_entity " + build_name) return "\n".join(lines) @@ -86,7 +87,7 @@ def _build_files(device, sources, vincpaths, named_sc, named_pc, build_name): lines.append("set_global_assignment -name SEARCH_PATH {}".format( path.replace("\\", "/"))) - lines.append(_build_qsf(named_sc, named_pc)) + lines.append(_build_qsf(named_sc, named_pc, build_name)) lines.append("set_global_assignment -name DEVICE {}".format(device)) tools.write_to_file("{}.qsf".format(build_name), "\n".join(lines))