summaryrefslogtreecommitdiffstats
path: root/fpga/interface/beaglebone_black/gpmc
diff options
context:
space:
mode:
Diffstat (limited to 'fpga/interface/beaglebone_black/gpmc')
-rw-r--r--fpga/interface/beaglebone_black/gpmc/test/bbb-gpmc-test.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/fpga/interface/beaglebone_black/gpmc/test/bbb-gpmc-test.c b/fpga/interface/beaglebone_black/gpmc/test/bbb-gpmc-test.c
index 2c5dc99..fc25d88 100644
--- a/fpga/interface/beaglebone_black/gpmc/test/bbb-gpmc-test.c
+++ b/fpga/interface/beaglebone_black/gpmc/test/bbb-gpmc-test.c
@@ -59,6 +59,7 @@ char *gpio_mem, *gpio_map, *gpmc_map;
// I/O access
static volatile unsigned int *gpio = NULL;
static volatile unsigned char *gpio_char = NULL;
+static volatile unsigned long long *gpio_longlong = NULL;
static volatile unsigned int *gpmc = NULL;
static void gpmc_mapregisters()
@@ -166,6 +167,7 @@ static void io_setup(void)
// Always use volatile pointer!
gpio = (volatile unsigned *)gpio_map;
gpio_char = (volatile unsigned char *)gpio_map;
+ gpio_longlong =( volatile unsigned long long *)gpio_map;
// Select a test from the following blocks of code...
@@ -187,6 +189,7 @@ static void io_setup(void)
// *(gpio + j) = j;
// }
+#if 0
// DEBUG ONLY
// Looping memory test
unsigned int test_base = (MEMORY_SIZE/2);
@@ -295,18 +298,26 @@ static void io_setup(void)
printf("Total errors found over all loops:\t%d\n", overall_total_errors);
fflush(stdout);
return;
-
+#endif
int j;
for (j=0;j<MEMORY_SIZE; j++) {
*(gpio_char + j) = ((unsigned char)j);
}
+// // DEBUG ONLY
+// // Prints the contents of the mapped memory
+// int k;
+// for (k=0;k<(MEMORY_SIZE/4); k++) {
+// printf("0x%08x\t%08x\n", k, *(gpio + k));
+// }
+// fflush(stdout);
+
// DEBUG ONLY
// Prints the contents of the mapped memory
int k;
- for (k=0;k<(MEMORY_SIZE/4); k++) {
- printf("0x%08x\t%08x\n", k, *(gpio + k));
+ for (k=0;k<(MEMORY_SIZE/8); k++) {
+ printf("0x%08x\t%016llx\n", k, *(gpio_longlong + k));
}
fflush(stdout);