graeme_jessiman Posted June 10, 2014 Report Share Posted June 10, 2014 Hi I'm playing with a UVM Register example that initially just had register level coverage. My register block code (auto-generated by a tool) has a covergroup wrapped in a class and this class contains a sample method. The register block itself also has as sample method that calls the covergroup::sample method. I have this working when I use either auto-predicition or an explicit predictor. With an explicit predicitor, I can see when I perform a write to one of my registers that my monitor sends out a transaction to the analysis port and this triggers uvm_reg_predictor::write which in turn calls uvm_reg_block::XsampleX which finally calls my reg_block::sample. So al lthe hooks are taken care of and the coverage collection just works. Then I added the option to collect field coverage in my register definitions. I can see that each register definition is extended from uvm_reg, contains it own covergroup and a method called sample_values. When I run my simulations, I see that the register covergroups are all being created but the bins counts for all of them are showing 0%. Having investigated further I can see that the sample_values methods are never being called. Is it the intention that when using Register field level covergoups that you MUST call the sample_values method manually after each Write or Read operation ? I was sort of expecting that the hooks would all be there for the register field coverage to work in the same manner as the top level register block covergroup which did not require any manual call to its sample method. Thanks Graeme Quote Link to comment Share on other sites More sharing options...
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.