data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v
1: b'%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:7: syntax error, unexpected bit, expecting IDENTIFIER or \'=\' or do or final\n  reg bit;\n      ^~~\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:36: 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/42434302/ivltests/sel_rval_bit_ob.v:47: syntax error, unexpected \'=\', expecting "\'{"\n    bit = pvar0[31];   \n        ^\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:48: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'b0) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:52: syntax error, unexpected IDENTIFIER, expecting new or new-then-paren\n    bit = pvar0[32];   \n          ^~~~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:53: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== (big_param ? 1\'b0: 1\'bx)) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:58: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:63: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:68: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:75: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'b0) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:80: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== (big_param ? 1\'b0: 1\'bx)) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:85: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:90: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:95: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:102: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'b1) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:107: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== (big_param ? 1\'b1: 1\'bx)) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:112: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:117: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:122: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:129: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:134: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:139: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:144: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:151: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:156: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:161: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:166: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:173: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:178: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:183: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:188: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:196: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:201: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:206: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:211: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:218: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:223: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:228: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:233: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:241: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:246: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:251: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:256: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:263: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:268: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:273: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:278: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:286: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:291: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:296: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/sel_rval_bit_ob.v:301: syntax error, unexpected !==, expecting "\'{"\n    if (bit !== 1\'bx) begin\n            ^~~\n%Error: Exiting due to too many errors encountered; --error-limit=50\n'
module top;
  reg pass;
  reg big_param;
  reg bit;
  integer idx;

  parameter pvar0 = 0;
  parameter pvar1 = 1;
  parameter pvar2 = -1;
  parameter pvar3 = 4'b0001;
  parameter [4:1] pvar4 = 4'b0001;
  parameter [1:4] pvar5 = 4'b0001;
  reg [4:1] rvar = 4'b0010;
  reg [1:4] rvar2 = 4'b0010;
  reg [4:1] ravar [2:1];
  reg [1:4] ravar2 [2:1];
  wire [4:1] wvar = 4'b0100;
  wire [1:4] wvar2 = 4'b0100;
  wire [4:1] wavar [2:1];
  wire [1:4] wavar2 [2:1];

  assign wavar[1] = 4'b1001;
  assign wavar[2] = 4'b1010;
  assign wavar2[1] = 4'b1001;
  assign wavar2[2] = 4'b1010;

  initial begin
    pass = 1'b1;
    ravar[1] = 4'b1101;
    ravar[2] = 4'b1110;
    ravar2[1] = 4'b1101;
    ravar2[2] = 4'b1110;
    #1;






    big_param = 1'b1;
    if (pvar0[32] === 1'bx) big_param = 1'b0;


    bit = pvar0[31];
    if (bit !== 1'b0) begin
      $display("Failed at end bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar0[32];
    if (bit !== (big_param ? 1'b0: 1'bx)) begin
      $display("Failed after bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar0[-1];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar0[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar0[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar1[31];
    if (bit !== 1'b0) begin
      $display("Failed at end bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar1[32];
    if (bit !== (big_param ? 1'b0: 1'bx)) begin
      $display("Failed after bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar1[-1];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar1[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar1[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar2[31];
    if (bit !== 1'b1) begin
      $display("Failed at end bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar2[32];
    if (bit !== (big_param ? 1'b1: 1'bx)) begin
      $display("Failed after bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar2[-1];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar2[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar2[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar3[4];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a parameter (3), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar3[-1];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (3), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar3[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (3), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar3[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (3), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar4[5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a parameter (4), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar4[0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (4), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar4[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (4), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar4[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (4), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar5[0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a parameter (5), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar5[5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (5), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar5[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (5), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar5[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (5), got %b", bit);
      pass = 1'b0;
    end



    bit = rvar[5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a register, got %b", bit);
      pass = 1'b0;
    end
    bit = rvar[0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a register, got %b", bit);
      pass = 1'b0;
    end
    bit = rvar[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a register, got %b", bit);
      pass = 1'b0;
    end
    bit = rvar[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a register, got %b", bit);
      pass = 1'b0;
    end


    bit = rvar2[0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a register (2), got %b", bit);
      pass = 1'b0;
    end
    bit = rvar2[5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a register (2), got %b", bit);
      pass = 1'b0;
    end
    bit = rvar2[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a register (2), got %b", bit);
      pass = 1'b0;
    end
    bit = rvar2[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a register (2), got %b", bit);
      pass = 1'b0;
    end



    bit = ravar[1][5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of an array word, got %b", bit);
      pass = 1'b0;
    end
    bit = ravar[1][0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of an array word, got %b", bit);
      pass = 1'b0;
    end
    bit = ravar[1][1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of an array word, got %b", bit);
      pass = 1'b0;
    end
    bit = ravar[1][1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of an array word, got %b", bit);
      pass = 1'b0;
    end


    bit = ravar2[1][0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of an array word (2), got %b", bit);
      pass = 1'b0;
    end
    bit = ravar2[1][5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of an array word (2), got %b", bit);
      pass = 1'b0;
    end
    bit = ravar2[1][1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of an array word (2), got %b", bit);
      pass = 1'b0;
    end
    bit = ravar2[1][1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of an array word (2), got %b", bit);
      pass = 1'b0;
    end



    bit = wvar[5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a wire, got %b", bit);
      pass = 1'b0;
    end
    bit = wvar[0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a wire, got %b", bit);
      pass = 1'b0;
    end
    bit = wvar[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a wire, got %b", bit);
      pass = 1'b0;
    end
    bit = wvar[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a wire, got %b", bit);
      pass = 1'b0;
    end


    bit = wvar2[0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a wire (2), got %b", bit);
      pass = 1'b0;
    end
    bit = wvar2[5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a wire (2), got %b", bit);
      pass = 1'b0;
    end
    bit = wvar2[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a wire (2), got %b", bit);
      pass = 1'b0;
    end
    bit = wvar2[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a wire (2), got %b", bit);
      pass = 1'b0;
    end



    bit = wavar[1][5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a wire array word, got %b", bit);
      pass = 1'b0;
    end
    bit = wavar[1][0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a wire array word, got %b", bit);
      pass = 1'b0;
    end
    bit = wavar[1][1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a wire array word, got %b", bit);
      pass = 1'b0;
    end
    bit = wavar[1][1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a wire array word, got %b", bit);
      pass = 1'b0;
    end


    bit = wavar2[1][0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a wire array word (2), got %b", bit);
      pass = 1'b0;
    end
    bit = wavar2[1][5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a wire array word (2), got %b",
               bit);
      pass = 1'b0;
    end
    bit = wavar2[1][1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a wire array word (2), got %b",
               bit);
      pass = 1'b0;
    end
    bit = wavar2[1][1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a wire array word (2), got %b",
               bit);
      pass = 1'b0;
    end

    if (pass) $display("PASSED");
  end
endmodule
module top;

  reg pass;
  reg big_param;
  reg bit;
  integer idx;

  parameter pvar0 = 0;
  parameter pvar1 = 1;
  parameter pvar2 = -1;
  parameter pvar3 = 4'b0001;
  parameter [4:1] pvar4 = 4'b0001;
  parameter [1:4] pvar5 = 4'b0001;
  reg [4:1] rvar = 4'b0010;
  reg [1:4] rvar2 = 4'b0010;
  reg [4:1] ravar [2:1];
  reg [1:4] ravar2 [2:1];
  wire [4:1] wvar = 4'b0100;
  wire [1:4] wvar2 = 4'b0100;
  wire [4:1] wavar [2:1];
  wire [1:4] wavar2 [2:1];

  assign wavar[1] = 4'b1001;
  assign wavar[2] = 4'b1010;
  assign wavar2[1] = 4'b1001;
  assign wavar2[2] = 4'b1010;

  initial begin
    pass = 1'b1;
    ravar[1] = 4'b1101;
    ravar[2] = 4'b1110;
    ravar2[1] = 4'b1101;
    ravar2[2] = 4'b1110;
    #1;






    big_param = 1'b1;
    if (pvar0[32] === 1'bx) big_param = 1'b0;


    bit = pvar0[31];
    if (bit !== 1'b0) begin
      $display("Failed at end bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar0[32];
    if (bit !== (big_param ? 1'b0: 1'bx)) begin
      $display("Failed after bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar0[-1];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar0[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar0[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (0), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar1[31];
    if (bit !== 1'b0) begin
      $display("Failed at end bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar1[32];
    if (bit !== (big_param ? 1'b0: 1'bx)) begin
      $display("Failed after bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar1[-1];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar1[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar1[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (1), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar2[31];
    if (bit !== 1'b1) begin
      $display("Failed at end bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar2[32];
    if (bit !== (big_param ? 1'b1: 1'bx)) begin
      $display("Failed after bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar2[-1];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar2[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar2[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (-1), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar3[4];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a parameter (3), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar3[-1];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (3), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar3[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (3), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar3[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (3), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar4[5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a parameter (4), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar4[0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (4), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar4[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (4), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar4[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (4), got %b", bit);
      pass = 1'b0;
    end


    bit = pvar5[0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a parameter (5), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar5[5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a parameter (5), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar5[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a parameter (5), got %b", bit);
      pass = 1'b0;
    end
    bit = pvar5[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a parameter (5), got %b", bit);
      pass = 1'b0;
    end



    bit = rvar[5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a register, got %b", bit);
      pass = 1'b0;
    end
    bit = rvar[0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a register, got %b", bit);
      pass = 1'b0;
    end
    bit = rvar[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a register, got %b", bit);
      pass = 1'b0;
    end
    bit = rvar[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a register, got %b", bit);
      pass = 1'b0;
    end


    bit = rvar2[0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a register (2), got %b", bit);
      pass = 1'b0;
    end
    bit = rvar2[5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a register (2), got %b", bit);
      pass = 1'b0;
    end
    bit = rvar2[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a register (2), got %b", bit);
      pass = 1'b0;
    end
    bit = rvar2[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a register (2), got %b", bit);
      pass = 1'b0;
    end



    bit = ravar[1][5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of an array word, got %b", bit);
      pass = 1'b0;
    end
    bit = ravar[1][0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of an array word, got %b", bit);
      pass = 1'b0;
    end
    bit = ravar[1][1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of an array word, got %b", bit);
      pass = 1'b0;
    end
    bit = ravar[1][1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of an array word, got %b", bit);
      pass = 1'b0;
    end


    bit = ravar2[1][0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of an array word (2), got %b", bit);
      pass = 1'b0;
    end
    bit = ravar2[1][5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of an array word (2), got %b", bit);
      pass = 1'b0;
    end
    bit = ravar2[1][1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of an array word (2), got %b", bit);
      pass = 1'b0;
    end
    bit = ravar2[1][1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of an array word (2), got %b", bit);
      pass = 1'b0;
    end



    bit = wvar[5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a wire, got %b", bit);
      pass = 1'b0;
    end
    bit = wvar[0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a wire, got %b", bit);
      pass = 1'b0;
    end
    bit = wvar[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a wire, got %b", bit);
      pass = 1'b0;
    end
    bit = wvar[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a wire, got %b", bit);
      pass = 1'b0;
    end


    bit = wvar2[0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a wire (2), got %b", bit);
      pass = 1'b0;
    end
    bit = wvar2[5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a wire (2), got %b", bit);
      pass = 1'b0;
    end
    bit = wvar2[1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a wire (2), got %b", bit);
      pass = 1'b0;
    end
    bit = wvar2[1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a wire (2), got %b", bit);
      pass = 1'b0;
    end



    bit = wavar[1][5];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a wire array word, got %b", bit);
      pass = 1'b0;
    end
    bit = wavar[1][0];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a wire array word, got %b", bit);
      pass = 1'b0;
    end
    bit = wavar[1][1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a wire array word, got %b", bit);
      pass = 1'b0;
    end
    bit = wavar[1][1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a wire array word, got %b", bit);
      pass = 1'b0;
    end


    bit = wavar2[1][0];
    if (bit !== 1'bx) begin
      $display("Failed after bit select of a wire array word (2), got %b", bit);
      pass = 1'b0;
    end
    bit = wavar2[1][5];
    if (bit !== 1'bx) begin
      $display("Failed before bit select of a wire array word (2), got %b",
               bit);
      pass = 1'b0;
    end
    bit = wavar2[1][1'bx];
    if (bit !== 1'bx) begin
      $display("Failed undefined bit select of a wire array word (2), got %b",
               bit);
      pass = 1'b0;
    end
    bit = wavar2[1][1'bz];
    if (bit !== 1'bx) begin
      $display("Failed high-Z bit select of a wire array word (2), got %b",
               bit);
      pass = 1'b0;
    end

    if (pass) $display("PASSED");
  end
endmodule