data/full_repos/permissive/143278/ivltests/array_packed_value_list.v
 line:13: before: "["
1: b'%Warning-LITENDIAN: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:14: Little bit endian vector: MSB < LSB of bit range: 0:3\n   logic [0:WA-1] [0:WB-1] alt0, alt1, alt2, alt3, alt4, alt5, alt6, alt7, alt8, alt9;   \n                  ^\n                    ... Use "/* verilator lint_off LITENDIAN */" and lint_on around source to disable this message.\n%Warning-LITENDIAN: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:14: Little bit endian vector: MSB < LSB of bit range: 0:3\n   logic [0:WA-1] [0:WB-1] alt0, alt1, alt2, alt3, alt4, alt5, alt6, alt7, alt8, alt9;   \n         ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:25: Operator PATMEMBER expects 4 bits on the Pattern value, but Pattern value\'s REPLICATE generates 5 bits.\n                                                                                       : ... In instance test\n      abg5               = \'{WA  { {3\'b101, {WB/2-1{2\'b10}}} }};\n                                 ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:26: Operator PATMEMBER expects 4 bits on the Pattern value, but Pattern value\'s REPLICATE generates 2 bits.\n                                                                                       : ... In instance test\n      abg6               = \'{WA  {          {WB/2-1{2\'b10}}  }};\n                                 ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:29: Operator ADD expects 32 or 4 bits on the LHS, but LHS\'s VARREF \'err\' generates 1 bits.\n                                                                                       : ... In instance test\n      abg9               = \'{err+0, err+1, err+2, err+3};\n                                ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:29: Operator ADD expects 32 or 4 bits on the LHS, but LHS\'s VARREF \'err\' generates 1 bits.\n                                                                                       : ... In instance test\n      abg9               = \'{err+0, err+1, err+2, err+3};\n                                       ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:29: Operator ADD expects 32 or 4 bits on the LHS, but LHS\'s VARREF \'err\' generates 1 bits.\n                                                                                       : ... In instance test\n      abg9               = \'{err+0, err+1, err+2, err+3};\n                                              ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:29: Operator ADD expects 32 or 4 bits on the LHS, but LHS\'s VARREF \'err\' generates 1 bits.\n                                                                                       : ... In instance test\n      abg9               = \'{err+0, err+1, err+2, err+3};\n                                                     ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:47: Operator PATMEMBER expects 4 bits on the Pattern value, but Pattern value\'s REPLICATE generates 5 bits.\n                                                                                       : ... In instance test\n      alt5               = \'{WA  { {3\'b101, {WB/2-1{2\'b10}}} }};\n                                 ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:48: Operator PATMEMBER expects 4 bits on the Pattern value, but Pattern value\'s REPLICATE generates 2 bits.\n                                                                                       : ... In instance test\n      alt6               = \'{WA  {          {WB/2-1{2\'b10}}  }};\n                                 ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:51: Operator ADD expects 32 or 4 bits on the LHS, but LHS\'s VARREF \'err\' generates 1 bits.\n                                                                                       : ... In instance test\n      alt9               = \'{err+0, err+1, err+2, err+3};\n                                                     ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:51: Operator ADD expects 32 or 4 bits on the LHS, but LHS\'s VARREF \'err\' generates 1 bits.\n                                                                                       : ... In instance test\n      alt9               = \'{err+0, err+1, err+2, err+3};\n                                              ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:51: Operator ADD expects 32 or 4 bits on the LHS, but LHS\'s VARREF \'err\' generates 1 bits.\n                                                                                       : ... In instance test\n      alt9               = \'{err+0, err+1, err+2, err+3};\n                                       ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:51: Operator ADD expects 32 or 4 bits on the LHS, but LHS\'s VARREF \'err\' generates 1 bits.\n                                                                                       : ... In instance test\n      alt9               = \'{err+0, err+1, err+2, err+3};\n                                ^\n%Warning-LITENDIAN: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:14: Little bit endian vector: MSB < LSB of bit range: 0:1\n   logic [0:WA-1] [0:WB-1] alt0, alt1, alt2, alt3, alt4, alt5, alt6, alt7, alt8, alt9;   \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/143278/ivltests/array_packed_value_list.v:14: Little bit endian vector: MSB < LSB of bit range: 2:3\n   logic [0:WA-1] [0:WB-1] alt0, alt1, alt2, alt3, alt4, alt5, alt6, alt7, alt8, alt9;   \n         ^\n%Error: Exiting due to 16 warning(s)\n'
module test ();


   localparam WA = 4;
   localparam WB = 4;


   logic [WA-1:0] [WB-1:0] abg0, abg1, abg2, abg3, abg4, abg5, abg6, abg7, abg8, abg9;
   logic [0:WA-1] [0:WB-1] alt0, alt1, alt2, alt3, alt4, alt5, alt6, alt7, alt8, alt9;


   bit err = 0;

   initial begin
      abg0               = '{ 3 ,2 ,1, 0 };
      abg1               = '{0:4, 1:5, 2:6, 3:7};
      abg2               = '{default:13};
      abg3               = '{2:15, default:13};
      abg4               = '{WA  {          {WB/2  {2'b10}}  }};
      abg5               = '{WA  { {3'b101, {WB/2-1{2'b10}}} }};
      abg6               = '{WA  {          {WB/2-1{2'b10}}  }};
      abg7 [WA/2-1:0   ] = '{WA/2{          {WB/2  {2'b10}}  }};
      abg8 [WA  -1:WA/2] = '{WA/2{          {WB/2  {2'b01}}  }};
      abg9               = '{err+0, err+1, err+2, err+3};

      if (abg0 !== 16'b0011_0010_0001_0000) begin $display("FAILED -- abg0 = 'b%b", abg0); err=1; end
      if (abg1 !== 16'b0111_0110_0101_0100) begin $display("FAILED -- abg1 = 'b%b", abg1); err=1; end
      if (abg2 !== 16'b1101_1101_1101_1101) begin $display("FAILED -- abg2 = 'b%b", abg2); err=1; end
      if (abg3 !== 16'b1101_1111_1101_1101) begin $display("FAILED -- abg3 = 'b%b", abg3); err=1; end
      if (abg4 !== 16'b1010_1010_1010_1010) begin $display("FAILED -- abg4 = 'b%b", abg4); err=1; end
      if (abg5 !== 16'b0110_0110_0110_0110) begin $display("FAILED -- abg5 = 'b%b", abg5); err=1; end
      if (abg6 !== 16'b0010_0010_0010_0010) begin $display("FAILED -- abg6 = 'b%b", abg6); err=1; end
      if (abg7 !== 16'bxxxx_xxxx_1010_1010) begin $display("FAILED -- abg7 = 'b%b", abg7); err=1; end
      if (abg8 !== 16'b1010_1010_xxxx_xxxx) begin $display("FAILED -- abg8 = 'b%b", abg8); err=1; end
      if (abg9 !== 16'b0000_0001_0010_0011) begin $display("FAILED -- abg9 = 'b%b", abg9); err=1; end

      alt0               = '{ 3 ,2 ,1, 0 };
      alt1               = '{0:4, 1:5, 2:6, 3:7};
      alt2               = '{default:13};
      alt3               = '{2:15, default:13};
      alt4               = '{WA  {          {WB/2  {2'b10}}  }};
      alt5               = '{WA  { {3'b101, {WB/2-1{2'b10}}} }};
      alt6               = '{WA  {          {WB/2-1{2'b10}}  }};
      alt7 [0   :WA/2-1] = '{WA/2{          {WB/2  {2'b10}}  }};
      alt8 [WA/2:WA  -1] = '{WA/2{          {WB/2  {2'b01}}  }};
      alt9               = '{err+0, err+1, err+2, err+3};

      if (alt0 !== 16'b0011_0010_0001_0000) begin $display("FAILED -- alt0 = 'b%b", alt0); err=1; end
      if (alt1 !== 16'b0100_0101_0110_0111) begin $display("FAILED -- alt1 = 'b%b", alt1); err=1; end
      if (alt2 !== 16'b1101_1101_1101_1101) begin $display("FAILED -- alt2 = 'b%b", alt2); err=1; end
      if (alt3 !== 16'b1101_1101_1111_1101) begin $display("FAILED -- alt3 = 'b%b", alt3); err=1; end
      if (alt4 !== 16'b1010_1010_1010_1010) begin $display("FAILED -- alt4 = 'b%b", alt4); err=1; end
      if (alt5 !== 16'b0110_0110_0110_0110) begin $display("FAILED -- alt5 = 'b%b", alt5); err=1; end
      if (alt6 !== 16'b0010_0010_0010_0010) begin $display("FAILED -- alt6 = 'b%b", alt6); err=1; end
      if (alt7 !== 16'b1010_1010_xxxx_xxxx) begin $display("FAILED -- alt7 = 'b%b", alt7); err=1; end
      if (alt8 !== 16'bxxxx_xxxx_1010_1010) begin $display("FAILED -- alt8 = 'b%b", alt8); err=1; end
      if (alt9 !== 16'b0000_0001_0010_0011) begin $display("FAILED -- alt9 = 'b%b", alt9); err=1; end

      if (!err) $display("PASSED");
   end

endmodule
module test ();



   localparam WA = 4;
   localparam WB = 4;


   logic [WA-1:0] [WB-1:0] abg0, abg1, abg2, abg3, abg4, abg5, abg6, abg7, abg8, abg9;
   logic [0:WA-1] [0:WB-1] alt0, alt1, alt2, alt3, alt4, alt5, alt6, alt7, alt8, alt9;


   bit err = 0;

   initial begin
      abg0               = '{ 3 ,2 ,1, 0 };
      abg1               = '{0:4, 1:5, 2:6, 3:7};
      abg2               = '{default:13};
      abg3               = '{2:15, default:13};
      abg4               = '{WA  {          {WB/2  {2'b10}}  }};
      abg5               = '{WA  { {3'b101, {WB/2-1{2'b10}}} }};
      abg6               = '{WA  {          {WB/2-1{2'b10}}  }};
      abg7 [WA/2-1:0   ] = '{WA/2{          {WB/2  {2'b10}}  }};
      abg8 [WA  -1:WA/2] = '{WA/2{          {WB/2  {2'b01}}  }};
      abg9               = '{err+0, err+1, err+2, err+3};

      if (abg0 !== 16'b0011_0010_0001_0000) begin $display("FAILED -- abg0 = 'b%b", abg0); err=1; end
      if (abg1 !== 16'b0111_0110_0101_0100) begin $display("FAILED -- abg1 = 'b%b", abg1); err=1; end
      if (abg2 !== 16'b1101_1101_1101_1101) begin $display("FAILED -- abg2 = 'b%b", abg2); err=1; end
      if (abg3 !== 16'b1101_1111_1101_1101) begin $display("FAILED -- abg3 = 'b%b", abg3); err=1; end
      if (abg4 !== 16'b1010_1010_1010_1010) begin $display("FAILED -- abg4 = 'b%b", abg4); err=1; end
      if (abg5 !== 16'b0110_0110_0110_0110) begin $display("FAILED -- abg5 = 'b%b", abg5); err=1; end
      if (abg6 !== 16'b0010_0010_0010_0010) begin $display("FAILED -- abg6 = 'b%b", abg6); err=1; end
      if (abg7 !== 16'bxxxx_xxxx_1010_1010) begin $display("FAILED -- abg7 = 'b%b", abg7); err=1; end
      if (abg8 !== 16'b1010_1010_xxxx_xxxx) begin $display("FAILED -- abg8 = 'b%b", abg8); err=1; end
      if (abg9 !== 16'b0000_0001_0010_0011) begin $display("FAILED -- abg9 = 'b%b", abg9); err=1; end

      alt0               = '{ 3 ,2 ,1, 0 };
      alt1               = '{0:4, 1:5, 2:6, 3:7};
      alt2               = '{default:13};
      alt3               = '{2:15, default:13};
      alt4               = '{WA  {          {WB/2  {2'b10}}  }};
      alt5               = '{WA  { {3'b101, {WB/2-1{2'b10}}} }};
      alt6               = '{WA  {          {WB/2-1{2'b10}}  }};
      alt7 [0   :WA/2-1] = '{WA/2{          {WB/2  {2'b10}}  }};
      alt8 [WA/2:WA  -1] = '{WA/2{          {WB/2  {2'b01}}  }};
      alt9               = '{err+0, err+1, err+2, err+3};

      if (alt0 !== 16'b0011_0010_0001_0000) begin $display("FAILED -- alt0 = 'b%b", alt0); err=1; end
      if (alt1 !== 16'b0100_0101_0110_0111) begin $display("FAILED -- alt1 = 'b%b", alt1); err=1; end
      if (alt2 !== 16'b1101_1101_1101_1101) begin $display("FAILED -- alt2 = 'b%b", alt2); err=1; end
      if (alt3 !== 16'b1101_1101_1111_1101) begin $display("FAILED -- alt3 = 'b%b", alt3); err=1; end
      if (alt4 !== 16'b1010_1010_1010_1010) begin $display("FAILED -- alt4 = 'b%b", alt4); err=1; end
      if (alt5 !== 16'b0110_0110_0110_0110) begin $display("FAILED -- alt5 = 'b%b", alt5); err=1; end
      if (alt6 !== 16'b0010_0010_0010_0010) begin $display("FAILED -- alt6 = 'b%b", alt6); err=1; end
      if (alt7 !== 16'b1010_1010_xxxx_xxxx) begin $display("FAILED -- alt7 = 'b%b", alt7); err=1; end
      if (alt8 !== 16'bxxxx_xxxx_1010_1010) begin $display("FAILED -- alt8 = 'b%b", alt8); err=1; end
      if (alt9 !== 16'b0000_0001_0010_0011) begin $display("FAILED -- alt9 = 'b%b", alt9); err=1; end

      if (!err) $display("PASSED");
   end

endmodule