Verilog PLI - VPI

A

AF

Guest
Could any give any info on the following problem.

- I have a VPI application with a xxx_compiletf() routine, a
xxx_calltf() routine and a xxx_startofsim_callback() routine.

I call the following function in xxx_compiletf():
han1 = vpi_handle(vpiSysTfCall, NULL); (where han1 is declared as
vpiHandle)
I then call the same funciton in xxx_calltf().

However, I get a different value for the handle returned which is
supposed to be the handle to the system task calling xxx_compiletf()
and xxx_calltf(). As far as I can see this is not supposed to be the
case. I have downloaded code from
www.sutherland.com
which uses this technique to set up workareas to store pointers to
data structures between successive calls, but this code also fails in
the same way!

Can anyone help??

I am using Modelsim SE 5.5.

Thanks in advance.

AF
 
Hi,
Are you calling this PLI Task within your Verilog mutiple times or
just only once? Also, try running your code with ICARUS and see what
the handles you get. I am not suite sure what you mean by "different
handles" and definitely this is not much to do with your "workarea"
creation, that's better explained in Stuart's book.

HTH,
Ajeetha
http://www.noveldv.com
Co-Author: Using PSL/SUGAR for Formal and Dynamic Verification 2nd
Edition.

s_j_parry@hotmail.com (AF) wrote in message news:<52efa41e.0404200002.35d8ea46@posting.google.com>...
Could any give any info on the following problem.

- I have a VPI application with a xxx_compiletf() routine, a
xxx_calltf() routine and a xxx_startofsim_callback() routine.

I call the following function in xxx_compiletf():
han1 = vpi_handle(vpiSysTfCall, NULL); (where han1 is declared as
vpiHandle)
I then call the same funciton in xxx_calltf().

However, I get a different value for the handle returned which is
supposed to be the handle to the system task calling xxx_compiletf()
and xxx_calltf(). As far as I can see this is not supposed to be the
case. I have downloaded code from
www.sutherland.com
which uses this technique to set up workareas to store pointers to
data structures between successive calls, but this code also fails in
the same way!

Can anyone help??

I am using Modelsim SE 5.5.

Thanks in advance.

AF
 

Welcome to EDABoard.com

Sponsor

Back
Top