I am working on a uvm project where i am getting error on creating a class object using factory create method. But the same class is getting created by the new constructor. this is error i am getting when i am using factory create method. Although all the other class are getting created by the factory create method.
code: sb = router_scoreboard::type_id::create(“sb”,this);
“this.sb = uvm_component_registry#(tb_top.router_scoreboard,“router_scoreboard”)::create(“sb”, this, /* contxt = “\000” */);”
Expression
‘uvm_component_registry#(tb_top.router_scoreboard,“router_scoreboard”)::create(“sb”,
this, )’ on rhs is not a class or a compatible class and hence cannot be
assigned to a class handle on lhs.
Please make sure that the lhs and rhs expressions are compatible.
It is difficult to determine without seeing all the code that generates the failing message, but the ‘uvm_component_registry’ part of the error message seems strange. The type ‘tb_top.router_scoreboard’ seems strange, as I would expect just the class type ‘router_scoreboard’.
Do you have a class or module called tb_top?
Is the router_scoreboard part of a package?
Is router_scoreboard extended from uvm_component?
Well I was getting an error in router_tb file where i was creating my scoreboard class. So problem was that in my tb_top module I included using `include router_tb file before the including scoreboard file. So i included scoreboard before router_tb file and the error was resolved.