Skip to content

Commit 21da327

Browse files
committed
software/user/litepcie_util: Also mask buf[i] in check_pn_data (in case garbage or sign extension is done by FPGA)(from LiteXM2SDR).
1 parent af03458 commit 21da327

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

litepcie/software/user/litepcie_util.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static int check_pn_data(const uint32_t *buf, int count, uint32_t *pseed, int da
333333
errors = 0;
334334
seed = *pseed;
335335
for (i = 0; i < count; i++) {
336-
if (buf[i] != (seed_to_data(seed) & mask)) {
336+
if ((buf[i] & mask) != (seed_to_data(seed) & mask)) {
337337
errors ++;
338338
}
339339
seed = add_mod_int(seed, 1, DMA_BUFFER_SIZE / sizeof(uint32_t));

0 commit comments

Comments
 (0)