我的设计需要暂停数据流量才能进入低功耗模式。有没有办法暂停流量生成序列或驱动程序以允许这种情况发生?然后在稍后恢复序列?
我目前在我设置的序列中有一个标志,告诉它打破永远循环。但是,这并不理想,因为序列完成后我必须重新启动它。
您可以从虚拟序列中锁定(或抓取音序器),例如:
class virtual_seq extends uvm_sequence;
`uvm_object_utils(virtual_zero_seq)
`uvm_declare_p_sequencer(virtual_sequencer)
function new(string name = "");
super.new(name);
endfunction: new
task body;
// start the normal traffic sequence
normal_traffic_seq seq;
seq = serial_fixed_seq::type_id::create("seq");
if (! seq.randomize() ...
seq.set_starting_phase(get_starting_phase());
seq.start(p_sequencer.seqr, this);
// when you're ready, lock the sequencer
#12345;
this.lock(p_sequencer.seqr); // or grab
// wait till you're ready to resume
#12345;
// you could start another sequence on the same sequencer if you need to
// if you do, you must input the reference to this virtual sequence in
// the sequence's start method, otherwise that sequence will be locked too
// eg
// power_down_seq.start(p_sequencer.seqr, this);
// ^^^^
// when you're ready, start normal traffic again
this.unlock(p_sequencer.seqr); // or ungrab
endtask : body
endclass : virtual_zero_seq
抓取是更高优先级的锁。如果多个虚拟序列试图锁定一个音序器,那么它们将按照它们请求的顺序获得访问权限。如果多个虚拟序列试图抓取一个音序器,如果它已经被锁定(或抓取),那么这些虚拟序列将按照后到先服务的原则获得对它的访问。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句