While (this.vif.monitor_cb.psel !== 1'b1 || this.vif.monitor_cb.penable !== 1'b0);

You are correct; it is a potentially infinite loop. There needs to be a blocking statement inside the loop or some other mechanism to get the expression to change to false if it started out true. If you see this in “working code” , it either was always false when executed, or was never executed.