data/full_repos/permissive/143278/ivltests/enum_elem_ranges.v
 line:7: before: "unsigned"
1: b'%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/enum_elem_ranges.v:84: 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: Exiting due to 1 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module test;
  parameter    SIZE = 3;

  parameter    PVALUE = 12;
  localparam   LVALUE = 88;

  enum byte unsigned { UVAL[256] } unsignedbyte_enum;
  enum byte          { SVAL[100] } signedbyte_enum;
  enum               { ADD = 10, SUB[5], JMP[6:8]} E1;
  enum               { REGISTER[2] = 1, REGISTER[2:4] = 10 } vr;
  enum               { P[5] = 12, Q, S[3] = 88} par_enum;

  initial begin






    if (UVAL0 !== 8'h0 || SVAL0 !== 8'h0)
      begin
      $display ("FAILED - First un-assigned element of enum type was not zero");
      $finish;
    end

    if (ADD != 10 || REGISTER0 != 1)
      begin
      $display ("FAILED - First initialised elements of enums E1 and vr were not elaborated properly");
      $finish;
    end



    if (SUB0 != 11 || SUB1 != 12 || SUB2 != 13 || SUB3 != 14 || SUB4 != 15)
      begin
      $display ("FAILED - Initialised elements SUB (0-4) in enum E1 were not elaborated properly");
      $finish;
    end

    if (JMP6 != 16 || JMP7 != 17 || JMP8 != 18)
      begin
      $display ("FAILED - Initialised elements (6-8) JMP in enum E1 were not elaborated properly");
      $finish;
    end

    if (REGISTER1 != 2 || REGISTER2 != 10 || REGISTER3 != 11 || REGISTER4 != 12)
      begin
      $display ("FAILED - Initialised elements REGISTER (1-4) in enum vr were not elaborated properly");
      $finish;
    end

    if (UVAL23 != 23 || UVAL91 != 91 || UVAL138 != 138 || UVAL207 != 207)
      begin
      $display ("FAILED - Initialised some UVAL  in enum unsignedbyte_enum were not elaborated properly");
      $display ("UVAL23 = %0d, UVAL91 = %0d, UVAL138 = %0d, UVAL207 = %0d", UVAL23, UVAL91, UVAL138, UVAL207);
      $finish;
    end

    if (SVAL7 != 7 || SVAL19 != 19 || SVAL87 != 87)
      begin
      $display ("FAILED - Initialised some SVAL  in enum signedbyte_enum were not elaborated properly");
      $display ("SVAL7 = %0d, SVAL19 = %0d, SVAL87 = %0d", SVAL7, UVAL91, SVAL19, SVAL87);
      $finish;
    end

    if (UVAL255 != 255 || SVAL99 != 99)
      begin
      $display ("FAILED - Initialised final values UVAL and SVAL did not elaborate properly");
      $display ("UVAL255 = %0d, SVAL99 = %0d", UVAL255, SVAL99);
      $finish;
    end

    if (P0 != PVALUE+0 || P1 != PVALUE+1 || P2 != PVALUE+2 || P3 != PVALUE+3 || P4 != PVALUE + 4 || Q != PVALUE+5)
      begin
      $display ("FAILED - Initialised values P in par_enum were not elaborated properly");
      $finish;
    end

    if (S0 != LVALUE+0 || S1 != LVALUE+1 || S2 != LVALUE+2)
      begin
      $display ("FAILED - Initialised values S in par_enum were not elaborated properly");
      $finish;
    end
    #1;

    if (unsignedbyte_enum.num != 256 || signedbyte_enum.num != 100  ||
        E1.num != 9 || vr.num != 5 || par_enum.num != 9)
      begin
      $display ("FAILED - The num method does not report as expected");
      $finish;
    end
    $display ("PASSED");
  end


endmodule
module test;

  parameter    SIZE = 3;

  parameter    PVALUE = 12;
  localparam   LVALUE = 88;

  enum byte unsigned { UVAL[256] } unsignedbyte_enum;
  enum byte          { SVAL[100] } signedbyte_enum;
  enum               { ADD = 10, SUB[5], JMP[6:8]} E1;
  enum               { REGISTER[2] = 1, REGISTER[2:4] = 10 } vr;
  enum               { P[5] = 12, Q, S[3] = 88} par_enum;

  initial begin






    if (UVAL0 !== 8'h0 || SVAL0 !== 8'h0)
      begin
      $display ("FAILED - First un-assigned element of enum type was not zero");
      $finish;
    end

    if (ADD != 10 || REGISTER0 != 1)
      begin
      $display ("FAILED - First initialised elements of enums E1 and vr were not elaborated properly");
      $finish;
    end



    if (SUB0 != 11 || SUB1 != 12 || SUB2 != 13 || SUB3 != 14 || SUB4 != 15)
      begin
      $display ("FAILED - Initialised elements SUB (0-4) in enum E1 were not elaborated properly");
      $finish;
    end

    if (JMP6 != 16 || JMP7 != 17 || JMP8 != 18)
      begin
      $display ("FAILED - Initialised elements (6-8) JMP in enum E1 were not elaborated properly");
      $finish;
    end

    if (REGISTER1 != 2 || REGISTER2 != 10 || REGISTER3 != 11 || REGISTER4 != 12)
      begin
      $display ("FAILED - Initialised elements REGISTER (1-4) in enum vr were not elaborated properly");
      $finish;
    end

    if (UVAL23 != 23 || UVAL91 != 91 || UVAL138 != 138 || UVAL207 != 207)
      begin
      $display ("FAILED - Initialised some UVAL  in enum unsignedbyte_enum were not elaborated properly");
      $display ("UVAL23 = %0d, UVAL91 = %0d, UVAL138 = %0d, UVAL207 = %0d", UVAL23, UVAL91, UVAL138, UVAL207);
      $finish;
    end

    if (SVAL7 != 7 || SVAL19 != 19 || SVAL87 != 87)
      begin
      $display ("FAILED - Initialised some SVAL  in enum signedbyte_enum were not elaborated properly");
      $display ("SVAL7 = %0d, SVAL19 = %0d, SVAL87 = %0d", SVAL7, UVAL91, SVAL19, SVAL87);
      $finish;
    end

    if (UVAL255 != 255 || SVAL99 != 99)
      begin
      $display ("FAILED - Initialised final values UVAL and SVAL did not elaborate properly");
      $display ("UVAL255 = %0d, SVAL99 = %0d", UVAL255, SVAL99);
      $finish;
    end

    if (P0 != PVALUE+0 || P1 != PVALUE+1 || P2 != PVALUE+2 || P3 != PVALUE+3 || P4 != PVALUE + 4 || Q != PVALUE+5)
      begin
      $display ("FAILED - Initialised values P in par_enum were not elaborated properly");
      $finish;
    end

    if (S0 != LVALUE+0 || S1 != LVALUE+1 || S2 != LVALUE+2)
      begin
      $display ("FAILED - Initialised values S in par_enum were not elaborated properly");
      $finish;
    end
    #1;

    if (unsignedbyte_enum.num != 256 || signedbyte_enum.num != 100  ||
        E1.num != 9 || vr.num != 5 || par_enum.num != 9)
      begin
      $display ("FAILED - The num method does not report as expected");
      $finish;
    end
    $display ("PASSED");
  end


endmodule