What is the difference between option A and Option B
Option A:
sucess = std::randomize(type_l) with {
type_l inside { A ,B ,C};
type_l dist { A := 2 ,B := 5 ,C := 4 };
};
if( sucess == 0 ) begin
`uvm_fatal("TEST_CFG", "type_l randomization failed")
end
Option B:
class gen_type;
enum_type type_l;
constraint type_c{
type_l inside { A ,B ,C};
type_l dist { A := 2 ,B := 5 ,C := 4 };
};
endclass