uvm_objection/uvm_objection_events/test_done_objection/callbacks_objection/objection_callback
(2011-10-20 09:52:54)
分类: uvm |
preface
uvm_objection是在uvm_object上扩展出来的一个专门针对数据单元的类。该类也用来协调多个component的行动
ie:the ~uvm_test_done~ built-in objection provides a means for
// coordinating when to end a test, i.e. when to call <global_stop_request> to
// end the <uvm_component::run> phase. When all participating components have
// dropped their raised objections with ~uvm_test_done~, an implicit call to
// ~global_stop_request~ is issued
1.uvm_objection_events是一个内部类,作用:里边记录的是某个component在等待本objection raised dropped all_dropped 发生,同一component每等待一次 waiters++
int waiters;
event raised;
event dropped;
event all_dropped;
2.uvm_objection_context_object这是一个内部的类,定义了一些属性,在uvm_objection中声明了一个这个类的pool,该类主要记录了一个component到objection的映射关系,为这个映射关系提供了描述,定义了一个count来为每次objection调用component的raised等方法提供一个数字
uvm_object obj;
uvm_object source_obj;
string description;
int count;
3. uvm_objection extends uvm_report_object
protected bit m_trace_mode=0;//记录目标活动使能
protected int m_source_count[uvm_object];//某个component raised count
protected int m_total_count [uvm_object]; //某个component及其子孙共raised的count
protected time m_drain_time [uvm_object];//某个component的drain time
protected bit m_draining [uvm_object];//某个component 正在draining
protected uvm_objection_events m_events [uvm_object];//记录某个component的raised dropped等情况
bit m_top_all_dropped;//top是否all_dropped
protected process m_background_proc;
protected uvm_root m_top = uvm_root::get();
static uvm_objection m_objections[$];//全局的对象,记录了所有的objection
local uvm_objection_context_object m_context_pool[$];
local uvm_objection_context_object m_scheduled_list[$];
bit m_hier_mode = 1;
uvm_root top = uvm_root::get();
protected bit m_cleared = 0;
3.1 function new(string name="");//根据命令行的情况设置m_t