diff options
author | Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de> | 2022-07-25 17:55:39 +0200 |
---|---|---|
committer | Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de> | 2022-07-25 17:55:39 +0200 |
commit | 3fff6023602822531efdae30bc8ebf862967f1ef (patch) | |
tree | 16028102b8d850f8ab3115d28a8539ca6bc5f51d /VexRiscv/src/test/cpp/murax/makefile |
Initial Commit
Diffstat (limited to 'VexRiscv/src/test/cpp/murax/makefile')
-rw-r--r-- | VexRiscv/src/test/cpp/murax/makefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/VexRiscv/src/test/cpp/murax/makefile b/VexRiscv/src/test/cpp/murax/makefile new file mode 100644 index 0000000..7c946ae --- /dev/null +++ b/VexRiscv/src/test/cpp/murax/makefile @@ -0,0 +1,42 @@ +DEBUG?=no +TRACE?=no +PRINT_PERF?=no +TRACE_START=0 +ADDCFLAGS += -CFLAGS -pthread -LDFLAGS -pthread + + +ifeq ($(TRACE),yes) + VERILATOR_ARGS += --trace + ADDCFLAGS += -CFLAGS -DTRACE --trace-fst +endif +ifeq ($(DEBUG),yes) + ADDCFLAGS += -CFLAGS "-g3 -O0" +endif +ifneq ($(DEBUG),yes) + ADDCFLAGS += -CFLAGS "-O3" +endif +ifeq ($(PRINT_PERF),yes) + ADDCFLAGS += -CFLAGS -DPRINT_PERF +endif + +ADDCFLAGS += -CFLAGS -DTRACE_START=${TRACE_START} + + + +all: clean compile + +run: compile + ./obj_dir/VMurax + +verilate: ../../../../Murax.v + rm -f Murax.v*.bin + cp ../../../../Murax.v*.bin . | true + verilator -I../../../.. -cc ../../../../Murax.v -CFLAGS -std=c++11 ${ADDCFLAGS} --gdbbt ${VERILATOR_ARGS} -Wno-WIDTH -Wno-UNOPTFLAT --x-assign unique --exe main.cpp + +compile: verilate + make -j -C obj_dir/ -f VMurax.mk VMurax + +clean: + rm -rf obj_dir + rm -f Murax.v*.bin + |