build/xilinx/yosys_nextpnr: _run_make -> run_script

This commit is contained in:
Gwenhael Goavec-Merou 2022-07-23 15:21:50 +02:00
parent b9a1fec30f
commit f37a505c46
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):