aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.fix_yosys_abc.patch37
-rw-r--r--.install_yosys.sh4
-rw-r--r--.travis.yml45
3 files changed, 74 insertions, 12 deletions
diff --git a/.fix_yosys_abc.patch b/.fix_yosys_abc.patch
new file mode 100644
index 00000000..dac2fb18
--- /dev/null
+++ b/.fix_yosys_abc.patch
@@ -0,0 +1,37 @@
+diff --git a/Makefile b/Makefile
+index 0a61fe65..ef336faf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,10 +82,10 @@ OBJS = kernel/version_$(GIT_REV).o
+ # is just a symlink to your actual ABC working directory, as 'make mrproper'
+ # will remove the 'abc' directory and you do not want to accidentally
+ # delete your work on ABC..
+-ABCREV = eb6eca6807cc
++ABCREV = a2d59be
+ ABCPULL = 1
+-ABCURL ?= https://bitbucket.org/alanmi/abc
+-ABCMKARGS = CC="$(CXX)" CXX="$(CXX)"
++ABCURL ?= https://github.com/berkeley-abc/abc
++ABCMKARGS = CC="$(CXX)" CXX="$(CXX)" ABC_USE_LIBSTDCXX=1
+
+ # set ABCEXTERNAL = <abc-command> to use an external ABC instance
+ # Note: The in-tree ABC (yosys-abc) will not be installed when ABCEXTERNAL is set.
+@@ -386,14 +386,14 @@ yosys-config: misc/yosys-config.in
+ abc/abc-$(ABCREV)$(EXE):
+ $(P)
+ ifneq ($(ABCREV),default)
+- $(Q) if ( cd abc 2> /dev/null && hg identify; ) | grep -q +; then \
++ $(Q) if ( cd abc 2> /dev/null && ! git diff-index --quiet HEAD; ); then \
+ echo 'REEBE: NOP pbagnvaf ybpny zbqvsvpngvbaf! Frg NOPERI=qrsnhyg va Lbflf Znxrsvyr!' | tr 'A-Za-z' 'N-ZA-Mn-za-m'; false; \
+ fi
+- $(Q) if test "`cd abc 2> /dev/null && hg identify | cut -f1 -d' '`" != "$(ABCREV)"; then \
++ $(Q) if test "`cd abc 2> /dev/null && git rev-parse --short HEAD`" != "$(ABCREV)"; then \
+ test $(ABCPULL) -ne 0 || { echo 'REEBE: NOP abg hc gb qngr naq NOPCHYY frg gb 0 va Znxrsvyr!' | tr 'A-Za-z' 'N-ZA-Mn-za-m'; exit 1; }; \
+ echo "Pulling ABC from $(ABCURL):"; set -x; \
+- test -d abc || hg clone $(ABCURL) abc; \
+- cd abc && $(MAKE) DEP= clean && hg pull && hg update -r $(ABCREV); \
++ test -d abc || git clone $(ABCURL) abc; \
++ cd abc && $(MAKE) DEP= clean && git fetch origin master && git checkout $(ABCREV); \
+ fi
+ endif
+ $(Q) rm -f abc/abc-[0-9a-f]*
diff --git a/.install_yosys.sh b/.install_yosys.sh
index 2c627ab1..a9ab9c25 100644
--- a/.install_yosys.sh
+++ b/.install_yosys.sh
@@ -5,7 +5,9 @@ if [ ! -f $INSTALL_DIR/bin/yosys ]; then
git clone https://github.com/cliffordwolf/yosys.git
cd yosys
git pull
- git checkout master
+ git checkout yosys-0.7
+ # Workaround moving ABC repo
+ git apply ../.fix_yosys_abc.patch
make
make PREFIX=$INSTALL_DIR install
fi
diff --git a/.travis.yml b/.travis.yml
index 519047b4..ff8c1e82 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,4 @@
language: scala
-scala:
- - 2.11.12
- - 2.12.4
sudo: false
cache:
@@ -12,32 +9,58 @@ cache:
git:
depth: 10
-sbt_args: -Dsbt.log.noformat=true
-
env:
global:
INSTALL_DIR=$TRAVIS_BUILD_DIR/install
VERILATOR_ROOT=$INSTALL_DIR
PATH=$PATH:$VERILATOR_ROOT/bin:$TRAVIS_BUILD_DIR/utils/bin
+ SBT_ARGS="-Dsbt.log.noformat=true"
-before_script:
- - bash .install_verilator.sh
- - verilator --version
- - bash .install_yosys.sh
- - yosys -V
+stages:
+ - prepare
+ - test
+# We do not use the built-in tests as generated by using multiple Scala
+# versions because the cache is not shared between stages with any
+# environmental differences.
+# Instead, we specify the version of Scala manually for each test (or leave it
+# as the default as defined in FIRRTL's build.sbt).
jobs:
include:
+ # Because these write to the same install directory, they must run in the
+ # same script
+ - stage: prepare
+ script:
+ - bash .install_verilator.sh
+ - verilator --version
+ - bash .install_yosys.sh
+ - yosys -V
+ - stage: test
+ script:
+ - verilator --version
+ - sbt ++2.11.12 $SBT_ARGS test
+ - stage: test
+ script:
+ - verilator --version
+ - sbt ++2.12.4 $SBT_ARGS test
+ # For Chisel tests we just use the default version
- stage: test
script:
- - sbt clean assembly publishLocal
+ - verilator --version
+ - sbt $SBT_ARGS clean assembly publishLocal
- bash .run_chisel_tests.sh
- stage: test
script:
+ - yosys -V
+ - "travis_wait 30 sleep 1800 &"
- ./.run_formal_checks.sh RocketCore
- stage: test
script:
+ - yosys -V
+ - "travis_wait 30 sleep 1800 &"
- ./.run_formal_checks.sh FPU
- stage: test
script:
+ - yosys -V
+ - "travis_wait 30 sleep 1800 &"
- ./.run_formal_checks.sh ICache