Difference Between Std: :Randomize and Class Based Randomize
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...
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