[SV] ignore_bins 用法

1. 和bins overlap  

coverpoint p {
   bins exp[] = {[1:100]};
   ignore_bins ign = {23,45,67};
}

2. 使用with (和array 相关task类似)

covergroup cover_me;
  x_cp : coverpoint x;
  y_cp : coverpoint y;

  x_y_cross: cross x_cp, y_cp {
    ignore_bins ignore_x_values_higher_than_y = x_y_cross with (x_cp > y_cp);
  }
endgroup

  

a: coverpoint x
{
bins mod3[] = {[0:255]} with (item % 3 == 0);
}

//This bin definition selects all values from 0 to 255 that are evenly divisible by 3.
coverpoint b
{
bins func[] = b with (myfunc(item));
}
//use of the coverpoint name b to denote that the with_covergroup_expression will be applied to all
values of the coverpoint

if a coverpoint bin does not get sampled because of an iff guard, the cross bin is guarded as well.

covergroup cg @(LdReqVld_d1);
    LdReq_cp : coverpoint LdReqVld_d1 iff (!LdReqCancel);
    LdOp_cp  : coverpoint LdReqOp_d1  iff (LdReqVld_d1 && !LdReqCancel);
    LdCancel_cp : coverpoint LdReqCancel;
    CrossCancel : cross LdOp_cp, LdCancel_cp;

seeing the CrossCancel is never hitting any bin with LdReqCancel == 1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值