data/full_repos/permissive/143278/ivltests/pr522.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr522.v:38: Unsupported: Ignoring delay on this delayed statement.\n    #1;\n    ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr522.v:43: Unsupported: Ignoring delay on this delayed statement.\n    #4;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr522.v:45: Unsupported: Ignoring delay on this delayed statement.\n    #4\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr522.v:55: Unsupported: Ignoring delay on this delayed statement.\n    #2;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr522.v:62: Unsupported: Ignoring delay on this delayed statement.\n    #2;\n    ^\n%Error: data/full_repos/permissive/143278/ivltests/pr522.v:65: Unsupported: wait statements\n wait (fred);\n ^~~~\n%Error: Exiting due to 1 error(s), 5 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module top;

  integer loop_cntr, simple_fail, loop_fail;
  reg fred, abort;

  initial begin
    #1;
    simple_fail = 0;
    loop_fail = 0;
    fred = 0;
    abort = 1;
    #4;
    fred = 1;
    #4
    if(simple_fail) $display("\n***** simple block disable FAILED *****");
    else            $display("\n***** simple block disable PASSED *****");
    if(loop_fail) $display("***** complex block & loop disable FAILED *****\n");
    else          $display("***** complex block & loop disable PASSED *****\n");
    $finish(0);
  end


  initial begin: block_name
    #2;
    disable block_name;
    simple_fail = 1;
  end


  initial begin
    #2;
    begin: configloop
      for (loop_cntr = 0; loop_cntr < 3; loop_cntr=loop_cntr+1) begin
	wait (fred);
	if (abort) begin
	  disable configloop;
	end
	loop_fail = 1;
      end
    end
    if (loop_fail) $display("\n\ttime: %0t, loop_cntr: %0d",$time,loop_cntr);
  end

endmodule
module top;


  integer loop_cntr, simple_fail, loop_fail;
  reg fred, abort;

  initial begin
    #1;
    simple_fail = 0;
    loop_fail = 0;
    fred = 0;
    abort = 1;
    #4;
    fred = 1;
    #4
    if(simple_fail) $display("\n***** simple block disable FAILED *****");
    else            $display("\n***** simple block disable PASSED *****");
    if(loop_fail) $display("***** complex block & loop disable FAILED *****\n");
    else          $display("***** complex block & loop disable PASSED *****\n");
    $finish(0);
  end


  initial begin: block_name
    #2;
    disable block_name;
    simple_fail = 1;
  end


  initial begin
    #2;
    begin: configloop
      for (loop_cntr = 0; loop_cntr < 3; loop_cntr=loop_cntr+1) begin
	wait (fred);
	if (abort) begin
	  disable configloop;
	end
	loop_fail = 1;
      end
    end
    if (loop_fail) $display("\n\ttime: %0t, loop_cntr: %0d",$time,loop_cntr);
  end

endmodule