API Reference
Domain-Specific Language API
Data and Constraints
- class vsc.types.type_base(width, is_signed, i=0)[source]
Base type for all primitive-type fields that participate in constraints
- property rand_mode
- property val
Data and Constraints
- class vsc.coverage.bin(*args)[source]
Specifies a single coverage bin
- build_cov_model(parent, name, exclude_bins: RangelistModel)[source]
- class vsc.coverage.bin_array(nbins, *args)[source]
Specifies an array of bins
args may be one of two formats - Single list of tuples or lists of values or ranges (eg [[1], [2,4], [8]]) - Arguments comprising values and ranges (eg 1, [2,4], 8)
- build_cov_model(parent, name, exclude_bins: RangelistModel)[source]
- class vsc.coverage.wildcard_bin_array(nbins, *args)[source]
Specifies an array of bins using wildcard specifications
args may be one of two formats - Single list of wildcard strings (eg “0x82x”) - Single list of value/mask tuples (eg [(0x820,0xFF0)]) - Single string - Single tuple
Model API
Data and constraints
- class vsc.model.field_composite_model.FieldCompositeModel(name, is_rand=False, rand_if=None)[source]
-
- property is_declared_rand
- pre_randomize(visited)[source]
Called during the randomization process to propagate
pre_randomize
event
- post_randomize(visited)[source]
Called during the randomization process to propagate
post_randomize
event
- class vsc.model.constraint_block_model.ConstraintBlockModel(name, constraints=None)[source]
Information about a top-level constraint block described by the user
- clone(deep=False) ConstraintModel [source]
- class vsc.model.constraint_expr_model.ConstraintExprModel(e)[source]
-
- clone(deep=False) ConstraintModel [source]
- class vsc.model.constraint_if_else_model.ConstraintIfElseModel(cond: ExprModel, true_c: ConstraintScopeModel | None = None, false_c: ConstraintScopeModel | None = None)[source]
-
- clone(deep=False) ConstraintModel [source]
- class vsc.model.constraint_implies_model.ConstraintImpliesModel(cond, constraints=None)[source]
-
- clone(deep=False) ConstraintModel [source]
- class vsc.model.constraint_model.ConstraintModel[source]
Base class for all constraint models
- clone(deep=False) ConstraintModel [source]
- class vsc.model.constraint_scope_model.ConstraintScopeModel(constraints=None)[source]
- addConstraint(c) ConstraintModel [source]
- clone(deep=False) ConstraintModel [source]
Coverage
- class vsc.model.covergroup_model.CovergroupModel(name: str, options=None)[source]
-
- equals(oth: CovergroupModel) bool [source]
- clone() CovergroupModel [source]
- class vsc.model.coverpoint_bin_array_model.CoverpointBinArrayModel(name, low, high)[source]
- finalize(bin_idx_base: int) int [source]
Accepts the bin index where this bin starts ; returns number of bins
- clone() CoverpointBinArrayModel [source]
- class vsc.model.coverpoint_bin_collection_model.CoverpointBinCollectionModel(name)[source]
- DEBUG_EN = False
- finalize(bin_idx_base: int) int [source]
Accepts the bin index where this bin starts ; returns number of bins
- add_bin(bin_m) CoverpointBinModelBase [source]
- static mk_collection(name: str, rangelist: RangelistModel, n_bins) CoverpointBinCollectionModel [source]
Creates a bin collection by partitioning a rangelist
- class vsc.model.coverpoint_bin_enum_model.CoverpointBinEnumModel(name, val)[source]
- finalize(bin_idx_base: int) int [source]
Accepts the bin index where this bin starts ; returns number of bins
- clone() CoverpointBinEnumModel [source]
- class vsc.model.coverpoint_bin_model_base.CoverpointBinModelBase(name)[source]
- class vsc.model.coverpoint_bin_single_bag_model.CoverpointBinSingleBagModel(name, binspec: RangelistModel | None = None)[source]
Coverpoint single bin that is triggered on a set of values or value ranges
- finalize(bin_idx_base: int) int [source]
Accepts the bin index where this bin starts ; returns number of bins
- clone() CoverpointBinSingleBagModel [source]
- class vsc.model.coverpoint_bin_single_range_model.CoverpointBinSingleRangeModel(name, target_val_low: int, target_val_high: int)[source]
- class vsc.model.coverpoint_bin_single_val_model.CoverpointBinSingleValModel(name, target_val: int)[source]
- finalize(bin_idx_base: int) int [source]
Accepts the bin index where this bin starts ; returns number of bins
- clone() CoverpointBinSingleValModel [source]
- class vsc.model.coverpoint_cross_model.CoverpointCrossModel(name, options, iff=None)[source]
-
- equals(oth: CoverpointCrossModel) bool [source]
- clone(coverpoint_m) CoverpointCrossModel [source]
- class vsc.model.coverpoint_model.CoverpointModel(target: ExprModel, name: str, options, iff: ExprModel | None = None)[source]
-
- get_bin_range(bin_idx) RangelistModel [source]
- coverage_ev(bin_idx, bin_type)[source]
Called by a bin to signal that an uncovered bin has been covered
- equals(oth: CoverpointModel) bool [source]
- clone() CoverpointModel [source]