In reply to manik16:
Your code is very difficult to read. I don’t see why you have 2 child classes before the analysis port write when you could just set all values in the first child class and assign that to the base class handle.
After you perform the ‘get’ call, there is no reason why you can’t cast base_obj_2 to child_obj_2. If it’s not working, then you are doing something else wrong. How did you parameterize the uvm_analysis_port and uvm_tlm_analysis_fifo?