Hi,
Following is the dummy code. Actual code is very complicated as it contains lot’s of scripting and part of IP so can’t paste it here. But I am trying my best to replicate the same.
//TEST
class base_test extend uvm_test;
protected my_base_class base_class[1][2][3];
`uvm_component_utils(base_test)
task main_phase(uvm_phase phase);
tmp_object = m_factory.create_object_by_name(seq_name);
uvm_object tmp_object;
assert($cast(type[1][2][23], tmp_object));
endtask
endclass
//BASE SEQUENCE
class my_base_class_c extends uvm_seq;
//Some Functionality
endclass
class extended_class_c extends my_base_class_c;
//Some Functionality
endclass
The issue which I am facing is when I run base sequence my_base_class_c, the assert in the base test is working fine in casting the type. But Whenever I use a sequence that extends from the my_type sequence the casting fails, even though the extended class is extended from the base class itself. In the base sequence and extended sequence all are virtual functions and task. I am not sure what I am missing in concept which causing the assertion failure in type casting. It would be great if anyone please tell me what should I look for?
Regards