Merge pull request #1384 from trabucayre/fix_xilinx_yosys_nextpnr_toolchain

build/xilinx/yosys_nextpnr: _run_make -> run_script
This commit is contained in:
enjoy-digital 2022-07-25 12:10:41 +02:00 committed by GitHub
commit 29c2aed64a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 11 deletions

View File

@ -74,17 +74,6 @@ class _MakefileGenerator:
return "\n".join(makefile)
def _run_make():
make_cmd = ["make", "-j1"]
if which("nextpnr-xilinx") is None:
msg = "Unable to find Yosys+Nextpnr toolchain, please:\n"
msg += "- Add Yosys and Nextpnr tools to your $PATH."
raise OSError(msg)
if tools.subprocess_call_filtered(make_cmd, common.colors) != 0:
raise OSError("Error occured during yosys or nextpnr script execution.")
# YosysNextpnrToolchain -------------------------------------------------------------------------------
class YosysNextpnrToolchain(GenericToolchain):
@ -184,6 +173,17 @@ class YosysNextpnrToolchain(GenericToolchain):
tools.write_to_file("Makefile", makefile.generate())
return "Makefile"
def run_script(self, script):
make_cmd = ["make", "-j1"]
if which("nextpnr-xilinx") is None:
msg = "Unable to find Yosys+Nextpnr toolchain, please:\n"
msg += "- Add Yosys and Nextpnr tools to your $PATH."
raise OSError(msg)
if tools.subprocess_call_filtered(make_cmd, common.colors) != 0:
raise OSError("Error occured during yosys or nextpnr script execution.")
def build_timing_constraints(self, vns):
self.platform.add_platform_command(_xdc_separator("Clock constraints"))
#for clk, period in sorted(self.clocks.items(), key=lambda x: x[0].duid):