Comments (6)
I agree that what you are describing is erroneous (aka: a user error that is not currently detected by the coverage model). OTOH, detecting it would make entry an O(n**2) algorithm. For a larger model (AddCross supports crossing up to 20 items), this check time can be significant - see the discussion about Merging below.
There are a couple of things that will impact this issue, however, both are currently marked deprecated. First you can set the count mode to COUNT_ALL and when ICover is called, it will hunt for all bins that match the value. This will significantly increase search time when doing intelligent coverage randomization (because it does a COUNT_FIRST and it knows which bin to look in first since it randomly picked it - which unless you change it it is the bin to be counted).
type CountModeType is (COUNT_FIRST, COUNT_ALL) ;
procedure SetCountMode (A : CountModeType) ;
. . .
Cov1.SetCountMode(COUNT_ALL) ;
Another alternative is to SetMerging to true. SetMerging is supported
for removing count bins that are in a prior entered illegal or ignore bin.
procedure SetMerging(A : boolean := TRUE ) ;
. . .
Cov1.SetMerging(TRUE);
Currently the feature of SetMerging that is deprecated is to merge a count bin that matches an existing count bin. Note that it does nothing though if they overlap but do not match. The reason this feature is deprecated is that it makes merging slow and results in slow capture of coverage models - OTOH maybe this needs to be looked at as those models were large (I think it was a cross with 20 items in the cross so maybe the test case was obnoxiously (and unrealistically) large as I have to test the full extent of the modeling capability).
If the check were required, then maybe Merging would be on by default and it would only be an error if Merging were turned off.
There are some checks like this that are like running a lint tool - they are nice things to do, but once you have checked it the first time, it would be nice to turn it off later during regressions.
from osvvm.
In a way, this is like file reading during an image processing test. If the image file were corrupted, the test may fail after running for hours due to the error being detected in the image file.
Hence you have two options of protecting yourself:
- As part of the test, first read the whole file just to check it and then close the file and run the test while reading the file
- Create a separate program that checks the file and then always run the the program that checks the file one time before using it in a larger simulation.
While in my example I think choice 2 is the obvious solution, I don't think this issue has as obvious of a solution.
Thoughts?
from osvvm.
Like you said, this is mostly to cover user error, its probably overkill to try and catch it especially as the problem can explode as users add a few crosses. But Given Im only just getting into crosses, this may affect others more than me?
from osvvm.
Based on my last class session, I added some additional materials to make the fact that it does a in order search of the data structure and picks the first matching bin a little more clear - in fact I think I even made sure to say it twice.
from osvvm.
from osvvm.
With the current implementation of merging, you can enable merging and then add more to the bins:
Cov.SetMerging(TRUE);
Cov.AddBins(5, GenBin(1)) ; - do bin 1. 5 more times
Cov.AddBins(5, GenBin(5)); -- do bin 5, 5 more times
Note merging of a count bin into another count bin increased run time of some of my tests significantly and may be removed in the future - it is an O(n^2) algorithm rather and O(n).
OTOH, I am not sure if my test that was slowed down was a realistic and normal thing to do, so maybe it was unreasonably slow because the test was unreasonably complex - it iterated across a huge space ignoring most of it (to keep the model size reasonable).
from osvvm.
Related Issues (20)
- Alerts - Option to print entire path to alert name. HOT 6
- AlertLogPkg: ReportAlerts ignores ReportAll HOT 3
- Intelligent Coverage - Protected type restricted to use in different files HOT 8
- AlertLogPkg: Enabling and Disabling Passed/Affirmations Checked HOT 1
- Inconsistent line termination. HOT 4
- ScoreboardPkg is missing in OsvvmContext HOT 3
- Race conditions / buffer issues in console output HOT 4
- Missing wait for 0 ns in else-branch in WaitForLevel procedure HOT 2
- NewID Procedure with signal parameter and wait for 0 ns HOT 1
- NewID Procedure with signal parameter and wait for 0 ns
- Make the AlertLogName column width of log-output configurable HOT 2
- Traceability between expected errors/skipped tests and issue tracking software HOT 2
- CoveragePkg: AddCross with IgnoreBin Error HOT 5
- Common Log Interface HOT 6
- AlertLogPkg: AffirmIf with std_match (as implemented in the ScoreBoardPkg) HOT 3
- Add possibility to use falling clock edge as the active one. HOT 2
- RandInt : Provide simple overload or set defaults of min/max version to integer'low integer'high
- IDs - add _UNINITIALISED constant and add is_initialised functions for IDs
- ScoreboardGenericPkg: Make generic "match" function impure
- Provide a WARNING (user settable via options to ERROR) if any randomisation is attempted without first providing a seed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osvvm.