UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer yingcai
Observer
6,860 Views
Registered: ‎02-20-2016

Can't assign result getting form ip-core to a variable declared in SDK

Hey guys,

I can get the value from my IP-core, the code is like this:

Setup_HW_Accelerator(A, B, A, dma_size);
for (int ii = 0; ii < NUM_TESTS; ii++) { //NUM_TESTS = 10
	Start_HW_Accelerator( );
	Run_HW_Accelerator(A, B, A, dma_size); //Get value from custome IP-core
}

the value here refers to the float type array A[32][32]. However, if I try to assign the array A[32][32] to a new array which is the same type and declared in the same scope, the code is like this:

Setup_HW_Accelerator(A, B, A, dma_size);
for (int ii = 0; ii < NUM_TESTS; ii++) { //NUM_TESTS = 10
	Start_HW_Accelerator( );
	Run_HW_Accelerator(A, B, A, dma_size);
	for(int idn = 0; idn < 32; idn++){
	        for(int jdn = 0; jdn < 32; jdn++){
			preserve[idn][jdn] = A[idn][jdn];
		}
	}
}

After 10 iterations, then I print out the result, array A[32][32]'s result indicates it is only being iterate for 1 time. The array preserve[32][32]'s result indicates its result is assigned by array A[32][32]'s first iteration result.

 

Why is that?????  Can anyone help?????

 

Thanks,

Yingcai.

0 Kudos