首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何将verilog $deposit与索引一起使用

如何将verilog $deposit与索引一起使用
EN

Stack Overflow用户
提问于 2014-04-09 18:04:30
回答 1查看 10.9K关注 0票数 0

当路径包含来自generate循环的索引时,如何使用$deposit。当我尝试的时候:

代码语言:javascript
运行
复制
for(int idx=0; idx<`NUM_OF_ENGIES; idx++)
   $deposit(i_engines_array.engines_loop[i].engine_top.soft_reset_n, 1'b0);

我得到了错误:

代码语言:javascript
运行
复制
Error-[STASKEC_IFAIDT] Illegal argument to $deposit task

  The first argument passed to $deposit task: path is illegal.
  Please pass net/reg/bitselect type to $deposit task and recompile.
EN

回答 1

Stack Overflow用户

发布于 2014-04-09 19:11:20

您需要命名生成块,然后才能对其进行索引。请参阅standard的第24.7节。例如:

代码语言:javascript
运行
复制
genvar idx;
for(idx=0; idx<4; idx) begin : engine_loop
  engine engine_top();
end

initial begin
  $deposit(engine_loop[2].engine_top.soft_reset_n, 1'b0);
end
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22959183

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档