A
ARH
Guest
I have a problem in running PLI application with Modelsim 5.8, I use
windows platform but I can't run PLI apps even simple modelsim PLI
examples, the error occur in Simulating design:
In the simple hello world PLI app I write this hello.c file:
/**************************************************/
#include "acc_user.h"
#include "veriuser.h"
static PLI_INT32 hello(){
io_printf("Hi there\n");
return 0;
}
s_tfcell veriusertfs[]={
{usertask, 0, 0, 0, hello, 0, "$hello"},
{0} /* last entry must be 0 */
};
/************************************************/
And this is my hello.v content:
/******************************************/
module top;
initial
$hello;
endmodule
/******************************************/
First Compile hello.c file for creating hello.obj with this command in
modelsim:
cl -c -ID:/modeltech_5.8/examples/pli2 hello.c
no error reported for compilation but this results appear with RED
color:
# hello.c
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168
for 80x86
# Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
#
Second link hello.obj for creating hello.lib , hello.dll and object
hello.exp whit this command :
link -dll -export:veriusertfs hello.obj D:/modeltech_5.8/win32/
mtipli.lib
and after it hello.dll created with no error.
Then I create work library and compile hello.v with this commands :
vlib work
vlog hello.v
at the end when I want to simulate design with this command
vsim -c -do vsim.do top -pli pli_test.dll
this error appear in modelsim:
# Loading ./hello.dll
# Loading work.top
# Error loading design
Would you mind help me to address this error ?
windows platform but I can't run PLI apps even simple modelsim PLI
examples, the error occur in Simulating design:
In the simple hello world PLI app I write this hello.c file:
/**************************************************/
#include "acc_user.h"
#include "veriuser.h"
static PLI_INT32 hello(){
io_printf("Hi there\n");
return 0;
}
s_tfcell veriusertfs[]={
{usertask, 0, 0, 0, hello, 0, "$hello"},
{0} /* last entry must be 0 */
};
/************************************************/
And this is my hello.v content:
/******************************************/
module top;
initial
$hello;
endmodule
/******************************************/
First Compile hello.c file for creating hello.obj with this command in
modelsim:
cl -c -ID:/modeltech_5.8/examples/pli2 hello.c
no error reported for compilation but this results appear with RED
color:
# hello.c
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168
for 80x86
# Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
#
Second link hello.obj for creating hello.lib , hello.dll and object
hello.exp whit this command :
link -dll -export:veriusertfs hello.obj D:/modeltech_5.8/win32/
mtipli.lib
and after it hello.dll created with no error.
Then I create work library and compile hello.v with this commands :
vlib work
vlog hello.v
at the end when I want to simulate design with this command
vsim -c -do vsim.do top -pli pli_test.dll
this error appear in modelsim:
# Loading ./hello.dll
# Loading work.top
# Error loading design
Would you mind help me to address this error ?