build/xilinx/yosys_nextpnr: _run_make -> run_script
This commit is contained in:
parent
b9a1fec30f
commit
f37a505c46
|
@ -74,17 +74,6 @@ class _MakefileGenerator:
|
||||||
return "\n".join(makefile)
|
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 -------------------------------------------------------------------------------
|
# YosysNextpnrToolchain -------------------------------------------------------------------------------
|
||||||
|
|
||||||
class YosysNextpnrToolchain(GenericToolchain):
|
class YosysNextpnrToolchain(GenericToolchain):
|
||||||
|
@ -184,6 +173,17 @@ class YosysNextpnrToolchain(GenericToolchain):
|
||||||
tools.write_to_file("Makefile", makefile.generate())
|
tools.write_to_file("Makefile", makefile.generate())
|
||||||
return "Makefile"
|
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):
|
def build_timing_constraints(self, vns):
|
||||||
self.platform.add_platform_command(_xdc_separator("Clock constraints"))
|
self.platform.add_platform_command(_xdc_separator("Clock constraints"))
|
||||||
#for clk, period in sorted(self.clocks.items(), key=lambda x: x[0].duid):
|
#for clk, period in sorted(self.clocks.items(), key=lambda x: x[0].duid):
|
||||||
|
|
Loading…
Reference in New Issue