avl._core.coverbin module

class avl._core.coverbin.Coverbin(*args: Any, **kwargs: Any)[source]
__init__(name: str, parent: Any, *args: Any, **kwargs: Any) None[source]

Initialize an instance of the Coverbin class.

Parameters:
  • name (str) – The name of the AVL cover bin.

  • parent (object) – The parent component of the AVL cover bin.

  • args (int, float, Var, range, callable) – Additional arguments that can be values (int, float, Var), ranges, or lambda functions.

  • kwargs (dict) – Additional keyword arguments for configuration.

Raises:

ValueError – If an unknown bin condition is provided in args.

check(var: Any) bool[source]

Check if the given variable matches any of the bin’s conditions.

Parameters:

var (Any) – The variable to be checked.

Returns:

True if the variable matches any condition, False otherwise.

Return type:

bool

sample(var: Any) None[source]

Check if the given variable matches any of the bin’s conditions and increment the count.

Parameters:

var (Any) – The variable to be checked.

get_mean() float | None[source]

Return the mean value.

Returns:

The mean value.

Return type:

float

get_variance() float | None[source]

Return the variance value.

Returns:

The variance value.

Return type:

float

get_stddev() float | None[source]

Return the standard deviation value.

Returns:

The standard deviation value.

Return type:

float

report() DataFrame[source]

Generate a report of the coverage data.

Returns:

A DataFrame containing the coverage data. The structure of the DataFrame depends on the value of the full parameter: - If full is True, the DataFrame contains columns: ‘covergroup’, ‘coverpoint’, ‘at_least’, ‘count’. - If full is False, the DataFrame contains columns: ‘covergroup’, ‘coverpoint’, ‘coverage’.

Return type:

pandas.DataFrame