module tb;
class my_item;
rand bit a[9][9];
constraint c{a.sum() with ($countones(item)) ==10;}
endclass
initial begin
my_item m1;
m1=new();
assert(m1.randomize());
$display ("%p",m1.a);
end
endmodule
module tb;
class my_item;
rand bit a[9][9];
constraint c{a.sum() with ($countones(item)) ==10;}
endclass
initial begin
my_item m1;
m1=new();
assert(m1.randomize());
$display ("%p",m1.a);
end
endmodule