Use output_dir for run-binary logs and waveforms (#596)
* Dump run-binary files in output/$(long_name) instead of current directory * Remove run-none rules, these were equivalent to run-binary BINARY=none
This commit is contained in:
@@ -93,10 +93,10 @@ case $1 in
|
|||||||
make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary
|
make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary
|
||||||
;;
|
;;
|
||||||
icenet)
|
icenet)
|
||||||
make run-none-fast -C $LOCAL_SIM_DIR ${mapping[$1]}
|
make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]}
|
||||||
;;
|
;;
|
||||||
testchipip)
|
testchipip)
|
||||||
make run-none-fast -C $LOCAL_SIM_DIR ${mapping[$1]}
|
make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "No set of tests for $1. Did you spell it right?"
|
echo "No set of tests for $1. Did you spell it right?"
|
||||||
|
|||||||
26
common.mk
26
common.mk
@@ -137,34 +137,30 @@ verilog: $(sim_vsrcs)
|
|||||||
# helper rules to run simulations
|
# helper rules to run simulations
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
.PHONY: run-binary run-binary-fast run-binary-debug run-fast
|
.PHONY: run-binary run-binary-fast run-binary-debug run-fast
|
||||||
run-binary: $(sim)
|
run-binary: $(output_dir) $(sim)
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) </dev/null 2> >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log)
|
(set -o pipefail && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) </dev/null 2> >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log)
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# helper rules to run simulator as fast as possible
|
# helper rules to run simulator as fast as possible
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
run-binary-fast: $(sim)
|
run-binary-fast: $(output_dir) $(sim)
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(PERMISSIVE_OFF) $(BINARY) </dev/null | tee $(sim_out_name).log)
|
(set -o pipefail && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(PERMISSIVE_OFF) $(BINARY) </dev/null | tee $(sim_out_name).log)
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# helper rules to run simulator with as much debug info as possible
|
# helper rules to run simulator with as much debug info as possible
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
run-binary-debug: $(sim_debug)
|
run-binary-debug: $(output_dir) $(sim_debug)
|
||||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) $(WAVEFORM_FLAG) $(PERMISSIVE_OFF) $(BINARY) </dev/null 2> >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log)
|
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(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
|
run-fast: run-asm-tests-fast run-bmark-tests-fast
|
||||||
|
|
||||||
run-none: $(output_dir)/none.out
|
|
||||||
|
|
||||||
run-none-fast: $(output_dir)/none.run
|
|
||||||
|
|
||||||
run-none-debug: $(output_dir)/none.vpd
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# run assembly/benchmarks rules
|
# run assembly/benchmarks rules
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
$(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/%
|
$(output_dir):
|
||||||
mkdir -p $(output_dir)
|
mkdir -p $@
|
||||||
|
|
||||||
|
$(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/% $(output_dir)
|
||||||
ln -sf $< $@
|
ln -sf $< $@
|
||||||
|
|
||||||
$(output_dir)/%.run: $(output_dir)/% $(sim)
|
$(output_dir)/%.run: $(output_dir)/% $(sim)
|
||||||
@@ -173,14 +169,6 @@ $(output_dir)/%.run: $(output_dir)/% $(sim)
|
|||||||
$(output_dir)/%.out: $(output_dir)/% $(sim)
|
$(output_dir)/%.out: $(output_dir)/% $(sim)
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $@) | tee $<.log)
|
(set -o pipefail && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $@) | tee $<.log)
|
||||||
|
|
||||||
$(output_dir)/none.run: $(sim)
|
|
||||||
mkdir -p $(output_dir)
|
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(PERMISSIVE_OFF) $< </dev/null | tee $<.log) && touch $@
|
|
||||||
|
|
||||||
$(output_dir)/none.out: $(sim)
|
|
||||||
mkdir -p $(output_dir)
|
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) none </dev/null 2> >(spike-dasm > $@) | tee $(output_dir)/none.log)
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# include build/project specific makefrags made from the generator
|
# include build/project specific makefrags made from the generator
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ $(sim_debug): $(sim_vsrcs) $(sim_common_files) $(dramsim_lib) $(EXTRA_SIM_REQS)
|
|||||||
$(output_dir)/%.vpd: $(output_dir)/% $(sim_debug)
|
$(output_dir)/%.vpd: $(output_dir)/% $(sim_debug)
|
||||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) +vcdplusfile=$@ $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $<.out) | tee $<.log)
|
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) +vcdplusfile=$@ $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $<.out) | tee $<.log)
|
||||||
|
|
||||||
$(output_dir)/none.vpd: $(sim_debug)
|
|
||||||
mkdir -p $(output_dir)
|
|
||||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) +vcdplusfile=$@ $(PERMISSIVE_OFF) none </dev/null 2> >(spike-dasm > $(output_dir)/none.out) | tee $(output_dir)/none.log)
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# general cleanup rule
|
# general cleanup rule
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|||||||
@@ -147,12 +147,6 @@ $(output_dir)/%.vpd: $(output_dir)/% $(sim_debug)
|
|||||||
vcd2vpd $@.vcd $@ > /dev/null &
|
vcd2vpd $@.vcd $@ > /dev/null &
|
||||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) -v$@.vcd $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $<.out) | tee $<.log)
|
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) -v$@.vcd $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $<.out) | tee $<.log)
|
||||||
|
|
||||||
$(output_dir)/none.vpd: $(sim_debug)
|
|
||||||
mkdir -p $(output_dir)
|
|
||||||
rm -f $@.vcd && mkfifo $@.vcd
|
|
||||||
vcd2vpd $@.vcd $@ > /dev/null &
|
|
||||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(VERBOSE_FLAGS) -v$@.vcd $(PERMISSIVE_OFF) none </dev/null 2> >(spike-dasm > $(output_dir)/none.out) | tee $(output_dir)/none.log)
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# general cleanup rule
|
# general cleanup rule
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ PERMISSIVE_OFF=+permissive-off
|
|||||||
BINARY ?=
|
BINARY ?=
|
||||||
override SIM_FLAGS += +dramsim +dramsim_ini_dir=$(TESTCHIP_DIR)/src/main/resources/dramsim2_ini +max-cycles=$(timeout_cycles)
|
override SIM_FLAGS += +dramsim +dramsim_ini_dir=$(TESTCHIP_DIR)/src/main/resources/dramsim2_ini +max-cycles=$(timeout_cycles)
|
||||||
VERBOSE_FLAGS ?= +verbose
|
VERBOSE_FLAGS ?= +verbose
|
||||||
sim_out_name = $(subst $() $(),_,$(notdir $(basename $(BINARY))).$(long_name))
|
sim_out_name = $(output_dir)/$(subst $() $(),_,$(notdir $(basename $(BINARY))))
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# build output directory for compilation
|
# build output directory for compilation
|
||||||
|
|||||||
Reference in New Issue
Block a user