• System Verilog 片断


     

    Q:如何制作multi-bit variable 的 toggle coverage group?

    A:Systemverilog for Verification P394. 利用 option.per_instance = 1;设置covergroup.

    //in covergroup declaration
    covergroup group_name with function sample(bit sample_bit)
       coverpoint_name: coverpoint sample_bit;
       option.per_instance = 1;
    endgroup

    Q:forever begin块中的 return and continue会有效果吗?

    A:

    Q:disable fork 的作用域

    A:Kill calling thread's all fork and descendents in fork. Calling thread is the one where "disable fork" exsists.

    杀死所有在calling thread中已经被创建的thread。

    fork
      thread 1;
      thread 2;
      disable fork;
      // calling thread is this line itself, so disable fork will kill it own rather then thread1 and thread2.
    join_none

    Q:disable label的作用域

    A:他的作用有点“stastic”的感觉,will kill all process named with the corresponding lable. 所以慎用!更推荐使用diable fork. 这里的label带有hierarchy的概念,实际上disable的是带有类似*.test.generator.label的thread,不同路径下面的同样的label并不会被disable。

    Q:SV 中数据的强制类型转换的方法?

    A:type_name'(X);

    P: The type of object generated by new(), is decided by type of handle before new().

    P: 特别注意符号位的扩展问题.

    Q: disable fork和disable label的区别?

    A: disable fork会终结掉calling thread(调用的disable fork的begin_end)中已经被创建的thread。disable label会终结掉同一label(包含了hierarchy信息,即为xxx.driver.task1.label)下的thread。

    P: use wildcard。 *:anything ; ?:one character

  • 相关阅读:
    hdu5616 暴力枚举
    codeforce 35C fire again
    常用代码及经验总结(不断更新)
    codeforce AIM tech Round 4 div 2 B rectangles
    codeforce diversity
    codeforce 589B枚举
    codeforces 1A
    自学Java测试代码
    自学Jav测试代码三 Math类 & Date & GregorianCalendar类
    数学类与图形类
  • 原文地址:https://www.cnblogs.com/sunmaoduo/p/4612343.html
Copyright © 2020-2023  润新知