mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
litex/build/altera/quartus: changes to make top level assigment in .qsf file with build name
This commit is contained in:
parent
8558065fca
commit
04939990ac
1 changed files with 4 additions and 3 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue