在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2716|回复: 1

[讨论] system verilog的array的问题, 欢迎来讨论.

[复制链接]
发表于 2011-4-8 17:10:02 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
在标准的12.4.2中:
Elements of dynamic arrays, queues, and associative arrays that are passed by reference may get removed
from the array or the array may get resized before the called function or task completes. The specific array
element passed by reference shall continue to exist within the scope of the called tasks or functions until they
complete. Changes made to the values of array elements by the called task or function shall not be visible
outside the scope of those tasks or functions if those array elements were removed from the array before the
changes were made. These references shall be called outdated references.
那如果变成了outdated reference会怎么样?????

还有, 我怎么样直接传参数给一个"queue of string"
例如, 定义一个functionAAA, 参数为string的queue类型sq[$]
virtual function void AAA (string sq [$])
...
endfunction
调用这个function的时候, 如果我写
AAA({"SSS"});
他报错说:
formal and actual do not have assignment compatible data types (expecting datatype compatible with 'queue of string' but found 'packed array' instead).

我应该怎么写?
发表于 2011-4-11 15:38:50 | 显示全部楼层
同问。

请高手来解答。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /3 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-19 03:18 , Processed in 0.022833 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表