avl._core.covergroup module

class avl._core.covergroup.Covergroup(*args: Any, **kwargs: Any)[source]
__init__(name: str, parent: Component) 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:

Coverpoint

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:

Covercross

sample() None[source]

Sample all coverpoints in the covergroup

clear() None[source]

Clear all coverpoints in the covergroup

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]

get_coverage() float[source]

Get the coverage percentage for the covergroup

Returns:

Coverage percentage

Return type:

float

report(full: bool = False) DataFrame[source]

Generate a report for the covergroup

Parameters:

full – If True, generate a detailed report

Returns:

A pandas DataFrame with the report