data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v
1: b'%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:11: syntax error, unexpected byte, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER\n  for (i = 0; i < 4; i = i + 1) begin:byte\n                                      ^~~~\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:14: syntax error, unexpected bit, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER\n    for (j = 0; j < 8; j = j + 1) begin:bit\n                                        ^~~\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:28: 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%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:30: syntax error, unexpected \'[\', expecting "\'{"\n  $write(" %b", byte[3].byte_value);\n                    ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:31: syntax error, unexpected \'[\', expecting "\'{"\n  $write(" %b", byte[2].byte_value);\n                    ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:32: syntax error, unexpected \'[\', expecting "\'{"\n  $write(" %b", byte[1].byte_value);\n                    ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:33: syntax error, unexpected \'[\', expecting "\'{"\n  $write(" %b", byte[0].byte_value);\n                    ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:36: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[3].bit[7].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:37: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[3].bit[6].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:38: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[3].bit[5].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:39: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[3].bit[4].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:40: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[3].bit[3].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:41: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[3].bit[2].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:42: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[3].bit[1].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:43: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[3].bit[0].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:45: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[2].bit[7].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:46: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[2].bit[6].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:47: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[2].bit[5].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:48: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[2].bit[4].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:49: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[2].bit[3].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:50: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[2].bit[2].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:51: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[2].bit[1].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:52: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[2].bit[0].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:54: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[1].bit[7].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:55: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[1].bit[6].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:56: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[1].bit[5].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:57: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[1].bit[4].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:58: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[1].bit[3].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:59: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[1].bit[2].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:60: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[1].bit[1].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:61: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[1].bit[0].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:63: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[0].bit[7].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:64: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[0].bit[6].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:65: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[0].bit[5].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:66: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[0].bit[4].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:67: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[0].bit[3].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:68: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[0].bit[2].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:69: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[0].bit[1].bit_value);\n                   ^\n%Error: data/full_repos/permissive/42434302/ivltests/generate_multi_loop.v:70: syntax error, unexpected \'[\', expecting "\'{"\n  $write("%b", byte[0].bit[0].bit_value);\n                   ^\n%Error: Exiting due to 38 error(s), 1 warning(s)\n'
module generate_multi_loop();

reg [31:0] input_value;

wire [31:0] output_value;

generate
  genvar i;
  genvar j;

  for (i = 0; i < 4; i = i + 1) begin:byte
    wire [7:0] byte_value;

    for (j = 0; j < 8; j = j + 1) begin:bit
      wire bit_value;

      buf buffer(bit_value, input_value[i*8+j]);

      assign byte_value[j] = bit_value;
    end

    assign output_value[i*8+7:i*8] = byte_value;
  end
endgenerate

initial begin
  input_value = 32'h12345678;
  #1;
  $write("byte_value =");
  $write(" %b", byte[3].byte_value);
  $write(" %b", byte[2].byte_value);
  $write(" %b", byte[1].byte_value);
  $write(" %b", byte[0].byte_value);
  $write("\n");
  $write("bit_value  = ");
  $write("%b", byte[3].bit[7].bit_value);
  $write("%b", byte[3].bit[6].bit_value);
  $write("%b", byte[3].bit[5].bit_value);
  $write("%b", byte[3].bit[4].bit_value);
  $write("%b", byte[3].bit[3].bit_value);
  $write("%b", byte[3].bit[2].bit_value);
  $write("%b", byte[3].bit[1].bit_value);
  $write("%b", byte[3].bit[0].bit_value);
  $write(" ");
  $write("%b", byte[2].bit[7].bit_value);
  $write("%b", byte[2].bit[6].bit_value);
  $write("%b", byte[2].bit[5].bit_value);
  $write("%b", byte[2].bit[4].bit_value);
  $write("%b", byte[2].bit[3].bit_value);
  $write("%b", byte[2].bit[2].bit_value);
  $write("%b", byte[2].bit[1].bit_value);
  $write("%b", byte[2].bit[0].bit_value);
  $write(" ");
  $write("%b", byte[1].bit[7].bit_value);
  $write("%b", byte[1].bit[6].bit_value);
  $write("%b", byte[1].bit[5].bit_value);
  $write("%b", byte[1].bit[4].bit_value);
  $write("%b", byte[1].bit[3].bit_value);
  $write("%b", byte[1].bit[2].bit_value);
  $write("%b", byte[1].bit[1].bit_value);
  $write("%b", byte[1].bit[0].bit_value);
  $write(" ");
  $write("%b", byte[0].bit[7].bit_value);
  $write("%b", byte[0].bit[6].bit_value);
  $write("%b", byte[0].bit[5].bit_value);
  $write("%b", byte[0].bit[4].bit_value);
  $write("%b", byte[0].bit[3].bit_value);
  $write("%b", byte[0].bit[2].bit_value);
  $write("%b", byte[0].bit[1].bit_value);
  $write("%b", byte[0].bit[0].bit_value);
  $write("\n");
  if (output_value == input_value)
    $display("Test passed");
  else
    $display("Test FAILED");
end

endmodule
module generate_multi_loop();


reg [31:0] input_value;

wire [31:0] output_value;

generate
  genvar i;
  genvar j;

  for (i = 0; i < 4; i = i + 1) begin:byte
    wire [7:0] byte_value;

    for (j = 0; j < 8; j = j + 1) begin:bit
      wire bit_value;

      buf buffer(bit_value, input_value[i*8+j]);

      assign byte_value[j] = bit_value;
    end

    assign output_value[i*8+7:i*8] = byte_value;
  end
endgenerate

initial begin
  input_value = 32'h12345678;
  #1;
  $write("byte_value =");
  $write(" %b", byte[3].byte_value);
  $write(" %b", byte[2].byte_value);
  $write(" %b", byte[1].byte_value);
  $write(" %b", byte[0].byte_value);
  $write("\n");
  $write("bit_value  = ");
  $write("%b", byte[3].bit[7].bit_value);
  $write("%b", byte[3].bit[6].bit_value);
  $write("%b", byte[3].bit[5].bit_value);
  $write("%b", byte[3].bit[4].bit_value);
  $write("%b", byte[3].bit[3].bit_value);
  $write("%b", byte[3].bit[2].bit_value);
  $write("%b", byte[3].bit[1].bit_value);
  $write("%b", byte[3].bit[0].bit_value);
  $write(" ");
  $write("%b", byte[2].bit[7].bit_value);
  $write("%b", byte[2].bit[6].bit_value);
  $write("%b", byte[2].bit[5].bit_value);
  $write("%b", byte[2].bit[4].bit_value);
  $write("%b", byte[2].bit[3].bit_value);
  $write("%b", byte[2].bit[2].bit_value);
  $write("%b", byte[2].bit[1].bit_value);
  $write("%b", byte[2].bit[0].bit_value);
  $write(" ");
  $write("%b", byte[1].bit[7].bit_value);
  $write("%b", byte[1].bit[6].bit_value);
  $write("%b", byte[1].bit[5].bit_value);
  $write("%b", byte[1].bit[4].bit_value);
  $write("%b", byte[1].bit[3].bit_value);
  $write("%b", byte[1].bit[2].bit_value);
  $write("%b", byte[1].bit[1].bit_value);
  $write("%b", byte[1].bit[0].bit_value);
  $write(" ");
  $write("%b", byte[0].bit[7].bit_value);
  $write("%b", byte[0].bit[6].bit_value);
  $write("%b", byte[0].bit[5].bit_value);
  $write("%b", byte[0].bit[4].bit_value);
  $write("%b", byte[0].bit[3].bit_value);
  $write("%b", byte[0].bit[2].bit_value);
  $write("%b", byte[0].bit[1].bit_value);
  $write("%b", byte[0].bit[0].bit_value);
  $write("\n");
  if (output_value == input_value)
    $display("Test passed");
  else
    $display("Test FAILED");
end

endmodule