Skip to content

Commit

Permalink
software/user/litepcie_util: Also mask buf[i] in check_pn_data (in ca…
Browse files Browse the repository at this point in the history
…se garbage or sign extension is done by FPGA)(from LiteXM2SDR).
  • Loading branch information
enjoy-digital committed Jul 22, 2024
1 parent af03458 commit 21da327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion litepcie/software/user/litepcie_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static int check_pn_data(const uint32_t *buf, int count, uint32_t *pseed, int da
errors = 0;
seed = *pseed;
for (i = 0; i < count; i++) {
if (buf[i] != (seed_to_data(seed) & mask)) {
if ((buf[i] & mask) != (seed_to_data(seed) & mask)) {
errors ++;
}
seed = add_mod_int(seed, 1, DMA_BUFFER_SIZE / sizeof(uint32_t));
Expand Down

0 comments on commit 21da327

Please sign in to comment.