Reply To: RandCovPoint Behavior

Why OSVVM™? Forums OSVVM RandCovPoint Behavior Reply To: RandCovPoint Behavior

#724
Jim Lewis
Member

Hi Jc,

Short answer is, each item within a given bin is selected with a uniform distribution.  Let’s just look at your first bin and modify it slightly (so it divides nicely) and only consider it as an item bin:

GenBin(4,1,500 , 1000,5)

This creates the bins:

Goal    Range
  4     500-599
  4     600-699
  4     700-799
  4     800-899
  4     900-1000

As a result, each of these bins will get selected 4 times (due to coverage goal). Internally within a range, RandCovPoint uses RandomPkg.RandInt(Min, Max) to generate a value. So the values will have a uniform distribution. Keep in mind, uniform is uniform over a large set of numbers, so values may repeat.

If you want no repeating, then rather than using a coverage goal, divide your coverage bins into smaller pieces.  IE: change the coverage goal to 1 and the bin divisor to 20 (my previous divisor: 5 * previous coverage goal: 4)

GenBin(1,1,500 , 1000,20)

This creates the bins:

Goal    Range
  1     500-524
  1     525-549
  1     550-574
  1     575-599
  1     600-624
  1     625-649
  1     650-674
  1     675-699
  1     700-724
  1     725-749
  1     750-774
  1     775-799
  1     800-824
  1     825-849
  1     850-874
  1     875-899
  1     900-924
  1     925-949
  1     950-974
  1     975-1000

Moving on to your second question.  Everything to do with the seed is in the package RandomBasePkg.  So simply reference it and you will be fine:

use osvvm.RandomBasePkg.all ;

Great questions. 

Best Regards,

Jim