Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

scv_util.h

Go to the documentation of this file.
00001 //  -*- C++ -*- <this line is for emacs to recognize it as C++ code>
00002 /*****************************************************************************
00003 
00004   The following code is derived, directly or indirectly, from the SystemC
00005   source code Copyright (c) 1996-2002 by all Contributors.
00006   All Rights reserved.
00007 
00008   The contents of this file are subject to the restrictions and limitations
00009   set forth in the SystemC Open Source License Version 2.3 (the "License");
00010   You may not use this file except in compliance with such restrictions and
00011   limitations. You may obtain instructions on how to receive a copy of the
00012   License at http://www.systemc.org/. Software distributed by Contributors
00013   under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
00014   ANY KIND, either express or implied. See the License for the specific
00015   language governing rights and limitations under the License.
00016 
00017  *****************************************************************************/
00018 
00019 /*****************************************************************************
00020 
00021   scv_util.h -- 
00022   The public interface for various small facilities.
00023 
00024   Original Authors (Cadence Design Systems, Inc):
00025   Norris Ip, Dean Shea, John Rose, Jasvinder Singh, William Paulsen,
00026   John Pierce, Rachida Kebichi, Ted Elkind, David Bailey
00027   2002-09-23
00028 
00029  *****************************************************************************/
00030 
00031 /*****************************************************************************
00032 
00033   MODIFICATION LOG - modifiers, enter your name, affiliation, date and
00034   changes you are making here.
00035 
00036       Name, Affiliation, Date:
00037   Description of Modification:
00038 
00039  *****************************************************************************/
00040 
00041 #ifndef SCV_UTIL_H
00042 #define SCV_UTIL_H
00043 
00044 #include "scv/scv_config.h"
00045 
00046 #ifdef SCV_USE_IOSTREAM_H
00047 # include <iostream.h>
00048 #else
00049 # include <iostream>
00050 #endif
00051 
00052 #include <string>
00053 
00054 #include "systemc.h"
00055 
00056 #ifdef _USE_UINT64_WRITE
00057 inline ostream& operator<<(ostream& os, const unsigned long long& full) {
00058   char image[32];
00059   sprintf(image,"%llu",full);
00060   return os << image;
00061 }
00062 #endif
00063 
00064 
00065 int _scv_make_unique_id(const string& name, const string& kind);
00066 const string _scv_make_unique_name(const string& name, int id);
00067 
00068 
00069 //
00070 // process name
00071 //
00072 
00073 
00074 typedef const char *(_scv_process_name_server_t)(sc_process_b *proc_p);
00075 extern _scv_process_name_server_t *_scv_process_name_server;
00076 void _scv_set_process_name_server(_scv_process_name_server_t *);
00077 const char *_scv_get_process_name(const sc_process_b *proc_p);
00078 
00079 const char *scv_get_process_name(sc_process_b *proc_p);
00080 
00081 
00082 //
00083 // scv_startup
00084 //
00085 
00086 #define SCV_STARTUP() { \
00087   static bool dummy = scv_startup(); \
00088   if (0) cout << dummy << endl; \
00089 }
00090 
00091 bool scv_startup();
00092 
00093 //
00094 // scv_out
00095 //
00096 
00097 extern ostream *_scv_out_p;
00098 #define scv_out (*_scv_out_p)
00099 
00100 // Keep for backward compatibility
00101 //
00102 // tb_status (for regression convenience)
00103 //
00104 #define tb_status cout
00105 #define TBS_INFO "%%TB_STATUS_INFO: "
00106 #define TBS_WARNING "%%TB_STATUS_WARNING: "
00107 #define TBS_ERROR "%%TB_STATUS_ERROR: "
00108 #define TBS_SUCCESS "%%TB_STATUS_SUCCESS: "
00109 #define TBS_FAIL "%%TB_STATUS_FAIL: "
00110 
00111 #endif

Generated on Fri Jan 14 08:29:11 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18