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

Supporting inheritance in PyVSC #159

Open
walido78 opened this issue Jul 15, 2022 · 2 comments
Open

Supporting inheritance in PyVSC #159

walido78 opened this issue Jul 15, 2022 · 2 comments

Comments

@walido78
Copy link

Hello,
As I was writing my test cases in CocoTB, I had a design where there was 10 subdesigns that are identical. Currently the only way to create a covergroup for each entity (i.e sub-design), is for example to duplicate this code 10 times:

@vsc.covergroup
class internal_coverage(object):
    _inst=None
    def __init__(self,uut):     
       
            self.caryallcount=vsc.coverpoint(uut,lambda : getattr(uut.adder,"c"), bins={
             str(63-i):vsc.wildcard_bin("0b" + "x" * (63-i) + "1" + "x" * (i)) for i in range(64)})

and instantiate it with each different entity.

So a good enhancement could be to write :

class internal_coverage_entity2(internal_coverage):
         pass;
@mballance
Copy link
Member

Thanks for the enhancement request, @walido78. If I'm reading this correctly, you a set of designs where the coverage data to be collected is identical (same coverpoints, same bins, same data to be sampled), but you want the coverage for each design to be captured in a different type of covergroup.

@walido78
Copy link
Author

Yes that is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants