⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 00248.html

📁 这是一本关于verilog编程语言的教程,对学习verilog语言有帮助
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>20.4.1 Specifying bins for transitions</title>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('systemverilog31a.html', 'topic', '00248.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->
<div class="Element801" id="popup00426">
<div class="Element800">
<div class="Element14">
链接</div>
<div class="Element11">
<div class="Element10">
<a href="00247.html" target="topic">20.4 定义覆盖点</a></div>
</div>
</div>
</div>

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="33%">
<div class="Element1">
<a href="#" onmousedown="showPopup(this, 'popup00426');"><img src="seealsolink.png" border="0" alt="" title=""></a> SystemVerilog 3.1a语言参考手册</div>
</td><td width="34%">
<div class="Element2">
</div>
</td><td width="33%">
<div class="Element90">
<a href="00247.html" target="topic"><img src="btn_prev_lightblue.gif" border="0" alt="Previous" title="Previous" onmouseover="switchImage(this, 'btn_prev_lightblue_hover.gif');" onmouseout="switchImage(this, 'btn_prev_lightblue.gif');"></a><a href="00247.html" target="topic"><img src="btn_up_lightblue.gif" border="0" alt="Up" title="Up" onmouseover="switchImage(this, 'btn_up_lightblue_hover.gif');" onmouseout="switchImage(this, 'btn_up_lightblue.gif');"></a><a href="00249.html" target="topic"><img src="btn_next_lightblue.gif" border="0" alt="Next" title="Next" onmouseover="switchImage(this, 'btn_next_lightblue_hover.gif');" onmouseout="switchImage(this, 'btn_next_lightblue.gif');"></a></div>
</td></tr></table><div class="Element5">
20.4.1 Specifying bins for transitions</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<div class="Element58">
<a name="描述"></a><div class="Element11">
<div class="Element10">
<p class="Element10">
The syntax for specifying transition bins accepts a subset of the sequence syntax described in Section 17: </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00875');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00875"><pre class="Element12">bins_or_options ::=   // from Annex A.2.11
    ...
  | [<strong><span style="color: #FF0000">wildcard</span></strong>] bins_keyword bin_identifier[<strong><span style="color: #FF0000">[</span></strong>[expression]<strong><span style="color: #FF0000">]</span></strong>]<strong><span style="color: #FF0000">=</span></strong>{range_list} [<strong><span style="color: #FF0000">iff(</span></strong>expression<strong><span style="color: #FF0000">)</span></strong>]
  | [<strong><span style="color: #FF0000">wildcard</span></strong>] bins_keyword bin_identifier[<strong><span style="color: #FF0000">[]</span></strong>] = trans_list [<strong><span style="color: #FF0000">iff(</span></strong>expression<strong><span style="color: #FF0000">)</span></strong>]
    ...
bins_keyword::= <strong><span style="color: #FF0000">bins</span></strong> | <strong><span style="color: #FF0000">illegal_bins</span></strong> | <strong><span style="color: #FF0000">ignore_bins</span></strong>

range_list ::= value_range {<strong><span style="color: #FF0000">,</span></strong> value_range}

trans_list ::= <strong><span style="color: #FF0000">(</span></strong>trans_set<strong><span style="color: #FF0000">)</span></strong> {<strong><span style="color: #FF0000">,(</span></strong>trans_set<strong><span style="color: #FF0000">)</span></strong>}

trans_set ::= trans_range_list <strong><span style="color: #FF0000">=&gt;</span></strong> trans_range_list {<strong><span style="color: #FF0000">=&gt;</span></strong> trans_range_list}

trans_range_list ::=
    trans_item
  | trans_item[<strong><span style="color: #FF0000">[*</span></strong>repeat_range<strong><span style="color: #FF0000">]</span></strong>]
  | trans_item[<strong><span style="color: #FF0000">[–&gt;</span></strong>repeat_range<strong><span style="color: #FF0000">]</span></strong>]
  | trans_item[<strong><span style="color: #FF0000">[=</span></strong>repeat_range<strong><span style="color: #FF0000">]</span></strong>]

trans_item ::= range_list

repeat_range ::=
    expression
  | expression <strong><span style="color: #FF0000">:</span></strong> expression</pre></div></div>
<p class="Element10" style="text-align: center">
<strong>Syntax 20-3—Transition bin syntax (excerpt from Annex A)</strong></p><p class="Element10">
&nbsp;</p>
<p class="Element10">
A trans_list specifies one or more sets of ordered value transitions of the coverage point. A single value transition is thus specified as: </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00876');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00876"><pre class="Element12">value1 =&gt; value2</pre></div></div>
<p class="Element10">
It represents the value of coverage point at two successive sample points, that is, value1 followed by value2 at the next sample point.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
A sequence of transitions is represented as: </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00877');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00877"><pre class="Element12">value1 =&gt; value3 =&gt; value4 =&gt; value5</pre></div></div>
<p class="Element10">
In this case, value1 is followed by value3, followed by value4 and followed by value5. A sequence can be of any arbitrary length.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
A set of transitions can be specified as: </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00878');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00878"><pre class="Element12">range_list1 =&gt; range_list2</pre></div></div>
<p class="Element10">
This specification expands to transitions between each value in range_list1 and each value in range_list2. For example, </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00879');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00879"><pre class="Element12">1,5 =&gt; 6, 7</pre></div></div>
<p class="Element10">
specifies the following four transitions: </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00880');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00880"><pre class="Element12">1=&gt;6, 1=&gt;7, 5=&gt;6, 5=&gt;7</pre></div></div>
<p class="Element10">
Consecutive repetitions of transitions are specified using (see Annex H): </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00881');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00881"><pre class="Element12">trans_item [* repeat_range ]</pre></div></div>
<p class="Element10">
Here, trans_item is repeated for repeat_range times. For example, </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00882');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00882"><pre class="Element12">3 [* 5]</pre></div></div>
<p class="Element10">
is the same as </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00883');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00883"><pre class="Element12">3=&gt;3=&gt;3=&gt;3=&gt;3</pre></div></div>
<p class="Element10">
An example of a range of repetition is: </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00884');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00884"><pre class="Element12">3 [* 3:5]</pre></div></div>
<p class="Element10">
is the same as </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00885');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00885"><pre class="Element12">3=&gt;3=&gt;3, 3=&gt;3=&gt;3=&gt;3, 3=&gt;3=&gt;3=&gt;3=&gt;3</pre></div></div>
<p class="Element10">
The repetition with non-consecutive occurrence of a value is specified using: trans_item [-&gt; 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, </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00886');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00886"><pre class="Element12">3 [-&gt; 3]</pre></div></div>
<p class="Element10">
is the same as </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00887');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00887"><pre class="Element12">...3=&gt;...=&gt;3...=&gt;3</pre></div></div>
<p class="Element10">
where the dots (...) represent any transition that does not contain the value 3.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
Non-consecutive repetition is where a sequence of transitions continues until the next transition. For example, </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00888');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00888"><pre class="Element12">3 [= 2]</pre></div></div>
<p class="Element10">
is same as the transitions below excluding the last transition. </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00889');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00889"><pre class="Element12">3=&gt;...=&gt;3...=&gt;3</pre></div></div>
<p class="Element10">
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: </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code00890');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code00890"><pre class="Element12">bit [4:1] v_a;
covergroup cg @(posedge clk);
    coverpoint v_a
    {
        bins sa = (4 =&gt; 5 =&gt; 6), ([7:9],10=&gt;11,12);
        bins sb[] = (4=&gt; 5 =&gt; 6), ([7:9],10=&gt;11,12);
        bins allother = default sequence ;
    }
endgroup</pre></div></div>
<p class="Element10">
The example above defines two transition coverage bins. The first bins construct associates the following sequences with bin sa: 4=&gt;5=&gt;6, or 7=&gt;11, 8=&gt;11, 9=&gt;11, 10=&gt;11, 7=&gt;12, 8=&gt;12, 9=&gt;12, 10=&gt;12. The second bins construct associates an individual bin with each of the above sequences: sb[4=&gt;5=&gt;6], ..., sb[10=&gt;12]. The bin allother tracks all other transitions that are not covered by the other bins: sa and sb.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
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.</p></div>
</div>
<a name="Group"></a><div class="Element14">
<a onclick="toggleVisibilityStored('Group');" class="a_Element14"><img src="sectionminus.png" border="0" alt="" title="" id="imgGroup">Group</a></div>
<div id="divGroup">
<div class="Element11">
<div class="Element10">
<p class="Element10">
<a href="00247.html" target="topic">20.4 定义覆盖点</a></p></div>
</div>
</div>
<a name="Links"></a><div class="Element14">
<a onclick="toggleVisibilityStored('链接');" class="a_Element14"><img src="sectionminus.png" border="0" alt="" title="" id="img链接">链接</a></div>
<div id="div链接">
<div class="Element11">
<div class="Element10">
<a href="00247.html" target="topic">20.4 定义覆盖点</a></div>
</div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<hr width="98%" align="center" size="1" color="#CCCCCC" />
<table align="center" cellpadding="0" cellspacing="0" border="0">
	<tbody>
		<tr height="10">
			<td></td>
		</tr>
		<tr align="center">
			<td>
<script type="text/javascript"><!--
google_ad_client = "pub-5266859600380184";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_page_url = document.location;
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
			</td>
		</tr>
		<tr height="15">
			<td></td>
		</tr>
		<tr align="center">
			<td>
				<font size=2>除非特别声明,原文版权归作者所有,如有转摘请注明原作者以及译者(<a href="http://www.fpgatech.net/"  target="_blank">FPGA技术网</a>)信息。<br />
如果您对本主题有何建议或意见,请登陆<a href="http://www.fpgatech.net/forum/forumdisplay.php?fid=18" target="_blank">FPGA开发者家园</a>提交,您的参与是我们前进的动力。</font>
<script language="javascript" type="text/javascript" src="http://js.users.51.la/195685.js"></script>
<noscript><a href="http://www.51.la/?195685" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/195685.asp" style="border:none" /></a></noscript>
			</td>
		</tr>
	</tbody>
</table>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -