data/full_repos/permissive/143278/ivltests/pr540.v
None: at end of input
1: b'%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:16: 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/pr540.v:24: Unsupported: Ignoring delay on this delayed statement.\n    #4;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:26: Unsupported: Ignoring delay on this delayed statement.\n    #4\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:42: Unsupported: Ignoring delay on this delayed statement.\n    #2;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:49: Unsupported: Ignoring delay on this delayed statement.\n    #2;\n    ^\n%Error: data/full_repos/permissive/143278/ivltests/pr540.v:52: Unsupported: wait statements\n wait (fred);\n ^~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:64: Unsupported: Ignoring delay on this delayed statement.\n    #2;\n    ^\n%Error: data/full_repos/permissive/143278/ivltests/pr540.v:66: Unsupported: fork statements\n      fork\n      ^~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:68: Unsupported: Ignoring delay on this delayed statement.\n   #5;\n   ^\n%Error: data/full_repos/permissive/143278/ivltests/pr540.v:72: syntax error, unexpected \'@\'\n   @(fred);\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:91: Unsupported: Ignoring delay on this delayed statement.\n    #2;\n    ^\n%Error: data/full_repos/permissive/143278/ivltests/pr540.v:94: Unsupported: wait statements\n wait (fred);\n ^~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:106: Unsupported: Ignoring delay on this delayed statement.\n    #2;\n    ^\n%Error: data/full_repos/permissive/143278/ivltests/pr540.v:108: Unsupported: fork statements\n      fork\n      ^~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr540.v:110: Unsupported: Ignoring delay on this delayed statement.\n   #5;\n   ^\n%Error: data/full_repos/permissive/143278/ivltests/pr540.v:114: syntax error, unexpected \'@\'\n   @(fred);\n   ^\n%Error: Exiting due to 6 error(s), 10 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module top;

  integer simple_fail, loop_fail, fork_fail, tlp_fail, tfk_fail;
  integer loop_cntr, tlp_cntr;
  reg fred, abort;

  initial begin
    #1;
    simple_fail = 0;
    loop_fail = 0;
    fork_fail = 0;
    tlp_fail = 0;
    tfk_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("***** block with loop disable FAILED *****");
    else          $display("***** block with loop disable PASSED *****");
    if(fork_fail) $display("***** forked block disable FAILED *****");
    else          $display("***** forked block disable PASSED *****");
    if(tlp_fail) $display("***** task with loop disable FAILED *****");
    else         $display("***** task with loop disable PASSED *****");
    if(tfk_fail) $display("***** task with forked block disable FAILED ****\n");
    else         $display("***** task with forked block 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


  initial begin
    #2;
    begin: forked_tasks
      fork
	begin
	  #5;
	  fork_fail = 1;
	end
	begin
	  @(fred);
	  disable forked_tasks;
	  fork_fail = 1;
	end
      join
      fork_fail = 1;
    end
  end


  initial begin
    task_with_loop;
  end
  initial begin
    task_with_fork;
  end

task task_with_loop;
  begin
    #2;
    begin: configtlp
      for (tlp_cntr = 0; tlp_cntr < 3; tlp_cntr=tlp_cntr+1) begin
	wait (fred);
	if (abort) begin
	  disable configtlp;
	end
	tlp_fail = 1;
      end
    end
  end
endtask

task task_with_fork;
  begin
    #2;
    begin: forked_tasks_in_task
      fork
	begin
	  #5;
	  tfk_fail = 1;
	end
	begin
	  @(fred);
	  disable forked_tasks_in_task;
	  tfk_fail = 1;
	end
      join
      tfk_fail = 1;
    end
  end
endtask

endmodule
module top;


  integer simple_fail, loop_fail, fork_fail, tlp_fail, tfk_fail;
  integer loop_cntr, tlp_cntr;
  reg fred, abort;

  initial begin
    #1;
    simple_fail = 0;
    loop_fail = 0;
    fork_fail = 0;
    tlp_fail = 0;
    tfk_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("***** block with loop disable FAILED *****");
    else          $display("***** block with loop disable PASSED *****");
    if(fork_fail) $display("***** forked block disable FAILED *****");
    else          $display("***** forked block disable PASSED *****");
    if(tlp_fail) $display("***** task with loop disable FAILED *****");
    else         $display("***** task with loop disable PASSED *****");
    if(tfk_fail) $display("***** task with forked block disable FAILED ****\n");
    else         $display("***** task with forked block 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


  initial begin
    #2;
    begin: forked_tasks
      fork
	begin
	  #5;
	  fork_fail = 1;
	end
	begin
	  @(fred);
	  disable forked_tasks;
	  fork_fail = 1;
	end
      join
      fork_fail = 1;
    end
  end


  initial begin
    task_with_loop;
  end
  initial begin
    task_with_fork;
  end

task task_with_loop;
  begin
    #2;
    begin: configtlp
      for (tlp_cntr = 0; tlp_cntr < 3; tlp_cntr=tlp_cntr+1) begin
	wait (fred);
	if (abort) begin
	  disable configtlp;
	end
	tlp_fail = 1;
      end
    end
  end
endtask

task task_with_fork;
  begin
    #2;
    begin: forked_tasks_in_task
      fork
	begin
	  #5;
	  tfk_fail = 1;
	end
	begin
	  @(fred);
	  disable forked_tasks_in_task;
	  tfk_fail = 1;
	end
      join
      tfk_fail = 1;
    end
  end
endtask

endmodule