function bit bit2test(bit[15:0] bits2test); if ((bits2test&bitgen(2)) != 0) return 1'b1; return 1'b0;endfunction
endpackage
module mod2test #( parameter para2test = 16'h000F); localparam bit2set_flag = pkg::bit2test(para2test); initial begin if (bit2set_flag == 0) $error("bit2 of para2test is not set!); endendmodule