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

📄 00862.html

📁 这是一本关于verilog编程语言的教程,对学习verilog语言有帮助
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>第三十章 SystemVerilog数据读API</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', '00862.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->
<div class="Element801" id="popup00555">
<div class="Element800">
<div class="Element14">
链接</div>
<div class="Element11">
<div class="Element10">
<a href="00996.html" target="topic">主题</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, 'popup00555');"><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="00368.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><img src="btn_up_d.gif" border="0" alt="Up" title="Up"><a href="00414.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">
第三十章 SystemVerilog数据读API</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="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">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="50%">
<div class="Element201">
主题&nbsp;</div></td><td class="Element204" valign="top" width="50%">
<div class="Element205">
描述&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00414.html" target="topic">30.1 简介(一般信息)</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
This chapter extends the SystemVerilog VPI with read facilities so that the Verilog Procedural Interface (VPI) acts as an Application Programming Interface (API) for data access and tool interaction irrespective of whether the data is in memory or a persistent form such as a database, and also irrespective of the tool the user is interacting with.<br><br>SystemVerilog is both a design and verification language consequently its VPI has a wealth of design and verification data access mechanisms. This makes the VPI an ideal vehicle for tool integration in order to replace arcane, inefficient, and error-prone file-based data exchanges with a... <a href="00414.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00419.html" target="topic">30.2 需求</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
SystemVerilog adds several design and verification constructs including:
<ul class="Element630">
<li class="Element600">C data types such as int, struct, union, and enum.</li>
<li class="Element600">Advanced built-in data types such as string.</li>
<li class="Element600">User defined data types and corresponding methods.</li>
<li class="Element600">Data types and facilities that enhance the creation and functionality of testbenches.</li>
</ul>The access API shall be implemented by all tools as a minimal set for a standard means for user-tool or tooltool interaction that involves SystemVerilog object data querying (reading). In other words, there is no need for a simulator to be running for this API to be in effect; it is a set of API routines... <a href="00419.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00420.html" target="topic">30.3 Extensions to VPI enumerations</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
These extensions shall be appended to the contents of the vpi_user.h file, described in IEEE Std. 1364- 2001, Annex G. The numbers in the range 800 - 899 are reserved for the read data access portion of the VPI.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00427.html" target="topic">30.4 VPI object type additions</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00431.html" target="topic">30.5 Object model diagrams</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
A traverse object of type vpiTrvsObj is related to its parent object; it is a means to access the value data of said object. An object can have several traverse objects each pointing and moving in a different way along the value data horizon. This is shown graphically in the model diagram below. The traversable class is a representational grouping consisting of any object that:
<ul class="Element630">
<li class="Element600">Has a name</li>
<li class="Element600">Can take on a value accessible with vpi_get_value(), the value must be variable over time (i.e. necessitates creation of a traverse object to access the value over time).</li>
</ul>The class includes nets,... <a href="00431.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00432.html" target="topic">30.6 Usage extensions to VPI routines</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
Several VPI routines, that have existed before SystemVerilog, have been extended in usage with the addition of new object types and/or properties. While the extensions are fairly obvious, they are emphasized here again to turn the reader’s attention to the extended usage. </p><p class="Element207" style="text-align: center">
<strong>Table 30-1: Usage extensions to Verilog 2001 VPI routines</strong></p><p class="Element207">
&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00433.html" target="topic">30.7 VPI routines added in SystemVerilog</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
This section lists all the VPI routines added in SystemVerilog. </p><p class="Element207" style="text-align: center">
<strong>Table 30-2: VPI routines</strong><br><img src="Table_30_2.png" border="0" alt="" title=""><br><strong>Table 30-3: Reader VPI routines</strong><br><img src="Table_30_3.png" border="0" alt="" title=""><br></p><p class="Element207">
&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00434.html" target="topic">30.8 Reading data</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
Reading data is performed in 3 steps:
<ol class="Element630">
<li value="1" class="Element600">A design object must be selected for traverse access from a database (or from memory).</li>
<li value="2" class="Element600">Indicate the intent to access data. This is typically done by a vpi_load_init() call as a hint from the user to the tool on which areas of the design are going to be accessed. The tool shall then load the data in an invisible fashion to the user (for example, either right after the call, or at traverse handle creation, or usage). Alternatively, if the user wishes he can (also) choose to add a specific vpi_load() call (this... <a href="00434.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00447.html" target="topic">30.9 Optionally unloading the data</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
The implementation tool should handle unloading the unused data in a fashion invisible to the user. Managing the data caching and memory hierarchy is left to tool implementation but it should be noted that failure to unload can affect the tool performance and capacity.<br><br>The user can optionally choose to call vpi_unload() to unload the data from (active) memory if the user application is done with accessing the data.<br><br>Calling vpi_unload() before releasing (freeing) traverse (collection) handles that are manipulating the data using vpi_free_object() is not recommended practice by users; the behavior of traversal using existing handles is not defined... <a href="00447.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00415.html" target="topic">30.10 Reading data from multiple databases and/or different read library providers</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
The VPI routine vpi_load_extension() is used to load VPI extensions. Such extensions include reader libraries from such tools as waveform viewers. vpi_load_extension() shall return a pointer to a function pointer structure with the following definition. &nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00416.html" target="topic">30.11 VPI routines extended in SystemVerilog</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
Table 30-1 lists the usage extensions. They are repeated here the additional extended usage with traverse (collection) handles of vpi_get_time() for clarity. &nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<a href="00417.html" target="topic">30.12 VPI routines added in SystemVerilog</a>&nbsp;</div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
This section describes the additional VPI routines in detail. &nbsp;</div></td></tr></table></div></div>
</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="00996.html" target="topic">主题</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 + -