最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

vpiScope

IT培训 admin 0浏览 0评论

vpiScope

在LRM中vpiScope的含义是 containing scope object,这点不太好理解,做了一点实验,用于说明它的含义

在iverilog里面:

vpiScope iterator on vpiScope objects.

    In the VPI, the normal way to iterate over vpiScope objects
    contained within a vpiScope object, is the vpiInternalScope
    iterator. Icarus Verilog adds support for the vpiScope
    iterator of a vpiScope object, that iterates over *everything*
    the is contained in the current scope. This is useful in cases
    where one wants to iterate over all the objects in a scope
    without iterating over all the contained types explicitly.

 iverilog对vpiScope做了扩展,即可以通过vpi_iterate获取某个scope下的subscope,比如可以这样。

vpiHandle iter = vpi_iterate(vpiScope, item);vpiHandle sub;while(NULL != (sub = vpi_scan(iter))){fprintf(stderr, "name:%s\n", vpi_get_str(vpiFullName, sub));}

同时,可以通过vpi_handle(vpiScope, item) 获取上一级的scope

vpiHandle scope = vpi_handle(vpiScope, item);

标准LRM

这时,可以通过vpi_handle(vpiScope,item) 获取上一级的scope,通过

vpi_iterate(vpiInternalScope, item) 来获取本scope里面的scope

iverilog 获取hierarchy tree_yuexiangallan的博客-CSDN博客

vpiScope

在LRM中vpiScope的含义是 containing scope object,这点不太好理解,做了一点实验,用于说明它的含义

在iverilog里面:

vpiScope iterator on vpiScope objects.

    In the VPI, the normal way to iterate over vpiScope objects
    contained within a vpiScope object, is the vpiInternalScope
    iterator. Icarus Verilog adds support for the vpiScope
    iterator of a vpiScope object, that iterates over *everything*
    the is contained in the current scope. This is useful in cases
    where one wants to iterate over all the objects in a scope
    without iterating over all the contained types explicitly.

 iverilog对vpiScope做了扩展,即可以通过vpi_iterate获取某个scope下的subscope,比如可以这样。

vpiHandle iter = vpi_iterate(vpiScope, item);vpiHandle sub;while(NULL != (sub = vpi_scan(iter))){fprintf(stderr, "name:%s\n", vpi_get_str(vpiFullName, sub));}

同时,可以通过vpi_handle(vpiScope, item) 获取上一级的scope

vpiHandle scope = vpi_handle(vpiScope, item);

标准LRM

这时,可以通过vpi_handle(vpiScope,item) 获取上一级的scope,通过

vpi_iterate(vpiInternalScope, item) 来获取本scope里面的scope

iverilog 获取hierarchy tree_yuexiangallan的博客-CSDN博客

与本文相关的文章

发布评论

评论列表 (0)

  1. 暂无评论