RandCovPoint(0.0) and potential changes

Why OSVVM™? Forums OSVVM RandCovPoint(0.0) and potential changes

Viewing 1 post (of 1 total)
  • Author
  • #338
    Jim Lewis


    This post is to discuss a planned change to RandCovPoint.  Its current declaration is:

    impure function RandCovPoint ( PercentCov : real := 100.0 ) return integer_vector ;

    Currently PercentCov is used to enable two separate concepts.  If PercentCov is greater the current minimum coverage, then PercentCov represents a coverage goal.  Anything larger than PercentCov does not get selected for randomization.   On the other hand, if PercentCov is less than current minimum coverage, then thresholding is turned on.  In effect, PercentCov is changed to MinCov + Threshold value.   However, thresholding is turned off if coverage goes above 100.0.

    I am seeing use cases where I need a higher coverage than 100%.  For example when coverage goals are used as randomization weights, it is common to break down the weights into relative percentage of occurrence.  In this case, when we transition from running the test in prototype mode (running 100 times) to running for long periods of time, we need to increase the run length without impacting manually changing the relative percentage of occurrence.  This can be controlled with RandCovPoint, but it would also automatically turn off any thresholding that was set.  As a result, I think we need to separate both the randomization goals and turning on/off the thresholding.

    Enabling thresholding separately will require a non-backward compatible change.  My current thought is to enable it using a variable internal to the protected type and provide a method to turn it on or off.  In addition, a call to the method, SetCovThreshold would also turn it on (hence for going the need to turn it on separately).   Note that if you are currently using thresholding and you also set the coverage threshold, then this change may not impact you.  

    I think also a global variable for test PercentCov target would also be helpful.  This one can be done in a backward compatible way by setting it to 0.0 and using the maximum of the GlobalPercentCov and the PercentCov specified to RandCovPoint.  The GlobalPercentCov would also impact IsCovered in the same manner.

    Note if you are not currently using thresholding, this will not impact you at all.  

    Comments?  Also let me know if you are currently using thresholding.  


Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.