aboutsummaryrefslogtreecommitdiff
path: root/tests/simple_grid/test.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-02-24 21:31:46 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-02-24 21:31:46 +0200
commite991095180f774e3582329447c291a11499989ba (patch)
tree0708d2308a229b932a84d8ae803b31d296f9fc0f /tests/simple_grid/test.c
parent238116c1cf08b93335abd493df110a669786553e (diff)
downloadgran-e991095180f774e3582329447c291a11499989ba.tar.gz
gran-e991095180f774e3582329447c291a11499989ba.zip
overhaul meshes
+ Previous name was grid
Diffstat (limited to 'tests/simple_grid/test.c')
-rw-r--r--tests/simple_grid/test.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/simple_grid/test.c b/tests/simple_grid/test.c
deleted file mode 100644
index 2891a6e..0000000
--- a/tests/simple_grid/test.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#define X 16
-#define Y 16
-
-void _start(unsigned short x, unsigned short y)
-{
- volatile unsigned long *control = (unsigned long *)(((unsigned long)x << 32) | ((unsigned long)y << 48) + 128);
- volatile char *uart = (char *)4096;
-
- /* very hacky, not recommended but good enough for testing */
- if (x == 0 && y == 2) {
- *uart = '0';
- *uart = '\n';
- }
- else
- *control = 0; /* go to sleep */
-
- *uart = '(';
- /* [0 - 16] as two octal numbers */
- *uart = ((x >> 3) & 0x7) + '0';
- *uart = ((x >> 0) & 0x7) + '0';
-
- *uart = ',';
- *uart = ' ';
-
- *uart = ((y >> 3) & 0x7) + '0';
- *uart = ((y >> 0) & 0x7) + '0';
-
- *uart = ')';
- *uart = '\n';
-
- if (x == 15 && y == 15)
- asm ("ebreak\n");
-
- if (y == 15) {
- x++;
- y = 0;
- }
- else
- y++;
-
- volatile unsigned long *next = (unsigned long *)(((unsigned long)x << 32) | ((unsigned long)y << 48) + 128);
- *next = 1; /* wake next core */
- *control = 0; /* go to sleep again */
-}