build/lattice/icestorm: add timingstrict parameter and default to False. (similar behavior than others backends)
This commit is contained in:
parent
1e9aa64387
commit
38d7f8a6e6
|
@ -90,11 +90,11 @@ def parse_device(device):
|
||||||
_build_template = [
|
_build_template = [
|
||||||
"yosys -l {build_name}.rpt {build_name}.ys",
|
"yosys -l {build_name}.rpt {build_name}.ys",
|
||||||
"nextpnr-ice40 --json {build_name}.json --pcf {build_name}.pcf --asc {build_name}.txt \
|
"nextpnr-ice40 --json {build_name}.json --pcf {build_name}.pcf --asc {build_name}.txt \
|
||||||
--pre-pack {build_name}_pre_pack.py --{architecture} --package {package}",
|
--pre-pack {build_name}_pre_pack.py --{architecture} --package {package} {timefailarg}",
|
||||||
"icepack -s {build_name}.txt {build_name}.bin"
|
"icepack -s {build_name}.txt {build_name}.bin"
|
||||||
]
|
]
|
||||||
|
|
||||||
def _build_script(build_template, build_name, architecture, package):
|
def _build_script(build_template, build_name, architecture, package, timingstrict):
|
||||||
if sys.platform in ("win32", "cygwin"):
|
if sys.platform in ("win32", "cygwin"):
|
||||||
script_ext = ".bat"
|
script_ext = ".bat"
|
||||||
build_script_contents = "@echo off\nrem Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\n\n"
|
build_script_contents = "@echo off\nrem Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\n\n"
|
||||||
|
@ -110,6 +110,7 @@ def _build_script(build_template, build_name, architecture, package):
|
||||||
build_name = build_name,
|
build_name = build_name,
|
||||||
architecture = architecture,
|
architecture = architecture,
|
||||||
package = package,
|
package = package,
|
||||||
|
timefailarg = "--timing-allow-fail" if not timingstrict else "",
|
||||||
fail_stmt = fail_stmt)
|
fail_stmt = fail_stmt)
|
||||||
|
|
||||||
build_script_file = "build_" + build_name + script_ext
|
build_script_file = "build_" + build_name + script_ext
|
||||||
|
@ -153,6 +154,7 @@ class LatticeIceStormToolchain:
|
||||||
build_name = "top",
|
build_name = "top",
|
||||||
synth_opts = "",
|
synth_opts = "",
|
||||||
run = True,
|
run = True,
|
||||||
|
timingstrict = False,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
|
|
||||||
# Create build directory
|
# Create build directory
|
||||||
|
@ -185,7 +187,7 @@ class LatticeIceStormToolchain:
|
||||||
(family, architecture, package) = parse_device(platform.device)
|
(family, architecture, package) = parse_device(platform.device)
|
||||||
|
|
||||||
# Generate build script
|
# Generate build script
|
||||||
script = _build_script(self.build_template, build_name, architecture, package)
|
script = _build_script(self.build_template, build_name, architecture, package, timingstrict)
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
if run:
|
if run:
|
||||||
|
|
Loading…
Reference in New Issue