This commit is contained in:
Blaise Tine
2020-08-07 10:12:29 -07:00
6 changed files with 62 additions and 16 deletions

View File

@@ -62,12 +62,12 @@ Install Verilator
Install Vortex Install Vortex
$ git clone https://github.gatech.edu/casl/Vortex.git $ git clone --recursive https://github.gatech.edu/casl/Vortex.git
$ cd Vortex $ cd Vortex
$ make $ make
Quick Test running SGEMM kernel Quick Test running SGEMM kernel
$ cd /Vortex/benchmarks/opencl/sgemm $ cd /Vortex/benchmarks/opencl/vecadd
$ make $ make
$ make run $ make run-rtlsim

View File

@@ -0,0 +1,2 @@
run:
$(MAKE) -C isa run

View File

@@ -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))

14
driver/tests/Makefile Normal file
View File

@@ -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

View File

@@ -143,16 +143,40 @@ int main(int argc, char **argv) {
#endif #endif
} else { } else {
bool passed = true;
char* test = argv[2]; std::vector<std::string> tests(argv+2, argv+argc);
for (std::string test : tests) {
std::cerr << DEFAULT << "\n---------------------------------------\n";
std::cerr << test << std::endl; std::cerr << test << std::endl;
RAM ram; RAM ram;
Simulator simulator; Simulator simulator;
simulator.attach_ram(&ram); simulator.attach_ram(&ram);
simulator.load_ihex(test); simulator.load_ihex(test.c_str());
simulator.run(); 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;
}
// 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; return 0;
} }

View File

@@ -6,11 +6,11 @@ all:
$(MAKE) -C vecadd $(MAKE) -C vecadd
run: run:
cd simple && $(MAKE) run $(MAKE) -C simple run
cd dev && $(MAKE) run $(MAKE) -C dev run
cd hello && $(MAKE) run $(MAKE) -C hello run
cd nlTest && $(MAKE) run $(MAKE) -C nlTest run
cd vecadd && $(MAKE) run $(MAKE) -C vecadd run
clean: clean:
$(MAKE) -C simple clean $(MAKE) -C simple clean