[sim] Pipe /dev/null to simulators to fix VCS messing up stdout (#417)
This commit is contained in:
12
common.mk
12
common.mk
@@ -102,19 +102,19 @@ verilog: $(sim_vsrcs)
|
|||||||
#########################################################################################
|
#########################################################################################
|
||||||
.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: $(sim)
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) 2> >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log)
|
(set -o pipefail && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(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: $(sim)
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(PERMISSIVE_OFF) $(BINARY) | tee $(sim_out_name).log)
|
(set -o pipefail && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(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: $(sim_debug)
|
||||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(VERBOSE_FLAGS) $(WAVEFORM_FLAG) $(PERMISSIVE_OFF) $(BINARY) 2> >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log)
|
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(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
|
||||||
|
|
||||||
@@ -126,10 +126,10 @@ $(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/%
|
|||||||
ln -sf $< $@
|
ln -sf $< $@
|
||||||
|
|
||||||
$(output_dir)/%.run: $(output_dir)/% $(sim)
|
$(output_dir)/%.run: $(output_dir)/% $(sim)
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(PERMISSIVE_OFF) $< | tee $<.log) && touch $@
|
(set -o pipefail && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(PERMISSIVE_OFF) $< </dev/null | tee $<.log) && touch $@
|
||||||
|
|
||||||
$(output_dir)/%.out: $(output_dir)/% $(sim)
|
$(output_dir)/%.out: $(output_dir)/% $(sim)
|
||||||
(set -o pipefail && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $< 2> >(spike-dasm > $@) | tee $<.log)
|
(set -o pipefail && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $@) | tee $<.log)
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# include build/project specific makefrags made from the generator
|
# include build/project specific makefrags made from the generator
|
||||||
@@ -149,7 +149,7 @@ $(AXE): $(wildcard $(AXE_DIR)/*.[ch]) $(AXE_DIR)/make.sh
|
|||||||
cd $(AXE_DIR) && ./make.sh
|
cd $(AXE_DIR) && ./make.sh
|
||||||
|
|
||||||
$(output_dir)/tracegen.out: $(sim)
|
$(output_dir)/tracegen.out: $(sim)
|
||||||
mkdir -p $(output_dir) && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) none 2> $@
|
mkdir -p $(output_dir) && $(sim) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) none </dev/null 2> $@
|
||||||
|
|
||||||
$(output_dir)/tracegen.result: $(output_dir)/tracegen.out $(AXE)
|
$(output_dir)/tracegen.result: $(output_dir)/tracegen.out $(AXE)
|
||||||
$(base_dir)/scripts/check-tracegen.sh $< > $@
|
$(base_dir)/scripts/check-tracegen.sh $< > $@
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ $(sim_debug) : $(sim_vsrcs) $(sim_common_files)
|
|||||||
#########################################################################################
|
#########################################################################################
|
||||||
.PRECIOUS: $(output_dir)/%.vpd %.vpd
|
.PRECIOUS: $(output_dir)/%.vpd %.vpd
|
||||||
$(output_dir)/%.vpd: $(output_dir)/% $(sim_debug)
|
$(output_dir)/%.vpd: $(output_dir)/% $(sim_debug)
|
||||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(VERBOSE_FLAGS) +vcdplusfile=$@ $(PERMISSIVE_OFF) $< 2> >(spike-dasm > $<.out) | tee $<.log)
|
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(VERBOSE_FLAGS) +vcdplusfile=$@ $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $<.out) | tee $<.log)
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# general cleanup rule
|
# general cleanup rule
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ $(sim_debug): $(model_mk_debug)
|
|||||||
$(output_dir)/%.vpd: $(output_dir)/% $(sim_debug)
|
$(output_dir)/%.vpd: $(output_dir)/% $(sim_debug)
|
||||||
rm -f $@.vcd && mkfifo $@.vcd
|
rm -f $@.vcd && mkfifo $@.vcd
|
||||||
vcd2vpd $@.vcd $@ > /dev/null &
|
vcd2vpd $@.vcd $@ > /dev/null &
|
||||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(VERBOSE_FLAGS) -v$@.vcd $(PERMISSIVE_OFF) $< 2> >(spike-dasm > $<.out) | tee $<.log)
|
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(VERBOSE_FLAGS) -v$@.vcd $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $<.out) | tee $<.log)
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# general cleanup rule
|
# general cleanup rule
|
||||||
|
|||||||
Reference in New Issue
Block a user