In reply to dave_59:
I need this function because I am re-constructing a verification environment. There are already some modules in physical behavior and link layer. I just want to use the tasks of these existing modules. I don’t want to write physical behavior model in SystemVerilog again.
But I just implement the higher level of a protocol, just use the existing module tasks to do lower level things. and i want to implement a package to reuse. When this package is used, the existing module also must be instantiated.
But only Mentor Questasim can support such function. Neither of Cadence IUS and Synopsys VCS can support such function. If I want use this module tasks in IUS/VCS, I must split the existing module, and use virtual interface to rewrite the behaviors again, it is really a hard work.
Maybe user defined PLI/VPI tasks can also support this function, but I am not able to write PLI tasks right now, and I do not have time to learn it now.