Want to replace wait statement with while

In reply to Jaydip_Solanki:

Typically one would write this using iff instead of a using while loop.

@(posedge vif_tx.gtx_clk iff `rx_mon_rx_if.rx_dv && !`rx_mon_rx_if.rx_er)

Are rx_dv and rx_er being driven with nonblocking assignments on the same clock?