没人愿意说说吗?为什么触发的不是同一个事物呢?
时间:10-02
整理:3721RD
点击:
直接附代码:
virtual task body();
automatic ahb_transfer a ;
begin
for(int i = 0; i <= itr; i++) begin
req = ahb_transfer::type_id::create("req");
start_item(req);
assert(req.randomize());
a = req ;
fork
begin
a.wait_trigger("DATA_DONE") ;
if(a.direction==READ) `uvm_info(get_type_name(),$psprintf("master sequence read data :\n%s",a.sprint()), UVM_LOW)
end
join_none
finish_item(req);
end
end
endtask
taskautomaticdo_pipeline_transfer ;
ahb_transfertransfer ;
forever begin
key.get();//the key is a semaphore
seq_item_port.get( transfer );
`uvm_info(get_type_name(),$psprintf("Driving request :\n%s",transfer.sprint()), UVM_LOW)
accept_tr(transfer,$time);
void'(begin_tr(transfer,"pipelined_driver"));
// drivercontrol
...
@(posedge vif.HCLK)
key.put();
//driver data
...
@(posedge vif.HCLK iff vif. AHB_HREADY)
if(transfer.direction == READ)
begin
transfer.rdata = vif.AHB_HRDATA;
`uvm_info(get_type_name(),$psprintf("master read data :\n%s",transfer.sprint()), UVM_LOW)
transfer.trigger("DATA_DONE");
end
end_tr(transfer);
end
endtask
output :
# UVM_INFO ahb_master_driver.sv(73) @ 75: uvm_test_top.ahb0.master_agent.driver [ahb_master_driver] master read data :
# ----------------------------------------------------------------------------------------------------------------------
# NameTypeSizeValue
# ----------------------------------------------------------------------------------------------------------------------
# reqahb_transfer-@963
#wdataintegral32'h91fb2fc4
#rdataintegral32'h6afb75c6
#addressintegral32'h17ce26
#directionahb_direction1READ
# ----------------------------------------------------------------------------------------------------------------------
#
# UVM_INFO ahb_master_seq_lib.sv(84) @ 75: uvm_test_top.ahb0.master_agent.sequencer@@ahb_master_single_seq [ahb_master_single_seq] master sequence read data :
# ----------------------------------------------------------------------------------------------------------------------
# NameTypeSizeValue
# ----------------------------------------------------------------------------------------------------------------------
# reqahb_transfer-@1020
#wdataintegral32'hd1fb2950
#rdataintegral32'h82332ddc
#addressintegral32'h136da6
#directionahb_direction1READ
求助:我是想让sequence输出从总线上收集的信息,为什么我执行transfer.trigger("DATA_DONE")时是@963而sequence被触发的时候换成 @1020 了 。注意:这里任务 do_pipeline_transfer 是2个并发执行的。 谢谢指点~速度来人啊!解答困惑啊!
怎么没人给解惑啊?描述不清楚吗?代码都附上了
还是没人知道?不可能啊!
你的意思是,触发的时间应该和那个打印时间是一样的吧?
单看你的代码看不出为什么,你可以用VCS加一下断点,调试一下,就知道了
时间是同一时间都是75n,因为触发事件发生了,只是我想打印的那个item不是我在sequence里面fork的,调试了一早上没结果啊不知道为什么?
那你说的想打印的item在哪
解决了?