G
GaLaKtIkUs
Guest
Hi everybody,
I'm trying to pass a dynamic array as an output to a DPI-C function.
The simulator returns a runtime error at the line where the DPI-C
function is called.
# ** Fatal: (vsim-2211) A dynamic array cannot be passed as an
argument to a
# DPI import function if the formal is an unsized output.
The simplified code follows:
test.c:
void test_c ( const svOpenArrayHandle in, svOpenArrayHandle out )
{
/*CODE*/
return;
}
test.sv:
import "DPI-C" context function void test_c ( input bit [63:0] in[],
output bit [63:0] out[]);
program test_sv;
bit [63:0] in[],out[];
initial begin
in=new[1];
out=new[1];
in="THIS IS!";
test_c(in,out);
end
endprogram
Thanks in advance for help!
I'm trying to pass a dynamic array as an output to a DPI-C function.
The simulator returns a runtime error at the line where the DPI-C
function is called.
# ** Fatal: (vsim-2211) A dynamic array cannot be passed as an
argument to a
# DPI import function if the formal is an unsized output.
The simplified code follows:
test.c:
void test_c ( const svOpenArrayHandle in, svOpenArrayHandle out )
{
/*CODE*/
return;
}
test.sv:
import "DPI-C" context function void test_c ( input bit [63:0] in[],
output bit [63:0] out[]);
program test_sv;
bit [63:0] in[],out[];
initial begin
in=new[1];
out=new[1];
in="THIS IS!";
test_c(in,out);
end
endprogram
Thanks in advance for help!