Runtime tests and riscv tests are runnable
This commit is contained in:
@@ -3,10 +3,11 @@
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
//#define ALL_TESTS
|
||||
#ifdef ALL_TESTS
|
||||
//#ifdef ALL_TESTS
|
||||
if(argc == 1) {
|
||||
bool passed = true;
|
||||
|
||||
std::string tests[] = {
|
||||
@@ -81,13 +82,11 @@ int main(int argc, char **argv)
|
||||
if (!passed) std::cerr << DEFAULT << "Failed one or more tests\n";
|
||||
|
||||
return !passed;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
char test[] = "../../../runtime/tests/simple/vx_simple.hex";
|
||||
//char test[] = "../../../benchmarks/riscv_tests/rv32ui-p-lb.hex";
|
||||
//char test[] = "../../../benchmarks/riscv_tests/rv32ui-p-lw.hex";
|
||||
//char test[] = "../../../benchmarks/riscv_tests/rv32ui-p-sw.hex";
|
||||
//#else
|
||||
if (argc >= 2) {
|
||||
char* test = argv[2];
|
||||
|
||||
std::cerr << test << std::endl;
|
||||
|
||||
@@ -101,6 +100,6 @@ int main(int argc, char **argv)
|
||||
if (!curr) std::cerr << RED << "Test Failed: " << test << std::endl;
|
||||
|
||||
return !curr;
|
||||
|
||||
#endif
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
@@ -27,6 +27,9 @@ $(PROJECT).hex: $(PROJECT).elf
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/dev/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@ $(PROJECT).hex: $(PROJECT).elf
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/hello/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@ $(PROJECT).hex: $(PROJECT).elf
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/nlTest/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@ $(PROJECT).hex: $(PROJECT).elf
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/simple/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ $(PROJECT).hex: $(PROJECT).elf
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/vecadd/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user