I want to generate random values that are cyclic in nature, or in other words they are completely exhaustive of their possible values.
1) Is there any way to do this using Scope Randomization, using a UNIQUE constraint? (having declared variable as rand int)
2) If not then any other solutions that might avoid declaration of a new class?
rand int variable_x;
if(! std::randomize(variable_x) with {variable_x >0; variable_x < varible_x_threshold ; unique{variable_x} ;}begin
`uvm_error(get_type_name(),"RANDOMIZATION FAILED")
end
The above snippet throws no error, but I don't see variable_x going around in a cyclic manner.