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_HW__SV 00024 `define VMM_HW__SV 00025 00026 `ifndef VMM_HW_MAX_MSG_WIDTH 00027 `define VMM_HW_MAX_MSG_WIDTH 1024 00028 `endif 00029 00030 `ifdef VMM_HW_SYNTHESIS_ON 00031 `else 00032 `include "vmm.sv" 00033 `endif 00034 00035 `include "HAL/vmm_hw_rtl.sv" 00036 `ifdef VMM_HW_SYNTHESIS_ON 00037 `else 00038 class vmm_hw_version; 00039 extern function int major(); 00040 extern function int minor(); 00041 extern function int patch(); 00042 extern function string vendor(); 00043 extern function void display(string prefix = ""); 00044 extern function string psdisplay(string prefix = ""); 00045 endclass: vmm_hw_version 00046 00047 `include "HAL/vmm_hw_port.sv" 00048 `ifdef VMM_HW_ARCH_NULL 00049 `include "HAL/vmm_hw_arch_null.sv" 00050 `endif 00051 00052 00053 function int vmm_hw_version::major(); 00054 major = 1; 00055 endfunction: major 00056 00057 function int vmm_hw_version::minor(); 00058 minor = 1; 00059 endfunction: minor 00060 00061 function int vmm_hw_version::patch(); 00062 patch = 1; 00063 endfunction: patch 00064 00065 function string vmm_hw_version::vendor(); 00066 vendor = "Synopsys"; 00067 endfunction: vendor 00068 00069 function void vmm_hw_version::display(string prefix); 00070 $write("%s\n", this.psdisplay(prefix)); 00071 endfunction: display 00072 00073 function string vmm_hw_version::psdisplay(string prefix); 00074 $sformat(psdisplay, "%sVMM HAL Version %0d.%0d.%0d (%s)", 00075 prefix, this.major(), this.minor(), this.patch(), this.vendor()); 00076 endfunction: psdisplay 00077 00078 `endif 00079 00080 `endif // VMM_HW__SV