blob: 18cd77c5b7170e69973b133e4e4f5579b5e2f930 [file] [log] [blame]
lowRISC Contributors802543a2019-08-31 12:12:56 +01001// Copyright lowRISC contributors.
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
Srikrishna Iyer607c4042019-10-23 17:48:05 -07005/**
6 * Covergoups that are dependent on run-time parameters that may be available
7 * only in build_phase can be defined here
8 * Covergroups may also be wrapped inside helper classes if needed.
9 */
10
lowRISC Contributors802543a2019-08-31 12:12:56 +010011% if is_cip:
12class ${name}_env_cov extends cip_base_env_cov #(.CFG_T(${name}_env_cfg));
13% else:
14class ${name}_env_cov extends dv_base_env_cov #(.CFG_T(${name}_env_cfg));
15% endif
16 `uvm_component_utils(${name}_env_cov)
17
18 // the base class provides the following handles for use:
19 // ${name}_env_cfg: cfg
20
21 // covergroups
Srikrishna Iyer607c4042019-10-23 17:48:05 -070022 // [add covergroups here]
lowRISC Contributors802543a2019-08-31 12:12:56 +010023
24 function new(string name, uvm_component parent);
25 super.new(name, parent);
Srikrishna Iyer607c4042019-10-23 17:48:05 -070026 // [instantiate covergroups here]
lowRISC Contributors802543a2019-08-31 12:12:56 +010027 endfunction : new
28
Srikrishna Iyer607c4042019-10-23 17:48:05 -070029 virtual function void build_phase(uvm_phase phase);
30 super.build_phase(phase);
31 // [or instantiate covergroups here]
32% if is_cip:
33 // Please instantiate sticky_intr_cov array of objects for all interrupts that are sticky
34 // See cip_base_env_cov for details
35% endif
36 endfunction
37
lowRISC Contributors802543a2019-08-31 12:12:56 +010038endclass