Unsupported element in an unpacked struct datatype in a formal argument

I am having trouble passing structure object from SV to C via SV-C DPI.

Code:

side SV:

/*svFile.sv*/
typedef struct {
    int a; 
    int b;  
} struct_sv;
import "DPI-C" function void reciever(input struct_sv a);

      

and on the C side

/*cFile.c*/
void reciever(const struct_sv *x){
    printf("%d %d", x->a, x->b);
}

      

But when I compile and run I get the following error:

ncvlog: *E,UNUSAG unsupported element in unpacked struct datatype in formal argument.

      

+3


source to share





All Articles