6. extract_phase:用于收集模拟过程中的数据和结果,比如从监控器(monitors)提取事务数据。 7. check_phase:在此阶段执行所有的检查操作,验证提取的数据是否符合预期。 8. report_phase:报告阶段,用于生成最终的仿真报告和统计数据。 9. final_phase:仿真结束前的最后一个阶段,用于清理资源、关闭文件和其他收尾工作。
一类是function phase,如build_phase、connect_phase等,这些phase都不耗费仿真时间,通过函数来实现; 另外一类是task phase,如run_phase等,它们耗费仿真时间,通过任务来实现。 给DUT施加激励、监测DUT的输出都是在这些phase中完成的。在图5-1中,灰色背景所示的是task phase,其他为function phase。 上述所有的phase都会...
包含build_phase()、connect_phase()、end_of_elaboartion_phase()、start_of_simulation_phase()、extract_phase()、check_phase()、report_phase()、final_phase(); 不耗时的几个 phase 在 uvm_tree 中是从上往下执行的,比如说 build_phase,这个 phase 主要用来实例化各个组件环境,理论上为了 uvm_tree 的...
13externvirtualfunctionvoidreport_phase(uvm_phase phase); 14`uvm_component_utils(base_test) 15endclass 16 18functionvoidbase_test::build_phase(uvm_phase phase); 19super.build_phase(phase); 20env = my_env::type_id::create("env",this); 21uvm_config_db#(uvm_object_wrapper)::set(this, ...
UVM提供了9个主phase和12个小的运行时phase,其中主phase如build_phase、connect_phase、reset_phase、main_phase、run_phase、report_phase和final_phase等是任务阶段,而run_phase和main_phase是关键,run_phase控制整个验证过程的启动与停止,main_phase则负责DUT的运行。引入小的运行时phase,如reset、...
function void base_test::report_phase(uvm_phase phase); uvm_report_server server; int err_num; super.report_phase(phase); server = get_report_server(); err_num = server.get_severity_count(UVM_ERROR); if (err_num != 0) begin
•常用的phase包括build、connect、run和report, 它们分别完成了组件的建立、连接、运行和报告。这些phase在uvm_component中通过_phase的后缀完成了虚方法的定义,比如build_phase()可以定义一些组件例化和配置的任务。 • 在所有的phase机制中,只有run_phase方法是一个可以耗时的任务,这意味着该方法可以完成一些等待,...
virtual function void end_of_elaboration(); print(); `uvm_info(get_type_name(), "---TEST PASS---", UVM_NONE) endfunction function void report_phase(uvm_phase phase); uvm_report_server svr; super.report_phase(phase); svr = uvm_report_server::get_server(); //`uvm_info(get_type_...
uvm_component类继承了uvm_report_object类,而该类位于UVM消息传递基础结构的核心。消息机制使用组件静态层次结构将组件的分层路径名添加到报告消息字符串中(即这条消息是由哪个组件(对象)报告的)。 uvm_component基类模板的每个UVM phase都有一个虚方法,用户可以根据需要实现这些方法。未实现的phase级虚方法将导致组件...
这个phase机制是uvm_component才具备的。用的比较多的就是build创建、配置测试平台;connect建立组件之间的连接;run,激励设计;report报告测试结果。这9个phase机制里只有run是task,其它8个都是function。 以上的9个phase机制,是顺序执行的,执行完上一个phase才会执行下一个phase。但是run phase中又可以分为12个分支phase...