Hello,
Is there anyone who can support in system Verilog DPI-C .??
Then i will post my issue here.
Regards,
Nidhi
Hello,
Is there anyone who can support in system Verilog DPI-C .??
Then i will post my issue here.
Regards,
Nidhi
In reply to nidhi0844:
It’s going to depend on the type of issue and how much “support” you really need. This is a volunteer discussion forum, not a customer support site.
in C -
int SnappyOperations(int sel,char (*Raw_Data)[3],int size)
then I want to Dpi this function in sv.
I have to make the wrapper of this function in c as using OpenArrayHandle , Then how Can i make this?
I want to pass the 4k data to this (Raw_Data)…
and size is 4096
In reply to nidhi0844:
I do not entirely understand how you meant to pass 4K of data as an array of 3 char strings, but think can import the following function
import "DPI-C" context function void wrapper(int sel, byte data[3][], int size);
Then your C code would look like
void wrapper (int sel, const svOpenArrayHandle data, int size){
char (*wrap_data)[3];
wrap_data[0] = (char *)svGetArrElemPtr2(data,0,0);
wrap_data[1] = (char *)svGetArrElemPtr2(data,1,0);
wrap_data[2] = (char *)svGetArrElemPtr2(data,2,0);
SnappyOperations(sel,wrap_data,size);
}
I am extremely rusty with multidimensional array pointers in C, but I hope this gives you an idea of where to start.