What equivalent that needs to be passed in SV for a 2-D array in C - Code while calling DPI-C?

Hello Folks,

Getting extremelly restless what actual values needs to be passed when using DPI-C Calls !

This is the Structure that is used in C Side:
typedef struct
{
int bp;
unsigned char ed;
unsigned char ep;
unsigned char en[MAX_TAP];
unsigned char refsel[MAX_TAP][64];
double top[MAX_TAP];
double bot[MAX_TAP];
double re;
double rm;
} pt;

Below is the equivalent structure that I defined in SV Code:
typedef struct
{
int bp;
bit[7:0] ed;
bit[7:0] ep;
bit[7:0] en[MAX_TAP];
bit[7:0] refsel[MAX_TAP][64];
longint top[MAX_TAP];
longint bot[MAX_TAP];
longint re;
longint rm;
} pt_sv;

a. What equivalent that needs to be passed for “double variable” in C while using it in SV ~ I tried passing longint because the tool “Incisive” didnt support the feature of real.
b. What equivalent needs to be used for a 2-D array while passing via array ??

Kindly share in your input and help out !

Happy Thanks Giving !!

In reply to desperadorocks:
char in C maps to byte unsigned in SystemVerilog. byte unsigned is type equivalent to bit [7:0], but the DPI maps that to svBitVecVal in C.

Most tools will generate a C header file for you that shows you the C equivalent to the SystemVerilog arguments types. You should include that file when you compile your C code so the compiler can check the argument types for you instead of getting garbage results or a crash at runtime.