In reply to chandnidodiya:
Can you define the class phy_reg_map_tr ,so that it will be helpful to debug your case.
There may be two possible issues :-
- constructor being not called
- the data item being accessed is not available inside the class definition.