00001 /***************************************************************************** 00002 00003 The following code is derived, directly or indirectly, from the SystemC 00004 source code Copyright (c) 1996-2006 by all Contributors. 00005 All Rights reserved. 00006 00007 The contents of this file are subject to the restrictions and limitations 00008 set forth in the SystemC Open Source License Version 2.4 (the "License"); 00009 You may not use this file except in compliance with such restrictions and 00010 limitations. You may obtain instructions on how to receive a copy of the 00011 License at http://www.systemc.org/. Software distributed by Contributors 00012 under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 00013 ANY KIND, either express or implied. See the License for the specific 00014 language governing rights and limitations under the License. 00015 00016 *****************************************************************************/ 00017 00018 /***************************************************************************** 00019 00020 sc_utils_ids.cpp -- Report ids for the utils code. 00021 00022 Original Author: Martin Janssen, Synopsys, Inc., 2002-01-17 00023 00024 *****************************************************************************/ 00025 00026 /***************************************************************************** 00027 00028 MODIFICATION LOG - modifiers, enter your name, affiliation, date and 00029 changes you are making here. 00030 00031 Name, Affiliation, Date: 00032 Description of Modification: 00033 00034 Alex Riesen, Synopsys, Inc., 2003-02-02 00035 ported to SystemC 2.1 exception reporting. 00036 00037 *****************************************************************************/ 00038 00039 00040 // $Log: sc_utils_ids.cpp,v $ 00041 // Revision 1.1.1.1 2006/12/15 20:31:39 acg 00042 // SystemC 2.2 00043 // 00044 // Revision 1.6 2006/01/31 21:42:07 acg 00045 // Andy Goodrich: Added checks for SC_DEPRECATED_WARNINGS being defined as 00046 // DISABLED. If so, we turn off the /IEEE_Std_1666/deprecated message group. 00047 // 00048 // Revision 1.5 2006/01/24 21:59:59 acg 00049 // Andy Goodrich: removed sc_trace_ids.h since its only message has been 00050 // replaced by SC_ID_IEEE_1666_DEPRECATION_ message. 00051 // 00052 // Revision 1.4 2006/01/24 20:53:41 acg 00053 // Andy Goodrich: added warnings indicating that use of integer ids in reports 00054 // is deprecated. Added tracing/sc_trace_ids.h to message list. 00055 // 00056 // Revision 1.3 2006/01/13 18:53:11 acg 00057 // Andy Goodrich: Added $Log command so that CVS comments are reproduced in 00058 // the source. 00059 // 00060 00061 #include "sysc/utils/sc_report.h" 00062 00063 00064 namespace sc_core { 00065 #define SC_DEFINE_MESSAGE(id,unused,text) extern const char id[] = text; 00066 #include "sysc/utils/sc_utils_ids.h" 00067 #include "sysc/kernel/sc_kernel_ids.h" 00068 #include "sysc/communication/sc_communication_ids.h" 00069 #include "sysc/datatypes/bit/sc_bit_ids.h" 00070 #include "sysc/datatypes/fx/sc_fx_ids.h" 00071 #include "sysc/datatypes/int/sc_int_ids.h" 00072 #undef SC_DEFINE_MESSAGE 00073 00074 00075 static sc_msg_def texts[] = { 00076 #define SC_DEFINE_MESSAGE(id,n,unused) \ 00077 { (id), 0u, {0u}, 0u, {0u}, 0u, 0u, {0u}, 0, n }, 00078 00079 #undef SC_UTILS_IDS_H 00080 #include "sysc/utils/sc_utils_ids.h" 00081 00082 #undef SC_KERNEL_IDS_H 00083 #include "sysc/kernel/sc_kernel_ids.h" 00084 00085 #undef SC_COMMUNICATION_IDS_H 00086 #include "sysc/communication/sc_communication_ids.h" 00087 00088 #undef SC_BIT_IDS_H 00089 #include "sysc/datatypes/bit/sc_bit_ids.h" 00090 00091 #undef SC_FX_IDS_H 00092 #include "sysc/datatypes/fx/sc_fx_ids.h" 00093 00094 #undef SC_INT_IDS_H 00095 #include "sysc/datatypes/int/sc_int_ids.h" 00096 00097 #undef SC_DEFINE_MESSAGE 00098 }; 00099 static sc_report_handler::msg_def_items items = { 00100 texts, sizeof(texts)/sizeof(*texts), false, 0 00101 }; 00102 00103 static 00104 int initialize() 00105 { 00106 sc_report_handler::add_static_msg_types(&items); 00107 00108 // PROCESS ANY ENVIRONMENTAL OVERRIDES: 00109 00110 const char* deprecation_warn = std::getenv("SC_DEPRECATION_WARNINGS"); 00111 if ( (deprecation_warn!=0) && !strcmp(deprecation_warn,"DISABLE") ) 00112 { 00113 sc_report_handler::set_actions("/IEEE_Std_1666/deprecated", 00114 SC_DO_NOTHING); 00115 } 00116 return 42; 00117 } 00118 00119 static int forty_two = initialize(); 00120 00121 } // namespace sc_core 00122 00123 // Taf!