Jump to content

graeme_jessiman

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

340 profile views

graeme_jessiman's Achievements

Member

Member (1/2)

0

Reputation

  1. Finally (with a point in the right direction from Chris Spear) I found a solution to this that avoids having to manually call sample_values from my sequence, which I was never happy with. In the register block, all of the your register definitions are extended from uvm_reg. I manually added a new class to the register package imp_cvr_reg (for implicit coverage register), which extends from uvm_reg and defined a sample method which calls sample_values class imp_cvr_reg extends uvm_reg; function new(string name="", int unsigned n_bits, int has_cvoerage); super.new, n_bits, has_coverage); endfunction virtual function sample(uvm_reg_data_t data, uvm_reg_data_t byte_en, bit is_read, uvm_reg_map map); sample_values();. endfunction endclass : imp_cvr_reg Then I changed all of my registers in my register block to extend from imp_cvr_reg Then after a recompile, all of my register field coverage worked without the need to manually sample in my sequence Even works when calling the built-in register sequences BR Graeme
  2. I am already turning on coverage sampling by using the following in my test base class: // Register model // Enable all types of coverage available in the register model uvm_reg::include_coverage("*", UVM_CVR_ALL); My understanding is that by specifying UVM_CVR_ALL, this should enable all field coverage which uses : UVM_CVR_FIELD_VALS This seems to be true as the register field covergroups are being created, The register block covergroup is also created and sampling is working fine at the top level...just not for the individual register covergroups.
  3. 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
×
×
  • Create New...