From 042da747783e61f26d895009a87d183d1643a7bd Mon Sep 17 00:00:00 2001 From: Blaise Tine Date: Mon, 3 Aug 2020 06:42:42 -0400 Subject: [PATCH 1/4] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index efe3b48e..544bf12b 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Install Verilator Install Vortex - $ git clone https://github.gatech.edu/casl/Vortex.git + $ git clone --recursive https://github.gatech.edu/casl/Vortex.git $ cd Vortex $ make From 58ced9d601e1e76320aa033ede4d85af931273b0 Mon Sep 17 00:00:00 2001 From: MalikBurton Date: Tue, 4 Aug 2020 18:24:32 -0400 Subject: [PATCH 2/4] Makefile for /runtime/tests/ and /driver/tests/ --- driver/tests/Makefile | 14 ++++++++++++++ runtime/tests/Makefile | 10 +++++----- 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 driver/tests/Makefile diff --git a/driver/tests/Makefile b/driver/tests/Makefile new file mode 100644 index 00000000..4a91d0de --- /dev/null +++ b/driver/tests/Makefile @@ -0,0 +1,14 @@ +all: + $(MAKE) -C basic + $(MAKE) -C demo + +run: + $(MAKE) -C basic run-rtlsim + $(MAKE) -C basic run-simx + $(MAKE) -C demo run-rtlsim + $(MAKE) -C demo run-simx + +clean: + $(MAKE) -C basic clean + $(MAKE) -C demo clean + diff --git a/runtime/tests/Makefile b/runtime/tests/Makefile index 4543b3ef..9741cb76 100644 --- a/runtime/tests/Makefile +++ b/runtime/tests/Makefile @@ -6,11 +6,11 @@ all: $(MAKE) -C vecadd run: - cd simple && $(MAKE) run - cd dev && $(MAKE) run - cd hello && $(MAKE) run - cd nlTest && $(MAKE) run - cd vecadd && $(MAKE) run + $(MAKE) -C simple run + $(MAKE) -C dev run + $(MAKE) -C hello run + $(MAKE) -C nlTest run + $(MAKE) -C vecadd run clean: $(MAKE) -C simple clean From 94d957e5404509bad4b1962b486bdbf6cc65430d Mon Sep 17 00:00:00 2001 From: Blaise Tine Date: Wed, 5 Aug 2020 19:28:17 -0400 Subject: [PATCH 3/4] update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 544bf12b..32f90c57 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,6 @@ Install Vortex Quick Test running SGEMM kernel - $ cd /Vortex/benchmarks/opencl/sgemm + $ cd /Vortex/benchmarks/opencl/vecadd $ make - $ make run + $ make run-rtlsim From 87220f2d296a06cff5ee16416b1462b42316f676 Mon Sep 17 00:00:00 2001 From: MalikBurton Date: Fri, 7 Aug 2020 12:54:03 -0400 Subject: [PATCH 4/4] benchmarks/riscv_tests Makefiles and modified testbench.cpp --- benchmarks/riscv_tests/Makefile | 2 ++ benchmarks/riscv_tests/isa/Makefile | 6 +++++ hw/simulate/testbench.cpp | 40 +++++++++++++++++++++++------ 3 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 benchmarks/riscv_tests/Makefile create mode 100644 benchmarks/riscv_tests/isa/Makefile diff --git a/benchmarks/riscv_tests/Makefile b/benchmarks/riscv_tests/Makefile new file mode 100644 index 00000000..a7a76d67 --- /dev/null +++ b/benchmarks/riscv_tests/Makefile @@ -0,0 +1,2 @@ +run: + $(MAKE) -C isa run diff --git a/benchmarks/riscv_tests/isa/Makefile b/benchmarks/riscv_tests/isa/Makefile new file mode 100644 index 00000000..944d1875 --- /dev/null +++ b/benchmarks/riscv_tests/isa/Makefile @@ -0,0 +1,6 @@ +TESTS := $(wildcard *.hex) +#VTESTS := $(wildcard *-v-*.hex) +#TESTS := $(filter-out $(VTESTS) rv32ud-p-fclass.hex, $(TESTS)) + +run: + cd ../../../hw/simulate/obj_dir && ./VVortex -f $(foreach test,$(TESTS),../../../benchmarks/riscv_tests/isa/$(test)) diff --git a/hw/simulate/testbench.cpp b/hw/simulate/testbench.cpp index c68062c8..18c1c887 100644 --- a/hw/simulate/testbench.cpp +++ b/hw/simulate/testbench.cpp @@ -143,18 +143,42 @@ int main(int argc, char **argv) { #endif } else { + bool passed = true; - char* test = argv[2]; + std::vector tests(argv+2, argv+argc); + for (std::string test : tests) { + std::cerr << DEFAULT << "\n---------------------------------------\n"; + + std::cerr << test << std::endl; + + RAM ram; + Simulator simulator; + simulator.attach_ram(&ram); + simulator.load_ihex(test.c_str()); + simulator.run(); + + bool status = (1 == simulator.get_last_wb_value(3)); + + if (status) std::cerr << GREEN << "Test Passed: " << test << std::endl; + if (!status) std::cerr << RED << "Test Failed: " << test << std::endl; + std::cerr << DEFAULT; + passed = passed && status; + if (!passed) + break; + } - std::cerr << test << std::endl; - RAM ram; - Simulator simulator; - simulator.attach_ram(&ram); - simulator.load_ihex(test); - simulator.run(); +// char* test = argv[2]; + +// std::cerr << test << std::endl; + +// RAM ram; +// Simulator simulator; +// simulator.attach_ram(&ram); +// simulator.load_ihex(test); +// simulator.run(); return 0; } -} \ No newline at end of file +}