提交 5211b1c1 编写于 作者: Z Zihao Yu

difftest: fix REF_SO path

上级 a4da0e92
......@@ -56,8 +56,12 @@ $(EMU_MK): $(SIM_TOP_V) | $(EMU_DEPS)
verilator --cc --exe $(VERILATOR_FLAGS) \
-o $(abspath $(EMU)) -Mdir $(@D) $^ $(EMU_DEPS)
$(EMU): $(EMU_MK) $(EMU_DEPS) $(EMU_HEADERS)
$(MAKE) -C $(dir $(EMU_MK)) -f $(abspath $(EMU_MK))
REF_SO := $(NEMU_HOME)/build/riscv32-nemu-so
$(REF_SO):
$(MAKE) -C $(NEMU_HOME) ISA=riscv32 SHARE=1
$(EMU): $(EMU_MK) $(EMU_DEPS) $(EMU_HEADERS) $(REF_SO)
CPPFLAGS=-DREF_SO=\\\"$(REF_SO)\\\" $(MAKE) -C $(dir $(EMU_MK)) -f $(abspath $(EMU_MK))
ifdef mainargs
MAINARGS = -a $(mainargs)
......
......@@ -4,7 +4,9 @@
#include <stdlib.h>
#include <dlfcn.h>
#define REF_SO "/home/yzh/projectn/nemu/build/riscv32-nemu-so"
#ifndef REF_SO
# error Please define REF_SO to the path of NEMU shared object file
#endif
void (*ref_difftest_memcpy_from_dut)(paddr_t dest, void *src, size_t n) = NULL;
void (*ref_difftest_getregs)(void *c) = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册