data/full_repos/permissive/143278/ivltests/pr3011327.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr3011327.v:14: Unsupported: Ignoring delay on this delayed statement.\n          #5;\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/pr3011327.v:22: Unsupported: Ignoring delay on this delayed statement.\n    #4;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/pr3011327.v:31: Unsupported: Ignoring delay on this delayed statement.\n    #2;\n    ^\n%Error: Exiting due to 3 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module main;
  reg pass;

  genvar i;
  generate
    for( i=1; i<3; i=i+1 )
      begin : U
        reg [1:0] x;
      end
    for( i=0; i<2; i=i+1 )
      begin : V
        initial begin
          U[(i+1)%4].x = 2'd0;
          #5;
          U[(i+1)%4].x = i;
        end
      end
  endgenerate

  initial begin
    pass = 1'b1;
    #4;
    if (U[1].x != 2'd0) begin
      $display("Failed to clear U[1].x, got %b", U[1].x);
      pass = 1'b0;
    end
    if (U[2].x != 2'd0) begin
      $display("Failed to clear U[2].x, got %b", U[1].x);
      pass = 1'b0;
    end
    #2;
    if (U[1].x != 2'd0) begin
      $display("Failed to set U[1].x, expected 2'd0, got %b", U[1].x);
      pass = 1'b0;
    end
    if (U[2].x != 2'd1) begin
      $display("Failed to set U[2].x, expected 2'd1, got %b", U[1].x);
      pass = 1'b0;
    end
    if (pass) $display("PASSED");
  end
endmodule
module main;

  reg pass;

  genvar i;
  generate
    for( i=1; i<3; i=i+1 )
      begin : U
        reg [1:0] x;
      end
    for( i=0; i<2; i=i+1 )
      begin : V
        initial begin
          U[(i+1)%4].x = 2'd0;
          #5;
          U[(i+1)%4].x = i;
        end
      end
  endgenerate

  initial begin
    pass = 1'b1;
    #4;
    if (U[1].x != 2'd0) begin
      $display("Failed to clear U[1].x, got %b", U[1].x);
      pass = 1'b0;
    end
    if (U[2].x != 2'd0) begin
      $display("Failed to clear U[2].x, got %b", U[1].x);
      pass = 1'b0;
    end
    #2;
    if (U[1].x != 2'd0) begin
      $display("Failed to set U[1].x, expected 2'd0, got %b", U[1].x);
      pass = 1'b0;
    end
    if (U[2].x != 2'd1) begin
      $display("Failed to set U[2].x, expected 2'd1, got %b", U[1].x);
      pass = 1'b0;
    end
    if (pass) $display("PASSED");
  end
endmodule