Pattern Generation

In reply to dave_59:

In reply to nishitk:

rand bit[10:0] varb = 11'b10000000000;
constraint pattern { varb == const'( {1'b1, varb[10:1]} ); }

i am getting this error plz help me OUT
// code here
class packet;
rand bit[10:0] varb = 11’b10000000000;
constraint pattern { varb == const’( {1’b1, varb[10:1]} ); }
endclass

module constr_blocks;
initial begin
packet pkt;
pkt = new();
repeat(10) begin
pkt.randomize();
$display(“\t value = %0d”,pkt.varb);
end
end
endmodule

output:ERROR VCP7501 “Undeclared type: const.” “testbench.sv” 5 59