summaryrefslogtreecommitdiffstats
path: root/ipedma.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@ipepdvdev1.ipe.kit.edu>2016-05-19 19:48:24 +0200
committerSuren A. Chilingaryan <csa@ipepdvdev1.ipe.kit.edu>2016-05-19 19:48:24 +0200
commit16e0aeeed527f8452e336685f664d7aa848702d3 (patch)
tree7d22cb7f5bee5d4e37e374adf80706715efa36ed /ipedma.h
downloadgdrtest-16e0aeeed527f8452e336685f664d7aa848702d3.tar.gz
gdrtest-16e0aeeed527f8452e336685f664d7aa848702d3.tar.bz2
gdrtest-16e0aeeed527f8452e336685f664d7aa848702d3.tar.xz
gdrtest-16e0aeeed527f8452e336685f664d7aa848702d3.zip
First test
Diffstat (limited to 'ipedma.h')
-rw-r--r--ipedma.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/ipedma.h b/ipedma.h
new file mode 100644
index 0000000..284b058
--- /dev/null
+++ b/ipedma.h
@@ -0,0 +1,20 @@
+#define REG_RESET_DMA 0x00
+#define REG_DMA 0x04
+#define REG_NUM_PACKETS_PER_DESCRIPTOR 0x10
+#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_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 WR64(addr, value) *(uint64_t *) (((char*)(bar)) + (addr)) = (value);
+#define RD64(addr) (*(uint64_t *) (((char*)(bar)) + (addr)))
+#define WR64_sleep(addr, value) *(uint64_t *) (((char*)(bar)) + (addr)) = (value); usleep (100);
+