aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-03-22 16:42:04 +0000
committerYann Herklotz <git@yannherklotz.com>2022-03-22 16:42:04 +0000
commit0580932cb0da7fac6b8aa5f5b98beb824a3fff50 (patch)
treedee9ac61de199e037ca58dad248a486fc0ccb848
parent8681d039abc5b2beac21ee17d7d944b00552aef6 (diff)
downloadvericert-0580932cb0da7fac6b8aa5f5b98beb824a3fff50.tar.gz
vericert-0580932cb0da7fac6b8aa5f5b98beb824a3fff50.zip
Fix Makefiles in build and for benchmarks
-rw-r--r--Makefile4
-rw-r--r--benchmarks/polybench-syn/common.mk8
-rw-r--r--benchmarks/polybench-syn/stencils/Makefile1
-rw-r--r--dune2
-rw-r--r--scripts/Makefile7
-rw-r--r--test/Makefile2
6 files changed, 17 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index e9df0dd..5e1ae44 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ COQMAKE := $(COQBIN)coq_makefile
COQDOCFLAGS := --no-lib-name -l
VS := src/Compiler.v src/Simulator.v src/HLSOpts.v $(foreach d, common hls bourdoncle, src/$(d)/*.v)
+LIT := $(wildcard lit/*.org)
PREFIX ?= .
@@ -85,6 +86,9 @@ clean:: Makefile.coq
$(MAKE) -C test clean
rm -f Makefile.coq
+detangle-all:
+ $(foreach vs,$(VS),emacs --batch --find-file $(vs) --eval "(progn(require 'org)(require 'ob-tangle)(org-babel-detangle))")
+
clean::
rm -f */*.v.d */*.glob */*.vo */*~ *~
rm -f src/extraction/*.ml src/extraction/*.mli
diff --git a/benchmarks/polybench-syn/common.mk b/benchmarks/polybench-syn/common.mk
index 8e67294..0ebc527 100644
--- a/benchmarks/polybench-syn/common.mk
+++ b/benchmarks/polybench-syn/common.mk
@@ -1,15 +1,16 @@
VERICERT ?= vericert
-VERICERT_OPTS ?= -DSYNTHESIS -fschedule -fif-conv
+VERICERT_OPTS ?= -DSYNTHESIS -fschedule
IVERILOG ?= iverilog
IVERILOG_OPTS ?=
VERILATOR ?= verilator
-VERILATOR_OPTS ?= -Wno-fatal --top main --exe /home/ymherklotz/projects/vericert/scripts/verilator_main.cpp
+VERILATOR_OPTS ?= -Wno-fatal -Wno-lint -Wno-style -Wno-WIDTH --top main --exe /home/ymherklotz/projects/vericert/scripts/verilator_main.cpp
TARGETS ?=
%.v: %.c
+ @echo -e "\033[0;35mMAKE\033[0m" $<
$(VERICERT) $(VERICERT_OPTS) $< -o $@
%.iver: %.v
@@ -20,7 +21,8 @@ TARGETS ?=
%.verilator: %.v
$(VERILATOR) $(VERILATOR_OPTS) --Mdir $@ --cc $<
- $(MAKE) -C $@ -f Vmain.mk
+ @echo -e $(MAKE) -C $@ -f Vmain.mk
+ @$(MAKE) -C $@ -f Vmain.mk &>/dev/null
%: %.iver %.gcc %.verilator
cp $< $@
diff --git a/benchmarks/polybench-syn/stencils/Makefile b/benchmarks/polybench-syn/stencils/Makefile
index d2e1c9b..9b89b0c 100644
--- a/benchmarks/polybench-syn/stencils/Makefile
+++ b/benchmarks/polybench-syn/stencils/Makefile
@@ -3,4 +3,5 @@ TARGETS := adi fdtd-2d heat-3d jacobi-1d jacobi-2d seidel-2d
include ../common.mk
adi.v: adi.c
+ @echo -e "\033[0;35mMAKE\033[0m" $<
$(VERICERT) $(VERICERT_OPTS) -O0 -finline $< -o $@
diff --git a/dune b/dune
index f58c64e..9bd70aa 100644
--- a/dune
+++ b/dune
@@ -8,4 +8,4 @@
(public_name vericert)
(modules_without_implementation c debugTypes dwarfTypes)
(libraries menhirLib str unix ocamlgraph)
- (flags (:standard -warn-error -A)))
+ (flags (:standard -warn-error -A -w -8-9-16-20-26-27-32..36-39-41-44..45-50-60-67)))
diff --git a/scripts/Makefile b/scripts/Makefile
index 0b5ff33..3892723 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -1,9 +1,12 @@
PREFIX ?= ..
-all: synthesis
+all: synthesis-results
%: %.scm
- chicken-csc -static -o $@ $<
+ $(eval TMP := $(shell mktemp))
+ echo "(main (command-line-arguments))" >$(TMP)
+ chicken-csc -static -epilogue $(TMP) -output-file $@ $<
+ rm $(TMP)
%.1: %.org
emacs --batch --file $< --load ../docs/res/publish.el --funcall org-man-export-to-man
diff --git a/test/Makefile b/test/Makefile
index fa482c6..aa76e70 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -18,7 +18,7 @@ all: $(TESTS)
@$(CC) $(CFLAGS) -o $@ $<
%.v: %.c
- @$(VERICERT) $(VERICERT_OPTS) -o $@ $<
+ $(VERICERT) $(VERICERT_OPTS) -o $@ $<
%.iver: %.v
@$(IVERILOG) $(IVERILOG_OPTS) -o $@ -- $<