I think Phy_if in wr_cfg is not parameterized, can you post the code of wr_cfg virtual interface declaration.