From f37a505c469f669981a22578aabf0b05f7f65d5f Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sat, 23 Jul 2022 15:21:50 +0200 Subject: [PATCH] build/xilinx/yosys_nextpnr: _run_make -> run_script --- litex/build/xilinx/yosys_nextpnr.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/litex/build/xilinx/yosys_nextpnr.py b/litex/build/xilinx/yosys_nextpnr.py index ef93b37b7..71e8fbf7d 100644 --- a/litex/build/xilinx/yosys_nextpnr.py +++ b/litex/build/xilinx/yosys_nextpnr.py @@ -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):