00001 // 00002 // ------------------------------------------------------------- 00003 // Copyright 2004-2008 Synopsys, Inc. 00004 // All Rights Reserved Worldwide 00005 // 00006 // Licensed under the Apache License, Version 2.0 (the 00007 // "License"); you may not use this file except in 00008 // compliance with the License. You may obtain a copy of 00009 // the License at 00010 // 00011 // http://www.apache.org/licenses/LICENSE-2.0 00012 // 00013 // Unless required by applicable law or agreed to in 00014 // writing, software distributed under the License is 00015 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 00016 // CONDITIONS OF ANY KIND, either express or implied. See 00017 // the License for the specific language governing 00018 // permissions and limitations under the License. 00019 // ------------------------------------------------------------- 00020 // 00021 00022 00023 function vmm_subenv::new(string name, 00024 string inst, 00025 `VMM_CONSENSUS end_test 00026 `VMM_SUBENV_BASE_NEW_EXTERN_ARGS); 00027 `ifdef VMM_SUBENV_BASE_NEW_CALL 00028 super.new(`VMM_SUBENV_BASE_NEW_CALL); 00029 `endif 00030 this.log = new(name, inst); 00031 this.end_test = end_test; 00032 endfunction: new 00033 00034 00035 function void vmm_subenv:: configured(); 00036 this.state = CONFIGURED; 00037 endfunction: configured 00038 00039 00040 task vmm_subenv::start(); 00041 if (this.state == NEWED) begin 00042 `vmm_error(this.log, "Sub-environment started before being configured"); 00043 end 00044 this.state = STARTED; 00045 endtask: start 00046 00047 00048 task vmm_subenv::stop(); 00049 if (this.state != STARTED) begin 00050 `vmm_warning(this.log, "Attempting to stop a sub-environment that has not been started"); 00051 end 00052 this.state = STOPPED; 00053 endtask: stop 00054 00055 00056 task vmm_subenv::cleanup(); 00057 if (this.state != STOPPED) begin 00058 `vmm_warning(this.log, "Attempting to clean-up a sub-environment that has not been stopped"); 00059 end 00060 this.state = CLEANED; 00061 endtask: cleanup 00062 00063 00064 00065 function void vmm_subenv::report(); 00066 endfunction: report