Currently working on verification IP for SPARC V8 using UVM
I have developed a reference model in C it calculates the result and destination register address based on instruction send from SV which is 32-bit length. so, if I declare in SV as
bit [31:0]inst;
and used
import "DPI-C" function void ref_model(input bit [31:0]inst,output bit [31:0]reg_data,output bit [4:0]reg_add);
what should the corresponding data type in C, I have tried like this in C
void ref_model(svBitVecVal* inst,svBitVecVal* reg_data,svBitVecVal* reg_add) // included svdpi.h
{
printf("inst=%s\n",inst);
....
}
when I tried to print inst in C some garbage gets printing also not getting outputs reg_data & reg_add.
appreciate if any experts help me, thank you.