diff options
Diffstat (limited to 'apps/plugins/test_mem.c')
-rw-r--r-- | apps/plugins/test_mem.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/plugins/test_mem.c b/apps/plugins/test_mem.c index 0b623fd5c8..66d6248dcc 100644 --- a/apps/plugins/test_mem.c +++ b/apps/plugins/test_mem.c | |||
@@ -21,8 +21,6 @@ | |||
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | 23 | ||
24 | |||
25 | |||
26 | #if PLUGIN_BUFFER_SIZE <= 0x8000 | 24 | #if PLUGIN_BUFFER_SIZE <= 0x8000 |
27 | #define BUF_SIZE (1<<12) /* 16 KB = (1<<12)*sizeof(int) */ | 25 | #define BUF_SIZE (1<<12) /* 16 KB = (1<<12)*sizeof(int) */ |
28 | #elif PLUGIN_BUFFER_SIZE <= 0x10000 | 26 | #elif PLUGIN_BUFFER_SIZE <= 0x10000 |
@@ -39,10 +37,17 @@ static int loop_repeat_dram = LOOP_REPEAT_DRAM; | |||
39 | static volatile int buf_dram[BUF_SIZE] MEM_ALIGN_ATTR; | 37 | static volatile int buf_dram[BUF_SIZE] MEM_ALIGN_ATTR; |
40 | 38 | ||
41 | #if defined(PLUGIN_USE_IRAM) | 39 | #if defined(PLUGIN_USE_IRAM) |
40 | |||
41 | #if PLUGIN_BUFFER_SIZE <= 0x8000 | ||
42 | #define IBUF_SIZE (1<<12) /* 16 KB = (1<<12)*sizeof(int) */ | ||
43 | #else | ||
44 | #define IBUF_SIZE (1<<13) /* 32 KB = (1<<13)*sizeof(int) */ | ||
45 | #endif | ||
46 | |||
42 | #define LOOP_REPEAT_IRAM 256 | 47 | #define LOOP_REPEAT_IRAM 256 |
43 | #define MAX_REPEAT_IRAM 512 | 48 | #define MAX_REPEAT_IRAM 512 |
44 | static int loop_repeat_iram = LOOP_REPEAT_DRAM; | 49 | static int loop_repeat_iram = LOOP_REPEAT_DRAM; |
45 | static volatile int buf_iram[BUF_SIZE] IBSS_ATTR MEM_ALIGN_ATTR; | 50 | static volatile int buf_iram[IBUF_SIZE] IBSS_ATTR MEM_ALIGN_ATTR; |
46 | #endif | 51 | #endif |
47 | 52 | ||
48 | /* (Byte per loop * loops)>>20 * ticks per s * 10 / ticks = dMB per s */ | 53 | /* (Byte per loop * loops)>>20 * ticks per s * 10 / ticks = dMB per s */ |