Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom paths for nextpnr binaries #3

Open
wants to merge 3 commits into
base: fpga-tool-perf
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion edalize/nextpnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def configure_main(self):
"Nextpnr-fpga_interchange require chipdb to be specified."
)
package = self.tool_options.get("package")
bin_path = self.tool_options.get("binary_path")

for f in self.files:
if f["file_type"] == "CST":
Expand Down Expand Up @@ -167,13 +168,18 @@ def configure_main(self):
targets = self.name + ".phys"
constraints = ["--xdc", xdc_file]
output = ["--phys", targets]
elif arch == "xilinx":
targets = self.name + ".fasm"
constraints = ["--xdc", xdc_file] if xdc_file else []
output = ["--fasm", targets]
else:
targets = self.name + ".asc"
constraints = ["--pcf", pcf_file] if pcf_file else []
output = ["--asc", targets]

depends = netlist
command = ["nextpnr-" + arch, "-l", "next.log"]
command = ["nextpnr-" + arch] if bin_path is None else [bin_path]
command += ["-l", "next.log"]
command += arch_options + self.tool_options.get("nextpnr_options", [])
command += constraints
if is_interchange:
Expand Down