系统Verilog中的复杂数据类型(队列哈希)
假设我声明了一个队列:axi4_req_txn_t wr_req_queue [$];
> 现在,我想拥有一个队列,关键是地址,数据是排队的指针。在Systemverilog中是否有可能?
当我像这样编写代码时:typedef wr_req_queue waw_hash [*];
编译器报告wr_req_queue
不是有效的类型。
Suppose I declared a queue: axi4_req_txn_t wr_req_queue[$];
Now I want to have a hash of queue, key is the address and data is the pointer to the queue; Is it possible in systemverilog ?
when I write code like this: typedef wr_req_queue waw_hash[*];
the compiler reports that wr_req_queue
is not a valid type.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一条经验法则是,如果您想在另一个Typedef中使用,则将任何复杂的结构表示为Typedef。因此,这是一系列排队的简单示例:
反之亦然,数组的队列:
A rule of thumb is to express any complicated struct as a typedef if you want to use in another typedef. So, here is a simple example of array of queues:
Or vice versa, queue of arrays: