diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-08-09 17:20:05 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-08-09 17:20:05 +0300 |
| commit | 1853f5d6594bc371e4d8e631c24acd011a620915 (patch) | |
| tree | 1bfaabd3685d4eacc6595ee6836adddcc37ba841 /tests/simple_mesh1d/sim.c | |
| parent | 3083284c797fc8fc267144b05c8a58395e4583e3 (diff) | |
| download | gran-1853f5d6594bc371e4d8e631c24acd011a620915.tar.gz gran-1853f5d6594bc371e4d8e631c24acd011a620915.zip | |
refactor mesh3d to match 2d,1d
Diffstat (limited to 'tests/simple_mesh1d/sim.c')
| -rw-r--r-- | tests/simple_mesh1d/sim.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/simple_mesh1d/sim.c b/tests/simple_mesh1d/sim.c index c5f7290..b419633 100644 --- a/tests/simple_mesh1d/sim.c +++ b/tests/simple_mesh1d/sim.c @@ -15,7 +15,6 @@ static stat build_node1d(struct clock_domain *clk, uint16_t x, uint16_t y) assert(mesh); for (int i = 1; i < x + 1; ++i) { - /* 4 CPUs + 1 mem = 5 elems in total */ struct component *node = create_mesh_node1d(i, y + 1); clock_domain_add(clk, node); mesh[i] = node; @@ -23,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_bin_len, + build_tests_simple_mesh1d_test_bin); uint64_t rcv = mesh1d_addr(i, j, 0); struct component *rv64 = create_simple_riscv64(rcv, 0, imem, node); @@ -44,7 +43,7 @@ static stat build_node1d(struct clock_domain *clk, uint16_t x, uint16_t y) mesh_node1d_connect(node, dmem, 4); } - /* extra I/O node (kind of?) */ + /* extra I/O node */ struct component *node = create_mesh_node1d(0, 2); clock_domain_add(clk, node); mesh[0] = node; @@ -59,10 +58,10 @@ static stat build_node1d(struct clock_domain *clk, uint16_t x, uint16_t y) for (int i = 0; i < x + 1; ++i) { if (i - 1 >= 0) - mesh_node1d_connect_right(mesh[i], mesh[i - 1]); + mesh_node1d_connect_south(mesh[i], mesh[i - 1]); if (i + 1 < x + 1) - mesh_node1d_connect_left(mesh[i], mesh[i + 1]); + mesh_node1d_connect_north(mesh[i], mesh[i + 1]); } free(mesh); |
