"null pointer dereference "error

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 :-

  1. constructor being not called
  2. the data item being accessed is not available inside the class definition.