Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
VAMS-LRM-2-3-1.pdf
Скачиваний:
43
Добавлен:
05.06.2015
Размер:
3.73 Mб
Скачать

Accellera

 

Version 2.3.1, June 1, 2009

VERILOG-AMS

11. Using VPI routines

11.1 Overview

Clause 11 and Clause 12 specify the Verilog Procedural Interface (VPI) for the Verilog-AMS HDL. This clause describes how the VPI routines are used and Clause 12 defines each of the routines in alphabetical order.

11.2 The VPI interface

The VPI interface provides routines which allow Verilog-AMS product users to access information contained in a Verilog-AMS design and allow facilities to interact dynamically with a software product. Applications of the VPI interface can include delay calculators and annotators, connecting a Verilog-AMS simulator with other simulation and CAE systems, and customized debugging tasks.

The functions of the VPI interface can be grouped into two main areas:

Dynamic software product interaction using VPI callbacks

Access to Verilog-AMS HDL objects and simulation specific objects

11.2.1 VPI callbacks

Dynamic software product interaction shall be accomplished with a registered callback mechanism. VPI callbacks shall allow a user to request a Verilog-AMS HDL software product, such as a logic simulator, call a user-defined application when a specific activity occurs. For example, the user can request the user application my_monitor() be called when a particular net changes value or my_cleanup() be called when the software product execution has completed.

The VPI callback facility shall provide the user with the means to interact dynamically with a software product, detecting the occurrence of value changes, advancement of time, end of simulation, etc. This feature allows applications such as integration with other simulation systems, specialized timing checks, complex debugging features, etc. to be used.

The reasons for providing callbacks can be separated into four categories:

Simulation event (e.g., a value change on a net or a behavioral statement execution)

Simulation time (e.g., the end of a time queue or after certain amount of time)

Simulator action/feature (e.g., the end of compile, end of simulation, restart, or enter interactive mode)

User-defined system task or function execution

VPI callbacks shall be registered by the user with the functions vpi_register_cb(), vpi_register_systf() and vpi_register_analog_systf(). These routines indicate the specific reason for the callback, the application to be called, and what system and user data shall be passed to the callback application when the callback occurs. A facility is also provided to call the callback functions when a Verilog-AMS HDL product is first invoked. A primary use of this facility shall be for the registration of user-defined system tasks and functions.

11.2.2 VPI access to Verilog-AMS HDL objects and simulation objects

Accessible Verilog-AMS HDL objects and simulation objects and their relationships and properties are described using data model diagrams. These diagrams are presented in 11.6. The data diagrams indicate the

Copyright © 2009 Accellera Organization, Inc.

244

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]