urm_message_compatibility.svh

Go to the documentation of this file.
00001 // $Id: urm__message__compatibility_8svh-source.html,v 1.1 2008/10/07 21:54:12 alex.marin Exp $
00002 //----------------------------------------------------------------------
00003 //   Copyright 2007-2008 Mentor Graphics Corporation
00004 //   Copyright 2007-2008 Cadence Design Systems, Inc.
00005 //   All Rights Reserved Worldwide
00006 //
00007 //   Licensed under the Apache License, Version 2.0 (the
00008 //   "License"); you may not use this file except in
00009 //   compliance with the License.  You may obtain a copy of
00010 //   the License at
00011 //
00012 //       http://www.apache.org/licenses/LICENSE-2.0
00013 //
00014 //   Unless required by applicable law or agreed to in
00015 //   writing, software distributed under the License is
00016 //   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00017 //   CONDITIONS OF ANY KIND, either express or implied.  See
00018 //   the License for the specific language governing
00019 //   permissions and limitations under the License.
00020 //----------------------------------------------------------------------
00021 
00022   // User-Fields
00023   // -----------
00024 
00025   int unsigned recording_detail = OVM_NONE;
00026 
00027 // create_unit
00028 // -----------
00029 
00030   // For name change from unit to component
00031   function ovm_component create_unit (string type_name,
00032                                       string inst_name);
00033     return create_component(type_name, inst_name);
00034   endfunction
00035 
00036 
00037 // do_print (override)
00038 // --------
00039 
00040 function void do_print(ovm_printer printer);
00041   string v;
00042   super.do_print(printer);
00043 
00044   // recording_detail is from compatibility/urm_message_compatibility.svh
00045   // It is printed only if its value is other than the default (OVM_NONE)
00046   if(recording_detail != OVM_NONE)
00047     case (recording_detail)
00048       OVM_LOW : printer.print_generic("recording_detail", "ovm_verbosity", 
00049         $bits(recording_detail), "OVM_LOW");
00050       OVM_MEDIUM : printer.print_generic("recording_detail", "ovm_verbosity", 
00051         $bits(recording_detail), "OVM_MEDIUM");
00052       OVM_HIGH : printer.print_generic("recording_detail", "ovm_verbosity", 
00053         $bits(recording_detail), "OVM_HIGH");
00054       OVM_FULL : printer.print_generic("recording_detail", "ovm_verbosity", 
00055         $bits(recording_detail), "OVM_FULL");
00056       default : printer.print_field("recording_detail", recording_detail, 
00057         $bits(recording_detail), OVM_DEC, , "integral");
00058     endcase
00059 
00060   if (enable_stop_interrupt != 0) begin
00061     printer.print_field("enable_stop_interrupt", enable_stop_interrupt,
00062                         $bits(enable_stop_interrupt), OVM_BIN, ".", "bit");
00063   end
00064 
00065 endfunction
00066 
00067 
00068 // set_int_local (override)
00069 // -------------
00070 
00071 function void set_int_local (string field_name,
00072                              ovm_bitstream_t value,
00073                              bit recurse=1);
00074 
00075   //call the super function to get child recursion and any registered fields
00076   super.set_int_local(field_name, value, recurse);
00077 
00078   //set the local properties
00079   if(ovm_is_match(field_name, "recording_detail"))
00080     recording_detail = value;
00081 
00082 endfunction
00083 
00084 

Intelligent Design Verification
Intelligent Design Verification
Project: OVM, Revision: 1.1.0
Copyright (c) 2008 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
Doxygen Version: 1.4.6
Mon Sep 29 14:23:30 2008
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV