00001 // $Id: ovm_env.svh 1 2008-03-05 02:42:30Z seanoboyle $ 00002 //---------------------------------------------------------------------- 00003 // Copyright 2007-2008 Mentor Graphics Corporation 00004 // Copyright 2007-2008 Cadence Design Systems, Inc. 00005 // All Rights Reserved Worldwide 00006 // 00007 // Licensed under the Apache License, Version 2.0 (the 00008 // "License"); you may not use this file except in 00009 // compliance with the License. You may obtain a copy of 00010 // the License at 00011 // 00012 // http://www.apache.org/licenses/LICENSE-2.0 00013 // 00014 // Unless required by applicable law or agreed to in 00015 // writing, software distributed under the License is 00016 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 00017 // CONDITIONS OF ANY KIND, either express or implied. See 00018 // the License for the specific language governing 00019 // permissions and limitations under the License. 00020 //---------------------------------------------------------------------- 00021 00022 `ifndef OVM_ENV_SVH 00023 `define OVM_ENV_SVH 00024 00025 //---------------------------------------------------------------------- 00026 // CLASS env 00027 //---------------------------------------------------------------------- 00028 00029 // Subclasses of the avm_env class hold all the classes in 00030 // that together constitute the testbench. These subclasses 00031 // must define their own run method, and may also define their own 00032 // connect, configure and report methods 00033 00034 virtual class ovm_env extends ovm_threaded_component; 00035 00036 extern function new( string name = "env", ovm_component parent = null ); 00037 00038 // Implicit $finish when run_test is done. Do disable the implicit 00039 // finish, set to 0. 00040 static bit finish_on_completion = 1; 00041 00042 // Phase all top level components. Uses test_name is provided via input 00043 // arg or command line +OVM_TESTNAME, the test is instantiated prior to 00044 // phasing. 00045 extern static task run_test (string test_name=""); 00046 00047 // Manually execute phases. If ph_name is empty, then this will run through 00048 // to the last phase. 00049 extern static task run_global_phase (string ph_name=""); 00050 00051 // Deprecated phasing. Executes global phasing. 00052 extern virtual task do_test(); 00053 extern virtual task run(); 00054 00055 00056 // Add special semantics for the run phase for an env 00057 extern protected virtual task m_do_task_phase (ovm_phase phase); 00058 00059 // Internal 00060 extern static local task m_do_global_phase (string ph_name); 00061 00062 endclass 00063 00064 //----------------------------------------------------------------------------- 00065 // 00066 // TASK: run_test, ovm_print_topology 00067 // 00068 // wrappers for calling ovm_env::run_test,print_units 00069 //----------------------------------------------------------------------------- 00070 00071 00072 task run_test (string test_name=""); 00073 ovm_env::run_test(test_name); 00074 endtask 00075 00076 function void ovm_print_topology (ovm_printer printer=null); 00077 ovm_report_info("OVMTOP", "OVM testbench topology:", 500); 00078 ovm_component::print_units(printer); 00079 endfunction 00080 00081 `endif // OVM_ENV_SVH 00082
![]() Intelligent Design Verification Project: OVM, Revision: 1.0.0 |
Copyright (c) 2008 Intelligent Design Verification. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included here: http://www.intelligentdv.com/licenses/fdl.txt |
![]() Doxygen Version: 1.5.6 Sun Sep 21 13:58:29 2008 |