// It then calls <uvm_report_server::report_summarize> and terminates the simulation// with ~$finish~.virtualfunctionvoiddie();uvm_report_serverl_rs=uvm_report_server::get_server();// do the pre_abort callbacksm_do_pre_abort();l_rs.report_summarize();$finish;endfunction// Function: set_timeout//// Specifies the timeout for the simulation. Default is <`UVM_DEFAULT_TIMEOUT>//// The timeout is simply the maximum absolute simulation time allowed before a// ~FATAL~ occurs. If the timeout is set to 20ns, then the simulation must end
// This is the top-level that governs phase execution and provides component// search interface. See <uvm_root> for more information.//------------------------------------------------------------------------------constuvm_rootuvm_top=uvm_root::get();//-----------------------------------------------------------------------------// IMPLEMENTATION//-----------------------------------------------------------------------------`UVM_VCS_DEFINITIONS// get// ---functionuvm_rootuvm_root::get();uvm_coreservice_tcs=uvm_coreservice_t::get();returncs.get_root();endfunction
// run_test// --------taskuvm_root::run_test(stringtest_name="");uvm_report_serverl_rs;uvm_coreservice_tcs=uvm_coreservice_t::get();uvm_factoryfactory=cs.get_factory();bittestname_plusarg;inttest_name_count;stringtest_names[$];stringmsg;uvm_componentuvm_test_top;processphase_runner_proc;// store thread forked below for final cleanuptestname_plusarg=0;// Set up the process that decouples the thread that drops objections from
// It then calls <uvm_report_server::report_summarize> and terminates the simulation// with ~$finish~.virtualfunctionvoiddie();uvm_report_serverl_rs;// Only die once...if(get_core_state()inside{UVM_CORE_PRE_ABORT,UVM_CORE_ABORTED})return;l_rs=uvm_report_server::get_server();// do the pre_abort callbacksm_uvm_core_state.push_front(UVM_CORE_PRE_ABORT);m_do_pre_abort();uvm_run_test_callback::m_do_pre_abort();
processphase_runner_proc;// store thread forked below for final cleanupuvm_run_test_callback::m_do_pre_run_test();factory=uvm_factory::get();m_uvm_core_state.push_front(UVM_CORE_PRE_RUN);testname_plusarg=0;// Set up the process that decouples the thread that drops objections from// the process that processes drop/all_dropped objections. Thus, if the// original calling thread (the "dropper") gets killed, it does not affect// drain-time and propagation of the drop up the hierarchy.// Needs to be done in run_test since it needs to be in an// initial block to fork a process.uvm_objection::m_init_objections();// dump cmdline args BEFORE the args are being used
uvm_cmdline_set_verbosity::check(this);if(clp.get_arg_matches("+UVM_DUMP_REPORT_ARGS",dump_args))beginstringmsgs[$];`ifdefUVM_CMDLINE_NO_DPImsgs.push_back("\n!!! UVM_CMDLINE_NO_DPI IS DEFINED !!!");`endifmsgs.push_back(uvm_cmdline_verbosity::dump());msgs.push_back(uvm_cmdline_set_verbosity::dump());msgs.push_back(uvm_cmdline_set_action::dump());msgs.push_back(uvm_cmdline_set_severity::dump());uvm_report_info("REPORTARGS",$sformatf("\n--- UVM Reporting Argument Summary ---\n%s\n",`UVM_STRING_QUEUE_STREAMING_PACK(msgs)),UVM_NONE);