From 24b63c95773ff9d27521ca777284c8e273de5149 Mon Sep 17 00:00:00 2001 From: Tynan McAuley <16469394+tymcauley@users.noreply.github.com> Date: Wed, 15 Apr 2020 20:35:56 -0700 Subject: [PATCH] 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 --- sims/verilator/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sims/verilator/Makefile b/sims/verilator/Makefile index 8bd4cd75..0ab0016c 100644 --- a/sims/verilator/Makefile +++ b/sims/verilator/Makefile @@ -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 $@