vendredi 21 juillet 2017

randomization of real numbers in systemverilog

I want to obtain a randomized value from the following distribution:

from 1 to 10 with probability 90% from 100 to 1000 with probability 10%

To attain this, I wrote the following:

    constraint constraint_randx {
    randx dist{
        [0.001   :   0.010] :/ 90,
        [0.100   :   1.000] :/ 10
    }; }

After applying randomization command, I get the following error msg:

ncsim: *W,RNDOCS: These variables contribute to the set of conflicting constraints:

I saw from forum that there are some simulator which does not allow randomization of real. I am afraid, my simulator is of such a kind.

Can you please show me some solution?




Aucun commentaire:

Enregistrer un commentaire