Chandle and SV byte array

Hi,

If I have 2 variables in SV:

chandle cptr;
byte barr[16];

Is there anyway in SV that I can “cast” cptr to point to barr.
Something that would be analogous to C:

void *cptr;
int barr[16];
cptr = (int*)&barr[0];

Thanks,
-dam

In reply to dam.bui@marqueesemi.com:

SystemVerilog has no pointers, only handles. It has no way to get the address of an object in memory, nor a way to reference an object via an address in memory. And no way to do any kind of pointer arithmetic to index into an array.

A handle is an opaque pointer—there is no way to tell if the handle value is an address, or a lookup in a table. And there is no way to manipulate a handle other than pass it on to another variable, or compare it with another handle to see if they are referencing the same object.

It might help to know what you were planning to do with the pointer so we can give you better alternatives.