ryz 0 Report post Posted February 20, 2012 I have an virtual sequence that sets up the dut and then send either an specified number of packages or send packages infinitive. In the later case I want to be able to kill the sequence when I have simulated enough time. The problem is that it seems that only the virtual sequence is killed and none of the children sequence is killed. Since it is a child sequence running on an other sequencer that send package infinitive this is not good. In my test I would like to call virt_seq.kill() and make everything that sequence do stop. Share this post Link to post Share on other sites
Roman 3 Report post Posted February 20, 2012 (edited) Hi There, I think following simple example could help you kill sub_sequnces. function void kill_them_all (uvm_sequence_base _sub_seq); uvm_sequence_state_enum seq_state; if(_sub_seq != null) begin seq_state = _sub_seq.get_sequence_state(); if(!(seq_state & (STOPPED|FINISHED))) begin `uvm_info("kill seq",$psprintf("'%s' is %s , be killed....", _sub_seq.get_name(),seq_state.name()),UVM_NONE) _sub_seq.kill() end endfunction : kill_them_all However, This will not check if the driver is currently processing any sequence_items and the result is item_done() or not. and It may cause UVM fatal errors to occur because the sequences return pointer queue has been flushed.So don't use this method unless you could make sure the drive is inactive before killing the sequences. Edited February 20, 2012 by Roman Share this post Link to post Share on other sites
ryz 0 Report post Posted February 20, 2012 So using kill on the virtual sequence is not really an option here. I guess I could implement an stop function in both the virtual sequence and the sequence sending packages forever. The virtual sequence stop function will call the child sequence stop function. The child sequence stop function can set an internal bit that to stop sending more packages and make an while(stop_bit) instead if an forever. I thought that UVM already had an way to nicely stop sequences but apparently not. Share this post Link to post Share on other sites