-
Notifications
You must be signed in to change notification settings - Fork 46
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
Issue with portalCacheFlush in memcpy example? #120
Comments
What values are being overwritten to which memory locations? On Mon, Jun 6, 2016 at 9:26 AM Prasanna Rawke [email protected]
|
The values being overwritten vary with each run of the program. But they were in blocks of 8 or 16, replaced by zeroes. The first eight addresses of srcBuffer were always replaced while the other block replaced was around indices 80-100 and varies with each run. |
Please post the code you added to print out the values and then a On Mon, Jun 6, 2016 at 10:52 AM Prasanna Rawke [email protected]
|
I have modified done method of MemcpyIndication class as:
Also, I have reduced the problem size to 256 as follows:
These are the transcripts for the program for 3 runs: |
I am still unable to reproduce this problem, but I added code to verify src[i] == dst[i] == i |
When uploaded to Zedboard, the mismatch occurs. But in case of simulation, output is correct. So it might be a board specific issue. Which board are you working on? |
Prasanna, In the case of simulation, you are using x86 user-mode cache coherence. In I've been testing this on a Zedboard and on a Zynq Mini ITX board. I also It seems like we must have a bug in the cache flush code in the kernel, and -Jamey On Tue, Jun 7, 2016 at 2:43 AM Prasanna Rawke [email protected]
|
I have reproduced the issue by doing as you suggested -- shortening the On Tue, Jun 7, 2016 at 8:36 AM Jamey Hicks [email protected] wrote:
|
I cannot explain this, but this version passes repeatedly: if (1) { for (int i = 0; i < numWords; i++){ if (0) { On Tue, Jun 7, 2016 at 9:06 AM Jamey Hicks [email protected] wrote:
|
Hi Jamey,
In case of memcpy, the program finishes with status 0 (successfully) unlike previously with older images. But when I print the src and dst array in software's done function, some of the locations are overwritten (or initialized as 0). If I initialize, the memory after 'portalCacheFlush' src and dst are initialized properly. Can that be happening because of 'portalCacheFlush'?
Default order for memory initialization in memcpy example:
In this case, some parts of the src and dst array are not initialzed properly.
Following modifications in the order solves the issue:
The text was updated successfully, but these errors were encountered: