mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-24 05:47:36 -04:00
Collect transaction functional coverage for ICache-Mem iface
This single covergroup was extracted from the icache documentation (icache.rst).
This commit is contained in:
parent
a581981271
commit
13135e2e70
2 changed files with 7 additions and 2 deletions
|
@ -10,11 +10,15 @@ class ibex_icache_mem_agent_cov
|
|||
// the base class provides the following handles for use:
|
||||
// ibex_icache_mem_agent_cfg: cfg
|
||||
|
||||
// covergroups
|
||||
// Spot the gnt and pmp_err signal being high at the same time (the error should take precedence).
|
||||
// This is sampled when gnt is high and tracks whether pmp_err is high too.
|
||||
covergroup gnt_err_cg with function sample(bit pmp_err);
|
||||
coverpoint pmp_err;
|
||||
endgroup : gnt_err_cg
|
||||
|
||||
function new(string name, uvm_component parent);
|
||||
super.new(name, parent);
|
||||
// instantiate all covergroups here
|
||||
gnt_err_cg = new();
|
||||
endfunction : new
|
||||
|
||||
endclass
|
||||
|
|
|
@ -84,6 +84,7 @@ class ibex_icache_mem_monitor
|
|||
if (cfg.vif.monitor_cb.req && cfg.vif.monitor_cb.gnt && !cfg.vif.monitor_cb.pmp_err) begin
|
||||
new_grant(cfg.vif.monitor_cb.addr);
|
||||
end
|
||||
if (cfg.en_cov && cfg.vif.monitor_cb.gnt) cov.gnt_err_cg.sample(cfg.vif.monitor_cb.pmp_err);
|
||||
|
||||
@(cfg.vif.monitor_cb);
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue