diff --git a/Makefrag b/Makefrag index 2a012e72..33fc9253 100644 --- a/Makefrag +++ b/Makefrag @@ -1,3 +1,6 @@ +# UCB use only +-include $(base_dir)/Makefrag-refchip + MODEL := Top CXX := g++ CXXFLAGS := -O1 @@ -5,12 +8,12 @@ CXXFLAGS := -O1 SBT := java -Xmx2048M -Xss8M -XX:MaxPermSize=128M -jar sbt-launch.jar src_path = src/main/scala -chisel_srcs = $(base_dir)/$(src_path)/*.scala $(base_dir)/rocket/$(src_path)/*.scala $(base_dir)/uncore/$(src_path)/*.scala $(base_dir)/hwacha/$(src_path)/*.scala +chisel_srcs = $(base_dir)/$(src_path)/*.scala $(base_dir)/rocket/$(src_path)/*.scala $(base_dir)/uncore/$(src_path)/*.scala $(SRC_EXTENSION) disasm := 2> which_disasm := $(shell which riscv-dis) ifneq ($(which_disasm),) - disasm := 3>&1 1>&2 2>&3 | $(which_disasm) --extension=hwacha > + disasm := 3>&1 1>&2 2>&3 | $(which_disasm) $(DISASM_EXTENSION) > endif timeout_cycles = 100000000 @@ -237,317 +240,6 @@ asm_v_tests = \ rv64uf-v-fmadd \ rv64uf-v-structural \ -vecasm_p_tests = \ - rv64uv-p-wakeup \ - rv64uv-p-fence \ - rv64uv-p-utidx \ - rv64uv-p-vmsv \ - rv64uv-p-vmvv \ - rv64uv-p-vfmvv \ - rv64uv-p-vfmsv_d \ - rv64uv-p-vfmsv_s \ - rv64uv-p-vsetcfg \ - rv64uv-p-vsetcfgi \ - rv64uv-p-vsetvl \ - rv64uv-p-keepcfg \ - rv64uv-p-movz \ - rv64uv-p-movn \ - rv64uv-p-fmovz \ - rv64uv-p-fmovn \ - rv64uv-p-ld \ - rv64uv-p-lw \ - rv64uv-p-lwu \ - rv64uv-p-lh \ - rv64uv-p-lhu \ - rv64uv-p-lb \ - rv64uv-p-lbu \ - rv64uv-p-sd \ - rv64uv-p-sw \ - rv64uv-p-sh \ - rv64uv-p-sb \ - rv64uv-p-fld \ - rv64uv-p-flw \ - rv64uv-p-fsd \ - rv64uv-p-fsw \ - rv64uv-p-fcvt \ - rv64uv-p-vvadd_d \ - rv64uv-p-vvadd_fw \ - rv64uv-p-vvadd_fd \ - rv64uv-p-vvadd_w \ - rv64uv-p-vvmul_d \ - rv64uv-p-amoadd_d \ - rv64uv-p-amoand_d \ - rv64uv-p-amoor_d \ - rv64uv-p-amoxor_d \ - rv64uv-p-amomax_d \ - rv64uv-p-amomin_d \ - rv64uv-p-amomaxu_d \ - rv64uv-p-amominu_d \ - rv64uv-p-amoswap_d \ - rv64uv-p-amoadd_w \ - rv64uv-p-amoand_w \ - rv64uv-p-amoor_w \ - rv64uv-p-amoxor_w \ - rv64uv-p-amomax_w \ - rv64uv-p-amomin_w \ - rv64uv-p-amomaxu_w \ - rv64uv-p-amominu_w \ - rv64uv-p-amoswap_w \ - rv64uv-p-imul \ - rv64uv-p-fma \ - rv64uv-p-fma_many \ - rv64ui-p-vec-mul \ - rv64ui-p-vec-mulw \ - rv64ui-p-vec-mulh \ - rv64ui-p-vec-mulhu \ - rv64ui-p-vec-mulhsu \ - rv64ui-p-vec-addi \ - rv64ui-p-vec-add \ - rv64ui-p-vec-addiw \ - rv64ui-p-vec-addw \ - rv64ui-p-vec-and \ - rv64ui-p-vec-andi \ - rv64ui-p-vec-lui \ - rv64ui-p-vec-or \ - rv64ui-p-vec-ori \ - rv64ui-p-vec-slt \ - rv64ui-p-vec-sltu \ - rv64ui-p-vec-slti \ - rv64ui-p-vec-sltiu \ - rv64ui-p-vec-slli \ - rv64ui-p-vec-sll \ - rv64ui-p-vec-slliw \ - rv64ui-p-vec-sllw \ - rv64ui-p-vec-srai \ - rv64ui-p-vec-sra \ - rv64ui-p-vec-sraiw \ - rv64ui-p-vec-sraw \ - rv64ui-p-vec-srli \ - rv64ui-p-vec-srl \ - rv64ui-p-vec-srliw \ - rv64ui-p-vec-srlw \ - rv64ui-p-vec-sub \ - rv64ui-p-vec-subw \ - rv64ui-p-vec-xor \ - rv64ui-p-vec-xori \ - rv64uf-p-vec-fadd \ - rv64uf-p-vec-fsgnj \ - rv64uf-p-vec-fmin \ - rv64uf-p-vec-fmadd \ - rv64uf-p-vec-fcvt_w \ - rv64uf-p-vec-fcvt \ - rv64uf-p-vec-fcmp \ - rv64sv-p-illegal_cfg_nxpr \ - rv64sv-p-illegal_cfg_nfpr \ - rv64sv-p-illegal_inst \ - rv64sv-p-illegal_tvec_regid \ - rv64sv-p-illegal_vt_inst \ - rv64sv-p-illegal_vt_regid \ - rv64sv-p-ma_utld \ - rv64sv-p-ma_utsd \ - rv64sv-p-ma_vld \ - rv64sv-p-ma_vsd \ - rv64sv-p-ma_vt_inst \ - rv64sv-p-privileged_inst \ - -vecasm_v_tests = \ - rv64uv-v-wakeup \ - rv64uv-v-fence \ - rv64uv-v-utidx \ - rv64uv-v-vmsv \ - rv64uv-v-vmvv \ - rv64uv-v-vfmvv \ - rv64uv-v-vfmsv_d \ - rv64uv-v-vfmsv_s \ - rv64uv-v-vsetcfg \ - rv64uv-v-vsetcfgi \ - rv64uv-v-vsetvl \ - rv64uv-v-keepcfg \ - rv64uv-v-movz \ - rv64uv-v-movn \ - rv64uv-v-fmovz \ - rv64uv-v-fmovn \ - rv64uv-v-ld \ - rv64uv-v-lw \ - rv64uv-v-lwu \ - rv64uv-v-lh \ - rv64uv-v-lhu \ - rv64uv-v-lb \ - rv64uv-v-lbu \ - rv64uv-v-sd \ - rv64uv-v-sw \ - rv64uv-v-sh \ - rv64uv-v-sb \ - rv64uv-v-fld \ - rv64uv-v-flw \ - rv64uv-v-fsd \ - rv64uv-v-fsw \ - rv64uv-v-fcvt \ - rv64uv-v-vvadd_d \ - rv64uv-v-vvadd_fw \ - rv64uv-v-vvadd_fd \ - rv64uv-v-vvadd_w \ - rv64uv-v-vvmul_d \ - rv64uv-v-amoadd_d \ - rv64uv-v-amoswap_d \ - rv64uv-v-amoand_d \ - rv64uv-v-amoor_d \ - rv64uv-v-amomax_d \ - rv64uv-v-amomin_d \ - rv64uv-v-amomaxu_d \ - rv64uv-v-amominu_d \ - rv64uv-v-amoadd_w \ - rv64uv-v-amoswap_w \ - rv64uv-v-amoand_w \ - rv64uv-v-amoor_w \ - rv64uv-v-amomax_w \ - rv64uv-v-amomin_w \ - rv64uv-v-amomaxu_w \ - rv64uv-v-amominu_w \ - rv64uv-v-imul \ - rv64uv-v-fma \ - rv64uv-v-fma_many \ - rv64ui-v-vec-mul \ - rv64ui-v-vec-mulw \ - rv64ui-v-vec-mulh \ - rv64ui-v-vec-mulhu \ - rv64ui-v-vec-mulhsu \ - rv64ui-v-vec-addi \ - rv64ui-v-vec-add \ - rv64ui-v-vec-addiw \ - rv64ui-v-vec-addw \ - rv64ui-v-vec-and \ - rv64ui-v-vec-andi \ - rv64ui-v-vec-lui \ - rv64ui-v-vec-or \ - rv64ui-v-vec-ori \ - rv64ui-v-vec-slt \ - rv64ui-v-vec-sltu \ - rv64ui-v-vec-slti \ - rv64ui-v-vec-sltiu \ - rv64ui-v-vec-slli \ - rv64ui-v-vec-sll \ - rv64ui-v-vec-slliw \ - rv64ui-v-vec-sllw \ - rv64ui-v-vec-srai \ - rv64ui-v-vec-sra \ - rv64ui-v-vec-sraiw \ - rv64ui-v-vec-sraw \ - rv64ui-v-vec-srli \ - rv64ui-v-vec-srl \ - rv64ui-v-vec-srliw \ - rv64ui-v-vec-srlw \ - rv64ui-v-vec-sub \ - rv64ui-v-vec-subw \ - rv64ui-v-vec-xor \ - rv64ui-v-vec-xori \ - rv64uf-v-vec-fadd \ - rv64uf-v-vec-fsgnj \ - rv64uf-v-vec-fmin \ - rv64uf-v-vec-fmadd \ - rv64uf-v-vec-fcvt_w \ - rv64uf-v-vec-fcvt \ - rv64uf-v-vec-fcmp \ - -vecasm_pt_tests = \ - rv64uv-pt-wakeup \ - rv64uv-pt-fence \ - rv64uv-pt-vvadd_d \ - rv64uv-pt-vvadd_fw \ - rv64uv-pt-vvadd_fd \ - rv64uv-pt-vvadd_w \ - rv64uv-pt-vvmul_d \ - rv64uv-pt-fcvt \ - rv64uv-pt-utidx \ - rv64uv-pt-vmvv \ - rv64uv-pt-vmsv \ - rv64uv-pt-vfmvv \ - rv64uv-pt-vfmsv_d \ - rv64uv-pt-vfmsv_s \ - rv64uv-pt-vsetcfg \ - rv64uv-pt-vsetcfgi \ - rv64uv-pt-vsetvl \ - rv64uv-pt-keepcfg \ - rv64uv-pt-movz \ - rv64uv-pt-movn \ - rv64uv-pt-fmovz \ - rv64uv-pt-fmovn \ - rv64uv-pt-ld \ - rv64uv-pt-lw \ - rv64uv-pt-lwu \ - rv64uv-pt-lh \ - rv64uv-pt-lhu \ - rv64uv-pt-lb \ - rv64uv-pt-lbu \ - rv64uv-pt-sd \ - rv64uv-pt-sw \ - rv64uv-pt-sh \ - rv64uv-pt-sb \ - rv64uv-pt-fld \ - rv64uv-pt-flw \ - rv64uv-pt-fsd \ - rv64uv-pt-fsw \ - rv64uv-pt-amoadd_d \ - rv64uv-pt-amoswap_d \ - rv64uv-pt-amoand_d \ - rv64uv-pt-amoor_d \ - rv64uv-pt-amomax_d \ - rv64uv-pt-amomin_d \ - rv64uv-pt-amomaxu_d \ - rv64uv-pt-amominu_d \ - rv64uv-pt-amoadd_w \ - rv64uv-pt-amoswap_w \ - rv64uv-pt-amoand_w \ - rv64uv-pt-amoor_w \ - rv64uv-pt-amomax_w \ - rv64uv-pt-amomin_w \ - rv64uv-pt-amomaxu_w \ - rv64uv-pt-amominu_w \ - rv64uv-pt-imul \ - rv64uv-pt-fma \ - rv64uv-pt-fma_many \ - rv64ui-pt-vec-mul \ - rv64ui-pt-vec-mulw \ - rv64ui-pt-vec-mulh \ - rv64ui-pt-vec-mulhu \ - rv64ui-pt-vec-mulhsu \ - rv64ui-pt-vec-addi \ - rv64ui-pt-vec-add \ - rv64ui-pt-vec-addiw \ - rv64ui-pt-vec-addw \ - rv64ui-pt-vec-and \ - rv64ui-pt-vec-andi \ - rv64ui-pt-vec-lui \ - rv64ui-pt-vec-or \ - rv64ui-pt-vec-ori \ - rv64ui-pt-vec-slt \ - rv64ui-pt-vec-sltu \ - rv64ui-pt-vec-slti \ - rv64ui-pt-vec-sltiu \ - rv64ui-pt-vec-slli \ - rv64ui-pt-vec-sll \ - rv64ui-pt-vec-slliw \ - rv64ui-pt-vec-sllw \ - rv64ui-pt-vec-srai \ - rv64ui-pt-vec-sra \ - rv64ui-pt-vec-sraiw \ - rv64ui-pt-vec-sraw \ - rv64ui-pt-vec-srli \ - rv64ui-pt-vec-srl \ - rv64ui-pt-vec-srliw \ - rv64ui-pt-vec-srlw \ - rv64ui-pt-vec-sub \ - rv64ui-pt-vec-subw \ - rv64ui-pt-vec-xor \ - rv64ui-pt-vec-xori \ - rv64uf-pt-vec-fadd \ - rv64uf-pt-vec-fsgnj \ - rv64uf-pt-vec-fmin \ - rv64uf-pt-vec-fmadd \ - rv64uf-pt-vec-fcvt_w \ - rv64uf-pt-vec-fcvt \ - rv64uf-pt-vec-fcmp \ - #-------------------------------------------------------------------- # Benchmark Tests #-------------------------------------------------------------------- diff --git a/emulator/Makefile b/emulator/Makefile index 2c192557..319996bb 100644 --- a/emulator/Makefile +++ b/emulator/Makefile @@ -79,10 +79,6 @@ $(output_dir)/%.vpd: $(output_dir)/%.hex emulator-debug run-asm-tests: $(addprefix $(output_dir)/, $(addsuffix .out, $(asm_p_tests) $(asm_v_tests))) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $^; echo; -run-vecasm-tests: $(addprefix $(output_dir)/, $(addsuffix .out, $(vecasm_p_tests) $(vecasm_v_tests))) - @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $^; echo; -run-vecasm-timer-tests: $(addprefix $(output_dir)/, $(addsuffix .out, $(vecasm_pt_tests))) - @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $^; echo; run-bmarks-test: $(addprefix $(output_dir)/, $(addsuffix .out, $(bmarks))) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $^; echo; run-mt-tests: $(addprefix $(output_dir)/, $(addsuffix .out, $(mt_bmarks))) @@ -90,15 +86,18 @@ run-mt-tests: $(addprefix $(output_dir)/, $(addsuffix .out, $(mt_bmarks))) run-asm-tests-debug: $(addprefix $(output_dir)/, $(addsuffix .vpd, $(asm_p_tests) $(asm_v_tests))) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $(patsubst %.vpd,%.out,$^); echo; -run-vecasm-tests-debug: $(addprefix $(output_dir)/, $(addsuffix .vpd, $(vecasm_p_tests) $(vecasm_v_tests))) - @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $(patsubst %.vpd,%.out,$^); echo; -run-vecasm-timer-tests-debug: $(addprefix $(output_dir)/, $(addsuffix .vpd, $(vecasm_pt_tests))) - @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $(patsubst %.vpd,%.out,$^); echo; run-bmarks-test-debug: $(addprefix $(output_dir)/, $(addsuffix .vpd, $(bmarks))) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $(patsubst %.vpd,%.out,$^); echo; run-mt-tests-debug: $(addprefix $(output_dir)/, $(addsuffix .vpd, $(mt_bmarks))) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $(patsubst %.vpd,%.out,$^); echo; -run: run-asm-tests run-bmarks-test #run-vecasm-tests run-vecasm-timer-tests -run-debug: run-asm-tests-debug run-bmarks-test-debug #run-vecasm-tests-debug run-vecasm-timer-tests-debug +# UCB use only +-include Makefrag-refchip + +run: run-asm-tests run-bmarks-test +run-debug: run-asm-tests-debug run-bmarks-test-debug run-fast: $(addprefix $(output_dir)/, $(addsuffix .run, $(asm_p_tests) $(asm_v_tests) $(bmarks))) + +.PHONY: run-asm-tests run-bmarks-test run-mt-tests +.PHONY: run-asm-tests-debug run-bmarks-test-debug run-mt-tests-debug +.PHONY: run run-debug run-fast diff --git a/vsim/Makefrag-sim b/vsim/Makefrag-sim index c0405462..9fd60c5f 100644 --- a/vsim/Makefrag-sim +++ b/vsim/Makefrag-sim @@ -2,27 +2,22 @@ # Run #-------------------------------------------------------------------- +# UCB use only +-include $(base_dir)/vsim/Makefrag-sim-refchip + asm_tests_out = $(foreach test, $(asm_p_tests) $(asm_v_tests), $(output_dir)/$(test).out) -vecasm_tests_out = $(foreach test, $(vecasm_p_tests) $(vecasm_v_tests), $(output_dir)/$(test).out) -vecasm_t_tests_out = $(foreach test, $(vecasm_pt_tests), $(output_dir)/$(test).out) bmarks_out = $(foreach test, $(bmarks), $(output_dir)/$(test).out) mt_bmarks_out = $(foreach test, $(mt_bmarks), $(output_dir)/$(test).out) asm_tests_vcd = $(foreach test, $(asm_p_tests) $(asm_v_tests), $(output_dir)/$(test).vcd) -vecasm_tests_vcd = $(foreach test, $(vecasm_p_tests) $(vecasm_v_tests), $(output_dir)/$(test).vcd) -vecasm_t_tests_vcd = $(foreach test, $(vecasm_pt_tests), $(output_dir)/$(test).vcd) bmarks_vcd = $(foreach test, $(bmarks), $(output_dir)/$(test).vcd) mt_bmarks_vcd = $(foreach test, $(mt_bmarks), $(output_dir)/$(test).vcd) asm_tests_vpd = $(foreach test, $(asm_p_tests) $(asm_v_tests), $(output_dir)/$(test).vpd) -vecasm_tests_vpd = $(foreach test, $(vecasm_p_tests) $(vecasm_v_tests), $(output_dir)/$(test).vpd) -vecasm_t_tests_vpd = $(foreach test, $(vecasm_pt_tests), $(output_dir)/$(test).vpd) bmarks_vpd = $(foreach test, $(bmarks), $(output_dir)/$(test).vpd) mt_bmarks_vpd = $(foreach test, $(mt_bmarks), $(output_dir)/$(test).vpd) asm_tests_saif = $(foreach test, $(asm_p_tests) $(asm_v_tests), $(output_dir)/$(test).saif) -vecasm_tests_saif = $(foreach test, $(vecasm_p_tests) $(vecasm_v_tests), $(output_dir)/$(test).saif) -vecasm_t_tests_saif = $(foreach test, $(vecasm_pt_tests), $(output_dir)/$(test).saif) bmarks_saif = $(foreach test, $(bmarks), $(output_dir)/$(test).saif) mt_bmarks_saif = $(foreach test, $(mt_bmarks), $(output_dir)/$(test).saif) @@ -45,14 +40,6 @@ run-asm-tests: $(asm_tests_out) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ $(asm_tests_out); echo; -run-vecasm-tests: $(vecasm_tests_out) - @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ - $(vecasm_tests_out); echo; - -run-vecasm-timer-tests: $(vecasm_t_tests_out) - @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ - $(vecasm_t_tests_out); echo; - run-bmarks-test: $(bmarks_out) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ $(bmarks_out); echo; @@ -65,14 +52,6 @@ run-asm-tests-debug: $(asm_tests_vpd) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ $(asm_tests_out); echo; -run-vecasm-tests-debug: $(vecasm_tests_vpd) - @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ - $(vecasm_tests_out); echo; - -run-vecasm-timer-tests-debug: $(vecasm_t_tests_vpd) - @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ - $(vecasm_t_tests_out); echo; - run-bmarks-test-debug: $(bmarks_vpd) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ $(bmarks_out); echo; @@ -81,11 +60,11 @@ run-mt-tests-debug: $(mt_bmarks_vpd) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \ $(mt_bmarks_out); echo; -run: run-asm-tests run-vecasm-tests run-vecasm-timer-tests run-bmarks-test -run-debug: run-asm-tests-debug run-vecasm-tests-debug run-vecasm-timer-tests-debug run-bmarks-test-debug +run: run-asm-tests run-bmarks-test +run-debug: run-asm-tests-debug run-bmarks-test-debug -.PHONY: run-asm-tests run-vecasm-tests run-vecasm-timer-tests run-bmarks-test run-mt-tests -.PHONY: run-asm-tests-debug run-vecasm-tests-debug run-vecasm-timer-tests-debug run-bmarks-test-debug run-mt-tests-debug +.PHONY: run-asm-tests run-bmarks-test run-mt-tests +.PHONY: run-asm-tests-debug run-bmarks-test-debug run-mt-tests-debug .PHONY: run run-debug junk += $(output_dir)