Merge pull request #1537 from trabucayre/fix_windows_build
build/nextpnr_wrapper,yosys_nextpnr_toolchain,yosys_wrapper: fix LF for windows (#1536)
This commit is contained in:
commit
f007f812df
|
@ -203,7 +203,7 @@ class LatticeRadiantToolchain(GenericToolchain):
|
||||||
fail_stmt = ""
|
fail_stmt = ""
|
||||||
|
|
||||||
if self._synth_mode == "yosys":
|
if self._synth_mode == "yosys":
|
||||||
script_contents += self._yosys.get_yosys_call(target="script")
|
script_contents += self._yosys.get_yosys_call(target="script") + "\n"
|
||||||
|
|
||||||
script_contents += "{tool} {tcl_script}{fail_stmt}\n".format(
|
script_contents += "{tool} {tcl_script}{fail_stmt}\n".format(
|
||||||
tool = tool,
|
tool = tool,
|
||||||
|
|
|
@ -85,7 +85,7 @@ class NextPNRWrapper():
|
||||||
"""
|
"""
|
||||||
cmd = "{pnr_name} --{in_fmt} {build_name}.{in_fmt} --{constr_fmt}" + \
|
cmd = "{pnr_name} --{in_fmt} {build_name}.{in_fmt} --{constr_fmt}" + \
|
||||||
" {build_name}.{constr_fmt}" + \
|
" {build_name}.{constr_fmt}" + \
|
||||||
" --{out_fmt} {build_name}.{out_ext} {pnr_opts}\n"
|
" --{out_fmt} {build_name}.{out_ext} {pnr_opts}"
|
||||||
base_cmd = cmd.format(
|
base_cmd = cmd.format(
|
||||||
pnr_name = self.name,
|
pnr_name = self.name,
|
||||||
build_name = self._build_name,
|
build_name = self._build_name,
|
||||||
|
@ -96,7 +96,7 @@ class NextPNRWrapper():
|
||||||
pnr_opts = self._pnr_opts
|
pnr_opts = self._pnr_opts
|
||||||
)
|
)
|
||||||
if target == "makefile":
|
if target == "makefile":
|
||||||
return f"{self._build_name}.{self._out_format}:\n\t" + base_cmd
|
return f"{self._build_name}.{self._out_format}:\n\t" + base_cmd + "\n"
|
||||||
elif target == "script":
|
elif target == "script":
|
||||||
return base_cmd
|
return base_cmd
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -452,4 +452,4 @@ def _build_yosys_project(platform, synth_opts="", build_name=""):
|
||||||
synth_format = "edif"
|
synth_format = "edif"
|
||||||
)
|
)
|
||||||
yosys.build_script()
|
yosys.build_script()
|
||||||
return yosys.get_yosys_call("script")
|
return yosys.get_yosys_call("script") + "\n"
|
||||||
|
|
|
@ -194,6 +194,7 @@ class YosysNextPNRToolchain(GenericToolchain):
|
||||||
script_ext = ".sh"
|
script_ext = ".sh"
|
||||||
script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\nset -e\n"
|
script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\nset -e\n"
|
||||||
fail_stmt = ""
|
fail_stmt = ""
|
||||||
|
fail_stmt += "\n"
|
||||||
|
|
||||||
# yosys call
|
# yosys call
|
||||||
script_contents += self._yosys.get_yosys_call("script") + fail_stmt
|
script_contents += self._yosys.get_yosys_call("script") + fail_stmt
|
||||||
|
@ -201,7 +202,7 @@ class YosysNextPNRToolchain(GenericToolchain):
|
||||||
script_contents += self._nextpnr.get_call("script") + fail_stmt
|
script_contents += self._nextpnr.get_call("script") + fail_stmt
|
||||||
# pre packer (command to use after PNR step and before packer step)
|
# pre packer (command to use after PNR step and before packer step)
|
||||||
for pre_packer in self._pre_packer_cmd:
|
for pre_packer in self._pre_packer_cmd:
|
||||||
script_contents += f"{pre_packer} {self._pre_packer_opts[pre_packer]} {fail_stmt}\n"
|
script_contents += f"{pre_packer} {self._pre_packer_opts[pre_packer]} {fail_stmt}"
|
||||||
# packer call
|
# packer call
|
||||||
script_contents += f"{self.packer_cmd} {self._packer_opts} {fail_stmt}"
|
script_contents += f"{self.packer_cmd} {self._packer_opts} {fail_stmt}"
|
||||||
|
|
||||||
|
|
|
@ -130,9 +130,9 @@ class YosysWrapper():
|
||||||
=======
|
=======
|
||||||
str containing instruction and/or rule
|
str containing instruction and/or rule
|
||||||
"""
|
"""
|
||||||
base_cmd = f"yosys -l {self._build_name}.rpt {self._build_name}.ys\n"
|
base_cmd = f"yosys -l {self._build_name}.rpt {self._build_name}.ys"
|
||||||
if target == "makefile":
|
if target == "makefile":
|
||||||
return f"{self._build_name}.{self._synth_format}:\n\t" + base_cmd
|
return f"{self._build_name}.{self._synth_format}:\n\t" + base_cmd + "\n"
|
||||||
elif target == "script":
|
elif target == "script":
|
||||||
return base_cmd
|
return base_cmd
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue