微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微电子和IC设计 > IC验证交流 > Help: SV Function/Task Definition Accepting Arbitrary Sized Vector Input

Help: SV Function/Task Definition Accepting Arbitrary Sized Vector Input

时间:10-02 整理:3721RD 点击:
Hi EETOP Buddies,

I’d like to define some SystemVerilog tasks/functions which can accept arbitrary sized vector input, like system function $onehot and $countones.

But I don’t know how to declare the argument in task/function, or use PLI to realize it.

Pls. kindly provide your solution if you have such experience.

Thanks a lot.

Try use Dynamic Arrays or Queues as the argument in task/function
e.g.
virtual protected task my_task(int data_in[$], data_out[]);

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top