Expanded versions of source files are the output of the preprocessor. Lines subject to
conditional compilation are not shown and all compiler pragmas have been stripped. Macros
have been completely expanded.
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:
00023: `define VMM_HW_VERSION__SV
00024:
00025: class vmm_hw_version;
00026: extern function int major();
00027: extern function int minor();
00028: extern function int patch();
00029:
00030:
00031: extern function string vendor();
00032: extern function void display(string prefix = "");
00033: extern function string psdisplay(string prefix = "");
00034: endclass: vmm_hw_version
00035:
00036: function int vmm_hw_version::major();
00037: major = 2;
00038: endfunction: major
00039:
00040: function int vmm_hw_version::minor();
00041: minor = 0;
00042: endfunction: minor
00043:
00044: function int vmm_hw_version::patch();
00045: patch = 0;
00046: endfunction: patch
00047:
00048:
00049: function string vmm_hw_version::vendor();
00050: vendor = "Synopsys";
00051: endfunction: vendor
00052:
00053: function void vmm_hw_version::display(string prefix = "");
00054: $write("%s\n", this.psdisplay(prefix));
00055: endfunction: display
00056:
00057: function string vmm_hw_version::psdisplay(string prefix = "");
00058: $sformat(psdisplay, "%sVMM HAL Version %0d.%0d.%0d (%s)",
00059: prefix, this.major(), this.minor(), this.patch(), this.vendor());
00060: endfunction: psdisplay
00061: