In reply to Minzhen:
Hi Dave,
I ran below code to access the override class properties but i am unable to achieve this.Could you please help me how to access properties of override class…
class driver extends uvm_driver;
`uvm_component_utils(driver)
//new
endclass
class driver_extended extends driver;
`uvm_component_utils(driver_extended)
string str_val ="RAM";
//new
endcalss
class agent extends uvm_component;
`uvm_component_utils(agent)
driver drv;
//new
function build();
drv = driver::type_id::create("drv",this);
endfunction
endclass
class test_factory extends uvm_test;
agent ag1;
function new(string name="test",uvm_component parent=null);
factory.set_type_override_by_type(driver::get_type(),driver_extended::get_type(),"*"); // overriding component
ag1 = agent::type_id::create("ag1",this);
endfuction
task run();
`uvm_info("VALUE",$psprintf("%s",ag1.drv.str_val),UVM_LOW)
#100;
global_stop_request();
endtask
endclass
For above code,compiler complains as below
str_val is not a class item.