返回介绍

20.4.1 Specifying bins for transitions

发布于 2020-09-09 22:55:56 字数 4280 浏览 924 评论 0 收藏 0

The syntax for specifying transition bins accepts a subset of the sequence syntax described in Section 17:

bins_or_options ::=   // from Annex A.2.11
    ...
  | [wildcard] bins_keyword bin_identifier[[[expression]]]={range_list} [iff(expression)]
  | [wildcard] bins_keyword bin_identifier[[]] = trans_list [iff(expression)]
    ...
bins_keyword::= bins | illegal_bins | ignore_bins

range_list ::= value_range {, value_range}

trans_list ::= (trans_set) {,(trans_set)}

trans_set ::= trans_range_list => trans_range_list {=> trans_range_list}

trans_range_list ::=
    trans_item
  | trans_item[[*repeat_range]]
  | trans_item[[–>repeat_range]]
  | trans_item[[=repeat_range]]

trans_item ::= range_list

repeat_range ::=
    expression
  | expression : expression

Syntax 20-3—Transition bin syntax (excerpt from Annex A)

A trans_list specifies one or more sets of ordered value transitions of the coverage point. A single value transition is thus specified as:

value1 => value2

It represents the value of coverage point at two successive sample points, that is, value1 followed by value2 at the next sample point.

A sequence of transitions is represented as:

value1 => value3 => value4 => value5

In this case, value1 is followed by value3, followed by value4 and followed by value5. A sequence can be of any arbitrary length.

A set of transitions can be specified as:

range_list1 => range_list2

This specification expands to transitions between each value in range_list1 and each value in range_list2. For example,

1,5 => 6, 7

specifies the following four transitions:

1=>6, 1=>7, 5=>6, 5=>7

Consecutive repetitions of transitions are specified using (see Annex H):

trans_item [* repeat_range ]

Here, trans_item is repeated for repeat_range times. For example,

3 [* 5]

is the same as

3=>3=>3=>3=>3

An example of a range of repetition is:

3 [* 3:5]

is the same as

3=>3=>3, 3=>3=>3=>3, 3=>3=>3=>3=>3

The repetition with non-consecutive occurrence of a value is specified using: trans_item [-> repeat_range ]. Here, the occurrence of a value is specified with an arbitrary number of sample points where the value does not occur. For example,

3 [-> 3]

is the same as

...3=>...=>3...=>3

where the dots (...) represent any transition that does not contain the value 3.

Non-consecutive repetition is where a sequence of transitions continues until the next transition. For example,

3 [= 2]

is same as the transitions below excluding the last transition.

3=>...=>3...=>3

A trans_list specifies one or more sets of ordered value transitions of the coverage point. If the sequence of value transitions of the coverage point matches any complete sequence in the trans_list, the coverage count of the corresponding bin is incremented. For example:

bit [4:1] v_a;
covergroup cg @(posedge clk);
    coverpoint v_a
    {
        bins sa = (4 => 5 => 6), ([7:9],10=>11,12);
        bins sb[] = (4=> 5 => 6), ([7:9],10=>11,12);
        bins allother = default sequence ;
    }
endgroup

The example above defines two transition coverage bins. The first bins construct associates the following sequences with bin sa: 4=>5=>6, or 7=>11, 8=>11, 9=>11, 10=>11, 7=>12, 8=>12, 9=>12, 10=>12. The second bins construct associates an individual bin with each of the above sequences: sb[4=>5=>6], ..., sb[10=>12]. The bin allother tracks all other transitions that are not covered by the other bins: sa and sb.

Transitions that specify sequences of unbounded or undetermined varying length cannot be used with the multiple bins construct (the [] notation). For example, the length of the transition: 3[=2], which uses non-consecutive repetition, is unbounded and can vary during simulation. An attempt to specify multiple bins with such sequences shall result in an error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文