Skip to content

Commit

Permalink
[memcpy] Reduce transfer size for MinPool CI check
Browse files Browse the repository at this point in the history
  • Loading branch information
yichao-zh committed Feb 16, 2024
1 parent 6ddf359 commit 8d48533
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion software/apps/memcpy/data.args
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--variable=l2_data --size=16384
--variable=l2_data --size=8192
19 changes: 9 additions & 10 deletions software/apps/memcpy/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@

// Size in words
#ifndef SIZE
#define SIZE (16384)
#define SIZE (8192)
#endif

#define DMA_ADDRESS (0x40010000)
//#define VERIFY


// Assume banking factor of 4
int32_t l1_data[SIZE] __attribute__((section(".l1_prio")))
__attribute__((aligned(NUM_CORES * 4 * 4)));
Expand Down Expand Up @@ -102,14 +101,14 @@ int main() {
// wait until all cores have finished
mempool_barrier(num_cores);

// Verify
#ifdef VERIFY
if (core_id == 0) {
verify_dma_single_core(l2_data_move_out, SIZE, l2_data, error);
}
// wait until all cores have finished
mempool_barrier(num_cores);
#endif
// Verify
#ifdef VERIFY
if (core_id == 0) {
verify_dma_single_core(l2_data_move_out, SIZE, l2_data, error);
}
// wait until all cores have finished
mempool_barrier(num_cores);
#endif

return error;
}
3 changes: 2 additions & 1 deletion software/runtime/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ static inline uint32_t dma_done() {
}

static inline void dma_wait() {
while (!dma_done());
while (!dma_done())
;
}

void dma_memcpy_nonblocking(void *dest, const void *src, size_t len) {
Expand Down

0 comments on commit 8d48533

Please sign in to comment.