Hi,
I am facing a problem rekated to driver/sequencer class name.
If i try to create an object with the same name as that of their class names, I am getting an error. For example:
class ahbs_driver extends uvm_driver #(ahbs_transaction);
endclass
class ahbs_agent extends uvm_agent;
`uvm_component_utils(ahbs_agent)
ahbs_driver ahbs_driver;
.....
ahbs_driver=ahbs_driver::type_id::create("ahbs_driver",this);
....
endclass
Above is giving me an error:
Error-[SV-EEM-SRE] Scope resolution error
ahbs_agent.sv, 15
test, "ahbs_driver::type_id::create"
Target for scope resolution operator does not exist. Token 'ahbs_driver' is
not a class/package. Originating module 'test'.
Check that class or package exists with referred token as the name
But if i change the name of the driver class to ahbs_driver1, the error goes off.
class ahbs_driver1 extends uvm_driver #(ahbs_transaction);
endclass
class ahbs_agent extends uvm_agent;
`uvm_component_utils(ahbs_agent)
ahbs_driver1 ahbs_driver;
.....
ahbs_driver=ahbs_driver1::type_id::create("ahbs_driver",this);
....
endclass
The same thing happens for sequencer also.
Please tell me what is the reason for such an error.
Thanks