1, c文件名尽量与函数名一致。
2, 使用64(32)位机器产生动态链接库及运行ncverilog
3, include veriuser.h vxl_veriuser.h这两个头文件在<install_dir>/tools/include/
4, 编写一个返回值位p_tfcell的函数,函数内部包含了一个s_tfcell的数组,该数组链接用户程序与verilog函数名。
例如; my_hello.c
#include "/cad/CADENCE/INCISIV141013/tools/include/veriuser.h"
#include "/cad/CADENCE/INCISIV141013/tools/include/vxl_veriuser.h"
p-tfcell my_hello()
{
static s_tfcell my_tfs[2] = {
{ usertask, 0, 0, 0, hello_test, 0, "$my_hello" },
{0} /*** final entry must be 0 ***/
};
return (my_tfs);
}
}
5 调用ncelab时开启 -loadpli1 lib_name:function_name(for eaxmple: my_hello)
原文:http://blog.csdn.net/zhuzhiqi11/article/details/44655613