assertions 使用问答

本文介绍了如何在Verilog测试环境中使用assertions以及实现功能性覆盖率。包括如何防止simulation结束时未完成的assertion消息打印,对assertion进行分类,使用cover group覆盖参数,解决编译错误,并在VerilogTB中定义功能性覆盖率的步骤。
摘要由CSDN通过智能技术生成

1.  如何防止在simulation结束仍然还未结束的assertion打印出消息?

VCS supports disabling the SVA unfinished message reporting  at the end of simulation, please do as follows:

1)      Add VCS compile option  “vcs  -assert enable_diag”, which means, enable runtime SVA options

2)      Add VCS runtime option “simv -assert nopostproc” , which means, disable VCS from reporting messages about unfinished assertions at the end of simulation.

 

Then the unfinished message will not be printed on the screen.


2. 如何对assertion进行分类?

DVE supports assertion category, you can use this feature as following:

 

Define assertions with category attribute, for example:

    property hsync;

     @(posedge dClk) (dReset_n) throughout

     $rose(dHsync)|-> ##HPULSE $fell(dHsync);

    endproperty

 

   (* category=1 *) HsyncWidth: assert property ( hsync);

 

    property vsync;

     @(posedge dClk) (dReset_n) throughout

     $rose(dVsync)|-> ##VPULSE $fell(dVsync);

    endproperty

 

     (* category=2 *)  VsyncWidth: assert property ( vsync);


3. cover group 在类中可以有多个instance吗? cover group 可以带参数吗?

VCS supports coverage groups with arguments, for example:

 

class Scoreboard extends vmm_xactor;

 

covergroup sb_arg_cov (int low, int high);

   covp_blue:coverpoint obj.blu {

     bins covb_blue0 ={[low:high]};

     bins covb_blue1 ={[low+100:high+100]};

 

  }

endgroup:sb_arg_cov

 

 

  function new(string instance = "class",

           Configure c

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值