diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2013-07-26 17:02:23 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2013-07-26 17:02:23 +0200 |
commit | 57fe574e058bc34c95a71995060ac45f71300ab6 (patch) | |
tree | 0a36c32bae34cf32121d5daae450082562bde3f1 | |
parent | f000eb0d43193ef8225f947226d9cd3deb00115b (diff) | |
download | ipecamera-57fe574e058bc34c95a71995060ac45f71300ab6.tar.gz ipecamera-57fe574e058bc34c95a71995060ac45f71300ab6.tar.bz2 ipecamera-57fe574e058bc34c95a71995060ac45f71300ab6.tar.xz ipecamera-57fe574e058bc34c95a71995060ac45f71300ab6.zip |
Allow setting of TLP size
-rw-r--r-- | apps/xilinx2.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/xilinx2.c b/apps/xilinx2.c index 90a2b6a..30e0f94 100644 --- a/apps/xilinx2.c +++ b/apps/xilinx2.c @@ -19,6 +19,7 @@ #define STATIC_REGION 0x80000000 // to reserve 512 MB at the specified address, add "memmap=512M$2G" to kernel parameters #define BUFFERS 1 #define ITERATIONS 100 +#define TLP_SIZE 64 #define HUGE_PAGE 4096 // number of pages per huge page #define PAGE_SIZE 4096 // other values are not supported in the kernel #define TIMEOUT 100000 @@ -26,7 +27,7 @@ /* IRQs are slow for some reason. REALTIME mode is slower. Adding delays does not really help, otherall we have only 3 checks in average. Check ready seems to be not needed and adds quite much extra time */ -//#define USE_IRQ +#define USE_IRQ //#define CHECK_READY //#define REALTIME //#define ADD_DELAYS @@ -139,8 +140,8 @@ int main() { #endif /* CHECK_RESULT */ WR(0x04, 0) - WR(0x0C, 0x20) - WR(0x10, (HUGE_PAGE * (PAGE_SIZE / 0x80))) + WR(0x0C, TLP_SIZE) + WR(0x10, (HUGE_PAGE * (PAGE_SIZE / (4 * TLP_SIZE)))) WR(0x14, 0x13131313) for (j = 0; j < BUFFERS; j++ ) { @@ -194,6 +195,7 @@ int main() { pcilib_kmem_sync_block(pci, kbuf, PCILIB_KMEM_SYNC_FROMDEVICE, 0); for (i = 0; i < (HUGE_PAGE * PAGE_SIZE / 4); i++) { +// printf("%lx ", ptr0[i]); if (ptr0[i] != 0x13131313) break; } if (i < (HUGE_PAGE * PAGE_SIZE / 4)) { |