summaryrefslogtreecommitdiffstats
path: root/ipedma.h
diff options
context:
space:
mode:
authorroot <root@ipepdvdev1.ipe.kit.edu>2016-05-24 00:04:46 +0200
committerroot <root@ipepdvdev1.ipe.kit.edu>2016-05-24 00:04:46 +0200
commitca1b1cea796bcfaeb86f201cf35065a606921cc1 (patch)
tree9dbe7a85bad655dbbc7852149c749d9e85573601 /ipedma.h
parent16e0aeeed527f8452e336685f664d7aa848702d3 (diff)
downloadgdrtest-ca1b1cea796bcfaeb86f201cf35065a606921cc1.tar.gz
gdrtest-ca1b1cea796bcfaeb86f201cf35065a606921cc1.tar.bz2
gdrtest-ca1b1cea796bcfaeb86f201cf35065a606921cc1.tar.xz
gdrtest-ca1b1cea796bcfaeb86f201cf35065a606921cc1.zip
Read hw counter
Diffstat (limited to 'ipedma.h')
-rw-r--r--ipedma.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/ipedma.h b/ipedma.h
index 284b058..299499c 100644
--- a/ipedma.h
+++ b/ipedma.h
@@ -1,20 +1,21 @@
#define REG_RESET_DMA 0x00
#define REG_DMA 0x04
#define REG_NUM_PACKETS_PER_DESCRIPTOR 0x10
-#define REG_PERF_COUNTER 0x28
+#define REG_PERF_COUNTER 0x20
+//#define REG_PERF_COUNTER 0x28
#define REG_PACKET_LENGTH 0x0C
#define REG_DESCRIPTOR_ADDRESS 0x50
#define REG_UPDATE_ADDRESS 0x58
#define REG_UPDATE_THRESHOLD 0x60
-
+#define REG_INTERCONNECT 0x9048
#define REG_COUNTER 0x9000
-#define WR32(addr, value) *(uint32_t *) (((char*)(bar)) + (addr)) = (value);
-#define RD32(addr) (*(uint32_t *) (((char*)(bar)) + (addr)))
-#define WR32_sleep(addr, value) *(uint32_t *) (((char*)(bar)) + (addr)) = (value); usleep (100);
+#define WR32(addr, value) *(volatile uint32_t *) (((char*)(bar)) + (addr)) = (value);
+#define RD32(addr) (*(volatile uint32_t *) (((char*)(bar)) + (addr)))
+#define WR32_sleep(addr, value) *(volatile uint32_t *) (((char*)(bar)) + (addr)) = (value); usleep (100);
-#define WR64(addr, value) *(uint64_t *) (((char*)(bar)) + (addr)) = (value);
-#define RD64(addr) (*(uint64_t *) (((char*)(bar)) + (addr)))
+#define WR64(addr, value) *(volatile uint64_t *) (((char*)(bar)) + (addr)) = (value);
+#define RD64(addr) (*(volatile uint64_t *) (((char*)(bar)) + (addr)))
#define WR64_sleep(addr, value) *(uint64_t *) (((char*)(bar)) + (addr)) = (value); usleep (100);