Create for TLM ports

Hi all,

Can we use create for a TLM port to register it with factory? There are several examples on TLM ports all of which use new() function. I was wondering if it is ever needed to register the TLM ports to the factory. Can anyone give an example for this?

In reply to yasaswi93:

You cannot use create, at least not with the Accellera 1.1/2 versions. They are not registered with the factory.

In reply to yasaswi93:
TLM ports don’t register with factory register so TLM port does not see type_id::create()
TLM port connection is a static connection to its relevant port/export, it means that port and its connection won’t be changed throughout the simulation lifetime.
we use the new method during the build phase and make the connection in connect_phase using the connect method of the port. After the connect_phase, we don’t make any change in connection or port type.
What make you think that TLM port should use Factory ?

In reply to kddholak:

Thanks for the explanation. I was thinking if it can be done or not. And also, if it can then what is the use case. It makes sense not to have TLM ports registered with factory because we mostly will not be needing any of the factory methods for ports as they are never change.