Add bypass to ignore simulator dependency
This commit is contained in:
19
common.mk
19
common.mk
@@ -31,7 +31,8 @@ EXTRA_SIM_REQS ?=
|
||||
#----------------------------------------------------------------------------
|
||||
HELP_SIMULATION_VARIABLES += \
|
||||
" EXTRA_SIM_FLAGS = additional runtime simulation flags (passed within +permissive)" \
|
||||
" NUMACTL = set to '1' to wrap simulator in the appropriate numactl command"
|
||||
" NUMACTL = set to '1' to wrap simulator in the appropriate numactl command" \
|
||||
" BREAK_SIM_PREREQ = when running a binary, doesn't rebuild RTL on source changes"
|
||||
|
||||
EXTRA_SIM_FLAGS ?=
|
||||
NUMACTL ?= 0
|
||||
@@ -191,16 +192,22 @@ ifeq (,$(BINARY))
|
||||
$(error BINARY variable is not set. Set it to the simulation binary)
|
||||
endif
|
||||
|
||||
# allow you to override sim prereq
|
||||
ifeq(,$(BREAK_SIM_PREREQ))
|
||||
SIM_PREREQ = $(sim)
|
||||
SIM_DEBUG_PREREQ = $(sim_debug)
|
||||
else
|
||||
|
||||
# run normal binary with hardware-logged insn dissassembly
|
||||
run-binary: $(output_dir) check-binary
|
||||
run-binary: $(output_dir) $(SIM_PREREQ) check-binary
|
||||
(set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) </dev/null 2> >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log)
|
||||
|
||||
# run simulator as fast as possible (no insn disassembly)
|
||||
run-binary-fast: $(output_dir) check-binary
|
||||
run-binary-fast: $(output_dir) $(SIM_PREREQ) check-binary
|
||||
(set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $(BINARY) </dev/null | tee $(sim_out_name).log)
|
||||
|
||||
# run simulator with as much debug info as possible
|
||||
run-binary-debug: $(output_dir) $(sim_debug) check-binary
|
||||
run-binary-debug: $(output_dir) $(SIM_DEBUG_PREREQ) check-binary
|
||||
(set -o pipefail && $(NUMA_PREFIX) $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(WAVEFORM_FLAG) $(PERMISSIVE_OFF) $(BINARY) </dev/null 2> >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log)
|
||||
|
||||
run-fast: run-asm-tests-fast run-bmark-tests-fast
|
||||
@@ -239,10 +246,10 @@ $(output_dir):
|
||||
$(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/% $(output_dir)
|
||||
ln -sf $< $@
|
||||
|
||||
$(output_dir)/%.run: $(output_dir)/%
|
||||
$(output_dir)/%.run: $(output_dir)/% $(SIM_PREREQ)
|
||||
(set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $< </dev/null | tee $<.log) && touch $@
|
||||
|
||||
$(output_dir)/%.out: $(output_dir)/%
|
||||
$(output_dir)/%.out: $(output_dir)/% $(SIM_PREREQ)
|
||||
(set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $@) | tee $<.log)
|
||||
|
||||
#########################################################################################
|
||||
|
||||
Reference in New Issue
Block a user