00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 #ifndef SC_VER_H
00029 #define SC_VER_H
00030 
00031 #include "sysc/kernel/sc_macros.h"               
00032                                                  
00033 #include "sysc/communication/sc_writer_policy.h" 
00034 
00035 #include <string>
00036 
00037 namespace sc_core {
00038 
00039 extern const char* sc_copyright();
00040 extern const char* sc_release();
00041 extern const char* sc_version();
00042 
00043 extern const unsigned int sc_version_major;
00044 extern const unsigned int sc_version_minor;
00045 extern const unsigned int sc_version_patch;
00046 
00047 extern const std::string  sc_version_originator;
00048 extern const std::string  sc_version_release_date;
00049 extern const std::string  sc_version_prerelease;
00050 extern const bool         sc_is_prerelease;
00051 extern const std::string  sc_version_string;
00052 extern const std::string  sc_copyright_string;
00053 
00054 #define SYSTEMC_2_3_1
00055  
00056 #define SYSTEMC_VERSION       20140417
00057 
00058 #define SC_VERSION_ORIGINATOR "RISC 0.4.2" // identify Accellera-derived RISC version
00059 #define SC_VERSION_MAJOR      2
00060 #define SC_VERSION_MINOR      3
00061 #define SC_VERSION_PATCH      1
00062 #define SC_IS_PRERELEASE      0
00063 
00065 #define IEEE_1666_SYSTEMC     201101L
00066 
00067 
00068 
00069 
00070 
00071 #define SC_COPYRIGHT                               \
00072   "Copyright (c) 1996-2018 by CECS and all Contributors,\n" \
00073   "ALL RIGHTS RESERVED\n"
00074 
00075 
00076 #define SC_VERSION_RELEASE_DATE \
00077   SC_STRINGIFY_HELPER_( SYSTEMC_VERSION )
00078 
00079 #if ( SC_IS_PRERELEASE == 1 )
00080 #  define SC_VERSION_PRERELEASE "pub_rev"
00081 #  define SC_VERSION \
00082     SC_STRINGIFY_HELPER_( SC_VERSION_MAJOR.SC_VERSION_MINOR.SC_VERSION_PATCH ) \
00083     "_" SC_VERSION_PRERELEASE "_" SC_VERSION_RELEASE_DATE \
00084     "-" SC_VERSION_ORIGINATOR
00085 #else
00086 #  define SC_VERSION_PRERELEASE "" // nothing
00087 #  define SC_VERSION \
00088     SC_STRINGIFY_HELPER_( SC_VERSION_MAJOR.SC_VERSION_MINOR.SC_VERSION_PATCH ) \
00089     "-" SC_VERSION_ORIGINATOR
00090 #endif
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 #define SC_API_VERSION_STRING \
00101       SC_CONCAT_UNDERSCORE_( sc_api_version, \
00102       SC_CONCAT_UNDERSCORE_( SC_VERSION_MAJOR, \
00103       SC_CONCAT_UNDERSCORE_( SC_VERSION_MINOR, \
00104                              SC_VERSION_PATCH ) ) )
00105 
00106 
00107 #define SC_API_DEFINED_( Symbol ) \
00108   Symbol ## _DEFINED_
00109 #define SC_API_UNDEFINED_( Symbol ) \
00110   Symbol ## _UNDEFINED_
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 #if 0 // don't enforce check of DEBUG_SYSTEMC for now
00119 
00120 #if defined( DEBUG_SYSTEMC )
00121 # define DEBUG_SYSTEMC_CHECK_ \
00122     SC_CONFIG_DEFINED_(DEBUG_SYSTEMC)
00123 #else
00124 # define DEBUG_SYSTEMC_CHECK_ \
00125     SC_CONFIG_UNDEFINED_(DEBUG_SYSTEMC)
00126 #endif
00127 extern const int DEBUG_SYSTEMC_CHECK_;
00128 #endif
00129 
00130 
00131 #if defined( SC_DISABLE_VIRTUAL_BIND )
00132 # define SC_DISABLE_VIRTUAL_BIND_CHECK_ \
00133     SC_API_DEFINED_(SC_DISABLE_VIRTUAL_BIND)
00134 #else
00135 # define SC_DISABLE_VIRTUAL_BIND_CHECK_ \
00136     SC_API_UNDEFINED_(SC_DISABLE_VIRTUAL_BIND)
00137 #endif
00138 extern const int SC_DISABLE_VIRTUAL_BIND_CHECK_;
00139 
00140 
00141 
00142 
00143 
00144 
00145 
00146 
00147 
00148 template 
00149 <
00150 
00151   const int * DisableVirtualBind
00152 >
00153 struct SC_API_VERSION_STRING
00154 {
00155   SC_API_VERSION_STRING
00156     (
00157        
00158        sc_writer_policy default_writer_policy
00159     );
00160 };
00161 
00162 #if !defined( SC_DISABLE_API_VERSION_CHECK ) // disabled in sc_ver.cpp
00163 static
00164 SC_API_VERSION_STRING
00165 <
00166 
00167   & SC_DISABLE_VIRTUAL_BIND_CHECK_
00168 >
00169 api_version_check
00170 (
00171   SC_DEFAULT_WRITER_POLICY
00172 );
00173 #endif // SC_DISABLE_API_VERSION_CHECK
00174 
00175 
00176 
00177 
00178 } 
00179 
00180 
00181 
00182 
00183 
00184 
00185 
00186 
00187 
00188 
00189 #endif