function new (string name, uvm_component parent); super.new(name, parent); seq_item_port = new("seq_item_port", this); rsp_port = new("rsp_port", this); seq_item_prod_if = seq_item_port; endfunction // new const static string type_name = "uvm_driver #(REQ,RSP)"; virtual ...
sequencer的seq_item_export是uvm_seq_item_pull_imp #(REQ, RSP, this_type)类型。 seq_item_port其包含了以下的内建方法 task get_next_item(output REQ) task try_next_item(output REQ) function void item_done(input RSP) task wait_for_sequence() function bit has_do_available() function void ...
我们在sequence中往driver发包时,最常用的方法就是使用uvm_do()系列宏,偶尔会使用方法start_item()和finish_item()的组合,极个别场景下会 使用`uvm_create()和`uvm_send()宏,极极个别场景下还会看到create_item()方法的使用,这些宏和方法有什么区别,各自使用场景有什么局限和注意事项,他们分别定义在了UVM源代码...
function voiditem_done(input RSP rsp_arg = null):通知sequence item已经消化完毕,也可以选择性传递response taskwait_for_sequences():等待当前的sequence直到产生下一个item。和2配合起来就是1的作用 function bithas_do_available():如果当前的sequence准备好且可以获取下一个item则返回1,否则0 function voidput...
Driver调用get_next_item()时,Sequencer中的FIFO会Pop出一个transaction送给Driver,Driver将这个transaction的数据驱动给DUT后,需要和Sequence达成握手,告诉它这笔transaction已经使用完了,可以发送下一个transaction了(否则sequence会阻塞在`uvm_do或finish_item等指令上),所以它会调用seq_item_port的item_done()函数。
通过层次嵌套关系,可以让hierarchical sequence使用其他hierarchical sequence、flat sequence和sequence item,如果底层的sequence和item粒度合适,那么就可以充分复用他们,来实现更为丰富的激励场景。 classhier_seqextendsuvm_sequence;`uvm_object_utils(hier_seq)
seq_item_pull_port方法: task get_next_item() function void item_done(input RSP rsp_arg=null) task wait_for_sequences(): 往往与try_get_item联合使用 function bit has_do_available(): function void put_response(): 由于继承,原先的这三个方法也都有 ...
Once that execution is complete, the seq_item_port.item_done () call is made to signal back to the sequencer, and in turn the sequence, that the transaction has been executed. Virtual sequences and related sequences Sequences can have handles to other sequences; after all, a sequence is...
uvm_seq_item_pull_export #(type REQ=int, type RSP=REQ) uvm_seq_item_pull_imp #(type REQ=int, type RSP=REQ, type imp=int) 由于driver是请求发起端,所以在driver一侧例化了下面的两种端口: uvm_seq_item_pull_port #(REP, RSP) seq_item_port ...
(3)代码上主要使用`uvm_do等宏完成transaction的start_item/randomize/finish_item,最后通过get_response(rsp)从sequencer拿回rsp 同时还要改建driver,主要包括: (1)移除mailbox通信,转而使用uvm_driver::seq_item_port和uvm_sequencer::seq_item_export进行通信 ...