Need help regarding exported tasks in DPI

M

Melvin

Guest
Hi,

I have an existing C model. From this C model, I wanted to call a
system verilog task. Is this possible if my task is part of an SV
class?

Please can someone help me out with the changes I should do in C or SV
if this is possible

Thanks
Melvin
 
On Aug 16, 7:37 am, Melvin wrote:

   I have an existing C model. From this C model, I wanted to call a
system verilog task. Is this possible if my task is part of an SV
class?
No, you can't do that (as far as I understand).

Make a task in some module, DPI-export that task, and call it
from your C model. Call your class method from within that task.

cheers
--
Jonathan Bromley
 
Thank you Jonathan.
One doubt...suppose I make the direct task[SV] I call from C outside
class. But can that SV task internally call an SV class task? My
problem here is I have the entire code for an environment in SV. Now,
I wanted to prevent the duplication effort in certain C files which
wanted to use the same verification environment I have implemented in
SV.

Thanx in advance
Melvin
 
On Aug 16, 10:36 am, Melvin wrote:

I call from C outside
class. But can that SV task internally call an SV class task?
Yes, certainly. No problem. That was exactly what I intended
to suggest. Apologies if it was not clear.
--
Jonathan Bromley
 
On Aug 16, 5:36 am, Melvin <whereismel...@gmail.com> wrote:
Thank you Jonathan.
One doubt...suppose I make the direct task[SV] I call from C outside
class. But can that SV task internally call an SV class task?
It can if it is a static method of the class. Otherwise it will need
a class handle. But I don't see how your C model would have an SV
class handle.
 

Welcome to EDABoard.com

Sponsor

Back
Top