build/lattice/trellis: optionally allow failure if p&r timing not met
authorGabriel Somlo <gsomlo@gmail.com>
Thu, 24 Oct 2019 17:56:20 +0000 (13:56 -0400)
committerGabriel Somlo <gsomlo@gmail.com>
Thu, 24 Oct 2019 17:56:20 +0000 (13:56 -0400)
commit49372852da1614236fef11a929b69c3cdf44edd9
tree704c672e70b133e3339f7844bca04a6d5a1b136b
parentb6d35c92aed7f300dc820f5679d78a4558ed4755
build/lattice/trellis: optionally allow failure if p&r timing not met

When timing requirements are strict, allow the build process to fail upon
failure to meet timing. This facilitates running the build process from a
loop, repeatedly, until a "lucky" p&r solution is found, e.g.:

  while true; do
    litex/boards/targets/versa_ecp5.py --gateware-toolchain trellis \
      --sys-clk-freq=60e06 --cpu-type rocket --cpu-variant linux \
      --with-ethernet --yosys-nowidelut \
      --nextpnr-timingstrict
    if [ "$?" == "0" ]; then
      echo "Success" | mail -s "Build Succeeded" your@email.here
      break
    fi
  done

This augments commit #683e0668, which unconditionally forced p&r to
succeed, regardless of whether timing was met, via '--timing-allow-fail'.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
litex/boards/targets/versa_ecp5.py
litex/build/lattice/trellis.py