data/full_repos/permissive/143278/ivltests/vhdl_range.v
 line:26: before: "i"
1: b'%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/vhdl_range.v:27: 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/143278/ivltests/vhdl_range.v:29: Can\'t find definition of \'left_asc\' in dotted variable: \'dut.left_asc\'\n  if(dut.left_asc !== 2)\n         ^~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:31: Can\'t find definition of \'left_asc\' in dotted variable: \'dut.left_asc\'\n    $display("FAILED: left_asc should be %2d but is %2d", 2, dut.left_asc);\n                                                                 ^~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:35: Can\'t find definition of \'right_asc\' in dotted variable: \'dut.right_asc\'\n  if(dut.right_asc !== 4)\n         ^~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:37: Can\'t find definition of \'right_asc\' in dotted variable: \'dut.right_asc\'\n    $display("FAILED: right_asc should be %2d but is %2d", 2, dut.right_asc);\n                                                                  ^~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:41: Can\'t find definition of \'left_dsc\' in dotted variable: \'dut.left_dsc\'\n  if(dut.left_dsc !== 9)\n         ^~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:43: Can\'t find definition of \'left_dsc\' in dotted variable: \'dut.left_dsc\'\n    $display("FAILED: left_dsc should be %2d but is %2d", 2, dut.left_dsc);\n                                                                 ^~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:47: Can\'t find definition of \'right_dsc\' in dotted variable: \'dut.right_dsc\'\n  if(dut.right_dsc !== 3)\n         ^~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:49: Can\'t find definition of \'right_dsc\' in dotted variable: \'dut.right_dsc\'\n    $display("FAILED: right_dsc should be %2d but is %2d", 2, dut.right_dsc);\n                                                                  ^~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:53: Can\'t find definition of \'pow_left\' in dotted variable: \'dut.pow_left\'\n  if(dut.pow_left !== 16)\n         ^~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:55: Can\'t find definition of \'pow_left\' in dotted variable: \'dut.pow_left\'\n    $display("FAILED: pow_left should be %2d but is %2d", 16, dut.pow_left);\n                                                                  ^~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:59: Can\'t find definition of \'rem_left\' in dotted variable: \'dut.rem_left\'\n  if(dut.rem_left !== 2)\n         ^~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:61: Can\'t find definition of \'rem_left\' in dotted variable: \'dut.rem_left\'\n    $display("FAILED: rem_left should be %2d but is %2d", 2, dut.rem_left);\n                                                                 ^~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:65: Can\'t find definition of \'ascending\' in dotted variable: \'dut.ascending\'\n  for(i = $left(dut.ascending); i <= $right(dut.ascending); i++)\n                    ^~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:65: Can\'t find definition of \'ascending\' in dotted variable: \'dut.ascending\'\n  for(i = $left(dut.ascending); i <= $right(dut.ascending); i++)\n                                                ^~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:67: Can\'t find definition of \'ascending\' in dotted variable: \'dut.ascending\'\n    if(2*i !== dut.ascending[i])\n                   ^~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:69: Can\'t find definition of \'ascending\' in dotted variable: \'dut.ascending\'\n        $display("FAILED: ascending[%2d] should be %2d but is %2d", i, 2*i, dut.ascending[i]);\n                                                                                ^~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:74: Can\'t find definition of \'descending\' in dotted variable: \'dut.descending\'\n  for(i = $right(dut.descending); i <= $left(dut.descending); i++)\n                     ^~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:74: Can\'t find definition of \'descending\' in dotted variable: \'dut.descending\'\n  for(i = $right(dut.descending); i <= $left(dut.descending); i++)\n                                                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:76: Can\'t find definition of \'descending\' in dotted variable: \'dut.descending\'\n    if(3*i !== dut.descending[i])\n                   ^~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:78: Can\'t find definition of \'descending\' in dotted variable: \'dut.descending\'\n        $display("FAILED: descending[%2d] should be %2d but is %2d", i, 3*i, dut.descending[i]);\n                                                                                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:83: Can\'t find definition of \'ascending_rev\' in dotted variable: \'dut.ascending_rev\'\n  for(i = $left(dut.ascending_rev); i <= $right(dut.ascending_rev); i++)\n                    ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:83: Can\'t find definition of \'ascending_rev\' in dotted variable: \'dut.ascending_rev\'\n  for(i = $left(dut.ascending_rev); i <= $right(dut.ascending_rev); i++)\n                                                    ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:85: Can\'t find definition of \'ascending_rev\' in dotted variable: \'dut.ascending_rev\'\n    if(4*i !== dut.ascending_rev[i])\n                   ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:87: Can\'t find definition of \'ascending_rev\' in dotted variable: \'dut.ascending_rev\'\n        $display("FAILED: ascending_rev[%2d] should be %2d but is %2d", i, 4*i, dut.ascending_rev[i]);\n                                                                                    ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:92: Can\'t find definition of \'descending_rev\' in dotted variable: \'dut.descending_rev\'\n  for(i = $right(dut.descending_rev); i <= $left(dut.descending_rev); i++)\n                     ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:92: Can\'t find definition of \'descending_rev\' in dotted variable: \'dut.descending_rev\'\n  for(i = $right(dut.descending_rev); i <= $left(dut.descending_rev); i++)\n                                                     ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:94: Can\'t find definition of \'descending_rev\' in dotted variable: \'dut.descending_rev\'\n    if(5*i !== dut.descending_rev[i])\n                   ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/vhdl_range.v:96: Can\'t find definition of \'descending_rev\' in dotted variable: \'dut.descending_rev\'\n        $display("FAILED: descending_rev[%2d] should be %2d but is %2d", i, 5*i, dut.descending_rev[i]);\n                                                                                     ^~~~~~~~~~~~~~\n%Error: Exiting due to 28 error(s), 1 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module range_test;
range_entity dut();

initial begin
  int i;
  #1;

  if(dut.left_asc !== 2)
  begin
    $display("FAILED: left_asc should be %2d but is %2d", 2, dut.left_asc);
    $finish();
  end

  if(dut.right_asc !== 4)
  begin
    $display("FAILED: right_asc should be %2d but is %2d", 2, dut.right_asc);
    $finish();
  end

  if(dut.left_dsc !== 9)
  begin
    $display("FAILED: left_dsc should be %2d but is %2d", 2, dut.left_dsc);
    $finish();
  end

  if(dut.right_dsc !== 3)
  begin
    $display("FAILED: right_dsc should be %2d but is %2d", 2, dut.right_dsc);
    $finish();
  end

  if(dut.pow_left !== 16)
  begin
    $display("FAILED: pow_left should be %2d but is %2d", 16, dut.pow_left);
    $finish();
  end

  if(dut.rem_left !== 2)
  begin
    $display("FAILED: rem_left should be %2d but is %2d", 2, dut.rem_left);
    $finish();
  end

  for(i = $left(dut.ascending); i <= $right(dut.ascending); i++)
  begin
    if(2*i !== dut.ascending[i])
    begin
        $display("FAILED: ascending[%2d] should be %2d but is %2d", i, 2*i, dut.ascending[i]);
        $finish();
    end
  end

  for(i = $right(dut.descending); i <= $left(dut.descending); i++)
  begin
    if(3*i !== dut.descending[i])
    begin
        $display("FAILED: descending[%2d] should be %2d but is %2d", i, 3*i, dut.descending[i]);
        $finish();
    end
  end

  for(i = $left(dut.ascending_rev); i <= $right(dut.ascending_rev); i++)
  begin
    if(4*i !== dut.ascending_rev[i])
    begin
        $display("FAILED: ascending_rev[%2d] should be %2d but is %2d", i, 4*i, dut.ascending_rev[i]);
        $finish();
    end
  end

  for(i = $right(dut.descending_rev); i <= $left(dut.descending_rev); i++)
  begin
    if(5*i !== dut.descending_rev[i])
    begin
        $display("FAILED: descending_rev[%2d] should be %2d but is %2d", i, 5*i, dut.descending_rev[i]);
        $finish();
    end
  end

  $display("PASSED");
end
endmodule
module range_test;

range_entity dut();

initial begin
  int i;
  #1;

  if(dut.left_asc !== 2)
  begin
    $display("FAILED: left_asc should be %2d but is %2d", 2, dut.left_asc);
    $finish();
  end

  if(dut.right_asc !== 4)
  begin
    $display("FAILED: right_asc should be %2d but is %2d", 2, dut.right_asc);
    $finish();
  end

  if(dut.left_dsc !== 9)
  begin
    $display("FAILED: left_dsc should be %2d but is %2d", 2, dut.left_dsc);
    $finish();
  end

  if(dut.right_dsc !== 3)
  begin
    $display("FAILED: right_dsc should be %2d but is %2d", 2, dut.right_dsc);
    $finish();
  end

  if(dut.pow_left !== 16)
  begin
    $display("FAILED: pow_left should be %2d but is %2d", 16, dut.pow_left);
    $finish();
  end

  if(dut.rem_left !== 2)
  begin
    $display("FAILED: rem_left should be %2d but is %2d", 2, dut.rem_left);
    $finish();
  end

  for(i = $left(dut.ascending); i <= $right(dut.ascending); i++)
  begin
    if(2*i !== dut.ascending[i])
    begin
        $display("FAILED: ascending[%2d] should be %2d but is %2d", i, 2*i, dut.ascending[i]);
        $finish();
    end
  end

  for(i = $right(dut.descending); i <= $left(dut.descending); i++)
  begin
    if(3*i !== dut.descending[i])
    begin
        $display("FAILED: descending[%2d] should be %2d but is %2d", i, 3*i, dut.descending[i]);
        $finish();
    end
  end

  for(i = $left(dut.ascending_rev); i <= $right(dut.ascending_rev); i++)
  begin
    if(4*i !== dut.ascending_rev[i])
    begin
        $display("FAILED: ascending_rev[%2d] should be %2d but is %2d", i, 4*i, dut.ascending_rev[i]);
        $finish();
    end
  end

  for(i = $right(dut.descending_rev); i <= $left(dut.descending_rev); i++)
  begin
    if(5*i !== dut.descending_rev[i])
    begin
        $display("FAILED: descending_rev[%2d] should be %2d but is %2d", i, 5*i, dut.descending_rev[i]);
        $finish();
    end
  end

  $display("PASSED");
end
endmodule