cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mikerez
Explorer
Explorer
5,002 Views
Registered: ‎05-03-2012

HLS C++ type cast from memory

Hi ALL,

 

is there any way to cast type from int* (bus or memory interface) to your data struct?

In example:

 

struct data

{

   int a;

   char b;

   bool c;

};

 

int main( int * memory )

{

    data cache;

    memcpy((void*)cache,(void*)memory,sizeof(data));

    cache.a=0;

    cache.b=0;

    cache.c=0;

    memcpy((void*)memory,(void*)cache,sizeof(data));

}

 

This will give the error "unsupported pointer reinterpretation...".

Is there any way to work with different structures from memory???

 

Thank you,

0 Kudos
1 Reply
mikerez
Explorer
Explorer
4,978 Views
Registered: ‎05-03-2012

Got answer from support....

no casting, no C-structures from memory...

0 Kudos