Fix bug in verilator Makefile for 'debug' rule (#513)

The 'debug' rule is currently cleaning out the non-debug-model directory
rather than the debug-model directory. This commit fixes that, and
changes both the debug and non-debug rules to use the variables defined
for referring to these two model directories.

Co-authored-by: Tynan McAuley <tynan@galois.com>
This commit is contained in:
Tynan McAuley
2020-04-15 20:35:56 -07:00
committed by GitHub
parent 82d1569d49
commit 24b63c9577

View File

@@ -116,14 +116,14 @@ model_mk_debug = $(model_dir_debug)/V$(VLOG_MODEL).mk
# build makefile fragment that builds the verilator sim rules
#########################################################################################
$(model_mk): $(sim_vsrcs) $(sim_common_files) $(EXTRA_SIM_REQS)
rm -rf $(build_dir)/$(long_name)
mkdir -p $(build_dir)/$(long_name)
rm -rf $(model_dir)
mkdir -p $(model_dir)
$(VERILATOR) $(VERILATOR_OPTS) -o $(sim) -Mdir $(model_dir) -CFLAGS "-include $(model_header)"
touch $@
$(model_mk_debug): $(sim_vsrcs) $(sim_common_files) $(EXTRA_SIM_REQS)
rm -rf $(build_dir)/$(long_name)
mkdir -p $(build_dir)/$(long_name).debug
rm -rf $(model_dir_debug)
mkdir -p $(model_dir_debug)
$(VERILATOR) $(VERILATOR_OPTS) -o $(sim_debug) --trace -Mdir $(model_dir_debug) -CFLAGS "-include $(model_header_debug)"
touch $@