Forum Discussion
Altera_Forum
Honored Contributor
10 years ago --- Quote Start --- Try incrementing your fetch address by the size of the quantity you are reading. --- Quote End --- This was correct, I changed my code to increment the address by 4 and this corrected my output. In my original code I was essentially reading the same location 4 times in a row. --- Quote Start --- Can you check whether the CPU is writing some values into the Dual port RAM that may corrupt the values? You can check at the bsp-editor to ensure that the linker does not mapped any data region into the dual port RAM. --- Quote End --- Thank you. This solved the "unexpected data" part of the problem. I had originally mapped .rodata and .rwdata to the dp_ram because I did not have enough understanding of the bsp. Once I remapped everything to the onchip memory, life is good again.