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 `ifndef VMM_RAL_TEST_PRE_INCLUDE 00024 `define VMM_RAL_TEST_PRE_INCLUDE ral_env.svh 00025 `endif 00026 00027 `include "vmm.sv" 00028 00029 `include `VMM_MACRO_TO_STRING(`VMM_RAL_TEST_PRE_INCLUDE) 00030 00031 program mem_walk; 00032 00033 `ifdef VMM_RAL_TEST_POST_INCLUDE 00034 `include `VMM_MACRO_TO_STRING(`VMM_RAL_TEST_POST_INCLUDE) 00035 `endif 00036 00037 `ifndef RAL_TB_ENV 00038 `define RAL_TB_ENV tb_env 00039 `endif 00040 00041 00042 vmm_log log = new("Mem Walk", "Test"); 00043 `RAL_TB_ENV env; 00044 00045 vmm_ral_tests _vmm_ral_tests = new; 00046 00047 initial 00048 begin 00049 vmm_ral_block_or_sys ral_model; 00050 vmm_ral_block blk; 00051 vmm_ral_block blks[]; 00052 string domains[]; 00053 00054 env = new; 00055 00056 ral_model = env.ral.get_model(); 00057 if (ral_model == null) begin 00058 `vmm_fatal(log, "No RAL abstraction model was specified"); 00059 end 00060 00061 env.reset_dut(); 00062 ral_model.reset(); 00063 00064 // Test each block in turn 00065 00066 if ($cast(blk, ral_model)) begin 00067 // Blocks with some attributes are not to be tested 00068 if (blk.get_attribute("NO_RAL_TESTS") == "" && 00069 blk.get_attribute("NO_MEM_WALK_TEST") == "") begin 00070 00071 _vmm_ral_tests.mem_walk(blk, "", log); 00072 end 00073 end 00074 else begin 00075 vmm_ral_sys sys; 00076 $cast(sys, ral_model); 00077 sys.get_blocks(blks, domains); 00078 foreach (blks[i]) begin 00079 00080 // Blocks with some attributes are not to be tested 00081 if (blks[i].get_attribute("NO_RAL_TESTS") != "" || 00082 blks[i].get_attribute("NO_MEM_WALK_TEST") != "") continue; 00083 00084 _vmm_ral_tests.mem_walk(blks[i], domains[i], log); 00085 end 00086 end 00087 00088 log.report(); 00089 end 00090 endprogram: mem_walk
![]() Intelligent Design Verification Project: VMM, Revision: 1.1.0 |
Copyright (c) 2008-2010 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.6.3 IDV SV Filter Version: 2.6.3 Sat Jun 19 12:04:47 2010 |