_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"
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
build_name = "top",
synth_opts = "",
run = True,
+ timingstrict = False,
**kwargs):
# Create build directory
(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: