You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @amykyta3
I propose to extend this tool to generate a covergroup in uvm_reg_block that will cover accesses (read/write) to registers defined within the register block. The coverage model type would be UVM_CVR_ADDR_MAP. Here is an example:
class my_regmodel extends uvm_reg_block;
covergroup addr_cg with function sample(uvm_reg_addr_t offset, bit is_read);
offset_cp: coverpoint offset {
bins r_config = {0};
bins r_status = {4};
bins r_addr = {8};
...
}
dir_cp: coverpoint is_read {
bins read = {1};
bins write = {0};
cross offset_cp, dir_cp;
endgroup: my_regmodel
virtual function void sample(uvm_reg_addr_t offset, bit is_read, uvm_reg_map map);
if (get_coverage(UVM_CVR_ADDR_MAP)) begin
addr_cg.sample(offset, is_read);
end
endfunction: sample
Adding a switch (e.g. --coverage) to allow the covergroup to be generated would be handy.
The text was updated successfully, but these errors were encountered:
Hi @amykyta3
I propose to extend this tool to generate a covergroup in
uvm_reg_block
that will cover accesses (read/write) to registers defined within the register block. The coverage model type would be UVM_CVR_ADDR_MAP. Here is an example:Adding a switch (e.g.
--coverage
) to allow the covergroup to be generated would be handy.The text was updated successfully, but these errors were encountered: