When I run across on web, I found this question how to use verilog PLI communicate with c by ncverilog compiler
And I followed the last answer but It does not work. One of the error is hello_vpi.c : "vpi_user.h No such file or directory" hello_vpi.c 12 : error 's_vpi_systf_data'undeclared(first use in this function) ....
What should I for solving?
update
@Greg :: My simulator is Incisive15.10.002 and Linux6.0.
I have got a problems which is when I ran like this gcc hello_vpi.c -fPIC -shared -o hello_vpi.so -I /cadence/Incisive/Incisive15.10.002/tools.lnx86/include
then I have got some message as following.
hello_vpi.c : Infunction 'register_hello' :
hello_vpi.c :16: warning: assignment from incompatible pointer type.
And I have got some error messages as following when I run this command
ncverilog test.v +access+r -v hello_vpi.so
...
*W.LIBNOU : Library "hello_vpi.so given but not used.
...
$hello;
unrecognized system task or function
...
libvpi.so cannot open shaed object file: No such file directory or file is not valid ELFCLASS64 library
...
*E, MSSYSTF : user defined system task or function( $hello) registered during elaboration and used with in the simulation has not been registered during simulation.
I have no idea what am I suppose to do?
-I
(capital 'i') with a path to your simulator. Some simulators have the file in a lib or bin director. – Gregvpi_user.h
already included. If you need more help, you will need to update your question and tell use what simulator and OS you are using and if you are using an IDE. – Greg