Skip to content

Commit

Permalink
user/litepcie_util/dma_test: skip check in initial dma loops to impro…
Browse files Browse the repository at this point in the history
…ve rx delay calibration robustness.
  • Loading branch information
enjoy-digital committed Mar 4, 2022
1 parent 9143ce0 commit d3af0fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions litepcie/software/user/litepcie_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ static void dma_test(uint8_t zero_copy, uint8_t external_loopback, int data_widt
if (!buf_rd)
break;

/* break until first full dma loop */
if (dma.writer_hw_count < DMA_BUFFER_COUNT)
/* skip the first 128 dma loop */
if (dma.writer_hw_count < 128*DMA_BUFFER_COUNT)
break;

if (run) {
Expand Down Expand Up @@ -381,7 +381,7 @@ static void dma_test(uint8_t zero_copy, uint8_t external_loopback, int data_widt

/* statistics */
int64_t duration = get_time_ms() - last_time;
if (duration > 200) {
if (run & (duration > 200)) {
if (i % 10 == 0)
printf("\e[1mDMA_SPEED(Gbps)\tTX_BUFFERS\tRX_BUFFERS\tDIFF\tERRORS\e[0m\n");
i++;
Expand Down

0 comments on commit d3af0fc

Please sign in to comment.