In reply to Nimesh Patel:
What you show here is not down-casting. Down-casting means that you created an instance belonging to some derived-class, but for some reason, afterwards, you’ve stored it in a base-class reference. In that case you can down-cast it back to the derived-class. With UVM if you have a specific derived class of uvm_component, you would often pass it to functions that accept a uvm_component, i.e. the base-class, as parameter. Therefore, if you want to access the specific subtype fields, you’ll have to down-cast.
here’s your modified example running