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

📄 00435.html

📁 这是一本关于verilog编程语言的教程,对学习verilog语言有帮助
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>30.8.1 VPI read initialization and load access initialization</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', '00435.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->
<div class="Element801" id="popup00573">
<div class="Element800">
<div class="Element14">
链接</div>
<div class="Element11">
<div class="Element10">
<a href="00434.html" target="topic">30.8 Reading data</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, 'popup00573');"><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="00434.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="00434.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="00436.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">
30.8.1 VPI read initialization and load access initialization</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">
Selecting an object is done in 3 steps:&nbsp;</p>
<p class="Element10">
1) The first step is to initialize the read access with a call to vpi_load_extension() to load the reader extension and set:&nbsp;</p>
<p class="Element10">
a) Name of the reader library to be used specified as a character string. This is either a full pathname to this library or the single filename (without path information) of this library, assuming a vendor specific way of defining the location of such a library. The latter method is more portable and therefore recommended. Neither the full pathname, nor the single filename shall include an extension, the name of the library must be unique and the appropriate extension for the actual platform should be provided by the application loading this library More details are in Section 30.10.&nbsp;</p>
<p class="Element10">
b) Name of the database holding the stored data or flush database in case of vpiAccessPostProcess or vpiAccessInteractive respectively; a NULL can be used in case of vpiAccessLimitedInteractive. This is the logical name of a database, not the name of a file in the file system. It is implementation dependent whether there is any relationship to an actual on-disk object and the provided name. See access mode below for more details on the access modes.&nbsp;</p>
<p class="Element10">
c) Access mode: The following VPI properties set the mode of access&nbsp;</p>
<p class="Element10">
— vpiAccessLimitedInteractive: Means that the access shall be done for the data stored in the tool memory (e.g. simulator), the history (or future) that the tool stores is implementation dependent. If the tool does not store the requested info then the querying routines shall return a fail. The database name argument to vpi_load_extension() in this mode shall be ignored (even if not NULL).&nbsp;</p>
<p class="Element10">
— vpiAccessInteractive: Means that the access shall be done interactively. The tool shall then use the database specified as a “flush” area for its data. This mode is very similar to the vpiAccessLimitedInteractive with the additional requirement that all the past history (before current time) shall be stored (for the specified scope/collection, see the access scope/collection description of vpi_load_init().&nbsp;</p>
<p class="Element10">
— vpiAccessPostProcess: Means that the access shall be done through the specified database. All data queries shall return the data stored in the specified database. Data history depends on what is stored in the database, and can be nothing (i.e. no data).&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
vpi_load_extension() can be called multiple times for different reader interface libraries (coming from different tools), database specification, and/or read access. A call with vpiAccessInteractive means that the user is querying the data stored inside the simulator database and uses the VPI routines supported by the simulator. A call with vpiAccessPostProcess means that the user is accessing the data stored in the database and uses the VPI services provided by the waveform tool. The application, if accessing several databases and/or using multiple read API libraries, can use the routine vpi_get(vpiBelong, &lt;vpiHandle&gt;) to check whether a handle belongs to that database. The call is performed as follows: </p><div class="Element170">
<a href="#" onclick="CopyElementToClipboard('code01042');">Copy Code</a></div>
<div class="Element13"><div class="Element12" id="code01042"><pre class="Element12">reader_extension_ptr-&gt;vpi_get(vpiBelong, &lt;vpiHandle&gt;);</pre></div></div>
<p class="Element10">
where reader_extension_ptr is the reader library pointer returned by the call to vpi_load_extension(). TRUE is returned if the passed handle belongs to that extension, and FALSE otherwise.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
If the application uses the built-in library (i.e. the one provided by the tool it is running under), there is no need to use indirection to call the VPI routines; they can be called directly. An initial call must however be made to set the access mode, specify the database, and check for error indicated by a NULL return.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
vpi_close() shall be called in case of:
<ul class="Element630">
<li class="Element600">vpiAcessLimitedInteractive to perform any tool cleanup. The validity of VPI handles after this call is left up to the particular reader implementation.</li>
<li class="Element600">vpiAccessPostProcess or vpiAccessInteractive mode to perform any tool cleanup and close the opened database. Handles obtained before the call to vpi_close() are no longer valid after this call.</li>
</ul>Multiple databases, possibly in different access modes (for example a simulator database opened in vpi- AccessInteractive and a database opened in vpiAccessPostProcess, or two different databases opened in vpiAccessPostProcess) can be accessed at the same time. Section 30.10 shows an example of how to access multiple databases from multiple read interfaces simultaneously.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
2) Next step is to specify the elements that shall be accessed. This is accomplished by calling vpi_load_init() and specifying a scope and/or an item collection. At least one of the two (scope or collection) needs to be specified. If both are specified then the union of all the object elements forms the entire set of objects the user can access.
<ul class="Element630">
<li class="Element600">Access scope: The specified scope handle, and nesting mode govern the scope that access returns. Data queries outside this scope (and its sub-scopes as governed by the nesting mode) shall return a fail in the access routines unless the object belongs to access collection described below. It can be used either in a complementary or in an exclusive fashion to access collection. NULL is to be passed to the collection when access scope is used in an exclusive fashion.</li>
<li class="Element600">Access collection: The specified collection stores the traverse object handles to be loaded. It can be used either in a complementary or in an exclusive fashion to access scope. NULL is to be passed to the scope when access collection is used in an exclusive fashion.</li>
</ul>vpi_load_init() enables access to the objects stored in the database and can be called multiple times. The load access specification of a call remains valid until the next call is executed. This routine serves to initialize the tool load access and provides an entry point for the tool to perform data access optimizations.</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="00434.html" target="topic">30.8 Reading data</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="00434.html" target="topic">30.8 Reading data</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 + -