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 = [
|
||||
"yosys -l {build_name}.rpt {build_name}.ys",
|
||||
"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"
|
||||
]
|
||||
|
||||
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"):
|
||||
script_ext = ".bat"
|
||||
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,
|
||||
architecture = architecture,
|
||||
package = package,
|
||||
timefailarg = "--timing-allow-fail" if not timingstrict else "",
|
||||
fail_stmt = fail_stmt)
|
||||
|
||||
build_script_file = "build_" + build_name + script_ext
|
||||
|
@ -153,6 +154,7 @@ class LatticeIceStormToolchain:
|
|||
build_name = "top",
|
||||
synth_opts = "",
|
||||
run = True,
|
||||
timingstrict = False,
|
||||
**kwargs):
|
||||
|
||||
# Create build directory
|
||||
|
@ -185,7 +187,7 @@ class LatticeIceStormToolchain:
|
|||
(family, architecture, package) = parse_device(platform.device)
|
||||
|
||||
# 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
|
||||
if run:
|
||||
|
|
Loading…
Reference in New Issue