Problem in Modelsim with PLI

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 ?
 
I was change C compiler and linker but still it doesn't work and the
same error reported in loading design after loading DLL library file
in modelsim.
the source code are so simple and I think this problem related to
modelsim ,not to my work.

are there any other solution for running PLI ?


ARH
www.sakhtafzar.com
 
On Fri, 20 Jul 2007 06:12:56 -0000,
ARH <haghdoost@gmail.com> wrote:

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
[...]
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
Presumably you mean "-pli hello.dll" ??? If you *really* used
a different dll, all manner of strange stuff might happen.

this error appear in modelsim:
# Loading ./hello.dll
# Loading work.top
# Error loading design
Strange. It looks OK to me. What's in your vsim.do ??

What C compiler did you use in your second attempt?
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
On Jul 24, 3:12 am, Jonathan Bromley <jonathan.brom...@MYCOMPANY.com>
wrote:
On Fri, 20 Jul 2007 06:12:56 -0000,

ARH <haghdo...@gmail.com> wrote:
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

[...]

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

Presumably you mean "-pli hello.dll" ??? If you *really* used
a different dll, all manner of strange stuff might happen.

this error appear in modelsim:
# Loading ./hello.dll
# Loading work.top
# Error loading design

Strange. It looks OK to me. What's in your vsim.do ??

What C compiler did you use in your second attempt?
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.brom...@MYCOMPANY.comhttp://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
I use .Net Compiler in my second attempt but it isn't work , by the
way I change my PLI application from Vrilog-XL method to Synopsys
Method and currently I am using an old version of VCS , It is greate
and working in my PLI application.

I appreciate you, Mr Bromley.

ARH
 

Welcome to EDABoard.com

Sponsor

Back
Top