From: Florent Kermarrec Date: Fri, 1 Mar 2019 13:20:00 +0000 (+0100) Subject: build/lattice/trellis: basecfg now integrated in nextpnr X-Git-Tag: 24jan2021_ls180~1375 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b34c07da990f5a738e3c776c8654af510788b75;p=litex.git build/lattice/trellis: basecfg now integrated in nextpnr --- diff --git a/litex/build/lattice/trellis.py b/litex/build/lattice/trellis.py index 397b2dbd..b804df7a 100644 --- a/litex/build/lattice/trellis.py +++ b/litex/build/lattice/trellis.py @@ -60,7 +60,7 @@ def _build_lpf(named_sc, named_pc): def _build_script(source, build_template, build_name, architecture, - basecfg, freq_constraint): + freq_constraint): if sys.platform in ("win32", "cygwin"): script_ext = ".bat" build_script_contents = "@echo off\nrem Autogenerated by Migen\n\n" @@ -74,7 +74,6 @@ def _build_script(source, build_template, build_name, architecture, s_fail = s + "{fail_stmt}\n" # Required so Windows scripts fail early. build_script_contents += s_fail.format(build_name=build_name, architecture=architecture, - basecfg=basecfg, freq_constraint=freq_constraint, fail_stmt=fail_stmt) @@ -130,7 +129,7 @@ class LatticeTrellisToolchain: self.build_template = [ "yosys -q -l {build_name}.rpt {build_name}.ys", - "nextpnr-ecp5 --json {build_name}.json --lpf {build_name}.lpf --textcfg {build_name}.config --basecfg {basecfg} --{architecture} --freq {freq_constraint}", + "nextpnr-ecp5 --json {build_name}.json --lpf {build_name}.lpf --textcfg {build_name}.config --{architecture} --freq {freq_constraint}", "ecppack {build_name}.config {build_name}.bit" ] @@ -166,16 +165,14 @@ class LatticeTrellisToolchain: for _ in self.yosys_template) tools.write_to_file(yosys_script_file, yosys_script_contents) - # transform platform.device to nextpnr's architecture / basecfg + # transform platform.device to nextpnr's architecture (family, size, package) = platform.device.split("-") architecture = nextpnr_ecp5_architectures[(family + "-" + size).lower()] - basecfg = "empty_" + (family + "-" + size).lower() + ".config" - basecfg = os.path.join(toolchain_path, "misc", "basecfgs", basecfg) freq_constraint = str(max(self.freq_constraints.values(), default=0.0)) script = _build_script(False, self.build_template, build_name, - architecture, basecfg, freq_constraint) + architecture, freq_constraint) # run scripts if run: