data/full_repos/permissive/42434302/ivltests/array_lval_select2.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:23: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %b %b", array1[2], array1[1]);\n  ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:29: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %b %b", array1[2], array1[1]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:35: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %b %b", array2[1], array2[0]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:42: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %b %b", array1[2], array1[1]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:49: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %b %b", array1[2], array1[1]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:56: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %b %b", array2[1], array2[0]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:63: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %0g %0g", array3[2], array3[1]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:69: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %0g %0g", array3[2], array3[1]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:75: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %0g %0g", array4[1], array4[0]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:82: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %0g %0g", array3[2], array3[1]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:89: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %0g %0g", array3[2], array3[1]);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:96: Unsupported: Ignoring delay on this delayed statement.\n  #1 $display("array = %0g %0g", array4[1], array4[0]);\n  ^\n%Warning-SELRANGE: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:22: Selection index out of range: 0 outside 2:1\n                                                                                       : ... In instance top\n  array1[0] <= 1\'b1;\n        ^\n%Warning-SELRANGE: data/full_repos/permissive/42434302/ivltests/array_lval_select2.v:28: Selection index out of range: 3 outside 2:1\n                                                                                       : ... In instance top\n  array1[3] <= 1\'b1;\n        ^\n%Error: Internal Error: ../V3Number.cpp:723: toUInt with 4-state ?32?bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n                        ... See the manual and https://verilator.org for more assistance.\n'
module top;

reg  array1[2:1];
reg  array2[1:0];

`ifndef VLOG95
real array3[2:1];
real array4[1:0];
`endif

integer index;

reg failed;

initial begin
  failed = 0;

  array1[1] <= 1'b0;
  array1[2] <= 1'b0;
  array1[0] <= 1'b1;
  #1 $display("array = %b %b", array1[2], array1[1]);
  if ((array1[1] !== 1'b0) || (array1[2] !== 1'b0)) failed = 1;

  array1[1] <= 1'b0;
  array1[2] <= 1'b0;
  array1[3] <= 1'b1;
  #1 $display("array = %b %b", array1[2], array1[1]);
  if ((array1[1] !== 1'b0) || (array1[2] !== 1'b0)) failed = 1;

  array2[0] <= 1'b0;
  array2[1] <= 1'b0;
  array2['bx] <= 1'b1;
  #1 $display("array = %b %b", array2[1], array2[0]);
  if ((array2[0] !== 1'b0) || (array2[1] !== 1'b0)) failed = 1;

  index = 0;
  array1[1] <= 1'b0;
  array1[2] <= 1'b0;
  array1[index] <= 1'b1;
  #1 $display("array = %b %b", array1[2], array1[1]);
  if ((array1[1] !== 1'b0) || (array1[2] !== 1'b0)) failed = 1;

  index = 3;
  array1[1] <= 1'b0;
  array1[2] <= 1'b0;
  array1[index] <= 1'b1;
  #1 $display("array = %b %b", array1[2], array1[1]);
  if ((array1[1] !== 1'b0) || (array1[2] !== 1'b0)) failed = 1;

  index = 'bx;
  array2[0] <= 1'b0;
  array2[1] <= 1'b0;
  array2[index] <= 1'b1;
  #1 $display("array = %b %b", array2[1], array2[0]);
  if ((array2[0] !== 1'b0) || (array2[1] !== 1'b0)) failed = 1;

`ifndef VLOG95
  array3[1] <= 0.0;
  array3[2] <= 0.0;
  array3[0] <= 1.0;
  #1 $display("array = %0g %0g", array3[2], array3[1]);
  if ((array3[1] != 0.0) || (array3[2] != 0.0)) failed = 1;

  array3[1] <= 0.0;
  array3[2] <= 0.0;
  array3[3] <= 1.0;
  #1 $display("array = %0g %0g", array3[2], array3[1]);
  if ((array3[1] != 0.0) || (array3[2] != 0.0)) failed = 1;

  array4[0] <= 0.0;
  array4[1] <= 0.0;
  array4['bx] <= 1.0;
  #1 $display("array = %0g %0g", array4[1], array4[0]);
  if ((array4[0] != 0.0) || (array4[1] != 0.0)) failed = 1;

  index = 0;
  array3[1] <= 0.0;
  array3[2] <= 0.0;
  array3[index] <= 1.0;
  #1 $display("array = %0g %0g", array3[2], array3[1]);
  if ((array3[1] != 0.0) || (array3[2] != 0.0)) failed = 1;

  index = 3;
  array3[1] <= 0.0;
  array3[2] <= 0.0;
  array3[index] <= 1.0;
  #1 $display("array = %0g %0g", array3[2], array3[1]);
  if ((array3[1] != 0.0) || (array3[2] != 0.0)) failed = 1;

  index = 'bx;
  array4[0] <= 0.0;
  array4[1] <= 0.0;
  array4[index] <= 1.0;
  #1 $display("array = %0g %0g", array4[1], array4[0]);
  if ((array4[0] != 0.0) || (array4[1] != 0.0)) failed = 1;
`endif

  if (failed)
    $display("FAILED");
  else
    $display("PASSED");
end

endmodule
module top;


reg  array1[2:1];
reg  array2[1:0];

`ifndef VLOG95
real array3[2:1];
real array4[1:0];
`endif

integer index;

reg failed;

initial begin
  failed = 0;

  array1[1] <= 1'b0;
  array1[2] <= 1'b0;
  array1[0] <= 1'b1;
  #1 $display("array = %b %b", array1[2], array1[1]);
  if ((array1[1] !== 1'b0) || (array1[2] !== 1'b0)) failed = 1;

  array1[1] <= 1'b0;
  array1[2] <= 1'b0;
  array1[3] <= 1'b1;
  #1 $display("array = %b %b", array1[2], array1[1]);
  if ((array1[1] !== 1'b0) || (array1[2] !== 1'b0)) failed = 1;

  array2[0] <= 1'b0;
  array2[1] <= 1'b0;
  array2['bx] <= 1'b1;
  #1 $display("array = %b %b", array2[1], array2[0]);
  if ((array2[0] !== 1'b0) || (array2[1] !== 1'b0)) failed = 1;

  index = 0;
  array1[1] <= 1'b0;
  array1[2] <= 1'b0;
  array1[index] <= 1'b1;
  #1 $display("array = %b %b", array1[2], array1[1]);
  if ((array1[1] !== 1'b0) || (array1[2] !== 1'b0)) failed = 1;

  index = 3;
  array1[1] <= 1'b0;
  array1[2] <= 1'b0;
  array1[index] <= 1'b1;
  #1 $display("array = %b %b", array1[2], array1[1]);
  if ((array1[1] !== 1'b0) || (array1[2] !== 1'b0)) failed = 1;

  index = 'bx;
  array2[0] <= 1'b0;
  array2[1] <= 1'b0;
  array2[index] <= 1'b1;
  #1 $display("array = %b %b", array2[1], array2[0]);
  if ((array2[0] !== 1'b0) || (array2[1] !== 1'b0)) failed = 1;

`ifndef VLOG95
  array3[1] <= 0.0;
  array3[2] <= 0.0;
  array3[0] <= 1.0;
  #1 $display("array = %0g %0g", array3[2], array3[1]);
  if ((array3[1] != 0.0) || (array3[2] != 0.0)) failed = 1;

  array3[1] <= 0.0;
  array3[2] <= 0.0;
  array3[3] <= 1.0;
  #1 $display("array = %0g %0g", array3[2], array3[1]);
  if ((array3[1] != 0.0) || (array3[2] != 0.0)) failed = 1;

  array4[0] <= 0.0;
  array4[1] <= 0.0;
  array4['bx] <= 1.0;
  #1 $display("array = %0g %0g", array4[1], array4[0]);
  if ((array4[0] != 0.0) || (array4[1] != 0.0)) failed = 1;

  index = 0;
  array3[1] <= 0.0;
  array3[2] <= 0.0;
  array3[index] <= 1.0;
  #1 $display("array = %0g %0g", array3[2], array3[1]);
  if ((array3[1] != 0.0) || (array3[2] != 0.0)) failed = 1;

  index = 3;
  array3[1] <= 0.0;
  array3[2] <= 0.0;
  array3[index] <= 1.0;
  #1 $display("array = %0g %0g", array3[2], array3[1]);
  if ((array3[1] != 0.0) || (array3[2] != 0.0)) failed = 1;

  index = 'bx;
  array4[0] <= 0.0;
  array4[1] <= 0.0;
  array4[index] <= 1.0;
  #1 $display("array = %0g %0g", array4[1], array4[0]);
  if ((array4[0] != 0.0) || (array4[1] != 0.0)) failed = 1;
`endif

  if (failed)
    $display("FAILED");
  else
    $display("PASSED");
end

endmodule