#
Covergroup is like a user defined type that encapsulates and specifies the coverage. It can be defined in a package, module, program, interface or class Once defined multiple instances can be created using new Parameters to new() enable customization of different instances. A covergroup sepcification can include the following components
- A clocking event that synchronizes the sampling of coverage points
- A set of coverage points
- Cross coverage between coverage points
- Optional formal arguments
- Coverage options
– Ref argument enables different variables to be sampled by different instances of covergroup
Syntax :
1.
covergroup cg;
2.
// Covearge points
3.
endgroup : cg
4.
5.
// create instance
6.
cg cg_inst =
new
;