EDAboard.com | EDAboard.eu | EDAboard.de | EDAboard.co.uk | RTV forum PL | NewsGroups PL

Need help regarding exported tasks in DPI

elektroda.net NewsGroups Forum Index - Verilog Language - Need help regarding exported tasks in DPI

Melvin
Guest

Mon Aug 16, 2010 9:37 am   



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

Jonathan Bromley
Guest

Mon Aug 16, 2010 12:22 pm   



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

Quote:
   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

Melvin
Guest

Mon Aug 16, 2010 12:36 pm   



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

Jonathan Bromley
Guest

Mon Aug 16, 2010 1:29 pm   



On Aug 16, 10:36 am, Melvin wrote:

Quote:
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?

Yes, certainly. No problem. That was exactly what I intended
to suggest. Apologies if it was not clear.
--
Jonathan Bromley


Guest

Fri Aug 20, 2010 4:39 am   



On Aug 16, 5:36 am, Melvin <whereismel...@gmail.com> wrote:
Quote:
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.

elektroda.net NewsGroups Forum Index - Verilog Language - Need help regarding exported tasks in DPI

Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
RTV map EDAboard.com map News map EDAboard.eu map EDAboard.de map EDAboard.co.uk map Opony