From 4e7b9d195fef6c036469281891403af6bfb7f4da Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 18 Aug 2020 10:45:11 -0700 Subject: [PATCH] Dedup default simulation rules --- sims/vcs/Makefile | 11 ----------- sims/verilator/Makefile | 7 ------- variables.mk | 8 +++++++- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/sims/vcs/Makefile b/sims/vcs/Makefile index 766350ff..3f0c0792 100644 --- a/sims/vcs/Makefile +++ b/sims/vcs/Makefile @@ -36,17 +36,6 @@ debug: $(sim_debug) ######################################################################################### include $(base_dir)/common.mk -######################################################################################### -# verilator-specific user-interface variables and commands -######################################################################################### -HELP_COMPILATION_VARIABLES += -HELP_COMMANDS += \ -" default = compiles non-debug simulator [./$(shell basename $(sim))]" \ -" debug = compiles debug simulator [./$(shell basename $(sim_debug))]" \ -" clean = remove all debug/non-debug simulators and intermediate files" \ -" clean-sim = removes non-debug simulator and verilator-generated files" \ -" clean-sim-debug = removes debug simulator and verilator-generated files" - ######################################################################################### # vcs binary and arguments ######################################################################################### diff --git a/sims/verilator/Makefile b/sims/verilator/Makefile index 07ece1c5..e2f85495 100644 --- a/sims/verilator/Makefile +++ b/sims/verilator/Makefile @@ -55,13 +55,6 @@ HELP_COMPILATION_VARIABLES += \ " 'threads' if runtime thread profiling only" \ " VERILATOR_FST_MODE = enable FST waveform instead of VCD. use with debug build" -HELP_COMMANDS += \ -" default = compiles non-debug simulator [./$(shell basename $(sim))]" \ -" debug = compiles debug simulator [./$(shell basename $(sim_debug))]" \ -" clean = remove all debug/non-debug simulators and intermediate files" \ -" clean-sim = removes non-debug simulator and verilator-generated files" \ -" clean-sim-debug = removes debug simulator and verilator-generated files" - ######################################################################################### # verilator/cxx binary and flags ######################################################################################### diff --git a/variables.mk b/variables.mk index e347ccf0..1522aa2e 100644 --- a/variables.mk +++ b/variables.mk @@ -20,8 +20,14 @@ HELP_SIMULATION_VARIABLES = \ " BINARY = riscv binary that the simulator will run" \ " VERBOSE_FLAGS = flags used when doing verbose simulation [$(VERBOSE_FLAGS)]" +# include default simulation rules HELP_COMMANDS = \ -" help = display this help" +" help = display this help" \ +" default = compiles non-debug simulator [./$(shell basename $(sim))]" \ +" debug = compiles debug simulator [./$(shell basename $(sim_debug))]" \ +" clean = remove all debug/non-debug simulators and intermediate files" \ +" clean-sim = removes non-debug simulator and simulator-generated files" \ +" clean-sim-debug = removes debug simulator and simulator-generated files" HELP_LINES = "" \ " design specifier variables:" \