RandCovPoint and illegal or ignored Bins

Why OSVVM™? Forums OSVVM RandCovPoint and illegal or ignored Bins

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #934

    Hello,
    I am trying to use the intelligent coverage feature (RandCovPoint) in combination with the requirement that only even random numbers (and bins) are generated.

    My approach was:
    v_cov_bin1.AddBins(GenBin(1,8,8);
    v_cov_bin1.AddBins(IllegalBin(1));
    v_cov_bin1.AddBins(IllegalBin(3));
    v_cov_bin1.AddBins(IllegalBin(5));
    v_cov_bin1.AddBins(IllegalBin(7));

    But the function RandCovPoint also creates odd random numbers like 1 and 3.

    In the RandomPkg there would be the possibility to exclude values with the help of the exclude vectors. But what does I have to do when using the CoveragePkg and the intelligent coverage feature?

    Thank you very much in advance.
    Regards,
    Sebastian

    #935
    Jim Lewis
    Member

    Cool idea.  I will look into adding it.

    For now, for small sets of numbers (oddly there is no corresponding version of IllegalBin that allows integer_vector parameters):

    v_cov_bin1.AddBins(GenBin((2,4,6,8)));

    For now, for larger sets of numbers:

    for i in 1 to 8 loop
      if i mod 2 = 0 then
        v_cov_bin1.AddBins(GenBin(i));
      end if ;
    end loop ;

    If you want to detect any remaining bin as an illegal bin, you can do (just make sure you do this last):

    v_cov_bin1.AddBins(ALL_ILLEGAL);

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.