About type_id::create()

…i have solved my error through this idea…


type_id::create()
is a static method in the factory registration class
ovm_component_registry
/
ovm_object_registry
. When you create a class and want to register it with the factory, you add that type to your class.

class scoreboard extends ovm_scoreboard;
typedef ovm_component_registry #(scoreboard,"scoreboard") type_id;

This creates a specialization of the parametrized class ovm_component_registry that inside defines the static method create(). The two parameters are to register the class by type and by string name. So type_id is the specialized class that represents the factory registration. Not that since you only need to access the static methods of this class, there is no need to ever construct it, the typedef is sufficient.
The macro `ovm_component_utils(scoreboard) generates this typedef for you. So if scoreboard::type_id does not exist, you either need to add the typedef, or add the macro.
Dave Rich