avl._core.covergroup module
- class avl._core.covergroup.Covergroup(*args: Any, **kwargs: Any)[source]
- __init__(name: str, parent: Component = None) None[source]
Covergroup class for managing coverpoints and covercrosses.
- Parameters:
name (str) – Name of the covergroup
parent (Component, optional) – Parent component
- set_comment(comment: str) None[source]
Set a comment for the covergroup.
- Parameters:
comment (str) – Comment for the covergroup
- set_weight(weight: float) None[source]
Set the weight for the covergroup.
- Parameters:
weight (float) – Weight of the covergroup
- add_coverpoint(name: str, var: Callable[[...], Any]) Coverpoint[source]
Add a coverpoint to the covergroup.
- Parameters:
name (str) – Name of the coverpoint
var (Callable[Any]) – Function that returns the value to be covered
- Raises:
ValueError – If the coverpoint already exists
- Returns:
The created coverpoint
- Return type:
- add_covercross(name: str, *args: list[Coverpoint]) Covercross[source]
Add a covercross to the covergroup.
- Parameters:
name (str) – Name of the covercross
args (list[Coverpoint]) – Coverpoints to be crossed
- Raises:
ValueError – If the covercross already exists
- Returns:
The created covercross
- Return type:
- get_bins() tuple[int, int][source]
Get the total and covered bins for the covergroup
- Returns:
A tuple (total, covered)
- Return type:
tuple[int, int]