Add IsBinCovered to get covered state of selected bin #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a function to the protected type which can be used to get the coverage state of a selected bin. It returns true if the bin was covered, false if not. It also returns false for illegal & ignore bins.
The use case is when you build a coverage model only to get the functional coverage, but using constrained random instead the "intelligent random" methods of the CoveragePkg. For example verifying components in a heuristic way like FIFOs.
With the new IsBinCovered function you can know if your have to hit specific coverage goals like writing into the FIFO when it's full, or reading when it's empty.
Maybe there is a simpler method already implemented in CoveragePkg, but I didn't find it.