Deallocate / LastIndex / ICover

Why OSVVM?ForumsOSVVMDeallocate / LastIndex / ICover

This topic has 2 voices, contains 2 replies, and was last updated by Avatar of Richard Ainsworth Richard Ainsworth 350 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
Author Posts
Author Posts
June 10, 2016 at 23:27 #1166
Avatar of Richard Ainsworth
Richard Ainsworth

Hi Jim/fellow OSVVMers,

Not sure if this is worthy of a forum but… I ran into a small  issue the other day whilst using Deallocate. It appears that it doesn’t reset (set) “LastIndex”.

I used Deallocate then promptly created a load of Bins in the recently Deallocated CovPType, then called ICover and boom, fail (@ if CountMode = COUNT_FIRST and inside(CovPoint, CovBinPtr(LastIndex).BinVal.all) then).

I can’t recall the precise version of CoveragePkg that it was (comes with the release of Questasim, but I can’t tell you which installation because I don’t know, and other reasons which I may not be allowed to discuss) but it looks like it equally applies to CoveragePkg release 2015.06 (which I have installed at home). Maybe I’m way out of date on this package.

The work around was simple enough and merely involved changing CountModeType to COUNT_ALL.

Not sure if this a crease (oversight) in Deallocate or totally intentional but, I thought I’d point it out. Perhaps you can advise me/us on that.

Anyhoo, great stuff this OSVVM, saves *us* a lot of pain.

Best Regards, and keep at it.


June 11, 2016 at 17:14 #1167
Avatar of Jim Lewis
Jim Lewis

Hi Richard,

Thanks for reporting this.  It looks like the current version (2016.01) has the same issue.   If you want to do a quick edit of the package.  In Deallocate, it should assign LastIndex to 1. 

If you want an alternative work around, after deallocate, call RandCovPoint and discard the values.  This will set LastIndex to something appropriate for your coverage model.

If you are just trying to zero out your coverage model, you might try SetCovZero. 

This will be fixed on the GitHub site shortly and later in the next formal release.

Best Regards,


June 13, 2016 at 13:28 #1168
Avatar of Richard Ainsworth
Richard Ainsworth

Hi Jim,

Thanks for getting back to me, and so promptly too. As you say it’s an easy enough fix/work-around.

I like your OSVVM stuff. It works.

Best Regards, Richard.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.