问题描述
我正在尝试在驱动程序的 run_phase 中使用信号量、fork-join 和 get()-put() 方法为简单的流水线模型实现 UVM 驱动程序。
如果我以特定方式对序列进行编码,驱动程序部分就可以正常工作。据我所知,正文任务的编码如下
Code1:
pkt = packet::type_id::create("pkt"); // Factory create the sequence item
for(int i=0;i<num_trans;i++) // Repeat as required
begin
assert(pkt.randomize()); // Randomize the sequence item
start_item(pkt); //Send the request to Driver.
finish_item(pkt); //Wait for the driver to finish the current item
以上样式,没有实现流水线,而且与第一个交易数据包对应的数据节拍丢失。在 start_item 之后调用随机化时,测试台按预期工作。
Code2:
pkt = packet::type_id::create("pkt");
for(int i=0;i<num_trans;i++)
begin
start_item(pkt);
assert(pkt.randomize());
finish_item(pkt);
我想知道编码风格 1 和 2 之间有什么区别
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)