Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_SGDMAChannel.transfer() ignores start offset #1392

Open
sebastianpetersFAU opened this issue Oct 4, 2022 · 2 comments · May be fixed by #1401
Open

_SGDMAChannel.transfer() ignores start offset #1392

sebastianpetersFAU opened this issue Oct 4, 2022 · 2 comments · May be fixed by #1401

Comments

@sebastianpetersFAU
Copy link

I just noticed that in dma.py, when using the _SGDMAChannel.transfer(array, start, nbytes) function, the start parameter (offset into array) is ignored in lines 427 and 429 when the descriptors are filled out.

This leads to the data ending up at the wrong address as if start was always set to 0.

In line 382 the start parameter is used as expected ... (array.physical_address + start) ... when checking for alignment,


Suggestion: Add + start in line 427 (and 429):

old: (array.physical_address + (i * blk_size)) & 0xffffffff
new: (array.physical_address + start + (i * blk_size)) & 0xffffffff

@mariodruiz
Copy link
Collaborator

Hi @sebastianpetersFAU,

The version 3.0 has just been released.

However, I suggest you create a Pull Request with these changes, and they will be reviewed.

Mario

sebastianpetersFAU added a commit to sebastianpetersFAU/PYNQ that referenced this issue Oct 18, 2022
Array offset was ignored when filling out descriptors but was used properly when checking for alignment.
See Xilinx#1392
@sebastianpetersFAU
Copy link
Author

Hi @mariodruiz

I have created a pull request (#1401) since this issue exists in version 3.0 as well.

Sebastian

@mariodruiz mariodruiz linked a pull request Oct 24, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants