aboutsummaryrefslogtreecommitdiff
path: root/tests/simple_mesh1d
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple_mesh1d')
-rw-r--r--tests/simple_mesh1d/sim.c4
-rw-r--r--tests/simple_mesh1d/source.mk26
2 files changed, 11 insertions, 19 deletions
diff --git a/tests/simple_mesh1d/sim.c b/tests/simple_mesh1d/sim.c
index 7479a27..48197a1 100644
--- a/tests/simple_mesh1d/sim.c
+++ b/tests/simple_mesh1d/sim.c
@@ -22,8 +22,8 @@ static stat build_node1d(struct clock_domain *clk, uint16_t x, uint16_t y)
for (int j = 0; j < y; ++j) {
struct component *imem = create_simple_mem(4096);
init_simple_mem(imem, 0,
- build_tests_simple_mesh1d_test_bin_len,
- build_tests_simple_mesh1d_test_bin);
+ build_tests_simple_mesh1d_test_inc_bin_len,
+ build_tests_simple_mesh1d_test_inc_bin);
uint64_t rcv = mesh1d_addr(i, j, 0);
struct component *rv64 = create_simple_riscv64(rcv, 0,
diff --git a/tests/simple_mesh1d/source.mk b/tests/simple_mesh1d/source.mk
index 5013c6e..f2792c9 100644
--- a/tests/simple_mesh1d/source.mk
+++ b/tests/simple_mesh1d/source.mk
@@ -1,19 +1,11 @@
-MESH1D_TEST_OBJ != ./scripts/gen-deps --sources "tests/simple_mesh1d/sim.c"
-TEST_PROGS += build/tests/simple_mesh1d/sim
+SIMPLE_MESH1D := tests/simple_mesh1d
+SIMPLE_MESH1D_SIM := $(SIMPLE_MESH1D)/sim.c
-build/tests/simple_mesh1d/test.inc: tests/simple_mesh1d/test.c
- riscv64-unknown-elf-gcc -O2 -Wall -Wextra -ffreestanding -nostdlib \
- -march=rv64i -mabi=lp64 \
- -fno-delete-null-pointer-checks \
- -o build/tests/simple_mesh1d/test \
- tests/simple_mesh1d/test.c
- riscv64-unknown-elf-objcopy -Obinary \
- build/tests/simple_mesh1d/test \
- build/tests/simple_mesh1d/test.bin
- xxd -i build/tests/simple_mesh1d/test.bin \
- > build/tests/simple_mesh1d/test.inc
+TESTS += $(SIMPLE_MESH1D)/sim
-build/tests/simple_mesh1d/sim.o: build/tests/simple_mesh1d/test.inc
-
-build/tests/simple_mesh1d/sim: $(MESH1D_TEST_OBJ) $(OBJS)
- $(COMPILE) $(MESH1D_TEST_OBJ) $(OBJS) -o $@
+.PHONY: $(SIMPLE_MESH1D)/sim
+$(SIMPLE_MESH1D)/sim: $(SIMPLE_MESH1D_SIM) libgran.a
+ mkdir -p build/$(SIMPLE_MESH1D)
+ ./scripts/gen-rv64-fw -d build -o $(SIMPLE_MESH1D)/test.inc $(SIMPLE_MESH1D)/test.c
+ $(COMPILE_TEST) $(SIMPLE_MESH1D_SIM) libgran.a -o build/$@
+ ./scripts/gen-report -d build $@