From 65d6a900c373b33cac27a1cc64d8530d1ddc4fca Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 20 May 2019 16:15:08 -0700 Subject: [PATCH] rename output | helper rules to run binaries --- common.mk | 6 ++++++ sims/verisim/Makefile | 6 ++++++ sims/vsim/Makefile | 6 ++++++ variables.mk | 8 +++++++- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/common.mk b/common.mk index b1195ee5..2136080b 100644 --- a/common.mk +++ b/common.mk @@ -67,6 +67,12 @@ $(SMEMS_FILE) $(SMEMS_FIR): $(SMEMS_CONF) .PHONY: verilog verilog: $(sim_vsrcs) +######################################################################################### +# helper rules to run simulator +######################################################################################### +run-binary: $(sim) + $(sim) $(PERMISSIVEON) $(SIM_FLAGS) $(PERMISSIVEOFF) $(BINARY) + ######################################################################################### # run assembly/benchmarks rules ######################################################################################### diff --git a/sims/verisim/Makefile b/sims/verisim/Makefile index 0c5644b8..35a36369 100644 --- a/sims/verisim/Makefile +++ b/sims/verisim/Makefile @@ -80,6 +80,12 @@ $(sim): $(model_mk) $(sim_debug): $(model_mk_debug) $(MAKE) VM_PARALLEL_BUILDS=1 -C $(build_dir)/$(long_name).debug -f V$(VLOG_MODEL).mk +######################################################################################### +# helper rules to run simulator with debug +######################################################################################### +run-binary-debug: $(sim_debug) + $(sim_debug) $(SIM_FLAGS) -v$(long_name).vcd $(BINARY) + ######################################################################################### # create a verisim vpd rule ######################################################################################### diff --git a/sims/vsim/Makefile b/sims/vsim/Makefile index 212c3e6f..9931bc03 100644 --- a/sims/vsim/Makefile +++ b/sims/vsim/Makefile @@ -86,6 +86,12 @@ $(sim_debug) : $(sim_vsrcs) $(sim_dotf) rm -rf csrc && $(VCS) $(VCS_OPTS) -o $@ \ +define+DEBUG -debug_pp +######################################################################################### +# helper rules to run simulator with debug +######################################################################################### +run-binary-debug: $(sim_debug) + $(sim_debug) $(PERMISSIVEON) $(SIM_FLAGS) +vcdplusfile=$(long_name).vpd $(PERMISSIVEOFF) $(BINARY) + ######################################################################################### # create a vcs vpd rule ######################################################################################### diff --git a/variables.mk b/variables.mk index 94709245..22efd535 100644 --- a/variables.mk +++ b/variables.mk @@ -138,7 +138,13 @@ SBT ?= java $(JAVA_ARGS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar ++$(SCALA_VERSION ######################################################################################### # output directory for tests ######################################################################################### -output_dir=$(sim_dir)/output +output_dir=$(sim_dir)/output/$(long_name) + +######################################################################################### +# helper variables to run binaries +######################################################################################### +BINARY ?= none +SIM_FLAGS ?= +verbose ######################################################################################### # build output directory for compilation