Skip to content

Commit

Permalink
sw/tests: Clean lint
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsc96 committed Nov 28, 2024
1 parent c372247 commit 34e2bea
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions sw/tests/axirt_budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,19 @@ int main(void) {

// Wait for writes, then launch blocking DMA transfer
fence();
sys_dma_2d_blk_memcpy((uintptr_t)(void *)dma_dst, (uintptr_t)(void *)dma_src, sizeof(golden),
0, 0, 1);
sys_dma_2d_blk_memcpy((uintptr_t)(void *)dma_dst, (uintptr_t)(void *)dma_src, sizeof(golden), 0,
0, 1);

// Check DMA transfers against gold.
for (int i = 0; i < DMA_NUM_BEATS; i++) CHECK_ASSERT(20 + i, dma_dst[i] == golden[i]);

// Read budget registers for dma and compare
int dma_read_budget_left = *reg32(&__base_axirt, AXI_RT_READ_BUDGET_LEFT_0_REG_OFFSET
+ AXI_RT_PARAM_NUM_SUB * chs_dma_id * sizeof(uint32_t));
int dma_write_budget_left = *reg32(&__base_axirt, AXI_RT_WRITE_BUDGET_LEFT_0_REG_OFFSET
+ AXI_RT_PARAM_NUM_SUB * chs_dma_id * sizeof(uint32_t));
int dma_read_budget_left =
*reg32(&__base_axirt, AXI_RT_READ_BUDGET_LEFT_0_REG_OFFSET +
AXI_RT_PARAM_NUM_SUB * chs_dma_id * sizeof(uint32_t));
int dma_write_budget_left =
*reg32(&__base_axirt, AXI_RT_WRITE_BUDGET_LEFT_0_REG_OFFSET +
AXI_RT_PARAM_NUM_SUB * chs_dma_id * sizeof(uint32_t));

// Check budget: return 0 if (initial budget - final budget) matches the
// number of transferred bytes, otherwise return 1
Expand Down

0 comments on commit 34e2bea

Please sign in to comment.