Jump to content
gaurav_brcm

Enabling inbuilt UVM RAL coverage sampling

Recommended Posts

Hi,

 

I want to use in-built UVM RAL cover groups.

I tried following steps but did not help :

 

1) Enable coverage building:

     Before building register model, I use following :

     uvm_reg::include_coverage("*",UVM_CVR_ALL);

 

2) To enable sampling :

    <_regmodel>.set_coverage(UVM_CVR_ALL);

 

In my regmodel there are two types of cover groups: UVM_CVR_ADDR_MAP in top level register model and UVM_CVR_REG_BITS in individual registers.

 

I was hoping that UVM_CVR_ALL would enable sampling of all.

 

I could see cover groups getting built but are not sampled.

 

Am I missing something ?

 

Please let me know.

 

Thanks.

Share this post


Link to post
Share on other sites

hi,

 

to collect coverage you need

 

1. the reg model needs to declare the coverage models via build_coverage(<mask>) in the ctor of the uvm_reg's 

2. in the uvm_reg ctor the coverage model needs to be constructed conditionally via if(has_coverage(..)) <covgroup> = new();...

3. before building the reg model you need to set uvm_reg::include_coverage(...) to say which models you want to be constructed

4. eventually you need to tell the sv compiler to enable coverage collection

 

(now you should see at least empty coverage)

 

and finally you need to wire the events/sample calls and trigger the collection.

 

/uwe

Share this post


Link to post
Share on other sites

Hello,

I'm facing a similar issue. I'm seeing an empty coverage dump. I have done 1-4 steps as suggested above..i have also called sample_values() function from base test run phase

I'm not sure .. sample called worked or not...

 

Thanks

Vivek

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...