Passing a struct which has double pointer from C to SV using DPI

In reply to karan_18:

You problem is **unsigned long x is the same as unsigned long x[][], which is not the same what is required to match your SystemVerilog prototype as unsigned long x[5][3]. The key difference is in how the size of the data on the call stack get calculated (I’m not a C/C++ expert).

Some tools automatically generate a dpiheader file you can include into your C code that guarantees your function protoypes match at compile time.