[英]Basic UVM sequence simulation query
I have a couple of issues with a basic UVM based TB I'm trying out to understand sequences and their working. 我正在尝试了解基于UVM的基本TB的几个问题,以了解序列及其工作原理。
Here is the link to the compiling code on EDA Playground http://www.edaplayground.com/x/3x9 这是EDA Playground http://www.edaplayground.com/x/3x9上编译代码的链接。
Any suggestions on what I'm missing?? 关于我所缺少的任何建议吗?
Thanks 谢谢
venkstart venkstart
Having a look at the specification for $urandom_range it shows the signature as: function int unsigned $urandom_range( int unsigned maxval, int unsigned minval = 0 )
. 看一下$ urandom_range的规范,它将签名显示为:
function int unsigned $urandom_range( int unsigned maxval, int unsigned minval = 0 )
。 Change your call to $urandom_range(1, 0)
and it should work. 将您的调用更改为
$urandom_range(1, 0)
,它应该可以工作。
The second error comes from the fact that you are sending responses from the driver and not picking them up in your sequence. 第二个错误来自以下事实:您正在从驱动程序发送响应,而没有按顺序接听它们。 This is the line that does it:
seq_item_port.item_done(axi_item_driv_src);
这是执行此操作的行:
seq_item_port.item_done(axi_item_driv_src);
. 。 Either just do
seq_item_port.item_done();
要么只做
seq_item_port.item_done();
(don't send responses) or put a call to get_response()
inside your sequence after finish_item()
. (不发送响应)或在
finish_item()
之后在序列内调用get_response()
finish_item()
。 What I usually do is update the fields of the original request and just call item_done()
. 我通常要做的是更新原始请求的字段,然后调用
item_done()
。 For example, if I start a read transaction, in my driver I would drive the control signals and wait for the DUT to respond, update the data
field of the request with the data I got from the DUT and call item_done()
in my driver to mark the request as done. 例如,如果我开始读取事务,则在驱动程序中,我将驱动控制信号并等待DUT响应,使用从DUT获得的数据更新请求的
data
字段,并在驱动程序中调用item_done()
将请求标记为已完成。 This way if I need this data in my sequence (to constrain some future item, for example) I have it. 这样,如果我按顺序需要这些数据(例如,限制某些将来的物品),我就会拥有它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.