Jump to content
  • 0

Can't Access memory Locations of DDR


hm563562
 Share

Question

I am using Genesys-2 board and Xilinx Vitis.

I wanted to store 441 floating point data values in the memory location starting from the Base address of Mig DDR, i.e., I have an array of 441 values and I ran a for loop( and also tried memcpy ) to assign the array values to the DDR memory. The program runs fine(by fine-> I mean the values are getting correctly stored in the memory locations) till 214th element. As soon as I write into the memory location : (Base address + 215*sizeof(float)) , my program stops responding. This happens for any address greater than (BaseAddress + 215*sizeof(float)). It is like I am not able to access those memory Addresses.

for(int i=0;i<441;i++){ //program works fine if this loop is used for i<215

volatile float * ptr = (float *)(MIG_BASE_ADDR + (i*sizeof(float)));

*ptr=arr[i];//storing array values to memory

xil_printf("%x\n",*(int *)(MIG_BASE_ADDR + (i*sizeof(float))); //prints correct values upto 214 elements of the array

}

I checked if the size/range of MIG DDR was too low but the size/range assigned in the block Design is 1G which should be fine for storing 441 float values.

Can someone please help me in this regard.

 

Or in general, if you have a large array, what method is used to store its content in DDR?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...