SystemC  Recoding Infrastructure for SystemC v0.6.2 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
sc_ver.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  The following code is derived, directly or indirectly, from the SystemC
4  source code Copyright (c) 1996-2014 by all Contributors.
5  All Rights reserved.
6 
7  The contents of this file are subject to the restrictions and limitations
8  set forth in the SystemC Open Source License (the "License");
9  You may not use this file except in compliance with such restrictions and
10  limitations. You may obtain instructions on how to receive a copy of the
11  License at http://www.accellera.org/. Software distributed by Contributors
12  under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13  ANY KIND, either express or implied. See the License for the specific
14  language governing rights and limitations under the License.
15 
16  *****************************************************************************/
17 
18 /*****************************************************************************
19 
20  sc_ver.h -- Version and copyright information.
21 
22  Original Author: Stan Y. Liao, Synopsys, Inc.
23 
24  NO AUTOMATIC CHANGE LOG IS GENERATED, EXPLICIT CHANGE LOG AT END OF FILE
25  *****************************************************************************/
26 
27 
28 #ifndef SC_VER_H
29 #define SC_VER_H
30 
31 #include "sysc/kernel/sc_macros.h" // SC_CONCAT_UNDERSCORE_
32  // SC_STRINGIFY_HELPER_
33 #include "sysc/communication/sc_writer_policy.h" // SC_DEFAULT_WRITER_POLICY
34 
35 #include <string>
36 
37 namespace sc_core {
38 
39 extern const char* sc_copyright();
40 extern const char* sc_release();
41 extern const char* sc_version();
42 
43 extern const unsigned int sc_version_major;
44 extern const unsigned int sc_version_minor;
45 extern const unsigned int sc_version_patch;
46 
47 extern const std::string sc_version_originator;
48 extern const std::string sc_version_release_date;
49 extern const std::string sc_version_prerelease;
50 extern const bool sc_is_prerelease;
51 extern const std::string sc_version_string;
52 extern const std::string sc_copyright_string;
53 
54 #define SYSTEMC_2_3_1
55 
56 #define SYSTEMC_VERSION 20140417
57 //#define SC_VERSION_ORIGINATOR "Accellera"
58 #define SC_VERSION_ORIGINATOR "RISC 0.6.2" // identify Accellera-derived RISC version
59 #define SC_VERSION_MAJOR 2
60 #define SC_VERSION_MINOR 3
61 #define SC_VERSION_PATCH 1
62 #define SC_IS_PRERELEASE 0
63 
65 #define IEEE_1666_SYSTEMC 201101L
66 
67 //#define SC_COPYRIGHT
68 // "Copyright (c) 1996-2014 by all Contributors,\n"
69 // "ALL RIGHTS RESERVED\n"
70 // 04/06/2015 GL: new compiler message
71 #define SC_COPYRIGHT \
72  "Copyright (c) 1996-2020 by CECS and all Contributors,\n" \
73  "ALL RIGHTS RESERVED\n"
74 
75 
76 #define SC_VERSION_RELEASE_DATE \
77  SC_STRINGIFY_HELPER_( SYSTEMC_VERSION )
78 
79 #if ( SC_IS_PRERELEASE == 1 )
80 # define SC_VERSION_PRERELEASE "pub_rev"
81 # define SC_VERSION \
82  SC_STRINGIFY_HELPER_( SC_VERSION_MAJOR.SC_VERSION_MINOR.SC_VERSION_PATCH ) \
83  "_" SC_VERSION_PRERELEASE "_" SC_VERSION_RELEASE_DATE \
84  "-" SC_VERSION_ORIGINATOR
85 #else
86 # define SC_VERSION_PRERELEASE "" // nothing
87 # define SC_VERSION \
88  SC_STRINGIFY_HELPER_( SC_VERSION_MAJOR.SC_VERSION_MINOR.SC_VERSION_PATCH ) \
89  "-" SC_VERSION_ORIGINATOR
90 #endif
91 
92 // THIS CLASS AND STATIC INSTANCE BELOW DETECTS BAD REV OBJECTS AT LINK TIME
93 //
94 // Each source file which includes this file for the current SystemC version
95 // will have a static instance of the class sc_api_version_XXX defined
96 // in it. That object instance will cause the constructor below
97 // to be invoked. If the version of the SystemC being linked against
98 // does not contain the constructor below a linkage error will occur.
99 
100 #define SC_API_VERSION_STRING \
101  SC_CONCAT_UNDERSCORE_( sc_api_version, \
102  SC_CONCAT_UNDERSCORE_( SC_VERSION_MAJOR, \
103  SC_CONCAT_UNDERSCORE_( SC_VERSION_MINOR, \
104  SC_VERSION_PATCH ) ) )
105 
106 // explicitly avoid macro expansion
107 #define SC_API_DEFINED_( Symbol ) \
108  Symbol ## _DEFINED_
109 #define SC_API_UNDEFINED_( Symbol ) \
110  Symbol ## _UNDEFINED_
111 
112 // Some preprocessor switches need to be consistent between the application
113 // and the library (e.g. if sizes of classes are affected or other parts of
114 // the ABI are affected). (Some of) these are checked here at link-time as
115 // well, by setting template parameters to sc_api_version_XXX, while only
116 // one variant is defined in sc_ver.cpp.
117 
118 #if 0 // don't enforce check of DEBUG_SYSTEMC for now
119 // DEBUG_SYSTEMC
120 #if defined( DEBUG_SYSTEMC )
121 # define DEBUG_SYSTEMC_CHECK_ \
122  SC_CONFIG_DEFINED_(DEBUG_SYSTEMC)
123 #else
124 # define DEBUG_SYSTEMC_CHECK_ \
125  SC_CONFIG_UNDEFINED_(DEBUG_SYSTEMC)
126 #endif
127 extern const int DEBUG_SYSTEMC_CHECK_;
128 #endif
129 
130 // SC_DISABLE_VIRTUAL_BIND
131 #if defined( SC_DISABLE_VIRTUAL_BIND )
132 # define SC_DISABLE_VIRTUAL_BIND_CHECK_ \
133  SC_API_DEFINED_(SC_DISABLE_VIRTUAL_BIND)
134 #else
135 # define SC_DISABLE_VIRTUAL_BIND_CHECK_ \
136  SC_API_UNDEFINED_(SC_DISABLE_VIRTUAL_BIND)
137 #endif
138 extern const int SC_DISABLE_VIRTUAL_BIND_CHECK_;
139 
140 // Some preprocessor switches need to be consistent between different
141 // translation units of an application. Those can't be easily checked
142 // during link-time. Instead, perform a check during run-time by
143 // passing the value to the constructor of the api_version_check object.
144 
145 // Note: Template and constructor parameters are not passed as default
146 // values to avoid ODR violations in the check itself.
147 
148 template // use pointers for more verbose error messages
149 <
150 // const int * DebugSystemC,
151  const int * DisableVirtualBind
152 >
154 {
156  (
157  // SC_DEFAULT_WRITER_POLICY
158  sc_writer_policy default_writer_policy
159  );
160 };
161 
162 #if !defined( SC_DISABLE_API_VERSION_CHECK ) // disabled in sc_ver.cpp
163 static
165 <
166 // & DEBUG_SYSTEMC_CHECK_,
168 >
170 (
172 );
173 #endif // SC_DISABLE_API_VERSION_CHECK
174 
175 //#undef SC_API_DEFINED_
176 //#undef SC_API_UNDEFINED_
177 
178 } // namespace sc_core
179 
180 /*****************************************************************************
181 
182  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
183  changes you are making here.
184 
185  Name, Affiliation, Date:
186  Description of Modification:
187 
188  *****************************************************************************/
189 #endif
const char * sc_release()
const std::string sc_copyright_string
const bool sc_is_prerelease
const unsigned int sc_version_patch
const char * sc_copyright()
#define SC_DEFAULT_WRITER_POLICY
const std::string sc_version_originator
const unsigned int sc_version_minor
SC_API_VERSION_STRING(sc_writer_policy default_writer_policy)
const std::string sc_version_string
const std::string sc_version_prerelease
static SC_API_VERSION_STRING< &SC_DISABLE_VIRTUAL_BIND_CHECK_ > api_version_check(SC_DEFAULT_WRITER_POLICY)
const char * sc_version()
const unsigned int sc_version_major
const int SC_DISABLE_VIRTUAL_BIND_CHECK_
const std::string sc_version_release_date