我无法通过SV-C DPI将结构对象从SV传递到C.
代码:
SV方面:
/*svFile.sv*/
typedef struct {
int a;
int b;
} struct_sv;
import "DPI-C" function void reciever(input struct_sv a);
和C侧
/*cFile.c*/
void reciever(const struct_sv *x){
printf("%d %d", x->a, x->b);
}
但是当我编译并运行时,我收到以下错误:
ncvlog: *E,UNUSAG unsupported element in unpacked struct datatype in formal argument.