📄 00350.html
字号:
bad args </div></td><td class="Element67" valign="top" width="17%">
<div class="Element68">
no coverage </div></td><td class="Element67" valign="top" width="22%">
<div class="Element68">
partial coverage </div></td></tr></table></div></div>
<p class="Element10">
</p>
<p class="Element10">
Starting, stopping, or resetting coverage multiple times in succession for the same instance(s) has no further effect if coverage has already been started, stopped, or reset for that/those instance(s). </p>
<p class="Element10">
</p>
<p class="Element10">
The hierarchy(ies) being controlled or queried are specified as follows. </p>
<p class="Element10">
‘SV_MODULE_COV, "unique module def name" </p>
<p class="Element10">
provides coverage of all instances of the given module (the unique module name is a string), excluding any child instances in the instances of the given module. The module definition name can use special notation to describe nested module definitions. </p>
<p class="Element10">
‘SV_COV_HIER, "module name" </p>
<p class="Element10">
provides coverage of all instances of the given module, including all the hierarchy below. </p>
<p class="Element10">
‘SV_MODULE_COV, instance_name </p>
<p class="Element10">
provides coverage of the one named instance. The instance is specified as a normal Verilog hierarchical path. </p>
<p class="Element10">
‘SV_COV_HIER, instance_name </p>
<p class="Element10">
provides coverage of the named instance, plus all the hierarchy below it. </p>
<p class="Element10">
</p>
<p class="Element10">
All the permutations are summarized in Table 29-2. </p><p class="Element10" style="text-align: center">
<strong>Table 29-2: Instance coverage permutations</strong></p><div class="Element63">
<div class="TableDiv">
<table cellspacing="0" class="Table1">
<tr>
<td class="Element65" valign="top" width="9%">
<div class="Element66">
Control/query </div></td><td class="Element65" valign="top" width="54%">
<div class="Element66">
“Definition name” </div></td><td class="Element65" valign="top" width="37%">
<div class="Element66">
instance.name </div></td></tr><tr>
<td class="Element67" valign="top" width="9%">
<div class="Element68">
‘SV_COV_MODULE </div></td><td class="Element67" valign="top" width="54%">
<div class="Element68">
The sum of coverage for all instances of the named module, excluding any hierarchy below those instances. </div></td><td class="Element67" valign="top" width="37%">
<div class="Element68">
Coverage for just the named instance, excluding any hierarchy in instances below that instance. </div></td></tr><tr>
<td class="Element67" valign="top" width="9%">
<div class="Element68">
‘SV_COV_HIER </div></td><td class="Element67" valign="top" width="54%">
<div class="Element68">
The sum of coverage for all instances of the named module, including all coverage for all hierarchy below those instances. </div></td><td class="Element67" valign="top" width="37%">
<div class="Element68">
Coverage for the named instance and any hierarchy below it. </div></td></tr></table></div></div>
<p class="Element10">
NOTE—Definition names are represented as strings, whereas instance names are referenced by hierarchical paths. A hierarchical path need not include any . if the path refers to an instance in the current context (i.e., normal Verilog hierarchical path rules apply). </p><p class="Element10" style="text-align: center">
<img src="example_29_1.png" border="0" alt="" title=""> </p>
<p class="Element10" style="text-align: center">
<strong>Example 29-1 — Hierarchical instance example</strong></p><p class="Element10">
If coverage is enabled on all instances shown in Example 29-1 —, then: </p>
<p class="Element10">
$coverage_control(‘SV_COV_CHECK, ‘SV_COV_TOGGLE, ‘SV_COV_HIER, $root) </p>
<p class="Element10">
checks all instances to verify they have coverage and, in this case, returns ‘SV_COV_OK. </p>
<p class="Element10">
$coverage_control(‘SV_COV_RESET, ‘SV_COV_TOGGLE, ‘SV_COV_MODULE, "DUT") </p>
<p class="Element10">
resets coverage collection on both instances of the DUT, specifically, $root.tb.unit1 and </p>
<p class="Element10">
$root.tb.unit2, but leaves coverage unaffected in all other instances. </p>
<p class="Element10">
$coverage_control(‘SV_COV_RESET, ‘SV_COV_TOGGLE, ‘SV_COV_MODULE, </p>
<p class="Element10">
$root.tb.unit1) </p>
<p class="Element10">
resets coverage of only the instance $root.tb.unit1, leaving all other instances unaffected. </p>
<p class="Element10">
$coverage_control(‘SV_COV_STOP, ‘SV_COV_TOGGLE, ‘SV_COV_HIER, </p>
<p class="Element10">
$root.tb.unit1) </p>
<p class="Element10">
resets coverage of the instance $root.tb.unit1 and also reset coverage for all instances below it, specifically </p>
<p class="Element10">
$root.tb.unit1.comp and $root.tb.unit1.ctrl. </p>
<p class="Element10">
$coverage_control(‘SV_COV_START, ‘SV_COV_TOGGLE, ‘SV_COV_HIER, "DUT") </p>
<p class="Element10">
starts coverage on all instances of the module DUT and of all hierarchy(ies) below those instances. In this design, coverage is started for the instances $root.tb.unit1, $root.tb.unit1.comp, $root.tb.unit1.ctrl, $root.tb.unit2, $root.tb.unit2.comp, and $root.tb.unit2.ctrl.</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="00349.html" target="topic">29.2.2 Built-in coverage access system functions</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="00349.html" target="topic">29.2.2 Built-in coverage access system functions</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="我要啦免费统计" 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 + -