PLI提供两种类型的程序:Access程序;任务和函数程序。Access 程序是能访问verilog内部的信息的C编程语言……
PLI提供两种类型的程序,他们是
PLI2.0把access程序和tf程序整合为VPI函数,也澄清了PLI中的一些confusion。
Access 程序
Access 程序是能访问verilog内部的信息的C编程语言。access程序能执行两个操作:
读取操作: 直接从内部数据结构中读取特定对象的数据。access程序可以读取以下对象的信息:
- 例化模块
- 模块端口
- 模块通路
- 内部模块通路
- 顶层模块
- 例化primitive
- Primitive terminals
- 线网
- 寄存器
- 参数
- 时序检查
- named events
- 整型,实数和时间变量
写操作:向内部数据结构写入有关对象的新信息。
- 模块内部通路
- 模块通路
- 例化primitives
- 时序检验
- 寄存器逻辑值
- sequential UDP逻辑值
根据access的操作,可以分为六类:
- Fetch: 返回设计层次中不同对象信息
- Handle: 返回设计层次中的句柄
- Modify: 修改设计层次中各种对象的值
- Next: 当在循环结构时,next程序寻找每个符合给定类型的对象
- Utility: 执行许多操作,比如初始化和配置access程序环境
- VCL: VCL允许PLI 应用程序监测选定对象的值的改变
Access 函数参考
Routine
|
Description
|
acc_handle_scope()
|
This function returns the handle to the scope of an object. The scope can be either a module, task, function, named parallel block, or named sequential block.
|
acc_handle_by_name()
|
This routine returns the handle to a Verilog-HDL object based on the specified name and scope.
|
acc_handle_parent()
|
This function returns handle for the parent primitive instance or module instance of an object
|
acc_handle_port()
|
This function returns handle for a module port
|
acc_handle_hiconn()
|
This function returns the hierarchically higher net connection to a scalar module port or a bit of a vector port
|
acc_handle_loconn()
|
This function returns the hierarchically lower net connection to a scalar module port or a bit of a vector port.
|
acc_handle_path()
|
This function returns a handle to an inter-module path that represents the connection from an output port to an input port
|
acc_handle_modpath()
|
This function returns handle to the path of a module
|
acc_handle_datapath()
|
This function returns a handle to a datapath for a module instance for the specified edge-sensitive module path
|
acc_handle_pathin()
|
This function returns handle for the first net connected to a module path source
|
acc_handle_pathout()
|
This function returns handle for the first net connected to a module path destination
|
acc_handle_condition()
|
This function returns a handle to the conditional expression for the specified path
|
acc_handle_tchk()
|
This function returns handle for the specified timing check of a module (or cell)
|
acc_handle_tchkarg1()
|
This function returns handle for the net connected to the first argument of a timing check
|
acc_handle_tchkarg2()
|
This function returns handle for the net connected to the second argument of a timing check
|
acc_handle_simulated_net()
|
This function returns the simulated net associated with the collapsed net passed as an argument
|
acc_handle_terminal()
|
This function returns handle for a primitive_terminal
|
acc_handle_conn()
|
This function returns handle to the net connected to a primitive terminal
|
acc_handle_tfarg()
|
This function returns handle for the specified argument of the system task or function associated (through the PLI mechanism) with your C-language routine`
|
acc_fetch_attribute()
|
This function returns the value of a parameter or specparam named as an attribute in your source description
|
acc_fetch_paramtype()
|
This function returns the data type of a parameter as one of three predefined integer constants.
|
acc_fetch_paramval()
|
This function returns the value of a parameter or specparam
|
acc_fetch_defname()
|
This function returns a pointer to the defining name of a module instance or primitive instance
|
acc_fetch_fullname()
|
This function returns a pointer to the full hierarchical name of any named object or module path
|
acc_fetch_name()
|
This function returns a pointer to the instance name of any named object or module path
|
acc_fetch_delays()
|
This function fetches different delay values for different objects
|
acc_fetch_size()
|
This function returns the bit size of a net, register, or port.
|
acc_fetch_range()
|
This function retrieves the most significant bit and least significant bit range values for a vector.
|
acc_fetch_tfarg()
|
This function returns value of the specified argument of the system task or function associated (through the PLI mechanism) with your C-language routine
|
acc_fetch_direction()
|
This function returns the direction of a port or terminal as one of three predefined integer constants.
|
acc_fetch_index()
|
This function returns a zero-based integer index for a port or terminal
|
acc_fetch_edge()
|
This function returns the edge specifier (type) of a path input or output terminal as one of these predefined integer constants.
|
acc_set_value()
|
This function returns a pointer to a character string indicating the logic or strength value of a net, register or variable.
|
acc_initialize()
|
This function initializes the environment for access routines
|
acc_close()
|
This function frees internal memory used by access routines; resets all configuration parameters to default values
|
acc_configure()
|
This function sets parameters that control the operation of various access routines
|
acc_product_version()
|
This function returns a pointer to a character string that indicates what version of a Verilog simulator is linked to the access routines
|
acc_version()
|
This function returns a pointer to a character string that indicates version number of your access routine software
|
acc_count()
|
This function returns an integer count of the number of objects related to a particular reference object
|
| |