Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IsBinCovered to get covered state of selected bin #13

Closed
wants to merge 1 commit into from

Conversation

tmeissner
Copy link

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.

if not(sv_cover.IsBinCovered(7)) then
  -- generate stimulus to cover BIN #7
end if;

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.

@JimLewis JimLewis self-assigned this May 15, 2020
@JimLewis JimLewis added Agreed Agreed upon solution enhancement labels May 15, 2020
@JimLewis
Copy link
Member

The pull request was not mergeable, so I manually added this capability and added it to the singleton data structure. It is currently on the dev branch. Apologies that it took so long.

@JimLewis JimLewis closed this Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agreed Agreed upon solution enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants