Vopt-13412) Virtual methods of an object or built-in method are not allowed in event control expressions

Hi All,

how to achieve/replace the below line with out wait statement?
wait(cfg.reg_block.en.en.get_mirrored_value() == 1’b0);

Kindly please help on this.

Thanks & Regards,
Vijaykanth Kenchugundu

for(int i=0; i>0; i++) begin
          if(cfg.reg_block.en.en.get_mirrored_value() == 1'b0) begin
             break;
           end
          else begin
            `uvm_info(info_tag, $sformatf(" ============ value = %d =============== ",cfg.reg_block.en.en.get_mirrored_value()), UVM_DEBUG);
         end
         end

tried above approach. is this correct?
OR any alternative for this?
Thank you