VMM - RAL/vmm_ral_env.sv

RAL/vmm_ral_env.sv expanded source

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 class vmm_ral_env extends `VMM_ENV;
00024    vmm_ral_access ral;
00025 
00026    extern function new(string name = "RAL-Based Verif Env");
00027 
00028    extern virtual task hw_reset();
00029    extern virtual task sw_reset(string domain = "");
00030 
00031    extern virtual function void gen_cfg();
00032    extern virtual function void build();
00033    extern virtual task reset_dut();
00034    extern virtual task cfg_dut();
00035    extern virtual task start();
00036    extern virtual task wait_for_end();
00037    extern virtual task stop();
00038    extern virtual task cleanup();
00039    extern virtual task restart(bit reconfig = 0);
00040    extern virtual task report();
00041 endclass: vmm_ral_env
00042 
00043 
00044 
00045 function vmm_ral_env::new(string name);
00046    super.new(name);
00047    this.ral = new;
00048 endfunction: new
00049 
00050 
00051 task vmm_ral_env::hw_reset();
00052    `vmm_warning(this.log, "vmm_ral_env::hw_reset() has not be implemented");
00053 endtask: hw_reset
00054 
00055 
00056 task vmm_ral_env::sw_reset(string domain);
00057    `vmm_warning(this.log, "vmm_ral_env::sw_reset() has not be implemented");
00058 endtask: sw_reset
00059 
00060 
00061 function void vmm_ral_env::gen_cfg();
00062    super.gen_cfg();
00063 endfunction: gen_cfg
00064 
00065 
00066 function void vmm_ral_env::build();
00067    super.build();
00068 endfunction: build
00069 
00070 
00071 task vmm_ral_env::reset_dut();
00072    super.reset_dut();
00073    this.hw_reset();
00074 endtask: reset_dut
00075 
00076 
00077 task vmm_ral_env::cfg_dut();
00078    super.cfg_dut();
00079 endtask: cfg_dut
00080 
00081 
00082 task vmm_ral_env::start();
00083    super.start();
00084 endtask: start
00085 
00086 
00087 task vmm_ral_env::wait_for_end();
00088    super.wait_for_end();
00089 endtask: wait_for_end
00090 
00091 
00092 task vmm_ral_env::stop();
00093    super.stop();
00094 endtask: stop
00095 
00096 
00097 task vmm_ral_env::cleanup();
00098    super.cleanup();
00099 endtask: cleanup
00100 
00101 
00102 task vmm_ral_env::restart(bit reconfig);
00103    super.restart(reconfig);
00104 endtask: restart
00105 
00106 
00107 task vmm_ral_env::report();
00108    super.report();
00109 endtask: report