data/full_repos/permissive/143278/ivltests/casez3.10E.v
1: b'%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/casez3.10E.v:28: Operator CASE expects 5 bits on the Case expression, but Case expression\'s VARREF \'val1\' generates 3 bits.\n                                                                          : ... In instance main\n  casez (val1)\n  ^~~~~\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/casez3.10E.v:39: Operator ASSIGN expects 3 bits on the Assign RHS, but Assign RHS\'s CONST \'5\'bz\' generates 5 bits.\n                                                                          : ... In instance main\n    val1 = 5\'b0000z ;\n         ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/casez3.10E.v:46: Operator ASSIGN expects 3 bits on the Assign RHS, but Assign RHS\'s CONST \'5\'b1z0\' generates 5 bits.\n                                                                          : ... In instance main\n    val1 = 5\'b001z0;\n         ^\n%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/casez3.10E.v:53: Operator ASSIGN expects 3 bits on the Assign RHS, but Assign RHS\'s CONST \'5\'b1zzzz\' generates 5 bits.\n                                                                          : ... In instance main\n    val1 = 5\'b1zzzz;  \n         ^\n%Error: Exiting due to 4 warning(s)\n'
module main ();

reg error;
reg [2:0] val1,val2;
reg [2:0] result ;

always @( val1 )
  casez (val1)
    5'b0000z: result = 0;
    5'b001?0: result = 1 ;
    5'b01?z0: result = 2;
    default:  result = 4;
  endcase

initial
  begin
    error = 0;

    val1 = 5'b0000z ;
    if(result !=0)
      begin
        $display("FAILED casez 3.10D - case (expr) lab1: ");
        error = 1;
      end

    val1 = 5'b001z0;
    if(result !=1)
      begin
        $display("FAILED casez 3.10D - case (expr) lab2: ");
        error = 1;
      end

    val1 = 5'b1zzzz;
    if(result !=4)
      begin
        $display("FAILED casez 3.10D - case (expr) lab1: ");
        error = 1;
      end

    if(error == 0)
      $display("PASSED");
  end

endmodule
module main ();


reg error;
reg [2:0] val1,val2;
reg [2:0] result ;

always @( val1 )
  casez (val1)
    5'b0000z: result = 0;
    5'b001?0: result = 1 ;
    5'b01?z0: result = 2;
    default:  result = 4;
  endcase

initial
  begin
    error = 0;

    val1 = 5'b0000z ;
    if(result !=0)
      begin
        $display("FAILED casez 3.10D - case (expr) lab1: ");
        error = 1;
      end

    val1 = 5'b001z0;
    if(result !=1)
      begin
        $display("FAILED casez 3.10D - case (expr) lab2: ");
        error = 1;
      end

    val1 = 5'b1zzzz;
    if(result !=4)
      begin
        $display("FAILED casez 3.10D - case (expr) lab1: ");
        error = 1;
      end

    if(error == 0)
      $display("PASSED");
  end

endmodule