返回介绍

第三十章 SystemVerilog数据读API

发布于 2020-09-09 22:56:02 字数 5938 浏览 1201 评论 0 收藏 0

主题描述
30.1 简介(一般信息)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.

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... more
30.2 需求SystemVerilog adds several design and verification constructs including:
  • C data types such as int, struct, union, and enum.
  • Advanced built-in data types such as string.
  • User defined data types and corresponding methods.
  • Data types and facilities that enhance the creation and functionality of testbenches.
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... more
30.3 Extensions to VPI enumerationsThese 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.
30.4 VPI object type additions
30.5 Object model diagramsA 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:
  • Has a name
  • 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).
The class includes nets,... more
30.6 Usage extensions to VPI routinesSeveral 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.

Table 30-1: Usage extensions to Verilog 2001 VPI routines

30.7 VPI routines added in SystemVerilogThis section lists all the VPI routines added in SystemVerilog.

Table 30-2: VPI routines

Table 30-3: Reader VPI routines

30.8 Reading dataReading data is performed in 3 steps:
  1. A design object must be selected for traverse access from a database (or from memory).
  2. 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... more
30.9 Optionally unloading the dataThe 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.

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.

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... more
30.10 Reading data from multiple databases and/or different read library providersThe 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.
30.11 VPI routines extended in SystemVerilogTable 30-1 lists the usage extensions. They are repeated here the additional extended usage with traverse (collection) handles of vpi_get_time() for clarity.
30.12 VPI routines added in SystemVerilogThis section describes the additional VPI routines in detail.

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

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

发布评论

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