|
|
|
|
@ -23,7 +23,7 @@ test:
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
rm -rf obj_dir
|
|
|
|
|
rm -rf core/Puacpu.v
|
|
|
|
|
rm -rf core/PuaCpu.v
|
|
|
|
|
|
|
|
|
|
perf: obj_dir/V$(TOP_NAME)
|
|
|
|
|
$(call git_commit, "perf test RTL") # DO NOT REMOVE THIS LINE!!!
|
|
|
|
|
@ -34,6 +34,17 @@ perf: obj_dir/V$(TOP_NAME)
|
|
|
|
|
./obj_dir/V$(TOP_NAME) $$test -rvtest -pc -perf; \
|
|
|
|
|
done; \
|
|
|
|
|
|
|
|
|
|
qbench: obj_dir/V$(TOP_NAME)
|
|
|
|
|
@echo "==================================================================="
|
|
|
|
|
@echo "=========================quick benchmarks=========================="
|
|
|
|
|
@echo "==================================================================="
|
|
|
|
|
@count=0; \
|
|
|
|
|
for test in $$(find ./test/bin/riscv-test/benchmarks \( -name "*.bin" \) | sort | grep -vE "*dhrystone*|*mt-vvadd*"); do \
|
|
|
|
|
count=$$((count + 1)); \
|
|
|
|
|
echo "Running bench $$count: $$test"; \
|
|
|
|
|
./obj_dir/V$(TOP_NAME) $$test -rvtest -pc -perf; \
|
|
|
|
|
done; \
|
|
|
|
|
|
|
|
|
|
lab1: obj_dir/V$(TOP_NAME)
|
|
|
|
|
$(call git_commit, "test lab1") # DO NOT REMOVE THIS LINE!!!
|
|
|
|
|
./obj_dir/V$(TOP_NAME) ./test/bin/lab-test/lab1.bin -rvtest -initgprs -trace 10000000 -pc
|
|
|
|
|
@ -67,7 +78,7 @@ TRACE_TESTS67 := $(addprefix trace_,$(TEST67))
|
|
|
|
|
$(TEST67): obj_dir/V$(TOP_NAME)
|
|
|
|
|
$(call git_commit, "test $@") # DO NOT REMOVE THIS LINE!!!
|
|
|
|
|
count=0; \
|
|
|
|
|
for test in ./test/bin/am-tests/*; do \
|
|
|
|
|
for test in $$(ls ./test/bin/am-tests/* | sort); do \
|
|
|
|
|
count=$$((count + 1)); \
|
|
|
|
|
echo "Running test $$count: $$test"; \
|
|
|
|
|
./obj_dir/V$(TOP_NAME) $$test -rvtest -pc; \
|
|
|
|
|
@ -81,7 +92,7 @@ $(TRACE_TESTS67): obj_dir/V$(TOP_NAME)
|
|
|
|
|
$(call git_commit, "trace $*") # DO NOT REMOVE THIS LINE!!!
|
|
|
|
|
rm -rf ./trace.txt
|
|
|
|
|
count=0; \
|
|
|
|
|
for test in ./test/bin/am-tests/*; do \
|
|
|
|
|
for test in $$(ls ./test/bin/am-tests/* | sort); do \
|
|
|
|
|
count=$$((count + 1)); \
|
|
|
|
|
echo "Running test $$count: $$test"; \
|
|
|
|
|
./obj_dir/V$(TOP_NAME) $$test -rvtest -cpu_trace -writeappend; \
|
|
|
|
|
@ -103,17 +114,19 @@ trace_lab8: obj_dir/V$(TOP_NAME)
|
|
|
|
|
lab9: obj_dir/V$(TOP_NAME)
|
|
|
|
|
$(call git_commit, "test lab9") # DO NOT REMOVE THIS LINE!!!
|
|
|
|
|
count=0; \
|
|
|
|
|
for test in $$(find ./test/bin/riscv-test/ \( -name "*rv64ui-p-*" -o -name "*rv64um-p-*" -o -name "*rv64mi-p-*" \) | grep -vE "*rv64ui-p-fence_i|*rv64mi-p-access"); do \
|
|
|
|
|
for test in $$(find ./test/bin/riscv-test/ \( -name "*rv64ui-p-*" -o -name "*rv64um-p-*" -o -name "*rv64mi-p-*" \) | sort | grep -vE "*rv64ui-p-fence_i|*rv64mi-p-access"); do \
|
|
|
|
|
count=$$((count + 1)); \
|
|
|
|
|
echo "Running test $$count: $$test"; \
|
|
|
|
|
./obj_dir/V$(TOP_NAME) $$test -rvtest -pc; \
|
|
|
|
|
done; \
|
|
|
|
|
echo "Total tests run: $$count";
|
|
|
|
|
$(MAKE) qbench
|
|
|
|
|
|
|
|
|
|
trace_lab9: obj_dir/V$(TOP_NAME)
|
|
|
|
|
$(call git_commit, "trace lab9") # DO NOT REMOVE THIS LINE!!!
|
|
|
|
|
rm -rf ./trace.txt
|
|
|
|
|
count=0; \
|
|
|
|
|
for test in $$(find ./test/bin/riscv-test/ \( -name "*rv64ui-p-*" -o -name "*rv64um-p-*" -o -name "*rv64mi-p-*" \) | grep -vE "*rv64ui-p-fence_i|*rv64mi-p-access"); do \
|
|
|
|
|
for test in $$(find ./test/bin/riscv-test/ \( -name "*rv64ui-p-*" -o -name "*rv64um-p-*" -o -name "*rv64mi-p-*" \) | sort | grep -vE "*rv64ui-p-fence_i|*rv64mi-p-access"); do \
|
|
|
|
|
count=$$((count + 1)); \
|
|
|
|
|
echo "Running test $$count: $$test"; \
|
|
|
|
|
./obj_dir/V$(TOP_NAME) $$test -rvtest -cpu_trace -writeappend; \
|
|
|
|
|
|