urm_message.svh

Go to the documentation of this file.
00001 // $Id: a00306.html,v 1.1 2009/01/07 19:30:03 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 `ifndef OVM_URM_MESSAGE_SVH
00023 `define OVM_URM_MESSAGE_SVH
00024 
00025 `include "base/ovm_object.svh"
00026 `include "compatibility/urm_message_defines.svh"
00027 
00028 typedef class ovm_printer;
00029 
00030 /* Message related types and globals */
00031 
00032 typedef enum {
00033   OVM_URM_STYLE_NONE         = 0,
00034   OVM_URM_STYLE_FILE         = 'b0000000001,
00035   OVM_URM_STYLE_HIERARCHY    = 'b0000000010,
00036   OVM_URM_STYLE_LINE         = 'b0000000100,
00037   OVM_URM_STYLE_MESSAGE_TEXT = 'b0000001000,
00038   OVM_URM_STYLE_SCOPE        = 'b0000010000,
00039   OVM_URM_STYLE_SEVERITY     = 'b0000100000,
00040   OVM_URM_STYLE_TAG          = 'b0001000000,
00041   OVM_URM_STYLE_TIME         = 'b0010000000,
00042   OVM_URM_STYLE_UNIT         = 'b0100000000,
00043   OVM_URM_STYLE_VERBOSITY    = 'b1000000000
00044 } urm_msg_style_flags_enum;
00045 
00046 typedef enum {
00047   OVM_URM_SHORT = 'b0010001010,
00048   OVM_URM_LONG  = 'b1110011111,
00049   OVM_URM_RAW   = 'b0000001000
00050 } urm_msg_style_enum;
00051 
00052 typedef enum {
00053   OVM_URM_MSG_DEBUG,
00054   OVM_URM_MSG_DUT,
00055   OVM_URM_MSG_TOOL,
00056   OVM_URM_MSG_OVM
00057 } urm_msg_type;
00058 
00059 string urm_global_tmp_str="";
00060 
00061 // global variables
00062 // ----------------
00063 
00064 string urm_global_msg_detail_str;
00065 
00066 typedef class urm_command_line_processor_c;
00067 
00068 
00069 `ifdef INCA
00070 urm_command_line_processor_c urm_command_line_processor = new;
00071 `endif
00072 
00073 typedef class ovm_urm_report_server;
00074 ovm_urm_report_server ovm_global_urm_report_server;
00075 
00076 string ovm_urm_tmp_str="";
00077 
00078 parameter OVM_UNDEF = -1;
00079 
00080 
00081 //------------------------------------------------------------------------------
00082 //
00083 // MESSAGE Control 
00084 //
00085 // interim message handling
00086 //
00087 //------------------------------------------------------------------------------
00088 
00089 
00090 // urm_continue (global)
00091 // ------------
00092 
00093 function void urm_continue();
00094 endfunction
00095 
00096 
00097 // urm_stop_run (global)
00098 // ------------
00099 
00100 typedef class ovm_component;
00101 function void urm_stop_run();
00102   fork
00103     ovm_top.stop_request();
00104   join_none
00105 endfunction
00106 
00107 
00108 // urm_finish (global)
00109 // ----------
00110 
00111 function void urm_finish();
00112   fork
00113     $finish();
00114   join_none
00115 endfunction
00116 
00117 
00118 // urm_stop (global)
00119 // --------
00120 
00121 function void urm_stop();
00122   fork
00123     $stop();
00124   join_none
00125 endfunction
00126 
00127 
00128 
00129 //------------------------------------------------------------------------------
00130 //
00131 // CLASS: ovm_urm_message_format -- INTERIM SOLUTION: SUBJECT TO CHANGE
00132 //
00133 // simple container of user-settable parameters for governing
00134 // message header output. 
00135 //------------------------------------------------------------------------------
00136 
00137 
00138 class ovm_urm_message_format;
00139 
00140   static string info_prefix     = `ANSI_FG_BLACK;
00141   static string warning_prefix  = `ANSI_FG_GREEN;
00142   static string error_prefix    = {`ANSI_FG_RED,`ANSI_BOLD};
00143   static string fatal_prefix    = {`ANSI_FG_RED,`ANSI_BOLD};
00144   static string time1_prefix    = {"[",`ANSI_FG_BLACK,`ANSI_BRIGHT};
00145   static string time2_prefix    = {"[",`ANSI_FG_BLACK};
00146 
00147   static string info_postfix    = `ANSI_RESET;
00148   static string warning_postfix = `ANSI_RESET;
00149   static string error_postfix   = `ANSI_RESET;
00150   static string fatal_postfix   = `ANSI_RESET;
00151   static string time1_postfix   = {`ANSI_RESET,"]"};
00152   static string time2_postfix   = {`ANSI_RESET,"]"};
00153 
00154   static string short_text      = "SHORT";
00155   static string long_text       = "LONG";
00156   static string raw_text        = "RAW";
00157 
00158   static string info0_text      = "";
00159   static string info1_text      = "OVM_LOW";
00160   static string info2_text      = "OVM_MEDIUM";
00161   static string info3_text      = "OVM_HIGH";
00162   static string info4_text      = "OVM_FULL";
00163 
00164   static string info_text       = "INFO";
00165   static string warning_text    = "WARNING";
00166   static string error_text      = "ERROR";
00167   static string fatal_text      = "FATAL";
00168 
00169   static string none_text       = "NONE";
00170   static string low_text        = "LOW";
00171   static string medium_text     = "MEDIUM";
00172   static string high_text       = "HIGH";
00173   static string full_text       = "FULL";
00174 
00175   static string separator       = " -- ";
00176 
00177   static bit    enable_ansi_colors     = 0;
00178 
00179 endclass
00180 
00181 
00182 //----------------------------------------------------------------------
00183 // CLASS ovm_urm_message
00184 //----------------------------------------------------------------------
00185 class ovm_urm_message;
00186 
00187   string m_id;
00188   string m_text;
00189   int m_type;
00190   ovm_severity m_severity;
00191   int m_verbosity;
00192   int m_max_verbosity;
00193   int m_style;
00194   ovm_report_object m_client;
00195   string m_file;
00196   int m_line;
00197   int m_action;
00198   int m_destination;
00199   string m_scope;
00200   string m_hierarchy;
00201   string m_name;
00202 
00203   extern function new(
00204     string id, string text, int typ, ovm_severity sev, int verbosity, string hier,
00205     ovm_report_object client, string file, int line, string scope
00206   );
00207 
00208 endclass
00209 
00210 
00211 
00212 //----------------------------------------------------------------------------
00213 //
00214 // CLASS: ovm_urm_override_request
00215 //
00216 //----------------------------------------------------------------------------
00217 
00218 typedef class ovm_urm_override_operator;
00219 
00220 class ovm_urm_override_request extends ovm_object;
00221    string                match_hierarchy;
00222    string                match_scope;
00223    string                match_name;
00224    string                match_file;
00225    int                   match_line;
00226    string                match_text;
00227    string                match_tag;
00228    ovm_urm_override_operator operator;
00229 
00230    extern function bit    is_applicable_to_message(ovm_urm_message msg);
00231    extern function void   apply_override(ovm_urm_message msg);
00232    extern function string dump_request_details();
00233 
00234    // type functions
00235    function bit is_style_override();       
00236                          return operator.is_style_override();       endfunction
00237 
00238    function bit is_verbosity_override();   
00239                          return operator.is_verbosity_override();   endfunction
00240 
00241    function bit is_destination_override(); 
00242                          return operator.is_destination_override(); endfunction
00243 
00244    function bit is_severity_override();    
00245                          return operator.is_severity_override();    endfunction
00246 
00247    function bit is_action_override();      
00248                          return operator.is_action_override();      endfunction
00249 
00250    // Constructor
00251    extern function new ( string hierarchy="", 
00252           string scope="", 
00253           string name="", 
00254           string file="",
00255           int    line=-1,
00256           string text="",
00257           string tag="",
00258           ovm_urm_override_operator op=null);
00259 
00260   function string get_type_name();
00261     return "ovm_urm_override_request";
00262   endfunction
00263  
00264   function ovm_object create(string name="");
00265     ovm_urm_override_request mh; mh = new;
00266     mh.set_name(name);
00267     return mh;
00268   endfunction
00269 
00270   function void do_print(ovm_printer printer);
00271     printer.print_string("match_hierarchy", match_hierarchy);
00272     printer.print_string("match_scope", match_scope);
00273     printer.print_string("match_name", match_name);
00274     printer.print_string("match_file", match_file);
00275     printer.print_field("match_line", match_line, $bits(match_line));
00276     printer.print_string("match_text", match_text);
00277     printer.print_string("match_tag", match_tag);
00278     printer.print_object("operator", operator);
00279   endfunction 
00280 
00281   function bit do_compare(ovm_object rhs, ovm_comparer comparer);
00282     ovm_urm_override_request rhs_;
00283     if ( rhs == this ) return 1;
00284     if ( rhs == null ) return 0;
00285     if(!$cast(rhs_, rhs)) return 0;
00286 
00287     if ( match_hierarchy != rhs_.match_hierarchy ) return 0;
00288     if ( match_scope != rhs_.match_scope ) return 0;
00289     if ( match_name != rhs_.match_name ) return 0;
00290     if ( match_file != rhs_.match_file ) return 0;
00291     if ( match_line != rhs_.match_line ) return 0;
00292     if ( match_text != rhs_.match_text ) return 0;
00293     if ( match_tag != rhs_.match_tag ) return 0;
00294 
00295     return operator.do_compare(rhs_.operator,comparer);
00296   endfunction
00297 endclass
00298 
00299 
00300 
00301 //----------------------------------------------------------------------------
00302 //
00303 // CLASS: ovm_urm_override_operator
00304 //
00305 //----------------------------------------------------------------------------
00306 
00307 
00308 class ovm_urm_override_operator extends ovm_object;
00309 
00310    // attributes
00311    protected int        m_style;
00312    protected int        m_verbosity;
00313    protected int        m_destination;
00314    protected ovm_severity   m_severity;
00315    protected int        m_action;
00316    protected ovm_severity   m_severity_for_action;
00317 
00318    // enable flags, hold 1 for attributes to apply
00319    protected bit  m_enable_style; 
00320    protected bit  m_enable_verbosity;
00321    protected bit  m_enable_destination;
00322    protected bit  m_enable_severity;
00323    protected bit  m_enable_action;
00324 
00325    extern function void   apply_overrides(ovm_urm_message msg);
00326    extern function string dump_override_details();
00327 
00328    // type functions
00329    function bit is_style_override();       return m_enable_style;       endfunction
00330    function bit is_verbosity_override();   return m_enable_verbosity;   endfunction
00331    function bit is_destination_override(); return m_enable_destination; endfunction
00332    function bit is_severity_override();    return m_enable_severity;    endfunction
00333    function bit is_action_override();      return m_enable_action;      endfunction
00334 
00335    // get_* functions
00336    function int       get_style();               return m_style;               endfunction
00337    function int       get_verbosity();           return m_verbosity;           endfunction
00338    function int       get_destination();         return m_destination;         endfunction
00339    function ovm_severity  get_severity();            return m_severity;            endfunction
00340    function int       get_action();              return m_action;              endfunction
00341    function ovm_severity  get_severity_for_action(); return m_severity_for_action; endfunction
00342 
00343    // set_* functions
00344    function bit set_style(int s);
00345       m_style = s;
00346       m_enable_style = 1;
00347       return(1);
00348    endfunction
00349 
00350    function bit set_verbosity(int v);
00351       m_verbosity = v;
00352       m_enable_verbosity = 1;
00353       return(1);
00354    endfunction
00355 
00356    function bit set_destination(int d);
00357       m_destination = d;
00358       m_enable_destination = 1;
00359       return(1);
00360    endfunction
00361 
00362    function bit set_severity(ovm_severity s);
00363       m_severity = s;
00364       m_enable_severity = 1;      
00365       return(1);
00366    endfunction
00367 
00368    function bit set_action(ovm_severity s, int action);
00369       if ((s == OVM_FATAL) && (action & OVM_EXIT == 0)) begin
00370          $display("Error: cannot remove EXIT from the action set of messages with FATAL severity. Ignoring.");
00371          //## how to print the above?
00372          return(0);
00373       end
00374       else begin 
00375          m_action = action;
00376          m_severity_for_action = s;
00377          m_enable_action = 1;
00378          return(1);
00379       end
00380    endfunction
00381 
00382    function string get_type_name();
00383      return "ovm_urm_override_operator";
00384    endfunction
00385    function ovm_object create(string name="");
00386       ovm_urm_override_operator o;
00387       o = new;
00388       o.set_name(name);
00389       return o;
00390    endfunction
00391    function void do_print(ovm_printer printer);
00392      printer.print_field("m_style", m_style, $bits(m_style));
00393      printer.print_field("m_verbosity", m_verbosity, $bits(m_verbosity));
00394      printer.print_field("m_destination", m_destination, $bits(m_destination));
00395      printer.print_field("m_severity", m_severity, $bits(m_severity));
00396      printer.print_field("m_action", m_action, $bits(m_action));
00397      printer.print_field("m_severity_for_action", m_severity_for_action, $bits(m_severity_for_action));
00398      printer.print_field("m_enable_style", m_enable_style, $bits(m_enable_style));
00399      printer.print_field("m_enable_verbosity", m_enable_verbosity, $bits(m_enable_verbosity));
00400      printer.print_field("m_enable_destination", m_enable_destination, $bits(m_enable_destination));
00401      printer.print_field("m_enable_severity", m_enable_severity, $bits(m_enable_severity));
00402      printer.print_field("m_enable_action", m_enable_action, $bits(m_enable_action));
00403    endfunction
00404 
00405    function void do_copy(ovm_object rhs);
00406      ovm_urm_override_operator rhs_;
00407      if((rhs == null) || (rhs==this)) return;
00408      if(!$cast(rhs_, rhs)) return;
00409 
00410      m_style = rhs_.m_style;
00411      m_verbosity = rhs_.m_verbosity;
00412      m_destination = rhs_.m_destination;
00413      m_severity = rhs_.m_severity;
00414      m_action = rhs_.m_action;
00415      m_severity_for_action = rhs_.m_severity_for_action;
00416      m_enable_style = rhs_.m_enable_style;
00417      m_enable_verbosity = rhs_.m_enable_verbosity;
00418      m_enable_destination = rhs_.m_enable_destination;
00419      m_enable_severity = rhs_.m_enable_severity;
00420      m_enable_action = rhs_.m_enable_action;
00421    endfunction
00422 
00423    function bit do_compare(ovm_object rhs, ovm_comparer comparer);
00424      ovm_urm_override_operator rhs_;
00425      if ( rhs == this ) return 1;
00426      if ( rhs == null ) return 0;
00427      if(!$cast(rhs_, rhs)) return 0;
00428 
00429      if ( m_style != rhs_.m_style ) return 0;
00430      if ( m_verbosity != rhs_.m_verbosity ) return 0;
00431      if ( m_destination != rhs_.m_destination ) return 0;
00432      if ( m_severity != rhs_.m_severity ) return 0;
00433      if ( m_action != rhs_.m_action ) return 0;
00434      if ( m_severity_for_action != rhs_.m_severity_for_action ) return 0;
00435      if ( m_enable_style != rhs_.m_enable_style ) return 0;
00436      if ( m_enable_verbosity != rhs_.m_enable_verbosity ) return 0;
00437      if ( m_enable_destination != rhs_.m_enable_destination ) return 0;
00438      if ( m_enable_severity != rhs_.m_enable_severity ) return 0;
00439 
00440      return ( m_enable_action == rhs_.m_enable_action );
00441    endfunction
00442 endclass
00443 
00444 
00445 
00446 //----------------------------------------------------------------------
00447 // CLASS ovm_urm_report_server
00448 //
00449 // Replacement server which preserves normal OVM API while
00450 // including some API available in URM
00451 //----------------------------------------------------------------------
00452 
00453 class ovm_urm_report_server extends ovm_report_server;
00454 
00455   static bit m_initialized;
00456   static int m_global_debug_style;
00457   static string m_global_hier;
00458   static string m_global_scope;
00459   static ovm_severity m_global_severity;
00460   static int m_global_default_type;
00461   static int m_global_type;
00462 
00463   protected static ovm_urm_override_request m_override_requests[$];
00464 
00465   extern function new();
00466 
00467   extern virtual function void report(
00468     ovm_severity severity,
00469     string name,
00470     string id,
00471     string message,
00472     int verbosity_level,
00473     string filename,
00474     int line,
00475     ovm_report_object client
00476   );
00477 
00478   /* max_quit_count */
00479   extern static function int get_global_max_quit_count();
00480   extern static function void set_global_max_quit_count(int value);
00481 
00482   /* style */
00483   extern static function int get_global_debug_style();
00484   extern static function void set_global_debug_style(int value);
00485   extern static function void set_message_debug_style(
00486     string hierarchy,    // wildcard for message hierarchy, default "*"
00487     string scope,        // wildcard for message scope, default "*"
00488     string name,         // wildcard for message name, default "*"
00489     string file,         // wildcard for file name, default "*"
00490     int line,            // wildcard for line number, default -1 (matches all)
00491     string text,         // wildcard for message text, default "*"
00492     string tag,          // wildcard for message tag, default "*"
00493     bit remove,          // FALSE --> add rule, TRUE --> remove it
00494     int value
00495   );
00496 
00497   /* verbosity */
00498   extern static function int get_global_verbosity();
00499   extern static function void set_global_verbosity(int value);
00500   extern static function void set_message_verbosity(
00501     string hierarchy,    // wildcard for message hierarchy, default "*"
00502     string scope,        // wildcard for message scope, default "*"
00503     string name,         // wildcard for message name, default "*"
00504     string file,         // wildcard for file name, default "*"
00505     int line,            // wildcard for line number, default -1 (matches all)
00506     string text,         // wildcard for message text, default "*"
00507     string tag,          // wildcard for message tag, default "*"
00508     bit remove,          // FALSE --> add rule, TRUE --> remove it
00509     int value
00510   );
00511 
00512   /* destination */
00513   extern static function int get_global_destination();
00514   extern static function void set_global_destination(int value);
00515   extern static function void set_message_destination(
00516     string hierarchy,    // wildcard for message hierarchy, default "*"
00517     string scope,        // wildcard for message scope, default "*"
00518     string name,         // wildcard for message name, default "*"
00519     string file,         // wildcard for file name, default "*"
00520     int line,            // wildcard for line number, default -1 (matches all)
00521     string text,         // wildcard for message text, default "*"
00522     string tag,          // wildcard for message tag, default "*"
00523     bit remove,          // FALSE --> add rule, TRUE --> remove it
00524     int value
00525   );
00526 
00527   /* severity */
00528   extern static function ovm_severity get_global_severity();
00529   extern static function void set_global_severity(ovm_severity value);
00530   extern static function void set_message_severity(
00531     string hierarchy,    // wildcard for message hierarchy, default "*"
00532     string scope,        // wildcard for message scope, default "*"
00533     string name,         // wildcard for message name, default "*"
00534     string file,         // wildcard for file name, default "*"
00535     int line,            // wildcard for line number, default -1 (matches all)
00536     string text,         // wildcard for message text, default "*"
00537     string tag,          // wildcard for message tag, default "*"
00538     bit remove,          // FALSE --> add rule, TRUE --> remove it
00539     ovm_severity value
00540   );
00541 
00542   /* action */
00543   extern static function int get_global_actions(ovm_severity sev);
00544   extern static function void set_global_actions(ovm_severity sev, int value);
00545   extern static function void set_message_actions(
00546     string hierarchy,    // wildcard for message hierarchy, default "*"
00547     string scope,        // wildcard for message scope, default "*"
00548     string name,         // wildcard for message name, default "*"
00549     string file,         // wildcard for file name, default "*"
00550     int line,            // wildcard for line number, default -1 (matches all)
00551     string text,         // wildcard for message text, default "*"
00552     string tag,          // wildcard for message tag, default "*"
00553     bit remove,          // FALSE --> add rule, TRUE --> remove it
00554     ovm_severity severity_val,
00555     int value
00556   );
00557 
00558   /* activate URM message server */
00559   extern static function void init_urm_report_server();
00560 
00561   /* set type used in direct ovm_report_* calls */
00562   extern static function void set_default_report_type(int value);
00563 
00564   /* internal API */
00565   extern static function bit m_message_header(ovm_urm_message message);
00566   extern static function bit m_message_subheader(ovm_urm_message message);
00567   extern static function void m_message_footer(ovm_urm_message message);
00568   extern static function void m_set_report_hier(string hier);
00569   extern static function void m_set_report_scope(string scope);
00570   extern static function void m_set_report_type(int typ);
00571   extern static function void m_reset_report_flags();
00572 
00573   extern static function string m_dump_global_debug_style();
00574   extern static function string m_dump_rules_debug_style();
00575   extern static function string m_dump_global_verbosity();
00576   extern static function string m_dump_rules_verbosity();
00577   extern static function string m_dump_global_destination();
00578   extern static function string m_dump_rules_destination();
00579   extern static function string m_dump_global_severity();
00580   extern static function string m_dump_rules_severity();
00581   extern static function string m_dump_global_actions();
00582   extern static function string m_dump_rules_actions();
00583 
00584   extern static protected function void m_handle_new_request(
00585     ovm_urm_override_request new_req, bit remove
00586   );
00587   extern static protected function int m_find_last_matching_request_loc(
00588     ovm_urm_override_request req
00589   );
00590   extern static protected function void m_apply_override_requests(ovm_urm_message msg);
00591 
00592 endclass
00593 
00594 function ovm_report_object m_get_report_object();
00595   return _global_reporter;
00596 endfunction
00597 
00598 function string get_full_name();
00599   return "";
00600 endfunction
00601 
00602 function void set_checks(int verbosity);
00603   ovm_urm_report_server::set_global_verbosity(verbosity);
00604 endfunction
00605 
00606 
00607 //----------------------------------------------------------------------------
00608 //
00609 // CLASS: urm_command_line_processor
00610 //
00611 //----------------------------------------------------------------------------
00612 
00613 class urm_command_line_processor_c;
00614 
00615   ovm_root top;
00616   int verbosity_val;
00617   ovm_severity severity_val;
00618   bit use_severity, use_verbosity, use_urm;
00619 
00620   function new;
00621 
00622     int int_val;
00623     string severity_str;
00624 
00625     use_severity = 0;
00626     use_verbosity = 0;
00627     use_urm = 0;
00628 
00629     verbosity_val = OVM_LOW;
00630     ovm_top.enable_print_topology = 0;
00631 
00632     severity_val = OVM_ERROR;
00633 
00634     if (!ovm_top.enable_print_topology && 
00635          (verbosity_val >= OVM_FULL || $test$plusargs("OVM_VERBOSE")))
00636       ovm_top.enable_print_topology = 1;
00637 
00638     if ($test$plusargs("USE_URM_MSG"))
00639       use_urm = 1;
00640 
00641     if ($value$plusargs("MSG_DETAIL=%s",urm_global_msg_detail_str) ||
00642         $value$plusargs("msg_detail=%s",urm_global_msg_detail_str) ||
00643         $value$plusargs("OVM_MSG_DETAIL=%s",urm_global_msg_detail_str) ||
00644         $value$plusargs("ovm_msg_detail=%s",urm_global_msg_detail_str))
00645     begin
00646       case (urm_global_msg_detail_str)
00647         "NONE"   : verbosity_val = OVM_NONE;
00648         "LOW"    : verbosity_val = OVM_LOW;
00649         "MEDIUM" : verbosity_val = OVM_MEDIUM;
00650         "HIGH"   : verbosity_val = OVM_HIGH;
00651         "FULL"   : verbosity_val = OVM_FULL;
00652         "DEBUG"  : verbosity_val = OVM_DEBUG;
00653         "OVM_NONE"   : verbosity_val = OVM_NONE;
00654         "OVM_LOW"    : verbosity_val = OVM_LOW;
00655         "OVM_MEDIUM" : verbosity_val = OVM_MEDIUM;
00656         "OVM_HIGH"   : verbosity_val = OVM_HIGH;
00657         "OVM_FULL"   : verbosity_val = OVM_FULL;
00658         "OVM_DEBUG"  : verbosity_val = OVM_DEBUG;
00659         default  : begin // check for number
00660           int_val = urm_global_msg_detail_str.atoi();
00661           if (int_val)
00662             verbosity_val = int_val;
00663         end
00664       endcase
00665       use_verbosity = 1;
00666       use_urm = 1;
00667     end
00668 
00669     if ($value$plusargs("SEVERITY=%s",severity_str) ||
00670         $value$plusargs("severity=%s",severity_str) ||
00671         $value$plusargs("OVM_SEVERITY=%s",severity_str) ||
00672         $value$plusargs("ovm_severity=%s",severity_str) ||
00673         $value$plusargs("OVM_URM_SEVERITY=%s",severity_str) ||
00674         $value$plusargs("urm_severity=%s",severity_str)) begin
00675       case (severity_str)
00676         "INFO"    : severity_val = OVM_INFO;
00677         "WARNING" : severity_val = OVM_WARNING;
00678         "ERROR"   : severity_val = OVM_ERROR;
00679         "FATAL"   : severity_val = OVM_FATAL;
00680       endcase
00681       use_severity = 1;
00682       use_urm = 1;
00683     end
00684 
00685     if ( use_urm == 1 ) ovm_urm_report_server::init_urm_report_server();
00686     if ( use_severity == 1 ) ovm_urm_report_server::set_global_severity(severity_val);
00687     if ( use_verbosity == 1 ) ovm_urm_report_server::set_global_verbosity(verbosity_val);
00688 
00689     if(use_verbosity)
00690     begin
00691       top = ovm_root::get();
00692       top.set_report_verbosity_level_hier(verbosity_val);
00693     end
00694   endfunction
00695 
00696 endclass
00697 
00698 
00699 `endif // OVM_URM_MESSAGE_SVH

Intelligent Design Verification
Intelligent Design Verification
Project: OVM, Revision: 2.0.1
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.5.5
Wed Jan 7 19:27:18 2009
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV