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