cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,372 Views
Registered: ‎06-17-2018

Unsupported pointer reinterpretation error during Hardware emulation ..

Jump to solution

This is the outline of kernel code I'm trying to compile.


//kernel ....
{
.
.
.
ulong PState[8];
.
.
.

for (uint i = 0; i < 4; ++i)
{
   ulong AH[8], AM[8];
.
.
.
   for (int x = 0; x < 8; ++x) {
       AH[x] = AM[x] ^ PState[x];
   }
}

//##end kernel
}

 

Error message is :

unsupported pointer reinterpretation from type '[8 x i64]*' to type 'i512*' on variable 'PState'.

I've tried to use temp ulong values (for xor expression )  but same error ...

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
1,348 Views
Registered: ‎06-17-2018

I think I solved problem by changing all reinterpratations with array access ( calculating pointer math.. ).

It's interesting that a compiler can repartition arrays, unroll loops and does plenty of other things but not make pointer reinterpretation ( simple math based types length )..

Anyways thank you for help..

View solution in original post

0 Kudos
4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
1,333 Views
Registered: ‎09-08-2011

Hi Firatto,

 

   I tried this myself really quickly without an error.

 

Can you take the code in question,and make a fully build-able kernel code snippet that I can just compile and get the same error?

 

The error looks like you are using your pointer PState which is 64 bits, with some value elsewhere that is 512 bits.

 

I don't think: AH[x] = AM[x] ^ PState[x]; should be the line that does that, as it's not using the pointer, it's all the same size array with the same size elements in it.

 

Do you happen to have something like a uint16 used in your code?

 

 

 

If at first you don't succeed, try redefining success?
0 Kudos
Highlighted
Visitor
Visitor
1,326 Views
Registered: ‎06-17-2018

Hi Evant,

thanks for reply,

You're right , I was trying to simple kernel just the code give error, and code compiled ..

My final thought is during synthesizing returned errors may not point exact location.

I'll try to send full code ( it's not public, need to ask seniors before that ).

Is it possible to send it privately.

Thanks again for help.

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
1,310 Views
Registered: ‎09-08-2011

Yeah, there is a way to direct message me. If that doesn't work let me know.

 

 

If at first you don't succeed, try redefining success?
0 Kudos
Highlighted
Visitor
Visitor
1,349 Views
Registered: ‎06-17-2018

I think I solved problem by changing all reinterpratations with array access ( calculating pointer math.. ).

It's interesting that a compiler can repartition arrays, unroll loops and does plenty of other things but not make pointer reinterpretation ( simple math based types length )..

Anyways thank you for help..

View solution in original post

0 Kudos