From 13f588d4bf8239bc480e25dd2a4a65faeba57929 Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Thu, 16 Nov 2023 14:22:56 +0100 Subject: [PATCH] WIP: Add crave submodule Signed-off-by: Ryszard Rozak --- .github/workflows/build.yml | 1 + .gitmodules | 3 +++ Makefile.in | 10 +++++++++- crave | 1 + src/Makefile_obj.in | 1 + src/config_build.h | 3 +++ 6 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .gitmodules create mode 160000 crave diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42eb9200360..d4c7f5cefe5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,6 +71,7 @@ jobs: uses: actions/checkout@v3 with: path: repo + submodules: recursive - name: Cache $CCACHE_DIR uses: actions/cache@v3 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..7de9dfb4115 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "crave"] + path = crave + url = https://github.com/antmicro/crave.git diff --git a/Makefile.in b/Makefile.in index 8eb581f1e03..227a169b443 100644 --- a/Makefile.in +++ b/Makefile.in @@ -133,7 +133,7 @@ VL_INST_MAN_FILES = \ verilator_profcfunc.1 \ default: all -all: all_nomsg msg_test +all: all_nomsg msg_test crave all_nomsg: verilator_exe $(VL_INST_MAN_FILES) .PHONY:verilator_exe @@ -537,3 +537,11 @@ preexist: maintainer-dist: preexist tag svnorcvs release $(DISTTAGNAME) + +# CRAVE +.PHONY: crave +crave: crave/build + cmake --build crave/build + cmake --install crave/build +crave/build: + cmake -S crave -B crave/build -DmetaSMT_USE_STP=ON -DCMAKE_INSTALL_PREFIX=. diff --git a/crave b/crave new file mode 160000 index 00000000000..a5fe5718431 --- /dev/null +++ b/crave @@ -0,0 +1 @@ +Subproject commit a5fe571843110a40d38327c8ba9d37d4706f258f diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in index 8c79c0066da..d089a5a0450 100644 --- a/src/Makefile_obj.in +++ b/src/Makefile_obj.in @@ -125,6 +125,7 @@ ifeq ($(CFG_WITH_DEFENV),yes) else CPPFLAGS += -DDEFENV_VERILATOR_ROOT=\"$(VERILATOR_ROOT)\" endif + CPPFLAGS += -DDEFENV_CRAVE_ROOT=\"$(shell realpath ../..)\" endif HEADERS = $(wildcard V*.h v*.h) diff --git a/src/config_build.h b/src/config_build.h index f4204016c99..54e00ed1ee6 100644 --- a/src/config_build.h +++ b/src/config_build.h @@ -50,6 +50,9 @@ #ifndef DEFENV_VERILATOR_ROOT # define DEFENV_VERILATOR_ROOT "" #endif +#ifndef DEFENV_CRAVE_ROOT +# define DEFENV_CRAVE_ROOT "" +#endif // clang-format on //**********************************************************************